@purpleschool/multisite 0.0.2 → 0.0.4
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/controller/http/ai-proxy.ts +6 -0
- package/api/controller/http/auth.ts +14 -0
- package/api/controller/http/cloud-payments.ts +5 -0
- package/api/controller/http/file.ts +6 -0
- package/api/controller/http/health.ts +3 -0
- package/api/controller/http/image-editor.ts +15 -0
- package/api/controller/http/image-generation.ts +15 -0
- package/api/controller/http/index.ts +16 -0
- package/api/controller/http/marketplace-card.ts +15 -0
- package/api/controller/http/page-question.ts +9 -0
- package/api/controller/http/page.ts +12 -0
- package/api/controller/http/payment.ts +5 -0
- package/api/controller/http/product.ts +7 -0
- package/api/controller/http/subscription.ts +7 -0
- package/api/controller/http/transaction.ts +5 -0
- package/api/controller/http/unregistered-user.ts +1 -0
- package/api/controller/http/user.ts +5 -0
- package/api/controller/index.ts +1 -0
- package/api/index.ts +2 -0
- package/api/routes.ts +109 -0
- package/build/api/controller/http/index.d.ts +1 -0
- package/build/api/controller/http/index.d.ts.map +1 -1
- package/build/api/controller/http/index.js +1 -0
- package/build/api/controller/http/marketplace-card.d.ts +15 -0
- package/build/api/controller/http/marketplace-card.d.ts.map +1 -0
- package/build/api/controller/http/marketplace-card.js +17 -0
- package/build/api/routes.d.ts +23 -0
- package/build/api/routes.d.ts.map +1 -1
- package/build/api/routes.js +23 -0
- package/build/commands/index.d.ts +1 -0
- package/build/commands/index.d.ts.map +1 -1
- package/build/commands/index.js +1 -0
- package/build/commands/marketplace-card/execute-marketplace-card.command.d.ts +155 -0
- package/build/commands/marketplace-card/execute-marketplace-card.command.d.ts.map +1 -0
- package/build/commands/marketplace-card/execute-marketplace-card.command.js +12 -0
- package/build/commands/marketplace-card/index.d.ts +7 -0
- package/build/commands/marketplace-card/index.d.ts.map +1 -0
- package/build/commands/marketplace-card/index.js +22 -0
- package/build/commands/marketplace-card/retry-marketplace-card-job.command.d.ts +163 -0
- package/build/commands/marketplace-card/retry-marketplace-card-job.command.d.ts.map +1 -0
- package/build/commands/marketplace-card/retry-marketplace-card-job.command.js +25 -0
- package/build/commands/marketplace-card/set-reaction-to-marketplace-card-job.command.d.ts +143 -0
- package/build/commands/marketplace-card/set-reaction-to-marketplace-card-job.command.d.ts.map +1 -0
- package/build/commands/marketplace-card/set-reaction-to-marketplace-card-job.command.js +19 -0
- package/build/commands/marketplace-card/soft-delete-marketplace-card-job-by-uuid.command.d.ts +20 -0
- package/build/commands/marketplace-card/soft-delete-marketplace-card-job-by-uuid.command.d.ts.map +1 -0
- package/build/commands/marketplace-card/soft-delete-marketplace-card-job-by-uuid.command.js +13 -0
- package/build/commands/marketplace-card/soft-delete-marketplace-card-jobs-by-criteria.command.d.ts +12 -0
- package/build/commands/marketplace-card/soft-delete-marketplace-card-jobs-by-criteria.command.d.ts.map +1 -0
- package/build/commands/marketplace-card/soft-delete-marketplace-card-jobs-by-criteria.command.js +10 -0
- package/build/commands/marketplace-card/update-marketplace-card-job-title.command.d.ts +139 -0
- package/build/commands/marketplace-card/update-marketplace-card-job-title.command.d.ts.map +1 -0
- package/build/commands/marketplace-card/update-marketplace-card-job-title.command.js +17 -0
- package/build/constants/errors/errors.d.ts +90 -0
- package/build/constants/errors/errors.d.ts.map +1 -1
- package/build/constants/errors/errors.js +91 -0
- package/build/constants/tools/enums/index.d.ts +1 -0
- package/build/constants/tools/enums/index.d.ts.map +1 -1
- package/build/constants/tools/enums/index.js +1 -0
- package/build/constants/tools/enums/marketplace-card-strategy.enum.d.ts +7 -0
- package/build/constants/tools/enums/marketplace-card-strategy.enum.d.ts.map +1 -0
- package/build/constants/tools/enums/marketplace-card-strategy.enum.js +10 -0
- package/build/constants/tools/enums/tool-type.enum.d.ts +2 -1
- package/build/constants/tools/enums/tool-type.enum.d.ts.map +1 -1
- package/build/constants/tools/enums/tool-type.enum.js +1 -0
- package/build/models/index.d.ts +1 -0
- package/build/models/index.d.ts.map +1 -1
- package/build/models/index.js +1 -0
- package/build/models/marketplace-card/index.d.ts +7 -0
- package/build/models/marketplace-card/index.d.ts.map +1 -0
- package/build/models/marketplace-card/index.js +22 -0
- package/build/models/marketplace-card/marketplace-card-config.schema.d.ts +203 -0
- package/build/models/marketplace-card/marketplace-card-config.schema.d.ts.map +1 -0
- package/build/models/marketplace-card/marketplace-card-config.schema.js +10 -0
- package/build/models/marketplace-card/marketplace-card-job-request-params.schema.d.ts +34 -0
- package/build/models/marketplace-card/marketplace-card-job-request-params.schema.d.ts.map +1 -0
- package/build/models/marketplace-card/marketplace-card-job-request-params.schema.js +15 -0
- package/build/models/marketplace-card/marketplace-card-job.schema.d.ts +74 -0
- package/build/models/marketplace-card/marketplace-card-job.schema.d.ts.map +1 -0
- package/build/models/marketplace-card/marketplace-card-job.schema.js +28 -0
- package/build/models/marketplace-card/marketplace-card-model-params.schema.d.ts +30 -0
- package/build/models/marketplace-card/marketplace-card-model-params.schema.d.ts.map +1 -0
- package/build/models/marketplace-card/marketplace-card-model-params.schema.js +11 -0
- package/build/models/marketplace-card/marketplace-card-model.schema.d.ts +123 -0
- package/build/models/marketplace-card/marketplace-card-model.schema.d.ts.map +1 -0
- package/build/models/marketplace-card/marketplace-card-model.schema.js +15 -0
- package/build/models/marketplace-card/marketplace-card-style-preset.schema.d.ts +19 -0
- package/build/models/marketplace-card/marketplace-card-style-preset.schema.d.ts.map +1 -0
- package/build/models/marketplace-card/marketplace-card-style-preset.schema.js +10 -0
- package/build/queries/index.d.ts +1 -0
- package/build/queries/index.d.ts.map +1 -1
- package/build/queries/index.js +1 -0
- package/build/queries/marketplace-card/find-marketplace-card-jobs.command.d.ts +160 -0
- package/build/queries/marketplace-card/find-marketplace-card-jobs.command.d.ts.map +1 -0
- package/build/queries/marketplace-card/find-marketplace-card-jobs.command.js +21 -0
- package/build/queries/marketplace-card/get-marketplace-card-config.command.d.ts +273 -0
- package/build/queries/marketplace-card/get-marketplace-card-config.command.d.ts.map +1 -0
- package/build/queries/marketplace-card/get-marketplace-card-config.command.js +11 -0
- package/build/queries/marketplace-card/get-marketplace-card-job.command.d.ts +131 -0
- package/build/queries/marketplace-card/get-marketplace-card-job.command.d.ts.map +1 -0
- package/build/queries/marketplace-card/get-marketplace-card-job.command.js +14 -0
- package/build/queries/marketplace-card/get-marketplace-card-price.command.d.ts +30 -0
- package/build/queries/marketplace-card/get-marketplace-card-price.command.d.ts.map +1 -0
- package/build/queries/marketplace-card/get-marketplace-card-price.command.js +15 -0
- package/build/queries/marketplace-card/index.d.ts +5 -0
- package/build/queries/marketplace-card/index.d.ts.map +1 -0
- package/build/queries/marketplace-card/index.js +20 -0
- package/commands/auth/create-user.command.ts +18 -0
- package/commands/auth/index.ts +9 -0
- package/commands/auth/login.command.ts +17 -0
- package/commands/auth/register.command.ts +20 -0
- package/commands/auth/reset-password.command.ts +19 -0
- package/commands/auth/restore-password.command.ts +16 -0
- package/commands/auth/verify-email-retry.command.ts +17 -0
- package/commands/auth/verify-email.command.ts +18 -0
- package/commands/auth/vk-login.command.ts +21 -0
- package/commands/auth/yandex-login.command.ts +19 -0
- package/commands/file/index.ts +1 -0
- package/commands/file/upload-file.command.ts +9 -0
- package/commands/image-editor/execute-image-editor.command.ts +18 -0
- package/commands/image-editor/index.ts +7 -0
- package/commands/image-editor/proxy-image-editor-callback.command.ts +15 -0
- package/commands/image-editor/retry-image-editor-job.command.ts +17 -0
- package/commands/image-editor/set-reaction-to-image-editor-job.command.ts +18 -0
- package/commands/image-editor/soft-delete-image-editor-job-by-uuid.command.ts +8 -0
- package/commands/image-editor/soft-delete-image-editor-jobs-by-criteria.command.ts +8 -0
- package/commands/image-editor/update-image-editor-job-title.command.ts +16 -0
- package/commands/image-generation/execute-image-generation.command.ts +19 -0
- package/commands/image-generation/index.ts +7 -0
- package/commands/image-generation/proxy-image-generation-callback.command.ts +21 -0
- package/commands/image-generation/retry-image-generation-job.command.ts +19 -0
- package/commands/image-generation/set-reaction-to-image-generation-job.command.ts +28 -0
- package/commands/image-generation/soft-delete-image-generation-job-by-uuid.command.ts +9 -0
- package/commands/image-generation/soft-delete-image-generation-jobs-by-criteria.command.ts +9 -0
- package/commands/image-generation/update-image-generation-job-title.command.ts +16 -0
- package/commands/index.ts +11 -0
- package/commands/marketplace-card/execute-marketplace-card.command.ts +12 -0
- package/commands/marketplace-card/index.ts +6 -0
- package/commands/marketplace-card/retry-marketplace-card-job.command.ts +27 -0
- package/commands/marketplace-card/set-reaction-to-marketplace-card-job.command.ts +21 -0
- package/commands/marketplace-card/soft-delete-marketplace-card-job-by-uuid.command.ts +13 -0
- package/commands/marketplace-card/soft-delete-marketplace-card-jobs-by-criteria.command.ts +8 -0
- package/commands/marketplace-card/update-marketplace-card-job-title.command.ts +19 -0
- package/commands/page/create-page-question.command.ts +18 -0
- package/commands/page/create-page.command.ts +18 -0
- package/commands/page/delete-page-question.command.ts +14 -0
- package/commands/page/delete-page.command.ts +12 -0
- package/commands/page/find-page-by-alias.command.ts +28 -0
- package/commands/page/find-page-by-criteria.command.ts +24 -0
- package/commands/page/find-page.command.ts +22 -0
- package/commands/page/index.ts +9 -0
- package/commands/page/update-page-question.command.ts +24 -0
- package/commands/page/update-page.command.ts +24 -0
- package/commands/payment/cloud-payments.command.ts +53 -0
- package/commands/payment/index.ts +1 -0
- package/commands/product/buy-product.command.ts +19 -0
- package/commands/product/index.ts +1 -0
- package/commands/subscription/buy-subscription.command.ts +19 -0
- package/commands/subscription/index.ts +1 -0
- package/commands/transaction/index.ts +1 -0
- package/commands/transaction/write-off.command.ts +19 -0
- package/commands/unregistered-user/index.ts +1 -0
- package/commands/unregistered-user/upsert-unregistered-user.command.ts +16 -0
- package/constants/common/enums/index.ts +1 -0
- package/constants/common/enums/user-reaction.enum.ts +4 -0
- package/constants/common/index.ts +1 -0
- package/constants/email/email-endpoint.ts +1 -0
- package/constants/email/index.ts +2 -0
- package/constants/email/subjects.ts +12 -0
- package/constants/errors/errors.ts +682 -0
- package/constants/errors/index.ts +1 -0
- package/constants/files/enums/file-type.enum.ts +3 -0
- package/constants/files/enums/index.ts +1 -0
- package/constants/files/index.ts +1 -0
- package/constants/image-editor/enums/image-editing-strategy.enum.ts +9 -0
- package/constants/image-editor/enums/image-editor-model-type.enum.ts +5 -0
- package/constants/image-editor/enums/index.ts +2 -0
- package/constants/image-editor/index.ts +1 -0
- package/constants/image-generation/enums/image-generation-model-strategy.enum.ts +15 -0
- package/constants/image-generation/enums/image-generation-resolution.enum.ts +5 -0
- package/constants/image-generation/enums/index.ts +2 -0
- package/constants/image-generation/index.ts +1 -0
- package/constants/index.ts +15 -0
- package/constants/order/enums/index.ts +2 -0
- package/constants/order/enums/order-status.enum.ts +5 -0
- package/constants/order/enums/order-type.enum.ts +3 -0
- package/constants/order/index.ts +1 -0
- package/constants/page/enums/page-type.enum.ts +5 -0
- package/constants/page/index.ts +1 -0
- package/constants/payment/enums/index.ts +1 -0
- package/constants/payment/enums/payment-status.enum.ts +3 -0
- package/constants/payment/index.ts +1 -0
- package/constants/subscription/free-subscription-id.constant.ts +1 -0
- package/constants/subscription/index.ts +1 -0
- package/constants/tools/enums/index.ts +5 -0
- package/constants/tools/enums/job-request-origin.enum.ts +3 -0
- package/constants/tools/enums/job-status.enum.ts +5 -0
- package/constants/tools/enums/marketplace-card-strategy.enum.ts +6 -0
- package/constants/tools/enums/tool-model-status.enum.ts +4 -0
- package/constants/tools/enums/tool-type.enum.ts +5 -0
- package/constants/tools/index.ts +1 -0
- package/constants/transaction/enums/index.ts +1 -0
- package/constants/transaction/enums/transaction-status.enum.ts +5 -0
- package/constants/transaction/index.ts +1 -0
- package/constants/user/enums/index.ts +3 -0
- package/constants/user/enums/signup-method.enum.ts +6 -0
- package/constants/user/enums/user-role.enum.ts +5 -0
- package/constants/user/enums/user-status.enum.ts +5 -0
- package/constants/user/index.ts +1 -0
- package/constants/user-to-product/enums/index.ts +1 -0
- package/constants/user-to-product/enums/user-to-product-status.enum.ts +3 -0
- package/constants/user-to-product/index.ts +1 -0
- package/constants/user-to-subscription/enums/index.ts +1 -0
- package/constants/user-to-subscription/enums/user-to-subscription-status.enum.ts +3 -0
- package/constants/user-to-subscription/index.ts +1 -0
- package/index.ts +5 -0
- package/models/cloud-payments-widget-data.schema.ts +18 -0
- package/models/cloud-payments-widget.schema.ts +15 -0
- package/models/common/attached-file.schema.ts +13 -0
- package/models/common/icon-variants.schema.ts +12 -0
- package/models/common/index.ts +4 -0
- package/models/common/json-value.schema.ts +10 -0
- package/models/common/receipt.schema.ts +19 -0
- package/models/file.schema.ts +13 -0
- package/models/image-editor/image-editor-config.schema.ts +10 -0
- package/models/image-editor/image-editor-job-params.schema.ts +12 -0
- package/models/image-editor/image-editor-job-request-params.schema.ts +9 -0
- package/models/image-editor/image-editor-job.schema.ts +30 -0
- package/models/image-editor/image-editor-model-params.schema.ts +18 -0
- package/models/image-editor/image-editor-model.schema.ts +28 -0
- package/models/image-editor/image-editor-pricing-rule.schema.ts +14 -0
- package/models/image-editor/image-editor-prompt-group.schema.ts +13 -0
- package/models/image-editor/image-editor-system-prompt.schema.ts +20 -0
- package/models/image-editor/index.ts +9 -0
- package/models/image-generation/image-generation-config.schema.ts +10 -0
- package/models/image-generation/image-generation-job-attempt.schema.ts +11 -0
- package/models/image-generation/image-generation-job-params.schema.ts +11 -0
- package/models/image-generation/image-generation-job-request-params.schema.ts +10 -0
- package/models/image-generation/image-generation-job.schema.ts +30 -0
- package/models/image-generation/image-generation-model-params.schema.ts +22 -0
- package/models/image-generation/image-generation-model.schema.ts +28 -0
- package/models/image-generation/image-generation-preset.schema.ts +10 -0
- package/models/image-generation/image-generation-pricing-rule.schema.ts +19 -0
- package/models/image-generation/image-generation-vendor.schema.ts +9 -0
- package/models/image-generation/index.ts +10 -0
- package/models/index.ts +13 -0
- package/models/marketplace-card/index.ts +6 -0
- package/models/marketplace-card/marketplace-card-config.schema.ts +10 -0
- package/models/marketplace-card/marketplace-card-job-request-params.schema.ts +15 -0
- package/models/marketplace-card/marketplace-card-job.schema.ts +28 -0
- package/models/marketplace-card/marketplace-card-model-params.schema.ts +11 -0
- package/models/marketplace-card/marketplace-card-model.schema.ts +16 -0
- package/models/marketplace-card/marketplace-card-style-preset.schema.ts +10 -0
- package/models/page-question.schema.ts +10 -0
- package/models/page.schema.ts +40 -0
- package/models/product.schema.ts +10 -0
- package/models/subscription.schema.ts +12 -0
- package/models/tools/index.ts +1 -0
- package/models/tools/vendor.schema.ts +11 -0
- package/models/user.schema.ts +11 -0
- package/package.json +1 -7
- package/queries/file/find-files.command.ts +20 -0
- package/queries/file/get-file.command.ts +14 -0
- package/queries/file/index.ts +2 -0
- package/queries/image-editor/find-image-editor-jobs.command.ts +20 -0
- package/queries/image-editor/get-image-editor-config.command.ts +9 -0
- package/queries/image-editor/get-image-editor-job.command.ts +14 -0
- package/queries/image-editor/get-image-editor-price.command.ts +17 -0
- package/queries/image-editor/index.ts +4 -0
- package/queries/image-generation/find-image-generation-jobs.command.ts +20 -0
- package/queries/image-generation/get-image-generation-config.command.ts +9 -0
- package/queries/image-generation/get-image-generation-job.command.ts +14 -0
- package/queries/image-generation/get-image-generation-price.command.ts +19 -0
- package/queries/image-generation/index.ts +4 -0
- package/queries/index.ts +9 -0
- package/queries/marketplace-card/find-marketplace-card-jobs.command.ts +21 -0
- package/queries/marketplace-card/get-marketplace-card-config.command.ts +9 -0
- package/queries/marketplace-card/get-marketplace-card-job.command.ts +14 -0
- package/queries/marketplace-card/get-marketplace-card-price.command.ts +15 -0
- package/queries/marketplace-card/index.ts +4 -0
- package/queries/page/find-all-page-questions.query.ts +14 -0
- package/queries/page/find-page-question-by-uuid.query.ts +16 -0
- package/queries/page/find-page-questions-by-page-id.query.ts +16 -0
- package/queries/page/index.ts +3 -0
- package/queries/payment/get-payment-history.command.ts +17 -0
- package/queries/payment/index.ts +1 -0
- package/queries/product/find-products.command.ts +9 -0
- package/queries/product/index.ts +1 -0
- package/queries/subscription/find-subscriptions.command.ts +9 -0
- package/queries/subscription/index.ts +1 -0
- package/queries/user/get-my-products.command.ts +19 -0
- package/queries/user/get-my-subscriptions.command.ts +21 -0
- package/queries/user/get-user.command.ts +14 -0
- package/queries/user/index.ts +3 -0
- package/tsconfig.json +104 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JsonValueSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace CloudPaymentsCheckCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
transactionId: z.union([z.string(), z.number()]).optional(),
|
|
7
|
+
amount: z.union([z.string(), z.number()]),
|
|
8
|
+
paymentAmount: z.union([z.string(), z.number()]),
|
|
9
|
+
currency: z.string(),
|
|
10
|
+
paymentCurrency: z.string(),
|
|
11
|
+
invoiceId: z.string().optional(),
|
|
12
|
+
accountId: z.string().optional(),
|
|
13
|
+
data: z.string().optional(),
|
|
14
|
+
});
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
code: z.number(),
|
|
19
|
+
});
|
|
20
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export namespace CloudPaymentsPayCommand {
|
|
24
|
+
export const RequestSchema = z.object({
|
|
25
|
+
transactionId: z.number().optional(),
|
|
26
|
+
amount: z.number(),
|
|
27
|
+
currency: z.string().optional().default('RUB'),
|
|
28
|
+
paymentAmount: z.union([z.string(), z.number()]).optional(),
|
|
29
|
+
paymentCurrency: z.string().optional(),
|
|
30
|
+
invoiceId: z.string().optional(),
|
|
31
|
+
accountId: z.string(),
|
|
32
|
+
subscriptionId: z.string().optional(),
|
|
33
|
+
data: JsonValueSchema.optional(),
|
|
34
|
+
});
|
|
35
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
36
|
+
|
|
37
|
+
export const ResponseSchema = z.object({ code: z.number() });
|
|
38
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export namespace CloudPaymentsRecurrentCommand {
|
|
42
|
+
export const RequestSchema = z.object({
|
|
43
|
+
id: z.string(),
|
|
44
|
+
accountId: z.string(),
|
|
45
|
+
status: z.string(),
|
|
46
|
+
failedTransactionsNumber: z.number().optional(),
|
|
47
|
+
lastTransactionDate: z.string().optional(),
|
|
48
|
+
});
|
|
49
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
50
|
+
|
|
51
|
+
export const ResponseSchema = z.object({ code: z.number() });
|
|
52
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cloud-payments.command';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CloudPaymentsWidgetSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace BuyProductCommand {
|
|
5
|
+
export const RequestParamSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestSchema = z.object({
|
|
11
|
+
promocode: z.string().min(1).max(64).optional(),
|
|
12
|
+
});
|
|
13
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = z.object({
|
|
16
|
+
data: CloudPaymentsWidgetSchema,
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './buy-product.command';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CloudPaymentsWidgetSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace BuySubscriptionCommand {
|
|
5
|
+
export const RequestParamSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestSchema = z.object({
|
|
11
|
+
promocode: z.string().min(1).max(64).optional(),
|
|
12
|
+
});
|
|
13
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = z.object({
|
|
16
|
+
data: CloudPaymentsWidgetSchema,
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './buy-subscription.command';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './write-off.command';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TRANSACTION_STATUS } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace WriteOffCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
sum: z.number().int().positive(),
|
|
7
|
+
description: z.string().min(1).max(500).default('Использование токенов'),
|
|
8
|
+
});
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: z.object({
|
|
13
|
+
transactionId: z.string().uuid(),
|
|
14
|
+
status: z.nativeEnum(TRANSACTION_STATUS),
|
|
15
|
+
remainingSum: z.number().int(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './upsert-unregistered-user.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace UpsertUnregisteredUserCommand {
|
|
4
|
+
export const RequestSchema = z.object({});
|
|
5
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
6
|
+
|
|
7
|
+
export const ResponseSchema = z.object({
|
|
8
|
+
data: z.object({
|
|
9
|
+
unregisteredUserId: z.string().uuid(),
|
|
10
|
+
accessToken: z.string(),
|
|
11
|
+
tokenBalance: z.number().int(),
|
|
12
|
+
expiresAt: z.coerce.date(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './user-reaction.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const EmailEndpoint = 'https://api.rusender.ru/v1/email/send';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const EMAIL_SUBJECTS = {
|
|
2
|
+
EMAIL_VERIFICATION: 'Подтверждение email',
|
|
3
|
+
WELCOME: 'Добро пожаловать',
|
|
4
|
+
RESTORE_PASSWORD: 'Восстановление пароля',
|
|
5
|
+
FAST_REGISTRATION: 'Быстрая регистрация',
|
|
6
|
+
PRODUCT_PURCHASE: 'Покупка продукта',
|
|
7
|
+
RECURRENT_PAYMENT_FAILED: 'Ошибка повторного платежа',
|
|
8
|
+
SUBSCRIPTION_PURCHASE: 'Оформление подписки',
|
|
9
|
+
SUBSCRIPTION_BEFORE_CANCEL: 'Подписка будет отменена',
|
|
10
|
+
SUBSCRIPTION_RENEWAL_REMINDER: 'Напоминание о продлении подписки',
|
|
11
|
+
SUBSCRIPTION_CANCEL: 'Подписка отменена',
|
|
12
|
+
} as const;
|