@deallony/shared 1.2.41 → 1.2.50

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.
Files changed (42) hide show
  1. package/README.md +44 -0
  2. package/dist/cjs/constants/used-product/UsedProduct.js +1 -1
  3. package/dist/cjs/dto/ad/Ad.dto.d.ts +8 -3
  4. package/dist/cjs/dto/ad/Ad.dto.js +1 -3
  5. package/dist/cjs/dto/index.d.ts +1 -0
  6. package/dist/cjs/dto/index.js +2 -1
  7. package/dist/cjs/index.d.ts +2 -1
  8. package/dist/cjs/index.js +2 -1
  9. package/dist/cjs/schema/ad/save-ad.schema.d.ts +51 -53
  10. package/dist/cjs/schema/ad/save-ad.schema.js +62 -51
  11. package/dist/cjs/schema/communication/ai-conversation.schema.d.ts +65 -0
  12. package/dist/cjs/schema/communication/ai-conversation.schema.js +43 -0
  13. package/dist/cjs/schema/communication/index.d.ts +2 -0
  14. package/dist/cjs/schema/communication/index.js +18 -0
  15. package/dist/cjs/schema/communication/support-ticket.schema.d.ts +119 -0
  16. package/dist/cjs/schema/communication/support-ticket.schema.js +35 -0
  17. package/dist/cjs/schema/index.d.ts +1 -0
  18. package/dist/cjs/schema/index.js +2 -1
  19. package/dist/cjs/types/ad/AdPromotion.d.ts +28 -0
  20. package/dist/cjs/types/index.d.ts +1 -0
  21. package/dist/cjs/types/index.js +3 -1
  22. package/dist/cjs/types/kyc/Kyc.d.ts +39 -0
  23. package/dist/cjs/types/kyc/Kyc.js +25 -0
  24. package/dist/cjs/types/kyc/index.d.ts +1 -0
  25. package/dist/cjs/types/kyc/index.js +17 -0
  26. package/dist/cjs/types/used-product/UsedProduct.d.ts +1 -1
  27. package/dist/cjs/types/used-product/UsedProduct.js +1 -1
  28. package/dist/cjs/types/user/PotentialUser.d.ts +8 -0
  29. package/dist/esm/constants/used-product/UsedProduct.js +1 -1
  30. package/dist/esm/dto/ad/Ad.dto.js +1 -3
  31. package/dist/esm/dto/index.js +1 -0
  32. package/dist/esm/index.js +1 -0
  33. package/dist/esm/schema/ad/save-ad.schema.js +63 -52
  34. package/dist/esm/schema/communication/ai-conversation.schema.js +40 -0
  35. package/dist/esm/schema/communication/index.js +2 -0
  36. package/dist/esm/schema/communication/support-ticket.schema.js +32 -0
  37. package/dist/esm/schema/index.js +1 -0
  38. package/dist/esm/types/index.js +2 -0
  39. package/dist/esm/types/kyc/Kyc.js +22 -0
  40. package/dist/esm/types/kyc/index.js +1 -0
  41. package/dist/esm/types/used-product/UsedProduct.js +1 -1
  42. package/package.json +58 -44
