@teardown/ingest-api 0.0.20 → 0.0.21-alpha.11

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.
@@ -0,0 +1,260 @@
1
+ import { DevicePlatformEnum } from "../types/generated-consts";
2
+ import { ValidationError } from "elysia";
3
+ import { z } from "zod";
4
+ export { DevicePlatformEnum };
5
+ /**
6
+ * Application info schema
7
+ */
8
+ export const ApplicationInfoSchema = z.object({
9
+ version: z.string("version is required"),
10
+ build_number: z.string("build_number is required"),
11
+ }, {
12
+ error: "Application info is required",
13
+ });
14
+ /**
15
+ * OS info schema
16
+ */
17
+ export const OSInfoSchema = z.object({
18
+ /**
19
+ * Device platform
20
+ */
21
+ platform: z.enum(DevicePlatformEnum, "platform is required"),
22
+ /**
23
+ * OS name
24
+ */
25
+ name: z.string("name is required"),
26
+ /**
27
+ * OS version
28
+ */
29
+ version: z.string("version is required"),
30
+ }, {
31
+ error: "OS info is required",
32
+ });
33
+ /**
34
+ * Hardware info schema
35
+ */
36
+ export const HardwareInfoSchema = z.object({
37
+ device_name: z.string("device_name is required"),
38
+ device_type: z.string("device_type is required"),
39
+ device_brand: z.string("device_brand is required"),
40
+ }, {
41
+ error: "Hardware info is required",
42
+ });
43
+ export const EmergencyLaunchSchema = z.union([
44
+ z.object({
45
+ is_emergency_launch: z.literal(true),
46
+ reason: z.string("reason is required when is_emergency_launch is true"),
47
+ }),
48
+ z.object({
49
+ is_emergency_launch: z.literal(false),
50
+ reason: z.never().optional(),
51
+ }),
52
+ ], {
53
+ error: "Emergency launch is required",
54
+ });
55
+ /**
56
+ * Update info schema
57
+ */
58
+ export const DeviceUpdateInfoSchema = z.object({
59
+ is_enabled: z.boolean(),
60
+ update_id: z.string("update_id is required"),
61
+ update_channel: z.string("update_channel is required"),
62
+ runtime_version: z.string("runtime_version is required"),
63
+ emergency_launch: EmergencyLaunchSchema,
64
+ is_embedded_launch: z.boolean("is_embedded_launch is required"),
65
+ created_at: z.coerce.date(),
66
+ }, {
67
+ error: "Update info is required",
68
+ });
69
+ export var NotificationPlatform;
70
+ (function (NotificationPlatform) {
71
+ NotificationPlatform["APNS"] = "APNS";
72
+ NotificationPlatform["FCM"] = "FCM";
73
+ NotificationPlatform["EXPO"] = "EXPO";
74
+ })(NotificationPlatform || (NotificationPlatform = {}));
75
+ /**
76
+ * Push notification info schema
77
+ */
78
+ export const PushNotificationInfoSchema = z.object({
79
+ enabled: z.boolean("enabled is required"),
80
+ granted: z.boolean("granted is required"),
81
+ token: z.string("token is required").nullable(),
82
+ platform: z.enum(NotificationPlatform, "platform is required"),
83
+ }, {
84
+ error: "Push notification info is required",
85
+ });
86
+ export const NotificationsInfoSchema = z.object({
87
+ push: PushNotificationInfoSchema,
88
+ }, {
89
+ error: "Notifications info is required",
90
+ });
91
+ /**
92
+ * Device info schema
93
+ */
94
+ export const DeviceInfoSchema = z.object({
95
+ /**
96
+ * Timestamp of collection on device (optional, generated server-side if not provided)
97
+ */
98
+ timestamp: z.coerce.date("timestamp is required").optional(),
99
+ /**
100
+ * Application info, required
101
+ */
102
+ application: ApplicationInfoSchema,
103
+ /**
104
+ * Update info (optional) - not all builds will have an update
105
+ */
106
+ update: DeviceUpdateInfoSchema.nullable(),
107
+ /**
108
+ * Hardware info, required
109
+ */
110
+ hardware: HardwareInfoSchema,
111
+ /**
112
+ * OS info, required
113
+ */
114
+ os: OSInfoSchema,
115
+ /**
116
+ * Notifications info, required
117
+ */
118
+ notifications: NotificationsInfoSchema,
119
+ }, {
120
+ error: "Device info is required",
121
+ });
122
+ /**
123
+ * Persona info schema (optional fields)
124
+ * Matches personas table structure
125
+ */
126
+ export const PersonaInfoSchema = z.object({
127
+ user_id: z.string("user_id is required").optional(),
128
+ email: z
129
+ .string("email is required")
130
+ .refine((val) => !val || /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val), {
131
+ message: "Invalid email format",
132
+ })
133
+ .optional(),
134
+ name: z.string("name is required").optional(),
135
+ }, {
136
+ error: "Persona info is required",
137
+ });
138
+ /**
139
+ * Identify request schema
140
+ * Ties a device to a persona with optional persona data
141
+ */
142
+ export const IdentifyRequestSchema = z.object({
143
+ device: DeviceInfoSchema,
144
+ persona: PersonaInfoSchema.optional(),
145
+ }, {
146
+ error: "Identify request is required",
147
+ });
148
+ export var IdentifyVersionStatusEnum;
149
+ (function (IdentifyVersionStatusEnum) {
150
+ /**
151
+ * A new version is available
152
+ */
153
+ IdentifyVersionStatusEnum["UPDATE_AVAILABLE"] = "UPDATE_AVAILABLE";
154
+ /**
155
+ * An update is required
156
+ */
157
+ IdentifyVersionStatusEnum["UPDATE_REQUIRED"] = "UPDATE_REQUIRED";
158
+ /**
159
+ * The current version is valid & up to date
160
+ */
161
+ IdentifyVersionStatusEnum["UP_TO_DATE"] = "UP_TO_DATE";
162
+ })(IdentifyVersionStatusEnum || (IdentifyVersionStatusEnum = {}));
163
+ export const UpdateInfoSchema = z.object({
164
+ version: z.string("version is required"),
165
+ build: z.string("build is required"),
166
+ update_id: z.string("update_id is required"),
167
+ effective_date: z.coerce.date("effective_date is required"),
168
+ }, {
169
+ error: "Update available info is required",
170
+ });
171
+ export const UpToDateInfoSchema = z.object({
172
+ status: z.literal(IdentifyVersionStatusEnum.UP_TO_DATE),
173
+ update: z.null(),
174
+ }, {
175
+ error: "Up to date info is required",
176
+ });
177
+ export const UpdateRequiredInfoSchema = z.object({
178
+ status: z.literal(IdentifyVersionStatusEnum.UPDATE_REQUIRED),
179
+ update: UpdateInfoSchema,
180
+ }, {
181
+ error: "Update required info is required",
182
+ });
183
+ export const UpdateAvailableInfoSchema = z.object({
184
+ status: z.literal(IdentifyVersionStatusEnum.UPDATE_AVAILABLE),
185
+ update: UpdateInfoSchema,
186
+ }, {
187
+ error: "Update available info is required",
188
+ });
189
+ export const VersionInfoSchema = z.object({
190
+ /**
191
+ * The status of the version
192
+ */
193
+ status: z.enum(IdentifyVersionStatusEnum, "status is required"),
194
+ update: UpdateAvailableInfoSchema.nullish(),
195
+ }, {
196
+ error: "Version info is required",
197
+ });
198
+ /**
199
+ * Identify response schema
200
+ */
201
+ export const IdentifyResponseSchema = z.object({
202
+ success: z.literal(true),
203
+ data: z.object({
204
+ session_id: z.string("session_id is required"),
205
+ device_id: z.string("device_id is required"),
206
+ persona_id: z.string("persona_id is required"),
207
+ token: z.string("token is required"), // JWT token for session authentication
208
+ version_info: VersionInfoSchema,
209
+ }),
210
+ }, {
211
+ error: "Identify response is required",
212
+ });
213
+ export const IdentifyErrorResponseSchema = z.object({
214
+ success: z.literal(false),
215
+ error: z.discriminatedUnion("code", [
216
+ z.object({
217
+ code: z.literal("MISSING_ORG_ID"),
218
+ message: z.string(),
219
+ }),
220
+ z.object({
221
+ code: z.literal("MISSING_PROJECT_ID"),
222
+ message: z.string(),
223
+ }),
224
+ z.object({
225
+ code: z.literal("MISSING_ENVIRONMENT_SLUG"),
226
+ message: z.string(),
227
+ }),
228
+ z.object({
229
+ code: z.literal("MISSING_DEVICE_ID"),
230
+ message: z.string(),
231
+ }),
232
+ z.object({
233
+ code: z.literal("IDENTIFY_FAILED"),
234
+ message: z.string(),
235
+ }),
236
+ z.object({
237
+ code: z.literal("NO_SESSION_ID_GENERATED"),
238
+ message: z.string(),
239
+ }),
240
+ z.object({
241
+ code: z.literal("NO_DEVICE_ID_GENERATED"),
242
+ message: z.string(),
243
+ }),
244
+ z.object({
245
+ code: z.literal("NO_PERSONA_ID_GENERATED"),
246
+ message: z.string(),
247
+ }),
248
+ ]),
249
+ }, {
250
+ error: "Identify error response is required",
251
+ });
252
+ export const ValidationErrorSchema = z.object({
253
+ success: z.literal(false),
254
+ error: z.literal("VALIDATION"),
255
+ message: z.string(),
256
+ }, {
257
+ error: "Validation error is required",
258
+ });
259
+ // export type ValidationError = z.infer<typeof ValidationErrorSchema>;
260
+ ValidationError;
@@ -0,0 +1,47 @@
1
+ export declare enum DevicePlatformEnum {
2
+ IOS = "IOS",
3
+ ANDROID = "ANDROID",
4
+ WEB = "WEB",
5
+ WINDOWS = "WINDOWS",
6
+ MACOS = "MACOS",
7
+ LINUX = "LINUX",
8
+ PHONE = "PHONE",
9
+ TABLET = "TABLET",
10
+ DESKTOP = "DESKTOP",
11
+ CONSOLE = "CONSOLE",
12
+ TV = "TV",
13
+ WEARABLE = "WEARABLE",
14
+ GAME_CONSOLE = "GAME_CONSOLE",
15
+ VR = "VR",
16
+ UNKNOWN = "UNKNOWN",
17
+ OTHER = "OTHER"
18
+ }
19
+ export declare enum EnvironmentTypeEnum {
20
+ DEVELOPMENT = "DEVELOPMENT",
21
+ STAGING = "STAGING",
22
+ PRODUCTION = "PRODUCTION"
23
+ }
24
+ export declare enum OrgRoleTypeEnum {
25
+ OWNER = "OWNER",
26
+ ADMIN = "ADMIN",
27
+ ENGINEER = "ENGINEER"
28
+ }
29
+ export declare enum OrgTypeEnum {
30
+ PERSONAL = "PERSONAL",
31
+ START_UP = "START_UP",
32
+ SCALE_UP = "SCALE_UP",
33
+ AGENCY = "AGENCY",
34
+ ENTERPRISE = "ENTERPRISE"
35
+ }
36
+ export declare enum ProjectApiKeyKindEnum {
37
+ publishable = "publishable",
38
+ secret = "secret"
39
+ }
40
+ export declare enum ProjectTypeEnum {
41
+ REACT_NATIVE = "REACT_NATIVE",
42
+ EXPO = "EXPO"
43
+ }
44
+ export declare enum VersionStatusEnum {
45
+ LIVE = "LIVE",
46
+ DISABLED = "DISABLED"
47
+ }
@@ -0,0 +1,54 @@
1
+ export var DevicePlatformEnum;
2
+ (function (DevicePlatformEnum) {
3
+ DevicePlatformEnum["IOS"] = "IOS";
4
+ DevicePlatformEnum["ANDROID"] = "ANDROID";
5
+ DevicePlatformEnum["WEB"] = "WEB";
6
+ DevicePlatformEnum["WINDOWS"] = "WINDOWS";
7
+ DevicePlatformEnum["MACOS"] = "MACOS";
8
+ DevicePlatformEnum["LINUX"] = "LINUX";
9
+ DevicePlatformEnum["PHONE"] = "PHONE";
10
+ DevicePlatformEnum["TABLET"] = "TABLET";
11
+ DevicePlatformEnum["DESKTOP"] = "DESKTOP";
12
+ DevicePlatformEnum["CONSOLE"] = "CONSOLE";
13
+ DevicePlatformEnum["TV"] = "TV";
14
+ DevicePlatformEnum["WEARABLE"] = "WEARABLE";
15
+ DevicePlatformEnum["GAME_CONSOLE"] = "GAME_CONSOLE";
16
+ DevicePlatformEnum["VR"] = "VR";
17
+ DevicePlatformEnum["UNKNOWN"] = "UNKNOWN";
18
+ DevicePlatformEnum["OTHER"] = "OTHER";
19
+ })(DevicePlatformEnum || (DevicePlatformEnum = {}));
20
+ export var EnvironmentTypeEnum;
21
+ (function (EnvironmentTypeEnum) {
22
+ EnvironmentTypeEnum["DEVELOPMENT"] = "DEVELOPMENT";
23
+ EnvironmentTypeEnum["STAGING"] = "STAGING";
24
+ EnvironmentTypeEnum["PRODUCTION"] = "PRODUCTION";
25
+ })(EnvironmentTypeEnum || (EnvironmentTypeEnum = {}));
26
+ export var OrgRoleTypeEnum;
27
+ (function (OrgRoleTypeEnum) {
28
+ OrgRoleTypeEnum["OWNER"] = "OWNER";
29
+ OrgRoleTypeEnum["ADMIN"] = "ADMIN";
30
+ OrgRoleTypeEnum["ENGINEER"] = "ENGINEER";
31
+ })(OrgRoleTypeEnum || (OrgRoleTypeEnum = {}));
32
+ export var OrgTypeEnum;
33
+ (function (OrgTypeEnum) {
34
+ OrgTypeEnum["PERSONAL"] = "PERSONAL";
35
+ OrgTypeEnum["START_UP"] = "START_UP";
36
+ OrgTypeEnum["SCALE_UP"] = "SCALE_UP";
37
+ OrgTypeEnum["AGENCY"] = "AGENCY";
38
+ OrgTypeEnum["ENTERPRISE"] = "ENTERPRISE";
39
+ })(OrgTypeEnum || (OrgTypeEnum = {}));
40
+ export var ProjectApiKeyKindEnum;
41
+ (function (ProjectApiKeyKindEnum) {
42
+ ProjectApiKeyKindEnum["publishable"] = "publishable";
43
+ ProjectApiKeyKindEnum["secret"] = "secret";
44
+ })(ProjectApiKeyKindEnum || (ProjectApiKeyKindEnum = {}));
45
+ export var ProjectTypeEnum;
46
+ (function (ProjectTypeEnum) {
47
+ ProjectTypeEnum["REACT_NATIVE"] = "REACT_NATIVE";
48
+ ProjectTypeEnum["EXPO"] = "EXPO";
49
+ })(ProjectTypeEnum || (ProjectTypeEnum = {}));
50
+ export var VersionStatusEnum;
51
+ (function (VersionStatusEnum) {
52
+ VersionStatusEnum["LIVE"] = "LIVE";
53
+ VersionStatusEnum["DISABLED"] = "DISABLED";
54
+ })(VersionStatusEnum || (VersionStatusEnum = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teardown/ingest-api",
3
- "version": "0.0.20",
3
+ "version": "0.0.21-alpha.11",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,29 +24,33 @@
24
24
  },
25
25
  "./types": {
26
26
  "types": "./dist/types/index.d.ts"
27
+ },
28
+ "./vendored/consts": {
29
+ "types": "./dist/vendored/types/generated-consts.d.ts",
30
+ "import": "./dist/vendored/types/generated-consts.js",
31
+ "default": "./dist/vendored/types/generated-consts.js"
27
32
  }
28
33
  },
