@purpleschool/gptbot 0.19.8-stage-2 → 0.19.9-stage-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/build/api/index.d.ts +1 -0
- package/build/api/index.js +1 -0
- package/build/api/partner-code-routes.d.ts +21 -0
- package/build/api/partner-code-routes.js +25 -0
- package/build/commands/index.d.ts +1 -0
- package/build/commands/index.js +1 -0
- package/build/commands/partner-codes/index.d.ts +489 -0
- package/build/commands/partner-codes/index.js +73 -0
- package/build/models/index.d.ts +1 -0
- package/build/models/index.js +1 -0
- package/build/models/partner-codes/index.d.ts +1 -0
- package/build/models/partner-codes/index.js +17 -0
- package/build/models/partner-codes/partner-codes.schema.d.ts +739 -0
- package/build/models/partner-codes/partner-codes.schema.js +347 -0
- package/package.json +2 -2
package/build/api/index.d.ts
CHANGED
package/build/api/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./controllers"), exports);
|
|
18
18
|
__exportStar(require("./routes"), exports);
|
|
19
|
+
__exportStar(require("./partner-code-routes"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const PARTNER_CODE_CONTROLLER: 'private/partner-codes';
|
|
2
|
+
export declare const PARTNER_CODE_PUBLIC_CONTROLLER: 'public/activation-codes';
|
|
3
|
+
export declare const PARTNER_CODE_ADMIN_CONTROLLER: 'private/admin/partner-codes';
|
|
4
|
+
export declare const PARTNER_CODE_ROUTES: {
|
|
5
|
+
readonly OFFERS: 'offers';
|
|
6
|
+
readonly BATCHES: 'batches';
|
|
7
|
+
readonly BATCH: (uuid: string) => string;
|
|
8
|
+
readonly CODES: (uuid: string) => string;
|
|
9
|
+
readonly EXPORT: (uuid: string) => string;
|
|
10
|
+
readonly EXPORT_CHALLENGE: 'exports/challenge';
|
|
11
|
+
readonly EXPORT_VERIFY: 'exports/verify';
|
|
12
|
+
readonly REPORT: 'report';
|
|
13
|
+
readonly REPORT_CSV: 'report/csv';
|
|
14
|
+
readonly INVITES: 'invites';
|
|
15
|
+
readonly INVITE_ACCEPT: 'invites/accept';
|
|
16
|
+
readonly INVITE_REVOKE: 'invites/revoke';
|
|
17
|
+
readonly LEAKS: 'leaks';
|
|
18
|
+
readonly CHECK: 'check';
|
|
19
|
+
readonly ACTIVATE: 'activate';
|
|
20
|
+
readonly CLOSE: 'periods/close';
|
|
21
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PARTNER_CODE_ROUTES = exports.PARTNER_CODE_ADMIN_CONTROLLER = exports.PARTNER_CODE_PUBLIC_CONTROLLER = exports.PARTNER_CODE_CONTROLLER = void 0;
|
|
4
|
+
// Declarations for the audience owners only. Core registers no HTTP controllers/endpoints.
|
|
5
|
+
exports.PARTNER_CODE_CONTROLLER = 'private/partner-codes';
|
|
6
|
+
exports.PARTNER_CODE_PUBLIC_CONTROLLER = 'public/activation-codes';
|
|
7
|
+
exports.PARTNER_CODE_ADMIN_CONTROLLER = 'private/admin/partner-codes';
|
|
8
|
+
exports.PARTNER_CODE_ROUTES = {
|
|
9
|
+
OFFERS: 'offers',
|
|
10
|
+
BATCHES: 'batches',
|
|
11
|
+
BATCH: (uuid) => `batches/${uuid}`,
|
|
12
|
+
CODES: (uuid) => `batches/${uuid}/codes`,
|
|
13
|
+
EXPORT: (uuid) => `batches/${uuid}/export`,
|
|
14
|
+
EXPORT_CHALLENGE: 'exports/challenge',
|
|
15
|
+
EXPORT_VERIFY: 'exports/verify',
|
|
16
|
+
REPORT: 'report',
|
|
17
|
+
REPORT_CSV: 'report/csv',
|
|
18
|
+
INVITES: 'invites',
|
|
19
|
+
INVITE_ACCEPT: 'invites/accept',
|
|
20
|
+
INVITE_REVOKE: 'invites/revoke',
|
|
21
|
+
LEAKS: 'leaks',
|
|
22
|
+
CHECK: 'check',
|
|
23
|
+
ACTIVATE: 'activate',
|
|
24
|
+
CLOSE: 'periods/close',
|
|
25
|
+
};
|
package/build/commands/index.js
CHANGED
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace IssuePartnerBatchCommand {
|
|
3
|
+
const RequestSchema: z.ZodObject<{
|
|
4
|
+
offerId: z.ZodUUID;
|
|
5
|
+
quantity: z.ZodNumber;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
const ResponseSchema: z.ZodObject<{
|
|
8
|
+
data: z.ZodObject<{
|
|
9
|
+
uuid: z.ZodUUID;
|
|
10
|
+
partnerId: z.ZodUUID;
|
|
11
|
+
offerId: z.ZodUUID;
|
|
12
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
|
+
kind: z.ZodLiteral<"subscription">;
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
subscriptionId: z.ZodUUID;
|
|
16
|
+
durationMonths: z.ZodNumber;
|
|
17
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"stars">;
|
|
19
|
+
title: z.ZodString;
|
|
20
|
+
starsAmount: z.ZodString;
|
|
21
|
+
}, z.core.$strict>], "kind">;
|
|
22
|
+
quantity: z.ZodNumber;
|
|
23
|
+
status: z.ZodEnum<{
|
|
24
|
+
active: "active";
|
|
25
|
+
expired: "expired";
|
|
26
|
+
revoked: "revoked";
|
|
27
|
+
}>;
|
|
28
|
+
expiresAt: z.ZodISODateTime;
|
|
29
|
+
createdAt: z.ZodISODateTime;
|
|
30
|
+
createdByUserId: z.ZodNullable<z.ZodUUID>;
|
|
31
|
+
exportCount: z.ZodNumber;
|
|
32
|
+
lastExportedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
33
|
+
activatedCount: z.ZodNumber;
|
|
34
|
+
remainingCount: z.ZodNumber;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
38
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
39
|
+
}
|
|
40
|
+
export declare namespace CheckPartnerCodeCommand {
|
|
41
|
+
const RequestSchema: z.ZodObject<{
|
|
42
|
+
code: z.ZodString;
|
|
43
|
+
captchaToken: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
const ResponseSchema: z.ZodObject<{
|
|
46
|
+
data: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
|
+
validity: z.ZodLiteral<"valid">;
|
|
48
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"subscription">;
|
|
50
|
+
title: z.ZodString;
|
|
51
|
+
subscriptionId: z.ZodUUID;
|
|
52
|
+
durationMonths: z.ZodNumber;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"stars">;
|
|
55
|
+
title: z.ZodString;
|
|
56
|
+
starsAmount: z.ZodString;
|
|
57
|
+
}, z.core.$strict>], "kind">;
|
|
58
|
+
eligibility: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
|
+
state: z.ZodLiteral<"guest">;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
state: z.ZodLiteral<"allowed">;
|
|
62
|
+
preview: z.ZodObject<{
|
|
63
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"subscription">;
|
|
65
|
+
title: z.ZodString;
|
|
66
|
+
subscriptionId: z.ZodUUID;
|
|
67
|
+
durationMonths: z.ZodNumber;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"stars">;
|
|
70
|
+
title: z.ZodString;
|
|
71
|
+
starsAmount: z.ZodString;
|
|
72
|
+
}, z.core.$strict>], "kind">;
|
|
73
|
+
state: z.ZodEnum<{
|
|
74
|
+
active: "active";
|
|
75
|
+
queued: "queued";
|
|
76
|
+
}>;
|
|
77
|
+
startsAt: z.ZodISODateTime;
|
|
78
|
+
endsAt: z.ZodISODateTime;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
81
|
+
state: z.ZodLiteral<"blocked">;
|
|
82
|
+
reason: z.ZodLiteral<"auto_renewal_enabled">;
|
|
83
|
+
preview: z.ZodObject<{
|
|
84
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
85
|
+
kind: z.ZodLiteral<"subscription">;
|
|
86
|
+
title: z.ZodString;
|
|
87
|
+
subscriptionId: z.ZodUUID;
|
|
88
|
+
durationMonths: z.ZodNumber;
|
|
89
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
90
|
+
kind: z.ZodLiteral<"stars">;
|
|
91
|
+
title: z.ZodString;
|
|
92
|
+
starsAmount: z.ZodString;
|
|
93
|
+
}, z.core.$strict>], "kind">;
|
|
94
|
+
state: z.ZodEnum<{
|
|
95
|
+
active: "active";
|
|
96
|
+
queued: "queued";
|
|
97
|
+
}>;
|
|
98
|
+
startsAt: z.ZodISODateTime;
|
|
99
|
+
endsAt: z.ZodISODateTime;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
}, z.core.$strict>], "state">;
|
|
102
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
103
|
+
validity: z.ZodEnum<{
|
|
104
|
+
disabled: "disabled";
|
|
105
|
+
expired: "expired";
|
|
106
|
+
not_found: "not_found";
|
|
107
|
+
revoked: "revoked";
|
|
108
|
+
used: "used";
|
|
109
|
+
}>;
|
|
110
|
+
captchaRequired: z.ZodBoolean;
|
|
111
|
+
retryAfter: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
}, z.core.$strict>], "validity">;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
115
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
116
|
+
}
|
|
117
|
+
export declare namespace ActivatePartnerCodeCommand {
|
|
118
|
+
const RequestSchema: z.ZodObject<{
|
|
119
|
+
code: z.ZodString;
|
|
120
|
+
captchaToken: z.ZodOptional<z.ZodString>;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
const ResponseSchema: z.ZodObject<{
|
|
123
|
+
data: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
124
|
+
result: z.ZodLiteral<"ok">;
|
|
125
|
+
grant: z.ZodObject<{
|
|
126
|
+
uuid: z.ZodUUID;
|
|
127
|
+
origin: z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<"activation_code">;
|
|
129
|
+
codeId: z.ZodUUID;
|
|
130
|
+
serial: z.ZodString;
|
|
131
|
+
partnerId: z.ZodUUID;
|
|
132
|
+
}, z.core.$strict>;
|
|
133
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"subscription">;
|
|
135
|
+
title: z.ZodString;
|
|
136
|
+
subscriptionId: z.ZodUUID;
|
|
137
|
+
durationMonths: z.ZodNumber;
|
|
138
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
139
|
+
kind: z.ZodLiteral<"stars">;
|
|
140
|
+
title: z.ZodString;
|
|
141
|
+
starsAmount: z.ZodString;
|
|
142
|
+
}, z.core.$strict>], "kind">;
|
|
143
|
+
state: z.ZodEnum<{
|
|
144
|
+
active: "active";
|
|
145
|
+
queued: "queued";
|
|
146
|
+
}>;
|
|
147
|
+
startsAt: z.ZodISODateTime;
|
|
148
|
+
endsAt: z.ZodISODateTime;
|
|
149
|
+
}, z.core.$strict>;
|
|
150
|
+
idempotent: z.ZodBoolean;
|
|
151
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
152
|
+
result: z.ZodLiteral<"error">;
|
|
153
|
+
reason: z.ZodEnum<{
|
|
154
|
+
auto_renewal_enabled: "auto_renewal_enabled";
|
|
155
|
+
disabled: "disabled";
|
|
156
|
+
expired: "expired";
|
|
157
|
+
not_found: "not_found";
|
|
158
|
+
rate_limited: "rate_limited";
|
|
159
|
+
revoked: "revoked";
|
|
160
|
+
used: "used";
|
|
161
|
+
}>;
|
|
162
|
+
retryAfter: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
}, z.core.$strict>], "result">;
|
|
164
|
+
}, z.core.$strict>;
|
|
165
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
166
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
167
|
+
}
|
|
168
|
+
export declare namespace RequestPartnerCodeExportCommand {
|
|
169
|
+
const RequestSchema: z.ZodObject<{
|
|
170
|
+
batchId: z.ZodUUID;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
const ResponseSchema: z.ZodObject<{
|
|
173
|
+
data: z.ZodObject<{
|
|
174
|
+
purpose: z.ZodLiteral<"partner_code_export">;
|
|
175
|
+
challengeId: z.ZodUUID;
|
|
176
|
+
batchId: z.ZodUUID;
|
|
177
|
+
expiresAt: z.ZodISODateTime;
|
|
178
|
+
resendAt: z.ZodISODateTime;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
182
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
183
|
+
}
|
|
184
|
+
export declare namespace VerifyPartnerCodeExportCommand {
|
|
185
|
+
const RequestSchema: z.ZodObject<{
|
|
186
|
+
purpose: z.ZodLiteral<"partner_code_export">;
|
|
187
|
+
challengeId: z.ZodUUID;
|
|
188
|
+
otp: z.ZodString;
|
|
189
|
+
}, z.core.$strict>;
|
|
190
|
+
const ResponseSchema: z.ZodObject<{
|
|
191
|
+
data: z.ZodObject<{
|
|
192
|
+
challengeId: z.ZodUUID;
|
|
193
|
+
purpose: z.ZodLiteral<"partner_code_export">;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
}, z.core.$strict>;
|
|
196
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
197
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
198
|
+
}
|
|
199
|
+
export declare namespace ListPartnerInvitesCommand {
|
|
200
|
+
const RequestSchema: z.ZodObject<{}, z.core.$strict>;
|
|
201
|
+
const ResponseSchema: z.ZodObject<{
|
|
202
|
+
data: z.ZodObject<{
|
|
203
|
+
items: z.ZodArray<z.ZodObject<{
|
|
204
|
+
uuid: z.ZodUUID;
|
|
205
|
+
partnerId: z.ZodUUID;
|
|
206
|
+
recipientUserId: z.ZodUUID;
|
|
207
|
+
recipientEmail: z.ZodEmail;
|
|
208
|
+
sentByUserId: z.ZodNullable<z.ZodUUID>;
|
|
209
|
+
role: z.ZodEnum<{
|
|
210
|
+
manager: "manager";
|
|
211
|
+
owner: "owner";
|
|
212
|
+
}>;
|
|
213
|
+
status: z.ZodEnum<{
|
|
214
|
+
accepted: "accepted";
|
|
215
|
+
expired: "expired";
|
|
216
|
+
pending: "pending";
|
|
217
|
+
revoked: "revoked";
|
|
218
|
+
}>;
|
|
219
|
+
expiresAt: z.ZodISODateTime;
|
|
220
|
+
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
221
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
222
|
+
createdAt: z.ZodISODateTime;
|
|
223
|
+
}, z.core.$strict>>;
|
|
224
|
+
}, z.core.$strict>;
|
|
225
|
+
}, z.core.$strict>;
|
|
226
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
227
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
228
|
+
}
|
|
229
|
+
export declare namespace SendPartnerInviteCommand {
|
|
230
|
+
const RequestSchema: z.ZodObject<{
|
|
231
|
+
email: z.ZodEmail;
|
|
232
|
+
role: z.ZodEnum<{
|
|
233
|
+
manager: "manager";
|
|
234
|
+
owner: "owner";
|
|
235
|
+
}>;
|
|
236
|
+
}, z.core.$strict>;
|
|
237
|
+
const ResponseSchema: z.ZodObject<{
|
|
238
|
+
data: z.ZodObject<{
|
|
239
|
+
uuid: z.ZodUUID;
|
|
240
|
+
partnerId: z.ZodUUID;
|
|
241
|
+
recipientUserId: z.ZodUUID;
|
|
242
|
+
recipientEmail: z.ZodEmail;
|
|
243
|
+
sentByUserId: z.ZodNullable<z.ZodUUID>;
|
|
244
|
+
role: z.ZodEnum<{
|
|
245
|
+
manager: "manager";
|
|
246
|
+
owner: "owner";
|
|
247
|
+
}>;
|
|
248
|
+
status: z.ZodEnum<{
|
|
249
|
+
accepted: "accepted";
|
|
250
|
+
expired: "expired";
|
|
251
|
+
pending: "pending";
|
|
252
|
+
revoked: "revoked";
|
|
253
|
+
}>;
|
|
254
|
+
expiresAt: z.ZodISODateTime;
|
|
255
|
+
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
256
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
257
|
+
createdAt: z.ZodISODateTime;
|
|
258
|
+
}, z.core.$strict>;
|
|
259
|
+
}, z.core.$strict>;
|
|
260
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
261
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
262
|
+
}
|
|
263
|
+
export declare namespace AcceptPartnerInviteCommand {
|
|
264
|
+
const RequestSchema: z.ZodObject<{
|
|
265
|
+
purpose: z.ZodLiteral<"partner_invite">;
|
|
266
|
+
token: z.ZodString;
|
|
267
|
+
}, z.core.$strict>;
|
|
268
|
+
const ResponseSchema: z.ZodObject<{
|
|
269
|
+
data: z.ZodObject<{
|
|
270
|
+
uuid: z.ZodUUID;
|
|
271
|
+
partnerId: z.ZodUUID;
|
|
272
|
+
userId: z.ZodUUID;
|
|
273
|
+
role: z.ZodEnum<{
|
|
274
|
+
manager: "manager";
|
|
275
|
+
owner: "owner";
|
|
276
|
+
}>;
|
|
277
|
+
createdAt: z.ZodISODateTime;
|
|
278
|
+
}, z.core.$strict>;
|
|
279
|
+
}, z.core.$strict>;
|
|
280
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
281
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
282
|
+
}
|
|
283
|
+
export declare namespace RevokePartnerInviteCommand {
|
|
284
|
+
const RequestSchema: z.ZodObject<{
|
|
285
|
+
inviteId: z.ZodUUID;
|
|
286
|
+
}, z.core.$strict>;
|
|
287
|
+
const ResponseSchema: z.ZodObject<{
|
|
288
|
+
data: z.ZodObject<{
|
|
289
|
+
uuid: z.ZodUUID;
|
|
290
|
+
partnerId: z.ZodUUID;
|
|
291
|
+
recipientUserId: z.ZodUUID;
|
|
292
|
+
recipientEmail: z.ZodEmail;
|
|
293
|
+
sentByUserId: z.ZodNullable<z.ZodUUID>;
|
|
294
|
+
role: z.ZodEnum<{
|
|
295
|
+
manager: "manager";
|
|
296
|
+
owner: "owner";
|
|
297
|
+
}>;
|
|
298
|
+
status: z.ZodEnum<{
|
|
299
|
+
accepted: "accepted";
|
|
300
|
+
expired: "expired";
|
|
301
|
+
pending: "pending";
|
|
302
|
+
revoked: "revoked";
|
|
303
|
+
}>;
|
|
304
|
+
expiresAt: z.ZodISODateTime;
|
|
305
|
+
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
306
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
307
|
+
createdAt: z.ZodISODateTime;
|
|
308
|
+
}, z.core.$strict>;
|
|
309
|
+
}, z.core.$strict>;
|
|
310
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
311
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
312
|
+
}
|
|
313
|
+
export declare namespace GetPartnerReportCommand {
|
|
314
|
+
const RequestSchema: z.ZodObject<{
|
|
315
|
+
month: z.ZodString;
|
|
316
|
+
}, z.core.$strict>;
|
|
317
|
+
const ResponseSchema: z.ZodObject<{
|
|
318
|
+
data: z.ZodObject<{
|
|
319
|
+
version: z.ZodLiteral<1>;
|
|
320
|
+
partnerId: z.ZodUUID;
|
|
321
|
+
month: z.ZodString;
|
|
322
|
+
summary: z.ZodObject<{
|
|
323
|
+
activationsCount: z.ZodNumber;
|
|
324
|
+
retailTotal: z.ZodString;
|
|
325
|
+
commissionTotal: z.ZodString;
|
|
326
|
+
}, z.core.$strict>;
|
|
327
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
328
|
+
activationsCount: z.ZodNumber;
|
|
329
|
+
retailTotal: z.ZodString;
|
|
330
|
+
commissionTotal: z.ZodString;
|
|
331
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
332
|
+
kind: z.ZodLiteral<"subscription">;
|
|
333
|
+
title: z.ZodString;
|
|
334
|
+
subscriptionId: z.ZodUUID;
|
|
335
|
+
durationMonths: z.ZodNumber;
|
|
336
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
337
|
+
kind: z.ZodLiteral<"stars">;
|
|
338
|
+
title: z.ZodString;
|
|
339
|
+
starsAmount: z.ZodString;
|
|
340
|
+
}, z.core.$strict>], "kind">;
|
|
341
|
+
retailPrice: z.ZodString;
|
|
342
|
+
commission: z.ZodString;
|
|
343
|
+
commissionType: z.ZodEnum<{
|
|
344
|
+
fixed: "fixed";
|
|
345
|
+
percent: "percent";
|
|
346
|
+
}>;
|
|
347
|
+
commissionValue: z.ZodString;
|
|
348
|
+
}, z.core.$strict>>;
|
|
349
|
+
days: z.ZodArray<z.ZodObject<{
|
|
350
|
+
activationsCount: z.ZodNumber;
|
|
351
|
+
retailTotal: z.ZodString;
|
|
352
|
+
commissionTotal: z.ZodString;
|
|
353
|
+
day: z.ZodString;
|
|
354
|
+
}, z.core.$strict>>;
|
|
355
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
356
|
+
codeId: z.ZodUUID;
|
|
357
|
+
serial: z.ZodString;
|
|
358
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
359
|
+
kind: z.ZodLiteral<"subscription">;
|
|
360
|
+
title: z.ZodString;
|
|
361
|
+
subscriptionId: z.ZodUUID;
|
|
362
|
+
durationMonths: z.ZodNumber;
|
|
363
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
364
|
+
kind: z.ZodLiteral<"stars">;
|
|
365
|
+
title: z.ZodString;
|
|
366
|
+
starsAmount: z.ZodString;
|
|
367
|
+
}, z.core.$strict>], "kind">;
|
|
368
|
+
activatedAt: z.ZodISODateTime;
|
|
369
|
+
retailPrice: z.ZodString;
|
|
370
|
+
commission: z.ZodString;
|
|
371
|
+
commissionType: z.ZodEnum<{
|
|
372
|
+
fixed: "fixed";
|
|
373
|
+
percent: "percent";
|
|
374
|
+
}>;
|
|
375
|
+
commissionValue: z.ZodString;
|
|
376
|
+
}, z.core.$strict>>;
|
|
377
|
+
status: z.ZodEnum<{
|
|
378
|
+
closed: "closed";
|
|
379
|
+
open: "open";
|
|
380
|
+
}>;
|
|
381
|
+
closedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
382
|
+
dataVersion: z.ZodString;
|
|
383
|
+
}, z.core.$strict>;
|
|
384
|
+
}, z.core.$strict>;
|
|
385
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
386
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
387
|
+
}
|
|
388
|
+
export declare namespace ClosePartnerPeriodCommand {
|
|
389
|
+
const RequestSchema: z.ZodObject<{
|
|
390
|
+
partnerId: z.ZodUUID;
|
|
391
|
+
month: z.ZodString;
|
|
392
|
+
}, z.core.$strict>;
|
|
393
|
+
const ResponseSchema: z.ZodObject<{
|
|
394
|
+
data: z.ZodObject<{
|
|
395
|
+
periodId: z.ZodUUID;
|
|
396
|
+
alreadyClosed: z.ZodBoolean;
|
|
397
|
+
report: z.ZodObject<{
|
|
398
|
+
version: z.ZodLiteral<1>;
|
|
399
|
+
partnerId: z.ZodUUID;
|
|
400
|
+
month: z.ZodString;
|
|
401
|
+
summary: z.ZodObject<{
|
|
402
|
+
activationsCount: z.ZodNumber;
|
|
403
|
+
retailTotal: z.ZodString;
|
|
404
|
+
commissionTotal: z.ZodString;
|
|
405
|
+
}, z.core.$strict>;
|
|
406
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
407
|
+
activationsCount: z.ZodNumber;
|
|
408
|
+
retailTotal: z.ZodString;
|
|
409
|
+
commissionTotal: z.ZodString;
|
|
410
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
411
|
+
kind: z.ZodLiteral<"subscription">;
|
|
412
|
+
title: z.ZodString;
|
|
413
|
+
subscriptionId: z.ZodUUID;
|
|
414
|
+
durationMonths: z.ZodNumber;
|
|
415
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
416
|
+
kind: z.ZodLiteral<"stars">;
|
|
417
|
+
title: z.ZodString;
|
|
418
|
+
starsAmount: z.ZodString;
|
|
419
|
+
}, z.core.$strict>], "kind">;
|
|
420
|
+
retailPrice: z.ZodString;
|
|
421
|
+
commission: z.ZodString;
|
|
422
|
+
commissionType: z.ZodEnum<{
|
|
423
|
+
fixed: "fixed";
|
|
424
|
+
percent: "percent";
|
|
425
|
+
}>;
|
|
426
|
+
commissionValue: z.ZodString;
|
|
427
|
+
}, z.core.$strict>>;
|
|
428
|
+
days: z.ZodArray<z.ZodObject<{
|
|
429
|
+
activationsCount: z.ZodNumber;
|
|
430
|
+
retailTotal: z.ZodString;
|
|
431
|
+
commissionTotal: z.ZodString;
|
|
432
|
+
day: z.ZodString;
|
|
433
|
+
}, z.core.$strict>>;
|
|
434
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
435
|
+
codeId: z.ZodUUID;
|
|
436
|
+
serial: z.ZodString;
|
|
437
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
438
|
+
kind: z.ZodLiteral<"subscription">;
|
|
439
|
+
title: z.ZodString;
|
|
440
|
+
subscriptionId: z.ZodUUID;
|
|
441
|
+
durationMonths: z.ZodNumber;
|
|
442
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
443
|
+
kind: z.ZodLiteral<"stars">;
|
|
444
|
+
title: z.ZodString;
|
|
445
|
+
starsAmount: z.ZodString;
|
|
446
|
+
}, z.core.$strict>], "kind">;
|
|
447
|
+
activatedAt: z.ZodISODateTime;
|
|
448
|
+
retailPrice: z.ZodString;
|
|
449
|
+
commission: z.ZodString;
|
|
450
|
+
commissionType: z.ZodEnum<{
|
|
451
|
+
fixed: "fixed";
|
|
452
|
+
percent: "percent";
|
|
453
|
+
}>;
|
|
454
|
+
commissionValue: z.ZodString;
|
|
455
|
+
}, z.core.$strict>>;
|
|
456
|
+
status: z.ZodEnum<{
|
|
457
|
+
closed: "closed";
|
|
458
|
+
open: "open";
|
|
459
|
+
}>;
|
|
460
|
+
closedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
461
|
+
dataVersion: z.ZodString;
|
|
462
|
+
}, z.core.$strict>;
|
|
463
|
+
}, z.core.$strict>;
|
|
464
|
+
}, z.core.$strict>;
|
|
465
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
466
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
467
|
+
}
|
|
468
|
+
export declare namespace CreatePartnerLeakRequestCommand {
|
|
469
|
+
const RequestSchema: z.ZodObject<{
|
|
470
|
+
batchId: z.ZodUUID;
|
|
471
|
+
comment: z.ZodString;
|
|
472
|
+
}, z.core.$strict>;
|
|
473
|
+
const ResponseSchema: z.ZodObject<{
|
|
474
|
+
data: z.ZodObject<{
|
|
475
|
+
uuid: z.ZodUUID;
|
|
476
|
+
partnerId: z.ZodUUID;
|
|
477
|
+
batchId: z.ZodUUID;
|
|
478
|
+
comment: z.ZodString;
|
|
479
|
+
createdByUserId: z.ZodNullable<z.ZodUUID>;
|
|
480
|
+
createdAt: z.ZodISODateTime;
|
|
481
|
+
status: z.ZodEnum<{
|
|
482
|
+
open: "open";
|
|
483
|
+
resolved: "resolved";
|
|
484
|
+
}>;
|
|
485
|
+
}, z.core.$strict>;
|
|
486
|
+
}, z.core.$strict>;
|
|
487
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
488
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
489
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreatePartnerLeakRequestCommand = exports.ClosePartnerPeriodCommand = exports.GetPartnerReportCommand = exports.RevokePartnerInviteCommand = exports.AcceptPartnerInviteCommand = exports.SendPartnerInviteCommand = exports.ListPartnerInvitesCommand = exports.VerifyPartnerCodeExportCommand = exports.RequestPartnerCodeExportCommand = exports.ActivatePartnerCodeCommand = exports.CheckPartnerCodeCommand = exports.IssuePartnerBatchCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const partner_codes_1 = require("../../models/partner-codes");
|
|
6
|
+
var IssuePartnerBatchCommand;
|
|
7
|
+
(function (IssuePartnerBatchCommand) {
|
|
8
|
+
IssuePartnerBatchCommand.RequestSchema = partner_codes_1.PartnerIssueRequestSchema;
|
|
9
|
+
IssuePartnerBatchCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerBatchSchema }).strict();
|
|
10
|
+
})(IssuePartnerBatchCommand || (exports.IssuePartnerBatchCommand = IssuePartnerBatchCommand = {}));
|
|
11
|
+
var CheckPartnerCodeCommand;
|
|
12
|
+
(function (CheckPartnerCodeCommand) {
|
|
13
|
+
CheckPartnerCodeCommand.RequestSchema = partner_codes_1.PartnerCodeInputSchema;
|
|
14
|
+
CheckPartnerCodeCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerCodeCheckSchema }).strict();
|
|
15
|
+
})(CheckPartnerCodeCommand || (exports.CheckPartnerCodeCommand = CheckPartnerCodeCommand = {}));
|
|
16
|
+
var ActivatePartnerCodeCommand;
|
|
17
|
+
(function (ActivatePartnerCodeCommand) {
|
|
18
|
+
ActivatePartnerCodeCommand.RequestSchema = partner_codes_1.PartnerCodeInputSchema;
|
|
19
|
+
ActivatePartnerCodeCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerCodeActivateSchema }).strict();
|
|
20
|
+
})(ActivatePartnerCodeCommand || (exports.ActivatePartnerCodeCommand = ActivatePartnerCodeCommand = {}));
|
|
21
|
+
var RequestPartnerCodeExportCommand;
|
|
22
|
+
(function (RequestPartnerCodeExportCommand) {
|
|
23
|
+
RequestPartnerCodeExportCommand.RequestSchema = partner_codes_1.PartnerExportChallengeRequestSchema;
|
|
24
|
+
RequestPartnerCodeExportCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerExportChallengeSchema }).strict();
|
|
25
|
+
})(RequestPartnerCodeExportCommand || (exports.RequestPartnerCodeExportCommand = RequestPartnerCodeExportCommand = {}));
|
|
26
|
+
var VerifyPartnerCodeExportCommand;
|
|
27
|
+
(function (VerifyPartnerCodeExportCommand) {
|
|
28
|
+
VerifyPartnerCodeExportCommand.RequestSchema = partner_codes_1.PartnerExportChallengeVerifySchema;
|
|
29
|
+
VerifyPartnerCodeExportCommand.ResponseSchema = zod_1.z
|
|
30
|
+
.object({
|
|
31
|
+
data: zod_1.z
|
|
32
|
+
.object({ challengeId: zod_1.z.uuid(), purpose: zod_1.z.literal('partner_code_export') })
|
|
33
|
+
.strict(),
|
|
34
|
+
})
|
|
35
|
+
.strict();
|
|
36
|
+
})(VerifyPartnerCodeExportCommand || (exports.VerifyPartnerCodeExportCommand = VerifyPartnerCodeExportCommand = {}));
|
|
37
|
+
var ListPartnerInvitesCommand;
|
|
38
|
+
(function (ListPartnerInvitesCommand) {
|
|
39
|
+
ListPartnerInvitesCommand.RequestSchema = zod_1.z.object({}).strict();
|
|
40
|
+
ListPartnerInvitesCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerInviteListSchema }).strict();
|
|
41
|
+
})(ListPartnerInvitesCommand || (exports.ListPartnerInvitesCommand = ListPartnerInvitesCommand = {}));
|
|
42
|
+
var SendPartnerInviteCommand;
|
|
43
|
+
(function (SendPartnerInviteCommand) {
|
|
44
|
+
SendPartnerInviteCommand.RequestSchema = partner_codes_1.PartnerInviteSendSchema;
|
|
45
|
+
SendPartnerInviteCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerInviteSchema }).strict();
|
|
46
|
+
})(SendPartnerInviteCommand || (exports.SendPartnerInviteCommand = SendPartnerInviteCommand = {}));
|
|
47
|
+
var AcceptPartnerInviteCommand;
|
|
48
|
+
(function (AcceptPartnerInviteCommand) {
|
|
49
|
+
AcceptPartnerInviteCommand.RequestSchema = partner_codes_1.PartnerInviteAcceptSchema;
|
|
50
|
+
AcceptPartnerInviteCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerMembershipSchema }).strict();
|
|
51
|
+
})(AcceptPartnerInviteCommand || (exports.AcceptPartnerInviteCommand = AcceptPartnerInviteCommand = {}));
|
|
52
|
+
var RevokePartnerInviteCommand;
|
|
53
|
+
(function (RevokePartnerInviteCommand) {
|
|
54
|
+
RevokePartnerInviteCommand.RequestSchema = partner_codes_1.PartnerInviteRevokeSchema;
|
|
55
|
+
RevokePartnerInviteCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerInviteSchema }).strict();
|
|
56
|
+
})(RevokePartnerInviteCommand || (exports.RevokePartnerInviteCommand = RevokePartnerInviteCommand = {}));
|
|
57
|
+
var GetPartnerReportCommand;
|
|
58
|
+
(function (GetPartnerReportCommand) {
|
|
59
|
+
GetPartnerReportCommand.RequestSchema = zod_1.z.object({ month: partner_codes_1.PartnerMonthSchema }).strict();
|
|
60
|
+
GetPartnerReportCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerReportSchema }).strict();
|
|
61
|
+
})(GetPartnerReportCommand || (exports.GetPartnerReportCommand = GetPartnerReportCommand = {}));
|
|
62
|
+
var ClosePartnerPeriodCommand;
|
|
63
|
+
(function (ClosePartnerPeriodCommand) {
|
|
64
|
+
ClosePartnerPeriodCommand.RequestSchema = zod_1.z
|
|
65
|
+
.object({ partnerId: zod_1.z.uuid(), month: partner_codes_1.PartnerMonthSchema })
|
|
66
|
+
.strict();
|
|
67
|
+
ClosePartnerPeriodCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerCloseResultSchema }).strict();
|
|
68
|
+
})(ClosePartnerPeriodCommand || (exports.ClosePartnerPeriodCommand = ClosePartnerPeriodCommand = {}));
|
|
69
|
+
var CreatePartnerLeakRequestCommand;
|
|
70
|
+
(function (CreatePartnerLeakRequestCommand) {
|
|
71
|
+
CreatePartnerLeakRequestCommand.RequestSchema = partner_codes_1.PartnerLeakCreateSchema;
|
|
72
|
+
CreatePartnerLeakRequestCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerLeakRequestSchema }).strict();
|
|
73
|
+
})(CreatePartnerLeakRequestCommand || (exports.CreatePartnerLeakRequestCommand = CreatePartnerLeakRequestCommand = {}));
|
package/build/models/index.d.ts
CHANGED
|
@@ -81,5 +81,6 @@ export * from './user-profile.schema';
|
|
|
81
81
|
export * from './b2b';
|
|
82
82
|
export * from './json-value.schema';
|
|
83
83
|
export * from './team-account';
|
|
84
|
+
export * from './partner-codes';
|
|
84
85
|
export * from './canvas-template.schema';
|
|
85
86
|
export * from './user-loyalty-status.schema';
|
package/build/models/index.js
CHANGED
|
@@ -97,5 +97,6 @@ __exportStar(require("./user-profile.schema"), exports);
|
|
|
97
97
|
__exportStar(require("./b2b"), exports);
|
|
98
98
|
__exportStar(require("./json-value.schema"), exports);
|
|
99
99
|
__exportStar(require("./team-account"), exports);
|
|
100
|
+
__exportStar(require("./partner-codes"), exports);
|
|
100
101
|
__exportStar(require("./canvas-template.schema"), exports);
|
|
101
102
|
__exportStar(require("./user-loyalty-status.schema"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './partner-codes.schema';
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
__exportStar(require("./partner-codes.schema"), exports);
|