shred-api-client 2.0.9 → 2.0.10-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/index.d.mts +2596 -0
  2. package/dist/index.d.ts +2596 -15
  3. package/dist/index.js +1788 -40
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +1747 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +6 -5
  8. package/dist/api/AppConfig.api.d.ts +0 -9
  9. package/dist/api/AppConfig.api.js +0 -42
  10. package/dist/api/Email.api.d.ts +0 -10
  11. package/dist/api/Email.api.js +0 -42
  12. package/dist/api/Goal.api.d.ts +0 -10
  13. package/dist/api/Goal.api.js +0 -42
  14. package/dist/api/Note.api.d.ts +0 -13
  15. package/dist/api/Note.api.js +0 -60
  16. package/dist/api/Notification.api.d.ts +0 -18
  17. package/dist/api/Notification.api.js +0 -80
  18. package/dist/api/Project.api.d.ts +0 -26
  19. package/dist/api/Project.api.js +0 -122
  20. package/dist/api/Prompt.api.d.ts +0 -14
  21. package/dist/api/Prompt.api.js +0 -41
  22. package/dist/api/Subscription.api.d.ts +0 -18
  23. package/dist/api/Subscription.api.js +0 -69
  24. package/dist/api/Tenant.api.d.ts +0 -14
  25. package/dist/api/Tenant.api.js +0 -47
  26. package/dist/api/Track.api.d.ts +0 -9
  27. package/dist/api/Track.api.js +0 -19
  28. package/dist/api/User.api.d.ts +0 -25
  29. package/dist/api/User.api.js +0 -98
  30. package/dist/model/Api.d.ts +0 -26
  31. package/dist/model/Api.js +0 -33
  32. package/dist/model/Context.d.ts +0 -5
  33. package/dist/model/Context.js +0 -2
  34. package/dist/model/Env.d.ts +0 -2
  35. package/dist/model/Env.js +0 -2
  36. package/dist/model/app-config/AppConfig.api.d.ts +0 -9
  37. package/dist/model/app-config/AppConfig.api.js +0 -9
  38. package/dist/model/app-config/index.d.ts +0 -1
  39. package/dist/model/app-config/index.js +0 -17
  40. package/dist/model/asset/Asset.schema.d.ts +0 -43
  41. package/dist/model/asset/Asset.schema.js +0 -19
  42. package/dist/model/asset/index.d.ts +0 -2
  43. package/dist/model/asset/index.js +0 -5
  44. package/dist/model/core/APIResponse.d.ts +0 -6
  45. package/dist/model/core/APIResponse.js +0 -2
  46. package/dist/model/core/Query.d.ts +0 -15
  47. package/dist/model/core/Query.js +0 -2
  48. package/dist/model/core/index.d.ts +0 -2
  49. package/dist/model/core/index.js +0 -18
  50. package/dist/model/email/Email.api.d.ts +0 -11
  51. package/dist/model/email/Email.api.js +0 -9
  52. package/dist/model/email/Email.schema.d.ts +0 -15
  53. package/dist/model/email/Email.schema.js +0 -9
  54. package/dist/model/email/index.d.ts +0 -3
  55. package/dist/model/email/index.js +0 -20
  56. package/dist/model/exceptions/ConflictException.d.ts +0 -4
  57. package/dist/model/exceptions/ConflictException.js +0 -13
  58. package/dist/model/exceptions/ForbiddenException.d.ts +0 -4
  59. package/dist/model/exceptions/ForbiddenException.js +0 -13
  60. package/dist/model/exceptions/InvalidArgumentException.d.ts +0 -4
  61. package/dist/model/exceptions/InvalidArgumentException.js +0 -13
  62. package/dist/model/exceptions/ResourceNotFoundException.d.ts +0 -4
  63. package/dist/model/exceptions/ResourceNotFoundException.js +0 -13
  64. package/dist/model/exceptions/ShredException.d.ts +0 -4
  65. package/dist/model/exceptions/ShredException.js +0 -10
  66. package/dist/model/exceptions/UnauthorizedException.d.ts +0 -4
  67. package/dist/model/exceptions/UnauthorizedException.js +0 -13
  68. package/dist/model/exceptions/index.d.ts +0 -16
  69. package/dist/model/exceptions/index.js +0 -20
  70. package/dist/model/goal/Goal.api.d.ts +0 -11
  71. package/dist/model/goal/Goal.api.js +0 -6
  72. package/dist/model/goal/Goal.schema.d.ts +0 -154
  73. package/dist/model/goal/Goal.schema.js +0 -26
  74. package/dist/model/goal/index.d.ts +0 -3
  75. package/dist/model/goal/index.js +0 -22
  76. package/dist/model/note/Note.api.d.ts +0 -26
  77. package/dist/model/note/Note.api.js +0 -21
  78. package/dist/model/note/Note.schema.d.ts +0 -141
  79. package/dist/model/note/Note.schema.js +0 -30
  80. package/dist/model/note/index.d.ts +0 -3
  81. package/dist/model/note/index.js +0 -21
  82. package/dist/model/notification/Notification.api.d.ts +0 -47
  83. package/dist/model/notification/Notification.api.js +0 -13
  84. package/dist/model/notification/Notification.schema.d.ts +0 -454
  85. package/dist/model/notification/Notification.schema.js +0 -111
  86. package/dist/model/notification/index.d.ts +0 -3
  87. package/dist/model/notification/index.js +0 -30
  88. package/dist/model/project/Project.api.d.ts +0 -83
  89. package/dist/model/project/Project.api.js +0 -26
  90. package/dist/model/project/Project.schema.d.ts +0 -209
  91. package/dist/model/project/Project.schema.js +0 -60
  92. package/dist/model/project/index.d.ts +0 -3
  93. package/dist/model/project/index.js +0 -24
  94. package/dist/model/prompt/Prompt.api.d.ts +0 -31
  95. package/dist/model/prompt/Prompt.api.js +0 -25
  96. package/dist/model/prompt/Prompt.schema.d.ts +0 -165
  97. package/dist/model/prompt/Prompt.schema.js +0 -24
  98. package/dist/model/prompt/index.d.ts +0 -3
  99. package/dist/model/prompt/index.js +0 -22
  100. package/dist/model/subscription/Subscription.api.d.ts +0 -59
  101. package/dist/model/subscription/Subscription.api.js +0 -49
  102. package/dist/model/subscription/Subscription.schema.d.ts +0 -314
  103. package/dist/model/subscription/Subscription.schema.js +0 -53
  104. package/dist/model/subscription/index.d.ts +0 -3
  105. package/dist/model/subscription/index.js +0 -25
  106. package/dist/model/tenant/Tenant.api.d.ts +0 -35
  107. package/dist/model/tenant/Tenant.api.js +0 -29
  108. package/dist/model/tenant/Tenant.schema.d.ts +0 -342
  109. package/dist/model/tenant/Tenant.schema.js +0 -29
  110. package/dist/model/tenant/index.d.ts +0 -3
  111. package/dist/model/tenant/index.js +0 -21
  112. package/dist/model/track/Track.api.d.ts +0 -10
  113. package/dist/model/track/Track.api.js +0 -9
  114. package/dist/model/track/Track.schema.d.ts +0 -44
  115. package/dist/model/track/Track.schema.js +0 -14
  116. package/dist/model/track/index.d.ts +0 -3
  117. package/dist/model/track/index.js +0 -21
  118. package/dist/model/user/User.api.d.ts +0 -86
  119. package/dist/model/user/User.api.js +0 -21
  120. package/dist/model/user/User.schema.d.ts +0 -117
  121. package/dist/model/user/User.schema.js +0 -42
  122. package/dist/model/user/index.d.ts +0 -3
  123. package/dist/model/user/index.js +0 -23
  124. package/dist/util/HTTPClient.d.ts +0 -5
  125. package/dist/util/HTTPClient.js +0 -71
  126. package/dist/util/parseQuery.d.ts +0 -2
  127. package/dist/util/parseQuery.js +0 -25
