@teardown/schemas 0.1.1 → 0.1.5
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.
|
@@ -63,7 +63,7 @@ export declare const DeviceUpdateInfoSchema: import("@sinclair/typebox").TObject
|
|
|
63
63
|
created_at: import("@sinclair/typebox").TString;
|
|
64
64
|
}>;
|
|
65
65
|
export type DeviceUpdateInfo = Static<typeof DeviceUpdateInfoSchema>;
|
|
66
|
-
export declare enum
|
|
66
|
+
export declare enum NotificationPlatformEnum {
|
|
67
67
|
APNS = "APNS",// Apple Push Notification Service
|
|
68
68
|
FCM = "FCM",// Firebase Cloud Messaging
|
|
69
69
|
EXPO = "EXPO"
|
|
@@ -75,7 +75,7 @@ export declare const PushNotificationInfoSchema: import("@sinclair/typebox").TOb
|
|
|
75
75
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
76
76
|
granted: import("@sinclair/typebox").TBoolean;
|
|
77
77
|
token: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
78
|
-
platform: import("@sinclair/typebox").TEnum<typeof
|
|
78
|
+
platform: import("@sinclair/typebox").TEnum<typeof NotificationPlatformEnum>;
|
|
79
79
|
}>;
|
|
80
80
|
export type PushNotificationInfo = Static<typeof PushNotificationInfoSchema>;
|
|
81
81
|
export declare const NotificationsInfoSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -83,7 +83,7 @@ export declare const NotificationsInfoSchema: import("@sinclair/typebox").TObjec
|
|
|
83
83
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
84
84
|
granted: import("@sinclair/typebox").TBoolean;
|
|
85
85
|
token: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
86
|
-
platform: import("@sinclair/typebox").TEnum<typeof
|
|
86
|
+
platform: import("@sinclair/typebox").TEnum<typeof NotificationPlatformEnum>;
|
|
87
87
|
}>;
|
|
88
88
|
}>;
|
|
89
89
|
export type NotificationsInfo = Static<typeof NotificationsInfoSchema>;
|
|
@@ -153,7 +153,7 @@ export declare const DeviceInfoSchema: import("@sinclair/typebox").TObject<{
|
|
|
153
153
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
154
154
|
granted: import("@sinclair/typebox").TBoolean;
|
|
155
155
|
token: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
156
|
-
platform: import("@sinclair/typebox").TEnum<typeof
|
|
156
|
+
platform: import("@sinclair/typebox").TEnum<typeof NotificationPlatformEnum>;
|
|
157
157
|
}>;
|
|
158
158
|
}>;
|
|
159
159
|
}>;
|
|
@@ -236,7 +236,7 @@ export declare const IdentifyRequestSchema: import("@sinclair/typebox").TObject<
|
|
|
236
236
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
237
237
|
granted: import("@sinclair/typebox").TBoolean;
|
|
238
238
|
token: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
239
|
-
platform: import("@sinclair/typebox").TEnum<typeof
|
|
239
|
+
platform: import("@sinclair/typebox").TEnum<typeof NotificationPlatformEnum>;
|
|
240
240
|
}>;
|
|
241
241
|
}>;
|
|
242
242
|
}>;
|
|
@@ -56,12 +56,12 @@ export const DeviceUpdateInfoSchema = Type.Object({
|
|
|
56
56
|
is_embedded_launch: Type.Boolean({ error: "is_embedded_launch is required" }),
|
|
57
57
|
created_at: Type.String(),
|
|
58
58
|
});
|
|
59
|
-
export var
|
|
60
|
-
(function (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
})(
|
|
59
|
+
export var NotificationPlatformEnum;
|
|
60
|
+
(function (NotificationPlatformEnum) {
|
|
61
|
+
NotificationPlatformEnum["APNS"] = "APNS";
|
|
62
|
+
NotificationPlatformEnum["FCM"] = "FCM";
|
|
63
|
+
NotificationPlatformEnum["EXPO"] = "EXPO";
|
|
64
|
+
})(NotificationPlatformEnum || (NotificationPlatformEnum = {}));
|
|
65
65
|
/**
|
|
66
66
|
* Push notification info schema
|
|
67
67
|
*/
|
|
@@ -69,7 +69,7 @@ export const PushNotificationInfoSchema = Type.Object({
|
|
|
69
69
|
enabled: Type.Boolean({ error: "enabled is required" }),
|
|
70
70
|
granted: Type.Boolean({ error: "granted is required" }),
|
|
71
71
|
token: Type.Union([Type.String({ error: "token is required" }), Type.Null()]),
|
|
72
|
-
platform: Type.Enum(
|
|
72
|
+
platform: Type.Enum(NotificationPlatformEnum, { error: "platform is required" }),
|
|
73
73
|
});
|
|
74
74
|
export const NotificationsInfoSchema = Type.Object({
|
|
75
75
|
push: PushNotificationInfoSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teardown/schemas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"prepublishOnly": "bun x turbo run build"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@sinclair/typebox": "^0.34.
|
|
98
|
-
"@teardown/types": "0.0.
|
|
97
|
+
"@sinclair/typebox": "^0.34.41",
|
|
98
|
+
"@teardown/types": "0.0.3"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@biomejs/biome": "2.3.7",
|
|
@@ -105,4 +105,4 @@
|
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"typescript": "^5.9.3"
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|