vms-nest-prisma-api-document 977.0.0 → 979.0.0
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/dist/services/website/contact_us_detail_service.d.ts +1 -1
- package/dist/services/website/exclusive_feature_access.d.ts +127 -0
- package/dist/services/website/exclusive_feature_access.js +309 -0
- package/dist/services/website/faq_service.d.ts +1 -1
- package/dist/services/website/request_demo.service.d.ts +22 -28
- package/dist/services/website/request_demo.service.js +19 -23
- package/package.json +1 -1
|
@@ -31,6 +31,7 @@ declare const ContactUsDetailSchema: z.ZodObject<{
|
|
|
31
31
|
telegram_chat_url: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
32
32
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
33
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
status: Status;
|
|
34
35
|
mobile_number: string;
|
|
35
36
|
email: string;
|
|
36
37
|
facebook_link: string;
|
|
@@ -41,7 +42,6 @@ declare const ContactUsDetailSchema: z.ZodObject<{
|
|
|
41
42
|
pinterest_link: string;
|
|
42
43
|
whats_app_chat_url: string;
|
|
43
44
|
telegram_chat_url: string;
|
|
44
|
-
status: Status;
|
|
45
45
|
}, {
|
|
46
46
|
status: Status;
|
|
47
47
|
mobile_number?: string | undefined;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Status, PAGING, LoadParents, LoadChild, LoadChildCount, OrderBy, YesNo } from '../../core/Enums.js';
|
|
2
|
+
import { FBR, SBR } from '../../core/BaseResponse.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { U as UserOrganisation } from '../../bookmark_service-RmLX412L.js';
|
|
5
|
+
import '../../zod_utils/zod_base_schema.js';
|
|
6
|
+
import '../gps/reports/gps_models/FuelConsumptionMonthly.js';
|
|
7
|
+
|
|
8
|
+
interface ExclusiveFeatureAccess extends Record<string, unknown> {
|
|
9
|
+
exclusive_feature_access_id: string;
|
|
10
|
+
subject: string;
|
|
11
|
+
message?: string;
|
|
12
|
+
organisation_id: string;
|
|
13
|
+
UserOrganisation?: UserOrganisation;
|
|
14
|
+
organisation_name?: string;
|
|
15
|
+
organisation_code?: string;
|
|
16
|
+
status: Status;
|
|
17
|
+
added_date_time: string;
|
|
18
|
+
modified_date_time: string;
|
|
19
|
+
}
|
|
20
|
+
declare const ExclusiveFeatureAccessSchema: z.ZodObject<{
|
|
21
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
22
|
+
subject: z.ZodEffects<z.ZodString, string, string>;
|
|
23
|
+
message: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
24
|
+
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
status: Status;
|
|
27
|
+
message: string;
|
|
28
|
+
organisation_id: string;
|
|
29
|
+
subject: string;
|
|
30
|
+
}, {
|
|
31
|
+
status: Status;
|
|
32
|
+
organisation_id: string;
|
|
33
|
+
subject: string;
|
|
34
|
+
message?: string | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
type ExclusiveFeatureAccessDTO = z.infer<typeof ExclusiveFeatureAccessSchema>;
|
|
37
|
+
declare const ExclusiveFeatureAccessQuerySchema: z.ZodObject<{
|
|
38
|
+
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
39
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
40
|
+
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
41
|
+
page_count: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
42
|
+
page_index: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
43
|
+
load_parents: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadParents>>>;
|
|
44
|
+
load_parents_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
45
|
+
load_child: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChild>>>;
|
|
46
|
+
load_child_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
47
|
+
load_child_count: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChildCount>>>;
|
|
48
|
+
load_child_count_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
49
|
+
include_details: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
50
|
+
where_relations: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
51
|
+
order_by: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
53
|
+
field: z.ZodEffects<z.ZodString, string, string>;
|
|
54
|
+
direction: z.ZodType<OrderBy, z.ZodTypeDef, OrderBy>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
name: string;
|
|
57
|
+
field: string;
|
|
58
|
+
direction: OrderBy;
|
|
59
|
+
}, {
|
|
60
|
+
name: string;
|
|
61
|
+
field: string;
|
|
62
|
+
direction: OrderBy;
|
|
63
|
+
}>, "many">>>;
|
|
64
|
+
include_master_data: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
65
|
+
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
66
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
67
|
+
} & {
|
|
68
|
+
exclusive_feature_access_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
69
|
+
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
status: Status[];
|
|
72
|
+
search: string;
|
|
73
|
+
paging: PAGING;
|
|
74
|
+
page_count: number;
|
|
75
|
+
page_index: number;
|
|
76
|
+
load_parents: LoadParents;
|
|
77
|
+
load_parents_list: string[];
|
|
78
|
+
load_child: LoadChild;
|
|
79
|
+
load_child_list: string[];
|
|
80
|
+
load_child_count: LoadChildCount;
|
|
81
|
+
load_child_count_list: string[];
|
|
82
|
+
include_details: Record<string, any>;
|
|
83
|
+
where_relations: Record<string, any>;
|
|
84
|
+
order_by: {
|
|
85
|
+
name: string;
|
|
86
|
+
field: string;
|
|
87
|
+
direction: OrderBy;
|
|
88
|
+
}[];
|
|
89
|
+
include_master_data: YesNo;
|
|
90
|
+
date_format_id: string;
|
|
91
|
+
time_zone_id: string;
|
|
92
|
+
organisation_ids: string[];
|
|
93
|
+
exclusive_feature_access_ids: string[];
|
|
94
|
+
}, {
|
|
95
|
+
date_format_id: string;
|
|
96
|
+
time_zone_id: string;
|
|
97
|
+
status?: Status[] | undefined;
|
|
98
|
+
search?: string | undefined;
|
|
99
|
+
paging?: PAGING | undefined;
|
|
100
|
+
page_count?: unknown;
|
|
101
|
+
page_index?: unknown;
|
|
102
|
+
load_parents?: LoadParents | undefined;
|
|
103
|
+
load_parents_list?: string[] | undefined;
|
|
104
|
+
load_child?: LoadChild | undefined;
|
|
105
|
+
load_child_list?: string[] | undefined;
|
|
106
|
+
load_child_count?: LoadChildCount | undefined;
|
|
107
|
+
load_child_count_list?: string[] | undefined;
|
|
108
|
+
include_details?: Record<string, any> | undefined;
|
|
109
|
+
where_relations?: Record<string, any> | undefined;
|
|
110
|
+
order_by?: {
|
|
111
|
+
name: string;
|
|
112
|
+
field: string;
|
|
113
|
+
direction: OrderBy;
|
|
114
|
+
}[] | undefined;
|
|
115
|
+
include_master_data?: YesNo | undefined;
|
|
116
|
+
organisation_ids?: string[] | undefined;
|
|
117
|
+
exclusive_feature_access_ids?: string[] | undefined;
|
|
118
|
+
}>;
|
|
119
|
+
type ExclusiveFeatureAccessQueryDTO = z.infer<typeof ExclusiveFeatureAccessQuerySchema>;
|
|
120
|
+
declare const toExclusiveFeatureAccessPayload: (row: ExclusiveFeatureAccess) => ExclusiveFeatureAccessDTO;
|
|
121
|
+
declare const newExclusiveFeatureAccessPayload: () => ExclusiveFeatureAccessDTO;
|
|
122
|
+
declare const findExclusiveFeatureAccess: (data: ExclusiveFeatureAccessQueryDTO) => Promise<FBR<ExclusiveFeatureAccess[]>>;
|
|
123
|
+
declare const createDemo: (data: ExclusiveFeatureAccessDTO) => Promise<SBR>;
|
|
124
|
+
declare const updateExclusiveFeatureAccess: (id: string, data: ExclusiveFeatureAccessDTO) => Promise<SBR>;
|
|
125
|
+
declare const deleteExclusiveFeatureAccess: (id: string) => Promise<SBR>;
|
|
126
|
+
|
|
127
|
+
export { type ExclusiveFeatureAccess, type ExclusiveFeatureAccessDTO, type ExclusiveFeatureAccessQueryDTO, ExclusiveFeatureAccessQuerySchema, ExclusiveFeatureAccessSchema, createDemo, deleteExclusiveFeatureAccess, findExclusiveFeatureAccess, newExclusiveFeatureAccessPayload, toExclusiveFeatureAccessPayload, updateExclusiveFeatureAccess };
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
// src/core/sdk-config.ts
|
|
2
|
+
var KEY = "__vms_axios_instance__";
|
|
3
|
+
var getAxiosInstance = () => {
|
|
4
|
+
const instance = globalThis[KEY];
|
|
5
|
+
if (!instance) {
|
|
6
|
+
throw new Error("\u274C Axios instance not configured. Call setAxiosInstance() first.");
|
|
7
|
+
}
|
|
8
|
+
return instance;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/core/apiCall.ts
|
|
12
|
+
var apiPost = async (url, data) => {
|
|
13
|
+
const response = await getAxiosInstance().post(url, data);
|
|
14
|
+
return response.data;
|
|
15
|
+
};
|
|
16
|
+
var apiPatch = async (url, data) => {
|
|
17
|
+
const response = await getAxiosInstance().patch(url, data);
|
|
18
|
+
return response.data;
|
|
19
|
+
};
|
|
20
|
+
var apiDelete = async (url) => {
|
|
21
|
+
const response = await getAxiosInstance().delete(url);
|
|
22
|
+
return response.data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// src/services/website/exclusive_feature_access.ts
|
|
26
|
+
import { z as z3 } from "zod";
|
|
27
|
+
|
|
28
|
+
// src/zod_utils/zod_utils.ts
|
|
29
|
+
import { z } from "zod";
|
|
30
|
+
|
|
31
|
+
// src/core/BaseResponse.ts
|
|
32
|
+
var r_log = (data = {}) => {
|
|
33
|
+
return data;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// src/zod_utils/zod_utils.ts
|
|
37
|
+
var handleNullOrUndefined = (value) => typeof value === "string" ? value : "";
|
|
38
|
+
var stringMandatory = (fieldName, min = 1, max = 100) => {
|
|
39
|
+
const schema = z.string().trim().min(min, `${fieldName} must be at least ${min} characters.`).max(max, `${fieldName} must be at most ${max} characters.`).nonempty(`${fieldName} is required.`).transform(handleNullOrUndefined);
|
|
40
|
+
return schema;
|
|
41
|
+
};
|
|
42
|
+
var stringOptional = (fieldName, min = 0, max = 255, defaultValue = "") => {
|
|
43
|
+
const schema = z.string().trim().min(min, `${fieldName} must be at least ${min} characters.`).max(max, `${fieldName} must be at most ${max} characters.`).transform(handleNullOrUndefined).default(defaultValue);
|
|
44
|
+
return schema;
|
|
45
|
+
};
|
|
46
|
+
var stringArrayOptional = (fieldName, min = 0, max = 100, defaultValue = [], unique = false) => {
|
|
47
|
+
const schema = z.array(z.string().trim(), {
|
|
48
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
49
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
50
|
+
if (unique) {
|
|
51
|
+
schema.refine(
|
|
52
|
+
(arr) => new Set(arr).size === arr.length,
|
|
53
|
+
`${fieldName} must contain unique values.`
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return schema.optional().default(defaultValue);
|
|
57
|
+
};
|
|
58
|
+
var numberOptional = (fieldName, min = 0, max = 1e14, defaultValue = 0) => {
|
|
59
|
+
return z.preprocess(
|
|
60
|
+
(val) => typeof val === "string" && val.trim() !== "" ? Number(val) : val,
|
|
61
|
+
z.number({ invalid_type_error: `${fieldName} must be a number.` }).min(min, `${fieldName} must be at least ${min}.`).max(max, `${fieldName} must be at most ${max}.`).optional().default(defaultValue)
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
var enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
65
|
+
return z.union([
|
|
66
|
+
z.nativeEnum(enumType, {
|
|
67
|
+
invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
|
|
68
|
+
enumType
|
|
69
|
+
).join(", ")}.`
|
|
70
|
+
}),
|
|
71
|
+
z.string().refine((val) => Object.values(enumType).includes(val), {
|
|
72
|
+
message: `${fieldName} should be one of the following values: ${Object.values(
|
|
73
|
+
enumType
|
|
74
|
+
).join(", ")}.`
|
|
75
|
+
})
|
|
76
|
+
]).default(defaultValue).refine((val) => val !== "", {
|
|
77
|
+
message: `Please select ${fieldName}.`
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
81
|
+
return z.nativeEnum(enumType, {
|
|
82
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
83
|
+
enumType
|
|
84
|
+
).join(", ")}.`
|
|
85
|
+
}).optional().default(() => defaultValue);
|
|
86
|
+
};
|
|
87
|
+
var getAllEnums = (enumType) => {
|
|
88
|
+
return Object.values(enumType);
|
|
89
|
+
};
|
|
90
|
+
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
91
|
+
const schema = z.array(z.nativeEnum(enumType), {
|
|
92
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
93
|
+
enumType
|
|
94
|
+
).join(", ")}.`
|
|
95
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
96
|
+
if (unique) {
|
|
97
|
+
schema.refine(
|
|
98
|
+
(arr) => new Set(arr).size === arr.length,
|
|
99
|
+
`${fieldName} must contain unique values.`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return schema.optional().default(() => defaultValue);
|
|
103
|
+
};
|
|
104
|
+
var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
|
|
105
|
+
var single_select_mandatory = (fieldName) => {
|
|
106
|
+
const schema = z.string().trim().nonempty(`Please select ${fieldName}.`).transform(handleNullOrUndefined);
|
|
107
|
+
return schema;
|
|
108
|
+
};
|
|
109
|
+
var single_select_optional = (fieldName) => {
|
|
110
|
+
r_log(fieldName);
|
|
111
|
+
const schema = z.string().trim().transform(handleNullOrUndefined);
|
|
112
|
+
return schema;
|
|
113
|
+
};
|
|
114
|
+
var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
|
|
115
|
+
const schema = z.array(
|
|
116
|
+
z.string({
|
|
117
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
118
|
+
})
|
|
119
|
+
).max(
|
|
120
|
+
max,
|
|
121
|
+
`Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
|
|
122
|
+
);
|
|
123
|
+
return schema.optional().default(defaultValue);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// src/zod_utils/zod_base_schema.ts
|
|
127
|
+
import { z as z2 } from "zod";
|
|
128
|
+
|
|
129
|
+
// src/core/Enums.ts
|
|
130
|
+
var PAGING = /* @__PURE__ */ ((PAGING2) => {
|
|
131
|
+
PAGING2["Yes"] = "Yes";
|
|
132
|
+
PAGING2["No"] = "No";
|
|
133
|
+
return PAGING2;
|
|
134
|
+
})(PAGING || {});
|
|
135
|
+
var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
|
|
136
|
+
LoadParents2["Yes"] = "Yes";
|
|
137
|
+
LoadParents2["No"] = "No";
|
|
138
|
+
LoadParents2["Custom"] = "Custom";
|
|
139
|
+
return LoadParents2;
|
|
140
|
+
})(LoadParents || {});
|
|
141
|
+
var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
|
|
142
|
+
LoadChild2["No"] = "No";
|
|
143
|
+
LoadChild2["Yes"] = "Yes";
|
|
144
|
+
LoadChild2["Count"] = "Count";
|
|
145
|
+
LoadChild2["Custom"] = "Custom";
|
|
146
|
+
LoadChild2["Direct"] = "Direct";
|
|
147
|
+
return LoadChild2;
|
|
148
|
+
})(LoadChild || {});
|
|
149
|
+
var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
|
|
150
|
+
LoadChildCount2["No"] = "No";
|
|
151
|
+
LoadChildCount2["Yes"] = "Yes";
|
|
152
|
+
LoadChildCount2["Custom"] = "Custom";
|
|
153
|
+
return LoadChildCount2;
|
|
154
|
+
})(LoadChildCount || {});
|
|
155
|
+
var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
|
|
156
|
+
OrderBy2["asc"] = "asc";
|
|
157
|
+
OrderBy2["desc"] = "desc";
|
|
158
|
+
return OrderBy2;
|
|
159
|
+
})(OrderBy || {});
|
|
160
|
+
var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
|
|
161
|
+
LoginFrom2["Web"] = "Web";
|
|
162
|
+
LoginFrom2["Android"] = "Android";
|
|
163
|
+
LoginFrom2["IPhone"] = "IPhone";
|
|
164
|
+
LoginFrom2["AndroidPWA"] = "AndroidPWA";
|
|
165
|
+
LoginFrom2["iOSPWA"] = "iOSPWA";
|
|
166
|
+
return LoginFrom2;
|
|
167
|
+
})(LoginFrom || {});
|
|
168
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
169
|
+
Status2["Active"] = "Active";
|
|
170
|
+
Status2["Inactive"] = "Inactive";
|
|
171
|
+
return Status2;
|
|
172
|
+
})(Status || {});
|
|
173
|
+
var FileType = /* @__PURE__ */ ((FileType2) => {
|
|
174
|
+
FileType2["NoFile"] = "NoFile";
|
|
175
|
+
FileType2["Image"] = "Image";
|
|
176
|
+
FileType2["Video"] = "Video";
|
|
177
|
+
FileType2["PDF"] = "PDF";
|
|
178
|
+
FileType2["Excel"] = "Excel";
|
|
179
|
+
return FileType2;
|
|
180
|
+
})(FileType || {});
|
|
181
|
+
var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
182
|
+
YesNo2["Yes"] = "Yes";
|
|
183
|
+
YesNo2["No"] = "No";
|
|
184
|
+
return YesNo2;
|
|
185
|
+
})(YesNo || {});
|
|
186
|
+
|
|
187
|
+
// src/zod_utils/zod_base_schema.ts
|
|
188
|
+
var OrderBySchema = z2.array(
|
|
189
|
+
z2.object({
|
|
190
|
+
name: stringMandatory("Order Field Name", 0, 255),
|
|
191
|
+
field: stringMandatory("Order Field Name", 0, 255),
|
|
192
|
+
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
193
|
+
})
|
|
194
|
+
);
|
|
195
|
+
var BaseFileSchema = z2.object({
|
|
196
|
+
usage_type: stringMandatory("Usage Type", 3, 100),
|
|
197
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */),
|
|
198
|
+
file_url: stringOptional("File URL", 0, 300),
|
|
199
|
+
file_key: stringOptional("File Key", 0, 300),
|
|
200
|
+
file_name: stringOptional("File Name", 0, 300),
|
|
201
|
+
file_description: stringOptional("File Description", 0, 2e3),
|
|
202
|
+
file_size: numberOptional("File Size"),
|
|
203
|
+
file_metadata: dynamicJsonSchema("File Metadata", {}),
|
|
204
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
205
|
+
});
|
|
206
|
+
var BaseQuerySchema = z2.object({
|
|
207
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
208
|
+
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
209
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
210
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
211
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
212
|
+
load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
|
|
213
|
+
load_parents_list: stringArrayOptional("Load Parents List"),
|
|
214
|
+
load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
|
|
215
|
+
load_child_list: stringArrayOptional("Load Child List"),
|
|
216
|
+
load_child_count: enumOptional(
|
|
217
|
+
"Load Child",
|
|
218
|
+
LoadChildCount,
|
|
219
|
+
"No" /* No */
|
|
220
|
+
),
|
|
221
|
+
load_child_count_list: stringArrayOptional("Load Child List"),
|
|
222
|
+
include_details: dynamicJsonSchema("Include Details", {}),
|
|
223
|
+
where_relations: dynamicJsonSchema("Where Relations", {}),
|
|
224
|
+
order_by: OrderBySchema.optional().default([]),
|
|
225
|
+
include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
|
|
226
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
227
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
228
|
+
});
|
|
229
|
+
var FilePresignedUrlSchema = z2.object({
|
|
230
|
+
file_name: stringMandatory("File Name", 1, 255),
|
|
231
|
+
file_type: enumMandatory("File Type", FileType, "Image" /* Image */)
|
|
232
|
+
});
|
|
233
|
+
var MongoBaseQuerySchema = z2.object({
|
|
234
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
235
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
236
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
237
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
238
|
+
login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
|
|
239
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
240
|
+
// ✅ Single-selection -> MasterMainDateFormat
|
|
241
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
242
|
+
// ✅ Single-selection -> MasterMainTimeZone
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
// src/services/website/exclusive_feature_access.ts
|
|
246
|
+
var URL = "website/exclusive_feature_access";
|
|
247
|
+
var ENDPOINTS = {
|
|
248
|
+
// ExclusiveFeatureAccess APIs
|
|
249
|
+
find: `${URL}/search`,
|
|
250
|
+
create: URL,
|
|
251
|
+
update: (id) => `${URL}/${id}`,
|
|
252
|
+
delete: (id) => `${URL}/${id}`
|
|
253
|
+
};
|
|
254
|
+
var ExclusiveFeatureAccessSchema = z3.object({
|
|
255
|
+
// Relations - Parent
|
|
256
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
257
|
+
// Single-Selection -> UserOrganisation
|
|
258
|
+
// Main Field Details
|
|
259
|
+
subject: stringMandatory("Subject", 3, 100),
|
|
260
|
+
message: stringOptional("Message", 0, 500),
|
|
261
|
+
// Metadata
|
|
262
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
263
|
+
});
|
|
264
|
+
var ExclusiveFeatureAccessQuerySchema = BaseQuerySchema.extend({
|
|
265
|
+
// Self Table
|
|
266
|
+
exclusive_feature_access_ids: multi_select_optional("ExclusiveFeatureAccess"),
|
|
267
|
+
// Multi-selection -> ExclusiveFeatureAccess
|
|
268
|
+
// Relations - Parent
|
|
269
|
+
organisation_ids: multi_select_optional("UserOrganisation")
|
|
270
|
+
// Multi-Selection -> UserOrganisation
|
|
271
|
+
});
|
|
272
|
+
var toExclusiveFeatureAccessPayload = (row) => ({
|
|
273
|
+
subject: row.subject || "",
|
|
274
|
+
message: row.message || "",
|
|
275
|
+
// Relations - Parent
|
|
276
|
+
organisation_id: row.organisation_id || "",
|
|
277
|
+
// Metadata
|
|
278
|
+
status: row.status
|
|
279
|
+
});
|
|
280
|
+
var newExclusiveFeatureAccessPayload = () => ({
|
|
281
|
+
subject: "",
|
|
282
|
+
message: "",
|
|
283
|
+
// Relations - Parent
|
|
284
|
+
organisation_id: "",
|
|
285
|
+
// Metadata
|
|
286
|
+
status: "Active" /* Active */
|
|
287
|
+
});
|
|
288
|
+
var findExclusiveFeatureAccess = async (data) => {
|
|
289
|
+
return apiPost(ENDPOINTS.find, data);
|
|
290
|
+
};
|
|
291
|
+
var createDemo = async (data) => {
|
|
292
|
+
return apiPost(ENDPOINTS.create, data);
|
|
293
|
+
};
|
|
294
|
+
var updateExclusiveFeatureAccess = async (id, data) => {
|
|
295
|
+
return apiPatch(ENDPOINTS.update(id), data);
|
|
296
|
+
};
|
|
297
|
+
var deleteExclusiveFeatureAccess = async (id) => {
|
|
298
|
+
return apiDelete(ENDPOINTS.delete(id));
|
|
299
|
+
};
|
|
300
|
+
export {
|
|
301
|
+
ExclusiveFeatureAccessQuerySchema,
|
|
302
|
+
ExclusiveFeatureAccessSchema,
|
|
303
|
+
createDemo,
|
|
304
|
+
deleteExclusiveFeatureAccess,
|
|
305
|
+
findExclusiveFeatureAccess,
|
|
306
|
+
newExclusiveFeatureAccessPayload,
|
|
307
|
+
toExclusiveFeatureAccessPayload,
|
|
308
|
+
updateExclusiveFeatureAccess
|
|
309
|
+
};
|
|
@@ -17,10 +17,10 @@ declare const FaqSchema: z.ZodObject<{
|
|
|
17
17
|
faq_content: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
18
18
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
status: Status;
|
|
21
20
|
faq_section: string;
|
|
22
21
|
faq_header: string;
|
|
23
22
|
faq_content: string;
|
|
23
|
+
status: Status;
|
|
24
24
|
}, {
|
|
25
25
|
status: Status;
|
|
26
26
|
faq_section?: string | undefined;
|
|
@@ -3,12 +3,12 @@ import { FBR, SBR } from '../../core/BaseResponse.js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
interface RequestDemo extends Record<string, unknown> {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
request_demo_id: string;
|
|
7
|
+
name: string;
|
|
8
8
|
mobile?: string;
|
|
9
|
-
country_code?: string;
|
|
10
9
|
email?: string;
|
|
11
10
|
message?: string;
|
|
11
|
+
city?: string;
|
|
12
12
|
admin_message?: string;
|
|
13
13
|
admin_view: YesNo;
|
|
14
14
|
status: Status;
|
|
@@ -16,35 +16,32 @@ interface RequestDemo extends Record<string, unknown> {
|
|
|
16
16
|
modified_date_time: string;
|
|
17
17
|
}
|
|
18
18
|
declare const RequestDemoSchema: z.ZodObject<{
|
|
19
|
-
|
|
20
|
-
last_name: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
19
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
21
20
|
mobile: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
22
|
-
country_code: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
23
21
|
email: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
24
22
|
message: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
23
|
+
city: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
25
24
|
admin_message: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
26
25
|
admin_view: z.ZodType<YesNo, z.ZodTypeDef, YesNo>;
|
|
27
26
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
28
27
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
email: string;
|
|
30
28
|
status: Status;
|
|
31
29
|
message: string;
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
name: string;
|
|
31
|
+
email: string;
|
|
34
32
|
mobile: string;
|
|
35
|
-
country_code: string;
|
|
36
33
|
admin_message: string;
|
|
34
|
+
city: string;
|
|
37
35
|
admin_view: YesNo;
|
|
38
36
|
}, {
|
|
39
37
|
status: Status;
|
|
40
|
-
|
|
38
|
+
name: string;
|
|
41
39
|
admin_view: YesNo;
|
|
42
|
-
email?: string | undefined;
|
|
43
40
|
message?: string | undefined;
|
|
44
|
-
|
|
41
|
+
email?: string | undefined;
|
|
45
42
|
mobile?: string | undefined;
|
|
46
|
-
country_code?: string | undefined;
|
|
47
43
|
admin_message?: string | undefined;
|
|
44
|
+
city?: string | undefined;
|
|
48
45
|
}>;
|
|
49
46
|
type RequestDemoDTO = z.infer<typeof RequestDemoSchema>;
|
|
50
47
|
declare const RequestDemoQuerySchema: z.ZodObject<{
|
|
@@ -131,34 +128,31 @@ declare const RequestDemoQuerySchema: z.ZodObject<{
|
|
|
131
128
|
}>;
|
|
132
129
|
type RequestDemoQueryDTO = z.infer<typeof RequestDemoQuerySchema>;
|
|
133
130
|
declare const RequestDemoCreateSchema: z.ZodObject<{
|
|
134
|
-
|
|
135
|
-
last_name: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
131
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
136
132
|
mobile: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
137
|
-
country_code: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
138
133
|
email: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
139
134
|
message: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
135
|
+
city: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
140
136
|
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
email: string;
|
|
142
137
|
message: string;
|
|
143
|
-
|
|
144
|
-
|
|
138
|
+
name: string;
|
|
139
|
+
email: string;
|
|
145
140
|
mobile: string;
|
|
146
|
-
|
|
141
|
+
city: string;
|
|
147
142
|
}, {
|
|
148
|
-
|
|
149
|
-
email?: string | undefined;
|
|
143
|
+
name: string;
|
|
150
144
|
message?: string | undefined;
|
|
151
|
-
|
|
145
|
+
email?: string | undefined;
|
|
152
146
|
mobile?: string | undefined;
|
|
153
|
-
|
|
147
|
+
city?: string | undefined;
|
|
154
148
|
}>;
|
|
155
149
|
type RequestDemoCreateDTO = z.infer<typeof RequestDemoCreateSchema>;
|
|
156
|
-
declare const
|
|
157
|
-
declare const
|
|
150
|
+
declare const todRequestDemoPayload: (row: RequestDemo) => RequestDemoDTO;
|
|
151
|
+
declare const newdRequestDemoPayload: () => RequestDemoDTO;
|
|
158
152
|
declare const findRequestDemo: (data: RequestDemoQueryDTO) => Promise<FBR<RequestDemo[]>>;
|
|
159
153
|
declare const createDemo: (data: RequestDemoDTO) => Promise<SBR>;
|
|
160
154
|
declare const updateRequestDemo: (id: string, data: RequestDemoDTO) => Promise<SBR>;
|
|
161
155
|
declare const deleteRequestDemo: (id: string) => Promise<SBR>;
|
|
162
156
|
declare const createRequestDemo: (data: RequestDemoCreateDTO) => Promise<FBR<RequestDemo[]>>;
|
|
163
157
|
|
|
164
|
-
export { type RequestDemo, type RequestDemoCreateDTO, RequestDemoCreateSchema, type RequestDemoDTO, type RequestDemoQueryDTO, RequestDemoQuerySchema, RequestDemoSchema, createDemo, createRequestDemo, deleteRequestDemo, findRequestDemo,
|
|
158
|
+
export { type RequestDemo, type RequestDemoCreateDTO, RequestDemoCreateSchema, type RequestDemoDTO, type RequestDemoQueryDTO, RequestDemoQuerySchema, RequestDemoSchema, createDemo, createRequestDemo, deleteRequestDemo, findRequestDemo, newdRequestDemoPayload, todRequestDemoPayload, updateRequestDemo };
|
|
@@ -250,12 +250,11 @@ var ENDPOINTS = {
|
|
|
250
250
|
};
|
|
251
251
|
var RequestDemoSchema = z3.object({
|
|
252
252
|
// Main Field Details
|
|
253
|
-
|
|
254
|
-
last_name: stringOptional("Last Name", 0, 100),
|
|
253
|
+
name: stringMandatory("Name", 3, 100),
|
|
255
254
|
mobile: stringOptional("Mobile", 0, 20),
|
|
256
|
-
country_code: stringOptional("Country Code", 0, 20),
|
|
257
255
|
email: stringOptional("Email", 0, 100),
|
|
258
256
|
message: stringOptional("Message", 0, 500),
|
|
257
|
+
city: stringOptional("City", 0, 100),
|
|
259
258
|
// Admin Details
|
|
260
259
|
admin_message: stringOptional("Admin Message", 0, 1e3),
|
|
261
260
|
admin_view: enumMandatory("Admin View", YesNo, "No" /* No */),
|
|
@@ -271,33 +270,30 @@ var RequestDemoQuerySchema = BaseQuerySchema.extend({
|
|
|
271
270
|
});
|
|
272
271
|
var RequestDemoCreateSchema = z3.object({
|
|
273
272
|
// Main Field Details
|
|
274
|
-
|
|
275
|
-
last_name: stringOptional("Last Name", 0, 100),
|
|
273
|
+
name: stringMandatory("Name", 3, 100),
|
|
276
274
|
mobile: stringOptional("Mobile", 0, 20),
|
|
277
|
-
country_code: stringOptional("Country Code", 0, 20),
|
|
278
275
|
email: stringOptional("Email", 0, 100),
|
|
279
|
-
message: stringOptional("Message", 0, 500)
|
|
276
|
+
message: stringOptional("Message", 0, 500),
|
|
277
|
+
city: stringOptional("City", 0, 100)
|
|
280
278
|
});
|
|
281
|
-
var
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
message: request_demo.message || "",
|
|
279
|
+
var todRequestDemoPayload = (row) => ({
|
|
280
|
+
name: row.name || "",
|
|
281
|
+
mobile: row.mobile || "",
|
|
282
|
+
email: row.email || "",
|
|
283
|
+
message: row.message || "",
|
|
284
|
+
city: row.city || "",
|
|
288
285
|
// Admin Details
|
|
289
|
-
admin_message:
|
|
290
|
-
admin_view:
|
|
286
|
+
admin_message: row.admin_message || "",
|
|
287
|
+
admin_view: row.admin_view || "No" /* No */,
|
|
291
288
|
// Metadata
|
|
292
|
-
status:
|
|
289
|
+
status: row.status
|
|
293
290
|
});
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
last_name: "",
|
|
291
|
+
var newdRequestDemoPayload = () => ({
|
|
292
|
+
name: "",
|
|
297
293
|
mobile: "",
|
|
298
|
-
country_code: "",
|
|
299
294
|
email: "",
|
|
300
295
|
message: "",
|
|
296
|
+
city: "",
|
|
301
297
|
// Admin Details
|
|
302
298
|
admin_message: "",
|
|
303
299
|
admin_view: "No" /* No */,
|
|
@@ -327,7 +323,7 @@ export {
|
|
|
327
323
|
createRequestDemo,
|
|
328
324
|
deleteRequestDemo,
|
|
329
325
|
findRequestDemo,
|
|
330
|
-
|
|
331
|
-
|
|
326
|
+
newdRequestDemoPayload,
|
|
327
|
+
todRequestDemoPayload,
|
|
332
328
|
updateRequestDemo
|
|
333
329
|
};
|
package/package.json
CHANGED