@purpleschool/gptbot 0.20.25-stage-2 → 0.20.26

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.
@@ -22,6 +22,8 @@ export declare const TEAM_ACCOUNT_ROUTES: {
22
22
  readonly CREATE_MANUAL_SUBSCRIPTION: "manual/subscription";
23
23
  readonly CREATE_MANUAL_SUBSCRIPTION_UPGRADE: "manual/subscription/upgrade";
24
24
  readonly CREATE_MANUAL_PRODUCT: "manual/product";
25
+ readonly CONFIRM_INVOICE_PAYMENT: "admin/invoices/confirm-payment";
26
+ readonly GET_SUBSCRIPTION_RENEWALS: "subscriptions/renewals";
25
27
  readonly CREATE_INVOICE_PAYMENT: "invoice-payment";
26
28
  readonly ADMIN_FIND_BY_NAME: "admin/find";
27
29
  readonly ADMIN_GET_INVOICES: "admin/invoices";
@@ -25,6 +25,8 @@ exports.TEAM_ACCOUNT_ROUTES = {
25
25
  CREATE_MANUAL_SUBSCRIPTION: 'manual/subscription',
26
26
  CREATE_MANUAL_SUBSCRIPTION_UPGRADE: 'manual/subscription/upgrade',
27
27
  CREATE_MANUAL_PRODUCT: 'manual/product',
28
+ CONFIRM_INVOICE_PAYMENT: 'admin/invoices/confirm-payment',
29
+ GET_SUBSCRIPTION_RENEWALS: 'subscriptions/renewals',
28
30
  CREATE_INVOICE_PAYMENT: 'invoice-payment',
29
31
  ADMIN_FIND_BY_NAME: 'admin/find',
30
32
  ADMIN_GET_INVOICES: 'admin/invoices',
@@ -353,6 +353,8 @@ export declare const REST_API: {
353
353
  readonly CREATE_MANUAL_SUBSCRIPTION: "/api/private/team-account/manual/subscription";
354
354
  readonly CREATE_MANUAL_SUBSCRIPTION_UPGRADE: "/api/private/team-account/manual/subscription/upgrade";
355
355
  readonly CREATE_MANUAL_PRODUCT: "/api/private/team-account/manual/product";
356
+ readonly CONFIRM_INVOICE_PAYMENT: "/api/private/team-account/admin/invoices/confirm-payment";
357
+ readonly GET_SUBSCRIPTION_RENEWALS: "/api/private/team-account/subscriptions/renewals";
356
358
  readonly CREATE_INVOICE_PAYMENT: "/api/private/team-account/invoice-payment";
357
359
  readonly ADMIN_FIND_BY_NAME: "/api/private/team-account/admin/find";
358
360
  readonly ADMIN_GET_INVOICES: "/api/private/team-account/admin/invoices";
@@ -392,6 +392,8 @@ exports.REST_API = {
392
392
  CREATE_MANUAL_SUBSCRIPTION: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.CREATE_MANUAL_SUBSCRIPTION}`,
393
393
  CREATE_MANUAL_SUBSCRIPTION_UPGRADE: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.CREATE_MANUAL_SUBSCRIPTION_UPGRADE}`,
394
394
  CREATE_MANUAL_PRODUCT: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.CREATE_MANUAL_PRODUCT}`,
395
+ CONFIRM_INVOICE_PAYMENT: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.CONFIRM_INVOICE_PAYMENT}`,
396
+ GET_SUBSCRIPTION_RENEWALS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_SUBSCRIPTION_RENEWALS}`,
395
397
  CREATE_INVOICE_PAYMENT: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.CREATE_INVOICE_PAYMENT}`,
396
398
  ADMIN_FIND_BY_NAME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_NAME}`,
397
399
  ADMIN_GET_INVOICES: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
@@ -305,6 +305,7 @@ export declare namespace CreateSubscriptionCommand {
305
305
  }, z.core.$strip>]>>;
306
306
  maxInputTokens: z.ZodNumber;
307
307
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
308
+ carryoverPercent: z.ZodNumber;
308
309
  billingScope: z.ZodEnum<typeof import("../..").BILLING_SCOPE>;
309
310
  plan: z.ZodEnum<typeof import("../..").SUBSCRIPTION_PLAN>;
310
311
  discount: z.ZodNumber;
@@ -326,7 +327,6 @@ export declare namespace CreateSubscriptionCommand {
326
327
  }, z.core.$strip>;
327
328
  order: z.ZodDefault<z.ZodNumber>;
328
329
  }, z.core.$strip>>>;
329
- carryoverPercent: z.ZodNumber;
330
330
  }, z.core.$strip>;
331
331
  type Request = z.infer<typeof RequestSchema>;
332
332
  const ResponseSchema: z.ZodObject<{
@@ -700,6 +700,7 @@ export declare namespace FindSubscriptionCommand {
700
700
  maxInputLength: z.ZodNumber;
701
701
  maxInputTokens: z.ZodNumber;
702
702
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
703
+ carryoverPercent: z.ZodNumber;
703
704
  billingScope: z.ZodEnum<typeof BILLING_SCOPE>;
704
705
  plan: z.ZodEnum<typeof import("../../constants").SUBSCRIPTION_PLAN>;
705
706
  discount: z.ZodNumber;
@@ -721,7 +722,6 @@ export declare namespace FindSubscriptionCommand {
721
722
  }, z.core.$strip>;
722
723
  order: z.ZodDefault<z.ZodNumber>;
723
724
  }, z.core.$strip>>>;
724
- carryoverPercent: z.ZodNumber;
725
725
  }, z.core.$strip>, z.ZodObject<{
726
726
  subTypes: z.ZodArray<z.ZodObject<{
727
727
  createdAt: z.ZodDate;
@@ -747,6 +747,7 @@ export declare namespace FindSubscriptionCommand {
747
747
  maxInputLength: z.ZodNumber;
748
748
  maxInputTokens: z.ZodNumber;
749
749
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
750
+ carryoverPercent: z.ZodNumber;
750
751
  billingScope: z.ZodEnum<typeof BILLING_SCOPE>;
751
752
  plan: z.ZodEnum<typeof import("../../constants").SUBSCRIPTION_PLAN>;
752
753
  discount: z.ZodNumber;
@@ -768,7 +769,6 @@ export declare namespace FindSubscriptionCommand {
768
769
  }, z.core.$strip>;
769
770
  order: z.ZodDefault<z.ZodNumber>;
770
771
  }, z.core.$strip>>>;
771
- carryoverPercent: z.ZodNumber;
772
772
  }, z.core.$strip>>;
773
773
  }, z.core.$strip>>>;
774
774
  }, z.core.$strip>;
@@ -364,6 +364,7 @@ export declare const SubscriptionSummarySchema: z.ZodDiscriminatedUnion<[z.ZodOb
364
364
  maxInputLength: z.ZodNumber;
365
365
  maxInputTokens: z.ZodNumber;
366
366
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
367
+ carryoverPercent: z.ZodNumber;
367
368
  billingScope: z.ZodEnum<typeof import("../../constants").BILLING_SCOPE>;
368
369
  plan: z.ZodEnum<typeof import("../../constants").SUBSCRIPTION_PLAN>;
369
370
  discount: z.ZodNumber;
@@ -385,7 +386,6 @@ export declare const SubscriptionSummarySchema: z.ZodDiscriminatedUnion<[z.ZodOb
385
386
  }, z.core.$strip>;
386
387
  order: z.ZodDefault<z.ZodNumber>;
387
388
  }, z.core.$strip>>>;
388
- carryoverPercent: z.ZodNumber;
389
389
  }, z.core.$strip>>;
390
390
  kind: z.ZodLiteral<"free">;
391
391
  active: z.ZodLiteral<true>;
@@ -764,6 +764,7 @@ export declare const SubscriptionSummarySchema: z.ZodDiscriminatedUnion<[z.ZodOb
764
764
  maxInputLength: z.ZodNumber;
765
765
  maxInputTokens: z.ZodNumber;
766
766
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
767
+ carryoverPercent: z.ZodNumber;
767
768
  billingScope: z.ZodEnum<typeof import("../../constants").BILLING_SCOPE>;
768
769
  plan: z.ZodEnum<typeof import("../../constants").SUBSCRIPTION_PLAN>;
769
770
  discount: z.ZodNumber;
@@ -785,7 +786,6 @@ export declare const SubscriptionSummarySchema: z.ZodDiscriminatedUnion<[z.ZodOb
785
786
  }, z.core.$strip>;
786
787
  order: z.ZodDefault<z.ZodNumber>;
787
788
  }, z.core.$strip>>>;
788
- carryoverPercent: z.ZodNumber;
789
789
  }, z.core.$strip>>;
790
790
  }, z.core.$strip>], "kind">;
791
791
  export declare const UserToProductSummarySchema: z.ZodObject<{
@@ -1189,6 +1189,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
1189
1189
  maxInputLength: z.ZodNumber;
1190
1190
  maxInputTokens: z.ZodNumber;
1191
1191
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
1192
+ carryoverPercent: z.ZodNumber;
1192
1193
  billingScope: z.ZodEnum<typeof import("../../constants").BILLING_SCOPE>;
1193
1194
  plan: z.ZodEnum<typeof import("../../constants").SUBSCRIPTION_PLAN>;
1194
1195
  discount: z.ZodNumber;
@@ -1210,7 +1211,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
1210
1211
  }, z.core.$strip>;
1211
1212
  order: z.ZodDefault<z.ZodNumber>;
1212
1213
  }, z.core.$strip>>>;
1213
- carryoverPercent: z.ZodNumber;
1214
1214
  }, z.core.$strip>>;
1215
1215
  kind: z.ZodLiteral<"free">;
1216
1216
  active: z.ZodLiteral<true>;
@@ -1589,6 +1589,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
1589
1589
  maxInputLength: z.ZodNumber;
1590
1590
  maxInputTokens: z.ZodNumber;
1591
1591
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
1592
+ carryoverPercent: z.ZodNumber;
1592
1593
  billingScope: z.ZodEnum<typeof import("../../constants").BILLING_SCOPE>;
1593
1594
  plan: z.ZodEnum<typeof import("../../constants").SUBSCRIPTION_PLAN>;
1594
1595
  discount: z.ZodNumber;
@@ -1610,7 +1611,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
1610
1611
  }, z.core.$strip>;
1611
1612
  order: z.ZodDefault<z.ZodNumber>;
1612
1613
  }, z.core.$strip>>>;
1613
- carryoverPercent: z.ZodNumber;
1614
1614
  }, z.core.$strip>>;
1615
1615
  }, z.core.$strip>], "kind">;
1616
1616
  subscriptions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1977,6 +1977,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
1977
1977
  maxInputLength: z.ZodNumber;
1978
1978
  maxInputTokens: z.ZodNumber;
1979
1979
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
1980
+ carryoverPercent: z.ZodNumber;
1980
1981
  billingScope: z.ZodEnum<typeof import("../../constants").BILLING_SCOPE>;
1981
1982
  plan: z.ZodEnum<typeof import("../../constants").SUBSCRIPTION_PLAN>;
1982
1983
  discount: z.ZodNumber;
@@ -1998,7 +1999,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
1998
1999
  }, z.core.$strip>;
1999
2000
  order: z.ZodDefault<z.ZodNumber>;
2000
2001
  }, z.core.$strip>>>;
2001
- carryoverPercent: z.ZodNumber;
2002
2002
  }, z.core.$strip>>;
2003
2003
  kind: z.ZodLiteral<"free">;
2004
2004
  active: z.ZodLiteral<true>;
@@ -2377,6 +2377,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
2377
2377
  maxInputLength: z.ZodNumber;
2378
2378
  maxInputTokens: z.ZodNumber;
2379
2379
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
2380
+ carryoverPercent: z.ZodNumber;
2380
2381
  billingScope: z.ZodEnum<typeof import("../../constants").BILLING_SCOPE>;
2381
2382
  plan: z.ZodEnum<typeof import("../../constants").SUBSCRIPTION_PLAN>;
2382
2383
  discount: z.ZodNumber;
@@ -2398,7 +2399,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
2398
2399
  }, z.core.$strip>;
2399
2400
  order: z.ZodDefault<z.ZodNumber>;
2400
2401
  }, z.core.$strip>>>;
2401
- carryoverPercent: z.ZodNumber;
2402
2402
  }, z.core.$strip>>;
2403
2403
  }, z.core.$strip>], "kind">>;
2404
2404
  nextChargeAmount: z.ZodNullable<z.ZodNumber>;
@@ -305,6 +305,7 @@ export declare namespace UpdateSubscriptionCommand {
305
305
  }, z.core.$strip>]>>>;
306
306
  maxInputTokens: z.ZodOptional<z.ZodNumber>;
307
307
  mainSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
308
+ carryoverPercent: z.ZodOptional<z.ZodNumber>;
308
309
  billingScope: z.ZodOptional<z.ZodEnum<typeof import("../..").BILLING_SCOPE>>;
309
310
  plan: z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_PLAN>>;
310
311
  discount: z.ZodOptional<z.ZodNumber>;
@@ -326,7 +327,6 @@ export declare namespace UpdateSubscriptionCommand {
326
327
  }, z.core.$strip>;
327
328
  order: z.ZodDefault<z.ZodNumber>;
328
329
  }, z.core.$strip>>>>;
329
- carryoverPercent: z.ZodOptional<z.ZodNumber>;
330
330
  }, z.core.$strip>;
331
331
  type Request = z.infer<typeof RequestSchema>;
332
332
  const RequestParamSchema: z.ZodObject<{
@@ -8,6 +8,8 @@ export declare namespace CreateTeamAccountInvoicePaymentCommand {
8
8
  subscriptionUuid: z.ZodOptional<z.ZodUUID>;
9
9
  productUuid: z.ZodOptional<z.ZodUUID>;
10
10
  upgradeSubscriptionUuid: z.ZodOptional<z.ZodUUID>;
11
+ renewal: z.ZodOptional<z.ZodLiteral<true>>;
12
+ renewalPeriodUuid: z.ZodOptional<z.ZodUUID>;
11
13
  }, z.core.$strip>;
12
14
  type Request = z.infer<typeof RequestSchema>;
13
15
  const ResponseSchema: z.ZodObject<{
@@ -13,12 +13,22 @@ var CreateTeamAccountInvoicePaymentCommand;
13
13
  subscriptionUuid: zod_1.z.uuid().optional(),
14
14
  productUuid: zod_1.z.uuid().optional(),
15
15
  upgradeSubscriptionUuid: zod_1.z.uuid().optional(),
16
+ renewal: zod_1.z.literal(true).optional(),
17
+ renewalPeriodUuid: zod_1.z.uuid().optional(),
16
18
  })
17
19
  .refine(({ subscriptionUuid, productUuid, upgradeSubscriptionUuid }) => Number(Boolean(subscriptionUuid)) +
18
20
  Number(Boolean(productUuid)) +
19
21
  Number(Boolean(upgradeSubscriptionUuid)) ===
20
22
  1, {
21
23
  message: 'Нужно передать ровно один идентификатор: subscriptionUuid, productUuid или upgradeSubscriptionUuid',
24
+ })
25
+ .refine(({ renewal, subscriptionUuid }) => !renewal || Boolean(subscriptionUuid), {
26
+ path: ['renewal'],
27
+ message: 'Для продления нужен subscriptionUuid',
28
+ })
29
+ .refine(({ renewal, renewalPeriodUuid }) => !renewalPeriodUuid || renewal === true, {
30
+ path: ['renewalPeriodUuid'],
31
+ message: 'Идентификатор периода применим только к продлению',
22
32
  });
23
33
  CreateTeamAccountInvoicePaymentCommand.ResponseSchema = zod_1.z.object({
24
34
  data: zod_1.z.object({
@@ -30,6 +30,18 @@ export declare namespace GetInvoiceForPaymentCommand {
30
30
  inn: z.ZodString;
31
31
  amount: z.ZodNumber;
32
32
  itemName: z.ZodString;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ invoiceType: z.ZodLiteral<"subscription_renewal">;
35
+ email: z.ZodEmail;
36
+ name: z.ZodString;
37
+ inn: z.ZodString;
38
+ amount: z.ZodNumber;
39
+ itemName: z.ZodString;
40
+ subscriptionId: z.ZodUUID;
41
+ rootSubscriptionId: z.ZodUUID;
42
+ durationMonths: z.ZodNumber;
43
+ tokens: z.ZodNumber;
44
+ carryoverPercent: z.ZodNumber;
33
45
  }, z.core.$strip>, z.ZodObject<{
34
46
  invoiceType: z.ZodLiteral<"subscription_upgrade">;
35
47
  email: z.ZodEmail;
@@ -30,3 +30,4 @@ export * from './get-invoice-for-payment.command';
30
30
  export * from './get-team-account-payment-history.command';
31
31
  export * from './find-current-team-account-products-by-team-account-id.command';
32
32
  export * from './get-team-account-available-upgrades.command';
33
+ export * from './team-subscription-renewal.command';
@@ -46,3 +46,4 @@ __exportStar(require("./get-invoice-for-payment.command"), exports);
46
46
  __exportStar(require("./get-team-account-payment-history.command"), exports);
47
47
  __exportStar(require("./find-current-team-account-products-by-team-account-id.command"), exports);
48
48
  __exportStar(require("./get-team-account-available-upgrades.command"), exports);
49
+ __exportStar(require("./team-subscription-renewal.command"), exports);
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ export declare const TeamSubscriptionRenewalSchema: z.ZodObject<{
3
+ uuid: z.ZodUUID;
4
+ invoiceId: z.ZodUUID;
5
+ teamAccountId: z.ZodUUID;
6
+ subscriptionId: z.ZodUUID;
7
+ durationMonths: z.ZodNumber;
8
+ startDate: z.ZodCoercedDate<unknown>;
9
+ endDate: z.ZodCoercedDate<unknown>;
10
+ confirmedAt: z.ZodCoercedDate<unknown>;
11
+ activatedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
12
+ }, z.core.$strip>;
13
+ export declare namespace ConfirmTeamInvoicePaymentCommand {
14
+ const RequestSchema: z.ZodObject<{
15
+ invoiceId: z.ZodUUID;
16
+ }, z.core.$strip>;
17
+ type Request = z.infer<typeof RequestSchema>;
18
+ const ResponseSchema: z.ZodObject<{
19
+ data: z.ZodObject<{
20
+ uuid: z.ZodUUID;
21
+ invoiceId: z.ZodUUID;
22
+ teamAccountId: z.ZodUUID;
23
+ subscriptionId: z.ZodUUID;
24
+ durationMonths: z.ZodNumber;
25
+ startDate: z.ZodCoercedDate<unknown>;
26
+ endDate: z.ZodCoercedDate<unknown>;
27
+ confirmedAt: z.ZodCoercedDate<unknown>;
28
+ activatedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
29
+ }, z.core.$strip>;
30
+ }, z.core.$strip>;
31
+ type Response = z.infer<typeof ResponseSchema>;
32
+ }
33
+ export declare namespace GetTeamSubscriptionRenewalsCommand {
34
+ const ResponseSchema: z.ZodObject<{
35
+ data: z.ZodArray<z.ZodObject<{
36
+ uuid: z.ZodUUID;
37
+ invoiceId: z.ZodUUID;
38
+ teamAccountId: z.ZodUUID;
39
+ subscriptionId: z.ZodUUID;
40
+ durationMonths: z.ZodNumber;
41
+ startDate: z.ZodCoercedDate<unknown>;
42
+ endDate: z.ZodCoercedDate<unknown>;
43
+ confirmedAt: z.ZodCoercedDate<unknown>;
44
+ activatedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
45
+ }, z.core.$strip>>;
46
+ }, z.core.$strip>;
47
+ type Response = z.infer<typeof ResponseSchema>;
48
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetTeamSubscriptionRenewalsCommand = exports.ConfirmTeamInvoicePaymentCommand = exports.TeamSubscriptionRenewalSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TeamSubscriptionRenewalSchema = zod_1.z.object({
6
+ uuid: zod_1.z.uuid(),
7
+ invoiceId: zod_1.z.uuid(),
8
+ teamAccountId: zod_1.z.uuid(),
9
+ subscriptionId: zod_1.z.uuid(),
10
+ durationMonths: zod_1.z.number().int().positive(),
11
+ startDate: zod_1.z.coerce.date(),
12
+ endDate: zod_1.z.coerce.date(),
13
+ confirmedAt: zod_1.z.coerce.date(),
14
+ activatedAt: zod_1.z.coerce.date().nullable(),
15
+ });
16
+ var ConfirmTeamInvoicePaymentCommand;
17
+ (function (ConfirmTeamInvoicePaymentCommand) {
18
+ ConfirmTeamInvoicePaymentCommand.RequestSchema = zod_1.z.object({ invoiceId: zod_1.z.uuid() });
19
+ ConfirmTeamInvoicePaymentCommand.ResponseSchema = zod_1.z.object({ data: exports.TeamSubscriptionRenewalSchema });
20
+ })(ConfirmTeamInvoicePaymentCommand || (exports.ConfirmTeamInvoicePaymentCommand = ConfirmTeamInvoicePaymentCommand = {}));
21
+ var GetTeamSubscriptionRenewalsCommand;
22
+ (function (GetTeamSubscriptionRenewalsCommand) {
23
+ GetTeamSubscriptionRenewalsCommand.ResponseSchema = zod_1.z.object({ data: zod_1.z.array(exports.TeamSubscriptionRenewalSchema) });
24
+ })(GetTeamSubscriptionRenewalsCommand || (exports.GetTeamSubscriptionRenewalsCommand = GetTeamSubscriptionRenewalsCommand = {}));
@@ -6,6 +6,18 @@ export declare const InvoiceForPaymentPayloadSchema: z.ZodDiscriminatedUnion<[z.
6
6
  inn: z.ZodString;
7
7
  amount: z.ZodNumber;
8
8
  itemName: z.ZodString;
9
+ }, z.core.$strip>, z.ZodObject<{
10
+ invoiceType: z.ZodLiteral<"subscription_renewal">;
11
+ email: z.ZodEmail;
12
+ name: z.ZodString;
13
+ inn: z.ZodString;
14
+ amount: z.ZodNumber;
15
+ itemName: z.ZodString;
16
+ subscriptionId: z.ZodUUID;
17
+ rootSubscriptionId: z.ZodUUID;
18
+ durationMonths: z.ZodNumber;
19
+ tokens: z.ZodNumber;
20
+ carryoverPercent: z.ZodNumber;
9
21
  }, z.core.$strip>, z.ZodObject<{
10
22
  invoiceType: z.ZodLiteral<"subscription_upgrade">;
11
23
  email: z.ZodEmail;
@@ -30,6 +42,18 @@ export declare const InvoiceForPaymentSchema: z.ZodObject<{
30
42
  inn: z.ZodString;
31
43
  amount: z.ZodNumber;
32
44
  itemName: z.ZodString;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ invoiceType: z.ZodLiteral<"subscription_renewal">;
47
+ email: z.ZodEmail;
48
+ name: z.ZodString;
49
+ inn: z.ZodString;
50
+ amount: z.ZodNumber;
51
+ itemName: z.ZodString;
52
+ subscriptionId: z.ZodUUID;
53
+ rootSubscriptionId: z.ZodUUID;
54
+ durationMonths: z.ZodNumber;
55
+ tokens: z.ZodNumber;
56
+ carryoverPercent: z.ZodNumber;
33
57
  }, z.core.$strip>, z.ZodObject<{
34
58
  invoiceType: z.ZodLiteral<"subscription_upgrade">;
35
59
  email: z.ZodEmail;
@@ -11,6 +11,19 @@ exports.InvoiceForPaymentPayloadSchema = zod_1.z.discriminatedUnion('invoiceType
11
11
  amount: zod_1.z.number(),
12
12
  itemName: zod_1.z.string(),
13
13
  }),
14
+ zod_1.z.object({
15
+ invoiceType: zod_1.z.literal('subscription_renewal'),
16
+ email: zod_1.z.email(),
17
+ name: zod_1.z.string(),
18
+ inn: zod_1.z.string(),
19
+ amount: zod_1.z.number(),
20
+ itemName: zod_1.z.string(),
21
+ subscriptionId: zod_1.z.uuid(),
22
+ rootSubscriptionId: zod_1.z.uuid(),
23
+ durationMonths: zod_1.z.number().int().positive(),
24
+ tokens: zod_1.z.number().int().nonnegative(),
25
+ carryoverPercent: zod_1.z.number().min(0).max(100),
26
+ }),
14
27
  zod_1.z.object({
15
28
  invoiceType: zod_1.z.literal('subscription_upgrade'),
16
29
  email: zod_1.z.email(),
@@ -1682,6 +1682,7 @@ export declare const SubscriptionWithoutFeaturesSchema: z.ZodObject<{
1682
1682
  maxInputLength: z.ZodNumber;
1683
1683
  maxInputTokens: z.ZodNumber;
1684
1684
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
1685
+ carryoverPercent: z.ZodNumber;
1685
1686
  billingScope: z.ZodEnum<typeof BILLING_SCOPE>;
1686
1687
  plan: z.ZodEnum<typeof SUBSCRIPTION_PLAN>;
1687
1688
  discount: z.ZodNumber;
@@ -1703,7 +1704,6 @@ export declare const SubscriptionWithoutFeaturesSchema: z.ZodObject<{
1703
1704
  }, z.core.$strip>;
1704
1705
  order: z.ZodDefault<z.ZodNumber>;
1705
1706
  }, z.core.$strip>>>;
1706
- carryoverPercent: z.ZodNumber;
1707
1707
  }, z.core.$strip>;
1708
1708
  export declare const SubscriptionWithSubTypesWithoutFeaturesSchema: z.ZodIntersection<z.ZodObject<{
1709
1709
  createdAt: z.ZodDate;
@@ -1729,6 +1729,7 @@ export declare const SubscriptionWithSubTypesWithoutFeaturesSchema: z.ZodInterse
1729
1729
  maxInputLength: z.ZodNumber;
1730
1730
  maxInputTokens: z.ZodNumber;
1731
1731
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
1732
+ carryoverPercent: z.ZodNumber;
1732
1733
  billingScope: z.ZodEnum<typeof BILLING_SCOPE>;
1733
1734
  plan: z.ZodEnum<typeof SUBSCRIPTION_PLAN>;
1734
1735
  discount: z.ZodNumber;
@@ -1750,7 +1751,6 @@ export declare const SubscriptionWithSubTypesWithoutFeaturesSchema: z.ZodInterse
1750
1751
  }, z.core.$strip>;
1751
1752
  order: z.ZodDefault<z.ZodNumber>;
1752
1753
  }, z.core.$strip>>>;
1753
- carryoverPercent: z.ZodNumber;
1754
1754
  }, z.core.$strip>, z.ZodObject<{
1755
1755
  subTypes: z.ZodArray<z.ZodObject<{
1756
1756
  createdAt: z.ZodDate;
@@ -1776,6 +1776,7 @@ export declare const SubscriptionWithSubTypesWithoutFeaturesSchema: z.ZodInterse
1776
1776
  maxInputLength: z.ZodNumber;
1777
1777
  maxInputTokens: z.ZodNumber;
1778
1778
  mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
1779
+ carryoverPercent: z.ZodNumber;
1779
1780
  billingScope: z.ZodEnum<typeof BILLING_SCOPE>;
1780
1781
  plan: z.ZodEnum<typeof SUBSCRIPTION_PLAN>;
1781
1782
  discount: z.ZodNumber;
@@ -1797,6 +1798,5 @@ export declare const SubscriptionWithSubTypesWithoutFeaturesSchema: z.ZodInterse
1797
1798
  }, z.core.$strip>;
1798
1799
  order: z.ZodDefault<z.ZodNumber>;
1799
1800
  }, z.core.$strip>>>;
1800
- carryoverPercent: z.ZodNumber;
1801
1801
  }, z.core.$strip>>;
1802
1802
  }, z.core.$strip>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.20.25-stage-2",
3
+ "version": "0.20.26",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",