shred-api-client 1.14.3 → 1.14.4-rc.2
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/api/AppConfig.api.d.ts +2 -2
- package/dist/api/AppConfig.api.js +25 -2
- package/dist/api/Email.api.d.ts +3 -3
- package/dist/api/Email.api.js +25 -2
- package/dist/api/Goal.api.d.ts +10 -0
- package/dist/api/Goal.api.js +42 -0
- package/dist/api/Note.api.d.ts +0 -0
- package/dist/api/Note.api.js +1 -0
- package/dist/api/Notification.api.d.ts +8 -8
- package/dist/api/Notification.api.js +32 -9
- package/dist/api/Project.api.d.ts +8 -8
- package/dist/api/Project.api.js +38 -18
- package/dist/api/Prompt.api.d.ts +6 -6
- package/dist/api/Prompt.api.js +6 -6
- package/dist/api/Subscription.api.d.ts +6 -6
- package/dist/api/Subscription.api.js +12 -12
- package/dist/api/Tenant.api.d.ts +7 -7
- package/dist/api/Tenant.api.js +7 -7
- package/dist/api/Track.api.d.ts +3 -3
- package/dist/api/Track.api.js +2 -2
- package/dist/api/User.api.d.ts +6 -6
- package/dist/api/User.api.js +15 -15
- package/dist/index.d.ts +13 -5
- package/dist/index.js +26 -16
- package/dist/model/Api.d.ts +20 -39
- package/dist/model/Api.js +3 -1
- package/dist/model/app-config/AppConfig.api.d.ts +9 -0
- package/dist/model/{AppConfig.schema.js → app-config/AppConfig.api.js} +2 -3
- package/dist/model/app-config/index.d.ts +1 -0
- package/dist/model/app-config/index.js +17 -0
- package/dist/model/asset/index.d.ts +2 -0
- package/dist/model/asset/index.js +5 -0
- package/dist/model/core/APIResponse.d.ts +6 -0
- package/dist/model/core/APIResponse.js +2 -0
- package/dist/model/core/Query.d.ts +15 -0
- package/dist/model/core/Query.js +2 -0
- package/dist/model/core/index.d.ts +2 -0
- package/dist/model/core/index.js +18 -0
- package/dist/model/email/Email.api.d.ts +11 -0
- package/dist/model/{Email.schema.js → email/Email.api.js} +2 -3
- package/dist/model/email/Email.schema.d.ts +15 -0
- package/dist/model/email/Email.schema.js +9 -0
- package/dist/model/email/index.d.ts +3 -0
- package/dist/model/email/index.js +20 -0
- package/dist/model/exceptions/index.d.ts +3 -2
- package/dist/model/exceptions/index.js +2 -1
- package/dist/model/goal/Goal.api.d.ts +11 -0
- package/dist/model/goal/Goal.api.js +6 -0
- package/dist/model/goal/Goal.schema.d.ts +154 -0
- package/dist/model/goal/Goal.schema.js +26 -0
- package/dist/model/goal/index.d.ts +3 -0
- package/dist/model/goal/index.js +22 -0
- package/dist/model/note/Note.api.d.ts +26 -0
- package/dist/model/note/Note.api.js +21 -0
- package/dist/model/note/Note.schema.d.ts +141 -0
- package/dist/model/note/Note.schema.js +30 -0
- package/dist/model/note/index.d.ts +2 -0
- package/dist/model/note/index.js +6 -0
- package/dist/model/notification/Notification.api.d.ts +47 -0
- package/dist/model/notification/Notification.api.js +13 -0
- package/dist/model/notification/Notification.schema.d.ts +454 -0
- package/dist/model/notification/Notification.schema.js +111 -0
- package/dist/model/notification/index.d.ts +3 -0
- package/dist/model/notification/index.js +30 -0
- package/dist/model/project/Project.api.d.ts +66 -0
- package/dist/model/project/Project.api.js +20 -0
- package/dist/model/project/Project.schema.d.ts +206 -0
- package/dist/model/{Project.schema.js → project/Project.schema.js} +31 -52
- package/dist/model/project/index.d.ts +3 -0
- package/dist/model/project/index.js +24 -0
- package/dist/model/{Prompt.schema.d.ts → prompt/Prompt.api.d.ts} +4 -24
- package/dist/model/{Prompt.schema.js → prompt/Prompt.api.js} +2 -3
- package/dist/model/prompt/Prompt.schema.d.ts +165 -0
- package/dist/model/prompt/Prompt.schema.js +24 -0
- package/dist/model/prompt/index.d.ts +3 -0
- package/dist/model/prompt/index.js +22 -0
- package/dist/model/{Subscription.schema.d.ts → subscription/Subscription.api.d.ts} +4 -51
- package/dist/model/{Subscription.schema.js → subscription/Subscription.api.js} +2 -8
- package/dist/model/subscription/Subscription.schema.d.ts +314 -0
- package/dist/model/subscription/Subscription.schema.js +53 -0
- package/dist/model/subscription/index.d.ts +3 -0
- package/dist/model/subscription/index.js +25 -0
- package/dist/model/{Tenant.schema.d.ts → tenant/Tenant.api.d.ts} +4 -29
- package/dist/model/{Tenant.schema.js → tenant/Tenant.api.js} +2 -3
- package/dist/model/tenant/Tenant.schema.d.ts +342 -0
- package/dist/model/tenant/Tenant.schema.js +29 -0
- package/dist/model/tenant/index.d.ts +3 -0
- package/dist/model/tenant/index.js +21 -0
- package/dist/model/track/Track.api.d.ts +10 -0
- package/dist/model/{Track.schema.js → track/Track.api.js} +2 -3
- package/dist/model/track/Track.schema.d.ts +44 -0
- package/dist/model/track/Track.schema.js +14 -0
- package/dist/model/track/index.d.ts +3 -0
- package/dist/model/track/index.js +21 -0
- package/dist/model/user/User.api.d.ts +80 -0
- package/dist/model/user/User.api.js +20 -0
- package/dist/model/user/User.schema.d.ts +117 -0
- package/dist/model/user/User.schema.js +42 -0
- package/dist/model/user/index.d.ts +3 -0
- package/dist/model/user/index.js +23 -0
- package/dist/util/parseQuery.d.ts +2 -2
- package/package.json +1 -1
- package/dist/model/AppConfig.schema.d.ts +0 -10
- package/dist/model/Email.schema.d.ts +0 -17
- package/dist/model/Notification.schema.d.ts +0 -112
- package/dist/model/Notification.schema.js +0 -38
- package/dist/model/Project.schema.d.ts +0 -152
- package/dist/model/Track.schema.d.ts +0 -20
- package/dist/model/User.schema.d.ts +0 -253
- package/dist/model/User.schema.js +0 -97
- package/dist/namespace.d.ts +0 -259
- package/dist/namespace.js +0 -53
- package/dist/model/{Asset.schema.d.ts → asset/Asset.schema.d.ts} +4 -4
- /package/dist/model/{Asset.schema.js → asset/Asset.schema.js} +0 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PreferencesSchema: z.ZodObject<{
|
|
3
|
+
iconUrl: z.ZodString;
|
|
4
|
+
logoUrl: z.ZodString;
|
|
5
|
+
primaryColor: z.ZodString;
|
|
6
|
+
secondaryColor: z.ZodString;
|
|
7
|
+
guidelinesUrl: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
iconUrl: string;
|
|
10
|
+
logoUrl: string;
|
|
11
|
+
primaryColor: string;
|
|
12
|
+
secondaryColor: string;
|
|
13
|
+
guidelinesUrl?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
iconUrl: string;
|
|
16
|
+
logoUrl: string;
|
|
17
|
+
primaryColor: string;
|
|
18
|
+
secondaryColor: string;
|
|
19
|
+
guidelinesUrl?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const TenantSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
isActive: z.ZodBoolean;
|
|
25
|
+
isSubscriptionActive: z.ZodBoolean;
|
|
26
|
+
preferences: z.ZodObject<{
|
|
27
|
+
iconUrl: z.ZodString;
|
|
28
|
+
logoUrl: z.ZodString;
|
|
29
|
+
primaryColor: z.ZodString;
|
|
30
|
+
secondaryColor: z.ZodString;
|
|
31
|
+
guidelinesUrl: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
iconUrl: string;
|
|
34
|
+
logoUrl: string;
|
|
35
|
+
primaryColor: string;
|
|
36
|
+
secondaryColor: string;
|
|
37
|
+
guidelinesUrl?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
iconUrl: string;
|
|
40
|
+
logoUrl: string;
|
|
41
|
+
primaryColor: string;
|
|
42
|
+
secondaryColor: string;
|
|
43
|
+
guidelinesUrl?: string | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
inviteCode: z.ZodString;
|
|
46
|
+
totalUsersAllowed: z.ZodNumber;
|
|
47
|
+
currentUsersSize: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
chargeByEmail: z.ZodBoolean;
|
|
49
|
+
defaultProductId: z.ZodOptional<z.ZodString>;
|
|
50
|
+
defaultPlanId: z.ZodOptional<z.ZodString>;
|
|
51
|
+
defaultCoupomCode: z.ZodOptional<z.ZodString>;
|
|
52
|
+
allowedProducts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
53
|
+
useOwnScripts: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
subscription: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
status: z.ZodString;
|
|
57
|
+
startDate: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
daysUntilDue: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
renewAutomatically: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
currentPeriodStart: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
currentPeriodEnd: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
paymentMethodId: z.ZodOptional<z.ZodString>;
|
|
63
|
+
product: z.ZodObject<{
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
descriptions: z.ZodArray<z.ZodObject<{
|
|
67
|
+
description: z.ZodString;
|
|
68
|
+
subtitle: z.ZodString;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
description: string;
|
|
71
|
+
subtitle: string;
|
|
72
|
+
}, {
|
|
73
|
+
description: string;
|
|
74
|
+
subtitle: string;
|
|
75
|
+
}>, "many">;
|
|
76
|
+
metadata: z.ZodAny;
|
|
77
|
+
plans: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
currency: z.ZodString;
|
|
80
|
+
price: z.ZodString;
|
|
81
|
+
interval: z.ZodString;
|
|
82
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
83
|
+
subscriptionItemId: z.ZodString;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
id: string;
|
|
86
|
+
metadata: Record<string, string>;
|
|
87
|
+
interval: string;
|
|
88
|
+
price: string;
|
|
89
|
+
currency: string;
|
|
90
|
+
subscriptionItemId: string;
|
|
91
|
+
}, {
|
|
92
|
+
id: string;
|
|
93
|
+
metadata: Record<string, string>;
|
|
94
|
+
interval: string;
|
|
95
|
+
price: string;
|
|
96
|
+
currency: string;
|
|
97
|
+
subscriptionItemId: string;
|
|
98
|
+
}>, "many">;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
descriptions: {
|
|
103
|
+
description: string;
|
|
104
|
+
subtitle: string;
|
|
105
|
+
}[];
|
|
106
|
+
plans: {
|
|
107
|
+
id: string;
|
|
108
|
+
metadata: Record<string, string>;
|
|
109
|
+
interval: string;
|
|
110
|
+
price: string;
|
|
111
|
+
currency: string;
|
|
112
|
+
subscriptionItemId: string;
|
|
113
|
+
}[];
|
|
114
|
+
metadata?: any;
|
|
115
|
+
}, {
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
descriptions: {
|
|
119
|
+
description: string;
|
|
120
|
+
subtitle: string;
|
|
121
|
+
}[];
|
|
122
|
+
plans: {
|
|
123
|
+
id: string;
|
|
124
|
+
metadata: Record<string, string>;
|
|
125
|
+
interval: string;
|
|
126
|
+
price: string;
|
|
127
|
+
currency: string;
|
|
128
|
+
subscriptionItemId: string;
|
|
129
|
+
}[];
|
|
130
|
+
metadata?: any;
|
|
131
|
+
}>;
|
|
132
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof import("../subscription/Subscription.schema").Type>>;
|
|
133
|
+
plan: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
id: z.ZodString;
|
|
135
|
+
currency: z.ZodString;
|
|
136
|
+
price: z.ZodString;
|
|
137
|
+
interval: z.ZodString;
|
|
138
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
139
|
+
subscriptionItemId: z.ZodString;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
id: string;
|
|
142
|
+
metadata: Record<string, string>;
|
|
143
|
+
interval: string;
|
|
144
|
+
price: string;
|
|
145
|
+
currency: string;
|
|
146
|
+
subscriptionItemId: string;
|
|
147
|
+
}, {
|
|
148
|
+
id: string;
|
|
149
|
+
metadata: Record<string, string>;
|
|
150
|
+
interval: string;
|
|
151
|
+
price: string;
|
|
152
|
+
currency: string;
|
|
153
|
+
subscriptionItemId: string;
|
|
154
|
+
}>>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
id: string;
|
|
157
|
+
status: string;
|
|
158
|
+
product: {
|
|
159
|
+
id: string;
|
|
160
|
+
name: string;
|
|
161
|
+
descriptions: {
|
|
162
|
+
description: string;
|
|
163
|
+
subtitle: string;
|
|
164
|
+
}[];
|
|
165
|
+
plans: {
|
|
166
|
+
id: string;
|
|
167
|
+
metadata: Record<string, string>;
|
|
168
|
+
interval: string;
|
|
169
|
+
price: string;
|
|
170
|
+
currency: string;
|
|
171
|
+
subscriptionItemId: string;
|
|
172
|
+
}[];
|
|
173
|
+
metadata?: any;
|
|
174
|
+
};
|
|
175
|
+
type?: import("../subscription/Subscription.schema").Type | undefined;
|
|
176
|
+
startDate?: number | undefined;
|
|
177
|
+
daysUntilDue?: number | undefined;
|
|
178
|
+
renewAutomatically?: boolean | undefined;
|
|
179
|
+
currentPeriodStart?: number | undefined;
|
|
180
|
+
currentPeriodEnd?: number | undefined;
|
|
181
|
+
paymentMethodId?: string | undefined;
|
|
182
|
+
plan?: {
|
|
183
|
+
id: string;
|
|
184
|
+
metadata: Record<string, string>;
|
|
185
|
+
interval: string;
|
|
186
|
+
price: string;
|
|
187
|
+
currency: string;
|
|
188
|
+
subscriptionItemId: string;
|
|
189
|
+
} | undefined;
|
|
190
|
+
}, {
|
|
191
|
+
id: string;
|
|
192
|
+
status: string;
|
|
193
|
+
product: {
|
|
194
|
+
id: string;
|
|
195
|
+
name: string;
|
|
196
|
+
descriptions: {
|
|
197
|
+
description: string;
|
|
198
|
+
subtitle: string;
|
|
199
|
+
}[];
|
|
200
|
+
plans: {
|
|
201
|
+
id: string;
|
|
202
|
+
metadata: Record<string, string>;
|
|
203
|
+
interval: string;
|
|
204
|
+
price: string;
|
|
205
|
+
currency: string;
|
|
206
|
+
subscriptionItemId: string;
|
|
207
|
+
}[];
|
|
208
|
+
metadata?: any;
|
|
209
|
+
};
|
|
210
|
+
type?: import("../subscription/Subscription.schema").Type | undefined;
|
|
211
|
+
startDate?: number | undefined;
|
|
212
|
+
daysUntilDue?: number | undefined;
|
|
213
|
+
renewAutomatically?: boolean | undefined;
|
|
214
|
+
currentPeriodStart?: number | undefined;
|
|
215
|
+
currentPeriodEnd?: number | undefined;
|
|
216
|
+
paymentMethodId?: string | undefined;
|
|
217
|
+
plan?: {
|
|
218
|
+
id: string;
|
|
219
|
+
metadata: Record<string, string>;
|
|
220
|
+
interval: string;
|
|
221
|
+
price: string;
|
|
222
|
+
currency: string;
|
|
223
|
+
subscriptionItemId: string;
|
|
224
|
+
} | undefined;
|
|
225
|
+
}>>>;
|
|
226
|
+
}, "strip", z.ZodTypeAny, {
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
isActive: boolean;
|
|
230
|
+
isSubscriptionActive: boolean;
|
|
231
|
+
preferences: {
|
|
232
|
+
iconUrl: string;
|
|
233
|
+
logoUrl: string;
|
|
234
|
+
primaryColor: string;
|
|
235
|
+
secondaryColor: string;
|
|
236
|
+
guidelinesUrl?: string | undefined;
|
|
237
|
+
};
|
|
238
|
+
inviteCode: string;
|
|
239
|
+
totalUsersAllowed: number;
|
|
240
|
+
chargeByEmail: boolean;
|
|
241
|
+
currentUsersSize?: number | undefined;
|
|
242
|
+
defaultProductId?: string | undefined;
|
|
243
|
+
defaultPlanId?: string | undefined;
|
|
244
|
+
defaultCoupomCode?: string | undefined;
|
|
245
|
+
allowedProducts?: string[] | undefined;
|
|
246
|
+
useOwnScripts?: boolean | undefined;
|
|
247
|
+
subscription?: {
|
|
248
|
+
id: string;
|
|
249
|
+
status: string;
|
|
250
|
+
product: {
|
|
251
|
+
id: string;
|
|
252
|
+
name: string;
|
|
253
|
+
descriptions: {
|
|
254
|
+
description: string;
|
|
255
|
+
subtitle: string;
|
|
256
|
+
}[];
|
|
257
|
+
plans: {
|
|
258
|
+
id: string;
|
|
259
|
+
metadata: Record<string, string>;
|
|
260
|
+
interval: string;
|
|
261
|
+
price: string;
|
|
262
|
+
currency: string;
|
|
263
|
+
subscriptionItemId: string;
|
|
264
|
+
}[];
|
|
265
|
+
metadata?: any;
|
|
266
|
+
};
|
|
267
|
+
type?: import("../subscription/Subscription.schema").Type | undefined;
|
|
268
|
+
startDate?: number | undefined;
|
|
269
|
+
daysUntilDue?: number | undefined;
|
|
270
|
+
renewAutomatically?: boolean | undefined;
|
|
271
|
+
currentPeriodStart?: number | undefined;
|
|
272
|
+
currentPeriodEnd?: number | undefined;
|
|
273
|
+
paymentMethodId?: string | undefined;
|
|
274
|
+
plan?: {
|
|
275
|
+
id: string;
|
|
276
|
+
metadata: Record<string, string>;
|
|
277
|
+
interval: string;
|
|
278
|
+
price: string;
|
|
279
|
+
currency: string;
|
|
280
|
+
subscriptionItemId: string;
|
|
281
|
+
} | undefined;
|
|
282
|
+
} | undefined;
|
|
283
|
+
}, {
|
|
284
|
+
id: string;
|
|
285
|
+
name: string;
|
|
286
|
+
isActive: boolean;
|
|
287
|
+
isSubscriptionActive: boolean;
|
|
288
|
+
preferences: {
|
|
289
|
+
iconUrl: string;
|
|
290
|
+
logoUrl: string;
|
|
291
|
+
primaryColor: string;
|
|
292
|
+
secondaryColor: string;
|
|
293
|
+
guidelinesUrl?: string | undefined;
|
|
294
|
+
};
|
|
295
|
+
inviteCode: string;
|
|
296
|
+
totalUsersAllowed: number;
|
|
297
|
+
chargeByEmail: boolean;
|
|
298
|
+
currentUsersSize?: number | undefined;
|
|
299
|
+
defaultProductId?: string | undefined;
|
|
300
|
+
defaultPlanId?: string | undefined;
|
|
301
|
+
defaultCoupomCode?: string | undefined;
|
|
302
|
+
allowedProducts?: string[] | undefined;
|
|
303
|
+
useOwnScripts?: boolean | undefined;
|
|
304
|
+
subscription?: {
|
|
305
|
+
id: string;
|
|
306
|
+
status: string;
|
|
307
|
+
product: {
|
|
308
|
+
id: string;
|
|
309
|
+
name: string;
|
|
310
|
+
descriptions: {
|
|
311
|
+
description: string;
|
|
312
|
+
subtitle: string;
|
|
313
|
+
}[];
|
|
314
|
+
plans: {
|
|
315
|
+
id: string;
|
|
316
|
+
metadata: Record<string, string>;
|
|
317
|
+
interval: string;
|
|
318
|
+
price: string;
|
|
319
|
+
currency: string;
|
|
320
|
+
subscriptionItemId: string;
|
|
321
|
+
}[];
|
|
322
|
+
metadata?: any;
|
|
323
|
+
};
|
|
324
|
+
type?: import("../subscription/Subscription.schema").Type | undefined;
|
|
325
|
+
startDate?: number | undefined;
|
|
326
|
+
daysUntilDue?: number | undefined;
|
|
327
|
+
renewAutomatically?: boolean | undefined;
|
|
328
|
+
currentPeriodStart?: number | undefined;
|
|
329
|
+
currentPeriodEnd?: number | undefined;
|
|
330
|
+
paymentMethodId?: string | undefined;
|
|
331
|
+
plan?: {
|
|
332
|
+
id: string;
|
|
333
|
+
metadata: Record<string, string>;
|
|
334
|
+
interval: string;
|
|
335
|
+
price: string;
|
|
336
|
+
currency: string;
|
|
337
|
+
subscriptionItemId: string;
|
|
338
|
+
} | undefined;
|
|
339
|
+
} | undefined;
|
|
340
|
+
}>;
|
|
341
|
+
export type Tenant = z.infer<typeof TenantSchema>;
|
|
342
|
+
export type Preferences = z.infer<typeof PreferencesSchema>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TenantSchema = exports.PreferencesSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const Subscription_schema_1 = require("../subscription/Subscription.schema");
|
|
6
|
+
exports.PreferencesSchema = zod_1.z.object({
|
|
7
|
+
iconUrl: zod_1.z.string().url(),
|
|
8
|
+
logoUrl: zod_1.z.string().url(),
|
|
9
|
+
primaryColor: zod_1.z.string(),
|
|
10
|
+
secondaryColor: zod_1.z.string(),
|
|
11
|
+
guidelinesUrl: zod_1.z.string().url().optional(),
|
|
12
|
+
});
|
|
13
|
+
exports.TenantSchema = zod_1.z.object({
|
|
14
|
+
id: zod_1.z.string(),
|
|
15
|
+
name: zod_1.z.string(),
|
|
16
|
+
isActive: zod_1.z.boolean(),
|
|
17
|
+
isSubscriptionActive: zod_1.z.boolean(),
|
|
18
|
+
preferences: exports.PreferencesSchema,
|
|
19
|
+
inviteCode: zod_1.z.string(),
|
|
20
|
+
totalUsersAllowed: zod_1.z.number(),
|
|
21
|
+
currentUsersSize: zod_1.z.number().optional(),
|
|
22
|
+
chargeByEmail: zod_1.z.boolean(),
|
|
23
|
+
defaultProductId: zod_1.z.string().optional(),
|
|
24
|
+
defaultPlanId: zod_1.z.string().optional(),
|
|
25
|
+
defaultCoupomCode: zod_1.z.string().optional(),
|
|
26
|
+
allowedProducts: zod_1.z.array(zod_1.z.string()).optional(),
|
|
27
|
+
useOwnScripts: zod_1.z.boolean().optional(),
|
|
28
|
+
subscription: zod_1.z.optional(zod_1.z.lazy(() => Subscription_schema_1.SubscriptionSchema)),
|
|
29
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.PreferencesSchema = exports.TenantSchema = void 0;
|
|
18
|
+
var Tenant_schema_1 = require("./Tenant.schema");
|
|
19
|
+
Object.defineProperty(exports, "TenantSchema", { enumerable: true, get: function () { return Tenant_schema_1.TenantSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "PreferencesSchema", { enumerable: true, get: function () { return Tenant_schema_1.PreferencesSchema; } });
|
|
21
|
+
__exportStar(require("./Tenant.api"), exports);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.Endpoints = void 0;
|
|
4
|
+
exports.Endpoints = {
|
|
5
5
|
Track: {
|
|
6
6
|
uri: "/track/public/send/",
|
|
7
7
|
method: "POST",
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
|
-
exports.TrackEndpoints = TrackEndpoints;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const TrackParamSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
value: string | number;
|
|
7
|
+
name: string;
|
|
8
|
+
}, {
|
|
9
|
+
value: string | number;
|
|
10
|
+
name: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const TrackSchema: z.ZodObject<{
|
|
13
|
+
category: z.ZodString;
|
|
14
|
+
label: z.ZodString;
|
|
15
|
+
action: z.ZodString;
|
|
16
|
+
params: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
value: string | number;
|
|
21
|
+
name: string;
|
|
22
|
+
}, {
|
|
23
|
+
value: string | number;
|
|
24
|
+
name: string;
|
|
25
|
+
}>, "many">>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
label: string;
|
|
28
|
+
category: string;
|
|
29
|
+
action: string;
|
|
30
|
+
params?: {
|
|
31
|
+
value: string | number;
|
|
32
|
+
name: string;
|
|
33
|
+
}[] | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
label: string;
|
|
36
|
+
category: string;
|
|
37
|
+
action: string;
|
|
38
|
+
params?: {
|
|
39
|
+
value: string | number;
|
|
40
|
+
name: string;
|
|
41
|
+
}[] | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
export type Track = z.infer<typeof TrackSchema>;
|
|
44
|
+
export type TrackParam = z.infer<typeof TrackParamSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TrackSchema = exports.TrackParamSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.TrackParamSchema = zod_1.z.object({
|
|
6
|
+
name: zod_1.z.string(),
|
|
7
|
+
value: zod_1.z.union([zod_1.z.string(), zod_1.z.number()]),
|
|
8
|
+
});
|
|
9
|
+
exports.TrackSchema = zod_1.z.object({
|
|
10
|
+
category: zod_1.z.string(),
|
|
11
|
+
label: zod_1.z.string(),
|
|
12
|
+
action: zod_1.z.string(),
|
|
13
|
+
params: zod_1.z.array(exports.TrackParamSchema).optional(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.TrackParamSchema = exports.TrackSchema = void 0;
|
|
18
|
+
var Track_schema_1 = require("./Track.schema");
|
|
19
|
+
Object.defineProperty(exports, "TrackSchema", { enumerable: true, get: function () { return Track_schema_1.TrackSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "TrackParamSchema", { enumerable: true, get: function () { return Track_schema_1.TrackParamSchema; } });
|
|
21
|
+
__exportStar(require("./Track.api"), exports);
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import Context from "../Context";
|
|
2
|
+
import { System, User, Update } from "./User.schema";
|
|
3
|
+
export interface IAPI {
|
|
4
|
+
getUserInfo: (context: Context) => Promise<User>;
|
|
5
|
+
isEmailAvaliable: (email: string) => Promise<boolean>;
|
|
6
|
+
sendValidationCode: (email: string) => Promise<boolean>;
|
|
7
|
+
confirmCode: (email: string, code: number, keepCode?: boolean) => Promise<boolean>;
|
|
8
|
+
changePassword: (email: string, pass: string, passConfirm: string, code: number) => Promise<boolean>;
|
|
9
|
+
changeEmail: (ctx: Context, email: string, code: number) => Promise<boolean>;
|
|
10
|
+
authenticate: (email: string, password: string, system: System) => Promise<string>;
|
|
11
|
+
update: (context: Context, update: Partial<Update>) => Promise<boolean>;
|
|
12
|
+
setup: (context: Context) => Promise<boolean>;
|
|
13
|
+
getBindedUsers: (ctx: Context) => Promise<User[]>;
|
|
14
|
+
deleteAccount: (ctx: Context) => Promise<boolean>;
|
|
15
|
+
getIntegrationToken: (ctx: Context) => Promise<string | null>;
|
|
16
|
+
createIntegrationToken: (ctx: Context) => Promise<string>;
|
|
17
|
+
createUser: (email: string, name: string, password: string, passwordConfirmation: string, profession: string | null, invitationCode: string | null) => Promise<User>;
|
|
18
|
+
}
|
|
19
|
+
export declare const Endpoints: {
|
|
20
|
+
ChangeEmail: {
|
|
21
|
+
uri: string;
|
|
22
|
+
method: string;
|
|
23
|
+
};
|
|
24
|
+
GetUserInfo: {
|
|
25
|
+
uri: string;
|
|
26
|
+
method: string;
|
|
27
|
+
};
|
|
28
|
+
GetBindedUsers: {
|
|
29
|
+
uri: string;
|
|
30
|
+
method: string;
|
|
31
|
+
};
|
|
32
|
+
EnableUser: {
|
|
33
|
+
uri: string;
|
|
34
|
+
method: string;
|
|
35
|
+
};
|
|
36
|
+
ChangePassword: {
|
|
37
|
+
uri: string;
|
|
38
|
+
method: string;
|
|
39
|
+
};
|
|
40
|
+
IsEmailAvaliable: {
|
|
41
|
+
uri: string;
|
|
42
|
+
method: string;
|
|
43
|
+
};
|
|
44
|
+
GetIntegrationToken: {
|
|
45
|
+
uri: string;
|
|
46
|
+
method: string;
|
|
47
|
+
};
|
|
48
|
+
CreateToken: {
|
|
49
|
+
uri: string;
|
|
50
|
+
method: string;
|
|
51
|
+
};
|
|
52
|
+
ConfirmCode: {
|
|
53
|
+
uri: string;
|
|
54
|
+
method: string;
|
|
55
|
+
};
|
|
56
|
+
DeleteAccount: {
|
|
57
|
+
uri: string;
|
|
58
|
+
method: string;
|
|
59
|
+
};
|
|
60
|
+
SendValidationCode: {
|
|
61
|
+
uri: string;
|
|
62
|
+
method: string;
|
|
63
|
+
};
|
|
64
|
+
Authenticate: {
|
|
65
|
+
uri: string;
|
|
66
|
+
method: string;
|
|
67
|
+
};
|
|
68
|
+
CreateUser: {
|
|
69
|
+
uri: string;
|
|
70
|
+
method: string;
|
|
71
|
+
};
|
|
72
|
+
UpdateUser: {
|
|
73
|
+
uri: string;
|
|
74
|
+
method: string;
|
|
75
|
+
};
|
|
76
|
+
Setup: {
|
|
77
|
+
uri: string;
|
|
78
|
+
method: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Endpoints = void 0;
|
|
4
|
+
exports.Endpoints = {
|
|
5
|
+
ChangeEmail: { uri: "/accounts/user/changeEmail", method: "PUT" },
|
|
6
|
+
GetUserInfo: { uri: "/accounts/user/info", method: "GET" },
|
|
7
|
+
GetBindedUsers: { uri: "/accounts/binded/list", method: "GET" },
|
|
8
|
+
EnableUser: { uri: "/api/user/register", method: "POST" },
|
|
9
|
+
ChangePassword: { uri: "/accounts/public/changePassword/", method: "POST" },
|
|
10
|
+
IsEmailAvaliable: { uri: "/accounts/public/email/avaliable", method: "GET" },
|
|
11
|
+
GetIntegrationToken: { uri: "/accounts/user/getToken/", method: "GET" },
|
|
12
|
+
CreateToken: { uri: "/accounts/user/createToken/", method: "POST" },
|
|
13
|
+
ConfirmCode: { uri: "/accounts/public/email/validate", method: "POST" },
|
|
14
|
+
DeleteAccount: { uri: "/accounts/user/delete/", method: "DELETE" },
|
|
15
|
+
SendValidationCode: { uri: "/accounts/public/email/send", method: "POST" },
|
|
16
|
+
Authenticate: { uri: "/accounts/public/login", method: "POST" },
|
|
17
|
+
CreateUser: { uri: "/accounts/public/create", method: "POST" },
|
|
18
|
+
UpdateUser: { uri: "/accounts/user/update", method: "PUT" },
|
|
19
|
+
Setup: { uri: "/accounts/user/setup/", method: "POST" },
|
|
20
|
+
};
|