@@ -1,342 +0,0 @@
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>;
@@ -1,29 +0,0 @@
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
- });
@@ -1,3 +0,0 @@
1
- export type { Tenant as Entity, Preferences } from "./Tenant.schema";
2
- export { TenantSchema, PreferencesSchema } from "./Tenant.schema";
3
- export * from "./Tenant.api";
@@ -1,21 +0,0 @@
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 +0,0 @@
1
- import { Track } from "./Track.schema";
2
- export interface IAPI {
3
- send: (t: Track) => Promise<boolean>;
4
- }
5
- export declare const Endpoints: {
6
- Track: {
7
- uri: string;
8
- method: string;
9
- };
10
- };
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Endpoints = void 0;
4
- exports.Endpoints = {
5
- Track: {
6
- uri: "/track/public/send/",
7
- method: "POST",
8
- },
9
- };
@@ -1,44 +0,0 @@
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>;
@@ -1,14 +0,0 @@
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
- });
@@ -1,3 +0,0 @@
1
- export type { Track as Entity, TrackParam } from "./Track.schema";
2
- export { TrackSchema, TrackParamSchema } from "./Track.schema";
3
- export * from "./Track.api";
@@ -1,21 +0,0 @@
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);
@@ -1,86 +0,0 @@
1
- import * as Core from "../core";
2
- import Context from "../Context";
3
- import { System, User, Update } from "./User.schema";
4
- export interface IAPI {
5
- getUserInfo: (context: Context) => Promise<User>;
6
- isEmailAvaliable: (email: string) => Promise<boolean>;
7
- sendValidationCode: (email: string) => Promise<boolean>;
8
- confirmCode: (email: string, code: number, keepCode?: boolean) => Promise<boolean>;
9
- changePassword: (email: string, pass: string, passConfirm: string, code: number) => Promise<boolean>;
10
- changeEmail: (ctx: Context, email: string, code: number) => Promise<boolean>;
11
- authenticate: (email: string, password: string, system: System) => Promise<string>;
12
- update: (context: Context, update: Partial<Update>) => Promise<boolean>;
13
- setup: (context: Context) => Promise<boolean>;
14
- getBindedUsers: (ctx: Context) => Promise<User[]>;
15
- deleteAccount: (ctx: Context) => Promise<boolean>;
16
- getIntegrationToken: (ctx: Context) => Promise<string | null>;
17
- createIntegrationToken: (ctx: Context) => Promise<string>;
18
- search: (ctx: Context, query: Core.QueryOptions<User>) => Promise<Core.APIResponse<User>>;
19
- createUser: (email: string, name: string, password: string, passwordConfirmation: string, profession: string | null, invitationCode: string | null) => Promise<User>;
20
- }
21
- export declare const Endpoints: {
22
- ChangeEmail: {
23
- uri: string;
24
- method: string;
25
- };
26
- GetUserInfo: {
27
- uri: string;
28
- method: string;
29
- };
30
- GetBindedUsers: {
31
- uri: string;
32
- method: string;
33
- };
34
- EnableUser: {
35
- uri: string;
36
- method: string;
37
- };
38
- ChangePassword: {
39
- uri: string;
40
- method: string;
41
- };
42
- IsEmailAvaliable: {
43
- uri: string;
44
- method: string;
45
- };
46
- GetIntegrationToken: {
47
- uri: string;
48
- method: string;
49
- };
50
- CreateToken: {
51
- uri: string;
52
- method: string;
53
- };
54
- ConfirmCode: {
55
- uri: string;
56
- method: string;
57
- };
58
- DeleteAccount: {
59
- uri: string;
60
- method: string;
61
- };
62
- SendValidationCode: {
63
- uri: string;
64
- method: string;
65
- };
66
- Authenticate: {
67
- uri: string;
68
- method: string;
69
- };
70
- CreateUser: {
71
- uri: string;
72
- method: string;
73
- };
74
- UpdateUser: {
75
- uri: string;
76
- method: string;
77
- };
78
- Setup: {
79
- uri: string;
80
- method: string;
81
- };
82
- Search: {
83
- uri: string;
84
- method: string;
85
- };
86
- };
@@ -1,21 +0,0 @@
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
- Search: { uri: "/accounts/users/search/", method: "GET" },
21
- };