@@ -0,0 +1,65 @@
1
+ import { z } from 'zod';
2
+ export declare const MarketingSubjectTypeSchema: z.ZodEnum<{
3
+ properties: "properties";
4
+ services: "services";
5
+ motors: "motors";
6
+ used_products: "used_products";
7
+ }>;
8
+ export declare const ConversationLanguageSchema: z.ZodEnum<{
9
+ en: "en";
10
+ ar: "ar";
11
+ }>;
12
+ export declare const StartAiConversationSchema: z.ZodObject<{
13
+ request_id: z.ZodString;
14
+ potential_user_id: z.ZodNumber;
15
+ user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
16
+ phone: z.ZodString;
17
+ language: z.ZodDefault<z.ZodEnum<{
18
+ en: "en";
19
+ ar: "ar";
20
+ }>>;
21
+ purpose: z.ZodLiteral<"marketing">;
22
+ subject_type: z.ZodEnum<{
23
+ properties: "properties";
24
+ services: "services";
25
+ motors: "motors";
26
+ used_products: "used_products";
27
+ }>;
28
+ initial_message: z.ZodString;
29
+ context: z.ZodObject<{
30
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ reason: z.ZodString;
32
+ note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ previous_contact_count: z.ZodDefault<z.ZodNumber>;
34
+ }, z.core.$strip>;
35
+ }, z.core.$strip>;
36
+ export declare const ConversationEventTypeSchema: z.ZodEnum<{
37
+ CONVERSATION_STARTED: "CONVERSATION_STARTED";
38
+ MESSAGE_RECEIVED: "MESSAGE_RECEIVED";
39
+ INTERESTED: "INTERESTED";
40
+ NOT_INTERESTED: "NOT_INTERESTED";
41
+ REQUESTED_HUMAN: "REQUESTED_HUMAN";
42
+ CONVERTED: "CONVERTED";
43
+ OPTED_OUT: "OPTED_OUT";
44
+ CONVERSATION_CLOSED: "CONVERSATION_CLOSED";
45
+ }>;
46
+ export declare const PotentialUserConversationEventSchema: z.ZodObject<{
47
+ potential_user_id: z.ZodNumber;
48
+ conversation_id: z.ZodString;
49
+ event: z.ZodEnum<{
50
+ CONVERSATION_STARTED: "CONVERSATION_STARTED";
51
+ MESSAGE_RECEIVED: "MESSAGE_RECEIVED";
52
+ INTERESTED: "INTERESTED";
53
+ NOT_INTERESTED: "NOT_INTERESTED";
54
+ REQUESTED_HUMAN: "REQUESTED_HUMAN";
55
+ CONVERTED: "CONVERTED";
56
+ OPTED_OUT: "OPTED_OUT";
57
+ CONVERSATION_CLOSED: "CONVERSATION_CLOSED";
58
+ }>;
59
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ }, z.core.$strip>;
61
+ export type MarketingSubjectType = z.infer<typeof MarketingSubjectTypeSchema>;
62
+ export type ConversationLanguage = z.infer<typeof ConversationLanguageSchema>;
63
+ export type StartAiConversation = z.infer<typeof StartAiConversationSchema>;
64
+ export type ConversationEventType = z.infer<typeof ConversationEventTypeSchema>;
65
+ export type PotentialUserConversationEvent = z.infer<typeof PotentialUserConversationEventSchema>;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PotentialUserConversationEventSchema = exports.ConversationEventTypeSchema = exports.StartAiConversationSchema = exports.ConversationLanguageSchema = exports.MarketingSubjectTypeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.MarketingSubjectTypeSchema = zod_1.z.enum([
6
+ 'motors',
7
+ 'properties',
8
+ 'used_products',
9
+ 'services',
10
+ ]);
11
+ exports.ConversationLanguageSchema = zod_1.z.enum(['ar', 'en']);
12
+ exports.StartAiConversationSchema = zod_1.z.object({
13
+ request_id: zod_1.z.string().min(1),
14
+ potential_user_id: zod_1.z.number().int().positive(),
15
+ user_id: zod_1.z.number().int().positive().nullable().optional(),
16
+ phone: zod_1.z.string().min(5).max(30),
17
+ language: exports.ConversationLanguageSchema.default('ar'),
18
+ purpose: zod_1.z.literal('marketing'),
19
+ subject_type: exports.MarketingSubjectTypeSchema,
20
+ initial_message: zod_1.z.string().min(1),
21
+ context: zod_1.z.object({
22
+ name: zod_1.z.string().nullable().optional(),
23
+ reason: zod_1.z.string().min(1),
24
+ note: zod_1.z.string().nullable().optional(),
25
+ previous_contact_count: zod_1.z.number().int().nonnegative().default(0),
26
+ }),
27
+ });
28
+ exports.ConversationEventTypeSchema = zod_1.z.enum([
29
+ 'CONVERSATION_STARTED',
30
+ 'MESSAGE_RECEIVED',
31
+ 'INTERESTED',
32
+ 'NOT_INTERESTED',
33
+ 'REQUESTED_HUMAN',
34
+ 'CONVERTED',
35
+ 'OPTED_OUT',
36
+ 'CONVERSATION_CLOSED',
37
+ ]);
38
+ exports.PotentialUserConversationEventSchema = zod_1.z.object({
39
+ potential_user_id: zod_1.z.number().int().positive(),
40
+ conversation_id: zod_1.z.string().min(1),
41
+ event: exports.ConversationEventTypeSchema,
42
+ summary: zod_1.z.string().max(2000).nullable().optional(),
43
+ });
@@ -0,0 +1,2 @@
1
+ export * from './ai-conversation.schema';
2
+ export * from './support-ticket.schema';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ai-conversation.schema"), exports);
18
+ __exportStar(require("./support-ticket.schema"), exports);
@@ -0,0 +1,119 @@
1
+ import { z } from 'zod';
2
+ export declare const SupportTicketStatusSchema: z.ZodEnum<{
3
+ open: "open";
4
+ assigned: "assigned";
5
+ in_progress: "in_progress";
6
+ waiting_customer: "waiting_customer";
7
+ resolved: "resolved";
8
+ closed: "closed";
9
+ reopened: "reopened";
10
+ }>;
11
+ export declare const SupportTicketPrioritySchema: z.ZodEnum<{
12
+ low: "low";
13
+ normal: "normal";
14
+ high: "high";
15
+ urgent: "urgent";
16
+ }>;
17
+ export declare const SupportTicketCategorySchema: z.ZodEnum<{
18
+ payment: "payment";
19
+ technical_issue: "technical_issue";
20
+ account: "account";
21
+ advertisement: "advertisement";
22
+ complaint: "complaint";
23
+ other: "other";
24
+ }>;
25
+ export declare const SupportTicketCreateSchema: z.ZodObject<{
26
+ title: z.ZodString;
27
+ description: z.ZodString;
28
+ category: z.ZodDefault<z.ZodEnum<{
29
+ payment: "payment";
30
+ technical_issue: "technical_issue";
31
+ account: "account";
32
+ advertisement: "advertisement";
33
+ complaint: "complaint";
34
+ other: "other";
35
+ }>>;
36
+ priority: z.ZodDefault<z.ZodEnum<{
37
+ low: "low";
38
+ normal: "normal";
39
+ high: "high";
40
+ urgent: "urgent";
41
+ }>>;
42
+ potential_user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
43
+ user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
44
+ contact_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
+ conversation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ ad_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
47
+ payment_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
48
+ }, z.core.$strip>;
49
+ export declare const SupportTicketAiCreateSchema: z.ZodObject<{
50
+ title: z.ZodString;
51
+ description: z.ZodString;
52
+ category: z.ZodDefault<z.ZodEnum<{
53
+ payment: "payment";
54
+ technical_issue: "technical_issue";
55
+ account: "account";
56
+ advertisement: "advertisement";
57
+ complaint: "complaint";
58
+ other: "other";
59
+ }>>;
60
+ priority: z.ZodDefault<z.ZodEnum<{
61
+ low: "low";
62
+ normal: "normal";
63
+ high: "high";
64
+ urgent: "urgent";
65
+ }>>;
66
+ potential_user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
67
+ user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
68
+ contact_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ ad_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
70
+ payment_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
71
+ conversation_id: z.ZodString;
72
+ dedupe_key: z.ZodString;
73
+ ai_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
+ }, z.core.$strip>;
75
+ export declare const SupportTicketIdSchema: z.ZodObject<{
76
+ id: z.ZodNumber;
77
+ }, z.core.$strip>;
78
+ export declare const SupportTicketListSchema: z.ZodObject<{
79
+ page: z.ZodDefault<z.ZodNumber>;
80
+ limit: z.ZodDefault<z.ZodNumber>;
81
+ status: z.ZodOptional<z.ZodEnum<{
82
+ open: "open";
83
+ assigned: "assigned";
84
+ in_progress: "in_progress";
85
+ waiting_customer: "waiting_customer";
86
+ resolved: "resolved";
87
+ closed: "closed";
88
+ reopened: "reopened";
89
+ }>>;
90
+ priority: z.ZodOptional<z.ZodEnum<{
91
+ low: "low";
92
+ normal: "normal";
93
+ high: "high";
94
+ urgent: "urgent";
95
+ }>>;
96
+ search: z.ZodOptional<z.ZodString>;
97
+ }, z.core.$strip>;
98
+ export declare const SupportTicketStatusUpdateSchema: z.ZodObject<{
99
+ id: z.ZodNumber;
100
+ status: z.ZodEnum<{
101
+ open: "open";
102
+ assigned: "assigned";
103
+ in_progress: "in_progress";
104
+ waiting_customer: "waiting_customer";
105
+ resolved: "resolved";
106
+ closed: "closed";
107
+ reopened: "reopened";
108
+ }>;
109
+ }, z.core.$strip>;
110
+ export declare const SupportTicketAssignmentSchema: z.ZodObject<{
111
+ id: z.ZodNumber;
112
+ assigned_to: z.ZodNumber;
113
+ }, z.core.$strip>;
114
+ export declare const SupportTicketReplySchema: z.ZodObject<{
115
+ id: z.ZodNumber;
116
+ message: z.ZodString;
117
+ }, z.core.$strip>;
118
+ export type SupportTicketCreate = z.infer<typeof SupportTicketCreateSchema>;
119
+ export type SupportTicketAiCreate = z.infer<typeof SupportTicketAiCreateSchema>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SupportTicketReplySchema = exports.SupportTicketAssignmentSchema = exports.SupportTicketStatusUpdateSchema = exports.SupportTicketListSchema = exports.SupportTicketIdSchema = exports.SupportTicketAiCreateSchema = exports.SupportTicketCreateSchema = exports.SupportTicketCategorySchema = exports.SupportTicketPrioritySchema = exports.SupportTicketStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SupportTicketStatusSchema = zod_1.z.enum(['open', 'assigned', 'in_progress', 'waiting_customer', 'resolved', 'closed', 'reopened']);
6
+ exports.SupportTicketPrioritySchema = zod_1.z.enum(['low', 'normal', 'high', 'urgent']);
7
+ exports.SupportTicketCategorySchema = zod_1.z.enum(['technical_issue', 'account', 'advertisement', 'payment', 'complaint', 'other']);
8
+ exports.SupportTicketCreateSchema = zod_1.z.object({
9
+ title: zod_1.z.string().trim().min(4).max(180),
10
+ description: zod_1.z.string().trim().min(5).max(5000),
11
+ category: exports.SupportTicketCategorySchema.default('other'),
12
+ priority: exports.SupportTicketPrioritySchema.default('normal'),
13
+ potential_user_id: zod_1.z.number().int().positive().nullable().optional(),
14
+ user_id: zod_1.z.number().int().positive().nullable().optional(),
15
+ contact_phone: zod_1.z.string().trim().min(6).max(30).nullable().optional(),
16
+ conversation_id: zod_1.z.string().min(1).max(80).nullable().optional(),
17
+ ad_id: zod_1.z.number().int().positive().nullable().optional(),
18
+ payment_id: zod_1.z.number().int().positive().nullable().optional(),
19
+ });
20
+ exports.SupportTicketAiCreateSchema = exports.SupportTicketCreateSchema.extend({
21
+ conversation_id: zod_1.z.string().min(1).max(80),
22
+ dedupe_key: zod_1.z.string().min(8).max(180),
23
+ ai_summary: zod_1.z.string().max(2000).nullable().optional(),
24
+ });
25
+ exports.SupportTicketIdSchema = zod_1.z.object({ id: zod_1.z.number().int().positive() });
26
+ exports.SupportTicketListSchema = zod_1.z.object({
27
+ page: zod_1.z.number().int().positive().default(1),
28
+ limit: zod_1.z.number().int().min(1).max(100).default(20),
29
+ status: exports.SupportTicketStatusSchema.optional(),
30
+ priority: exports.SupportTicketPrioritySchema.optional(),
31
+ search: zod_1.z.string().trim().max(100).optional(),
32
+ });
33
+ exports.SupportTicketStatusUpdateSchema = exports.SupportTicketIdSchema.extend({ status: exports.SupportTicketStatusSchema });
34
+ exports.SupportTicketAssignmentSchema = exports.SupportTicketIdSchema.extend({ assigned_to: zod_1.z.number().int().positive() });
35
+ exports.SupportTicketReplySchema = exports.SupportTicketIdSchema.extend({ message: zod_1.z.string().trim().min(1).max(4000) });
@@ -3,3 +3,4 @@ export * as AI from './ai';
3
3
  export * as COMMON from './common';
