@purpleschool/gptbot 0.6.16 → 0.6.17
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/api/controllers/http/subscription.ts +1 -0
- package/build/api/controllers/http/subscription.js +1 -0
- package/build/commands/subscription/index.js +1 -0
- package/build/commands/subscription/recover-past-due-subscription.command.js +13 -0
- package/build/constants/errors/errors.js +5 -0
- package/build/constants/subscription/enums/user-to-subscription-marks.enum.js +1 -0
- package/commands/subscription/index.ts +1 -0
- package/commands/subscription/recover-past-due-subscription.command.ts +15 -0
- package/constants/errors/errors.ts +5 -0
- package/constants/subscription/enums/user-to-subscription-marks.enum.ts +1 -0
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ __exportStar(require("./find-subscription.command"), exports);
|
|
|
23
23
|
__exportStar(require("./get-available-upgrades.command"), exports);
|
|
24
24
|
__exportStar(require("./get-free-subscription.command"), exports);
|
|
25
25
|
__exportStar(require("./get-subscriptions-summary.command"), exports);
|
|
26
|
+
__exportStar(require("./recover-past-due-subscription.command"), exports);
|
|
26
27
|
__exportStar(require("./recover-subscription.command"), exports);
|
|
27
28
|
__exportStar(require("./update-subscription.command"), exports);
|
|
28
29
|
__exportStar(require("./upgrade-subscription.command"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecoverPastDueSubscriptionCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var RecoverPastDueSubscriptionCommand;
|
|
6
|
+
(function (RecoverPastDueSubscriptionCommand) {
|
|
7
|
+
RecoverPastDueSubscriptionCommand.RequestParamSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
RecoverPastDueSubscriptionCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
message: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
})(RecoverPastDueSubscriptionCommand || (exports.RecoverPastDueSubscriptionCommand = RecoverPastDueSubscriptionCommand = {}));
|
|
@@ -6,4 +6,5 @@ var USER_TO_SUBSCRIPTION_MARKS;
|
|
|
6
6
|
USER_TO_SUBSCRIPTION_MARKS["WITHOUT_AUTO_RENEWAL"] = "WITHOUT_AUTO_RENEWAL";
|
|
7
7
|
USER_TO_SUBSCRIPTION_MARKS["MOCK"] = "MOCK";
|
|
8
8
|
USER_TO_SUBSCRIPTION_MARKS["SENT_RENEWAL_REMINDER"] = "SENT_RENEWAL_REMINDER";
|
|
9
|
+
USER_TO_SUBSCRIPTION_MARKS["SENT_PAST_DUE_RECOVER_REQUEST"] = "SENT_PAST_DUE_RECOVER_REQUEST";
|
|
9
10
|
})(USER_TO_SUBSCRIPTION_MARKS || (exports.USER_TO_SUBSCRIPTION_MARKS = USER_TO_SUBSCRIPTION_MARKS = {}));
|
|
@@ -7,6 +7,7 @@ export * from './find-subscription.command';
|
|
|
7
7
|
export * from './get-available-upgrades.command';
|
|
8
8
|
export * from './get-free-subscription.command';
|
|
9
9
|
export * from './get-subscriptions-summary.command';
|
|
10
|
+
export * from './recover-past-due-subscription.command';
|
|
10
11
|
export * from './recover-subscription.command';
|
|
11
12
|
export * from './update-subscription.command';
|
|
12
13
|
export * from './upgrade-subscription.command';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace RecoverPastDueSubscriptionCommand {
|
|
4
|
+
export const RequestParamSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
9
|
+
|
|
10
|
+
export const ResponseSchema = z.object({
|
|
11
|
+
message: z.string(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
|
+
}
|
|
@@ -1500,4 +1500,9 @@ export const ERRORS = {
|
|
|
1500
1500
|
message: 'Промпт тема с таким alias уже существует',
|
|
1501
1501
|
httpCode: 409,
|
|
1502
1502
|
},
|
|
1503
|
+
SUBSCRIPTION_NOT_PAST_DUE: {
|
|
1504
|
+
code: 'A320',
|
|
1505
|
+
message: 'Подписка не требует повторной оплаты',
|
|
1506
|
+
httpCode: 400,
|
|
1507
|
+
},
|
|
1503
1508
|
};
|