Skip to content

Commit c4523a1

Browse files
Merge pull request #11 from celestifyhq/issue/10
Issue/10
2 parents 5237544 + 7b9ea40 commit c4523a1

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

.changeset/slimy-wolves-sneeze.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"fcm-cloudflare-workers": patch
3+
---
4+
5+
Corrected ApnsPayload typescript interface to match spec.

src/entity/fcm-message-v2.ts

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,34 +44,37 @@ export interface AndroidConfig {
4444
}
4545

4646
export interface ApnsPayload {
47-
alert?: {
48-
title?: string;
49-
subtitle?: string;
50-
body?: string;
51-
launch_image?: string;
52-
title_loc_key?: string;
53-
title_loc_args?: string[];
54-
subtitle_loc_key?: string;
55-
subtitle_loc_args?: string[];
56-
loc_key?: string;
57-
loc_args?: string[];
58-
};
59-
badge?: number;
60-
sound?: string | {
61-
critical?: boolean;
62-
name?: string;
63-
volume?: number;
47+
aps: {
48+
alert?: {
49+
title?: string;
50+
subtitle?: string;
51+
body?: string;
52+
launch_image?: string;
53+
title_loc_key?: string;
54+
title_loc_args?: string[];
55+
subtitle_loc_key?: string;
56+
subtitle_loc_args?: string[];
57+
loc_key?: string;
58+
loc_args?: string[];
59+
};
60+
badge?: number;
61+
sound?: string | {
62+
critical?: boolean;
63+
name?: string;
64+
volume?: number;
65+
};
66+
thread_id?: string;
67+
category?: string;
68+
content_available?: boolean;
69+
mutable_content?: boolean;
70+
target_content_id?: string;
71+
interruption_level?: string;
72+
relevance_score?: number;
73+
filter_criteria?: string;
74+
stale_date?: number;
75+
content_state?: { [key: string]: any };
6476
};
65-
thread_id?: string;
66-
category?: string;
67-
content_available?: boolean;
68-
mutable_content?: boolean;
69-
target_content_id?: string;
70-
interruption_level?: string;
71-
relevance_score?: number;
72-
filter_criteria?: string;
73-
stale_date?: number;
74-
content_state?: { [key: string]: any };
77+
[key: string]: any;
7578
}
7679

7780
export interface ApnsConfig {

0 commit comments

Comments
 (0)