4
4
  export * as EVENTS from './events';
5
5
  export * as PAYMENTS from './payments';
6
+ export * as COMMUNICATION from './communication';
@@ -33,9 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.PAYMENTS = exports.EVENTS = exports.COMMON = exports.AI = exports.AD = void 0;
36
+ exports.COMMUNICATION = exports.PAYMENTS = exports.EVENTS = exports.COMMON = exports.AI = exports.AD = void 0;
37
37
  exports.AD = __importStar(require("./ad"));
38
38
  exports.AI = __importStar(require("./ai"));
39
39
  exports.COMMON = __importStar(require("./common"));
40
40
  exports.EVENTS = __importStar(require("./events"));
41
41
  exports.PAYMENTS = __importStar(require("./payments"));
42
+ exports.COMMUNICATION = __importStar(require("./communication"));
@@ -7,6 +7,34 @@ export type IAdPromotion = {
7
7
  promoted_from: string | Date;
8
8
  promoted_until: string | Date;
9
9
  amount_paid?: number | string | null;
10
+ payment_type?: "payment" | "loyalty_transaction" | "combined" | string | null;
11
+ payment_id?: number | null;
12
+ loyalty_transaction_id?: number | null;
13
+ admin_status?: string | null;
14
+ loyalty_transaction?: {
15
+ id?: number;
16
+ points?: number;
17
+ type?: string;
18
+ action?: string;
19
+ description?: {
20
+ en: string;
21
+ ar: string;
22
+ };
23
+ } | null;
24
+ payment?: {
25
+ id?: number;
26
+ amount?: string | number;
27
+ payment_gateway?: string;
28
+ media?: {
29
+ combined?: boolean;
30
+ points_used?: number;
31
+ cash_paid?: number;
32
+ total_cost?: number;
33
+ loyalty_transaction_id?: number;
34
+ } | null;
35
+ } | null;
36
+ points_used?: number | null;
37
+ cash_paid?: number | string | null;
10
38
  created_at?: string | Date;
11
39
  updated_at?: string | Date;
12
40
  };
