@purpleschool/gptbot 0.19.17-stage-2 → 0.19.18-stage-2-apple
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/controllers/http/payment.d.ts +0 -1
- package/build/api/controllers/http/payment.js +0 -1
- package/build/api/controllers/http/subscription.d.ts +0 -1
- package/build/api/controllers/http/subscription.js +0 -1
- package/build/api/partner-code-routes.d.ts +0 -31
- package/build/api/partner-code-routes.js +1 -33
- package/build/api/routes.d.ts +0 -6
- package/build/api/routes.js +0 -7
- package/build/commands/auth/register-user.command.d.ts +0 -1
- package/build/commands/auth/register-user.command.js +0 -2
- package/build/commands/auth/vk-login.command.d.ts +0 -1
- package/build/commands/auth/vk-login.command.js +0 -2
- package/build/commands/auth/yandex-login.command.d.ts +0 -1
- package/build/commands/auth/yandex-login.command.js +0 -2
- package/build/commands/partner-codes/index.d.ts +3 -50
- package/build/commands/partner-codes/index.js +3 -28
- package/build/commands/payment/index.d.ts +0 -1
- package/build/commands/payment/index.js +0 -1
- package/build/commands/subscription/downgrade-subscription.command.d.ts +5 -28
- package/build/commands/subscription/downgrade-subscription.command.js +9 -32
- package/build/commands/subscription/get-subscriptions-summary.command.d.ts +0 -32
- package/build/commands/subscription/get-subscriptions-summary.command.js +0 -2
- package/build/commands/subscription/index.d.ts +0 -1
- package/build/commands/subscription/index.js +0 -1
- package/build/commands/user/get-me.command.d.ts +0 -3
- package/build/commands/user/get-me.command.js +0 -1
- package/build/helpers/image-generation/calculate-gpt-image-2-price-with-margin.helper.d.ts +62 -0
- package/build/helpers/image-generation/calculate-gpt-image-2-price-with-margin.helper.js +137 -0
- package/build/models/index.d.ts +0 -1
- package/build/models/index.js +0 -1
- package/build/models/partner-codes/index.d.ts +0 -4
- package/build/models/partner-codes/index.js +0 -4
- package/build/models/partner-codes/partner-codes.schema.d.ts +2 -78
- package/build/models/partner-codes/partner-codes.schema.js +5 -73
- package/package.json +1 -1
- package/build/commands/partner-codes/administration.d.ts +0 -650
- package/build/commands/partner-codes/administration.js +0 -138
- package/build/commands/payment/get-purchase-history.command.d.ts +0 -90
- package/build/commands/payment/get-purchase-history.command.js +0 -22
- package/build/commands/subscription/payment-incident-diagnostics.d.ts +0 -445
- package/build/commands/subscription/payment-incident-diagnostics.js +0 -173
- package/build/models/partner-codes/partner-administration.schema.d.ts +0 -183
- package/build/models/partner-codes/partner-administration.schema.js +0 -72
- package/build/models/partner-codes/partner-cabinet-context.schema.d.ts +0 -24
- package/build/models/partner-codes/partner-cabinet-context.schema.js +0 -8
- package/build/models/partner-codes/partner-cabinet.schema.d.ts +0 -362
- package/build/models/partner-codes/partner-cabinet.schema.js +0 -84
- package/build/models/partner-codes/partner-leak-create.schema.d.ts +0 -6
- package/build/models/partner-codes/partner-leak-create.schema.js +0 -8
- package/build/models/partner-registration-context.schema.d.ts +0 -3
- package/build/models/partner-registration-context.schema.js +0 -6
- package/build/models/purchase-history.schema.d.ts +0 -112
- package/build/models/purchase-history.schema.js +0 -38
|
@@ -13,7 +13,6 @@ export declare const SUBSCRIPTION_ROUTES: {
|
|
|
13
13
|
readonly GET_AVAILABLE_DOWNGRADES: 'available-downgrades';
|
|
14
14
|
readonly UPGRADE: 'upgrade';
|
|
15
15
|
readonly DOWNGRADE: 'downgrade';
|
|
16
|
-
readonly DOWNGRADE_STATUS: (operationId: string) => string;
|
|
17
16
|
readonly FREE: 'free';
|
|
18
17
|
readonly SUMMARY: 'summary';
|
|
19
18
|
readonly RECOVER_PAST_DUE: (uuid: string) => string;
|
|
@@ -16,7 +16,6 @@ exports.SUBSCRIPTION_ROUTES = {
|
|
|
16
16
|
GET_AVAILABLE_DOWNGRADES: 'available-downgrades',
|
|
17
17
|
UPGRADE: 'upgrade',
|
|
18
18
|
DOWNGRADE: 'downgrade',
|
|
19
|
-
DOWNGRADE_STATUS: (operationId) => `downgrade-operations/${operationId}`,
|
|
20
19
|
FREE: 'free',
|
|
21
20
|
SUMMARY: 'summary',
|
|
22
21
|
RECOVER_PAST_DUE: (uuid) => `${uuid}/recover-past-due`,
|
|
@@ -1,50 +1,19 @@
|
|
|
1
1
|
export declare const PARTNER_CODE_CONTROLLER: 'private/partner-codes';
|
|
2
2
|
export declare const PARTNER_CODE_PUBLIC_CONTROLLER: 'public/activation-codes';
|
|
3
3
|
export declare const PARTNER_CODE_ADMIN_CONTROLLER: 'private/admin/partner-codes';
|
|
4
|
-
export declare const PARTNER_CODE_ADMIN_ROUTES: {
|
|
5
|
-
readonly CATALOG: 'catalog';
|
|
6
|
-
readonly COMPANIES: 'companies';
|
|
7
|
-
readonly COMPANY: (partnerId: string) => string;
|
|
8
|
-
readonly DISABLE: (partnerId: string) => string;
|
|
9
|
-
readonly ENABLE: (partnerId: string) => string;
|
|
10
|
-
readonly MEMBERSHIPS: (partnerId: string) => string;
|
|
11
|
-
readonly MEMBERSHIP: (partnerId: string, userId: string) => string;
|
|
12
|
-
readonly OFFERS: (partnerId: string) => string;
|
|
13
|
-
readonly OFFER: (partnerId: string, offerId: string) => string;
|
|
14
|
-
readonly BATCHES: (partnerId: string) => string;
|
|
15
|
-
readonly BATCH: (partnerId: string, batchId: string) => string;
|
|
16
|
-
readonly CODES: (partnerId: string, batchId: string) => string;
|
|
17
|
-
readonly EXPORT: (partnerId: string, batchId: string) => string;
|
|
18
|
-
readonly EXPORTS: (partnerId: string, batchId: string) => string;
|
|
19
|
-
readonly REVOKE_BATCH: (partnerId: string, batchId: string) => string;
|
|
20
|
-
readonly REVOKE_CODE: (partnerId: string, codeId: string) => string;
|
|
21
|
-
readonly SEARCH: 'codes/search';
|
|
22
|
-
readonly REPORT: (partnerId: string) => string;
|
|
23
|
-
readonly REPORT_CSV: (partnerId: string) => string;
|
|
24
|
-
readonly REPORT_PERIODS: (partnerId: string) => string;
|
|
25
|
-
readonly CLOSE: 'periods/close';
|
|
26
|
-
readonly LEAKS: 'leaks';
|
|
27
|
-
};
|
|
28
4
|
export declare const PARTNER_CODE_ROUTES: {
|
|
29
|
-
readonly ME: 'me';
|
|
30
5
|
readonly OFFERS: 'offers';
|
|
31
6
|
readonly BATCHES: 'batches';
|
|
32
7
|
readonly BATCH: (uuid: string) => string;
|
|
33
8
|
readonly CODES: (uuid: string) => string;
|
|
34
9
|
readonly EXPORT: (uuid: string) => string;
|
|
35
|
-
readonly EXPORTS: (uuid: string) => string;
|
|
36
10
|
readonly EXPORT_CHALLENGE: 'exports/challenge';
|
|
37
11
|
readonly EXPORT_VERIFY: 'exports/verify';
|
|
38
12
|
readonly REPORT: 'report';
|
|
39
13
|
readonly REPORT_CSV: 'report/csv';
|
|
40
|
-
readonly REPORT_PERIODS: 'report/periods';
|
|
41
14
|
readonly INVITES: 'invites';
|
|
42
|
-
readonly MEMBERS: 'members';
|
|
43
|
-
readonly MEMBER: (uuid: string) => string;
|
|
44
|
-
readonly INVITE_READ: 'invites/read';
|
|
45
15
|
readonly INVITE_ACCEPT: 'invites/accept';
|
|
46
16
|
readonly INVITE_REVOKE: 'invites/revoke';
|
|
47
|
-
readonly INVITE_RESEND: 'invites/resend';
|
|
48
17
|
readonly LEAKS: 'leaks';
|
|
49
18
|
readonly CHECK: 'check';
|
|
50
19
|
readonly ACTIVATE: 'activate';
|
|
@@ -1,55 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PARTNER_CODE_ROUTES = exports.
|
|
3
|
+
exports.PARTNER_CODE_ROUTES = exports.PARTNER_CODE_ADMIN_CONTROLLER = exports.PARTNER_CODE_PUBLIC_CONTROLLER = exports.PARTNER_CODE_CONTROLLER = void 0;
|
|
4
4
|
// Declarations for the audience owners only. Core registers no HTTP controllers/endpoints.
|
|
5
5
|
exports.PARTNER_CODE_CONTROLLER = 'private/partner-codes';
|
|
6
6
|
exports.PARTNER_CODE_PUBLIC_CONTROLLER = 'public/activation-codes';
|
|
7
7
|
exports.PARTNER_CODE_ADMIN_CONTROLLER = 'private/admin/partner-codes';
|
|
8
|
-
// ADMIN role and current core authorization; no partner OTP or checkout for issue/export.
|
|
9
|
-
exports.PARTNER_CODE_ADMIN_ROUTES = {
|
|
10
|
-
CATALOG: 'catalog',
|
|
11
|
-
COMPANIES: 'companies',
|
|
12
|
-
COMPANY: (partnerId) => `companies/${partnerId}`,
|
|
13
|
-
DISABLE: (partnerId) => `companies/${partnerId}/disable`,
|
|
14
|
-
ENABLE: (partnerId) => `companies/${partnerId}/enable`,
|
|
15
|
-
MEMBERSHIPS: (partnerId) => `companies/${partnerId}/memberships`,
|
|
16
|
-
MEMBERSHIP: (partnerId, userId) => `companies/${partnerId}/memberships/${userId}`,
|
|
17
|
-
OFFERS: (partnerId) => `companies/${partnerId}/offers`,
|
|
18
|
-
OFFER: (partnerId, offerId) => `companies/${partnerId}/offers/${offerId}`,
|
|
19
|
-
BATCHES: (partnerId) => `companies/${partnerId}/batches`,
|
|
20
|
-
BATCH: (partnerId, batchId) => `companies/${partnerId}/batches/${batchId}`,
|
|
21
|
-
CODES: (partnerId, batchId) => `companies/${partnerId}/batches/${batchId}/codes`,
|
|
22
|
-
EXPORT: (partnerId, batchId) => `companies/${partnerId}/batches/${batchId}/export`,
|
|
23
|
-
EXPORTS: (partnerId, batchId) => `companies/${partnerId}/batches/${batchId}/exports`,
|
|
24
|
-
REVOKE_BATCH: (partnerId, batchId) => `companies/${partnerId}/batches/${batchId}/revoke`,
|
|
25
|
-
REVOKE_CODE: (partnerId, codeId) => `companies/${partnerId}/codes/${codeId}/revoke`,
|
|
26
|
-
SEARCH: 'codes/search',
|
|
27
|
-
REPORT: (partnerId) => `companies/${partnerId}/report`,
|
|
28
|
-
REPORT_CSV: (partnerId) => `companies/${partnerId}/report/csv`,
|
|
29
|
-
REPORT_PERIODS: (partnerId) => `companies/${partnerId}/report/periods`,
|
|
30
|
-
CLOSE: 'periods/close',
|
|
31
|
-
LEAKS: 'leaks',
|
|
32
|
-
};
|
|
33
8
|
exports.PARTNER_CODE_ROUTES = {
|
|
34
|
-
ME: 'me',
|
|
35
9
|
OFFERS: 'offers',
|
|
36
10
|
BATCHES: 'batches',
|
|
37
11
|
BATCH: (uuid) => `batches/${uuid}`,
|
|
38
12
|
CODES: (uuid) => `batches/${uuid}/codes`,
|
|
39
13
|
EXPORT: (uuid) => `batches/${uuid}/export`,
|
|
40
|
-
EXPORTS: (uuid) => `batches/${uuid}/exports`,
|
|
41
14
|
EXPORT_CHALLENGE: 'exports/challenge',
|
|
42
15
|
EXPORT_VERIFY: 'exports/verify',
|
|
43
16
|
REPORT: 'report',
|
|
44
17
|
REPORT_CSV: 'report/csv',
|
|
45
|
-
REPORT_PERIODS: 'report/periods',
|
|
46
18
|
INVITES: 'invites',
|
|
47
|
-
MEMBERS: 'members',
|
|
48
|
-
MEMBER: (uuid) => `members/${uuid}`,
|
|
49
|
-
INVITE_READ: 'invites/read',
|
|
50
19
|
INVITE_ACCEPT: 'invites/accept',
|
|
51
20
|
INVITE_REVOKE: 'invites/revoke',
|
|
52
|
-
INVITE_RESEND: 'invites/resend',
|
|
53
21
|
LEAKS: 'leaks',
|
|
54
22
|
CHECK: 'check',
|
|
55
23
|
ACTIVATE: 'activate',
|
package/build/api/routes.d.ts
CHANGED
|
@@ -4,10 +4,6 @@ export declare const REST_API: {
|
|
|
4
4
|
readonly GET: "/api/private/onboarding";
|
|
5
5
|
readonly ACK: "/api/private/onboarding/notifications/ack";
|
|
6
6
|
};
|
|
7
|
-
readonly ACTIVATION_CODES: {
|
|
8
|
-
readonly CHECK: "/api/public/activation-codes/check";
|
|
9
|
-
readonly ACTIVATE: "/api/public/activation-codes/activate";
|
|
10
|
-
};
|
|
11
7
|
readonly APP_LOGIN: {
|
|
12
8
|
readonly CODE: "/api/app-login/code";
|
|
13
9
|
readonly REDEEM: "/api/app-login/redeem";
|
|
@@ -290,7 +286,6 @@ export declare const REST_API: {
|
|
|
290
286
|
readonly CREATE: "/api/subscription/private";
|
|
291
287
|
readonly UPGRADE: (uuid: string) => string;
|
|
292
288
|
readonly DOWNGRADE: (uuid: string) => string;
|
|
293
|
-
readonly DOWNGRADE_STATUS: (operationId: string) => string;
|
|
294
289
|
readonly GET_AVAILABLE_UPGRADES: "/api/subscription/private/available-upgrades";
|
|
295
290
|
readonly GET_AVAILABLE_DOWNGRADES: "/api/subscription/private/available-downgrades";
|
|
296
291
|
readonly SUMMARY: "/api/subscription/private/summary";
|
|
@@ -984,7 +979,6 @@ export declare const REST_API: {
|
|
|
984
979
|
};
|
|
985
980
|
readonly PAYMENT: {
|
|
986
981
|
readonly HISTORY: "/api/payment/history";
|
|
987
|
-
readonly PURCHASE_HISTORY: "/api/payment/purchase-history";
|
|
988
982
|
readonly REFUND: "/api/payment/refund";
|
|
989
983
|
readonly FIND_BY_CRITERIA: "/api/payment/criteria";
|
|
990
984
|
};
|
package/build/api/routes.js
CHANGED
|
@@ -36,17 +36,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.REST_API = exports.ROOT = void 0;
|
|
37
37
|
const constants_1 = require("../constants");
|
|
38
38
|
const CONTROLLERS = __importStar(require("./controllers"));
|
|
39
|
-
const partner_code_routes_1 = require("./partner-code-routes");
|
|
40
39
|
exports.ROOT = '/api';
|
|
41
40
|
exports.REST_API = {
|
|
42
41
|
ONBOARDING_PRIVATE: {
|
|
43
42
|
GET: `${exports.ROOT}/${CONTROLLERS.ONBOARDING_PRIVATE_CONTROLLER}`,
|
|
44
43
|
ACK: `${exports.ROOT}/${CONTROLLERS.ONBOARDING_PRIVATE_CONTROLLER}/${CONTROLLERS.ONBOARDING_ROUTES.ACK}`,
|
|
45
44
|
},
|
|
46
|
-
ACTIVATION_CODES: {
|
|
47
|
-
CHECK: `${exports.ROOT}/${partner_code_routes_1.PARTNER_CODE_PUBLIC_CONTROLLER}/${partner_code_routes_1.PARTNER_CODE_ROUTES.CHECK}`,
|
|
48
|
-
ACTIVATE: `${exports.ROOT}/${partner_code_routes_1.PARTNER_CODE_PUBLIC_CONTROLLER}/${partner_code_routes_1.PARTNER_CODE_ROUTES.ACTIVATE}`,
|
|
49
|
-
},
|
|
50
45
|
APP_LOGIN: {
|
|
51
46
|
CODE: `${exports.ROOT}/${CONTROLLERS.APP_LOGIN_CONTROLLER}/${CONTROLLERS.APP_LOGIN_ROUTES.CODE}`,
|
|
52
47
|
REDEEM: `${exports.ROOT}/${CONTROLLERS.APP_LOGIN_CONTROLLER}/${CONTROLLERS.APP_LOGIN_ROUTES.REDEEM}`,
|
|
@@ -329,7 +324,6 @@ exports.REST_API = {
|
|
|
329
324
|
CREATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}`,
|
|
330
325
|
UPGRADE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.UPGRADE}`,
|
|
331
326
|
DOWNGRADE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.DOWNGRADE}`,
|
|
332
|
-
DOWNGRADE_STATUS: (operationId) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.DOWNGRADE_STATUS(operationId)}`,
|
|
333
327
|
GET_AVAILABLE_UPGRADES: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_AVAILABLE_UPGRADES}`,
|
|
334
328
|
GET_AVAILABLE_DOWNGRADES: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_AVAILABLE_DOWNGRADES}`,
|
|
335
329
|
SUMMARY: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.SUMMARY}`,
|
|
@@ -1023,7 +1017,6 @@ exports.REST_API = {
|
|
|
1023
1017
|
},
|
|
1024
1018
|
PAYMENT: {
|
|
1025
1019
|
HISTORY: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.HISTORY}`,
|
|
1026
|
-
PURCHASE_HISTORY: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.PURCHASE_HISTORY}`,
|
|
1027
1020
|
REFUND: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.REFUND}`,
|
|
1028
1021
|
FIND_BY_CRITERIA: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.FIND_BY_CRITERIA}`,
|
|
1029
1022
|
},
|
|
@@ -15,7 +15,6 @@ export declare namespace RegisterUserCommand {
|
|
|
15
15
|
utmContent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
16
16
|
utmTerm: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
17
17
|
}, z.core.$strip>>;
|
|
18
|
-
partnerRegistrationContext: z.ZodOptional<z.ZodString>;
|
|
19
18
|
marketingConsent: z.ZodDefault<z.ZodBoolean>;
|
|
20
19
|
}, z.core.$strip>;
|
|
21
20
|
type Request = z.infer<typeof RequestSchema>;
|
|
@@ -3,13 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RegisterUserCommand = void 0;
|
|
4
4
|
const models_1 = require("../../models");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const partner_registration_context_schema_1 = require("../../models/partner-registration-context.schema");
|
|
7
6
|
var RegisterUserCommand;
|
|
8
7
|
(function (RegisterUserCommand) {
|
|
9
8
|
RegisterUserCommand.RequestSchema = models_1.UserSchema.pick({ email: true, password: true })
|
|
10
9
|
.extend({
|
|
11
10
|
utm: models_1.UtmSchema.optional(),
|
|
12
|
-
partnerRegistrationContext: partner_registration_context_schema_1.PartnerRegistrationContextSchema.optional(),
|
|
13
11
|
marketingConsent: zod_1.z.boolean().default(false),
|
|
14
12
|
})
|
|
15
13
|
.extend(models_1.UserReferralsSchema.shape)
|
|
@@ -11,7 +11,6 @@ export declare namespace VKLoginCommand {
|
|
|
11
11
|
device_id: z.ZodString;
|
|
12
12
|
state: z.ZodString;
|
|
13
13
|
marketingConsent: z.ZodDefault<z.ZodBoolean>;
|
|
14
|
-
partnerRegistrationContext: z.ZodOptional<z.ZodString>;
|
|
15
14
|
}, z.core.$strip>;
|
|
16
15
|
type Request = z.infer<typeof RequestSchema>;
|
|
17
16
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VKLoginCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
|
-
const partner_registration_context_schema_1 = require("../../models/partner-registration-context.schema");
|
|
7
6
|
var VKLoginCommand;
|
|
8
7
|
(function (VKLoginCommand) {
|
|
9
8
|
VKLoginCommand.RequestSchema = zod_1.z
|
|
@@ -13,7 +12,6 @@ var VKLoginCommand;
|
|
|
13
12
|
device_id: zod_1.z.string(),
|
|
14
13
|
state: zod_1.z.string(),
|
|
15
14
|
marketingConsent: zod_1.z.boolean().default(false),
|
|
16
|
-
partnerRegistrationContext: partner_registration_context_schema_1.PartnerRegistrationContextSchema.optional(),
|
|
17
15
|
})
|
|
18
16
|
.extend(models_1.UserReferralsSchema.shape)
|
|
19
17
|
.refine((data) => {
|
|
@@ -9,7 +9,6 @@ export declare namespace YandexLoginCommand {
|
|
|
9
9
|
code: z.ZodString;
|
|
10
10
|
code_verifier: z.ZodString;
|
|
11
11
|
marketingConsent: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
-
partnerRegistrationContext: z.ZodOptional<z.ZodString>;
|
|
13
12
|
}, z.core.$strip>;
|
|
14
13
|
type Request = z.infer<typeof RequestSchema>;
|
|
15
14
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.YandexLoginCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
|
-
const partner_registration_context_schema_1 = require("../../models/partner-registration-context.schema");
|
|
7
6
|
var YandexLoginCommand;
|
|
8
7
|
(function (YandexLoginCommand) {
|
|
9
8
|
YandexLoginCommand.RequestSchema = zod_1.z
|
|
@@ -11,7 +10,6 @@ var YandexLoginCommand;
|
|
|
11
10
|
code: zod_1.z.string(),
|
|
12
11
|
code_verifier: zod_1.z.string(),
|
|
13
12
|
marketingConsent: zod_1.z.boolean().default(false),
|
|
14
|
-
partnerRegistrationContext: partner_registration_context_schema_1.PartnerRegistrationContextSchema.optional(),
|
|
15
13
|
})
|
|
16
14
|
.extend(models_1.UserReferralsSchema.shape)
|
|
17
15
|
.refine((data) => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export * from './administration';
|
|
3
2
|
export declare namespace IssuePartnerBatchCommand {
|
|
4
3
|
const RequestSchema: z.ZodObject<{
|
|
5
4
|
offerId: z.ZodUUID;
|
|
@@ -18,7 +17,6 @@ export declare namespace IssuePartnerBatchCommand {
|
|
|
18
17
|
}, z.core.$strict>, z.ZodObject<{
|
|
19
18
|
kind: z.ZodLiteral<"stars">;
|
|
20
19
|
title: z.ZodString;
|
|
21
|
-
productId: z.ZodUUID;
|
|
22
20
|
starsAmount: z.ZodString;
|
|
23
21
|
}, z.core.$strict>], "kind">;
|
|
24
22
|
quantity: z.ZodNumber;
|
|
@@ -30,9 +28,6 @@ export declare namespace IssuePartnerBatchCommand {
|
|
|
30
28
|
expiresAt: z.ZodISODateTime;
|
|
31
29
|
createdAt: z.ZodISODateTime;
|
|
32
30
|
createdByUserId: z.ZodNullable<z.ZodUUID>;
|
|
33
|
-
createdBy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
34
|
-
name: z.ZodNullable<z.ZodString>;
|
|
35
|
-
}, z.core.$strict>>>;
|
|
36
31
|
exportCount: z.ZodNumber;
|
|
37
32
|
lastExportedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
38
33
|
activatedCount: z.ZodNumber;
|
|
@@ -58,10 +53,8 @@ export declare namespace CheckPartnerCodeCommand {
|
|
|
58
53
|
}, z.core.$strict>, z.ZodObject<{
|
|
59
54
|
kind: z.ZodLiteral<"stars">;
|
|
60
55
|
title: z.ZodString;
|
|
61
|
-
productId: z.ZodUUID;
|
|
62
56
|
starsAmount: z.ZodString;
|
|
63
57
|
}, z.core.$strict>], "kind">;
|
|
64
|
-
starsPerMonth: z.ZodOptional<z.ZodNumber>;
|
|
65
58
|
eligibility: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
66
59
|
state: z.ZodLiteral<"guest">;
|
|
67
60
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -75,7 +68,6 @@ export declare namespace CheckPartnerCodeCommand {
|
|
|
75
68
|
}, z.core.$strict>, z.ZodObject<{
|
|
76
69
|
kind: z.ZodLiteral<"stars">;
|
|
77
70
|
title: z.ZodString;
|
|
78
|
-
productId: z.ZodUUID;
|
|
79
71
|
starsAmount: z.ZodString;
|
|
80
72
|
}, z.core.$strict>], "kind">;
|
|
81
73
|
state: z.ZodEnum<{
|
|
@@ -97,7 +89,6 @@ export declare namespace CheckPartnerCodeCommand {
|
|
|
97
89
|
}, z.core.$strict>, z.ZodObject<{
|
|
98
90
|
kind: z.ZodLiteral<"stars">;
|
|
99
91
|
title: z.ZodString;
|
|
100
|
-
productId: z.ZodUUID;
|
|
101
92
|
starsAmount: z.ZodString;
|
|
102
93
|
}, z.core.$strict>], "kind">;
|
|
103
94
|
state: z.ZodEnum<{
|
|
@@ -108,7 +99,6 @@ export declare namespace CheckPartnerCodeCommand {
|
|
|
108
99
|
endsAt: z.ZodISODateTime;
|
|
109
100
|
}, z.core.$strict>;
|
|
110
101
|
}, z.core.$strict>], "state">;
|
|
111
|
-
partnerRegistrationContext: z.ZodOptional<z.ZodString>;
|
|
112
102
|
}, z.core.$strict>, z.ZodObject<{
|
|
113
103
|
validity: z.ZodEnum<{
|
|
114
104
|
disabled: "disabled";
|
|
@@ -121,18 +111,8 @@ export declare namespace CheckPartnerCodeCommand {
|
|
|
121
111
|
retryAfter: z.ZodOptional<z.ZodNumber>;
|
|
122
112
|
}, z.core.$strict>], "validity">;
|
|
123
113
|
}, z.core.$strict>;
|
|
124
|
-
const ProtectionErrorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
125
|
-
statusCode: z.ZodLiteral<429>;
|
|
126
|
-
reason: z.ZodLiteral<"rate_limited">;
|
|
127
|
-
retryAfter: z.ZodNumber;
|
|
128
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
129
|
-
statusCode: z.ZodLiteral<403>;
|
|
130
|
-
reason: z.ZodLiteral<"captcha_required">;
|
|
131
|
-
captchaRequired: z.ZodLiteral<true>;
|
|
132
|
-
}, z.core.$strict>], "reason">;
|
|
133
114
|
type Request = z.infer<typeof RequestSchema>;
|
|
134
115
|
type Response = z.infer<typeof ResponseSchema>;
|
|
135
|
-
type ProtectionError = z.infer<typeof ProtectionErrorSchema>;
|
|
136
116
|
}
|
|
137
117
|
export declare namespace ActivatePartnerCodeCommand {
|
|
138
118
|
const RequestSchema: z.ZodObject<{
|
|
@@ -158,7 +138,6 @@ export declare namespace ActivatePartnerCodeCommand {
|
|
|
158
138
|
}, z.core.$strict>, z.ZodObject<{
|
|
159
139
|
kind: z.ZodLiteral<"stars">;
|
|
160
140
|
title: z.ZodString;
|
|
161
|
-
productId: z.ZodUUID;
|
|
162
141
|
starsAmount: z.ZodString;
|
|
163
142
|
}, z.core.$strict>], "kind">;
|
|
164
143
|
state: z.ZodEnum<{
|
|
@@ -169,7 +148,6 @@ export declare namespace ActivatePartnerCodeCommand {
|
|
|
169
148
|
endsAt: z.ZodISODateTime;
|
|
170
149
|
}, z.core.$strict>;
|
|
171
150
|
idempotent: z.ZodBoolean;
|
|
172
|
-
starsPerMonth: z.ZodOptional<z.ZodNumber>;
|
|
173
151
|
}, z.core.$strict>, z.ZodObject<{
|
|
174
152
|
result: z.ZodLiteral<"error">;
|
|
175
153
|
reason: z.ZodEnum<{
|
|
@@ -238,7 +216,7 @@ export declare namespace ListPartnerInvitesCommand {
|
|
|
238
216
|
pending: "pending";
|
|
239
217
|
revoked: "revoked";
|
|
240
218
|
}>;
|
|
241
|
-
expiresAt: z.
|
|
219
|
+
expiresAt: z.ZodISODateTime;
|
|
242
220
|
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
243
221
|
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
244
222
|
createdAt: z.ZodISODateTime;
|
|
@@ -273,7 +251,7 @@ export declare namespace SendPartnerInviteCommand {
|
|
|
273
251
|
pending: "pending";
|
|
274
252
|
revoked: "revoked";
|
|
275
253
|
}>;
|
|
276
|
-
expiresAt: z.
|
|
254
|
+
expiresAt: z.ZodISODateTime;
|
|
277
255
|
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
278
256
|
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
279
257
|
createdAt: z.ZodISODateTime;
|
|
@@ -323,7 +301,7 @@ export declare namespace RevokePartnerInviteCommand {
|
|
|
323
301
|
pending: "pending";
|
|
324
302
|
revoked: "revoked";
|
|
325
303
|
}>;
|
|
326
|
-
expiresAt: z.
|
|
304
|
+
expiresAt: z.ZodISODateTime;
|
|
327
305
|
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
328
306
|
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
329
307
|
createdAt: z.ZodISODateTime;
|
|
@@ -335,7 +313,6 @@ export declare namespace RevokePartnerInviteCommand {
|
|
|
335
313
|
export declare namespace GetPartnerReportCommand {
|
|
336
314
|
const RequestSchema: z.ZodObject<{
|
|
337
315
|
month: z.ZodString;
|
|
338
|
-
sequence: z.ZodOptional<z.ZodNumber>;
|
|
339
316
|
}, z.core.$strict>;
|
|
340
317
|
const ResponseSchema: z.ZodObject<{
|
|
341
318
|
data: z.ZodObject<{
|
|
@@ -359,7 +336,6 @@ export declare namespace GetPartnerReportCommand {
|
|
|
359
336
|
}, z.core.$strict>, z.ZodObject<{
|
|
360
337
|
kind: z.ZodLiteral<"stars">;
|
|
361
338
|
title: z.ZodString;
|
|
362
|
-
productId: z.ZodUUID;
|
|
363
339
|
starsAmount: z.ZodString;
|
|
364
340
|
}, z.core.$strict>], "kind">;
|
|
365
341
|
retailPrice: z.ZodString;
|
|
@@ -387,7 +363,6 @@ export declare namespace GetPartnerReportCommand {
|
|
|
387
363
|
}, z.core.$strict>, z.ZodObject<{
|
|
388
364
|
kind: z.ZodLiteral<"stars">;
|
|
389
365
|
title: z.ZodString;
|
|
390
|
-
productId: z.ZodUUID;
|
|
391
366
|
starsAmount: z.ZodString;
|
|
392
367
|
}, z.core.$strict>], "kind">;
|
|
393
368
|
activatedAt: z.ZodISODateTime;
|
|
@@ -410,29 +385,10 @@ export declare namespace GetPartnerReportCommand {
|
|
|
410
385
|
type Request = z.infer<typeof RequestSchema>;
|
|
411
386
|
type Response = z.infer<typeof ResponseSchema>;
|
|
412
387
|
}
|
|
413
|
-
export declare namespace ListPartnerReportPeriodsCommand {
|
|
414
|
-
const RequestSchema: z.ZodObject<{
|
|
415
|
-
month: z.ZodString;
|
|
416
|
-
}, z.core.$strict>;
|
|
417
|
-
const ResponseSchema: z.ZodObject<{
|
|
418
|
-
data: z.ZodArray<z.ZodObject<{
|
|
419
|
-
sequence: z.ZodNumber;
|
|
420
|
-
status: z.ZodEnum<{
|
|
421
|
-
closed: "closed";
|
|
422
|
-
open: "open";
|
|
423
|
-
}>;
|
|
424
|
-
openedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
425
|
-
closedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
426
|
-
}, z.core.$strict>>;
|
|
427
|
-
}, z.core.$strict>;
|
|
428
|
-
type Request = z.infer<typeof RequestSchema>;
|
|
429
|
-
type Response = z.infer<typeof ResponseSchema>;
|
|
430
|
-
}
|
|
431
388
|
export declare namespace ClosePartnerPeriodCommand {
|
|
432
389
|
const RequestSchema: z.ZodObject<{
|
|
433
390
|
partnerId: z.ZodUUID;
|
|
434
391
|
month: z.ZodString;
|
|
435
|
-
sequence: z.ZodOptional<z.ZodNumber>;
|
|
436
392
|
}, z.core.$strict>;
|
|
437
393
|
const ResponseSchema: z.ZodObject<{
|
|
438
394
|
data: z.ZodObject<{
|
|
@@ -459,7 +415,6 @@ export declare namespace ClosePartnerPeriodCommand {
|
|
|
459
415
|
}, z.core.$strict>, z.ZodObject<{
|
|
460
416
|
kind: z.ZodLiteral<"stars">;
|
|
461
417
|
title: z.ZodString;
|
|
462
|
-
productId: z.ZodUUID;
|
|
463
418
|
starsAmount: z.ZodString;
|
|
464
419
|
}, z.core.$strict>], "kind">;
|
|
465
420
|
retailPrice: z.ZodString;
|
|
@@ -487,7 +442,6 @@ export declare namespace ClosePartnerPeriodCommand {
|
|
|
487
442
|
}, z.core.$strict>, z.ZodObject<{
|
|
488
443
|
kind: z.ZodLiteral<"stars">;
|
|
489
444
|
title: z.ZodString;
|
|
490
|
-
productId: z.ZodUUID;
|
|
491
445
|
starsAmount: z.ZodString;
|
|
492
446
|
}, z.core.$strict>], "kind">;
|
|
493
447
|
activatedAt: z.ZodISODateTime;
|
|
@@ -515,7 +469,6 @@ export declare namespace CreatePartnerLeakRequestCommand {
|
|
|
515
469
|
const RequestSchema: z.ZodObject<{
|
|
516
470
|
batchId: z.ZodUUID;
|
|
517
471
|
comment: z.ZodString;
|
|
518
|
-
requestId: z.ZodOptional<z.ZodUUID>;
|
|
519
472
|
}, z.core.$strict>;
|
|
520
473
|
const ResponseSchema: z.ZodObject<{
|
|
521
474
|
data: z.ZodObject<{
|
|
@@ -1,22 +1,7 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.CreatePartnerLeakRequestCommand = exports.ClosePartnerPeriodCommand = exports.
|
|
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;
|
|
18
4
|
const zod_1 = require("zod");
|
|
19
|
-
__exportStar(require("./administration"), exports);
|
|
20
5
|
const partner_codes_1 = require("../../models/partner-codes");
|
|
21
6
|
var IssuePartnerBatchCommand;
|
|
22
7
|
(function (IssuePartnerBatchCommand) {
|
|
@@ -27,7 +12,6 @@ var CheckPartnerCodeCommand;
|
|
|
27
12
|
(function (CheckPartnerCodeCommand) {
|
|
28
13
|
CheckPartnerCodeCommand.RequestSchema = partner_codes_1.PartnerCodeInputSchema;
|
|
29
14
|
CheckPartnerCodeCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerCodeCheckSchema }).strict();
|
|
30
|
-
CheckPartnerCodeCommand.ProtectionErrorSchema = partner_codes_1.PartnerCodeCheckProtectionErrorSchema;
|
|
31
15
|
})(CheckPartnerCodeCommand || (exports.CheckPartnerCodeCommand = CheckPartnerCodeCommand = {}));
|
|
32
16
|
var ActivatePartnerCodeCommand;
|
|
33
17
|
(function (ActivatePartnerCodeCommand) {
|
|
@@ -72,22 +56,13 @@ var RevokePartnerInviteCommand;
|
|
|
72
56
|
})(RevokePartnerInviteCommand || (exports.RevokePartnerInviteCommand = RevokePartnerInviteCommand = {}));
|
|
73
57
|
var GetPartnerReportCommand;
|
|
74
58
|
(function (GetPartnerReportCommand) {
|
|
75
|
-
GetPartnerReportCommand.RequestSchema = partner_codes_1.
|
|
59
|
+
GetPartnerReportCommand.RequestSchema = zod_1.z.object({ month: partner_codes_1.PartnerMonthSchema }).strict();
|
|
76
60
|
GetPartnerReportCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerReportSchema }).strict();
|
|
77
61
|
})(GetPartnerReportCommand || (exports.GetPartnerReportCommand = GetPartnerReportCommand = {}));
|
|
78
|
-
var ListPartnerReportPeriodsCommand;
|
|
79
|
-
(function (ListPartnerReportPeriodsCommand) {
|
|
80
|
-
ListPartnerReportPeriodsCommand.RequestSchema = zod_1.z.object({ month: partner_codes_1.PartnerMonthSchema }).strict();
|
|
81
|
-
ListPartnerReportPeriodsCommand.ResponseSchema = partner_codes_1.PartnerReportPeriodsResponseSchema;
|
|
82
|
-
})(ListPartnerReportPeriodsCommand || (exports.ListPartnerReportPeriodsCommand = ListPartnerReportPeriodsCommand = {}));
|
|
83
62
|
var ClosePartnerPeriodCommand;
|
|
84
63
|
(function (ClosePartnerPeriodCommand) {
|
|
85
64
|
ClosePartnerPeriodCommand.RequestSchema = zod_1.z
|
|
86
|
-
.object({
|
|
87
|
-
partnerId: zod_1.z.uuid(),
|
|
88
|
-
month: partner_codes_1.PartnerMonthSchema,
|
|
89
|
-
sequence: partner_codes_1.PartnerPeriodSequenceSchema.optional(),
|
|
90
|
-
})
|
|
65
|
+
.object({ partnerId: zod_1.z.uuid(), month: partner_codes_1.PartnerMonthSchema })
|
|
91
66
|
.strict();
|
|
92
67
|
ClosePartnerPeriodCommand.ResponseSchema = zod_1.z.object({ data: partner_codes_1.PartnerCloseResultSchema }).strict();
|
|
93
68
|
})(ClosePartnerPeriodCommand || (exports.ClosePartnerPeriodCommand = ClosePartnerPeriodCommand = {}));
|
|
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./check.command"), exports);
|
|
18
18
|
__exportStar(require("./get-payment-history.command"), exports);
|
|
19
|
-
__exportStar(require("./get-purchase-history.command"), exports);
|
|
20
19
|
__exportStar(require("./pay.command"), exports);
|
|
21
20
|
__exportStar(require("./receipt.command"), exports);
|
|
22
21
|
__exportStar(require("./recurrent.command"), exports);
|
|
@@ -2,36 +2,13 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare namespace DowngradeSubscriptionCommand {
|
|
3
3
|
const RequestSchema: z.ZodObject<{
|
|
4
4
|
downgradeSubscriptionId: z.ZodUUID;
|
|
5
|
-
|
|
6
|
-
}, z.core.$strict>;
|
|
5
|
+
}, z.core.$strip>;
|
|
7
6
|
const RequestParamSchema: z.ZodObject<{
|
|
8
7
|
uuid: z.ZodUUID;
|
|
9
|
-
}, z.core.$
|
|
10
|
-
const StatusRequestParamSchema: z.ZodObject<{
|
|
11
|
-
operationId: z.ZodUUID;
|
|
12
|
-
}, z.core.$strict>;
|
|
13
|
-
const ProcessingConflictDetailsSchema: z.ZodObject<{
|
|
14
|
-
operationId: z.ZodUUID;
|
|
15
|
-
}, z.core.$strict>;
|
|
8
|
+
}, z.core.$strip>;
|
|
16
9
|
type Request = z.infer<typeof RequestSchema>;
|
|
17
|
-
const ResponseSchema: z.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
21
|
-
status: z.ZodLiteral<"succeeded">;
|
|
22
|
-
operationId: z.ZodUUID;
|
|
23
|
-
subscriptionId: z.ZodUUID;
|
|
24
|
-
startsAt: z.ZodISODateTime;
|
|
25
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
-
status: z.ZodLiteral<"failed">;
|
|
27
|
-
operationId: z.ZodUUID;
|
|
28
|
-
reason: z.ZodEnum<{
|
|
29
|
-
deadline_elapsed: "deadline_elapsed";
|
|
30
|
-
finalization_failed: "finalization_failed";
|
|
31
|
-
provider_rejected: "provider_rejected";
|
|
32
|
-
source_changed: "source_changed";
|
|
33
|
-
}>;
|
|
34
|
-
autoRenewalDisabled: z.ZodBoolean;
|
|
35
|
-
}, z.core.$strict>], "status">;
|
|
10
|
+
const ResponseSchema: z.ZodObject<{
|
|
11
|
+
isSuccess: z.ZodBoolean;
|
|
12
|
+
}, z.core.$strip>;
|
|
36
13
|
type Response = z.infer<typeof ResponseSchema>;
|
|
37
14
|
}
|
|
@@ -2,39 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DowngradeSubscriptionCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
5
6
|
var DowngradeSubscriptionCommand;
|
|
6
7
|
(function (DowngradeSubscriptionCommand) {
|
|
7
|
-
DowngradeSubscriptionCommand.RequestSchema = zod_1.z
|
|
8
|
-
.object({
|
|
8
|
+
DowngradeSubscriptionCommand.RequestSchema = zod_1.z.object({
|
|
9
9
|
downgradeSubscriptionId: zod_1.z.uuid(),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
DowngradeSubscriptionCommand.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
zod_1.z.object({ status: zod_1.z.literal('processing'), operationId: zod_1.z.uuid() }).strict(),
|
|
18
|
-
zod_1.z
|
|
19
|
-
.object({
|
|
20
|
-
status: zod_1.z.literal('succeeded'),
|
|
21
|
-
operationId: zod_1.z.uuid(),
|
|
22
|
-
subscriptionId: zod_1.z.uuid(),
|
|
23
|
-
startsAt: zod_1.z.iso.datetime(),
|
|
24
|
-
})
|
|
25
|
-
.strict(),
|
|
26
|
-
zod_1.z
|
|
27
|
-
.object({
|
|
28
|
-
status: zod_1.z.literal('failed'),
|
|
29
|
-
operationId: zod_1.z.uuid(),
|
|
30
|
-
reason: zod_1.z.enum([
|
|
31
|
-
'source_changed',
|
|
32
|
-
'provider_rejected',
|
|
33
|
-
'deadline_elapsed',
|
|
34
|
-
'finalization_failed',
|
|
35
|
-
]),
|
|
36
|
-
autoRenewalDisabled: zod_1.z.boolean(),
|
|
37
|
-
})
|
|
38
|
-
.strict(),
|
|
39
|
-
]);
|
|
10
|
+
});
|
|
11
|
+
DowngradeSubscriptionCommand.RequestParamSchema = models_1.UserToSubscriptionSchema.pick({
|
|
12
|
+
uuid: true,
|
|
13
|
+
});
|
|
14
|
+
DowngradeSubscriptionCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
isSuccess: zod_1.z.boolean(),
|
|
16
|
+
});
|
|
40
17
|
})(DowngradeSubscriptionCommand || (exports.DowngradeSubscriptionCommand = DowngradeSubscriptionCommand = {}));
|