29
34
  "scripts": {
30
- "sync:schemas": "bun run scripts/sync-schemas.ts",
31
- "postinstall": "bun run sync:schemas",
32
- "build": "tsc --project ./tsconfig.lib.json",
33
- "predev": "bun run sync:schemas",
34
- "dev": "rm -rf dist; bun x tsc --watch --project ./tsconfig.lib.json",
35
- "check:types": "tsc --noEmit --project ./tsconfig.lib.json",
36
- "prepublishOnly": "bun run sync:schemas && bun run build"
35
+ "copy:schemas": "bun run scripts/copy-schemas.ts",
36
+ "prebuild": "bun run copy:schemas",
37
+ "build": "bun x tsc --project ./tsconfig.lib.json",
38
+ "dev": "bun x tsc --watch --project ./tsconfig.lib.json",
39
+ "check:types": "bun x tsc --noEmit --project ./tsconfig.lib.json",
40
+ "prepublishOnly": "bun x turbo run build"
37
41
  },
38
42
  "dependencies": {
39
- "@elysiajs/eden": "^1.4.4",
40
- "elysia": "^1.4.13"
43
+ "@elysiajs/eden": "1.4.5"
41
44
  },
42
45
  "peerDependencies": {
43
- "typescript": "^5",
44
- "zod": "^4"
46
+ "typescript": "^5.9.3",
47
+ "zod": "^4",
48
+ "elysia": ">= 1.4.0"
45
49
  },