@@ -59,6 +59,7 @@ export * as Media from "./media/Media";
59
59
  export * as Image from "./media/Image";
60
60
  export * as SocialMediaPlatform from "./media/SocialMediaPlatform";
61
61
  export * as SocialMediaProfile from "./media/SocialMediaProfile";
62
+ export * as Kyc from "./kyc/Kyc";
62
63
  export * as Google from "./integrations/Google";
63
64
  export * as Analysis from "./analysis/AnalysisDailySnapshot";
64
65
  export * as Payment from "./payments/Payment";
@@ -37,7 +37,7 @@ var __importStar = (this && this.__importStar) || (function () {
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.Company = exports.PotentialUser = exports.Loyalty = exports.Favorite = exports.Wallet = exports.Permission = exports.Role = exports.User = exports.EventVenue = exports.EventWedding = exports.EventTimeline = exports.EventRsvp = exports.Event = exports.District = exports.City = exports.AdminBoundary = exports.WorkType = exports.UsedProductCondition = exports.UsedProductAge = exports.Unit = exports.Transmission = exports.RegionalSpec = exports.PublisherType = exports.PropertyStatus = exports.PriceType = exports.OfferType = exports.LicenseType = exports.FuelType = exports.Feature = exports.Facility = exports.Currency = exports.Color = exports.CategoryWorkType = exports.Category = exports.CarBody = exports.UsedProduct = exports.Service = exports.PropertySubType = exports.Property = exports.MotorTrim = exports.Motor = exports.AdPromotion = exports.AdLocation = exports.Ad = exports.FilterParams = exports.Config = exports.AccessType = exports.Status = exports.Response = exports.LocalizedName = void 0;
40
- exports.Payment = exports.Analysis = exports.Google = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.File = exports.NotificationToken = exports.MessageTemplate = exports.Device = exports.Chat = exports.AppStartScreen = exports.MetaData = void 0;
40
+ exports.Payment = exports.Analysis = exports.Google = exports.Kyc = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.File = exports.NotificationToken = exports.MessageTemplate = exports.Device = exports.Chat = exports.AppStartScreen = exports.MetaData = void 0;
41
41
  // common
42
42
  exports.LocalizedName = __importStar(require("./common/LocalizedName"));
43
43
  exports.Response = __importStar(require("./common/Response"));
@@ -107,6 +107,8 @@ exports.Media = __importStar(require("./media/Media"));
107
107
  exports.Image = __importStar(require("./media/Image"));
108
108
  exports.SocialMediaPlatform = __importStar(require("./media/SocialMediaPlatform"));
109
109
  exports.SocialMediaProfile = __importStar(require("./media/SocialMediaProfile"));
110
+ // KYC
111
+ exports.Kyc = __importStar(require("./kyc/Kyc"));
110
112
  // integrations
111
113
  exports.Google = __importStar(require("./integrations/Google"));
112
114
  // analysis
@@ -0,0 +1,39 @@
1
+ import type { IMedia } from "../media/Media";
2
+ export declare enum KycStatus {
3
+ DRAFT = "DRAFT",
4
+ PENDING = "PENDING",
5
+ UNDER_REVIEW = "UNDER_REVIEW",
6
+ APPROVED = "APPROVED",
7
+ REJECTED = "REJECTED",
8
+ REQUIRES_RESUBMISSION = "REQUIRES_RESUBMISSION"
9
+ }
10
+ export declare enum KycDocumentType {
11
+ NATIONAL_ID = "NATIONAL_ID",
12
+ PASSPORT = "PASSPORT",
13
+ RESIDENCE_PERMIT = "RESIDENCE_PERMIT",
14
+ DRIVING_LICENSE = "DRIVING_LICENSE"
15
+ }
16
+ export declare enum KycMediaType {
17
+ DOCUMENT_FRONT = "document_front",
18
+ DOCUMENT_BACK = "document_back",
19
+ SELFIE = "selfie"
20
+ }
21
+ export type IKycMedia = IMedia & {
22
+ type: KycMediaType;
23
+ };
24
+ export type IKyc = {
25
+ id: number;
26
+ user_id: number;
27
+ status: KycStatus;
28
+ full_name: string | null;
29
+ date_of_birth: string | null;
30
+ document_type: KycDocumentType | null;
31
+ document_front: IKycMedia | null;
32
+ document_back: IKycMedia | null;
33
+ selfie: IKycMedia | null;
34
+ rejection_reason: string | null;
35
+ reviewed_by_admin_id: number | null;
36
+ submitted_at: string | null;
37
+ reviewed_at: string | null;
38
+ verification_expires_at: string | null;
39
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KycMediaType = exports.KycDocumentType = exports.KycStatus = void 0;
4
+ var KycStatus;
5
+ (function (KycStatus) {
6
+ KycStatus["DRAFT"] = "DRAFT";
7
+ KycStatus["PENDING"] = "PENDING";
8
+ KycStatus["UNDER_REVIEW"] = "UNDER_REVIEW";
9
+ KycStatus["APPROVED"] = "APPROVED";
10
+ KycStatus["REJECTED"] = "REJECTED";
11
+ KycStatus["REQUIRES_RESUBMISSION"] = "REQUIRES_RESUBMISSION";
12
+ })(KycStatus || (exports.KycStatus = KycStatus = {}));
13
+ var KycDocumentType;
14
+ (function (KycDocumentType) {
15
+ KycDocumentType["NATIONAL_ID"] = "NATIONAL_ID";
16
+ KycDocumentType["PASSPORT"] = "PASSPORT";
17
+ KycDocumentType["RESIDENCE_PERMIT"] = "RESIDENCE_PERMIT";
18
+ KycDocumentType["DRIVING_LICENSE"] = "DRIVING_LICENSE";
19
+ })(KycDocumentType || (exports.KycDocumentType = KycDocumentType = {}));
20
+ var KycMediaType;
21
+ (function (KycMediaType) {
22
+ KycMediaType["DOCUMENT_FRONT"] = "document_front";
23
+ KycMediaType["DOCUMENT_BACK"] = "document_back";
24
+ KycMediaType["SELFIE"] = "selfie";
25
+ })(KycMediaType || (exports.KycMediaType = KycMediaType = {}));
@@ -0,0 +1 @@
1
+ export * from "./Kyc";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Kyc"), exports);
@@ -1,7 +1,7 @@
1
1
  export type IUsedProduct = {
2
2
  id?: number;
3
3
  ad_id?: number;
4
- condition_id?: number;
4
+ condition_id?: number | null;
5
5
  age_id?: number | null;
6
6
  isFree?: boolean | null;
7
7
  isDeliveryAvailable?: boolean | null;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.emptyUsedProduct = void 0;
4
4
  exports.emptyUsedProduct = {
5
- condition_id: 0,
5
+ condition_id: null,
6
6
  age_id: null,
7
7
  isFree: null,
8
8
  isDeliveryAvailable: null,
@@ -21,6 +21,10 @@ export type IPotentialUser = {
21
21
  created_at?: string;
22
22
  subject_type?: string;
23
23
  communication_counter?: number;
24
+ marketing_status?: string;
25
+ last_conversation_id?: string | null;
26
+ last_ai_summary?: string | null;
27
+ is_blocked?: boolean;
24
28
  };
25
29
  export type CreatePotentialUserDto = {
26
30
  name?: string;
@@ -28,6 +32,8 @@ export type CreatePotentialUserDto = {
28
32
  note?: string;
29
33
  user_id?: string;
30
34
  last_message_at?: Date | string;
35
+ subject_type?: string | null;
36
+ is_blocked?: boolean;
31
37
  };
32
38
  export type UpdatePotentialUserDto = {
33
39
  id: number;
@@ -36,4 +42,6 @@ export type UpdatePotentialUserDto = {
36
42
  note?: string;
37
43
  user_id?: string | null;
38
44
  last_message_at?: Date | string | null;
45
+ subject_type?: string | null;
46
+ is_blocked?: boolean;
39
47
  };
@@ -1,5 +1,5 @@
1
1
  export const emptyUsedProduct = {
2
- condition_id: 0,
2
+ condition_id: null,
3
3
  age_id: null,
4
4
  isFree: null,
5
5
  isDeliveryAvailable: null,
@@ -1,3 +1 @@
1
- export const AdDto = (params) => {
2
- return params.ad;
3
- };
1
+ export const AdDto = (params) => params.ad;
@@ -1,4 +1,5 @@
1
1
  export { AdDto } from './ad/Ad.dto.js';
2
+ export * as AD from './ad/Ad.dto.js';
2
3
  export * as EVENTS from './events/index.js';
3
4
  export * as Ai from './ai/Ai.dto.js';
4
5
  export * as PAYMENTS from './payments/index.js';
package/dist/esm/index.js CHANGED
@@ -39,6 +39,7 @@ export * as SCHEMA from './schema/index.js';
39
39
  // abstract findById(id: number): Promise<any>;
40
40
  // }
41
41
  export * as ABSTRACT from './abstract/index.js';
42
+ export * as Kyc from './types/kyc/Kyc.js';
42
43
  // UTILS
43
44
  // Contains pure helper functions with no side effects.
44
45
  // Reusable logic across the application.