shred-api-client 2.0.8 → 2.0.10-rc.0
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/dist/index.d.mts +2596 -0
- package/dist/index.d.ts +2596 -15
- package/dist/index.js +1773 -40
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1732 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +9 -6
- package/dist/api/AppConfig.api.d.ts +0 -9
- package/dist/api/AppConfig.api.js +0 -42
- package/dist/api/Email.api.d.ts +0 -10
- package/dist/api/Email.api.js +0 -42
- package/dist/api/Goal.api.d.ts +0 -10
- package/dist/api/Goal.api.js +0 -42
- package/dist/api/Note.api.d.ts +0 -13
- package/dist/api/Note.api.js +0 -60
- package/dist/api/Notification.api.d.ts +0 -18
- package/dist/api/Notification.api.js +0 -80
- package/dist/api/Project.api.d.ts +0 -26
- package/dist/api/Project.api.js +0 -122
- package/dist/api/Prompt.api.d.ts +0 -14
- package/dist/api/Prompt.api.js +0 -41
- package/dist/api/Subscription.api.d.ts +0 -18
- package/dist/api/Subscription.api.js +0 -69
- package/dist/api/Tenant.api.d.ts +0 -14
- package/dist/api/Tenant.api.js +0 -47
- package/dist/api/Track.api.d.ts +0 -9
- package/dist/api/Track.api.js +0 -19
- package/dist/api/User.api.d.ts +0 -25
- package/dist/api/User.api.js +0 -98
- package/dist/model/Api.d.ts +0 -26
- package/dist/model/Api.js +0 -33
- package/dist/model/Context.d.ts +0 -5
- package/dist/model/Context.js +0 -2
- package/dist/model/Env.d.ts +0 -2
- package/dist/model/Env.js +0 -2
- package/dist/model/app-config/AppConfig.api.d.ts +0 -9
- package/dist/model/app-config/AppConfig.api.js +0 -9
- package/dist/model/app-config/index.d.ts +0 -1
- package/dist/model/app-config/index.js +0 -17
- package/dist/model/asset/Asset.schema.d.ts +0 -43
- package/dist/model/asset/Asset.schema.js +0 -19
- package/dist/model/asset/index.d.ts +0 -2
- package/dist/model/asset/index.js +0 -5
- package/dist/model/core/APIResponse.d.ts +0 -6
- package/dist/model/core/APIResponse.js +0 -2
- package/dist/model/core/Query.d.ts +0 -15
- package/dist/model/core/Query.js +0 -2
- package/dist/model/core/index.d.ts +0 -2
- package/dist/model/core/index.js +0 -18
- package/dist/model/email/Email.api.d.ts +0 -11
- package/dist/model/email/Email.api.js +0 -9
- package/dist/model/email/Email.schema.d.ts +0 -15
- package/dist/model/email/Email.schema.js +0 -9
- package/dist/model/email/index.d.ts +0 -3
- package/dist/model/email/index.js +0 -20
- package/dist/model/exceptions/ConflictException.d.ts +0 -4
- package/dist/model/exceptions/ConflictException.js +0 -13
- package/dist/model/exceptions/ForbiddenException.d.ts +0 -4
- package/dist/model/exceptions/ForbiddenException.js +0 -13
- package/dist/model/exceptions/InvalidArgumentException.d.ts +0 -4
- package/dist/model/exceptions/InvalidArgumentException.js +0 -13
- package/dist/model/exceptions/ResourceNotFoundException.d.ts +0 -4
- package/dist/model/exceptions/ResourceNotFoundException.js +0 -13
- package/dist/model/exceptions/ShredException.d.ts +0 -4
- package/dist/model/exceptions/ShredException.js +0 -10
- package/dist/model/exceptions/UnauthorizedException.d.ts +0 -4
- package/dist/model/exceptions/UnauthorizedException.js +0 -13
- package/dist/model/exceptions/index.d.ts +0 -16
- package/dist/model/exceptions/index.js +0 -20
- package/dist/model/goal/Goal.api.d.ts +0 -11
- package/dist/model/goal/Goal.api.js +0 -6
- package/dist/model/goal/Goal.schema.d.ts +0 -154
- package/dist/model/goal/Goal.schema.js +0 -26
- package/dist/model/goal/index.d.ts +0 -3
- package/dist/model/goal/index.js +0 -22
- package/dist/model/note/Note.api.d.ts +0 -26
- package/dist/model/note/Note.api.js +0 -21
- package/dist/model/note/Note.schema.d.ts +0 -141
- package/dist/model/note/Note.schema.js +0 -30
- package/dist/model/note/index.d.ts +0 -3
- package/dist/model/note/index.js +0 -21
- package/dist/model/notification/Notification.api.d.ts +0 -47
- package/dist/model/notification/Notification.api.js +0 -13
- package/dist/model/notification/Notification.schema.d.ts +0 -454
- package/dist/model/notification/Notification.schema.js +0 -111
- package/dist/model/notification/index.d.ts +0 -3
- package/dist/model/notification/index.js +0 -30
- package/dist/model/project/Project.api.d.ts +0 -83
- package/dist/model/project/Project.api.js +0 -26
- package/dist/model/project/Project.schema.d.ts +0 -209
- package/dist/model/project/Project.schema.js +0 -60
- package/dist/model/project/index.d.ts +0 -3
- package/dist/model/project/index.js +0 -24
- package/dist/model/prompt/Prompt.api.d.ts +0 -31
- package/dist/model/prompt/Prompt.api.js +0 -25
- package/dist/model/prompt/Prompt.schema.d.ts +0 -165
- package/dist/model/prompt/Prompt.schema.js +0 -24
- package/dist/model/prompt/index.d.ts +0 -3
- package/dist/model/prompt/index.js +0 -22
- package/dist/model/subscription/Subscription.api.d.ts +0 -59
- package/dist/model/subscription/Subscription.api.js +0 -49
- package/dist/model/subscription/Subscription.schema.d.ts +0 -314
- package/dist/model/subscription/Subscription.schema.js +0 -53
- package/dist/model/subscription/index.d.ts +0 -3
- package/dist/model/subscription/index.js +0 -25
- package/dist/model/tenant/Tenant.api.d.ts +0 -35
- package/dist/model/tenant/Tenant.api.js +0 -29
- package/dist/model/tenant/Tenant.schema.d.ts +0 -342
- package/dist/model/tenant/Tenant.schema.js +0 -29
- package/dist/model/tenant/index.d.ts +0 -3
- package/dist/model/tenant/index.js +0 -21
- package/dist/model/track/Track.api.d.ts +0 -10
- package/dist/model/track/Track.api.js +0 -9
- package/dist/model/track/Track.schema.d.ts +0 -44
- package/dist/model/track/Track.schema.js +0 -14
- package/dist/model/track/index.d.ts +0 -3
- package/dist/model/track/index.js +0 -21
- package/dist/model/user/User.api.d.ts +0 -86
- package/dist/model/user/User.api.js +0 -21
- package/dist/model/user/User.schema.d.ts +0 -117
- package/dist/model/user/User.schema.js +0 -42
- package/dist/model/user/index.d.ts +0 -3
- package/dist/model/user/index.js +0 -23
- package/dist/util/HTTPClient.d.ts +0 -5
- package/dist/util/HTTPClient.js +0 -51
- package/dist/util/parseQuery.d.ts +0 -2
- package/dist/util/parseQuery.js +0 -25
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,2596 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
type Environment = "prod" | "staging" | "local";
|
|
4
|
+
|
|
5
|
+
declare const ScriptSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
content: z.ZodString;
|
|
9
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
content: string;
|
|
15
|
+
userId?: string | undefined;
|
|
16
|
+
tags?: string[] | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
content: string;
|
|
21
|
+
userId?: string | undefined;
|
|
22
|
+
tags?: string[] | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
declare const CategorySchema: z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
title: z.ZodString;
|
|
27
|
+
pictureUrl: z.ZodString;
|
|
28
|
+
backgroundColor: z.ZodString;
|
|
29
|
+
active: z.ZodBoolean;
|
|
30
|
+
scripts: z.ZodArray<z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
title: z.ZodString;
|
|
33
|
+
content: z.ZodString;
|
|
34
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
35
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
id: string;
|
|
38
|
+
title: string;
|
|
39
|
+
content: string;
|
|
40
|
+
userId?: string | undefined;
|
|
41
|
+
tags?: string[] | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
id: string;
|
|
44
|
+
title: string;
|
|
45
|
+
content: string;
|
|
46
|
+
userId?: string | undefined;
|
|
47
|
+
tags?: string[] | undefined;
|
|
48
|
+
}>, "many">;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
active: boolean;
|
|
51
|
+
id: string;
|
|
52
|
+
title: string;
|
|
53
|
+
pictureUrl: string;
|
|
54
|
+
backgroundColor: string;
|
|
55
|
+
scripts: {
|
|
56
|
+
id: string;
|
|
57
|
+
title: string;
|
|
58
|
+
content: string;
|
|
59
|
+
userId?: string | undefined;
|
|
60
|
+
tags?: string[] | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
}, {
|
|
63
|
+
active: boolean;
|
|
64
|
+
id: string;
|
|
65
|
+
title: string;
|
|
66
|
+
pictureUrl: string;
|
|
67
|
+
backgroundColor: string;
|
|
68
|
+
scripts: {
|
|
69
|
+
id: string;
|
|
70
|
+
title: string;
|
|
71
|
+
content: string;
|
|
72
|
+
userId?: string | undefined;
|
|
73
|
+
tags?: string[] | undefined;
|
|
74
|
+
}[];
|
|
75
|
+
}>;
|
|
76
|
+
declare const PromptSchema: z.ZodObject<{
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
tenantId: z.ZodString;
|
|
79
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
title: z.ZodString;
|
|
82
|
+
pictureUrl: z.ZodString;
|
|
83
|
+
backgroundColor: z.ZodString;
|
|
84
|
+
active: z.ZodBoolean;
|
|
85
|
+
scripts: z.ZodArray<z.ZodObject<{
|
|
86
|
+
id: z.ZodString;
|
|
87
|
+
title: z.ZodString;
|
|
88
|
+
content: z.ZodString;
|
|
89
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
90
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
id: string;
|
|
93
|
+
title: string;
|
|
94
|
+
content: string;
|
|
95
|
+
userId?: string | undefined;
|
|
96
|
+
tags?: string[] | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
id: string;
|
|
99
|
+
title: string;
|
|
100
|
+
content: string;
|
|
101
|
+
userId?: string | undefined;
|
|
102
|
+
tags?: string[] | undefined;
|
|
103
|
+
}>, "many">;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
active: boolean;
|
|
106
|
+
id: string;
|
|
107
|
+
title: string;
|
|
108
|
+
pictureUrl: string;
|
|
109
|
+
backgroundColor: string;
|
|
110
|
+
scripts: {
|
|
111
|
+
id: string;
|
|
112
|
+
title: string;
|
|
113
|
+
content: string;
|
|
114
|
+
userId?: string | undefined;
|
|
115
|
+
tags?: string[] | undefined;
|
|
116
|
+
}[];
|
|
117
|
+
}, {
|
|
118
|
+
active: boolean;
|
|
119
|
+
id: string;
|
|
120
|
+
title: string;
|
|
121
|
+
pictureUrl: string;
|
|
122
|
+
backgroundColor: string;
|
|
123
|
+
scripts: {
|
|
124
|
+
id: string;
|
|
125
|
+
title: string;
|
|
126
|
+
content: string;
|
|
127
|
+
userId?: string | undefined;
|
|
128
|
+
tags?: string[] | undefined;
|
|
129
|
+
}[];
|
|
130
|
+
}>, "many">;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
id: string;
|
|
133
|
+
tenantId: string;
|
|
134
|
+
categories: {
|
|
135
|
+
active: boolean;
|
|
136
|
+
id: string;
|
|
137
|
+
title: string;
|
|
138
|
+
pictureUrl: string;
|
|
139
|
+
backgroundColor: string;
|
|
140
|
+
scripts: {
|
|
141
|
+
id: string;
|
|
142
|
+
title: string;
|
|
143
|
+
content: string;
|
|
144
|
+
userId?: string | undefined;
|
|
145
|
+
tags?: string[] | undefined;
|
|
146
|
+
}[];
|
|
147
|
+
}[];
|
|
148
|
+
}, {
|
|
149
|
+
id: string;
|
|
150
|
+
tenantId: string;
|
|
151
|
+
categories: {
|
|
152
|
+
active: boolean;
|
|
153
|
+
id: string;
|
|
154
|
+
title: string;
|
|
155
|
+
pictureUrl: string;
|
|
156
|
+
backgroundColor: string;
|
|
157
|
+
scripts: {
|
|
158
|
+
id: string;
|
|
159
|
+
title: string;
|
|
160
|
+
content: string;
|
|
161
|
+
userId?: string | undefined;
|
|
162
|
+
tags?: string[] | undefined;
|
|
163
|
+
}[];
|
|
164
|
+
}[];
|
|
165
|
+
}>;
|
|
166
|
+
type Script = z.infer<typeof ScriptSchema>;
|
|
167
|
+
type Category = z.infer<typeof CategorySchema>;
|
|
168
|
+
type Prompt = z.infer<typeof PromptSchema>;
|
|
169
|
+
|
|
170
|
+
type Context = {
|
|
171
|
+
token: string;
|
|
172
|
+
requestId?: string;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
interface IAPI$a {
|
|
176
|
+
getPrompt: (c: Context) => Promise<Prompt>;
|
|
177
|
+
addScript: (c: Context, script: Partial<Script>) => Promise<Script>;
|
|
178
|
+
deleteScript: (c: Context, id: string) => Promise<boolean>;
|
|
179
|
+
getScripts: (c: Context) => Promise<Script[]>;
|
|
180
|
+
updateScript: (c: Context, id: string, script: Partial<Script>) => Promise<boolean>;
|
|
181
|
+
}
|
|
182
|
+
declare const Endpoints$9: {
|
|
183
|
+
GetPrompt: {
|
|
184
|
+
uri: string;
|
|
185
|
+
method: string;
|
|
186
|
+
};
|
|
187
|
+
AddScript: {
|
|
188
|
+
uri: string;
|
|
189
|
+
method: string;
|
|
190
|
+
};
|
|
191
|
+
DeleteScript: {
|
|
192
|
+
uri: string;
|
|
193
|
+
method: string;
|
|
194
|
+
};
|
|
195
|
+
ListScript: {
|
|
196
|
+
uri: string;
|
|
197
|
+
method: string;
|
|
198
|
+
};
|
|
199
|
+
UpdateScript: {
|
|
200
|
+
uri: string;
|
|
201
|
+
method: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
type index$c_Category = Category;
|
|
206
|
+
declare const index$c_CategorySchema: typeof CategorySchema;
|
|
207
|
+
declare const index$c_PromptSchema: typeof PromptSchema;
|
|
208
|
+
type index$c_Script = Script;
|
|
209
|
+
declare const index$c_ScriptSchema: typeof ScriptSchema;
|
|
210
|
+
declare namespace index$c {
|
|
211
|
+
export { type index$c_Category as Category, index$c_CategorySchema as CategorySchema, Endpoints$9 as Endpoints, type Prompt as Entity, type IAPI$a as IAPI, index$c_PromptSchema as PromptSchema, type index$c_Script as Script, index$c_ScriptSchema as ScriptSchema };
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
declare enum Type {
|
|
215
|
+
CUSTOMER_SUBSCRIPTION = 0,
|
|
216
|
+
TENANT_SUBSCRIPTION = 1
|
|
217
|
+
}
|
|
218
|
+
declare const SubscriptionTypeSchema: z.ZodNativeEnum<typeof Type>;
|
|
219
|
+
declare const PlanSchema: z.ZodObject<{
|
|
220
|
+
id: z.ZodString;
|
|
221
|
+
currency: z.ZodString;
|
|
222
|
+
price: z.ZodString;
|
|
223
|
+
interval: z.ZodString;
|
|
224
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
225
|
+
subscriptionItemId: z.ZodString;
|
|
226
|
+
}, "strip", z.ZodTypeAny, {
|
|
227
|
+
id: string;
|
|
228
|
+
metadata: Record<string, string>;
|
|
229
|
+
interval: string;
|
|
230
|
+
price: string;
|
|
231
|
+
currency: string;
|
|
232
|
+
subscriptionItemId: string;
|
|
233
|
+
}, {
|
|
234
|
+
id: string;
|
|
235
|
+
metadata: Record<string, string>;
|
|
236
|
+
interval: string;
|
|
237
|
+
price: string;
|
|
238
|
+
currency: string;
|
|
239
|
+
subscriptionItemId: string;
|
|
240
|
+
}>;
|
|
241
|
+
declare const ProductSchema: z.ZodObject<{
|
|
242
|
+
id: z.ZodString;
|
|
243
|
+
name: z.ZodString;
|
|
244
|
+
descriptions: z.ZodArray<z.ZodObject<{
|
|
245
|
+
description: z.ZodString;
|
|
246
|
+
subtitle: z.ZodString;
|
|
247
|
+
}, "strip", z.ZodTypeAny, {
|
|
248
|
+
description: string;
|
|
249
|
+
subtitle: string;
|
|
250
|
+
}, {
|
|
251
|
+
description: string;
|
|
252
|
+
subtitle: string;
|
|
253
|
+
}>, "many">;
|
|
254
|
+
metadata: z.ZodAny;
|
|
255
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
256
|
+
id: z.ZodString;
|
|
257
|
+
currency: z.ZodString;
|
|
258
|
+
price: z.ZodString;
|
|
259
|
+
interval: z.ZodString;
|
|
260
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
261
|
+
subscriptionItemId: z.ZodString;
|
|
262
|
+
}, "strip", z.ZodTypeAny, {
|
|
263
|
+
id: string;
|
|
264
|
+
metadata: Record<string, string>;
|
|
265
|
+
interval: string;
|
|
266
|
+
price: string;
|
|
267
|
+
currency: string;
|
|
268
|
+
subscriptionItemId: string;
|
|
269
|
+
}, {
|
|
270
|
+
id: string;
|
|
271
|
+
metadata: Record<string, string>;
|
|
272
|
+
interval: string;
|
|
273
|
+
price: string;
|
|
274
|
+
currency: string;
|
|
275
|
+
subscriptionItemId: string;
|
|
276
|
+
}>, "many">;
|
|
277
|
+
}, "strip", z.ZodTypeAny, {
|
|
278
|
+
id: string;
|
|
279
|
+
name: string;
|
|
280
|
+
descriptions: {
|
|
281
|
+
description: string;
|
|
282
|
+
subtitle: string;
|
|
283
|
+
}[];
|
|
284
|
+
plans: {
|
|
285
|
+
id: string;
|
|
286
|
+
metadata: Record<string, string>;
|
|
287
|
+
interval: string;
|
|
288
|
+
price: string;
|
|
289
|
+
currency: string;
|
|
290
|
+
subscriptionItemId: string;
|
|
291
|
+
}[];
|
|
292
|
+
metadata?: any;
|
|
293
|
+
}, {
|
|
294
|
+
id: string;
|
|
295
|
+
name: string;
|
|
296
|
+
descriptions: {
|
|
297
|
+
description: string;
|
|
298
|
+
subtitle: string;
|
|
299
|
+
}[];
|
|
300
|
+
plans: {
|
|
301
|
+
id: string;
|
|
302
|
+
metadata: Record<string, string>;
|
|
303
|
+
interval: string;
|
|
304
|
+
price: string;
|
|
305
|
+
currency: string;
|
|
306
|
+
subscriptionItemId: string;
|
|
307
|
+
}[];
|
|
308
|
+
metadata?: any;
|
|
309
|
+
}>;
|
|
310
|
+
declare const ChargeSchema: z.ZodObject<{
|
|
311
|
+
id: z.ZodNumber;
|
|
312
|
+
created: z.ZodNumber;
|
|
313
|
+
paid: z.ZodBoolean;
|
|
314
|
+
receiptUrl: z.ZodString;
|
|
315
|
+
status: z.ZodString;
|
|
316
|
+
price: z.ZodString;
|
|
317
|
+
paymentType: z.ZodString;
|
|
318
|
+
last4: z.ZodOptional<z.ZodString>;
|
|
319
|
+
brand: z.ZodOptional<z.ZodString>;
|
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
|
321
|
+
id: number;
|
|
322
|
+
status: string;
|
|
323
|
+
created: number;
|
|
324
|
+
paid: boolean;
|
|
325
|
+
receiptUrl: string;
|
|
326
|
+
price: string;
|
|
327
|
+
paymentType: string;
|
|
328
|
+
last4?: string | undefined;
|
|
329
|
+
brand?: string | undefined;
|
|
330
|
+
}, {
|
|
331
|
+
id: number;
|
|
332
|
+
status: string;
|
|
333
|
+
created: number;
|
|
334
|
+
paid: boolean;
|
|
335
|
+
receiptUrl: string;
|
|
336
|
+
price: string;
|
|
337
|
+
paymentType: string;
|
|
338
|
+
last4?: string | undefined;
|
|
339
|
+
brand?: string | undefined;
|
|
340
|
+
}>;
|
|
341
|
+
declare const SubscriptionSchema: z.ZodObject<{
|
|
342
|
+
id: z.ZodString;
|
|
343
|
+
status: z.ZodString;
|
|
344
|
+
startDate: z.ZodOptional<z.ZodNumber>;
|
|
345
|
+
daysUntilDue: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
renewAutomatically: z.ZodOptional<z.ZodBoolean>;
|
|
347
|
+
currentPeriodStart: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
currentPeriodEnd: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
paymentMethodId: z.ZodOptional<z.ZodString>;
|
|
350
|
+
product: z.ZodObject<{
|
|
351
|
+
id: z.ZodString;
|
|
352
|
+
name: z.ZodString;
|
|
353
|
+
descriptions: z.ZodArray<z.ZodObject<{
|
|
354
|
+
description: z.ZodString;
|
|
355
|
+
subtitle: z.ZodString;
|
|
356
|
+
}, "strip", z.ZodTypeAny, {
|
|
357
|
+
description: string;
|
|
358
|
+
subtitle: string;
|
|
359
|
+
}, {
|
|
360
|
+
description: string;
|
|
361
|
+
subtitle: string;
|
|
362
|
+
}>, "many">;
|
|
363
|
+
metadata: z.ZodAny;
|
|
364
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
365
|
+
id: z.ZodString;
|
|
366
|
+
currency: z.ZodString;
|
|
367
|
+
price: z.ZodString;
|
|
368
|
+
interval: z.ZodString;
|
|
369
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
370
|
+
subscriptionItemId: z.ZodString;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
id: string;
|
|
373
|
+
metadata: Record<string, string>;
|
|
374
|
+
interval: string;
|
|
375
|
+
price: string;
|
|
376
|
+
currency: string;
|
|
377
|
+
subscriptionItemId: string;
|
|
378
|
+
}, {
|
|
379
|
+
id: string;
|
|
380
|
+
metadata: Record<string, string>;
|
|
381
|
+
interval: string;
|
|
382
|
+
price: string;
|
|
383
|
+
currency: string;
|
|
384
|
+
subscriptionItemId: string;
|
|
385
|
+
}>, "many">;
|
|
386
|
+
}, "strip", z.ZodTypeAny, {
|
|
387
|
+
id: string;
|
|
388
|
+
name: string;
|
|
389
|
+
descriptions: {
|
|
390
|
+
description: string;
|
|
391
|
+
subtitle: string;
|
|
392
|
+
}[];
|
|
393
|
+
plans: {
|
|
394
|
+
id: string;
|
|
395
|
+
metadata: Record<string, string>;
|
|
396
|
+
interval: string;
|
|
397
|
+
price: string;
|
|
398
|
+
currency: string;
|
|
399
|
+
subscriptionItemId: string;
|
|
400
|
+
}[];
|
|
401
|
+
metadata?: any;
|
|
402
|
+
}, {
|
|
403
|
+
id: string;
|
|
404
|
+
name: string;
|
|
405
|
+
descriptions: {
|
|
406
|
+
description: string;
|
|
407
|
+
subtitle: string;
|
|
408
|
+
}[];
|
|
409
|
+
plans: {
|
|
410
|
+
id: string;
|
|
411
|
+
metadata: Record<string, string>;
|
|
412
|
+
interval: string;
|
|
413
|
+
price: string;
|
|
414
|
+
currency: string;
|
|
415
|
+
subscriptionItemId: string;
|
|
416
|
+
}[];
|
|
417
|
+
metadata?: any;
|
|
418
|
+
}>;
|
|
419
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof Type>>;
|
|
420
|
+
plan: z.ZodOptional<z.ZodObject<{
|
|
421
|
+
id: z.ZodString;
|
|
422
|
+
currency: z.ZodString;
|
|
423
|
+
price: z.ZodString;
|
|
424
|
+
interval: z.ZodString;
|
|
425
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
426
|
+
subscriptionItemId: z.ZodString;
|
|
427
|
+
}, "strip", z.ZodTypeAny, {
|
|
428
|
+
id: string;
|
|
429
|
+
metadata: Record<string, string>;
|
|
430
|
+
interval: string;
|
|
431
|
+
price: string;
|
|
432
|
+
currency: string;
|
|
433
|
+
subscriptionItemId: string;
|
|
434
|
+
}, {
|
|
435
|
+
id: string;
|
|
436
|
+
metadata: Record<string, string>;
|
|
437
|
+
interval: string;
|
|
438
|
+
price: string;
|
|
439
|
+
currency: string;
|
|
440
|
+
subscriptionItemId: string;
|
|
441
|
+
}>>;
|
|
442
|
+
}, "strip", z.ZodTypeAny, {
|
|
443
|
+
id: string;
|
|
444
|
+
status: string;
|
|
445
|
+
product: {
|
|
446
|
+
id: string;
|
|
447
|
+
name: string;
|
|
448
|
+
descriptions: {
|
|
449
|
+
description: string;
|
|
450
|
+
subtitle: string;
|
|
451
|
+
}[];
|
|
452
|
+
plans: {
|
|
453
|
+
id: string;
|
|
454
|
+
metadata: Record<string, string>;
|
|
455
|
+
interval: string;
|
|
456
|
+
price: string;
|
|
457
|
+
currency: string;
|
|
458
|
+
subscriptionItemId: string;
|
|
459
|
+
}[];
|
|
460
|
+
metadata?: any;
|
|
461
|
+
};
|
|
462
|
+
type?: Type | undefined;
|
|
463
|
+
startDate?: number | undefined;
|
|
464
|
+
daysUntilDue?: number | undefined;
|
|
465
|
+
renewAutomatically?: boolean | undefined;
|
|
466
|
+
currentPeriodStart?: number | undefined;
|
|
467
|
+
currentPeriodEnd?: number | undefined;
|
|
468
|
+
paymentMethodId?: string | undefined;
|
|
469
|
+
plan?: {
|
|
470
|
+
id: string;
|
|
471
|
+
metadata: Record<string, string>;
|
|
472
|
+
interval: string;
|
|
473
|
+
price: string;
|
|
474
|
+
currency: string;
|
|
475
|
+
subscriptionItemId: string;
|
|
476
|
+
} | undefined;
|
|
477
|
+
}, {
|
|
478
|
+
id: string;
|
|
479
|
+
status: string;
|
|
480
|
+
product: {
|
|
481
|
+
id: string;
|
|
482
|
+
name: string;
|
|
483
|
+
descriptions: {
|
|
484
|
+
description: string;
|
|
485
|
+
subtitle: string;
|
|
486
|
+
}[];
|
|
487
|
+
plans: {
|
|
488
|
+
id: string;
|
|
489
|
+
metadata: Record<string, string>;
|
|
490
|
+
interval: string;
|
|
491
|
+
price: string;
|
|
492
|
+
currency: string;
|
|
493
|
+
subscriptionItemId: string;
|
|
494
|
+
}[];
|
|
495
|
+
metadata?: any;
|
|
496
|
+
};
|
|
497
|
+
type?: Type | undefined;
|
|
498
|
+
startDate?: number | undefined;
|
|
499
|
+
daysUntilDue?: number | undefined;
|
|
500
|
+
renewAutomatically?: boolean | undefined;
|
|
501
|
+
currentPeriodStart?: number | undefined;
|
|
502
|
+
currentPeriodEnd?: number | undefined;
|
|
503
|
+
paymentMethodId?: string | undefined;
|
|
504
|
+
plan?: {
|
|
505
|
+
id: string;
|
|
506
|
+
metadata: Record<string, string>;
|
|
507
|
+
interval: string;
|
|
508
|
+
price: string;
|
|
509
|
+
currency: string;
|
|
510
|
+
subscriptionItemId: string;
|
|
511
|
+
} | undefined;
|
|
512
|
+
}>;
|
|
513
|
+
type Subscription = z.infer<typeof SubscriptionSchema>;
|
|
514
|
+
type Charge = z.infer<typeof ChargeSchema>;
|
|
515
|
+
type Plan = z.infer<typeof PlanSchema>;
|
|
516
|
+
type Product = z.infer<typeof ProductSchema>;
|
|
517
|
+
|
|
518
|
+
interface IAPI$9 {
|
|
519
|
+
getCharges: (ctx: Context) => Promise<Charge[]>;
|
|
520
|
+
getSubscription: (context: Context, userId?: string) => Promise<Subscription | null>;
|
|
521
|
+
getProduct: (id: string, context?: Context) => Promise<Product>;
|
|
522
|
+
getProducts: (ctx?: Context) => Promise<Product[]>;
|
|
523
|
+
charge: (ctx: Context) => Promise<boolean>;
|
|
524
|
+
pause: (ctx: Context) => Promise<boolean>;
|
|
525
|
+
resume: (ctx: Context) => Promise<boolean>;
|
|
526
|
+
updatePlan: (ctx: Context, planId: string) => Promise<boolean>;
|
|
527
|
+
createCheckout: (planId: string | null, ctx: Context) => Promise<string>;
|
|
528
|
+
}
|
|
529
|
+
declare const Endpoints$8: {
|
|
530
|
+
GetProduct: {
|
|
531
|
+
uri: string;
|
|
532
|
+
method: string;
|
|
533
|
+
};
|
|
534
|
+
GetActiveSubscription: {
|
|
535
|
+
uri: string;
|
|
536
|
+
method: string;
|
|
537
|
+
};
|
|
538
|
+
GetCharges: {
|
|
539
|
+
uri: string;
|
|
540
|
+
method: string;
|
|
541
|
+
};
|
|
542
|
+
GetUserActiveSubscription: {
|
|
543
|
+
uri: string;
|
|
544
|
+
method: string;
|
|
545
|
+
};
|
|
546
|
+
GetProducts: {
|
|
547
|
+
uri: string;
|
|
548
|
+
method: string;
|
|
549
|
+
};
|
|
550
|
+
GetProductsByUser: {
|
|
551
|
+
uri: string;
|
|
552
|
+
method: string;
|
|
553
|
+
};
|
|
554
|
+
Checkout: {
|
|
555
|
+
uri: string;
|
|
556
|
+
method: string;
|
|
557
|
+
};
|
|
558
|
+
Charge: {
|
|
559
|
+
uri: string;
|
|
560
|
+
method: string;
|
|
561
|
+
};
|
|
562
|
+
Pause: {
|
|
563
|
+
uri: string;
|
|
564
|
+
method: string;
|
|
565
|
+
};
|
|
566
|
+
Resume: {
|
|
567
|
+
uri: string;
|
|
568
|
+
method: string;
|
|
569
|
+
};
|
|
570
|
+
UpdatePlan: {
|
|
571
|
+
uri: string;
|
|
572
|
+
method: string;
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
type index$b_Charge = Charge;
|
|
577
|
+
declare const index$b_ChargeSchema: typeof ChargeSchema;
|
|
578
|
+
type index$b_Plan = Plan;
|
|
579
|
+
declare const index$b_PlanSchema: typeof PlanSchema;
|
|
580
|
+
type index$b_Product = Product;
|
|
581
|
+
declare const index$b_ProductSchema: typeof ProductSchema;
|
|
582
|
+
declare const index$b_SubscriptionSchema: typeof SubscriptionSchema;
|
|
583
|
+
declare const index$b_SubscriptionTypeSchema: typeof SubscriptionTypeSchema;
|
|
584
|
+
type index$b_Type = Type;
|
|
585
|
+
declare const index$b_Type: typeof Type;
|
|
586
|
+
declare namespace index$b {
|
|
587
|
+
export { type index$b_Charge as Charge, index$b_ChargeSchema as ChargeSchema, Endpoints$8 as Endpoints, type Subscription as Entity, type IAPI$9 as IAPI, type index$b_Plan as Plan, index$b_PlanSchema as PlanSchema, type index$b_Product as Product, index$b_ProductSchema as ProductSchema, index$b_SubscriptionSchema as SubscriptionSchema, index$b_SubscriptionTypeSchema as SubscriptionTypeSchema, index$b_Type as Type };
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
declare enum Role {
|
|
591
|
+
USER = "User",
|
|
592
|
+
EDITOR = "Editor",
|
|
593
|
+
QA = "QA",
|
|
594
|
+
ADMIN = "ADMIN",
|
|
595
|
+
SYSTEM = "SYSTEM"
|
|
596
|
+
}
|
|
597
|
+
declare enum System {
|
|
598
|
+
APP = "APP",
|
|
599
|
+
EDITOR = "EDITOR",
|
|
600
|
+
QA = "QA",
|
|
601
|
+
ADMIN = "ADMIN"
|
|
602
|
+
}
|
|
603
|
+
declare const PreferencesSchema$1: z.ZodObject<{
|
|
604
|
+
primaryColor: z.ZodOptional<z.ZodString>;
|
|
605
|
+
secondaryColor: z.ZodOptional<z.ZodString>;
|
|
606
|
+
facebookLink: z.ZodOptional<z.ZodString>;
|
|
607
|
+
instagramLink: z.ZodOptional<z.ZodString>;
|
|
608
|
+
bRoll: z.ZodOptional<z.ZodBoolean>;
|
|
609
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
610
|
+
}, "strip", z.ZodTypeAny, {
|
|
611
|
+
primaryColor?: string | undefined;
|
|
612
|
+
secondaryColor?: string | undefined;
|
|
613
|
+
facebookLink?: string | undefined;
|
|
614
|
+
instagramLink?: string | undefined;
|
|
615
|
+
bRoll?: boolean | undefined;
|
|
616
|
+
logo?: string | undefined;
|
|
617
|
+
}, {
|
|
618
|
+
primaryColor?: string | undefined;
|
|
619
|
+
secondaryColor?: string | undefined;
|
|
620
|
+
facebookLink?: string | undefined;
|
|
621
|
+
instagramLink?: string | undefined;
|
|
622
|
+
bRoll?: boolean | undefined;
|
|
623
|
+
logo?: string | undefined;
|
|
624
|
+
}>;
|
|
625
|
+
declare const UserSchema: z.ZodObject<{
|
|
626
|
+
id: z.ZodString;
|
|
627
|
+
name: z.ZodString;
|
|
628
|
+
email: z.ZodString;
|
|
629
|
+
fcmToken: z.ZodOptional<z.ZodString>;
|
|
630
|
+
profession: z.ZodOptional<z.ZodString>;
|
|
631
|
+
photoUrl: z.ZodOptional<z.ZodString>;
|
|
632
|
+
preferences: z.ZodOptional<z.ZodObject<{
|
|
633
|
+
primaryColor: z.ZodOptional<z.ZodString>;
|
|
634
|
+
secondaryColor: z.ZodOptional<z.ZodString>;
|
|
635
|
+
facebookLink: z.ZodOptional<z.ZodString>;
|
|
636
|
+
instagramLink: z.ZodOptional<z.ZodString>;
|
|
637
|
+
bRoll: z.ZodOptional<z.ZodBoolean>;
|
|
638
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
639
|
+
}, "strip", z.ZodTypeAny, {
|
|
640
|
+
primaryColor?: string | undefined;
|
|
641
|
+
secondaryColor?: string | undefined;
|
|
642
|
+
facebookLink?: string | undefined;
|
|
643
|
+
instagramLink?: string | undefined;
|
|
644
|
+
bRoll?: boolean | undefined;
|
|
645
|
+
logo?: string | undefined;
|
|
646
|
+
}, {
|
|
647
|
+
primaryColor?: string | undefined;
|
|
648
|
+
secondaryColor?: string | undefined;
|
|
649
|
+
facebookLink?: string | undefined;
|
|
650
|
+
instagramLink?: string | undefined;
|
|
651
|
+
bRoll?: boolean | undefined;
|
|
652
|
+
logo?: string | undefined;
|
|
653
|
+
}>>;
|
|
654
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
655
|
+
editorId: z.ZodOptional<z.ZodString>;
|
|
656
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
657
|
+
experienceId: z.ZodOptional<z.ZodString>;
|
|
658
|
+
customerId: z.ZodString;
|
|
659
|
+
role: z.ZodNativeEnum<typeof Role>;
|
|
660
|
+
}, "strip", z.ZodTypeAny, {
|
|
661
|
+
email: string;
|
|
662
|
+
id: string;
|
|
663
|
+
name: string;
|
|
664
|
+
customerId: string;
|
|
665
|
+
role: Role;
|
|
666
|
+
timezone?: string | undefined;
|
|
667
|
+
tenantId?: string | undefined;
|
|
668
|
+
preferences?: {
|
|
669
|
+
primaryColor?: string | undefined;
|
|
670
|
+
secondaryColor?: string | undefined;
|
|
671
|
+
facebookLink?: string | undefined;
|
|
672
|
+
instagramLink?: string | undefined;
|
|
673
|
+
bRoll?: boolean | undefined;
|
|
674
|
+
logo?: string | undefined;
|
|
675
|
+
} | undefined;
|
|
676
|
+
fcmToken?: string | undefined;
|
|
677
|
+
profession?: string | undefined;
|
|
678
|
+
photoUrl?: string | undefined;
|
|
679
|
+
editorId?: string | undefined;
|
|
680
|
+
experienceId?: string | undefined;
|
|
681
|
+
}, {
|
|
682
|
+
email: string;
|
|
683
|
+
id: string;
|
|
684
|
+
name: string;
|
|
685
|
+
customerId: string;
|
|
686
|
+
role: Role;
|
|
687
|
+
timezone?: string | undefined;
|
|
688
|
+
tenantId?: string | undefined;
|
|
689
|
+
preferences?: {
|
|
690
|
+
primaryColor?: string | undefined;
|
|
691
|
+
secondaryColor?: string | undefined;
|
|
692
|
+
facebookLink?: string | undefined;
|
|
693
|
+
instagramLink?: string | undefined;
|
|
694
|
+
bRoll?: boolean | undefined;
|
|
695
|
+
logo?: string | undefined;
|
|
696
|
+
} | undefined;
|
|
697
|
+
fcmToken?: string | undefined;
|
|
698
|
+
profession?: string | undefined;
|
|
699
|
+
photoUrl?: string | undefined;
|
|
700
|
+
editorId?: string | undefined;
|
|
701
|
+
experienceId?: string | undefined;
|
|
702
|
+
}>;
|
|
703
|
+
type User = z.infer<typeof UserSchema>;
|
|
704
|
+
type Preferences$1 = z.infer<typeof PreferencesSchema$1>;
|
|
705
|
+
type Update = Pick<User, "name" | "profession" | "preferences" | "photoUrl" | "fcmToken" | "timezone" | "experienceId">;
|
|
706
|
+
|
|
707
|
+
type QueryOrderBy<T> = {
|
|
708
|
+
field: keyof T | "modified";
|
|
709
|
+
direction: "asc" | "desc";
|
|
710
|
+
};
|
|
711
|
+
type QueryWhere<T> = {
|
|
712
|
+
field: keyof T | "modified";
|
|
713
|
+
operation: "==" | "!=" | ">" | "<" | ">=" | "<=" | "in" | "array-contains";
|
|
714
|
+
value: T[keyof T] | T[keyof T][];
|
|
715
|
+
};
|
|
716
|
+
type QueryOptions<T> = {
|
|
717
|
+
perPage?: number;
|
|
718
|
+
cursor?: string | number | null;
|
|
719
|
+
orderBy?: QueryOrderBy<T>;
|
|
720
|
+
wheres?: QueryWhere<T>[];
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
type APIResponse<T> = {
|
|
724
|
+
data: T[];
|
|
725
|
+
count: number;
|
|
726
|
+
cursor?: string | number | null;
|
|
727
|
+
perPage?: number;
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
type index$a_APIResponse<T> = APIResponse<T>;
|
|
731
|
+
type index$a_QueryOptions<T> = QueryOptions<T>;
|
|
732
|
+
type index$a_QueryOrderBy<T> = QueryOrderBy<T>;
|
|
733
|
+
type index$a_QueryWhere<T> = QueryWhere<T>;
|
|
734
|
+
declare namespace index$a {
|
|
735
|
+
export type { index$a_APIResponse as APIResponse, index$a_QueryOptions as QueryOptions, index$a_QueryOrderBy as QueryOrderBy, index$a_QueryWhere as QueryWhere };
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
interface IAPI$8 {
|
|
739
|
+
getUserInfo: (context: Context) => Promise<User>;
|
|
740
|
+
isEmailAvaliable: (email: string) => Promise<boolean>;
|
|
741
|
+
sendValidationCode: (email: string) => Promise<boolean>;
|
|
742
|
+
confirmCode: (email: string, code: number, keepCode?: boolean) => Promise<boolean>;
|
|
743
|
+
changePassword: (email: string, pass: string, passConfirm: string, code: number) => Promise<boolean>;
|
|
744
|
+
changeEmail: (ctx: Context, email: string, code: number) => Promise<boolean>;
|
|
745
|
+
authenticate: (email: string, password: string, system: System) => Promise<string>;
|
|
746
|
+
update: (context: Context, update: Partial<Update>) => Promise<boolean>;
|
|
747
|
+
setup: (context: Context) => Promise<boolean>;
|
|
748
|
+
getBindedUsers: (ctx: Context) => Promise<User[]>;
|
|
749
|
+
deleteAccount: (ctx: Context) => Promise<boolean>;
|
|
750
|
+
getIntegrationToken: (ctx: Context) => Promise<string | null>;
|
|
751
|
+
createIntegrationToken: (ctx: Context) => Promise<string>;
|
|
752
|
+
search: (ctx: Context, query: QueryOptions<User>) => Promise<APIResponse<User>>;
|
|
753
|
+
createUser: (email: string, name: string, password: string, passwordConfirmation: string, profession: string | null, invitationCode: string | null) => Promise<User>;
|
|
754
|
+
}
|
|
755
|
+
declare const Endpoints$7: {
|
|
756
|
+
ChangeEmail: {
|
|
757
|
+
uri: string;
|
|
758
|
+
method: string;
|
|
759
|
+
};
|
|
760
|
+
GetUserInfo: {
|
|
761
|
+
uri: string;
|
|
762
|
+
method: string;
|
|
763
|
+
};
|
|
764
|
+
GetBindedUsers: {
|
|
765
|
+
uri: string;
|
|
766
|
+
method: string;
|
|
767
|
+
};
|
|
768
|
+
EnableUser: {
|
|
769
|
+
uri: string;
|
|
770
|
+
method: string;
|
|
771
|
+
};
|
|
772
|
+
ChangePassword: {
|
|
773
|
+
uri: string;
|
|
774
|
+
method: string;
|
|
775
|
+
};
|
|
776
|
+
IsEmailAvaliable: {
|
|
777
|
+
uri: string;
|
|
778
|
+
method: string;
|
|
779
|
+
};
|
|
780
|
+
GetIntegrationToken: {
|
|
781
|
+
uri: string;
|
|
782
|
+
method: string;
|
|
783
|
+
};
|
|
784
|
+
CreateToken: {
|
|
785
|
+
uri: string;
|
|
786
|
+
method: string;
|
|
787
|
+
};
|
|
788
|
+
ConfirmCode: {
|
|
789
|
+
uri: string;
|
|
790
|
+
method: string;
|
|
791
|
+
};
|
|
792
|
+
DeleteAccount: {
|
|
793
|
+
uri: string;
|
|
794
|
+
method: string;
|
|
795
|
+
};
|
|
796
|
+
SendValidationCode: {
|
|
797
|
+
uri: string;
|
|
798
|
+
method: string;
|
|
799
|
+
};
|
|
800
|
+
Authenticate: {
|
|
801
|
+
uri: string;
|
|
802
|
+
method: string;
|
|
803
|
+
};
|
|
804
|
+
CreateUser: {
|
|
805
|
+
uri: string;
|
|
806
|
+
method: string;
|
|
807
|
+
};
|
|
808
|
+
UpdateUser: {
|
|
809
|
+
uri: string;
|
|
810
|
+
method: string;
|
|
811
|
+
};
|
|
812
|
+
Setup: {
|
|
813
|
+
uri: string;
|
|
814
|
+
method: string;
|
|
815
|
+
};
|
|
816
|
+
Search: {
|
|
817
|
+
uri: string;
|
|
818
|
+
method: string;
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
type index$9_Role = Role;
|
|
823
|
+
declare const index$9_Role: typeof Role;
|
|
824
|
+
type index$9_System = System;
|
|
825
|
+
declare const index$9_System: typeof System;
|
|
826
|
+
type index$9_Update = Update;
|
|
827
|
+
declare const index$9_UserSchema: typeof UserSchema;
|
|
828
|
+
declare namespace index$9 {
|
|
829
|
+
export { Endpoints$7 as Endpoints, type User as Entity, type IAPI$8 as IAPI, type Preferences$1 as Preferences, PreferencesSchema$1 as PreferencesSchema, index$9_Role as Role, index$9_System as System, type index$9_Update as Update, index$9_UserSchema as UserSchema };
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
declare const PreferencesSchema: z.ZodObject<{
|
|
833
|
+
iconUrl: z.ZodString;
|
|
834
|
+
logoUrl: z.ZodString;
|
|
835
|
+
primaryColor: z.ZodString;
|
|
836
|
+
secondaryColor: z.ZodString;
|
|
837
|
+
guidelinesUrl: z.ZodOptional<z.ZodString>;
|
|
838
|
+
}, "strip", z.ZodTypeAny, {
|
|
839
|
+
iconUrl: string;
|
|
840
|
+
logoUrl: string;
|
|
841
|
+
primaryColor: string;
|
|
842
|
+
secondaryColor: string;
|
|
843
|
+
guidelinesUrl?: string | undefined;
|
|
844
|
+
}, {
|
|
845
|
+
iconUrl: string;
|
|
846
|
+
logoUrl: string;
|
|
847
|
+
primaryColor: string;
|
|
848
|
+
secondaryColor: string;
|
|
849
|
+
guidelinesUrl?: string | undefined;
|
|
850
|
+
}>;
|
|
851
|
+
declare const TenantSchema: z.ZodObject<{
|
|
852
|
+
id: z.ZodString;
|
|
853
|
+
name: z.ZodString;
|
|
854
|
+
isActive: z.ZodBoolean;
|
|
855
|
+
isSubscriptionActive: z.ZodBoolean;
|
|
856
|
+
preferences: z.ZodObject<{
|
|
857
|
+
iconUrl: z.ZodString;
|
|
858
|
+
logoUrl: z.ZodString;
|
|
859
|
+
primaryColor: z.ZodString;
|
|
860
|
+
secondaryColor: z.ZodString;
|
|
861
|
+
guidelinesUrl: z.ZodOptional<z.ZodString>;
|
|
862
|
+
}, "strip", z.ZodTypeAny, {
|
|
863
|
+
iconUrl: string;
|
|
864
|
+
logoUrl: string;
|
|
865
|
+
primaryColor: string;
|
|
866
|
+
secondaryColor: string;
|
|
867
|
+
guidelinesUrl?: string | undefined;
|
|
868
|
+
}, {
|
|
869
|
+
iconUrl: string;
|
|
870
|
+
logoUrl: string;
|
|
871
|
+
primaryColor: string;
|
|
872
|
+
secondaryColor: string;
|
|
873
|
+
guidelinesUrl?: string | undefined;
|
|
874
|
+
}>;
|
|
875
|
+
inviteCode: z.ZodString;
|
|
876
|
+
totalUsersAllowed: z.ZodNumber;
|
|
877
|
+
currentUsersSize: z.ZodOptional<z.ZodNumber>;
|
|
878
|
+
chargeByEmail: z.ZodBoolean;
|
|
879
|
+
defaultProductId: z.ZodOptional<z.ZodString>;
|
|
880
|
+
defaultPlanId: z.ZodOptional<z.ZodString>;
|
|
881
|
+
defaultCoupomCode: z.ZodOptional<z.ZodString>;
|
|
882
|
+
allowedProducts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
883
|
+
useOwnScripts: z.ZodOptional<z.ZodBoolean>;
|
|
884
|
+
subscription: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
885
|
+
id: z.ZodString;
|
|
886
|
+
status: z.ZodString;
|
|
887
|
+
startDate: z.ZodOptional<z.ZodNumber>;
|
|
888
|
+
daysUntilDue: z.ZodOptional<z.ZodNumber>;
|
|
889
|
+
renewAutomatically: z.ZodOptional<z.ZodBoolean>;
|
|
890
|
+
currentPeriodStart: z.ZodOptional<z.ZodNumber>;
|
|
891
|
+
currentPeriodEnd: z.ZodOptional<z.ZodNumber>;
|
|
892
|
+
paymentMethodId: z.ZodOptional<z.ZodString>;
|
|
893
|
+
product: z.ZodObject<{
|
|
894
|
+
id: z.ZodString;
|
|
895
|
+
name: z.ZodString;
|
|
896
|
+
descriptions: z.ZodArray<z.ZodObject<{
|
|
897
|
+
description: z.ZodString;
|
|
898
|
+
subtitle: z.ZodString;
|
|
899
|
+
}, "strip", z.ZodTypeAny, {
|
|
900
|
+
description: string;
|
|
901
|
+
subtitle: string;
|
|
902
|
+
}, {
|
|
903
|
+
description: string;
|
|
904
|
+
subtitle: string;
|
|
905
|
+
}>, "many">;
|
|
906
|
+
metadata: z.ZodAny;
|
|
907
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
908
|
+
id: z.ZodString;
|
|
909
|
+
currency: z.ZodString;
|
|
910
|
+
price: z.ZodString;
|
|
911
|
+
interval: z.ZodString;
|
|
912
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
913
|
+
subscriptionItemId: z.ZodString;
|
|
914
|
+
}, "strip", z.ZodTypeAny, {
|
|
915
|
+
id: string;
|
|
916
|
+
metadata: Record<string, string>;
|
|
917
|
+
interval: string;
|
|
918
|
+
price: string;
|
|
919
|
+
currency: string;
|
|
920
|
+
subscriptionItemId: string;
|
|
921
|
+
}, {
|
|
922
|
+
id: string;
|
|
923
|
+
metadata: Record<string, string>;
|
|
924
|
+
interval: string;
|
|
925
|
+
price: string;
|
|
926
|
+
currency: string;
|
|
927
|
+
subscriptionItemId: string;
|
|
928
|
+
}>, "many">;
|
|
929
|
+
}, "strip", z.ZodTypeAny, {
|
|
930
|
+
id: string;
|
|
931
|
+
name: string;
|
|
932
|
+
descriptions: {
|
|
933
|
+
description: string;
|
|
934
|
+
subtitle: string;
|
|
935
|
+
}[];
|
|
936
|
+
plans: {
|
|
937
|
+
id: string;
|
|
938
|
+
metadata: Record<string, string>;
|
|
939
|
+
interval: string;
|
|
940
|
+
price: string;
|
|
941
|
+
currency: string;
|
|
942
|
+
subscriptionItemId: string;
|
|
943
|
+
}[];
|
|
944
|
+
metadata?: any;
|
|
945
|
+
}, {
|
|
946
|
+
id: string;
|
|
947
|
+
name: string;
|
|
948
|
+
descriptions: {
|
|
949
|
+
description: string;
|
|
950
|
+
subtitle: string;
|
|
951
|
+
}[];
|
|
952
|
+
plans: {
|
|
953
|
+
id: string;
|
|
954
|
+
metadata: Record<string, string>;
|
|
955
|
+
interval: string;
|
|
956
|
+
price: string;
|
|
957
|
+
currency: string;
|
|
958
|
+
subscriptionItemId: string;
|
|
959
|
+
}[];
|
|
960
|
+
metadata?: any;
|
|
961
|
+
}>;
|
|
962
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof Type>>;
|
|
963
|
+
plan: z.ZodOptional<z.ZodObject<{
|
|
964
|
+
id: z.ZodString;
|
|
965
|
+
currency: z.ZodString;
|
|
966
|
+
price: z.ZodString;
|
|
967
|
+
interval: z.ZodString;
|
|
968
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
969
|
+
subscriptionItemId: z.ZodString;
|
|
970
|
+
}, "strip", z.ZodTypeAny, {
|
|
971
|
+
id: string;
|
|
972
|
+
metadata: Record<string, string>;
|
|
973
|
+
interval: string;
|
|
974
|
+
price: string;
|
|
975
|
+
currency: string;
|
|
976
|
+
subscriptionItemId: string;
|
|
977
|
+
}, {
|
|
978
|
+
id: string;
|
|
979
|
+
metadata: Record<string, string>;
|
|
980
|
+
interval: string;
|
|
981
|
+
price: string;
|
|
982
|
+
currency: string;
|
|
983
|
+
subscriptionItemId: string;
|
|
984
|
+
}>>;
|
|
985
|
+
}, "strip", z.ZodTypeAny, {
|
|
986
|
+
id: string;
|
|
987
|
+
status: string;
|
|
988
|
+
product: {
|
|
989
|
+
id: string;
|
|
990
|
+
name: string;
|
|
991
|
+
descriptions: {
|
|
992
|
+
description: string;
|
|
993
|
+
subtitle: string;
|
|
994
|
+
}[];
|
|
995
|
+
plans: {
|
|
996
|
+
id: string;
|
|
997
|
+
metadata: Record<string, string>;
|
|
998
|
+
interval: string;
|
|
999
|
+
price: string;
|
|
1000
|
+
currency: string;
|
|
1001
|
+
subscriptionItemId: string;
|
|
1002
|
+
}[];
|
|
1003
|
+
metadata?: any;
|
|
1004
|
+
};
|
|
1005
|
+
type?: Type | undefined;
|
|
1006
|
+
startDate?: number | undefined;
|
|
1007
|
+
daysUntilDue?: number | undefined;
|
|
1008
|
+
renewAutomatically?: boolean | undefined;
|
|
1009
|
+
currentPeriodStart?: number | undefined;
|
|
1010
|
+
currentPeriodEnd?: number | undefined;
|
|
1011
|
+
paymentMethodId?: string | undefined;
|
|
1012
|
+
plan?: {
|
|
1013
|
+
id: string;
|
|
1014
|
+
metadata: Record<string, string>;
|
|
1015
|
+
interval: string;
|
|
1016
|
+
price: string;
|
|
1017
|
+
currency: string;
|
|
1018
|
+
subscriptionItemId: string;
|
|
1019
|
+
} | undefined;
|
|
1020
|
+
}, {
|
|
1021
|
+
id: string;
|
|
1022
|
+
status: string;
|
|
1023
|
+
product: {
|
|
1024
|
+
id: string;
|
|
1025
|
+
name: string;
|
|
1026
|
+
descriptions: {
|
|
1027
|
+
description: string;
|
|
1028
|
+
subtitle: string;
|
|
1029
|
+
}[];
|
|
1030
|
+
plans: {
|
|
1031
|
+
id: string;
|
|
1032
|
+
metadata: Record<string, string>;
|
|
1033
|
+
interval: string;
|
|
1034
|
+
price: string;
|
|
1035
|
+
currency: string;
|
|
1036
|
+
subscriptionItemId: string;
|
|
1037
|
+
}[];
|
|
1038
|
+
metadata?: any;
|
|
1039
|
+
};
|
|
1040
|
+
type?: Type | undefined;
|
|
1041
|
+
startDate?: number | undefined;
|
|
1042
|
+
daysUntilDue?: number | undefined;
|
|
1043
|
+
renewAutomatically?: boolean | undefined;
|
|
1044
|
+
currentPeriodStart?: number | undefined;
|
|
1045
|
+
currentPeriodEnd?: number | undefined;
|
|
1046
|
+
paymentMethodId?: string | undefined;
|
|
1047
|
+
plan?: {
|
|
1048
|
+
id: string;
|
|
1049
|
+
metadata: Record<string, string>;
|
|
1050
|
+
interval: string;
|
|
1051
|
+
price: string;
|
|
1052
|
+
currency: string;
|
|
1053
|
+
subscriptionItemId: string;
|
|
1054
|
+
} | undefined;
|
|
1055
|
+
}>>>;
|
|
1056
|
+
}, "strip", z.ZodTypeAny, {
|
|
1057
|
+
id: string;
|
|
1058
|
+
name: string;
|
|
1059
|
+
isActive: boolean;
|
|
1060
|
+
isSubscriptionActive: boolean;
|
|
1061
|
+
preferences: {
|
|
1062
|
+
iconUrl: string;
|
|
1063
|
+
logoUrl: string;
|
|
1064
|
+
primaryColor: string;
|
|
1065
|
+
secondaryColor: string;
|
|
1066
|
+
guidelinesUrl?: string | undefined;
|
|
1067
|
+
};
|
|
1068
|
+
inviteCode: string;
|
|
1069
|
+
totalUsersAllowed: number;
|
|
1070
|
+
chargeByEmail: boolean;
|
|
1071
|
+
currentUsersSize?: number | undefined;
|
|
1072
|
+
defaultProductId?: string | undefined;
|
|
1073
|
+
defaultPlanId?: string | undefined;
|
|
1074
|
+
defaultCoupomCode?: string | undefined;
|
|
1075
|
+
allowedProducts?: string[] | undefined;
|
|
1076
|
+
useOwnScripts?: boolean | undefined;
|
|
1077
|
+
subscription?: {
|
|
1078
|
+
id: string;
|
|
1079
|
+
status: string;
|
|
1080
|
+
product: {
|
|
1081
|
+
id: string;
|
|
1082
|
+
name: string;
|
|
1083
|
+
descriptions: {
|
|
1084
|
+
description: string;
|
|
1085
|
+
subtitle: string;
|
|
1086
|
+
}[];
|
|
1087
|
+
plans: {
|
|
1088
|
+
id: string;
|
|
1089
|
+
metadata: Record<string, string>;
|
|
1090
|
+
interval: string;
|
|
1091
|
+
price: string;
|
|
1092
|
+
currency: string;
|
|
1093
|
+
subscriptionItemId: string;
|
|
1094
|
+
}[];
|
|
1095
|
+
metadata?: any;
|
|
1096
|
+
};
|
|
1097
|
+
type?: Type | undefined;
|
|
1098
|
+
startDate?: number | undefined;
|
|
1099
|
+
daysUntilDue?: number | undefined;
|
|
1100
|
+
renewAutomatically?: boolean | undefined;
|
|
1101
|
+
currentPeriodStart?: number | undefined;
|
|
1102
|
+
currentPeriodEnd?: number | undefined;
|
|
1103
|
+
paymentMethodId?: string | undefined;
|
|
1104
|
+
plan?: {
|
|
1105
|
+
id: string;
|
|
1106
|
+
metadata: Record<string, string>;
|
|
1107
|
+
interval: string;
|
|
1108
|
+
price: string;
|
|
1109
|
+
currency: string;
|
|
1110
|
+
subscriptionItemId: string;
|
|
1111
|
+
} | undefined;
|
|
1112
|
+
} | undefined;
|
|
1113
|
+
}, {
|
|
1114
|
+
id: string;
|
|
1115
|
+
name: string;
|
|
1116
|
+
isActive: boolean;
|
|
1117
|
+
isSubscriptionActive: boolean;
|
|
1118
|
+
preferences: {
|
|
1119
|
+
iconUrl: string;
|
|
1120
|
+
logoUrl: string;
|
|
1121
|
+
primaryColor: string;
|
|
1122
|
+
secondaryColor: string;
|
|
1123
|
+
guidelinesUrl?: string | undefined;
|
|
1124
|
+
};
|
|
1125
|
+
inviteCode: string;
|
|
1126
|
+
totalUsersAllowed: number;
|
|
1127
|
+
chargeByEmail: boolean;
|
|
1128
|
+
currentUsersSize?: number | undefined;
|
|
1129
|
+
defaultProductId?: string | undefined;
|
|
1130
|
+
defaultPlanId?: string | undefined;
|
|
1131
|
+
defaultCoupomCode?: string | undefined;
|
|
1132
|
+
allowedProducts?: string[] | undefined;
|
|
1133
|
+
useOwnScripts?: boolean | undefined;
|
|
1134
|
+
subscription?: {
|
|
1135
|
+
id: string;
|
|
1136
|
+
status: string;
|
|
1137
|
+
product: {
|
|
1138
|
+
id: string;
|
|
1139
|
+
name: string;
|
|
1140
|
+
descriptions: {
|
|
1141
|
+
description: string;
|
|
1142
|
+
subtitle: string;
|
|
1143
|
+
}[];
|
|
1144
|
+
plans: {
|
|
1145
|
+
id: string;
|
|
1146
|
+
metadata: Record<string, string>;
|
|
1147
|
+
interval: string;
|
|
1148
|
+
price: string;
|
|
1149
|
+
currency: string;
|
|
1150
|
+
subscriptionItemId: string;
|
|
1151
|
+
}[];
|
|
1152
|
+
metadata?: any;
|
|
1153
|
+
};
|
|
1154
|
+
type?: Type | undefined;
|
|
1155
|
+
startDate?: number | undefined;
|
|
1156
|
+
daysUntilDue?: number | undefined;
|
|
1157
|
+
renewAutomatically?: boolean | undefined;
|
|
1158
|
+
currentPeriodStart?: number | undefined;
|
|
1159
|
+
currentPeriodEnd?: number | undefined;
|
|
1160
|
+
paymentMethodId?: string | undefined;
|
|
1161
|
+
plan?: {
|
|
1162
|
+
id: string;
|
|
1163
|
+
metadata: Record<string, string>;
|
|
1164
|
+
interval: string;
|
|
1165
|
+
price: string;
|
|
1166
|
+
currency: string;
|
|
1167
|
+
subscriptionItemId: string;
|
|
1168
|
+
} | undefined;
|
|
1169
|
+
} | undefined;
|
|
1170
|
+
}>;
|
|
1171
|
+
type Tenant = z.infer<typeof TenantSchema>;
|
|
1172
|
+
type Preferences = z.infer<typeof PreferencesSchema>;
|
|
1173
|
+
|
|
1174
|
+
interface IAPI$7 {
|
|
1175
|
+
getByInviteCode: (code: string, context?: Context) => Promise<Tenant | null>;
|
|
1176
|
+
create: (tenant: Tenant, context: Context) => Promise<boolean>;
|
|
1177
|
+
list: (context: Context) => Promise<Tenant[]>;
|
|
1178
|
+
getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
|
|
1179
|
+
update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
|
|
1180
|
+
}
|
|
1181
|
+
declare const Endpoints$6: {
|
|
1182
|
+
GetByInviteCode: {
|
|
1183
|
+
uri: string;
|
|
1184
|
+
method: string;
|
|
1185
|
+
};
|
|
1186
|
+
CreateTenant: {
|
|
1187
|
+
uri: string;
|
|
1188
|
+
method: string;
|
|
1189
|
+
};
|
|
1190
|
+
GetTenant: {
|
|
1191
|
+
uri: string;
|
|
1192
|
+
method: string;
|
|
1193
|
+
};
|
|
1194
|
+
GetTenantById: {
|
|
1195
|
+
uri: string;
|
|
1196
|
+
method: string;
|
|
1197
|
+
};
|
|
1198
|
+
UpdateTenant: {
|
|
1199
|
+
uri: string;
|
|
1200
|
+
method: string;
|
|
1201
|
+
};
|
|
1202
|
+
ListAll: {
|
|
1203
|
+
uri: string;
|
|
1204
|
+
method: string;
|
|
1205
|
+
};
|
|
1206
|
+
};
|
|
1207
|
+
|
|
1208
|
+
type index$8_Preferences = Preferences;
|
|
1209
|
+
declare const index$8_PreferencesSchema: typeof PreferencesSchema;
|
|
1210
|
+
declare const index$8_TenantSchema: typeof TenantSchema;
|
|
1211
|
+
declare namespace index$8 {
|
|
1212
|
+
export { Endpoints$6 as Endpoints, type Tenant as Entity, type IAPI$7 as IAPI, type index$8_Preferences as Preferences, index$8_PreferencesSchema as PreferencesSchema, index$8_TenantSchema as TenantSchema };
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
declare const TrackParamSchema: z.ZodObject<{
|
|
1216
|
+
name: z.ZodString;
|
|
1217
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
1218
|
+
}, "strip", z.ZodTypeAny, {
|
|
1219
|
+
value: string | number;
|
|
1220
|
+
name: string;
|
|
1221
|
+
}, {
|
|
1222
|
+
value: string | number;
|
|
1223
|
+
name: string;
|
|
1224
|
+
}>;
|
|
1225
|
+
declare const TrackSchema: z.ZodObject<{
|
|
1226
|
+
category: z.ZodString;
|
|
1227
|
+
label: z.ZodString;
|
|
1228
|
+
action: z.ZodString;
|
|
1229
|
+
params: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1230
|
+
name: z.ZodString;
|
|
1231
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
1232
|
+
}, "strip", z.ZodTypeAny, {
|
|
1233
|
+
value: string | number;
|
|
1234
|
+
name: string;
|
|
1235
|
+
}, {
|
|
1236
|
+
value: string | number;
|
|
1237
|
+
name: string;
|
|
1238
|
+
}>, "many">>;
|
|
1239
|
+
}, "strip", z.ZodTypeAny, {
|
|
1240
|
+
label: string;
|
|
1241
|
+
category: string;
|
|
1242
|
+
action: string;
|
|
1243
|
+
params?: {
|
|
1244
|
+
value: string | number;
|
|
1245
|
+
name: string;
|
|
1246
|
+
}[] | undefined;
|
|
1247
|
+
}, {
|
|
1248
|
+
label: string;
|
|
1249
|
+
category: string;
|
|
1250
|
+
action: string;
|
|
1251
|
+
params?: {
|
|
1252
|
+
value: string | number;
|
|
1253
|
+
name: string;
|
|
1254
|
+
}[] | undefined;
|
|
1255
|
+
}>;
|
|
1256
|
+
type Track = z.infer<typeof TrackSchema>;
|
|
1257
|
+
type TrackParam = z.infer<typeof TrackParamSchema>;
|
|
1258
|
+
|
|
1259
|
+
interface IAPI$6 {
|
|
1260
|
+
send: (t: Track) => Promise<boolean>;
|
|
1261
|
+
}
|
|
1262
|
+
declare const Endpoints$5: {
|
|
1263
|
+
Track: {
|
|
1264
|
+
uri: string;
|
|
1265
|
+
method: string;
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
|
+
type index$7_TrackParam = TrackParam;
|
|
1270
|
+
declare const index$7_TrackParamSchema: typeof TrackParamSchema;
|
|
1271
|
+
declare const index$7_TrackSchema: typeof TrackSchema;
|
|
1272
|
+
declare namespace index$7 {
|
|
1273
|
+
export { Endpoints$5 as Endpoints, type Track as Entity, type IAPI$6 as IAPI, type index$7_TrackParam as TrackParam, index$7_TrackParamSchema as TrackParamSchema, index$7_TrackSchema as TrackSchema };
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
declare const EmailSchema: z.ZodObject<{
|
|
1277
|
+
to: z.ZodOptional<z.ZodString>;
|
|
1278
|
+
subject: z.ZodString;
|
|
1279
|
+
body: z.ZodString;
|
|
1280
|
+
}, "strip", z.ZodTypeAny, {
|
|
1281
|
+
body: string;
|
|
1282
|
+
subject: string;
|
|
1283
|
+
to?: string | undefined;
|
|
1284
|
+
}, {
|
|
1285
|
+
body: string;
|
|
1286
|
+
subject: string;
|
|
1287
|
+
to?: string | undefined;
|
|
1288
|
+
}>;
|
|
1289
|
+
type Email = z.infer<typeof EmailSchema>;
|
|
1290
|
+
|
|
1291
|
+
interface IAPI$5 {
|
|
1292
|
+
send: (email: Email, ctx?: Context) => Promise<boolean>;
|
|
1293
|
+
}
|
|
1294
|
+
declare const Endpoints$4: {
|
|
1295
|
+
SendEmail: {
|
|
1296
|
+
uri: string;
|
|
1297
|
+
method: string;
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
declare const index$6_EmailSchema: typeof EmailSchema;
|
|
1302
|
+
declare namespace index$6 {
|
|
1303
|
+
export { index$6_EmailSchema as EmailSchema, Endpoints$4 as Endpoints, type Email as Entity, type IAPI$5 as IAPI };
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
declare enum Status$1 {
|
|
1307
|
+
SUBMITTED = 0,
|
|
1308
|
+
EDITING = 1,
|
|
1309
|
+
COMPLETED = 2,
|
|
1310
|
+
WAITING_APPROVE = 3,
|
|
1311
|
+
DENIED = 4,
|
|
1312
|
+
REVISIONING = 5,
|
|
1313
|
+
CANCELLED = 6,
|
|
1314
|
+
SCHEDULED = 7
|
|
1315
|
+
}
|
|
1316
|
+
declare enum CaptionStyle {
|
|
1317
|
+
ONE_LINE = 1,
|
|
1318
|
+
ONE_LINE_EMOJIS = 2,
|
|
1319
|
+
TWO_LINES = 5,
|
|
1320
|
+
TWO_LINES_EMOJIS = 3,
|
|
1321
|
+
HOME_HIGHLIGHT = 4
|
|
1322
|
+
}
|
|
1323
|
+
declare const Styles: Style[];
|
|
1324
|
+
type Style = {
|
|
1325
|
+
value: CaptionStyle;
|
|
1326
|
+
label: string;
|
|
1327
|
+
};
|
|
1328
|
+
declare const TimelineItemSchema: z.ZodObject<{
|
|
1329
|
+
status: z.ZodNativeEnum<typeof Status$1>;
|
|
1330
|
+
title: z.ZodString;
|
|
1331
|
+
description: z.ZodString;
|
|
1332
|
+
timestamp: z.ZodNumber;
|
|
1333
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1334
|
+
}, "strip", z.ZodTypeAny, {
|
|
1335
|
+
title: string;
|
|
1336
|
+
status: Status$1;
|
|
1337
|
+
metadata: Record<string, any>;
|
|
1338
|
+
description: string;
|
|
1339
|
+
timestamp: number;
|
|
1340
|
+
}, {
|
|
1341
|
+
title: string;
|
|
1342
|
+
status: Status$1;
|
|
1343
|
+
metadata: Record<string, any>;
|
|
1344
|
+
description: string;
|
|
1345
|
+
timestamp: number;
|
|
1346
|
+
}>;
|
|
1347
|
+
declare const ProjectSchema: z.ZodObject<{
|
|
1348
|
+
id: z.ZodString;
|
|
1349
|
+
title: z.ZodString;
|
|
1350
|
+
instructions: z.ZodString;
|
|
1351
|
+
submitMonth: z.ZodString;
|
|
1352
|
+
captionStyle: z.ZodNativeEnum<typeof CaptionStyle>;
|
|
1353
|
+
finalVideoId: z.ZodOptional<z.ZodString>;
|
|
1354
|
+
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
1355
|
+
modified: z.ZodNumber;
|
|
1356
|
+
captionSuggestion: z.ZodOptional<z.ZodString>;
|
|
1357
|
+
editorId: z.ZodString;
|
|
1358
|
+
userId: z.ZodString;
|
|
1359
|
+
assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1360
|
+
assetId: z.ZodString;
|
|
1361
|
+
fileName: z.ZodString;
|
|
1362
|
+
extension: z.ZodString;
|
|
1363
|
+
fileSize: z.ZodNumber;
|
|
1364
|
+
assetUrl: z.ZodString;
|
|
1365
|
+
thumbnailUrl: z.ZodString;
|
|
1366
|
+
type: z.ZodString;
|
|
1367
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1368
|
+
progress: z.ZodOptional<z.ZodNumber>;
|
|
1369
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1370
|
+
authorId: z.ZodString;
|
|
1371
|
+
uploadedAt: z.ZodNumber;
|
|
1372
|
+
}, "strip", z.ZodTypeAny, {
|
|
1373
|
+
type: string;
|
|
1374
|
+
assetId: string;
|
|
1375
|
+
fileName: string;
|
|
1376
|
+
extension: string;
|
|
1377
|
+
fileSize: number;
|
|
1378
|
+
assetUrl: string;
|
|
1379
|
+
thumbnailUrl: string;
|
|
1380
|
+
authorId: string;
|
|
1381
|
+
uploadedAt: number;
|
|
1382
|
+
error?: string | undefined;
|
|
1383
|
+
duration?: number | undefined;
|
|
1384
|
+
progress?: number | undefined;
|
|
1385
|
+
}, {
|
|
1386
|
+
type: string;
|
|
1387
|
+
assetId: string;
|
|
1388
|
+
fileName: string;
|
|
1389
|
+
extension: string;
|
|
1390
|
+
fileSize: number;
|
|
1391
|
+
assetUrl: string;
|
|
1392
|
+
thumbnailUrl: string;
|
|
1393
|
+
authorId: string;
|
|
1394
|
+
uploadedAt: number;
|
|
1395
|
+
error?: string | undefined;
|
|
1396
|
+
duration?: number | undefined;
|
|
1397
|
+
progress?: number | undefined;
|
|
1398
|
+
}>, "many">>;
|
|
1399
|
+
expirationTimestamp: z.ZodNumber;
|
|
1400
|
+
isFree: z.ZodOptional<z.ZodBoolean>;
|
|
1401
|
+
timeline: z.ZodArray<z.ZodObject<{
|
|
1402
|
+
status: z.ZodNativeEnum<typeof Status$1>;
|
|
1403
|
+
title: z.ZodString;
|
|
1404
|
+
description: z.ZodString;
|
|
1405
|
+
timestamp: z.ZodNumber;
|
|
1406
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1407
|
+
}, "strip", z.ZodTypeAny, {
|
|
1408
|
+
title: string;
|
|
1409
|
+
status: Status$1;
|
|
1410
|
+
metadata: Record<string, any>;
|
|
1411
|
+
description: string;
|
|
1412
|
+
timestamp: number;
|
|
1413
|
+
}, {
|
|
1414
|
+
title: string;
|
|
1415
|
+
status: Status$1;
|
|
1416
|
+
metadata: Record<string, any>;
|
|
1417
|
+
description: string;
|
|
1418
|
+
timestamp: number;
|
|
1419
|
+
}>, "many">;
|
|
1420
|
+
submitTimestamp: z.ZodNumber;
|
|
1421
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
1422
|
+
status: z.ZodNativeEnum<typeof Status$1>;
|
|
1423
|
+
}, "strip", z.ZodTypeAny, {
|
|
1424
|
+
id: string;
|
|
1425
|
+
userId: string;
|
|
1426
|
+
title: string;
|
|
1427
|
+
status: Status$1;
|
|
1428
|
+
modified: number;
|
|
1429
|
+
editorId: string;
|
|
1430
|
+
instructions: string;
|
|
1431
|
+
submitMonth: string;
|
|
1432
|
+
captionStyle: CaptionStyle;
|
|
1433
|
+
expirationTimestamp: number;
|
|
1434
|
+
timeline: {
|
|
1435
|
+
title: string;
|
|
1436
|
+
status: Status$1;
|
|
1437
|
+
metadata: Record<string, any>;
|
|
1438
|
+
description: string;
|
|
1439
|
+
timestamp: number;
|
|
1440
|
+
}[];
|
|
1441
|
+
submitTimestamp: number;
|
|
1442
|
+
tenantId?: string | undefined;
|
|
1443
|
+
thumbnailUrl?: string | undefined;
|
|
1444
|
+
finalVideoId?: string | undefined;
|
|
1445
|
+
captionSuggestion?: string | undefined;
|
|
1446
|
+
assets?: {
|
|
1447
|
+
type: string;
|
|
1448
|
+
assetId: string;
|
|
1449
|
+
fileName: string;
|
|
1450
|
+
extension: string;
|
|
1451
|
+
fileSize: number;
|
|
1452
|
+
assetUrl: string;
|
|
1453
|
+
thumbnailUrl: string;
|
|
1454
|
+
authorId: string;
|
|
1455
|
+
uploadedAt: number;
|
|
1456
|
+
error?: string | undefined;
|
|
1457
|
+
duration?: number | undefined;
|
|
1458
|
+
progress?: number | undefined;
|
|
1459
|
+
}[] | undefined;
|
|
1460
|
+
isFree?: boolean | undefined;
|
|
1461
|
+
}, {
|
|
1462
|
+
id: string;
|
|
1463
|
+
userId: string;
|
|
1464
|
+
title: string;
|
|
1465
|
+
status: Status$1;
|
|
1466
|
+
modified: number;
|
|
1467
|
+
editorId: string;
|
|
1468
|
+
instructions: string;
|
|
1469
|
+
submitMonth: string;
|
|
1470
|
+
captionStyle: CaptionStyle;
|
|
1471
|
+
expirationTimestamp: number;
|
|
1472
|
+
timeline: {
|
|
1473
|
+
title: string;
|
|
1474
|
+
status: Status$1;
|
|
1475
|
+
metadata: Record<string, any>;
|
|
1476
|
+
description: string;
|
|
1477
|
+
timestamp: number;
|
|
1478
|
+
}[];
|
|
1479
|
+
submitTimestamp: number;
|
|
1480
|
+
tenantId?: string | undefined;
|
|
1481
|
+
thumbnailUrl?: string | undefined;
|
|
1482
|
+
finalVideoId?: string | undefined;
|
|
1483
|
+
captionSuggestion?: string | undefined;
|
|
1484
|
+
assets?: {
|
|
1485
|
+
type: string;
|
|
1486
|
+
assetId: string;
|
|
1487
|
+
fileName: string;
|
|
1488
|
+
extension: string;
|
|
1489
|
+
fileSize: number;
|
|
1490
|
+
assetUrl: string;
|
|
1491
|
+
thumbnailUrl: string;
|
|
1492
|
+
authorId: string;
|
|
1493
|
+
uploadedAt: number;
|
|
1494
|
+
error?: string | undefined;
|
|
1495
|
+
duration?: number | undefined;
|
|
1496
|
+
progress?: number | undefined;
|
|
1497
|
+
}[] | undefined;
|
|
1498
|
+
isFree?: boolean | undefined;
|
|
1499
|
+
}>;
|
|
1500
|
+
type ProjectCreation = Pick<Project, "title" | "instructions" | "captionStyle" | "assets">;
|
|
1501
|
+
type SendToApproval = {
|
|
1502
|
+
video: string;
|
|
1503
|
+
thumbnail: string;
|
|
1504
|
+
captionSuggestion: string;
|
|
1505
|
+
};
|
|
1506
|
+
type Approve = {
|
|
1507
|
+
scheduleTime?: number;
|
|
1508
|
+
captionSuggestion: string;
|
|
1509
|
+
};
|
|
1510
|
+
type Project = z.infer<typeof ProjectSchema>;
|
|
1511
|
+
type TimelineItem = z.infer<typeof TimelineItemSchema>;
|
|
1512
|
+
|
|
1513
|
+
interface IAPI$4 {
|
|
1514
|
+
find: (context: Context, projectId: string) => Promise<Project>;
|
|
1515
|
+
create: (context: Context, data: ProjectCreation) => Promise<Project>;
|
|
1516
|
+
review: (context: Context, projectId: string, revision: string) => Promise<boolean>;
|
|
1517
|
+
cancel: (context: Context, projectId: string) => Promise<boolean>;
|
|
1518
|
+
list: (context: Context, query: QueryOptions<Project>) => Promise<Project[]>;
|
|
1519
|
+
start: (context: Context, projectId: string) => Promise<boolean>;
|
|
1520
|
+
sendToApproval: (context: Context, projectId: string, data: SendToApproval) => Promise<boolean>;
|
|
1521
|
+
approve: (context: Context, projectId: string, data: Approve) => Promise<boolean>;
|
|
1522
|
+
deny: (context: Context, projectId: string, denyFeedback: string, categories?: string[]) => Promise<boolean>;
|
|
1523
|
+
unschedule: (context: Context, projectId: string) => Promise<boolean>;
|
|
1524
|
+
rollback: (context: Context, projectId: string) => Promise<boolean>;
|
|
1525
|
+
getNext: (context: Context, userId: string) => Promise<Project | null>;
|
|
1526
|
+
getUserHistory: (context: Context, userId: string) => Promise<APIResponse<Project>>;
|
|
1527
|
+
permissions: {
|
|
1528
|
+
isEligibleForFreeProject(context: Context): Promise<boolean>;
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1531
|
+
declare const Endpoints$3: {
|
|
1532
|
+
List: {
|
|
1533
|
+
uri: string;
|
|
1534
|
+
method: string;
|
|
1535
|
+
};
|
|
1536
|
+
GetNext: {
|
|
1537
|
+
uri: string;
|
|
1538
|
+
method: string;
|
|
1539
|
+
};
|
|
1540
|
+
CreateProject: {
|
|
1541
|
+
uri: string;
|
|
1542
|
+
method: string;
|
|
1543
|
+
};
|
|
1544
|
+
FindOne: {
|
|
1545
|
+
uri: string;
|
|
1546
|
+
method: string;
|
|
1547
|
+
};
|
|
1548
|
+
GetGoals: {
|
|
1549
|
+
uri: string;
|
|
1550
|
+
method: string;
|
|
1551
|
+
};
|
|
1552
|
+
Review: {
|
|
1553
|
+
uri: string;
|
|
1554
|
+
method: string;
|
|
1555
|
+
};
|
|
1556
|
+
Cancel: {
|
|
1557
|
+
uri: string;
|
|
1558
|
+
method: string;
|
|
1559
|
+
};
|
|
1560
|
+
StartEdition: {
|
|
1561
|
+
uri: string;
|
|
1562
|
+
method: string;
|
|
1563
|
+
};
|
|
1564
|
+
SendToApproval: {
|
|
1565
|
+
uri: string;
|
|
1566
|
+
method: string;
|
|
1567
|
+
};
|
|
1568
|
+
IsEligibleForFreeProject: {
|
|
1569
|
+
uri: string;
|
|
1570
|
+
method: string;
|
|
1571
|
+
};
|
|
1572
|
+
Approve: {
|
|
1573
|
+
uri: string;
|
|
1574
|
+
method: string;
|
|
1575
|
+
};
|
|
1576
|
+
Unschedule: {
|
|
1577
|
+
uri: string;
|
|
1578
|
+
method: string;
|
|
1579
|
+
};
|
|
1580
|
+
Rollback: {
|
|
1581
|
+
uri: string;
|
|
1582
|
+
method: string;
|
|
1583
|
+
};
|
|
1584
|
+
Deny: {
|
|
1585
|
+
uri: string;
|
|
1586
|
+
method: string;
|
|
1587
|
+
};
|
|
1588
|
+
GetUserHistory: {
|
|
1589
|
+
uri: string;
|
|
1590
|
+
method: string;
|
|
1591
|
+
};
|
|
1592
|
+
};
|
|
1593
|
+
|
|
1594
|
+
type index$5_Approve = Approve;
|
|
1595
|
+
type index$5_CaptionStyle = CaptionStyle;
|
|
1596
|
+
declare const index$5_CaptionStyle: typeof CaptionStyle;
|
|
1597
|
+
type index$5_ProjectCreation = ProjectCreation;
|
|
1598
|
+
declare const index$5_ProjectSchema: typeof ProjectSchema;
|
|
1599
|
+
type index$5_SendToApproval = SendToApproval;
|
|
1600
|
+
type index$5_Style = Style;
|
|
1601
|
+
declare const index$5_Styles: typeof Styles;
|
|
1602
|
+
type index$5_TimelineItem = TimelineItem;
|
|
1603
|
+
declare const index$5_TimelineItemSchema: typeof TimelineItemSchema;
|
|
1604
|
+
declare namespace index$5 {
|
|
1605
|
+
export { type index$5_Approve as Approve, index$5_CaptionStyle as CaptionStyle, Endpoints$3 as Endpoints, type Project as Entity, type IAPI$4 as IAPI, type index$5_ProjectCreation as ProjectCreation, index$5_ProjectSchema as ProjectSchema, type index$5_SendToApproval as SendToApproval, Status$1 as Status, type index$5_Style as Style, index$5_Styles as Styles, type index$5_TimelineItem as TimelineItem, index$5_TimelineItemSchema as TimelineItemSchema };
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
declare const DailyMilestoneSchema: z.ZodObject<{
|
|
1609
|
+
id: z.ZodString;
|
|
1610
|
+
date: z.ZodString;
|
|
1611
|
+
target: z.ZodNumber;
|
|
1612
|
+
progress: z.ZodNumber;
|
|
1613
|
+
}, "strip", z.ZodTypeAny, {
|
|
1614
|
+
id: string;
|
|
1615
|
+
date: string;
|
|
1616
|
+
progress: number;
|
|
1617
|
+
target: number;
|
|
1618
|
+
}, {
|
|
1619
|
+
id: string;
|
|
1620
|
+
date: string;
|
|
1621
|
+
progress: number;
|
|
1622
|
+
target: number;
|
|
1623
|
+
}>;
|
|
1624
|
+
declare const WeeklyMilestoneSchema: z.ZodObject<{
|
|
1625
|
+
id: z.ZodString;
|
|
1626
|
+
week: z.ZodString;
|
|
1627
|
+
target: z.ZodNumber;
|
|
1628
|
+
progress: z.ZodNumber;
|
|
1629
|
+
dailyMilestones: z.ZodArray<z.ZodObject<{
|
|
1630
|
+
id: z.ZodString;
|
|
1631
|
+
date: z.ZodString;
|
|
1632
|
+
target: z.ZodNumber;
|
|
1633
|
+
progress: z.ZodNumber;
|
|
1634
|
+
}, "strip", z.ZodTypeAny, {
|
|
1635
|
+
id: string;
|
|
1636
|
+
date: string;
|
|
1637
|
+
progress: number;
|
|
1638
|
+
target: number;
|
|
1639
|
+
}, {
|
|
1640
|
+
id: string;
|
|
1641
|
+
date: string;
|
|
1642
|
+
progress: number;
|
|
1643
|
+
target: number;
|
|
1644
|
+
}>, "many">;
|
|
1645
|
+
}, "strip", z.ZodTypeAny, {
|
|
1646
|
+
id: string;
|
|
1647
|
+
progress: number;
|
|
1648
|
+
target: number;
|
|
1649
|
+
week: string;
|
|
1650
|
+
dailyMilestones: {
|
|
1651
|
+
id: string;
|
|
1652
|
+
date: string;
|
|
1653
|
+
progress: number;
|
|
1654
|
+
target: number;
|
|
1655
|
+
}[];
|
|
1656
|
+
}, {
|
|
1657
|
+
id: string;
|
|
1658
|
+
progress: number;
|
|
1659
|
+
target: number;
|
|
1660
|
+
week: string;
|
|
1661
|
+
dailyMilestones: {
|
|
1662
|
+
id: string;
|
|
1663
|
+
date: string;
|
|
1664
|
+
progress: number;
|
|
1665
|
+
target: number;
|
|
1666
|
+
}[];
|
|
1667
|
+
}>;
|
|
1668
|
+
declare const GoalSchema: z.ZodObject<{
|
|
1669
|
+
id: z.ZodString;
|
|
1670
|
+
editorId: z.ZodString;
|
|
1671
|
+
month: z.ZodString;
|
|
1672
|
+
target: z.ZodNumber;
|
|
1673
|
+
progress: z.ZodNumber;
|
|
1674
|
+
createdAt: z.ZodNumber;
|
|
1675
|
+
weeklyMilestones: z.ZodArray<z.ZodObject<{
|
|
1676
|
+
id: z.ZodString;
|
|
1677
|
+
week: z.ZodString;
|
|
1678
|
+
target: z.ZodNumber;
|
|
1679
|
+
progress: z.ZodNumber;
|
|
1680
|
+
dailyMilestones: z.ZodArray<z.ZodObject<{
|
|
1681
|
+
id: z.ZodString;
|
|
1682
|
+
date: z.ZodString;
|
|
1683
|
+
target: z.ZodNumber;
|
|
1684
|
+
progress: z.ZodNumber;
|
|
1685
|
+
}, "strip", z.ZodTypeAny, {
|
|
1686
|
+
id: string;
|
|
1687
|
+
date: string;
|
|
1688
|
+
progress: number;
|
|
1689
|
+
target: number;
|
|
1690
|
+
}, {
|
|
1691
|
+
id: string;
|
|
1692
|
+
date: string;
|
|
1693
|
+
progress: number;
|
|
1694
|
+
target: number;
|
|
1695
|
+
}>, "many">;
|
|
1696
|
+
}, "strip", z.ZodTypeAny, {
|
|
1697
|
+
id: string;
|
|
1698
|
+
progress: number;
|
|
1699
|
+
target: number;
|
|
1700
|
+
week: string;
|
|
1701
|
+
dailyMilestones: {
|
|
1702
|
+
id: string;
|
|
1703
|
+
date: string;
|
|
1704
|
+
progress: number;
|
|
1705
|
+
target: number;
|
|
1706
|
+
}[];
|
|
1707
|
+
}, {
|
|
1708
|
+
id: string;
|
|
1709
|
+
progress: number;
|
|
1710
|
+
target: number;
|
|
1711
|
+
week: string;
|
|
1712
|
+
dailyMilestones: {
|
|
1713
|
+
id: string;
|
|
1714
|
+
date: string;
|
|
1715
|
+
progress: number;
|
|
1716
|
+
target: number;
|
|
1717
|
+
}[];
|
|
1718
|
+
}>, "many">;
|
|
1719
|
+
}, "strip", z.ZodTypeAny, {
|
|
1720
|
+
id: string;
|
|
1721
|
+
createdAt: number;
|
|
1722
|
+
editorId: string;
|
|
1723
|
+
progress: number;
|
|
1724
|
+
target: number;
|
|
1725
|
+
month: string;
|
|
1726
|
+
weeklyMilestones: {
|
|
1727
|
+
id: string;
|
|
1728
|
+
progress: number;
|
|
1729
|
+
target: number;
|
|
1730
|
+
week: string;
|
|
1731
|
+
dailyMilestones: {
|
|
1732
|
+
id: string;
|
|
1733
|
+
date: string;
|
|
1734
|
+
progress: number;
|
|
1735
|
+
target: number;
|
|
1736
|
+
}[];
|
|
1737
|
+
}[];
|
|
1738
|
+
}, {
|
|
1739
|
+
id: string;
|
|
1740
|
+
createdAt: number;
|
|
1741
|
+
editorId: string;
|
|
1742
|
+
progress: number;
|
|
1743
|
+
target: number;
|
|
1744
|
+
month: string;
|
|
1745
|
+
weeklyMilestones: {
|
|
1746
|
+
id: string;
|
|
1747
|
+
progress: number;
|
|
1748
|
+
target: number;
|
|
1749
|
+
week: string;
|
|
1750
|
+
dailyMilestones: {
|
|
1751
|
+
id: string;
|
|
1752
|
+
date: string;
|
|
1753
|
+
progress: number;
|
|
1754
|
+
target: number;
|
|
1755
|
+
}[];
|
|
1756
|
+
}[];
|
|
1757
|
+
}>;
|
|
1758
|
+
type DailyMilestone = z.infer<typeof DailyMilestoneSchema>;
|
|
1759
|
+
type WeeklyMilestone = z.infer<typeof WeeklyMilestoneSchema>;
|
|
1760
|
+
type Goal = z.infer<typeof GoalSchema>;
|
|
1761
|
+
|
|
1762
|
+
interface IAPI$3 {
|
|
1763
|
+
getGoals: (context: Context) => Promise<Goal[]>;
|
|
1764
|
+
}
|
|
1765
|
+
declare const Endpoints$2: {
|
|
1766
|
+
GetGoals: {
|
|
1767
|
+
uri: string;
|
|
1768
|
+
method: string;
|
|
1769
|
+
};
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
type index$4_DailyMilestone = DailyMilestone;
|
|
1773
|
+
declare const index$4_DailyMilestoneSchema: typeof DailyMilestoneSchema;
|
|
1774
|
+
declare const index$4_GoalSchema: typeof GoalSchema;
|
|
1775
|
+
type index$4_WeeklyMilestone = WeeklyMilestone;
|
|
1776
|
+
declare const index$4_WeeklyMilestoneSchema: typeof WeeklyMilestoneSchema;
|
|
1777
|
+
declare namespace index$4 {
|
|
1778
|
+
export { type index$4_DailyMilestone as DailyMilestone, index$4_DailyMilestoneSchema as DailyMilestoneSchema, Endpoints$2 as Endpoints, type Goal as Entity, index$4_GoalSchema as GoalSchema, type IAPI$3 as IAPI, type index$4_WeeklyMilestone as WeeklyMilestone, index$4_WeeklyMilestoneSchema as WeeklyMilestoneSchema };
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
declare enum Frequency {
|
|
1782
|
+
DAILY = "daily",
|
|
1783
|
+
WEEKLY = "weekly",
|
|
1784
|
+
MONTHLY = "monthly"
|
|
1785
|
+
}
|
|
1786
|
+
declare enum WeekDay {
|
|
1787
|
+
MONDAY = 1,
|
|
1788
|
+
TUESDAY = 2,
|
|
1789
|
+
WEDNESDAY = 3,
|
|
1790
|
+
THURSDAY = 4,
|
|
1791
|
+
FRIDAY = 5,
|
|
1792
|
+
SATURDAY = 6,
|
|
1793
|
+
SUNDAY = 7
|
|
1794
|
+
}
|
|
1795
|
+
declare enum CriteriaType {
|
|
1796
|
+
AllUsers = "allUsers",
|
|
1797
|
+
NoProjects = "noProjects",
|
|
1798
|
+
NoSubscription = "noSubscription",
|
|
1799
|
+
UsersFromTier = "usersFromTier"
|
|
1800
|
+
}
|
|
1801
|
+
declare enum TransportType {
|
|
1802
|
+
Push = "push",
|
|
1803
|
+
Email = "email"
|
|
1804
|
+
}
|
|
1805
|
+
declare enum Status {
|
|
1806
|
+
SCHEDULED = "scheduled",
|
|
1807
|
+
RUNNING = "running",
|
|
1808
|
+
COMPLETED = "completed",
|
|
1809
|
+
FAILED = "failed",
|
|
1810
|
+
PAUSED = "paused",
|
|
1811
|
+
CANCELLED = "cancelled",
|
|
1812
|
+
ACTIVE = "active",
|
|
1813
|
+
EXPIRED = "expired"
|
|
1814
|
+
}
|
|
1815
|
+
declare const NotificationItemSchema: z.ZodObject<{
|
|
1816
|
+
id: z.ZodString;
|
|
1817
|
+
userId: z.ZodString;
|
|
1818
|
+
triggerId: z.ZodOptional<z.ZodString>;
|
|
1819
|
+
title: z.ZodString;
|
|
1820
|
+
body: z.ZodString;
|
|
1821
|
+
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
1822
|
+
deliveredAt: z.ZodNumber;
|
|
1823
|
+
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
1824
|
+
deletedAt: z.ZodOptional<z.ZodNumber>;
|
|
1825
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
1826
|
+
label: z.ZodString;
|
|
1827
|
+
url: z.ZodString;
|
|
1828
|
+
}, "strip", z.ZodTypeAny, {
|
|
1829
|
+
label: string;
|
|
1830
|
+
url: string;
|
|
1831
|
+
}, {
|
|
1832
|
+
label: string;
|
|
1833
|
+
url: string;
|
|
1834
|
+
}>>;
|
|
1835
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1836
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1837
|
+
}, "strip", z.ZodTypeAny, {
|
|
1838
|
+
id: string;
|
|
1839
|
+
userId: string;
|
|
1840
|
+
title: string;
|
|
1841
|
+
body: string;
|
|
1842
|
+
status: "failed" | "delivered" | "deleted";
|
|
1843
|
+
deliveredAt: number;
|
|
1844
|
+
metadata: Record<string, string | number>;
|
|
1845
|
+
triggerId?: string | undefined;
|
|
1846
|
+
openedAt?: number | undefined;
|
|
1847
|
+
deletedAt?: number | undefined;
|
|
1848
|
+
cta?: {
|
|
1849
|
+
label: string;
|
|
1850
|
+
url: string;
|
|
1851
|
+
} | undefined;
|
|
1852
|
+
error?: string | undefined;
|
|
1853
|
+
}, {
|
|
1854
|
+
id: string;
|
|
1855
|
+
userId: string;
|
|
1856
|
+
title: string;
|
|
1857
|
+
body: string;
|
|
1858
|
+
status: "failed" | "delivered" | "deleted";
|
|
1859
|
+
deliveredAt: number;
|
|
1860
|
+
metadata: Record<string, string | number>;
|
|
1861
|
+
triggerId?: string | undefined;
|
|
1862
|
+
openedAt?: number | undefined;
|
|
1863
|
+
deletedAt?: number | undefined;
|
|
1864
|
+
cta?: {
|
|
1865
|
+
label: string;
|
|
1866
|
+
url: string;
|
|
1867
|
+
} | undefined;
|
|
1868
|
+
error?: string | undefined;
|
|
1869
|
+
}>;
|
|
1870
|
+
declare const NotificationDetailSchema: z.ZodObject<Pick<{
|
|
1871
|
+
id: z.ZodString;
|
|
1872
|
+
userId: z.ZodString;
|
|
1873
|
+
triggerId: z.ZodOptional<z.ZodString>;
|
|
1874
|
+
title: z.ZodString;
|
|
1875
|
+
body: z.ZodString;
|
|
1876
|
+
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
1877
|
+
deliveredAt: z.ZodNumber;
|
|
1878
|
+
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
1879
|
+
deletedAt: z.ZodOptional<z.ZodNumber>;
|
|
1880
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
1881
|
+
label: z.ZodString;
|
|
1882
|
+
url: z.ZodString;
|
|
1883
|
+
}, "strip", z.ZodTypeAny, {
|
|
1884
|
+
label: string;
|
|
1885
|
+
url: string;
|
|
1886
|
+
}, {
|
|
1887
|
+
label: string;
|
|
1888
|
+
url: string;
|
|
1889
|
+
}>>;
|
|
1890
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
1891
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1892
|
+
}, "userId" | "title" | "body" | "metadata">, "strip", z.ZodTypeAny, {
|
|
1893
|
+
userId: string;
|
|
1894
|
+
title: string;
|
|
1895
|
+
body: string;
|
|
1896
|
+
metadata: Record<string, string | number>;
|
|
1897
|
+
}, {
|
|
1898
|
+
userId: string;
|
|
1899
|
+
title: string;
|
|
1900
|
+
body: string;
|
|
1901
|
+
metadata: Record<string, string | number>;
|
|
1902
|
+
}>;
|
|
1903
|
+
declare const CriteriaSchema: z.ZodObject<{
|
|
1904
|
+
type: z.ZodNativeEnum<typeof CriteriaType>;
|
|
1905
|
+
params: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1906
|
+
}, "strip", z.ZodTypeAny, {
|
|
1907
|
+
params: Record<string, any>;
|
|
1908
|
+
type: CriteriaType;
|
|
1909
|
+
}, {
|
|
1910
|
+
params: Record<string, any>;
|
|
1911
|
+
type: CriteriaType;
|
|
1912
|
+
}>;
|
|
1913
|
+
declare const HistorySchema: z.ZodObject<{
|
|
1914
|
+
batchId: z.ZodString;
|
|
1915
|
+
executedAt: z.ZodNumber;
|
|
1916
|
+
timezone: z.ZodString;
|
|
1917
|
+
status: z.ZodEnum<["success", "failed", "info", "warn"]>;
|
|
1918
|
+
users: z.ZodObject<{
|
|
1919
|
+
total: z.ZodNumber;
|
|
1920
|
+
success: z.ZodNumber;
|
|
1921
|
+
error: z.ZodNumber;
|
|
1922
|
+
}, "strip", z.ZodTypeAny, {
|
|
1923
|
+
error: number;
|
|
1924
|
+
success: number;
|
|
1925
|
+
total: number;
|
|
1926
|
+
}, {
|
|
1927
|
+
error: number;
|
|
1928
|
+
success: number;
|
|
1929
|
+
total: number;
|
|
1930
|
+
}>;
|
|
1931
|
+
errorList: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1932
|
+
token: z.ZodString;
|
|
1933
|
+
error: z.ZodString;
|
|
1934
|
+
}, "strip", z.ZodTypeAny, {
|
|
1935
|
+
token: string;
|
|
1936
|
+
error: string;
|
|
1937
|
+
}, {
|
|
1938
|
+
token: string;
|
|
1939
|
+
error: string;
|
|
1940
|
+
}>, "many">>;
|
|
1941
|
+
executionTimeDuration: z.ZodOptional<z.ZodNumber>;
|
|
1942
|
+
}, "strip", z.ZodTypeAny, {
|
|
1943
|
+
status: "failed" | "success" | "info" | "warn";
|
|
1944
|
+
batchId: string;
|
|
1945
|
+
executedAt: number;
|
|
1946
|
+
timezone: string;
|
|
1947
|
+
users: {
|
|
1948
|
+
error: number;
|
|
1949
|
+
success: number;
|
|
1950
|
+
total: number;
|
|
1951
|
+
};
|
|
1952
|
+
errorList?: {
|
|
1953
|
+
token: string;
|
|
1954
|
+
error: string;
|
|
1955
|
+
}[] | undefined;
|
|
1956
|
+
executionTimeDuration?: number | undefined;
|
|
1957
|
+
}, {
|
|
1958
|
+
status: "failed" | "success" | "info" | "warn";
|
|
1959
|
+
batchId: string;
|
|
1960
|
+
executedAt: number;
|
|
1961
|
+
timezone: string;
|
|
1962
|
+
users: {
|
|
1963
|
+
error: number;
|
|
1964
|
+
success: number;
|
|
1965
|
+
total: number;
|
|
1966
|
+
};
|
|
1967
|
+
errorList?: {
|
|
1968
|
+
token: string;
|
|
1969
|
+
error: string;
|
|
1970
|
+
}[] | undefined;
|
|
1971
|
+
executionTimeDuration?: number | undefined;
|
|
1972
|
+
}>;
|
|
1973
|
+
declare const RecurrenceRuleSchema: z.ZodObject<{
|
|
1974
|
+
frequency: z.ZodNativeEnum<typeof Frequency>;
|
|
1975
|
+
interval: z.ZodNumber;
|
|
1976
|
+
weekDays: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof WeekDay>, "many">>;
|
|
1977
|
+
dayOfMonth: z.ZodOptional<z.ZodNumber>;
|
|
1978
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
1979
|
+
ocurrences: z.ZodOptional<z.ZodNumber>;
|
|
1980
|
+
}, "strip", z.ZodTypeAny, {
|
|
1981
|
+
frequency: Frequency;
|
|
1982
|
+
interval: number;
|
|
1983
|
+
weekDays?: WeekDay[] | undefined;
|
|
1984
|
+
dayOfMonth?: number | undefined;
|
|
1985
|
+
endDate?: string | undefined;
|
|
1986
|
+
ocurrences?: number | undefined;
|
|
1987
|
+
}, {
|
|
1988
|
+
frequency: Frequency;
|
|
1989
|
+
interval: number;
|
|
1990
|
+
weekDays?: WeekDay[] | undefined;
|
|
1991
|
+
dayOfMonth?: number | undefined;
|
|
1992
|
+
endDate?: string | undefined;
|
|
1993
|
+
ocurrences?: number | undefined;
|
|
1994
|
+
}>;
|
|
1995
|
+
declare const TriggerSchema: z.ZodObject<{
|
|
1996
|
+
id: z.ZodString;
|
|
1997
|
+
title: z.ZodString;
|
|
1998
|
+
description: z.ZodString;
|
|
1999
|
+
transportType: z.ZodArray<z.ZodNativeEnum<typeof TransportType>, "many">;
|
|
2000
|
+
notification: z.ZodObject<Pick<{
|
|
2001
|
+
id: z.ZodString;
|
|
2002
|
+
userId: z.ZodString;
|
|
2003
|
+
triggerId: z.ZodOptional<z.ZodString>;
|
|
2004
|
+
title: z.ZodString;
|
|
2005
|
+
body: z.ZodString;
|
|
2006
|
+
status: z.ZodEnum<["failed", "delivered", "deleted"]>;
|
|
2007
|
+
deliveredAt: z.ZodNumber;
|
|
2008
|
+
openedAt: z.ZodOptional<z.ZodNumber>;
|
|
2009
|
+
deletedAt: z.ZodOptional<z.ZodNumber>;
|
|
2010
|
+
cta: z.ZodOptional<z.ZodObject<{
|
|
2011
|
+
label: z.ZodString;
|
|
2012
|
+
url: z.ZodString;
|
|
2013
|
+
}, "strip", z.ZodTypeAny, {
|
|
2014
|
+
label: string;
|
|
2015
|
+
url: string;
|
|
2016
|
+
}, {
|
|
2017
|
+
label: string;
|
|
2018
|
+
url: string;
|
|
2019
|
+
}>>;
|
|
2020
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
2021
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2022
|
+
}, "userId" | "title" | "body" | "metadata">, "strip", z.ZodTypeAny, {
|
|
2023
|
+
userId: string;
|
|
2024
|
+
title: string;
|
|
2025
|
+
body: string;
|
|
2026
|
+
metadata: Record<string, string | number>;
|
|
2027
|
+
}, {
|
|
2028
|
+
userId: string;
|
|
2029
|
+
title: string;
|
|
2030
|
+
body: string;
|
|
2031
|
+
metadata: Record<string, string | number>;
|
|
2032
|
+
}>;
|
|
2033
|
+
history: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2034
|
+
batchId: z.ZodString;
|
|
2035
|
+
executedAt: z.ZodNumber;
|
|
2036
|
+
timezone: z.ZodString;
|
|
2037
|
+
status: z.ZodEnum<["success", "failed", "info", "warn"]>;
|
|
2038
|
+
users: z.ZodObject<{
|
|
2039
|
+
total: z.ZodNumber;
|
|
2040
|
+
success: z.ZodNumber;
|
|
2041
|
+
error: z.ZodNumber;
|
|
2042
|
+
}, "strip", z.ZodTypeAny, {
|
|
2043
|
+
error: number;
|
|
2044
|
+
success: number;
|
|
2045
|
+
total: number;
|
|
2046
|
+
}, {
|
|
2047
|
+
error: number;
|
|
2048
|
+
success: number;
|
|
2049
|
+
total: number;
|
|
2050
|
+
}>;
|
|
2051
|
+
errorList: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2052
|
+
token: z.ZodString;
|
|
2053
|
+
error: z.ZodString;
|
|
2054
|
+
}, "strip", z.ZodTypeAny, {
|
|
2055
|
+
token: string;
|
|
2056
|
+
error: string;
|
|
2057
|
+
}, {
|
|
2058
|
+
token: string;
|
|
2059
|
+
error: string;
|
|
2060
|
+
}>, "many">>;
|
|
2061
|
+
executionTimeDuration: z.ZodOptional<z.ZodNumber>;
|
|
2062
|
+
}, "strip", z.ZodTypeAny, {
|
|
2063
|
+
status: "failed" | "success" | "info" | "warn";
|
|
2064
|
+
batchId: string;
|
|
2065
|
+
executedAt: number;
|
|
2066
|
+
timezone: string;
|
|
2067
|
+
users: {
|
|
2068
|
+
error: number;
|
|
2069
|
+
success: number;
|
|
2070
|
+
total: number;
|
|
2071
|
+
};
|
|
2072
|
+
errorList?: {
|
|
2073
|
+
token: string;
|
|
2074
|
+
error: string;
|
|
2075
|
+
}[] | undefined;
|
|
2076
|
+
executionTimeDuration?: number | undefined;
|
|
2077
|
+
}, {
|
|
2078
|
+
status: "failed" | "success" | "info" | "warn";
|
|
2079
|
+
batchId: string;
|
|
2080
|
+
executedAt: number;
|
|
2081
|
+
timezone: string;
|
|
2082
|
+
users: {
|
|
2083
|
+
error: number;
|
|
2084
|
+
success: number;
|
|
2085
|
+
total: number;
|
|
2086
|
+
};
|
|
2087
|
+
errorList?: {
|
|
2088
|
+
token: string;
|
|
2089
|
+
error: string;
|
|
2090
|
+
}[] | undefined;
|
|
2091
|
+
executionTimeDuration?: number | undefined;
|
|
2092
|
+
}>, "many">>;
|
|
2093
|
+
status: z.ZodNativeEnum<typeof Status>;
|
|
2094
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
2095
|
+
frequency: z.ZodNativeEnum<typeof Frequency>;
|
|
2096
|
+
interval: z.ZodNumber;
|
|
2097
|
+
weekDays: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof WeekDay>, "many">>;
|
|
2098
|
+
dayOfMonth: z.ZodOptional<z.ZodNumber>;
|
|
2099
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
2100
|
+
ocurrences: z.ZodOptional<z.ZodNumber>;
|
|
2101
|
+
}, "strip", z.ZodTypeAny, {
|
|
2102
|
+
frequency: Frequency;
|
|
2103
|
+
interval: number;
|
|
2104
|
+
weekDays?: WeekDay[] | undefined;
|
|
2105
|
+
dayOfMonth?: number | undefined;
|
|
2106
|
+
endDate?: string | undefined;
|
|
2107
|
+
ocurrences?: number | undefined;
|
|
2108
|
+
}, {
|
|
2109
|
+
frequency: Frequency;
|
|
2110
|
+
interval: number;
|
|
2111
|
+
weekDays?: WeekDay[] | undefined;
|
|
2112
|
+
dayOfMonth?: number | undefined;
|
|
2113
|
+
endDate?: string | undefined;
|
|
2114
|
+
ocurrences?: number | undefined;
|
|
2115
|
+
}>>;
|
|
2116
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2117
|
+
tenantIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2118
|
+
executionDate: z.ZodOptional<z.ZodString>;
|
|
2119
|
+
timeOfDay: z.ZodString;
|
|
2120
|
+
criteria: z.ZodObject<{
|
|
2121
|
+
type: z.ZodNativeEnum<typeof CriteriaType>;
|
|
2122
|
+
params: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2123
|
+
}, "strip", z.ZodTypeAny, {
|
|
2124
|
+
params: Record<string, any>;
|
|
2125
|
+
type: CriteriaType;
|
|
2126
|
+
}, {
|
|
2127
|
+
params: Record<string, any>;
|
|
2128
|
+
type: CriteriaType;
|
|
2129
|
+
}>;
|
|
2130
|
+
nextExecution: z.ZodOptional<z.ZodNumber>;
|
|
2131
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
2132
|
+
modified: z.ZodOptional<z.ZodNumber>;
|
|
2133
|
+
}, "strip", z.ZodTypeAny, {
|
|
2134
|
+
id: string;
|
|
2135
|
+
title: string;
|
|
2136
|
+
status: Status;
|
|
2137
|
+
description: string;
|
|
2138
|
+
transportType: TransportType[];
|
|
2139
|
+
notification: {
|
|
2140
|
+
userId: string;
|
|
2141
|
+
title: string;
|
|
2142
|
+
body: string;
|
|
2143
|
+
metadata: Record<string, string | number>;
|
|
2144
|
+
};
|
|
2145
|
+
timeOfDay: string;
|
|
2146
|
+
criteria: {
|
|
2147
|
+
params: Record<string, any>;
|
|
2148
|
+
type: CriteriaType;
|
|
2149
|
+
};
|
|
2150
|
+
timezone?: string | null | undefined;
|
|
2151
|
+
history?: {
|
|
2152
|
+
status: "failed" | "success" | "info" | "warn";
|
|
2153
|
+
batchId: string;
|
|
2154
|
+
executedAt: number;
|
|
2155
|
+
timezone: string;
|
|
2156
|
+
users: {
|
|
2157
|
+
error: number;
|
|
2158
|
+
success: number;
|
|
2159
|
+
total: number;
|
|
2160
|
+
};
|
|
2161
|
+
errorList?: {
|
|
2162
|
+
token: string;
|
|
2163
|
+
error: string;
|
|
2164
|
+
}[] | undefined;
|
|
2165
|
+
executionTimeDuration?: number | undefined;
|
|
2166
|
+
}[] | undefined;
|
|
2167
|
+
recurrence?: {
|
|
2168
|
+
frequency: Frequency;
|
|
2169
|
+
interval: number;
|
|
2170
|
+
weekDays?: WeekDay[] | undefined;
|
|
2171
|
+
dayOfMonth?: number | undefined;
|
|
2172
|
+
endDate?: string | undefined;
|
|
2173
|
+
ocurrences?: number | undefined;
|
|
2174
|
+
} | undefined;
|
|
2175
|
+
tenantIds?: string[] | undefined;
|
|
2176
|
+
executionDate?: string | undefined;
|
|
2177
|
+
nextExecution?: number | undefined;
|
|
2178
|
+
createdAt?: number | undefined;
|
|
2179
|
+
modified?: number | undefined;
|
|
2180
|
+
}, {
|
|
2181
|
+
id: string;
|
|
2182
|
+
title: string;
|
|
2183
|
+
status: Status;
|
|
2184
|
+
description: string;
|
|
2185
|
+
transportType: TransportType[];
|
|
2186
|
+
notification: {
|
|
2187
|
+
userId: string;
|
|
2188
|
+
title: string;
|
|
2189
|
+
body: string;
|
|
2190
|
+
metadata: Record<string, string | number>;
|
|
2191
|
+
};
|
|
2192
|
+
timeOfDay: string;
|
|
2193
|
+
criteria: {
|
|
2194
|
+
params: Record<string, any>;
|
|
2195
|
+
type: CriteriaType;
|
|
2196
|
+
};
|
|
2197
|
+
timezone?: string | null | undefined;
|
|
2198
|
+
history?: {
|
|
2199
|
+
status: "failed" | "success" | "info" | "warn";
|
|
2200
|
+
batchId: string;
|
|
2201
|
+
executedAt: number;
|
|
2202
|
+
timezone: string;
|
|
2203
|
+
users: {
|
|
2204
|
+
error: number;
|
|
2205
|
+
success: number;
|
|
2206
|
+
total: number;
|
|
2207
|
+
};
|
|
2208
|
+
errorList?: {
|
|
2209
|
+
token: string;
|
|
2210
|
+
error: string;
|
|
2211
|
+
}[] | undefined;
|
|
2212
|
+
executionTimeDuration?: number | undefined;
|
|
2213
|
+
}[] | undefined;
|
|
2214
|
+
recurrence?: {
|
|
2215
|
+
frequency: Frequency;
|
|
2216
|
+
interval: number;
|
|
2217
|
+
weekDays?: WeekDay[] | undefined;
|
|
2218
|
+
dayOfMonth?: number | undefined;
|
|
2219
|
+
endDate?: string | undefined;
|
|
2220
|
+
ocurrences?: number | undefined;
|
|
2221
|
+
} | undefined;
|
|
2222
|
+
tenantIds?: string[] | undefined;
|
|
2223
|
+
executionDate?: string | undefined;
|
|
2224
|
+
nextExecution?: number | undefined;
|
|
2225
|
+
createdAt?: number | undefined;
|
|
2226
|
+
modified?: number | undefined;
|
|
2227
|
+
}>;
|
|
2228
|
+
type NotificationItem = z.infer<typeof NotificationItemSchema>;
|
|
2229
|
+
type NotificationDetail = z.infer<typeof NotificationDetailSchema>;
|
|
2230
|
+
type Trigger = z.infer<typeof TriggerSchema>;
|
|
2231
|
+
type RecurrenceRule = z.infer<typeof RecurrenceRuleSchema>;
|
|
2232
|
+
type History = z.infer<typeof HistorySchema>;
|
|
2233
|
+
type Criteria = z.infer<typeof CriteriaSchema>;
|
|
2234
|
+
|
|
2235
|
+
interface IAPI$2 {
|
|
2236
|
+
getTriggers: (ctx: Context) => Promise<APIResponse<Trigger>>;
|
|
2237
|
+
createTrigger: (ctx: Context, t: Trigger) => Promise<Trigger>;
|
|
2238
|
+
deleteTrigger: (ctx: Context, triggerId: string) => Promise<boolean>;
|
|
2239
|
+
updateTrigger: (ctx: Context, triggerId: string, trigger: Partial<Trigger>) => Promise<Trigger>;
|
|
2240
|
+
push: (context: Context, notification: NotificationDetail) => Promise<boolean>;
|
|
2241
|
+
getNotifications: (ctx: Context) => Promise<APIResponse<NotificationItem>>;
|
|
2242
|
+
markAsRead: (ctx: Context, id: string) => Promise<boolean>;
|
|
2243
|
+
clearNotifications: (ctx: Context) => Promise<boolean>;
|
|
2244
|
+
}
|
|
2245
|
+
declare const Endpoints$1: {
|
|
2246
|
+
Create: {
|
|
2247
|
+
uri: string;
|
|
2248
|
+
method: string;
|
|
2249
|
+
};
|
|
2250
|
+
List: {
|
|
2251
|
+
uri: string;
|
|
2252
|
+
method: string;
|
|
2253
|
+
};
|
|
2254
|
+
Update: {
|
|
2255
|
+
uri: string;
|
|
2256
|
+
method: string;
|
|
2257
|
+
};
|
|
2258
|
+
Delete: {
|
|
2259
|
+
uri: string;
|
|
2260
|
+
method: string;
|
|
2261
|
+
};
|
|
2262
|
+
Push: {
|
|
2263
|
+
uri: string;
|
|
2264
|
+
method: string;
|
|
2265
|
+
};
|
|
2266
|
+
ListNotifications: {
|
|
2267
|
+
uri: string;
|
|
2268
|
+
method: string;
|
|
2269
|
+
};
|
|
2270
|
+
MarkAsRead: {
|
|
2271
|
+
uri: string;
|
|
2272
|
+
method: string;
|
|
2273
|
+
};
|
|
2274
|
+
ClearNotifications: {
|
|
2275
|
+
uri: string;
|
|
2276
|
+
method: string;
|
|
2277
|
+
};
|
|
2278
|
+
};
|
|
2279
|
+
|
|
2280
|
+
type index$3_Criteria = Criteria;
|
|
2281
|
+
declare const index$3_CriteriaSchema: typeof CriteriaSchema;
|
|
2282
|
+
type index$3_CriteriaType = CriteriaType;
|
|
2283
|
+
declare const index$3_CriteriaType: typeof CriteriaType;
|
|
2284
|
+
type index$3_Frequency = Frequency;
|
|
2285
|
+
declare const index$3_Frequency: typeof Frequency;
|
|
2286
|
+
type index$3_History = History;
|
|
2287
|
+
declare const index$3_HistorySchema: typeof HistorySchema;
|
|
2288
|
+
type index$3_NotificationDetail = NotificationDetail;
|
|
2289
|
+
declare const index$3_NotificationDetailSchema: typeof NotificationDetailSchema;
|
|
2290
|
+
type index$3_NotificationItem = NotificationItem;
|
|
2291
|
+
declare const index$3_NotificationItemSchema: typeof NotificationItemSchema;
|
|
2292
|
+
type index$3_RecurrenceRule = RecurrenceRule;
|
|
2293
|
+
declare const index$3_RecurrenceRuleSchema: typeof RecurrenceRuleSchema;
|
|
2294
|
+
type index$3_Status = Status;
|
|
2295
|
+
declare const index$3_Status: typeof Status;
|
|
2296
|
+
type index$3_TransportType = TransportType;
|
|
2297
|
+
declare const index$3_TransportType: typeof TransportType;
|
|
2298
|
+
type index$3_Trigger = Trigger;
|
|
2299
|
+
declare const index$3_TriggerSchema: typeof TriggerSchema;
|
|
2300
|
+
type index$3_WeekDay = WeekDay;
|
|
2301
|
+
declare const index$3_WeekDay: typeof WeekDay;
|
|
2302
|
+
declare namespace index$3 {
|
|
2303
|
+
export { type index$3_Criteria as Criteria, index$3_CriteriaSchema as CriteriaSchema, index$3_CriteriaType as CriteriaType, Endpoints$1 as Endpoints, index$3_Frequency as Frequency, type index$3_History as History, index$3_HistorySchema as HistorySchema, type IAPI$2 as IAPI, type index$3_NotificationDetail as NotificationDetail, index$3_NotificationDetailSchema as NotificationDetailSchema, type index$3_NotificationItem as NotificationItem, index$3_NotificationItemSchema as NotificationItemSchema, type index$3_RecurrenceRule as RecurrenceRule, index$3_RecurrenceRuleSchema as RecurrenceRuleSchema, index$3_Status as Status, index$3_TransportType as TransportType, type index$3_Trigger as Trigger, index$3_TriggerSchema as TriggerSchema, index$3_WeekDay as WeekDay };
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
interface IAPI$1 {
|
|
2307
|
+
version: () => Promise<string>;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
declare const NoteHistorySchema: z.ZodObject<{
|
|
2311
|
+
type: z.ZodEnum<["created", "updated", "deleted", "asset-added", "asset-removed"]>;
|
|
2312
|
+
actorEmail: z.ZodString;
|
|
2313
|
+
timestamp: z.ZodNumber;
|
|
2314
|
+
details: z.ZodOptional<z.ZodString>;
|
|
2315
|
+
}, "strip", z.ZodTypeAny, {
|
|
2316
|
+
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
2317
|
+
timestamp: number;
|
|
2318
|
+
actorEmail: string;
|
|
2319
|
+
details?: string | undefined;
|
|
2320
|
+
}, {
|
|
2321
|
+
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
2322
|
+
timestamp: number;
|
|
2323
|
+
actorEmail: string;
|
|
2324
|
+
details?: string | undefined;
|
|
2325
|
+
}>;
|
|
2326
|
+
declare const NoteSchema: z.ZodObject<{
|
|
2327
|
+
id: z.ZodString;
|
|
2328
|
+
userId: z.ZodString;
|
|
2329
|
+
authorEmail: z.ZodString;
|
|
2330
|
+
assets: z.ZodArray<z.ZodObject<{
|
|
2331
|
+
assetId: z.ZodString;
|
|
2332
|
+
fileName: z.ZodString;
|
|
2333
|
+
extension: z.ZodString;
|
|
2334
|
+
fileSize: z.ZodNumber;
|
|
2335
|
+
assetUrl: z.ZodString;
|
|
2336
|
+
thumbnailUrl: z.ZodString;
|
|
2337
|
+
type: z.ZodString;
|
|
2338
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
2339
|
+
progress: z.ZodOptional<z.ZodNumber>;
|
|
2340
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2341
|
+
authorId: z.ZodString;
|
|
2342
|
+
uploadedAt: z.ZodNumber;
|
|
2343
|
+
}, "strip", z.ZodTypeAny, {
|
|
2344
|
+
type: string;
|
|
2345
|
+
assetId: string;
|
|
2346
|
+
fileName: string;
|
|
2347
|
+
extension: string;
|
|
2348
|
+
fileSize: number;
|
|
2349
|
+
assetUrl: string;
|
|
2350
|
+
thumbnailUrl: string;
|
|
2351
|
+
authorId: string;
|
|
2352
|
+
uploadedAt: number;
|
|
2353
|
+
error?: string | undefined;
|
|
2354
|
+
duration?: number | undefined;
|
|
2355
|
+
progress?: number | undefined;
|
|
2356
|
+
}, {
|
|
2357
|
+
type: string;
|
|
2358
|
+
assetId: string;
|
|
2359
|
+
fileName: string;
|
|
2360
|
+
extension: string;
|
|
2361
|
+
fileSize: number;
|
|
2362
|
+
assetUrl: string;
|
|
2363
|
+
thumbnailUrl: string;
|
|
2364
|
+
authorId: string;
|
|
2365
|
+
uploadedAt: number;
|
|
2366
|
+
error?: string | undefined;
|
|
2367
|
+
duration?: number | undefined;
|
|
2368
|
+
progress?: number | undefined;
|
|
2369
|
+
}>, "many">;
|
|
2370
|
+
title: z.ZodString;
|
|
2371
|
+
content: z.ZodString;
|
|
2372
|
+
createdAt: z.ZodNumber;
|
|
2373
|
+
modified: z.ZodNumber;
|
|
2374
|
+
history: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2375
|
+
type: z.ZodEnum<["created", "updated", "deleted", "asset-added", "asset-removed"]>;
|
|
2376
|
+
actorEmail: z.ZodString;
|
|
2377
|
+
timestamp: z.ZodNumber;
|
|
2378
|
+
details: z.ZodOptional<z.ZodString>;
|
|
2379
|
+
}, "strip", z.ZodTypeAny, {
|
|
2380
|
+
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
2381
|
+
timestamp: number;
|
|
2382
|
+
actorEmail: string;
|
|
2383
|
+
details?: string | undefined;
|
|
2384
|
+
}, {
|
|
2385
|
+
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
2386
|
+
timestamp: number;
|
|
2387
|
+
actorEmail: string;
|
|
2388
|
+
details?: string | undefined;
|
|
2389
|
+
}>, "many">>;
|
|
2390
|
+
}, "strip", z.ZodTypeAny, {
|
|
2391
|
+
id: string;
|
|
2392
|
+
userId: string;
|
|
2393
|
+
title: string;
|
|
2394
|
+
createdAt: number;
|
|
2395
|
+
modified: number;
|
|
2396
|
+
content: string;
|
|
2397
|
+
assets: {
|
|
2398
|
+
type: string;
|
|
2399
|
+
assetId: string;
|
|
2400
|
+
fileName: string;
|
|
2401
|
+
extension: string;
|
|
2402
|
+
fileSize: number;
|
|
2403
|
+
assetUrl: string;
|
|
2404
|
+
thumbnailUrl: string;
|
|
2405
|
+
authorId: string;
|
|
2406
|
+
uploadedAt: number;
|
|
2407
|
+
error?: string | undefined;
|
|
2408
|
+
duration?: number | undefined;
|
|
2409
|
+
progress?: number | undefined;
|
|
2410
|
+
}[];
|
|
2411
|
+
authorEmail: string;
|
|
2412
|
+
history?: {
|
|
2413
|
+
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
2414
|
+
timestamp: number;
|
|
2415
|
+
actorEmail: string;
|
|
2416
|
+
details?: string | undefined;
|
|
2417
|
+
}[] | undefined;
|
|
2418
|
+
}, {
|
|
2419
|
+
id: string;
|
|
2420
|
+
userId: string;
|
|
2421
|
+
title: string;
|
|
2422
|
+
createdAt: number;
|
|
2423
|
+
modified: number;
|
|
2424
|
+
content: string;
|
|
2425
|
+
assets: {
|
|
2426
|
+
type: string;
|
|
2427
|
+
assetId: string;
|
|
2428
|
+
fileName: string;
|
|
2429
|
+
extension: string;
|
|
2430
|
+
fileSize: number;
|
|
2431
|
+
assetUrl: string;
|
|
2432
|
+
thumbnailUrl: string;
|
|
2433
|
+
authorId: string;
|
|
2434
|
+
uploadedAt: number;
|
|
2435
|
+
error?: string | undefined;
|
|
2436
|
+
duration?: number | undefined;
|
|
2437
|
+
progress?: number | undefined;
|
|
2438
|
+
}[];
|
|
2439
|
+
authorEmail: string;
|
|
2440
|
+
history?: {
|
|
2441
|
+
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
2442
|
+
timestamp: number;
|
|
2443
|
+
actorEmail: string;
|
|
2444
|
+
details?: string | undefined;
|
|
2445
|
+
}[] | undefined;
|
|
2446
|
+
}>;
|
|
2447
|
+
type Note = z.infer<typeof NoteSchema>;
|
|
2448
|
+
type NoteHistory = z.infer<typeof NoteHistorySchema>;
|
|
2449
|
+
|
|
2450
|
+
interface IAPI {
|
|
2451
|
+
list: (c: Context, userId: string) => Promise<Note[]>;
|
|
2452
|
+
add: (c: Context, note: Partial<Note>) => Promise<Note>;
|
|
2453
|
+
update: (c: Context, id: string, script: Partial<Note>) => Promise<Note>;
|
|
2454
|
+
delete: (c: Context, id: string) => Promise<boolean>;
|
|
2455
|
+
}
|
|
2456
|
+
declare const Endpoints: {
|
|
2457
|
+
GetNotes: {
|
|
2458
|
+
uri: string;
|
|
2459
|
+
method: string;
|
|
2460
|
+
};
|
|
2461
|
+
AddNote: {
|
|
2462
|
+
uri: string;
|
|
2463
|
+
method: string;
|
|
2464
|
+
};
|
|
2465
|
+
DeleteNote: {
|
|
2466
|
+
uri: string;
|
|
2467
|
+
method: string;
|
|
2468
|
+
};
|
|
2469
|
+
UpdateNote: {
|
|
2470
|
+
uri: string;
|
|
2471
|
+
method: string;
|
|
2472
|
+
};
|
|
2473
|
+
};
|
|
2474
|
+
|
|
2475
|
+
declare const index$2_Endpoints: typeof Endpoints;
|
|
2476
|
+
type index$2_IAPI = IAPI;
|
|
2477
|
+
type index$2_NoteHistory = NoteHistory;
|
|
2478
|
+
declare const index$2_NoteHistorySchema: typeof NoteHistorySchema;
|
|
2479
|
+
declare const index$2_NoteSchema: typeof NoteSchema;
|
|
2480
|
+
declare namespace index$2 {
|
|
2481
|
+
export { index$2_Endpoints as Endpoints, type Note as Entity, type index$2_IAPI as IAPI, type index$2_NoteHistory as NoteHistory, index$2_NoteHistorySchema as NoteHistorySchema, index$2_NoteSchema as NoteSchema };
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
declare class ShredAPI {
|
|
2485
|
+
user: IAPI$8;
|
|
2486
|
+
goal: IAPI$3;
|
|
2487
|
+
subscription: IAPI$9;
|
|
2488
|
+
prompt: IAPI$a;
|
|
2489
|
+
pushNotification: IAPI$2;
|
|
2490
|
+
email: IAPI$5;
|
|
2491
|
+
tenant: IAPI$7;
|
|
2492
|
+
app: IAPI$1;
|
|
2493
|
+
project: IAPI$4;
|
|
2494
|
+
track: IAPI$6;
|
|
2495
|
+
note: IAPI;
|
|
2496
|
+
constructor(env: Environment);
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
declare class ShredException extends Error {
|
|
2500
|
+
status: number;
|
|
2501
|
+
constructor(message: string, status: number);
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
declare class ConflictException extends ShredException {
|
|
2505
|
+
constructor(message: string);
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
declare class InvalidArgumentException extends ShredException {
|
|
2509
|
+
constructor(message: string);
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
declare class ResourceNotFoundException extends ShredException {
|
|
2513
|
+
constructor(message: string);
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
declare class UnauthorizedException extends ShredException {
|
|
2517
|
+
constructor(message: string);
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
declare class ForbiddenException extends ShredException {
|
|
2521
|
+
constructor(message: string);
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
declare const Exceptions: {
|
|
2525
|
+
ConflictException: typeof ConflictException;
|
|
2526
|
+
InvalidArgumentException: typeof InvalidArgumentException;
|
|
2527
|
+
ResourceNotFoundException: typeof ResourceNotFoundException;
|
|
2528
|
+
ShredException: typeof ShredException;
|
|
2529
|
+
UnauthorizedException: typeof UnauthorizedException;
|
|
2530
|
+
ForbiddenException: typeof ForbiddenException;
|
|
2531
|
+
};
|
|
2532
|
+
|
|
2533
|
+
type index$1_ConflictException = ConflictException;
|
|
2534
|
+
declare const index$1_ConflictException: typeof ConflictException;
|
|
2535
|
+
type index$1_ForbiddenException = ForbiddenException;
|
|
2536
|
+
declare const index$1_ForbiddenException: typeof ForbiddenException;
|
|
2537
|
+
type index$1_InvalidArgumentException = InvalidArgumentException;
|
|
2538
|
+
declare const index$1_InvalidArgumentException: typeof InvalidArgumentException;
|
|
2539
|
+
type index$1_ResourceNotFoundException = ResourceNotFoundException;
|
|
2540
|
+
declare const index$1_ResourceNotFoundException: typeof ResourceNotFoundException;
|
|
2541
|
+
type index$1_ShredException = ShredException;
|
|
2542
|
+
declare const index$1_ShredException: typeof ShredException;
|
|
2543
|
+
type index$1_UnauthorizedException = UnauthorizedException;
|
|
2544
|
+
declare const index$1_UnauthorizedException: typeof UnauthorizedException;
|
|
2545
|
+
declare namespace index$1 {
|
|
2546
|
+
export { index$1_ConflictException as ConflictException, index$1_ForbiddenException as ForbiddenException, index$1_InvalidArgumentException as InvalidArgumentException, index$1_ResourceNotFoundException as ResourceNotFoundException, index$1_ShredException as ShredException, index$1_UnauthorizedException as UnauthorizedException, Exceptions as default };
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
declare const AssetSchema: z.ZodObject<{
|
|
2550
|
+
assetId: z.ZodString;
|
|
2551
|
+
fileName: z.ZodString;
|
|
2552
|
+
extension: z.ZodString;
|
|
2553
|
+
fileSize: z.ZodNumber;
|
|
2554
|
+
assetUrl: z.ZodString;
|
|
2555
|
+
thumbnailUrl: z.ZodString;
|
|
2556
|
+
type: z.ZodString;
|
|
2557
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
2558
|
+
progress: z.ZodOptional<z.ZodNumber>;
|
|
2559
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2560
|
+
authorId: z.ZodString;
|
|
2561
|
+
uploadedAt: z.ZodNumber;
|
|
2562
|
+
}, "strip", z.ZodTypeAny, {
|
|
2563
|
+
type: string;
|
|
2564
|
+
assetId: string;
|
|
2565
|
+
fileName: string;
|
|
2566
|
+
extension: string;
|
|
2567
|
+
fileSize: number;
|
|
2568
|
+
assetUrl: string;
|
|
2569
|
+
thumbnailUrl: string;
|
|
2570
|
+
authorId: string;
|
|
2571
|
+
uploadedAt: number;
|
|
2572
|
+
error?: string | undefined;
|
|
2573
|
+
duration?: number | undefined;
|
|
2574
|
+
progress?: number | undefined;
|
|
2575
|
+
}, {
|
|
2576
|
+
type: string;
|
|
2577
|
+
assetId: string;
|
|
2578
|
+
fileName: string;
|
|
2579
|
+
extension: string;
|
|
2580
|
+
fileSize: number;
|
|
2581
|
+
assetUrl: string;
|
|
2582
|
+
thumbnailUrl: string;
|
|
2583
|
+
authorId: string;
|
|
2584
|
+
uploadedAt: number;
|
|
2585
|
+
error?: string | undefined;
|
|
2586
|
+
duration?: number | undefined;
|
|
2587
|
+
progress?: number | undefined;
|
|
2588
|
+
}>;
|
|
2589
|
+
type Asset = z.infer<typeof AssetSchema>;
|
|
2590
|
+
|
|
2591
|
+
declare const index_AssetSchema: typeof AssetSchema;
|
|
2592
|
+
declare namespace index {
|
|
2593
|
+
export { index_AssetSchema as AssetSchema, type Asset as Entity };
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
export { index as Asset, index$a as Core, index$6 as Email, index$1 as Exceptions, index$4 as Goal, index$2 as Note, index$3 as Notification, index$5 as Project, index$c as Prompt, index$b as Subscription, index$8 as Tenant, index$7 as Track, index$9 as User, ShredAPI as default };
|