@ai-grator/api 0.1.30 → 0.1.31
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/auth/endpoints/commands/register.command.ts +1 -0
- package/build/auth/endpoints/commands/register.command.d.ts +2 -0
- package/build/auth/endpoints/commands/register.command.d.ts.map +1 -1
- package/build/auth/endpoints/commands/register.command.js +1 -0
- package/build/errors/errors.d.ts +25 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +25 -0
- package/build/referral/endpoints/referral.d.ts +6 -0
- package/build/referral/endpoints/referral.d.ts.map +1 -1
- package/build/referral/endpoints/referral.js +7 -1
- package/build/referral/enums/index.d.ts +1 -0
- package/build/referral/enums/index.d.ts.map +1 -1
- package/build/referral/enums/index.js +1 -0
- package/build/referral/enums/tool.enum.d.ts +6 -0
- package/build/referral/enums/tool.enum.d.ts.map +1 -0
- package/build/referral/enums/tool.enum.js +9 -0
- package/build/referral/models/index.d.ts +1 -0
- package/build/referral/models/index.d.ts.map +1 -1
- package/build/referral/models/index.js +1 -0
- package/build/referral/models/referral-link-response.schema.d.ts +95 -0
- package/build/referral/models/referral-link-response.schema.d.ts.map +1 -0
- package/build/referral/models/referral-link-response.schema.js +65 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/errors/errors.ts +25 -0
- package/package.json +1 -1
- package/referral/endpoints/referral.ts +8 -0
- package/referral/enums/index.ts +1 -0
- package/referral/enums/tool.enum.ts +5 -0
- package/referral/models/index.ts +1 -0
- package/referral/models/referral-link-response.schema.ts +92 -0
|
@@ -3,6 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
export declare namespace AuthRegisterSchema {
|
|
4
4
|
const RegisterQuery: z.ZodObject<{
|
|
5
5
|
ref: z.ZodOptional<z.ZodUUID>;
|
|
6
|
+
promo: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, z.core.$strip>;
|
|
7
8
|
const RegisterCommandBody: z.ZodObject<{
|
|
8
9
|
email: z.ZodEmail;
|
|
@@ -21,6 +22,7 @@ export declare const RegisterCommand: {
|
|
|
21
22
|
request: {
|
|
22
23
|
query: z.ZodObject<{
|
|
23
24
|
ref: z.ZodOptional<z.ZodUUID>;
|
|
25
|
+
promo: z.ZodOptional<z.ZodString>;
|
|
24
26
|
}, z.core.$strip>;
|
|
25
27
|
body: z.ZodObject<{
|
|
26
28
|
email: z.ZodEmail;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.command.d.ts","sourceRoot":"","sources":["../../../../auth/endpoints/commands/register.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"register.command.d.ts","sourceRoot":"","sources":["../../../../auth/endpoints/commands/register.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,aAAa;;;qBAGxB,CAAC;IAEI,MAAM,mBAAmB;;;;;qBAK9B,CAAC;IAEI,MAAM,uBAAuB;;qBAElC,CAAC;CACN;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;CAa1B,CAAC"}
|
|
@@ -8,6 +8,7 @@ var AuthRegisterSchema;
|
|
|
8
8
|
(function (AuthRegisterSchema) {
|
|
9
9
|
AuthRegisterSchema.RegisterQuery = zod_1.z.object({
|
|
10
10
|
ref: zod_1.z.uuid().optional(),
|
|
11
|
+
promo: zod_1.z.string().min(1).max(32).optional(),
|
|
11
12
|
});
|
|
12
13
|
AuthRegisterSchema.RegisterCommandBody = zod_1.z.object({
|
|
13
14
|
email: zod_1.z.email(),
|
package/build/errors/errors.d.ts
CHANGED
|
@@ -701,6 +701,31 @@ export declare const ERRORS: {
|
|
|
701
701
|
readonly code: "REFERRAL.UPDATE_ERROR";
|
|
702
702
|
readonly message: "Не удалось обновить конфигурацию реферальной программы";
|
|
703
703
|
};
|
|
704
|
+
readonly TOOL_REQUIRED_FOR_MODEL: {
|
|
705
|
+
readonly httpCode: 400;
|
|
706
|
+
readonly code: "REFERRAL.TOOL_REQUIRED_FOR_MODEL";
|
|
707
|
+
readonly message: "Для выбора модели необходимо указать инструмент";
|
|
708
|
+
};
|
|
709
|
+
readonly LINK_LIMIT_REACHED: {
|
|
710
|
+
readonly httpCode: 400;
|
|
711
|
+
readonly code: "REFERRAL.LINK_LIMIT_REACHED";
|
|
712
|
+
readonly message: "Достигнут лимит реферальных ссылок";
|
|
713
|
+
};
|
|
714
|
+
readonly LINK_HAS_REFERRALS: {
|
|
715
|
+
readonly httpCode: 409;
|
|
716
|
+
readonly code: "REFERRAL.LINK_HAS_REFERRALS";
|
|
717
|
+
readonly message: "Нельзя удалить ссылку, по которой уже пришли рефералы";
|
|
718
|
+
};
|
|
719
|
+
readonly LINK_NOT_FOUND: {
|
|
720
|
+
readonly httpCode: 404;
|
|
721
|
+
readonly code: "REFERRAL.LINK_NOT_FOUND";
|
|
722
|
+
readonly message: "Реферальная ссылка не найдена";
|
|
723
|
+
};
|
|
724
|
+
readonly MODEL_NOT_AVAILABLE_IN_TOOL: {
|
|
725
|
+
readonly httpCode: 400;
|
|
726
|
+
readonly code: "REFERRAL.MODEL_NOT_AVAILABLE_IN_TOOL";
|
|
727
|
+
readonly message: "Выбранная модель недоступна в этом инструменте";
|
|
728
|
+
};
|
|
704
729
|
};
|
|
705
730
|
readonly EMAIL: {
|
|
706
731
|
readonly SEND_ERROR: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA42BT,CAAC"}
|
package/build/errors/errors.js
CHANGED
|
@@ -704,6 +704,31 @@ exports.ERRORS = {
|
|
|
704
704
|
code: 'REFERRAL.UPDATE_ERROR',
|
|
705
705
|
message: 'Не удалось обновить конфигурацию реферальной программы',
|
|
706
706
|
},
|
|
707
|
+
TOOL_REQUIRED_FOR_MODEL: {
|
|
708
|
+
httpCode: 400,
|
|
709
|
+
code: 'REFERRAL.TOOL_REQUIRED_FOR_MODEL',
|
|
710
|
+
message: 'Для выбора модели необходимо указать инструмент',
|
|
711
|
+
},
|
|
712
|
+
LINK_LIMIT_REACHED: {
|
|
713
|
+
httpCode: 400,
|
|
714
|
+
code: 'REFERRAL.LINK_LIMIT_REACHED',
|
|
715
|
+
message: 'Достигнут лимит реферальных ссылок',
|
|
716
|
+
},
|
|
717
|
+
LINK_HAS_REFERRALS: {
|
|
718
|
+
httpCode: 409,
|
|
719
|
+
code: 'REFERRAL.LINK_HAS_REFERRALS',
|
|
720
|
+
message: 'Нельзя удалить ссылку, по которой уже пришли рефералы',
|
|
721
|
+
},
|
|
722
|
+
LINK_NOT_FOUND: {
|
|
723
|
+
httpCode: 404,
|
|
724
|
+
code: 'REFERRAL.LINK_NOT_FOUND',
|
|
725
|
+
message: 'Реферальная ссылка не найдена',
|
|
726
|
+
},
|
|
727
|
+
MODEL_NOT_AVAILABLE_IN_TOOL: {
|
|
728
|
+
httpCode: 400,
|
|
729
|
+
code: 'REFERRAL.MODEL_NOT_AVAILABLE_IN_TOOL',
|
|
730
|
+
message: 'Выбранная модель недоступна в этом инструменте',
|
|
731
|
+
},
|
|
707
732
|
},
|
|
708
733
|
EMAIL: {
|
|
709
734
|
SEND_ERROR: {
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export declare const REFERRAL_CONTROLLER: "referral";
|
|
2
|
+
export declare const REFERRAL_LINK_PATH: "r";
|
|
3
|
+
export declare const REFERRAL_UTM_MEDIUM: "referral";
|
|
2
4
|
export declare const REFERRAL_ROUTES: {
|
|
3
5
|
readonly GET_CONFIG: "config";
|
|
4
6
|
readonly GET_STATS: "stats";
|
|
5
7
|
readonly GET_BONUS_HISTORY: "bonus-history";
|
|
8
|
+
readonly CREATE_LINK: "link";
|
|
9
|
+
readonly GET_LINKS: "links";
|
|
10
|
+
readonly DELETE_LINK: "link/:code";
|
|
11
|
+
readonly RESOLVE_LINK: "resolve/:code";
|
|
6
12
|
};
|
|
7
13
|
//# sourceMappingURL=referral.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../../referral/endpoints/referral.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,EAAG,UAAmB,CAAC;AAEvD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../../referral/endpoints/referral.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,EAAG,UAAmB,CAAC;AAEvD,eAAO,MAAM,kBAAkB,EAAG,GAAY,CAAC;AAE/C,eAAO,MAAM,mBAAmB,EAAG,UAAmB,CAAC;AAEvD,eAAO,MAAM,eAAe;;;;;;;;CAQlB,CAAC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REFERRAL_ROUTES = exports.REFERRAL_CONTROLLER = void 0;
|
|
3
|
+
exports.REFERRAL_ROUTES = exports.REFERRAL_UTM_MEDIUM = exports.REFERRAL_LINK_PATH = exports.REFERRAL_CONTROLLER = void 0;
|
|
4
4
|
exports.REFERRAL_CONTROLLER = 'referral';
|
|
5
|
+
exports.REFERRAL_LINK_PATH = 'r';
|
|
6
|
+
exports.REFERRAL_UTM_MEDIUM = 'referral';
|
|
5
7
|
exports.REFERRAL_ROUTES = {
|
|
6
8
|
GET_CONFIG: 'config',
|
|
7
9
|
GET_STATS: 'stats',
|
|
8
10
|
GET_BONUS_HISTORY: 'bonus-history',
|
|
11
|
+
CREATE_LINK: 'link',
|
|
12
|
+
GET_LINKS: 'links',
|
|
13
|
+
DELETE_LINK: 'link/:code',
|
|
14
|
+
RESOLVE_LINK: 'resolve/:code',
|
|
9
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../referral/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../referral/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC"}
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./referral-status.enum"), exports);
|
|
18
18
|
__exportStar(require("./referral-reward-status.enum"), exports);
|
|
19
19
|
__exportStar(require("./bonus-history-filter.enum"), exports);
|
|
20
|
+
__exportStar(require("./tool.enum"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.enum.d.ts","sourceRoot":"","sources":["../../../referral/enums/tool.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI;IACZ,IAAI,SAAS;IACb,KAAK,UAAU;IACf,KAAK,UAAU;CAClB"}
|
|
@@ -2,4 +2,5 @@ export * from './referral-config-response.schema';
|
|
|
2
2
|
export * from './partner-referral-rate-config.schema';
|
|
3
3
|
export * from './referral-stats-response.schema';
|
|
4
4
|
export * from './bonus-history-response.schema';
|
|
5
|
+
export * from './referral-link-response.schema';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../referral/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../referral/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC"}
|
|
@@ -18,3 +18,4 @@ __exportStar(require("./referral-config-response.schema"), exports);
|
|
|
18
18
|
__exportStar(require("./partner-referral-rate-config.schema"), exports);
|
|
19
19
|
__exportStar(require("./referral-stats-response.schema"), exports);
|
|
20
20
|
__exportStar(require("./bonus-history-response.schema"), exports);
|
|
21
|
+
__exportStar(require("./referral-link-response.schema"), exports);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL } from '../enums';
|
|
3
|
+
export declare const CreateReferralLinkBodySchema: z.ZodObject<{
|
|
4
|
+
tool: z.ZodOptional<z.ZodEnum<typeof TOOL>>;
|
|
5
|
+
modelUuid: z.ZodOptional<z.ZodUUID>;
|
|
6
|
+
source: z.ZodOptional<z.ZodString>;
|
|
7
|
+
description: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type CreateReferralLinkBodySchemaType = z.infer<typeof CreateReferralLinkBodySchema>;
|
|
10
|
+
export declare const CreateReferralLinkResponseSchema: z.ZodObject<{
|
|
11
|
+
link: z.ZodURL;
|
|
12
|
+
code: z.ZodString;
|
|
13
|
+
description: z.ZodNullable<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type CreateReferralLinkResponseSchemaType = z.infer<typeof CreateReferralLinkResponseSchema>;
|
|
16
|
+
export declare const ReferralLinkListItemSchema: z.ZodObject<{
|
|
17
|
+
code: z.ZodString;
|
|
18
|
+
link: z.ZodURL;
|
|
19
|
+
tool: z.ZodNullable<z.ZodEnum<typeof TOOL>>;
|
|
20
|
+
modelUuid: z.ZodNullable<z.ZodUUID>;
|
|
21
|
+
source: z.ZodNullable<z.ZodString>;
|
|
22
|
+
description: z.ZodNullable<z.ZodString>;
|
|
23
|
+
referralsCount: z.ZodNumber;
|
|
24
|
+
createdAt: z.ZodISODateTime;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type ReferralLinkListItemSchemaType = z.infer<typeof ReferralLinkListItemSchema>;
|
|
27
|
+
export declare const GetReferralLinksResponseSchema: z.ZodObject<{
|
|
28
|
+
links: z.ZodArray<z.ZodObject<{
|
|
29
|
+
code: z.ZodString;
|
|
30
|
+
link: z.ZodURL;
|
|
31
|
+
tool: z.ZodNullable<z.ZodEnum<typeof TOOL>>;
|
|
32
|
+
modelUuid: z.ZodNullable<z.ZodUUID>;
|
|
33
|
+
source: z.ZodNullable<z.ZodString>;
|
|
34
|
+
description: z.ZodNullable<z.ZodString>;
|
|
35
|
+
referralsCount: z.ZodNumber;
|
|
36
|
+
createdAt: z.ZodISODateTime;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type GetReferralLinksResponseSchemaType = z.infer<typeof GetReferralLinksResponseSchema>;
|
|
40
|
+
export declare const DeleteReferralLinkParamsSchema: z.ZodObject<{
|
|
41
|
+
code: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type DeleteReferralLinkParamsSchemaType = z.infer<typeof DeleteReferralLinkParamsSchema>;
|
|
44
|
+
export declare const DeleteReferralLinkResponseSchema: z.ZodObject<{
|
|
45
|
+
isDeleted: z.ZodLiteral<true>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type DeleteReferralLinkResponseSchemaType = z.infer<typeof DeleteReferralLinkResponseSchema>;
|
|
48
|
+
export declare const ResolveReferralLinkParamsSchema: z.ZodObject<{
|
|
49
|
+
code: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type ResolveReferralLinkParamsSchemaType = z.infer<typeof ResolveReferralLinkParamsSchema>;
|
|
52
|
+
export declare const ReferralLinkVisitParamsSchema: z.ZodObject<{
|
|
53
|
+
referral: z.ZodObject<{
|
|
54
|
+
code: z.ZodString;
|
|
55
|
+
refId: z.ZodUUID;
|
|
56
|
+
tool: z.ZodNullable<z.ZodEnum<typeof TOOL>>;
|
|
57
|
+
model: z.ZodNullable<z.ZodString>;
|
|
58
|
+
source: z.ZodNullable<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type ReferralLinkVisitParamsSchemaType = z.infer<typeof ReferralLinkVisitParamsSchema>;
|
|
62
|
+
export declare const ReferralLinkUtmSchema: z.ZodObject<{
|
|
63
|
+
utm_source: z.ZodString;
|
|
64
|
+
utm_medium: z.ZodString;
|
|
65
|
+
utm_campaign: z.ZodString;
|
|
66
|
+
utm_content: z.ZodNullable<z.ZodString>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export type ReferralLinkUtmSchemaType = z.infer<typeof ReferralLinkUtmSchema>;
|
|
69
|
+
export declare const ResolveReferralLinkResponseSchema: z.ZodObject<{
|
|
70
|
+
referrerId: z.ZodUUID;
|
|
71
|
+
tool: z.ZodNullable<z.ZodEnum<typeof TOOL>>;
|
|
72
|
+
modelUuid: z.ZodNullable<z.ZodUUID>;
|
|
73
|
+
modelName: z.ZodNullable<z.ZodString>;
|
|
74
|
+
source: z.ZodNullable<z.ZodString>;
|
|
75
|
+
metrica: z.ZodObject<{
|
|
76
|
+
params: z.ZodObject<{
|
|
77
|
+
referral: z.ZodObject<{
|
|
78
|
+
code: z.ZodString;
|
|
79
|
+
refId: z.ZodUUID;
|
|
80
|
+
tool: z.ZodNullable<z.ZodEnum<typeof TOOL>>;
|
|
81
|
+
model: z.ZodNullable<z.ZodString>;
|
|
82
|
+
source: z.ZodNullable<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
utm: z.ZodObject<{
|
|
86
|
+
utm_source: z.ZodString;
|
|
87
|
+
utm_medium: z.ZodString;
|
|
88
|
+
utm_campaign: z.ZodString;
|
|
89
|
+
utm_content: z.ZodNullable<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
utmQuery: z.ZodString;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
export type ResolveReferralLinkResponseSchemaType = z.infer<typeof ResolveReferralLinkResponseSchema>;
|
|
95
|
+
//# sourceMappingURL=referral-link-response.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referral-link-response.schema.d.ts","sourceRoot":"","sources":["../../../referral/models/referral-link-response.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,eAAO,MAAM,4BAA4B;;;;;iBAKvC,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAE5F,eAAO,MAAM,gCAAgC;;;;iBAI3C,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEpG,eAAO,MAAM,0BAA0B;;;;;;;;;iBASrC,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAExF,eAAO,MAAM,8BAA8B;;;;;;;;;;;iBAEzC,CAAC;AAEH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEhG,eAAO,MAAM,8BAA8B;;iBAEzC,CAAC;AAEH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEhG,eAAO,MAAM,gCAAgC;;iBAE3C,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEpG,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAElG,eAAO,MAAM,6BAA6B;;;;;;;;iBAQxC,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE9F,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;iBAW5C,CAAC;AAEH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResolveReferralLinkResponseSchema = exports.ReferralLinkUtmSchema = exports.ReferralLinkVisitParamsSchema = exports.ResolveReferralLinkParamsSchema = exports.DeleteReferralLinkResponseSchema = exports.DeleteReferralLinkParamsSchema = exports.GetReferralLinksResponseSchema = exports.ReferralLinkListItemSchema = exports.CreateReferralLinkResponseSchema = exports.CreateReferralLinkBodySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
exports.CreateReferralLinkBodySchema = zod_1.z.object({
|
|
7
|
+
tool: zod_1.z.enum(enums_1.TOOL).optional(),
|
|
8
|
+
modelUuid: zod_1.z.uuid().optional(),
|
|
9
|
+
source: zod_1.z.string().trim().min(1).max(100).optional(),
|
|
10
|
+
description: zod_1.z.string().trim().min(1).max(200).optional(),
|
|
11
|
+
});
|
|
12
|
+
exports.CreateReferralLinkResponseSchema = zod_1.z.object({
|
|
13
|
+
link: zod_1.z.url(),
|
|
14
|
+
code: zod_1.z.string(),
|
|
15
|
+
description: zod_1.z.string().nullable(),
|
|
16
|
+
});
|
|
17
|
+
exports.ReferralLinkListItemSchema = zod_1.z.object({
|
|
18
|
+
code: zod_1.z.string(),
|
|
19
|
+
link: zod_1.z.url(),
|
|
20
|
+
tool: zod_1.z.enum(enums_1.TOOL).nullable(),
|
|
21
|
+
modelUuid: zod_1.z.uuid().nullable(),
|
|
22
|
+
source: zod_1.z.string().nullable(),
|
|
23
|
+
description: zod_1.z.string().nullable(),
|
|
24
|
+
referralsCount: zod_1.z.number().int().nonnegative(),
|
|
25
|
+
createdAt: zod_1.z.iso.datetime(),
|
|
26
|
+
});
|
|
27
|
+
exports.GetReferralLinksResponseSchema = zod_1.z.object({
|
|
28
|
+
links: zod_1.z.array(exports.ReferralLinkListItemSchema),
|
|
29
|
+
});
|
|
30
|
+
exports.DeleteReferralLinkParamsSchema = zod_1.z.object({
|
|
31
|
+
code: zod_1.z.string().min(1).max(32),
|
|
32
|
+
});
|
|
33
|
+
exports.DeleteReferralLinkResponseSchema = zod_1.z.object({
|
|
34
|
+
isDeleted: zod_1.z.literal(true),
|
|
35
|
+
});
|
|
36
|
+
exports.ResolveReferralLinkParamsSchema = zod_1.z.object({
|
|
37
|
+
code: zod_1.z.string().min(1).max(32),
|
|
38
|
+
});
|
|
39
|
+
exports.ReferralLinkVisitParamsSchema = zod_1.z.object({
|
|
40
|
+
referral: zod_1.z.object({
|
|
41
|
+
code: zod_1.z.string(),
|
|
42
|
+
refId: zod_1.z.uuid(),
|
|
43
|
+
tool: zod_1.z.enum(enums_1.TOOL).nullable(),
|
|
44
|
+
model: zod_1.z.string().nullable(),
|
|
45
|
+
source: zod_1.z.string().nullable(),
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
48
|
+
exports.ReferralLinkUtmSchema = zod_1.z.object({
|
|
49
|
+
utm_source: zod_1.z.string(),
|
|
50
|
+
utm_medium: zod_1.z.string(),
|
|
51
|
+
utm_campaign: zod_1.z.string(),
|
|
52
|
+
utm_content: zod_1.z.string().nullable(),
|
|
53
|
+
});
|
|
54
|
+
exports.ResolveReferralLinkResponseSchema = zod_1.z.object({
|
|
55
|
+
referrerId: zod_1.z.uuid(),
|
|
56
|
+
tool: zod_1.z.enum(enums_1.TOOL).nullable(),
|
|
57
|
+
modelUuid: zod_1.z.uuid().nullable(),
|
|
58
|
+
modelName: zod_1.z.string().nullable(),
|
|
59
|
+
source: zod_1.z.string().nullable(),
|
|
60
|
+
metrica: zod_1.z.object({
|
|
61
|
+
params: exports.ReferralLinkVisitParamsSchema,
|
|
62
|
+
utm: exports.ReferralLinkUtmSchema,
|
|
63
|
+
utmQuery: zod_1.z.string(),
|
|
64
|
+
}),
|
|
65
|
+
});
|