@purpleschool/gptbot 0.19.16 → 0.19.17-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/controllers/http/payment.d.ts +1 -0
- package/build/api/controllers/http/payment.js +1 -0
- package/build/api/controllers/http/subscription.d.ts +1 -0
- package/build/api/controllers/http/subscription.js +1 -0
- package/build/api/partner-code-routes.d.ts +31 -0
- package/build/api/partner-code-routes.js +33 -1
- package/build/api/routes.d.ts +6 -0
- package/build/api/routes.js +7 -0
- package/build/commands/ai-studio/canvas/save-canvas.command.d.ts +1 -1
- package/build/commands/auth/register-user.command.d.ts +1 -0
- package/build/commands/auth/register-user.command.js +2 -0
- package/build/commands/auth/vk-login.command.d.ts +1 -0
- package/build/commands/auth/vk-login.command.js +2 -0
- package/build/commands/auth/yandex-login.command.d.ts +1 -0
- package/build/commands/auth/yandex-login.command.js +2 -0
- package/build/commands/chat/find-chats.command.d.ts +3 -3
- package/build/commands/community/get-all-community-posts-by-criteria.command.d.ts +1 -1
- package/build/commands/community/get-my-community-posts-by-criteria.command.d.ts +1 -1
- package/build/commands/community/get-my-favorite-community-posts.command.d.ts +1 -1
- package/build/commands/folder/find-folder-by-uuid-with-chats.command.d.ts +1 -1
- package/build/commands/folder/find-folders-by-user.command.d.ts +1 -1
- package/build/commands/model-page/base/find-model-pages-admin.command.d.ts +2 -2
- package/build/commands/model-page/common.schemas.d.ts +1 -1
- package/build/commands/model-page/public/find-model-page-hub.command.d.ts +3 -3
- package/build/commands/partner-codes/administration.d.ts +650 -0
- package/build/commands/partner-codes/administration.js +138 -0
- package/build/commands/partner-codes/index.d.ts +50 -3
- package/build/commands/partner-codes/index.js +28 -3
- package/build/commands/payment/find-payments-by-criteria.command.d.ts +1 -1
- package/build/commands/payment/get-purchase-history.command.d.ts +90 -0
- package/build/commands/payment/get-purchase-history.command.js +22 -0
- package/build/commands/payment/index.d.ts +1 -0
- package/build/commands/payment/index.js +1 -0
- package/build/commands/product/buy-product.command.d.ts +1 -1
- package/build/commands/subscription/buy-subscription.command.d.ts +1 -1
- package/build/commands/subscription/downgrade-subscription.command.d.ts +28 -5
- package/build/commands/subscription/downgrade-subscription.command.js +32 -9
- package/build/commands/subscription/get-subscriptions-summary.command.d.ts +32 -0
- package/build/commands/subscription/get-subscriptions-summary.command.js +2 -0
- package/build/commands/subscription/index.d.ts +1 -0
- package/build/commands/subscription/index.js +1 -0
- package/build/commands/subscription/payment-incident-diagnostics.d.ts +445 -0
- package/build/commands/subscription/payment-incident-diagnostics.js +173 -0
- package/build/commands/telegram-profile/auth-with-telegram-web-app.command.d.ts +1 -1
- package/build/commands/tools/diagrams/find-diagrams-jobs.command.d.ts +1 -1
- package/build/commands/tools/html-page-builder/find-html-page-builder-sessions.command.d.ts +1 -1
- package/build/commands/tools/image-editor/find-image-editor-jobs.command.d.ts +1 -1
- package/build/commands/tools/image-generation/find-image-generation-jobs.command.d.ts +1 -1
- package/build/commands/tools/image-recognition/find-image-recognition-jobs.command.d.ts +1 -1
- package/build/commands/tools/interior-design/find-interior-design-generation-groups.command.d.ts +1 -1
- package/build/commands/tools/interior-design/find-interior-design-jobs.command.d.ts +1 -1
- package/build/commands/tools/marketplace-card/find-marketplace-card-jobs.command.d.ts +1 -1
- package/build/commands/tools/motion-control/index.d.ts +1 -1
- package/build/commands/tools/music/find-music-jobs.command.d.ts +1 -1
- package/build/commands/tools/paraphrase/find-paraphrase-jobs.command.d.ts +1 -1
- package/build/commands/tools/photo-session/find-photo-session-jobs.command.d.ts +1 -1
- package/build/commands/tools/presentation/find-presentations.command.d.ts +1 -1
- package/build/commands/tools/solving-edu-task/find-solving-edu-task-jobs.command.d.ts +1 -1
- package/build/commands/tools/sound-generation/find-sound-generation-jobs.command.d.ts +1 -1
- package/build/commands/tools/spell-corrector/find-spell-corrector-jobs.command.d.ts +1 -1
- package/build/commands/tools/stt/find-stt-jobs.command.d.ts +1 -1
- package/build/commands/tools/tool-workspace/find-tool-workspaces.command.d.ts +1 -1
- package/build/commands/tools/tts/find-tts-jobs.command.d.ts +1 -1
- package/build/commands/tools/video/find-video-jobs.command.d.ts +1 -1
- package/build/commands/tools/video-editor/find-video-editor-jobs.command.d.ts +1 -1
- package/build/commands/tools/writer/find-writer-documents.command.d.ts +1 -1
- package/build/commands/user/find-users-by-criteria.command.d.ts +1 -1
- package/build/commands/user/get-me.command.d.ts +3 -0
- package/build/commands/user/get-me.command.js +1 -0
- package/build/helpers/query-boolean.schema.d.ts +1 -1
- package/build/models/index.d.ts +1 -0
- package/build/models/index.js +1 -0
- package/build/models/partner-codes/index.d.ts +4 -0
- package/build/models/partner-codes/index.js +4 -0
- package/build/models/partner-codes/partner-administration.schema.d.ts +183 -0
- package/build/models/partner-codes/partner-administration.schema.js +72 -0
- package/build/models/partner-codes/partner-cabinet-context.schema.d.ts +24 -0
- package/build/models/partner-codes/partner-cabinet-context.schema.js +8 -0
- package/build/models/partner-codes/partner-cabinet.schema.d.ts +362 -0
- package/build/models/partner-codes/partner-cabinet.schema.js +84 -0
- package/build/models/partner-codes/partner-codes.schema.d.ts +78 -2
- package/build/models/partner-codes/partner-codes.schema.js +73 -5
- package/build/models/partner-codes/partner-leak-create.schema.d.ts +6 -0
- package/build/models/partner-codes/partner-leak-create.schema.js +8 -0
- package/build/models/partner-registration-context.schema.d.ts +3 -0
- package/build/models/partner-registration-context.schema.js +6 -0
- package/build/models/purchase-history.schema.d.ts +112 -0
- package/build/models/purchase-history.schema.js +38 -0
- package/build/models/tools/diagrams/diagrams-job.schema.d.ts +2 -2
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ export declare namespace AuthWithTelegramWebAppCommand {
|
|
|
5
5
|
platform: z.ZodNullable<z.ZodString>;
|
|
6
6
|
partnerId: z.ZodOptional<z.ZodString>;
|
|
7
7
|
webmasterAlias: z.ZodOptional<z.ZodString>;
|
|
8
|
-
webmasterReferralProvidedAt: z.ZodOptional<z.ZodPreprocess<z.ZodDate>>;
|
|
8
|
+
webmasterReferralProvidedAt: z.ZodOptional<z.ZodPreprocess<z.ZodDate, unknown>>;
|
|
9
9
|
utm: z.ZodOptional<z.ZodObject<{
|
|
10
10
|
utmSource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
11
11
|
utmMedium: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindDiagramsJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindHtmlPageBuilderSessionsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof HTML_PAGE_BUILDER_SESSION_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindImageEditorJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -6,7 +6,7 @@ export declare namespace FindImageGenerationJobsCommand {
|
|
|
6
6
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
7
7
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
8
8
|
title: z.ZodOptional<z.ZodString>;
|
|
9
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
9
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
10
10
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
11
11
|
status: z.ZodOptional<z.ZodEnum<typeof IMAGE_GENERATION_GROUP_STATUS>>;
|
|
12
12
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindImageRecognitionJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
package/build/commands/tools/interior-design/find-interior-design-generation-groups.command.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare namespace FindInteriorDesignGenerationGroupsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof INTERIOR_DESIGN_GENERATION_GROUP_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindInteriorDesignJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindMarketplaceCardJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -333,7 +333,7 @@ export declare namespace FindMotionControlJobsCommand {
|
|
|
333
333
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
334
334
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
335
335
|
title: z.ZodOptional<z.ZodString>;
|
|
336
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
336
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
337
337
|
createdAtSortOrder: z.ZodDefault<z.ZodEnum<typeof JOB_SORT>>;
|
|
338
338
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
339
339
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindMusicJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindParaphraseJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindPhotoSessionJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof PHOTO_SESSION_GROUP_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindPresentationsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindSolvingEduTaskJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindSoundGenerationJobsCommand {
|
|
|
5
5
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindSpellCorrectorJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindSTTJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -4,7 +4,7 @@ export declare namespace FindToolWorkspacesCommand {
|
|
|
4
4
|
const RequestQuerySchema: z.ZodObject<{
|
|
5
5
|
toolType: z.ZodOptional<z.ZodEnum<typeof TOOL_CONTENT_TYPE>>;
|
|
6
6
|
title: z.ZodOptional<z.ZodString>;
|
|
7
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
7
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
8
8
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
9
9
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
10
10
|
updatedAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindTTSJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindVideoJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof VIDEO_GROUP_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindVideoEditorJobsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,7 @@ export declare namespace FindWriterDocumentsCommand {
|
|
|
5
5
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
6
6
|
offset: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
|
|
8
|
+
isFavorite: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
|
|
9
9
|
createdAtSortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SORT>>>;
|
|
10
10
|
status: z.ZodOptional<z.ZodEnum<typeof TOOL_JOB_STATUS>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
@@ -39,7 +39,7 @@ export declare namespace FindUsersByCriteriaCommand {
|
|
|
39
39
|
sortOrder: z.ZodOptional<z.ZodDefault<z.ZodEnum<typeof SORT_ORDER>>>;
|
|
40
40
|
limit: z.ZodCoercedNumber<unknown>;
|
|
41
41
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
42
|
-
}, z.core.$strip
|
|
42
|
+
}, z.core.$strip>, unknown>;
|
|
43
43
|
type Request = z.infer<typeof RequestSchema>;
|
|
44
44
|
const ResponseSchema: z.ZodObject<{
|
|
45
45
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -10,6 +10,9 @@ export declare namespace GetMeCommand {
|
|
|
10
10
|
type Request = z.infer<typeof RequestSchema>;
|
|
11
11
|
const ResponseSchema: z.ZodObject<{
|
|
12
12
|
data: z.ZodObject<{
|
|
13
|
+
capabilities: z.ZodObject<{
|
|
14
|
+
retail: z.ZodBoolean;
|
|
15
|
+
}, z.core.$strict>;
|
|
13
16
|
uuid: z.ZodUUID;
|
|
14
17
|
email: z.ZodEmail;
|
|
15
18
|
status: z.ZodEnum<typeof USER_STATUS>;
|
|
@@ -13,6 +13,7 @@ var GetMeCommand;
|
|
|
13
13
|
GetMeCommand.RequestSchema = zod_1.z.object({});
|
|
14
14
|
GetMeCommand.ResponseSchema = zod_1.z.object({
|
|
15
15
|
data: zod_1.z.object({
|
|
16
|
+
capabilities: zod_1.z.object({ retail: zod_1.z.boolean() }).strict(),
|
|
16
17
|
uuid: zod_1.z.uuid(),
|
|
17
18
|
email: zod_1.z.email(),
|
|
18
19
|
status: zod_1.z.enum(constants_1.USER_STATUS),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const QueryBooleanSchema: z.ZodPreprocess<z.ZodBoolean>;
|
|
2
|
+
export declare const QueryBooleanSchema: z.ZodPreprocess<z.ZodBoolean, unknown>;
|
package/build/models/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from './page-tool-settings.schema';
|
|
|
36
36
|
export * from './interior-design-page-binding.schema';
|
|
37
37
|
export * from './page-translation.schema';
|
|
38
38
|
export * from './payment-history-item.schema';
|
|
39
|
+
export * from './purchase-history.schema';
|
|
39
40
|
export * from './payment.schema';
|
|
40
41
|
export * from './invoice-for-payment.schema';
|
|
41
42
|
export * from './post.schema';
|
package/build/models/index.js
CHANGED
|
@@ -52,6 +52,7 @@ __exportStar(require("./page-tool-settings.schema"), exports);
|
|
|
52
52
|
__exportStar(require("./interior-design-page-binding.schema"), exports);
|
|
53
53
|
__exportStar(require("./page-translation.schema"), exports);
|
|
54
54
|
__exportStar(require("./payment-history-item.schema"), exports);
|
|
55
|
+
__exportStar(require("./purchase-history.schema"), exports);
|
|
55
56
|
__exportStar(require("./payment.schema"), exports);
|
|
56
57
|
__exportStar(require("./invoice-for-payment.schema"), exports);
|
|
57
58
|
__exportStar(require("./post.schema"), exports);
|
|
@@ -15,3 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./partner-codes.schema"), exports);
|
|
18
|
+
__exportStar(require("./partner-cabinet.schema"), exports);
|
|
19
|
+
__exportStar(require("./partner-administration.schema"), exports);
|
|
20
|
+
__exportStar(require("./partner-cabinet-context.schema"), exports);
|
|
21
|
+
__exportStar(require("./partner-leak-create.schema"), exports);
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PartnerCompanyCreateSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
email: z.ZodString;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
export declare const PartnerCompanyUpdateSchema: z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare const PartnerMembershipWriteSchema: z.ZodObject<{
|
|
10
|
+
email: z.ZodString;
|
|
11
|
+
role: z.ZodEnum<{
|
|
12
|
+
manager: "manager";
|
|
13
|
+
owner: "owner";
|
|
14
|
+
}>;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export declare const PartnerMembershipRoleUpdateSchema: z.ZodObject<{
|
|
17
|
+
role: z.ZodEnum<{
|
|
18
|
+
manager: "manager";
|
|
19
|
+
owner: "owner";
|
|
20
|
+
}>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export declare const PartnerAdminMembershipSchema: z.ZodObject<{
|
|
23
|
+
uuid: z.ZodUUID;
|
|
24
|
+
partnerId: z.ZodUUID;
|
|
25
|
+
userId: z.ZodUUID;
|
|
26
|
+
role: z.ZodEnum<{
|
|
27
|
+
manager: "manager";
|
|
28
|
+
owner: "owner";
|
|
29
|
+
}>;
|
|
30
|
+
createdAt: z.ZodISODateTime;
|
|
31
|
+
email: z.ZodNullable<z.ZodString>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export declare const PartnerCatalogProductSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"subscription">;
|
|
35
|
+
title: z.ZodString;
|
|
36
|
+
subscriptionId: z.ZodUUID;
|
|
37
|
+
durationMonths: z.ZodNumber;
|
|
38
|
+
mainSubscriptionId: z.ZodNullable<z.ZodUUID>;
|
|
39
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"stars">;
|
|
41
|
+
title: z.ZodString;
|
|
42
|
+
productId: z.ZodUUID;
|
|
43
|
+
starsAmount: z.ZodString;
|
|
44
|
+
}, z.core.$strict>], "kind">;
|
|
45
|
+
export declare const PartnerOfferSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
46
|
+
title: z.ZodString;
|
|
47
|
+
retailPrice: z.ZodString;
|
|
48
|
+
commissionType: z.ZodEnum<{
|
|
49
|
+
fixed: "fixed";
|
|
50
|
+
percent: "percent";
|
|
51
|
+
}>;
|
|
52
|
+
commissionValue: z.ZodString;
|
|
53
|
+
maxOutstanding: z.ZodNumber;
|
|
54
|
+
codeTtlDays: z.ZodNumber;
|
|
55
|
+
active: z.ZodBoolean;
|
|
56
|
+
kind: z.ZodLiteral<"subscription">;
|
|
57
|
+
subscriptionId: z.ZodUUID;
|
|
58
|
+
productId: z.ZodDefault<z.ZodNull>;
|
|
59
|
+
durationMonths: z.ZodNumber;
|
|
60
|
+
starsAmount: z.ZodDefault<z.ZodNull>;
|
|
61
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
62
|
+
title: z.ZodString;
|
|
63
|
+
retailPrice: z.ZodString;
|
|
64
|
+
commissionType: z.ZodEnum<{
|
|
65
|
+
fixed: "fixed";
|
|
66
|
+
percent: "percent";
|
|
67
|
+
}>;
|
|
68
|
+
commissionValue: z.ZodString;
|
|
69
|
+
maxOutstanding: z.ZodNumber;
|
|
70
|
+
codeTtlDays: z.ZodNumber;
|
|
71
|
+
active: z.ZodBoolean;
|
|
72
|
+
kind: z.ZodLiteral<"stars">;
|
|
73
|
+
productId: z.ZodUUID;
|
|
74
|
+
subscriptionId: z.ZodDefault<z.ZodNull>;
|
|
75
|
+
durationMonths: z.ZodDefault<z.ZodNull>;
|
|
76
|
+
starsAmount: z.ZodString;
|
|
77
|
+
}, z.core.$strict>], "kind">;
|
|
78
|
+
export declare const PartnerOfferCreateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
79
|
+
title: z.ZodString;
|
|
80
|
+
retailPrice: z.ZodString;
|
|
81
|
+
commissionType: z.ZodEnum<{
|
|
82
|
+
fixed: "fixed";
|
|
83
|
+
percent: "percent";
|
|
84
|
+
}>;
|
|
85
|
+
commissionValue: z.ZodString;
|
|
86
|
+
maxOutstanding: z.ZodNumber;
|
|
87
|
+
kind: z.ZodLiteral<"subscription">;
|
|
88
|
+
subscriptionId: z.ZodUUID;
|
|
89
|
+
productId: z.ZodDefault<z.ZodNull>;
|
|
90
|
+
durationMonths: z.ZodNumber;
|
|
91
|
+
starsAmount: z.ZodDefault<z.ZodNull>;
|
|
92
|
+
codeTtlDays: z.ZodDefault<z.ZodNumber>;
|
|
93
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
94
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
95
|
+
title: z.ZodString;
|
|
96
|
+
retailPrice: z.ZodString;
|
|
97
|
+
commissionType: z.ZodEnum<{
|
|
98
|
+
fixed: "fixed";
|
|
99
|
+
percent: "percent";
|
|
100
|
+
}>;
|
|
101
|
+
commissionValue: z.ZodString;
|
|
102
|
+
maxOutstanding: z.ZodNumber;
|
|
103
|
+
kind: z.ZodLiteral<"stars">;
|
|
104
|
+
productId: z.ZodUUID;
|
|
105
|
+
subscriptionId: z.ZodDefault<z.ZodNull>;
|
|
106
|
+
durationMonths: z.ZodDefault<z.ZodNull>;
|
|
107
|
+
starsAmount: z.ZodString;
|
|
108
|
+
codeTtlDays: z.ZodDefault<z.ZodNumber>;
|
|
109
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strict>], "kind">;
|
|
111
|
+
export declare const PartnerAdminCodeSearchSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
112
|
+
serial: z.ZodString;
|
|
113
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
114
|
+
code: z.ZodString;
|
|
115
|
+
}, z.core.$strict>]>;
|
|
116
|
+
export declare const PartnerAdminCodeSearchResultSchema: z.ZodObject<{
|
|
117
|
+
company: z.ZodObject<{
|
|
118
|
+
uuid: z.ZodUUID;
|
|
119
|
+
name: z.ZodString;
|
|
120
|
+
code: z.ZodString;
|
|
121
|
+
status: z.ZodEnum<{
|
|
122
|
+
active: "active";
|
|
123
|
+
disabled: "disabled";
|
|
124
|
+
}>;
|
|
125
|
+
createdAt: z.ZodISODateTime;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
batch: z.ZodObject<{
|
|
128
|
+
uuid: z.ZodUUID;
|
|
129
|
+
partnerId: z.ZodUUID;
|
|
130
|
+
offerId: z.ZodUUID;
|
|
131
|
+
product: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
132
|
+
kind: z.ZodLiteral<"subscription">;
|
|
133
|
+
title: z.ZodString;
|
|
134
|
+
subscriptionId: z.ZodUUID;
|
|
135
|
+
durationMonths: z.ZodNumber;
|
|
136
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
137
|
+
kind: z.ZodLiteral<"stars">;
|
|
138
|
+
title: z.ZodString;
|
|
139
|
+
productId: z.ZodUUID;
|
|
140
|
+
starsAmount: z.ZodString;
|
|
141
|
+
}, z.core.$strict>], "kind">;
|
|
142
|
+
quantity: z.ZodNumber;
|
|
143
|
+
status: z.ZodEnum<{
|
|
144
|
+
active: "active";
|
|
145
|
+
expired: "expired";
|
|
146
|
+
revoked: "revoked";
|
|
147
|
+
}>;
|
|
148
|
+
expiresAt: z.ZodISODateTime;
|
|
149
|
+
createdAt: z.ZodISODateTime;
|
|
150
|
+
createdByUserId: z.ZodNullable<z.ZodUUID>;
|
|
151
|
+
createdBy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
152
|
+
name: z.ZodNullable<z.ZodString>;
|
|
153
|
+
}, z.core.$strict>>>;
|
|
154
|
+
exportCount: z.ZodNumber;
|
|
155
|
+
lastExportedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
156
|
+
activatedCount: z.ZodNumber;
|
|
157
|
+
remainingCount: z.ZodNumber;
|
|
158
|
+
}, z.core.$strict>;
|
|
159
|
+
code: z.ZodObject<{
|
|
160
|
+
uuid: z.ZodUUID;
|
|
161
|
+
batchId: z.ZodUUID;
|
|
162
|
+
serial: z.ZodString;
|
|
163
|
+
status: z.ZodEnum<{
|
|
164
|
+
activated: "activated";
|
|
165
|
+
expired: "expired";
|
|
166
|
+
issued: "issued";
|
|
167
|
+
revoked: "revoked";
|
|
168
|
+
}>;
|
|
169
|
+
activatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
170
|
+
}, z.core.$strict>;
|
|
171
|
+
activatedByUserId: z.ZodNullable<z.ZodUUID>;
|
|
172
|
+
activatedByUser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
173
|
+
uuid: z.ZodUUID;
|
|
174
|
+
email: z.ZodEmail;
|
|
175
|
+
name: z.ZodNullable<z.ZodString>;
|
|
176
|
+
}, z.core.$strict>>>;
|
|
177
|
+
}, z.core.$strict>;
|
|
178
|
+
export type PartnerCompanyCreate = z.infer<typeof PartnerCompanyCreateSchema>;
|
|
179
|
+
export type PartnerMembershipWrite = z.infer<typeof PartnerMembershipWriteSchema>;
|
|
180
|
+
export type PartnerOfferSettings = z.infer<typeof PartnerOfferSettingsSchema>;
|
|
181
|
+
export type PartnerOfferCreate = z.infer<typeof PartnerOfferCreateSchema>;
|
|
182
|
+
export type PartnerAdminCodeSearch = z.infer<typeof PartnerAdminCodeSearchSchema>;
|
|
183
|
+
export type PartnerAdminCodeSearchResult = z.infer<typeof PartnerAdminCodeSearchResultSchema>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartnerAdminCodeSearchResultSchema = exports.PartnerAdminCodeSearchSchema = exports.PartnerOfferCreateSchema = exports.PartnerOfferSettingsSchema = exports.PartnerCatalogProductSchema = exports.PartnerAdminMembershipSchema = exports.PartnerMembershipRoleUpdateSchema = exports.PartnerMembershipWriteSchema = exports.PartnerCompanyUpdateSchema = exports.PartnerCompanyCreateSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const partner_codes_schema_1 = require("./partner-codes.schema");
|
|
6
|
+
// Write limits match PostgreSQL Int and Decimal(18,2), not widened report totals.
|
|
7
|
+
const databaseInteger = zod_1.z.number().int().min(0).max(2147483647);
|
|
8
|
+
const databaseMoney = partner_codes_schema_1.PartnerMoneySchema.regex(/^(0|[1-9]\d{0,15})\.\d{2}$/);
|
|
9
|
+
const nonemptyText = zod_1.z.string().trim().min(1);
|
|
10
|
+
const accountEmail = zod_1.z.string().trim().toLowerCase().email();
|
|
11
|
+
exports.PartnerCompanyCreateSchema = zod_1.z
|
|
12
|
+
.object({ name: nonemptyText, email: accountEmail })
|
|
13
|
+
.strict();
|
|
14
|
+
exports.PartnerCompanyUpdateSchema = zod_1.z.object({ name: nonemptyText }).strict();
|
|
15
|
+
exports.PartnerMembershipWriteSchema = zod_1.z
|
|
16
|
+
.object({ email: accountEmail, role: partner_codes_schema_1.PartnerRoleSchema })
|
|
17
|
+
.strict();
|
|
18
|
+
exports.PartnerMembershipRoleUpdateSchema = zod_1.z.object({ role: partner_codes_schema_1.PartnerRoleSchema }).strict();
|
|
19
|
+
exports.PartnerAdminMembershipSchema = partner_codes_schema_1.PartnerMembershipSchema.extend({
|
|
20
|
+
email: accountEmail.nullable(),
|
|
21
|
+
}).strict();
|
|
22
|
+
exports.PartnerCatalogProductSchema = zod_1.z.discriminatedUnion('kind', [
|
|
23
|
+
partner_codes_schema_1.PartnerProductSchema.options[0].extend({ mainSubscriptionId: zod_1.z.uuid().nullable() }),
|
|
24
|
+
partner_codes_schema_1.PartnerProductSchema.options[1],
|
|
25
|
+
]);
|
|
26
|
+
const offerSettings = {
|
|
27
|
+
title: nonemptyText,
|
|
28
|
+
retailPrice: databaseMoney,
|
|
29
|
+
commissionType: partner_codes_schema_1.PartnerCommissionTypeSchema,
|
|
30
|
+
commissionValue: partner_codes_schema_1.PartnerCommissionValueSchema,
|
|
31
|
+
maxOutstanding: databaseInteger,
|
|
32
|
+
codeTtlDays: databaseInteger.min(1),
|
|
33
|
+
active: zod_1.z.boolean(),
|
|
34
|
+
};
|
|
35
|
+
const subscriptionSettings = zod_1.z
|
|
36
|
+
.object(Object.assign(Object.assign({}, offerSettings), { kind: zod_1.z.literal('subscription'), subscriptionId: zod_1.z.uuid(), productId: zod_1.z.null().default(null), durationMonths: databaseInteger.min(1), starsAmount: zod_1.z.null().default(null) }))
|
|
37
|
+
.strict();
|
|
38
|
+
const starsSettings = zod_1.z
|
|
39
|
+
.object(Object.assign(Object.assign({}, offerSettings), { kind: zod_1.z.literal('stars'), productId: zod_1.z.uuid(), subscriptionId: zod_1.z.null().default(null), durationMonths: zod_1.z.null().default(null), starsAmount: databaseMoney.refine((value) => value !== '0.00') }))
|
|
40
|
+
.strict();
|
|
41
|
+
// Company comes from the route. A settings update cannot move an offer to another company.
|
|
42
|
+
exports.PartnerOfferSettingsSchema = zod_1.z
|
|
43
|
+
.discriminatedUnion('kind', [subscriptionSettings, starsSettings])
|
|
44
|
+
.refine(partner_codes_schema_1.validPartnerCommission, { message: 'Invalid partner commission conditions' });
|
|
45
|
+
const offerDefaults = {
|
|
46
|
+
codeTtlDays: offerSettings.codeTtlDays.default(365),
|
|
47
|
+
active: offerSettings.active.default(true),
|
|
48
|
+
};
|
|
49
|
+
exports.PartnerOfferCreateSchema = zod_1.z
|
|
50
|
+
.discriminatedUnion('kind', [
|
|
51
|
+
subscriptionSettings.extend(offerDefaults),
|
|
52
|
+
starsSettings.extend(offerDefaults),
|
|
53
|
+
])
|
|
54
|
+
.refine(partner_codes_schema_1.validPartnerCommission, { message: 'Invalid partner commission conditions' });
|
|
55
|
+
// POST body only. Never persist/log these inputs or reuse them as read models.
|
|
56
|
+
exports.PartnerAdminCodeSearchSchema = zod_1.z.union([
|
|
57
|
+
zod_1.z.object({ serial: zod_1.z.string().min(1).max(128) }).strict(),
|
|
58
|
+
zod_1.z.object({ code: zod_1.z.string().min(1).max(128) }).strict(),
|
|
59
|
+
]);
|
|
60
|
+
exports.PartnerAdminCodeSearchResultSchema = zod_1.z
|
|
61
|
+
.object({
|
|
62
|
+
company: partner_codes_schema_1.PartnerCompanySchema,
|
|
63
|
+
batch: partner_codes_schema_1.PartnerBatchSchema,
|
|
64
|
+
code: partner_codes_schema_1.PartnerCodeSchema,
|
|
65
|
+
activatedByUserId: zod_1.z.uuid().nullable(),
|
|
66
|
+
activatedByUser: zod_1.z
|
|
67
|
+
.object({ uuid: zod_1.z.uuid(), email: zod_1.z.email(), name: zod_1.z.string().nullable() })
|
|
68
|
+
.strict()
|
|
69
|
+
.nullable()
|
|
70
|
+
.optional(),
|
|
71
|
+
})
|
|
72
|
+
.strict();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PartnerCabinetContextSchema: z.ZodObject<{
|
|
3
|
+
company: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodUUID;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
status: z.ZodEnum<{
|
|
8
|
+
active: "active";
|
|
9
|
+
disabled: "disabled";
|
|
10
|
+
}>;
|
|
11
|
+
createdAt: z.ZodISODateTime;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
membership: z.ZodObject<{
|
|
14
|
+
uuid: z.ZodUUID;
|
|
15
|
+
partnerId: z.ZodUUID;
|
|
16
|
+
userId: z.ZodUUID;
|
|
17
|
+
role: z.ZodEnum<{
|
|
18
|
+
manager: "manager";
|
|
19
|
+
owner: "owner";
|
|
20
|
+
}>;
|
|
21
|
+
createdAt: z.ZodISODateTime;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export type PartnerCabinetContext = z.infer<typeof PartnerCabinetContextSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartnerCabinetContextSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const partner_codes_schema_1 = require("./partner-codes.schema");
|
|
6
|
+
exports.PartnerCabinetContextSchema = zod_1.z
|
|
7
|
+
.object({ company: partner_codes_schema_1.PartnerCompanySchema, membership: partner_codes_schema_1.PartnerMembershipSchema })
|
|
8
|
+
.strict();
|