46
50
  "devDependencies": {
47
- "@types/bun": "latest",
51
+ "@types/bun": "1.3.3",
48
52
  "@teardown/ingest": "0.0.1",
49
53
  "@teardown/tsconfig": "1.0.0",
50
- "@teardown/types": "0.0.1"
54
+ "elysia": "1.4.16"
51
55
  }
52
- }
56
+ }
@@ -1,203 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * OS types
4
- */
5
- export declare enum OSType {
6
- IOS = "IOS",
7
- ANDROID = "ANDROID",
8
- WEB = "WEB",
9
- WINDOWS = "WINDOWS",
10
- MACOS = "MACOS",
11
- LINUX = "LINUX"
12
- }
13
- /**
14
- * Device types
15
- */
16
- export type DeviceType = "UNKNOWN" | "PHONE" | "TABLET" | "DESKTOP" | "CONSOLE" | "TV" | "WEARABLE" | "GAME_CONSOLE" | "VR" | "OTHER";
17
- /**
18
- * Application info schema
19
- */
20
- export declare const ApplicationInfoSchema: z.ZodObject<{
21
- version: z.ZodString;
22
- build_number: z.ZodString;
23
- }, z.core.$strip>;
24
- export type ApplicationInfo = z.infer<typeof ApplicationInfoSchema>;
25
- /**
26
- * OS info schema
27
- */
28
- export declare const OSInfoSchema: z.ZodObject<{
29
- type: z.ZodEnum<typeof OSType>;
30
- name: z.ZodString;
31
- version: z.ZodString;
32
- }, z.core.$strip>;
33
- export type OSInfo = z.infer<typeof OSInfoSchema>;
34
- /**
35
- * Hardware info schema
36
- */
37
- export declare const HardwareInfoSchema: z.ZodObject<{
38
- device_name: z.ZodString;
39
- device_type: z.ZodString;
40
- device_brand: z.ZodString;
41
- }, z.core.$strip>;
42
- export type HardwareInfo = z.infer<typeof HardwareInfoSchema>;
43
- export declare const EmergencyLaunchSchema: z.ZodUnion<readonly [z.ZodObject<{
44
- is_emergency_launch: z.ZodLiteral<true>;
45
- reason: z.ZodString;
46
- }, z.core.$strip>, z.ZodObject<{
47
- is_emergency_launch: z.ZodLiteral<false>;
48
- reason: z.ZodOptional<z.ZodNever>;
49
- }, z.core.$strip>]>;
50
- export type EmergencyLaunch = z.infer<typeof EmergencyLaunchSchema>;
51
- /**
52
- * Update info schema
53
- */
54
- export declare const UpdateInfoSchema: z.ZodObject<{
55
- is_enabled: z.ZodBoolean;
56
- update_id: z.ZodString;
57
- update_channel: z.ZodString;
58
- runtime_version: z.ZodString;
59
- emergency_launch: z.ZodUnion<readonly [z.ZodObject<{
60
- is_emergency_launch: z.ZodLiteral<true>;
61
- reason: z.ZodString;
62
- }, z.core.$strip>, z.ZodObject<{
63
- is_emergency_launch: z.ZodLiteral<false>;
64
- reason: z.ZodOptional<z.ZodNever>;
65
- }, z.core.$strip>]>;
66
- is_embedded_launch: z.ZodBoolean;
67
- created_at: z.ZodCoercedDate<unknown>;
68
- }, z.core.$strip>;
69
- export type UpdateInfo = z.infer<typeof UpdateInfoSchema>;
70
- /**
71
- * Push notification info schema
72
- */
73
- export declare const PushNotificationInfoSchema: z.ZodObject<{
74
- token: z.ZodString;
75
- platform: z.ZodEnum<{
76
- APNS: "APNS";
77
- FCM: "FCM";
78
- EXPO: "EXPO";
79
- }>;
80
- }, z.core.$strip>;
81
- export type PushNotificationInfo = z.infer<typeof PushNotificationInfoSchema>;
82
- /**
83
- * Device info schema
84
- */
85
- export declare const DeviceInfoSchema: z.ZodObject<{
86
- application: z.ZodObject<{
87
- version: z.ZodString;
88
- build_number: z.ZodString;
89
- }, z.core.$strip>;
90
- update: z.ZodNullable<z.ZodObject<{
91
- is_enabled: z.ZodBoolean;
92
- update_id: z.ZodString;
93
- update_channel: z.ZodString;
94
- runtime_version: z.ZodString;
95
- emergency_launch: z.ZodUnion<readonly [z.ZodObject<{
96
- is_emergency_launch: z.ZodLiteral<true>;
97
- reason: z.ZodString;
98
- }, z.core.$strip>, z.ZodObject<{
99
- is_emergency_launch: z.ZodLiteral<false>;
100
- reason: z.ZodOptional<z.ZodNever>;
101
- }, z.core.$strip>]>;
102
- is_embedded_launch: z.ZodBoolean;
103
- created_at: z.ZodCoercedDate<unknown>;
104
- }, z.core.$strip>>;
105
- hardware: z.ZodObject<{
106
- device_name: z.ZodString;
107
- device_type: z.ZodString;
108
- device_brand: z.ZodString;
109
- }, z.core.$strip>;
110
- os: z.ZodObject<{
111
- type: z.ZodEnum<typeof OSType>;
112
- name: z.ZodString;
113
- version: z.ZodString;
114
- }, z.core.$strip>;
115
- push_notification: z.ZodOptional<z.ZodObject<{
116
- token: z.ZodString;
117
- platform: z.ZodEnum<{
118
- APNS: "APNS";
119
- FCM: "FCM";
120
- EXPO: "EXPO";
121
- }>;
122
- }, z.core.$strip>>;
123
- }, z.core.$strip>;
124
- export type DeviceInfo = z.infer<typeof DeviceInfoSchema>;
125
- /**
126
- * Persona info schema (optional fields)
127
- * Matches personas table structure
128
- */
129
- export declare const PersonaInfoSchema: z.ZodObject<{
130
- user_id: z.ZodOptional<z.ZodString>;
131
- email: z.ZodOptional<z.ZodString>;
132
- name: z.ZodOptional<z.ZodString>;
133
- }, z.core.$strip>;
134
- export type PersonaInfo = z.infer<typeof PersonaInfoSchema>;
135
- /**
136
- * Identify request schema
137
- * Ties a device to a persona with optional persona data
138
- */
139
- export declare const IdentifyRequestSchema: z.ZodObject<{
140
- device: z.ZodObject<{
141
- application: z.ZodObject<{
142
- version: z.ZodString;
143
- build_number: z.ZodString;
144
- }, z.core.$strip>;
145
- update: z.ZodNullable<z.ZodObject<{
146
- is_enabled: z.ZodBoolean;
147
- update_id: z.ZodString;
148
- update_channel: z.ZodString;
149
- runtime_version: z.ZodString;
150
- emergency_launch: z.ZodUnion<readonly [z.ZodObject<{
151
- is_emergency_launch: z.ZodLiteral<true>;
152
- reason: z.ZodString;
153
- }, z.core.$strip>, z.ZodObject<{
154
- is_emergency_launch: z.ZodLiteral<false>;
155
- reason: z.ZodOptional<z.ZodNever>;
156
- }, z.core.$strip>]>;
157
- is_embedded_launch: z.ZodBoolean;
158
- created_at: z.ZodCoercedDate<unknown>;
159
- }, z.core.$strip>>;
160
- hardware: z.ZodObject<{
161
- device_name: z.ZodString;
162
- device_type: z.ZodString;
163
- device_brand: z.ZodString;
164
- }, z.core.$strip>;
165
- os: z.ZodObject<{
166
- type: z.ZodEnum<typeof OSType>;
167
- name: z.ZodString;
168
- version: z.ZodString;
169
- }, z.core.$strip>;
170
- push_notification: z.ZodOptional<z.ZodObject<{
171
- token: z.ZodString;
172
- platform: z.ZodEnum<{
173
- APNS: "APNS";
174
- FCM: "FCM";
175
- EXPO: "EXPO";
176
- }>;
177
- }, z.core.$strip>>;
178
- }, z.core.$strip>;
179
- persona: z.ZodOptional<z.ZodObject<{
180
- user_id: z.ZodOptional<z.ZodString>;
181
- email: z.ZodOptional<z.ZodString>;
182
- name: z.ZodOptional<z.ZodString>;
183
- }, z.core.$strip>>;
184
- }, z.core.$strip>;
185
- export type IdentifyRequest = z.infer<typeof IdentifyRequestSchema>;
186
- /**
187
- * Identify response schema
188
- */
189
- export declare const IdentifyResponseSchema: z.ZodObject<{
190
- success: z.ZodLiteral<true>;
191
- session_id: z.ZodString;
192
- device_id: z.ZodString;
193
- persona_id: z.ZodString;
194
- }, z.core.$strip>;
195
- export type IdentifyResponse = z.infer<typeof IdentifyResponseSchema>;
196
- export declare const IdentifyErrorResponseSchema: z.ZodObject<{
197
- success: z.ZodLiteral<false>;
198
- error: z.ZodObject<{
199
- code: z.ZodString;
200
- message: z.ZodString;
201
- }, z.core.$strip>;
202
- }, z.core.$strip>;
203
- export type IdentifyErrorResponse = z.infer<typeof IdentifyErrorResponseSchema>;