magicbell-js 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/commonjs/project-client/services/broadcasts/models/broadcast-collection.d.ts +265 -265
- package/dist/commonjs/project-client/services/broadcasts/models/broadcast.d.ts +168 -168
- package/dist/commonjs/project-client/services/broadcasts/models/email.d.ts +3 -3
- package/dist/commonjs/project-client/services/broadcasts/models/in-app.d.ts +3 -3
- package/dist/commonjs/project-client/services/broadcasts/models/mobile-push.d.ts +3 -3
- package/dist/commonjs/project-client/services/broadcasts/models/overrides-channels.d.ts +27 -27
- package/dist/commonjs/project-client/services/broadcasts/models/overrides.d.ts +39 -39
- package/dist/commonjs/project-client/services/broadcasts/models/sms.d.ts +3 -3
- package/dist/commonjs/project-client/services/channels/models/apns-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/apns-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/discard-result.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/expo-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/expo-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/fcm-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/fcm-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/inbox-token-response-collection.d.ts +28 -28
- package/dist/commonjs/project-client/services/channels/models/inbox-token-response.d.ts +16 -16
- package/dist/commonjs/project-client/services/channels/models/slack-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/slack-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/teams-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/teams-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/web-push-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/web-push-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/common/user.d.ts +6 -6
- package/dist/commonjs/project-client/services/integrations/models/inbox-config-collection.d.ts +182 -182
- package/dist/commonjs/project-client/services/integrations/models/inbox-config-payload.d.ts +98 -98
- package/dist/commonjs/project-client/services/integrations/models/inbox-config.d.ts +140 -140
- package/dist/commonjs/project-client/services/integrations/models/theme.d.ts +56 -56
- package/dist/commonjs/project-client/services/users/models/user-collection.d.ts +10 -10
- package/dist/commonjs/socket.d.ts +11 -0
- package/dist/commonjs/socket.d.ts.map +1 -0
- package/dist/commonjs/socket.js +200 -0
- package/dist/commonjs/socket.js.map +1 -0
- package/dist/commonjs/user-client/services/channels/models/apns-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/apns-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/discard-result.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/expo-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/expo-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/fcm-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/fcm-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/inbox-token-response-collection.d.ts +28 -28
- package/dist/commonjs/user-client/services/channels/models/inbox-token-response.d.ts +16 -16
- package/dist/commonjs/user-client/services/channels/models/slack-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/slack-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/teams-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/teams-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/web-push-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/web-push-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/integrations/models/authed-user.d.ts +8 -8
- package/dist/commonjs/user-client/services/integrations/models/inbox-config-payload.d.ts +98 -98
- package/dist/commonjs/user-client/services/integrations/models/slack-installation.d.ts +57 -57
- package/dist/commonjs/user-client/services/integrations/models/slack-start-install.d.ts +8 -8
- package/dist/commonjs/user-client/services/integrations/models/theme.d.ts +56 -56
- package/dist/commonjs/user-client/services/notifications/models/notification-collection.d.ts +56 -56
- package/dist/commonjs/user-client/services/notifications/models/notification.d.ts +32 -32
- package/dist/esm/project-client/services/broadcasts/models/broadcast-collection.d.ts +265 -265
- package/dist/esm/project-client/services/broadcasts/models/broadcast.d.ts +168 -168
- package/dist/esm/project-client/services/broadcasts/models/email.d.ts +3 -3
- package/dist/esm/project-client/services/broadcasts/models/in-app.d.ts +3 -3
- package/dist/esm/project-client/services/broadcasts/models/mobile-push.d.ts +3 -3
- package/dist/esm/project-client/services/broadcasts/models/overrides-channels.d.ts +27 -27
- package/dist/esm/project-client/services/broadcasts/models/overrides.d.ts +39 -39
- package/dist/esm/project-client/services/broadcasts/models/sms.d.ts +3 -3
- package/dist/esm/project-client/services/channels/models/apns-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/apns-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/discard-result.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/expo-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/expo-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/fcm-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/fcm-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/inbox-token-response-collection.d.ts +28 -28
- package/dist/esm/project-client/services/channels/models/inbox-token-response.d.ts +16 -16
- package/dist/esm/project-client/services/channels/models/slack-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/slack-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/teams-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/teams-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/web-push-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/web-push-token.d.ts +8 -8
- package/dist/esm/project-client/services/common/user.d.ts +6 -6
- package/dist/esm/project-client/services/integrations/models/inbox-config-collection.d.ts +182 -182
- package/dist/esm/project-client/services/integrations/models/inbox-config-payload.d.ts +98 -98
- package/dist/esm/project-client/services/integrations/models/inbox-config.d.ts +140 -140
- package/dist/esm/project-client/services/integrations/models/theme.d.ts +56 -56
- package/dist/esm/project-client/services/users/models/user-collection.d.ts +10 -10
- package/dist/esm/socket.d.ts +11 -0
- package/dist/esm/socket.d.ts.map +1 -0
- package/dist/esm/socket.js +196 -0
- package/dist/esm/socket.js.map +1 -0
- package/dist/esm/user-client/services/channels/models/apns-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/apns-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/discard-result.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/expo-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/expo-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/fcm-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/fcm-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/inbox-token-response-collection.d.ts +28 -28
- package/dist/esm/user-client/services/channels/models/inbox-token-response.d.ts +16 -16
- package/dist/esm/user-client/services/channels/models/slack-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/slack-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/teams-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/teams-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/web-push-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/web-push-token.d.ts +8 -8
- package/dist/esm/user-client/services/integrations/models/authed-user.d.ts +8 -8
- package/dist/esm/user-client/services/integrations/models/inbox-config-payload.d.ts +98 -98
- package/dist/esm/user-client/services/integrations/models/slack-installation.d.ts +57 -57
- package/dist/esm/user-client/services/integrations/models/slack-start-install.d.ts +8 -8
- package/dist/esm/user-client/services/integrations/models/theme.d.ts +56 -56
- package/dist/esm/user-client/services/notifications/models/notification-collection.d.ts +56 -56
- package/dist/esm/user-client/services/notifications/models/notification.d.ts +32 -32
- package/package.json +14 -3
- package/socket/package.json +4 -0
- package/src/socket.ts +232 -0
|
@@ -277,6 +277,13 @@ export declare const theme: z.ZodLazy<z.ZodObject<{
|
|
|
277
277
|
backgroundColor: string;
|
|
278
278
|
}>>>;
|
|
279
279
|
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
header?: {
|
|
281
|
+
backgroundColor: string;
|
|
282
|
+
fontSize: string;
|
|
283
|
+
textColor: string;
|
|
284
|
+
borderRadius: string;
|
|
285
|
+
fontFamily: string;
|
|
286
|
+
} | undefined;
|
|
280
287
|
banner?: {
|
|
281
288
|
backgroundColor: string;
|
|
282
289
|
fontSize: string;
|
|
@@ -294,13 +301,6 @@ export declare const theme: z.ZodLazy<z.ZodObject<{
|
|
|
294
301
|
textColor: string;
|
|
295
302
|
borderRadius: string;
|
|
296
303
|
} | undefined;
|
|
297
|
-
header?: {
|
|
298
|
-
backgroundColor: string;
|
|
299
|
-
fontSize: string;
|
|
300
|
-
textColor: string;
|
|
301
|
-
borderRadius: string;
|
|
302
|
-
fontFamily: string;
|
|
303
|
-
} | undefined;
|
|
304
304
|
icon?: {
|
|
305
305
|
borderColor: string;
|
|
306
306
|
width: string;
|
|
@@ -345,6 +345,13 @@ export declare const theme: z.ZodLazy<z.ZodObject<{
|
|
|
345
345
|
backgroundColor: string;
|
|
346
346
|
} | undefined;
|
|
347
347
|
}, {
|
|
348
|
+
header?: {
|
|
349
|
+
backgroundColor: string;
|
|
350
|
+
fontSize: string;
|
|
351
|
+
textColor: string;
|
|
352
|
+
borderRadius: string;
|
|
353
|
+
fontFamily: string;
|
|
354
|
+
} | undefined;
|
|
348
355
|
banner?: {
|
|
349
356
|
backgroundColor: string;
|
|
350
357
|
fontSize: string;
|
|
@@ -362,13 +369,6 @@ export declare const theme: z.ZodLazy<z.ZodObject<{
|
|
|
362
369
|
textColor: string;
|
|
363
370
|
borderRadius: string;
|
|
364
371
|
} | undefined;
|
|
365
|
-
header?: {
|
|
366
|
-
backgroundColor: string;
|
|
367
|
-
fontSize: string;
|
|
368
|
-
textColor: string;
|
|
369
|
-
borderRadius: string;
|
|
370
|
-
fontFamily: string;
|
|
371
|
-
} | undefined;
|
|
372
372
|
icon?: {
|
|
373
373
|
borderColor: string;
|
|
374
374
|
width: string;
|
|
@@ -910,6 +910,13 @@ export declare const themeResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
910
910
|
backgroundColor: string;
|
|
911
911
|
}>>>;
|
|
912
912
|
}, "strip", z.ZodTypeAny, {
|
|
913
|
+
header?: {
|
|
914
|
+
backgroundColor: string;
|
|
915
|
+
borderRadius: string;
|
|
916
|
+
fontFamily: string;
|
|
917
|
+
fontSize: string;
|
|
918
|
+
textColor: string;
|
|
919
|
+
} | undefined;
|
|
913
920
|
banner?: {
|
|
914
921
|
backgroundColor: string;
|
|
915
922
|
backgroundOpacity: number | undefined;
|
|
@@ -927,13 +934,6 @@ export declare const themeResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
927
934
|
fontSize: string;
|
|
928
935
|
textColor: string;
|
|
929
936
|
} | undefined;
|
|
930
|
-
header?: {
|
|
931
|
-
backgroundColor: string;
|
|
932
|
-
borderRadius: string;
|
|
933
|
-
fontFamily: string;
|
|
934
|
-
fontSize: string;
|
|
935
|
-
textColor: string;
|
|
936
|
-
} | undefined;
|
|
937
937
|
icon?: {
|
|
938
938
|
borderColor: string;
|
|
939
939
|
width: string;
|
|
@@ -978,6 +978,13 @@ export declare const themeResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
978
978
|
backgroundColor: string;
|
|
979
979
|
} | undefined;
|
|
980
980
|
}, {
|
|
981
|
+
header?: {
|
|
982
|
+
backgroundColor: string;
|
|
983
|
+
fontSize: string;
|
|
984
|
+
textColor: string;
|
|
985
|
+
borderRadius: string;
|
|
986
|
+
fontFamily: string;
|
|
987
|
+
} | undefined;
|
|
981
988
|
banner?: {
|
|
982
989
|
backgroundColor: string;
|
|
983
990
|
fontSize: string;
|
|
@@ -995,13 +1002,6 @@ export declare const themeResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
995
1002
|
textColor: string;
|
|
996
1003
|
borderRadius: string;
|
|
997
1004
|
} | undefined;
|
|
998
|
-
header?: {
|
|
999
|
-
backgroundColor: string;
|
|
1000
|
-
fontSize: string;
|
|
1001
|
-
textColor: string;
|
|
1002
|
-
borderRadius: string;
|
|
1003
|
-
fontFamily: string;
|
|
1004
|
-
} | undefined;
|
|
1005
1005
|
icon?: {
|
|
1006
1006
|
borderColor: string;
|
|
1007
1007
|
width: string;
|
|
@@ -1114,6 +1114,13 @@ export declare const themeResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
1114
1114
|
backgroundColor: string;
|
|
1115
1115
|
} | undefined;
|
|
1116
1116
|
}, {
|
|
1117
|
+
header?: {
|
|
1118
|
+
backgroundColor: string;
|
|
1119
|
+
fontSize: string;
|
|
1120
|
+
textColor: string;
|
|
1121
|
+
borderRadius: string;
|
|
1122
|
+
fontFamily: string;
|
|
1123
|
+
} | undefined;
|
|
1117
1124
|
banner?: {
|
|
1118
1125
|
backgroundColor: string;
|
|
1119
1126
|
fontSize: string;
|
|
@@ -1131,13 +1138,6 @@ export declare const themeResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
1131
1138
|
textColor: string;
|
|
1132
1139
|
borderRadius: string;
|
|
1133
1140
|
} | undefined;
|
|
1134
|
-
header?: {
|
|
1135
|
-
backgroundColor: string;
|
|
1136
|
-
fontSize: string;
|
|
1137
|
-
textColor: string;
|
|
1138
|
-
borderRadius: string;
|
|
1139
|
-
fontFamily: string;
|
|
1140
|
-
} | undefined;
|
|
1141
1141
|
icon?: {
|
|
1142
1142
|
borderColor: string;
|
|
1143
1143
|
width: string;
|
|
@@ -1667,6 +1667,13 @@ export declare const themeRequest: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
1667
1667
|
backgroundColor: string;
|
|
1668
1668
|
}>>>;
|
|
1669
1669
|
}, "strip", z.ZodTypeAny, {
|
|
1670
|
+
header?: {
|
|
1671
|
+
backgroundColor: string;
|
|
1672
|
+
borderRadius: string;
|
|
1673
|
+
fontFamily: string;
|
|
1674
|
+
fontSize: string;
|
|
1675
|
+
textColor: string;
|
|
1676
|
+
} | undefined;
|
|
1670
1677
|
banner?: {
|
|
1671
1678
|
backgroundColor: string;
|
|
1672
1679
|
backgroundOpacity: number | undefined;
|
|
@@ -1684,13 +1691,6 @@ export declare const themeRequest: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
1684
1691
|
fontSize: string;
|
|
1685
1692
|
textColor: string;
|
|
1686
1693
|
} | undefined;
|
|
1687
|
-
header?: {
|
|
1688
|
-
backgroundColor: string;
|
|
1689
|
-
borderRadius: string;
|
|
1690
|
-
fontFamily: string;
|
|
1691
|
-
fontSize: string;
|
|
1692
|
-
textColor: string;
|
|
1693
|
-
} | undefined;
|
|
1694
1694
|
icon?: {
|
|
1695
1695
|
borderColor: string;
|
|
1696
1696
|
width: string;
|
|
@@ -1735,6 +1735,13 @@ export declare const themeRequest: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
1735
1735
|
backgroundColor: string;
|
|
1736
1736
|
} | undefined;
|
|
1737
1737
|
}, {
|
|
1738
|
+
header?: {
|
|
1739
|
+
backgroundColor: string;
|
|
1740
|
+
fontSize: string;
|
|
1741
|
+
textColor: string;
|
|
1742
|
+
borderRadius: string;
|
|
1743
|
+
fontFamily: string;
|
|
1744
|
+
} | undefined;
|
|
1738
1745
|
banner?: {
|
|
1739
1746
|
backgroundColor: string;
|
|
1740
1747
|
fontSize: string;
|
|
@@ -1752,13 +1759,6 @@ export declare const themeRequest: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
1752
1759
|
textColor: string;
|
|
1753
1760
|
borderRadius: string;
|
|
1754
1761
|
} | undefined;
|
|
1755
|
-
header?: {
|
|
1756
|
-
backgroundColor: string;
|
|
1757
|
-
fontSize: string;
|
|
1758
|
-
textColor: string;
|
|
1759
|
-
borderRadius: string;
|
|
1760
|
-
fontFamily: string;
|
|
1761
|
-
} | undefined;
|
|
1762
1762
|
icon?: {
|
|
1763
1763
|
borderColor: string;
|
|
1764
1764
|
width: string;
|
|
@@ -1871,6 +1871,13 @@ export declare const themeRequest: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
1871
1871
|
backgroundColor: string;
|
|
1872
1872
|
} | undefined;
|
|
1873
1873
|
}, {
|
|
1874
|
+
header?: {
|
|
1875
|
+
backgroundColor: string;
|
|
1876
|
+
fontSize: string;
|
|
1877
|
+
textColor: string;
|
|
1878
|
+
borderRadius: string;
|
|
1879
|
+
fontFamily: string;
|
|
1880
|
+
} | undefined;
|
|
1874
1881
|
banner?: {
|
|
1875
1882
|
backgroundColor: string;
|
|
1876
1883
|
fontSize: string;
|
|
@@ -1888,13 +1895,6 @@ export declare const themeRequest: z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
|
1888
1895
|
textColor: string;
|
|
1889
1896
|
borderRadius: string;
|
|
1890
1897
|
} | undefined;
|
|
1891
|
-
header?: {
|
|
1892
|
-
backgroundColor: string;
|
|
1893
|
-
fontSize: string;
|
|
1894
|
-
textColor: string;
|
|
1895
|
-
borderRadius: string;
|
|
1896
|
-
fontFamily: string;
|
|
1897
|
-
} | undefined;
|
|
1898
1898
|
icon?: {
|
|
1899
1899
|
borderColor: string;
|
|
1900
1900
|
width: string;
|
|
@@ -111,23 +111,23 @@ export declare const userCollectionResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<
|
|
|
111
111
|
last_seen_at: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
112
112
|
updated_at: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
113
113
|
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
email?: string | null | undefined;
|
|
115
|
+
id?: string | undefined;
|
|
114
116
|
created_at?: string | null | undefined;
|
|
115
117
|
custom_attributes?: any;
|
|
116
|
-
email?: string | null | undefined;
|
|
117
118
|
external_id?: string | null | undefined;
|
|
118
119
|
first_name?: string | null | undefined;
|
|
119
|
-
id?: string | undefined;
|
|
120
120
|
last_name?: string | null | undefined;
|
|
121
121
|
last_notified_at?: string | null | undefined;
|
|
122
122
|
last_seen_at?: string | null | undefined;
|
|
123
123
|
updated_at?: string | null | undefined;
|
|
124
124
|
}, {
|
|
125
|
+
email?: string | null | undefined;
|
|
126
|
+
id?: string | undefined;
|
|
125
127
|
created_at?: string | null | undefined;
|
|
126
128
|
custom_attributes?: any;
|
|
127
|
-
email?: string | null | undefined;
|
|
128
129
|
external_id?: string | null | undefined;
|
|
129
130
|
first_name?: string | null | undefined;
|
|
130
|
-
id?: string | undefined;
|
|
131
131
|
last_name?: string | null | undefined;
|
|
132
132
|
last_notified_at?: string | null | undefined;
|
|
133
133
|
last_seen_at?: string | null | undefined;
|
|
@@ -144,12 +144,12 @@ export declare const userCollectionResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<
|
|
|
144
144
|
lastSeenAt: string | null | undefined;
|
|
145
145
|
updatedAt: string | null | undefined;
|
|
146
146
|
}, {
|
|
147
|
+
email?: string | null | undefined;
|
|
148
|
+
id?: string | undefined;
|
|
147
149
|
created_at?: string | null | undefined;
|
|
148
150
|
custom_attributes?: any;
|
|
149
|
-
email?: string | null | undefined;
|
|
150
151
|
external_id?: string | null | undefined;
|
|
151
152
|
first_name?: string | null | undefined;
|
|
152
|
-
id?: string | undefined;
|
|
153
153
|
last_name?: string | null | undefined;
|
|
154
154
|
last_notified_at?: string | null | undefined;
|
|
155
155
|
last_seen_at?: string | null | undefined;
|
|
@@ -196,12 +196,12 @@ export declare const userCollectionResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<
|
|
|
196
196
|
} | undefined;
|
|
197
197
|
}, {
|
|
198
198
|
data?: {
|
|
199
|
+
email?: string | null | undefined;
|
|
200
|
+
id?: string | undefined;
|
|
199
201
|
created_at?: string | null | undefined;
|
|
200
202
|
custom_attributes?: any;
|
|
201
|
-
email?: string | null | undefined;
|
|
202
203
|
external_id?: string | null | undefined;
|
|
203
204
|
first_name?: string | null | undefined;
|
|
204
|
-
id?: string | undefined;
|
|
205
205
|
last_name?: string | null | undefined;
|
|
206
206
|
last_notified_at?: string | null | undefined;
|
|
207
207
|
last_seen_at?: string | null | undefined;
|
|
@@ -232,12 +232,12 @@ export declare const userCollectionResponse: z.ZodLazy<z.ZodEffects<z.ZodObject<
|
|
|
232
232
|
} | undefined;
|
|
233
233
|
}, {
|
|
234
234
|
data?: {
|
|
235
|
+
email?: string | null | undefined;
|
|
236
|
+
id?: string | undefined;
|
|
235
237
|
created_at?: string | null | undefined;
|
|
236
238
|
custom_attributes?: any;
|
|
237
|
-
email?: string | null | undefined;
|
|
238
239
|
external_id?: string | null | undefined;
|
|
239
240
|
first_name?: string | null | undefined;
|
|
240
|
-
id?: string | undefined;
|
|
241
241
|
last_name?: string | null | undefined;
|
|
242
242
|
last_notified_at?: string | null | undefined;
|
|
243
243
|
last_seen_at?: string | null | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Notification, Client } from './user-client.js';
|
|
2
|
+
export declare class Socket {
|
|
3
|
+
#private;
|
|
4
|
+
constructor(options: {
|
|
5
|
+
token: string;
|
|
6
|
+
} | Client);
|
|
7
|
+
listen(onNotification: (notification: Notification) => void): Promise<void>;
|
|
8
|
+
disconnect(): void;
|
|
9
|
+
isListening(): boolean;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=socket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../../src/socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE7D,qBAAa,MAAM;;gBAYL,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAQzC,MAAM,CAAC,cAAc,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI;IA6CjE,UAAU;IASV,WAAW;CA2FZ"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _Socket_instances, _Socket_client, _Socket_socketUrl, _Socket_inboxToken, _Socket_origin, _Socket_websocket, _Socket_isConnected, _Socket_reconnectAttempts, _Socket_maxReconnectAttempts, _Socket_reconnectInterval, _Socket_notificationHandler, _Socket_handleMessage, _Socket_isNewNotificationMessage, _Socket_handleNewNotification, _Socket_handleReconnect, _Socket_getUrl, _Socket_getToken;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Socket = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const user_client_js_1 = require("./user-client.js");
|
|
7
|
+
class Socket {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
_Socket_instances.add(this);
|
|
10
|
+
_Socket_client.set(this, void 0);
|
|
11
|
+
_Socket_socketUrl.set(this, 'wss://ws.magicbell.com');
|
|
12
|
+
_Socket_inboxToken.set(this, void 0);
|
|
13
|
+
_Socket_origin.set(this, void 0);
|
|
14
|
+
_Socket_websocket.set(this, void 0);
|
|
15
|
+
_Socket_isConnected.set(this, false);
|
|
16
|
+
_Socket_reconnectAttempts.set(this, 0);
|
|
17
|
+
_Socket_maxReconnectAttempts.set(this, 5);
|
|
18
|
+
_Socket_reconnectInterval.set(this, 1000);
|
|
19
|
+
_Socket_notificationHandler.set(this, void 0);
|
|
20
|
+
if (options instanceof user_client_js_1.Client) {
|
|
21
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_client, options, "f");
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_client, new user_client_js_1.Client({ token: options.token }), "f");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async listen(onNotification) {
|
|
28
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_notificationHandler, onNotification, "f");
|
|
29
|
+
if (tslib_1.__classPrivateFieldGet(this, _Socket_websocket, "f") && tslib_1.__classPrivateFieldGet(this, _Socket_isConnected, "f")) {
|
|
30
|
+
console.warn('Already connected to WebSocket');
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const url = await tslib_1.__classPrivateFieldGet(this, _Socket_instances, "m", _Socket_getUrl).call(this);
|
|
35
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_websocket, new WebSocket(url), "f");
|
|
36
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_websocket, "f").onopen = () => {
|
|
37
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_isConnected, true, "f");
|
|
38
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_reconnectAttempts, 0, "f");
|
|
39
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_reconnectInterval, 1000, "f");
|
|
40
|
+
};
|
|
41
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_websocket, "f").onmessage = (event) => {
|
|
42
|
+
if (event.origin !== tslib_1.__classPrivateFieldGet(this, _Socket_origin, "f"))
|
|
43
|
+
return;
|
|
44
|
+
try {
|
|
45
|
+
const data = JSON.parse(event.data);
|
|
46
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_instances, "m", _Socket_handleMessage).call(this, data);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
console.error('Failed to parse WebSocket message:', error);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_websocket, "f").onclose = (event) => {
|
|
53
|
+
console.warn('WebSocket disconnected:', event.code, event.reason);
|
|
54
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_isConnected, false, "f");
|
|
55
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_instances, "m", _Socket_handleReconnect).call(this);
|
|
56
|
+
};
|
|
57
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_websocket, "f").onerror = (error) => {
|
|
58
|
+
console.error('WebSocket error:', error);
|
|
59
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_isConnected, false, "f");
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
console.error('Failed to connect to WebSocket:', error);
|
|
64
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_instances, "m", _Socket_handleReconnect).call(this);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
disconnect() {
|
|
68
|
+
if (tslib_1.__classPrivateFieldGet(this, _Socket_websocket, "f")) {
|
|
69
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_websocket, "f").close();
|
|
70
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_websocket, undefined, "f");
|
|
71
|
+
}
|
|
72
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_isConnected, false, "f");
|
|
73
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_reconnectAttempts, 0, "f");
|
|
74
|
+
}
|
|
75
|
+
isListening() {
|
|
76
|
+
return tslib_1.__classPrivateFieldGet(this, _Socket_isConnected, "f");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.Socket = Socket;
|
|
80
|
+
_Socket_client = new WeakMap(), _Socket_socketUrl = new WeakMap(), _Socket_inboxToken = new WeakMap(), _Socket_origin = new WeakMap(), _Socket_websocket = new WeakMap(), _Socket_isConnected = new WeakMap(), _Socket_reconnectAttempts = new WeakMap(), _Socket_maxReconnectAttempts = new WeakMap(), _Socket_reconnectInterval = new WeakMap(), _Socket_notificationHandler = new WeakMap(), _Socket_instances = new WeakSet(), _Socket_handleMessage = function _Socket_handleMessage(data) {
|
|
81
|
+
if (!tslib_1.__classPrivateFieldGet(this, _Socket_instances, "m", _Socket_isNewNotificationMessage).call(this, data)) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_instances, "m", _Socket_handleNewNotification).call(this, data.data.id);
|
|
85
|
+
}, _Socket_isNewNotificationMessage = function _Socket_isNewNotificationMessage(data) {
|
|
86
|
+
return (typeof data === 'object' &&
|
|
87
|
+
data !== null &&
|
|
88
|
+
data.name === 'notifications/new' &&
|
|
89
|
+
typeof data.data === 'object' &&
|
|
90
|
+
data.data !== null &&
|
|
91
|
+
typeof data.data.id === 'string');
|
|
92
|
+
}, _Socket_handleNewNotification = async function _Socket_handleNewNotification(notificationId) {
|
|
93
|
+
if (!tslib_1.__classPrivateFieldGet(this, _Socket_notificationHandler, "f")) {
|
|
94
|
+
console.warn('No notification handler provided');
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
const { data: notification, metadata: res } = await tslib_1.__classPrivateFieldGet(this, _Socket_client, "f").notifications.fetchNotification(notificationId);
|
|
99
|
+
if (!isOK(res)) {
|
|
100
|
+
console.error(`Failed to fetch notification ${notificationId}: ${res.status} ${res.statusText}`);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (notification) {
|
|
104
|
+
tslib_1.__classPrivateFieldGet(this, _Socket_notificationHandler, "f").call(this, notification);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
console.error(`Error fetching notification ${notificationId}:`, error);
|
|
109
|
+
}
|
|
110
|
+
}, _Socket_handleReconnect = function _Socket_handleReconnect() {
|
|
111
|
+
if (tslib_1.__classPrivateFieldGet(this, _Socket_reconnectAttempts, "f") >= tslib_1.__classPrivateFieldGet(this, _Socket_maxReconnectAttempts, "f")) {
|
|
112
|
+
console.error('Max reconnection attempts reached');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (!tslib_1.__classPrivateFieldGet(this, _Socket_notificationHandler, "f")) {
|
|
116
|
+
console.warn('No notification handler, skipping reconnect');
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
var _a;
|
|
121
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_reconnectAttempts, (_a = tslib_1.__classPrivateFieldGet(this, _Socket_reconnectAttempts, "f"), _a++, _a), "f");
|
|
122
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_reconnectInterval, Math.min(tslib_1.__classPrivateFieldGet(this, _Socket_reconnectInterval, "f") * 2, 30000), "f"); // Max 30 seconds
|
|
123
|
+
this.listen(tslib_1.__classPrivateFieldGet(this, _Socket_notificationHandler, "f"));
|
|
124
|
+
}, tslib_1.__classPrivateFieldGet(this, _Socket_reconnectInterval, "f"));
|
|
125
|
+
}, _Socket_getUrl = async function _Socket_getUrl() {
|
|
126
|
+
const jwtToken = tslib_1.__classPrivateFieldGet(this, _Socket_client, "f").config.token;
|
|
127
|
+
invariant(jwtToken, 'Failed to get token from client');
|
|
128
|
+
const apiKey = getApiKeyFromToken(jwtToken);
|
|
129
|
+
invariant(apiKey, 'Failed to get API key from token');
|
|
130
|
+
const token = await tslib_1.__classPrivateFieldGet(this, _Socket_instances, "m", _Socket_getToken).call(this);
|
|
131
|
+
const url = new URL(tslib_1.__classPrivateFieldGet(this, _Socket_socketUrl, "f"));
|
|
132
|
+
url.searchParams.set('api_key', apiKey);
|
|
133
|
+
url.searchParams.set('token', token);
|
|
134
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_origin, url.origin, "f");
|
|
135
|
+
return url.toString();
|
|
136
|
+
}, _Socket_getToken = async function _Socket_getToken() {
|
|
137
|
+
if (tslib_1.__classPrivateFieldGet(this, _Socket_inboxToken, "f"))
|
|
138
|
+
return tslib_1.__classPrivateFieldGet(this, _Socket_inboxToken, "f");
|
|
139
|
+
const { data, metadata: res } = await tslib_1.__classPrivateFieldGet(this, _Socket_client, "f").channels.saveInboxToken({
|
|
140
|
+
token: getSessionId(),
|
|
141
|
+
});
|
|
142
|
+
invariant(isOK(res), `Failed to save Inbox token: ${res.status} ${res.statusText}`);
|
|
143
|
+
invariant(data === null || data === void 0 ? void 0 : data.token, 'Unexpected server response, missing token');
|
|
144
|
+
tslib_1.__classPrivateFieldSet(this, _Socket_inboxToken, data.token, "f");
|
|
145
|
+
return data.token;
|
|
146
|
+
};
|
|
147
|
+
function isOK(response) {
|
|
148
|
+
return response.status >= 200 && response.status < 300;
|
|
149
|
+
}
|
|
150
|
+
function invariant(condition, message) {
|
|
151
|
+
if (!condition) {
|
|
152
|
+
throw new Error(message);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function getSessionId() {
|
|
156
|
+
if (typeof sessionStorage === 'undefined') {
|
|
157
|
+
return generateID(64);
|
|
158
|
+
}
|
|
159
|
+
// sessionStorage gets cleared when the page session ends. A page
|
|
160
|
+
// session lasts for as long as the browser is open and survives
|
|
161
|
+
// over page reloads and restores. Opening a page in a new tab or
|
|
162
|
+
// window will cause a new session to be initiated. This gives us
|
|
163
|
+
// a stable ID per tab, and different ID's across tabs.
|
|
164
|
+
const stored = sessionStorage.getItem('magicbell--realtime-token');
|
|
165
|
+
if (stored)
|
|
166
|
+
return stored;
|
|
167
|
+
const id = generateID(64);
|
|
168
|
+
sessionStorage.setItem('magicbell--realtime-token', id);
|
|
169
|
+
return id;
|
|
170
|
+
}
|
|
171
|
+
function generateID(length = 17) {
|
|
172
|
+
let id = '';
|
|
173
|
+
while (id.length < length) {
|
|
174
|
+
id += getRandomValues();
|
|
175
|
+
}
|
|
176
|
+
return id.substring(0, length);
|
|
177
|
+
}
|
|
178
|
+
function getApiKeyFromToken(token) {
|
|
179
|
+
const data = getTokenPayload(token);
|
|
180
|
+
if (!data)
|
|
181
|
+
return null;
|
|
182
|
+
if (data.api_key) {
|
|
183
|
+
return data.api_key;
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
function getTokenPayload(token) {
|
|
188
|
+
try {
|
|
189
|
+
const [_, payload] = token.split('.');
|
|
190
|
+
const data = JSON.parse(atob(payload));
|
|
191
|
+
return data || null;
|
|
192
|
+
}
|
|
193
|
+
catch (_a) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues
|
|
198
|
+
? () => crypto.getRandomValues(new Uint32Array(1))[0].toString(36)
|
|
199
|
+
: () => Math.random().toString(36).substring(2, 15);
|
|
200
|
+
//# sourceMappingURL=socket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../src/socket.ts"],"names":[],"mappings":";;;;;AAAA,qDAA6D;AAE7D,MAAa,MAAM;IAYjB,YAAY,OAAmC;;QAX/C,iCAAgB;QAChB,4BAAa,wBAAwB,EAAC;QACtC,qCAAgC;QAChC,iCAA4B;QAC5B,oCAAkC;QAClC,8BAAe,KAAK,EAAC;QACrB,oCAAqB,CAAC,EAAC;QACvB,uCAAwB,CAAC,EAAC;QAC1B,oCAAqB,IAAI,EAAC;QAC1B,8CAAyE;QAGvE,IAAI,OAAO,YAAY,uBAAM,EAAE,CAAC;YAC9B,+BAAA,IAAI,kBAAW,OAAO,MAAA,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,+BAAA,IAAI,kBAAW,IAAI,uBAAM,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,MAAA,CAAC;QACtD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,cAAoD;QAC/D,+BAAA,IAAI,+BAAwB,cAAc,MAAA,CAAC;QAE3C,IAAI,+BAAA,IAAI,yBAAW,IAAI,+BAAA,IAAI,2BAAa,EAAE,CAAC;YACzC,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;YAC/C,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,+BAAA,IAAI,yCAAQ,MAAZ,IAAI,CAAU,CAAC;YACjC,+BAAA,IAAI,qBAAc,IAAI,SAA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AO,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACvC,OAAO,IAAI,IAAI,IAAI,CAAC;IACtB,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,eAAe,GACnB,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe;IACrD,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;IAClE,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -15,18 +15,18 @@ export declare const apnsTokenCollection: z.ZodLazy<z.ZodObject<{
|
|
|
15
15
|
createdAt: string;
|
|
16
16
|
id: string;
|
|
17
17
|
deviceToken: string;
|
|
18
|
+
updatedAt?: string | null | undefined;
|
|
18
19
|
appId?: string | undefined;
|
|
19
20
|
discardedAt?: string | null | undefined;
|
|
20
21
|
installationId?: string | undefined;
|
|
21
|
-
updatedAt?: string | null | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
createdAt: string;
|
|
24
24
|
id: string;
|
|
25
25
|
deviceToken: string;
|
|
26
|
+
updatedAt?: string | null | undefined;
|
|
26
27
|
appId?: string | undefined;
|
|
27
28
|
discardedAt?: string | null | undefined;
|
|
28
29
|
installationId?: string | undefined;
|
|
29
|
-
updatedAt?: string | null | undefined;
|
|
30
30
|
}>>, "many">>;
|
|
31
31
|
links: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
32
32
|
first: z.ZodOptional<z.ZodString>;
|
|
@@ -46,10 +46,10 @@ export declare const apnsTokenCollection: z.ZodLazy<z.ZodObject<{
|
|
|
46
46
|
createdAt: string;
|
|
47
47
|
id: string;
|
|
48
48
|
deviceToken: string;
|
|
49
|
+
updatedAt?: string | null | undefined;
|
|
49
50
|
appId?: string | undefined;
|
|
50
51
|
discardedAt?: string | null | undefined;
|
|
51
52
|
installationId?: string | undefined;
|
|
52
|
-
updatedAt?: string | null | undefined;
|
|
53
53
|
}[] | undefined;
|
|
54
54
|
links?: {
|
|
55
55
|
first?: string | undefined;
|
|
@@ -61,10 +61,10 @@ export declare const apnsTokenCollection: z.ZodLazy<z.ZodObject<{
|
|
|
61
61
|
createdAt: string;
|
|
62
62
|
id: string;
|
|
63
63
|
deviceToken: string;
|
|
64
|
+
updatedAt?: string | null | undefined;
|
|
64
65
|
appId?: string | undefined;
|
|
65
66
|
discardedAt?: string | null | undefined;
|
|
66
67
|
installationId?: string | undefined;
|
|
67
|
-
updatedAt?: string | null | undefined;
|
|
68
68
|
}[] | undefined;
|
|
69
69
|
links?: {
|
|
70
70
|
first?: string | undefined;
|
|
@@ -96,18 +96,18 @@ export declare const apnsTokenCollectionResponse: z.ZodLazy<z.ZodEffects<z.ZodOb
|
|
|
96
96
|
id: string;
|
|
97
97
|
created_at: string;
|
|
98
98
|
device_token: string;
|
|
99
|
+
updated_at?: string | null | undefined;
|
|
99
100
|
app_id?: string | undefined;
|
|
100
101
|
discarded_at?: string | null | undefined;
|
|
101
102
|
installation_id?: string | undefined;
|
|
102
|
-
updated_at?: string | null | undefined;
|
|
103
103
|
}, {
|
|
104
104
|
id: string;
|
|
105
105
|
created_at: string;
|
|
106
106
|
device_token: string;
|
|
107
|
+
updated_at?: string | null | undefined;
|
|
107
108
|
app_id?: string | undefined;
|
|
108
109
|
discarded_at?: string | null | undefined;
|
|
109
110
|
installation_id?: string | undefined;
|
|
110
|
-
updated_at?: string | null | undefined;
|
|
111
111
|
}>, {
|
|
112
112
|
appId: string | undefined;
|
|
113
113
|
createdAt: string;
|
|
@@ -120,10 +120,10 @@ export declare const apnsTokenCollectionResponse: z.ZodLazy<z.ZodEffects<z.ZodOb
|
|
|
120
120
|
id: string;
|
|
121
121
|
created_at: string;
|
|
122
122
|
device_token: string;
|
|
123
|
+
updated_at?: string | null | undefined;
|
|
123
124
|
app_id?: string | undefined;
|
|
124
125
|
discarded_at?: string | null | undefined;
|
|
125
126
|
installation_id?: string | undefined;
|
|
126
|
-
updated_at?: string | null | undefined;
|
|
127
127
|
}>>, "many">>;
|
|
128
128
|
links: z.ZodOptional<z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
129
129
|
first: z.ZodOptional<z.ZodString>;
|
|
@@ -166,10 +166,10 @@ export declare const apnsTokenCollectionResponse: z.ZodLazy<z.ZodEffects<z.ZodOb
|
|
|
166
166
|
id: string;
|
|
167
167
|
created_at: string;
|
|
168
168
|
device_token: string;
|
|
169
|
+
updated_at?: string | null | undefined;
|
|
169
170
|
app_id?: string | undefined;
|
|
170
171
|
discarded_at?: string | null | undefined;
|
|
171
172
|
installation_id?: string | undefined;
|
|
172
|
-
updated_at?: string | null | undefined;
|
|
173
173
|
}[] | undefined;
|
|
174
174
|
links?: {
|
|
175
175
|
first?: string | undefined;
|
|
@@ -196,10 +196,10 @@ export declare const apnsTokenCollectionResponse: z.ZodLazy<z.ZodEffects<z.ZodOb
|
|
|
196
196
|
id: string;
|
|
197
197
|
created_at: string;
|
|
198
198
|
device_token: string;
|
|
199
|
+
updated_at?: string | null | undefined;
|
|
199
200
|
app_id?: string | undefined;
|
|
200
201
|
discarded_at?: string | null | undefined;
|
|
201
202
|
installation_id?: string | undefined;
|
|
202
|
-
updated_at?: string | null | undefined;
|
|
203
203
|
}[] | undefined;
|
|
204
204
|
links?: {
|
|
205
205
|
first?: string | undefined;
|
|
@@ -224,18 +224,18 @@ export declare const apnsTokenCollectionRequest: z.ZodLazy<z.ZodEffects<z.ZodObj
|
|
|
224
224
|
createdAt: string;
|
|
225
225
|
id: string;
|
|
226
226
|
deviceToken: string;
|
|
227
|
+
updatedAt?: string | null | undefined;
|
|
227
228
|
appId?: string | undefined;
|
|
228
229
|
discardedAt?: string | null | undefined;
|
|
229
230
|
installationId?: string | undefined;
|
|
230
|
-
updatedAt?: string | null | undefined;
|
|
231
231
|
}, {
|
|
232
232
|
createdAt: string;
|
|
233
233
|
id: string;
|
|
234
234
|
deviceToken: string;
|
|
235
|
+
updatedAt?: string | null | undefined;
|
|
235
236
|
appId?: string | undefined;
|
|
236
237
|
discardedAt?: string | null | undefined;
|
|
237
238
|
installationId?: string | undefined;
|
|
238
|
-
updatedAt?: string | null | undefined;
|
|
239
239
|
}>, {
|
|
240
240
|
app_id: string | undefined;
|
|
241
241
|
created_at: string;
|
|
@@ -248,10 +248,10 @@ export declare const apnsTokenCollectionRequest: z.ZodLazy<z.ZodEffects<z.ZodObj
|
|
|
248
248
|
createdAt: string;
|
|
249
249
|
id: string;
|
|
250
250
|
deviceToken: string;
|
|
251
|
+
updatedAt?: string | null | undefined;
|
|
251
252
|
appId?: string | undefined;
|
|
252
253
|
discardedAt?: string | null | undefined;
|
|
253
254
|
installationId?: string | undefined;
|
|
254
|
-
updatedAt?: string | null | undefined;
|
|
255
255
|
}>>, "many">>;
|
|
256
256
|
links: z.ZodOptional<z.ZodLazy<z.ZodEffects<z.ZodObject<{
|
|
257
257
|
first: z.ZodOptional<z.ZodString>;
|
|
@@ -294,10 +294,10 @@ export declare const apnsTokenCollectionRequest: z.ZodLazy<z.ZodEffects<z.ZodObj
|
|
|
294
294
|
createdAt: string;
|
|
295
295
|
id: string;
|
|
296
296
|
deviceToken: string;
|
|
297
|
+
updatedAt?: string | null | undefined;
|
|
297
298
|
appId?: string | undefined;
|
|
298
299
|
discardedAt?: string | null | undefined;
|
|
299
300
|
installationId?: string | undefined;
|
|
300
|
-
updatedAt?: string | null | undefined;
|
|
301
301
|
}[] | undefined;
|
|
302
302
|
links?: {
|
|
303
303
|
first?: string | undefined;
|
|
@@ -324,10 +324,10 @@ export declare const apnsTokenCollectionRequest: z.ZodLazy<z.ZodEffects<z.ZodObj
|
|
|
324
324
|
createdAt: string;
|
|
325
325
|
id: string;
|
|
326
326
|
deviceToken: string;
|
|
327
|
+
updatedAt?: string | null | undefined;
|
|
327
328
|
appId?: string | undefined;
|
|
328
329
|
discardedAt?: string | null | undefined;
|
|
329
330
|
installationId?: string | undefined;
|
|
330
|
-
updatedAt?: string | null | undefined;
|
|
331
331
|
}[] | undefined;
|
|
332
332
|
links?: {
|
|
333
333
|
first?: string | undefined;
|