vms-nest-prisma-api-document 5.0.3 → 5.0.5
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/gps/features/fuel/gps_fuel_vehicle_daily_summary_service.d.ts +1 -0
- package/dist/services/gps/features/geofence/gps_geofence_data_service.d.ts +10 -10
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +9 -9
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +4 -4
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +2 -2
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +43 -43
- package/dist/services/master/expense/master_fuel_company_service.d.ts +142 -0
- package/dist/services/master/expense/master_fuel_company_service.js +298 -0
- package/dist/services/master/expense/master_vendor_document_type_service.d.ts +126 -0
- package/dist/services/master/expense/master_vendor_document_type_service.js +286 -0
- package/dist/services/master/main/master_main_eway_bill_provider_service.d.ts +2 -2
- package/dist/services/master/main/master_main_fasttag_bank_service.d.ts +2 -2
- package/dist/services/website/contact_us_detail_service.d.ts +1 -1
- package/dist/services/website/static_pages_service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -59,6 +59,8 @@ declare const GPSGeofenceDataSchema: z.ZodObject<{
|
|
|
59
59
|
geofence_purpose_type: z.ZodType<GeofencePurposeType, z.ZodTypeDef, GeofencePurposeType>;
|
|
60
60
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
status: Status;
|
|
63
|
+
organisation_id: string;
|
|
62
64
|
geofence_name: string;
|
|
63
65
|
location_name: string;
|
|
64
66
|
geofence_type: GeofenceType;
|
|
@@ -68,21 +70,19 @@ declare const GPSGeofenceDataSchema: z.ZodObject<{
|
|
|
68
70
|
}[];
|
|
69
71
|
geofence_description: string;
|
|
70
72
|
geofence_purpose_type: GeofencePurposeType;
|
|
71
|
-
status: Status;
|
|
72
|
-
organisation_id: string;
|
|
73
|
-
radius_km?: number | undefined;
|
|
74
73
|
latitude?: number | undefined;
|
|
75
74
|
longitude?: number | undefined;
|
|
75
|
+
radius_km?: number | undefined;
|
|
76
76
|
}, {
|
|
77
|
+
status: Status;
|
|
78
|
+
organisation_id: string;
|
|
77
79
|
geofence_name: string;
|
|
78
80
|
location_name: string;
|
|
79
81
|
geofence_type: GeofenceType;
|
|
80
82
|
geofence_purpose_type: GeofencePurposeType;
|
|
81
|
-
status: Status;
|
|
82
|
-
organisation_id: string;
|
|
83
|
-
radius_km?: unknown;
|
|
84
83
|
latitude?: unknown;
|
|
85
84
|
longitude?: unknown;
|
|
85
|
+
radius_km?: unknown;
|
|
86
86
|
poliline_data?: {
|
|
87
87
|
latitude?: unknown;
|
|
88
88
|
longitude?: unknown;
|
|
@@ -125,8 +125,6 @@ declare const GPSGeofenceDataQuerySchema: z.ZodObject<{
|
|
|
125
125
|
geofence_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof GeofenceType>, "many">>>;
|
|
126
126
|
geofence_purpose_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof GeofencePurposeType>, "many">>>;
|
|
127
127
|
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
geofence_type: GeofenceType[];
|
|
129
|
-
geofence_purpose_type: GeofencePurposeType[];
|
|
130
128
|
status: Status[];
|
|
131
129
|
search: string;
|
|
132
130
|
paging: PAGING;
|
|
@@ -149,11 +147,11 @@ declare const GPSGeofenceDataQuerySchema: z.ZodObject<{
|
|
|
149
147
|
date_format_id: string;
|
|
150
148
|
time_zone_id: string;
|
|
151
149
|
organisation_ids: string[];
|
|
150
|
+
geofence_type: GeofenceType[];
|
|
151
|
+
geofence_purpose_type: GeofencePurposeType[];
|
|
152
152
|
}, {
|
|
153
153
|
date_format_id: string;
|
|
154
154
|
time_zone_id: string;
|
|
155
|
-
geofence_type?: GeofenceType[] | undefined;
|
|
156
|
-
geofence_purpose_type?: GeofencePurposeType[] | undefined;
|
|
157
155
|
status?: Status[] | undefined;
|
|
158
156
|
search?: string | undefined;
|
|
159
157
|
paging?: PAGING | undefined;
|
|
@@ -174,6 +172,8 @@ declare const GPSGeofenceDataQuerySchema: z.ZodObject<{
|
|
|
174
172
|
}[] | undefined;
|
|
175
173
|
include_master_data?: YesNo | undefined;
|
|
176
174
|
organisation_ids?: string[] | undefined;
|
|
175
|
+
geofence_type?: GeofenceType[] | undefined;
|
|
176
|
+
geofence_purpose_type?: GeofencePurposeType[] | undefined;
|
|
177
177
|
}>;
|
|
178
178
|
type GPSGeofenceDataQueryDTO = z.infer<typeof GPSGeofenceDataQuerySchema>;
|
|
179
179
|
declare const toGPSGeofenceDataPayload: (data: GPSGeofenceData) => GPSGeofenceDataDTO;
|
|
@@ -31,21 +31,21 @@ declare const GPSGeofenceTransactionSchema: z.ZodObject<{
|
|
|
31
31
|
geofence_time: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
32
32
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
33
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
|
|
34
|
+
geofence_status_type: GeofenceStatusType;
|
|
35
|
+
geofence_time: string;
|
|
35
36
|
status: Status;
|
|
36
37
|
organisation_id: string;
|
|
37
|
-
driver_id: string;
|
|
38
38
|
vehicle_id: string;
|
|
39
|
+
driver_id: string;
|
|
40
|
+
gps_geofence_id: string;
|
|
41
|
+
}, {
|
|
39
42
|
geofence_status_type: GeofenceStatusType;
|
|
40
43
|
geofence_time: string;
|
|
41
|
-
}, {
|
|
42
|
-
gps_geofence_id: string;
|
|
43
44
|
status: Status;
|
|
44
45
|
organisation_id: string;
|
|
45
|
-
driver_id: string;
|
|
46
46
|
vehicle_id: string;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
driver_id: string;
|
|
48
|
+
gps_geofence_id: string;
|
|
49
49
|
}>;
|
|
50
50
|
type GPSGeofenceTransactionDTO = z.infer<typeof GPSGeofenceTransactionSchema>;
|
|
51
51
|
declare const GPSGeofenceTransactionQuerySchema: z.ZodObject<{
|
|
@@ -85,6 +85,7 @@ declare const GPSGeofenceTransactionQuerySchema: z.ZodObject<{
|
|
|
85
85
|
gps_geofence_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
86
86
|
geofence_status_type: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof GeofenceStatusType>, "many">>>;
|
|
87
87
|
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
geofence_status_type: GeofenceStatusType[];
|
|
88
89
|
status: Status[];
|
|
89
90
|
search: string;
|
|
90
91
|
paging: PAGING;
|
|
@@ -109,11 +110,11 @@ declare const GPSGeofenceTransactionQuerySchema: z.ZodObject<{
|
|
|
109
110
|
organisation_ids: string[];
|
|
110
111
|
vehicle_ids: string[];
|
|
111
112
|
driver_ids: string[];
|
|
112
|
-
geofence_status_type: GeofenceStatusType[];
|
|
113
113
|
gps_geofence_ids: string[];
|
|
114
114
|
}, {
|
|
115
115
|
date_format_id: string;
|
|
116
116
|
time_zone_id: string;
|
|
117
|
+
geofence_status_type?: GeofenceStatusType[] | undefined;
|
|
117
118
|
status?: Status[] | undefined;
|
|
118
119
|
search?: string | undefined;
|
|
119
120
|
paging?: PAGING | undefined;
|
|
@@ -136,7 +137,6 @@ declare const GPSGeofenceTransactionQuerySchema: z.ZodObject<{
|
|
|
136
137
|
organisation_ids?: string[] | undefined;
|
|
137
138
|
vehicle_ids?: string[] | undefined;
|
|
138
139
|
driver_ids?: string[] | undefined;
|
|
139
|
-
geofence_status_type?: GeofenceStatusType[] | undefined;
|
|
140
140
|
gps_geofence_ids?: string[] | undefined;
|
|
141
141
|
}>;
|
|
142
142
|
type GPSGeofenceTransactionQueryDTO = z.infer<typeof GPSGeofenceTransactionQuerySchema>;
|
|
@@ -40,22 +40,22 @@ declare const GPSGeofenceTransactionSummarySchema: z.ZodObject<{
|
|
|
40
40
|
duration_seconds: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
41
41
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
gps_geofence_id: string;
|
|
44
43
|
status: Status;
|
|
45
44
|
organisation_id: string;
|
|
46
|
-
driver_id: string;
|
|
47
45
|
vehicle_id: string;
|
|
46
|
+
driver_id: string;
|
|
47
|
+
gps_geofence_id: string;
|
|
48
48
|
geofence_enter_date_time: string;
|
|
49
49
|
geofence_exit_date_time: string;
|
|
50
50
|
duration_seconds: number;
|
|
51
51
|
enter_gps_geofence_transaction_id: string;
|
|
52
52
|
exit_gps_geofence_transaction_id: string;
|
|
53
53
|
}, {
|
|
54
|
-
gps_geofence_id: string;
|
|
55
54
|
status: Status;
|
|
56
55
|
organisation_id: string;
|
|
57
|
-
driver_id: string;
|
|
58
56
|
vehicle_id: string;
|
|
57
|
+
driver_id: string;
|
|
58
|
+
gps_geofence_id: string;
|
|
59
59
|
geofence_enter_date_time: string;
|
|
60
60
|
enter_gps_geofence_transaction_id: string;
|
|
61
61
|
exit_gps_geofence_transaction_id: string;
|
|
@@ -64,8 +64,8 @@ declare const TripGeofenceToGeofenceSchema: z.ZodObject<{
|
|
|
64
64
|
}, "strip", z.ZodTypeAny, {
|
|
65
65
|
status: Status;
|
|
66
66
|
organisation_id: string;
|
|
67
|
-
driver_id: string;
|
|
68
67
|
vehicle_id: string;
|
|
68
|
+
driver_id: string;
|
|
69
69
|
duration_seconds: number;
|
|
70
70
|
from_geofence_exit_date_time: string;
|
|
71
71
|
to_geofence_enter_date_time: string;
|
|
@@ -87,8 +87,8 @@ declare const TripGeofenceToGeofenceSchema: z.ZodObject<{
|
|
|
87
87
|
}, {
|
|
88
88
|
status: Status;
|
|
89
89
|
organisation_id: string;
|
|
90
|
-
driver_id: string;
|
|
91
90
|
vehicle_id: string;
|
|
91
|
+
driver_id: string;
|
|
92
92
|
from_geofence_exit_date_time: string;
|
|
93
93
|
to_geofence_enter_date_time: string;
|
|
94
94
|
from_geofence_id: string;
|
|
@@ -33,41 +33,41 @@ declare const MultipleVehicleReportSchema: z.ZodObject<{
|
|
|
33
33
|
vehicle_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
34
34
|
driver_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
db_index: string;
|
|
37
|
+
db_instance: string;
|
|
38
|
+
night_driving: NightDriving;
|
|
36
39
|
search: string;
|
|
37
40
|
paging: PAGING;
|
|
38
41
|
page_count: number;
|
|
39
42
|
page_index: number;
|
|
40
|
-
login_from: LoginFrom;
|
|
41
43
|
date_format_id: string;
|
|
42
44
|
time_zone_id: string;
|
|
45
|
+
login_from: LoginFrom;
|
|
43
46
|
organisation_id: string;
|
|
44
|
-
db_instance: string;
|
|
45
|
-
db_index: string;
|
|
46
47
|
vehicle_ids: string[];
|
|
47
48
|
from_date: string;
|
|
48
49
|
to_date: string;
|
|
49
50
|
time_slot: TimeSlot;
|
|
50
|
-
night_driving: NightDriving;
|
|
51
51
|
over_speed: OverSpeed;
|
|
52
52
|
utilization_km: number;
|
|
53
53
|
vehicle_summary: YesNo;
|
|
54
54
|
driver_summary: YesNo;
|
|
55
55
|
}, {
|
|
56
|
-
|
|
56
|
+
db_index: string;
|
|
57
|
+
db_instance: string;
|
|
57
58
|
date_format_id: string;
|
|
58
59
|
time_zone_id: string;
|
|
60
|
+
login_from: LoginFrom;
|
|
59
61
|
organisation_id: string;
|
|
60
|
-
db_instance: string;
|
|
61
|
-
db_index: string;
|
|
62
62
|
from_date: string;
|
|
63
63
|
to_date: string;
|
|
64
|
+
night_driving?: NightDriving | undefined;
|
|
64
65
|
search?: string | undefined;
|
|
65
66
|
paging?: PAGING | undefined;
|
|
66
67
|
page_count?: unknown;
|
|
67
68
|
page_index?: unknown;
|
|
68
69
|
vehicle_ids?: string[] | undefined;
|
|
69
70
|
time_slot?: TimeSlot | undefined;
|
|
70
|
-
night_driving?: NightDriving | undefined;
|
|
71
71
|
over_speed?: OverSpeed | undefined;
|
|
72
72
|
utilization_km?: unknown;
|
|
73
73
|
vehicle_summary?: YesNo | undefined;
|
|
@@ -96,40 +96,40 @@ declare const MultipleDriverReportSchema: z.ZodObject<{
|
|
|
96
96
|
vehicle_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
97
97
|
driver_summary: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
98
98
|
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
db_index: string;
|
|
100
|
+
db_instance: string;
|
|
101
|
+
night_driving: NightDriving;
|
|
99
102
|
search: string;
|
|
100
103
|
paging: PAGING;
|
|
101
104
|
page_count: number;
|
|
102
105
|
page_index: number;
|
|
103
|
-
login_from: LoginFrom;
|
|
104
106
|
date_format_id: string;
|
|
105
107
|
time_zone_id: string;
|
|
108
|
+
login_from: LoginFrom;
|
|
106
109
|
organisation_id: string;
|
|
107
|
-
db_instance: string;
|
|
108
|
-
db_index: string;
|
|
109
110
|
from_date: string;
|
|
110
111
|
to_date: string;
|
|
111
112
|
time_slot: TimeSlot;
|
|
112
|
-
night_driving: NightDriving;
|
|
113
113
|
over_speed: OverSpeed;
|
|
114
114
|
utilization_km: number;
|
|
115
115
|
vehicle_summary: YesNo;
|
|
116
116
|
driver_summary: YesNo;
|
|
117
117
|
driver_ids: string[];
|
|
118
118
|
}, {
|
|
119
|
-
|
|
119
|
+
db_index: string;
|
|
120
|
+
db_instance: string;
|
|
120
121
|
date_format_id: string;
|
|
121
122
|
time_zone_id: string;
|
|
123
|
+
login_from: LoginFrom;
|
|
122
124
|
organisation_id: string;
|
|
123
|
-
db_instance: string;
|
|
124
|
-
db_index: string;
|
|
125
125
|
from_date: string;
|
|
126
126
|
to_date: string;
|
|
127
|
+
night_driving?: NightDriving | undefined;
|
|
127
128
|
search?: string | undefined;
|
|
128
129
|
paging?: PAGING | undefined;
|
|
129
130
|
page_count?: unknown;
|
|
130
131
|
page_index?: unknown;
|
|
131
132
|
time_slot?: TimeSlot | undefined;
|
|
132
|
-
night_driving?: NightDriving | undefined;
|
|
133
133
|
over_speed?: OverSpeed | undefined;
|
|
134
134
|
utilization_km?: unknown;
|
|
135
135
|
vehicle_summary?: YesNo | undefined;
|
|
@@ -156,16 +156,16 @@ declare const SimpleReportSchema: z.ZodObject<{
|
|
|
156
156
|
interval_seconds: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
157
157
|
boolean_type: z.ZodType<BooleanType, z.ZodTypeDef, BooleanType>;
|
|
158
158
|
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
db_index: string;
|
|
160
|
+
db_instance: string;
|
|
159
161
|
search: string;
|
|
160
162
|
paging: PAGING;
|
|
161
163
|
page_count: number;
|
|
162
164
|
page_index: number;
|
|
163
|
-
login_from: LoginFrom;
|
|
164
165
|
date_format_id: string;
|
|
165
166
|
time_zone_id: string;
|
|
167
|
+
login_from: LoginFrom;
|
|
166
168
|
organisation_id: string;
|
|
167
|
-
db_instance: string;
|
|
168
|
-
db_index: string;
|
|
169
169
|
vehicle_ids: string[];
|
|
170
170
|
from_date: string;
|
|
171
171
|
to_date: string;
|
|
@@ -173,12 +173,12 @@ declare const SimpleReportSchema: z.ZodObject<{
|
|
|
173
173
|
interval_seconds: number;
|
|
174
174
|
boolean_type: BooleanType;
|
|
175
175
|
}, {
|
|
176
|
-
|
|
176
|
+
db_index: string;
|
|
177
|
+
db_instance: string;
|
|
177
178
|
date_format_id: string;
|
|
178
179
|
time_zone_id: string;
|
|
180
|
+
login_from: LoginFrom;
|
|
179
181
|
organisation_id: string;
|
|
180
|
-
db_instance: string;
|
|
181
|
-
db_index: string;
|
|
182
182
|
from_date: string;
|
|
183
183
|
to_date: string;
|
|
184
184
|
gps_type: GPSType;
|
|
@@ -207,26 +207,26 @@ declare const MultipleVehicleLast24HoursReportSchema: z.ZodObject<{
|
|
|
207
207
|
utilization_km: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
208
208
|
is12am: z.ZodType<Is12AM, z.ZodTypeDef, Is12AM>;
|
|
209
209
|
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
db_index: string;
|
|
211
|
+
db_instance: string;
|
|
210
212
|
search: string;
|
|
211
213
|
paging: PAGING;
|
|
212
214
|
page_count: number;
|
|
213
215
|
page_index: number;
|
|
214
|
-
login_from: LoginFrom;
|
|
215
216
|
date_format_id: string;
|
|
216
217
|
time_zone_id: string;
|
|
218
|
+
login_from: LoginFrom;
|
|
217
219
|
organisation_id: string;
|
|
218
|
-
db_instance: string;
|
|
219
|
-
db_index: string;
|
|
220
220
|
vehicle_ids: string[];
|
|
221
221
|
utilization_km: number;
|
|
222
222
|
is12am: Is12AM;
|
|
223
223
|
}, {
|
|
224
|
-
|
|
224
|
+
db_index: string;
|
|
225
|
+
db_instance: string;
|
|
225
226
|
date_format_id: string;
|
|
226
227
|
time_zone_id: string;
|
|
228
|
+
login_from: LoginFrom;
|
|
227
229
|
organisation_id: string;
|
|
228
|
-
db_instance: string;
|
|
229
|
-
db_index: string;
|
|
230
230
|
is12am: Is12AM;
|
|
231
231
|
search?: string | undefined;
|
|
232
232
|
paging?: PAGING | undefined;
|
|
@@ -253,28 +253,28 @@ declare const SingleVehicleReportSchema: z.ZodObject<{
|
|
|
253
253
|
to_date_time: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
254
254
|
interval_seconds: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
255
255
|
}, "strip", z.ZodTypeAny, {
|
|
256
|
+
db_index: string;
|
|
257
|
+
db_instance: string;
|
|
258
|
+
vehicle_id: string;
|
|
256
259
|
search: string;
|
|
257
260
|
paging: PAGING;
|
|
258
261
|
page_count: number;
|
|
259
262
|
page_index: number;
|
|
260
|
-
login_from: LoginFrom;
|
|
261
263
|
date_format_id: string;
|
|
262
264
|
time_zone_id: string;
|
|
265
|
+
login_from: LoginFrom;
|
|
263
266
|
organisation_id: string;
|
|
264
|
-
db_instance: string;
|
|
265
|
-
db_index: string;
|
|
266
267
|
interval_seconds: number;
|
|
267
|
-
vehicle_id: string;
|
|
268
268
|
from_date_time: string;
|
|
269
269
|
to_date_time: string;
|
|
270
270
|
}, {
|
|
271
|
-
|
|
271
|
+
db_index: string;
|
|
272
|
+
db_instance: string;
|
|
273
|
+
vehicle_id: string;
|
|
272
274
|
date_format_id: string;
|
|
273
275
|
time_zone_id: string;
|
|
276
|
+
login_from: LoginFrom;
|
|
274
277
|
organisation_id: string;
|
|
275
|
-
db_instance: string;
|
|
276
|
-
db_index: string;
|
|
277
|
-
vehicle_id: string;
|
|
278
278
|
from_date_time: string;
|
|
279
279
|
to_date_time: string;
|
|
280
280
|
search?: string | undefined;
|
|
@@ -298,25 +298,25 @@ declare const VehicleDashboardSummaryQuerySchema: z.ZodObject<{
|
|
|
298
298
|
db_index: z.ZodEffects<z.ZodString, string, string>;
|
|
299
299
|
vehicle_id: z.ZodEffects<z.ZodString, string, string>;
|
|
300
300
|
}, "strip", z.ZodTypeAny, {
|
|
301
|
+
db_index: string;
|
|
302
|
+
db_instance: string;
|
|
303
|
+
vehicle_id: string;
|
|
301
304
|
search: string;
|
|
302
305
|
paging: PAGING;
|
|
303
306
|
page_count: number;
|
|
304
307
|
page_index: number;
|
|
305
|
-
login_from: LoginFrom;
|
|
306
308
|
date_format_id: string;
|
|
307
309
|
time_zone_id: string;
|
|
310
|
+
login_from: LoginFrom;
|
|
308
311
|
organisation_id: string;
|
|
309
|
-
|
|
312
|
+
}, {
|
|
310
313
|
db_index: string;
|
|
314
|
+
db_instance: string;
|
|
311
315
|
vehicle_id: string;
|
|
312
|
-
}, {
|
|
313
|
-
login_from: LoginFrom;
|
|
314
316
|
date_format_id: string;
|
|
315
317
|
time_zone_id: string;
|
|
318
|
+
login_from: LoginFrom;
|
|
316
319
|
organisation_id: string;
|
|
317
|
-
db_instance: string;
|
|
318
|
-
db_index: string;
|
|
319
|
-
vehicle_id: string;
|
|
320
320
|
search?: string | undefined;
|
|
321
321
|
paging?: PAGING | undefined;
|
|
322
322
|
page_count?: unknown;
|
|
@@ -0,0 +1,142 @@
|
|
|
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, c as MasterMainCountry } from '../../../user_organisation_service-DJWj2iMa.js';
|
|
5
|
+
import '../../../zod_utils/zod_base_schema.js';
|
|
6
|
+
import '../main/master_main_sim_provider_service.js';
|
|
7
|
+
|
|
8
|
+
interface MasterFuelCompany extends Record<string, unknown> {
|
|
9
|
+
fuel_company_id: string;
|
|
10
|
+
company_name: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
logo_url: String;
|
|
13
|
+
logo_key: String;
|
|
14
|
+
status: Status;
|
|
15
|
+
added_date_time: string;
|
|
16
|
+
modified_date_time: string;
|
|
17
|
+
organisation_id?: string;
|
|
18
|
+
UserOrganisation?: UserOrganisation;
|
|
19
|
+
country_id?: string;
|
|
20
|
+
MasterMainCountry?: MasterMainCountry;
|
|
21
|
+
}
|
|
22
|
+
declare const MasterFuelCompanySchema: z.ZodObject<{
|
|
23
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
24
|
+
country_id: z.ZodEffects<z.ZodString, string, string>;
|
|
25
|
+
company_name: z.ZodEffects<z.ZodString, string, string>;
|
|
26
|
+
description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
27
|
+
logo_url: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
28
|
+
logo_key: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
29
|
+
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
description: string;
|
|
32
|
+
status: Status;
|
|
33
|
+
organisation_id: string;
|
|
34
|
+
country_id: string;
|
|
35
|
+
company_name: string;
|
|
36
|
+
logo_url: string;
|
|
37
|
+
logo_key: string;
|
|
38
|
+
}, {
|
|
39
|
+
status: Status;
|
|
40
|
+
organisation_id: string;
|
|
41
|
+
country_id: string;
|
|
42
|
+
company_name: string;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
logo_url?: string | undefined;
|
|
45
|
+
logo_key?: string | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
type MasterFuelCompanyDTO = z.infer<typeof MasterFuelCompanySchema>;
|
|
48
|
+
declare const MasterFuelCompanyQuerySchema: z.ZodObject<{
|
|
49
|
+
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
50
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
51
|
+
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
52
|
+
page_count: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
53
|
+
page_index: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
54
|
+
load_parents: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadParents>>>;
|
|
55
|
+
load_parents_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
56
|
+
load_child: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChild>>>;
|
|
57
|
+
load_child_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
58
|
+
load_child_count: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChildCount>>>;
|
|
59
|
+
load_child_count_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
60
|
+
include_details: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
61
|
+
where_relations: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
62
|
+
order_by: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
63
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
64
|
+
field: z.ZodEffects<z.ZodString, string, string>;
|
|
65
|
+
direction: z.ZodType<OrderBy, z.ZodTypeDef, OrderBy>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
name: string;
|
|
68
|
+
field: string;
|
|
69
|
+
direction: OrderBy;
|
|
70
|
+
}, {
|
|
71
|
+
name: string;
|
|
72
|
+
field: string;
|
|
73
|
+
direction: OrderBy;
|
|
74
|
+
}>, "many">>>;
|
|
75
|
+
include_master_data: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
76
|
+
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
77
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
78
|
+
} & {
|
|
79
|
+
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
80
|
+
country_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
81
|
+
fuel_company_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
status: Status[];
|
|
84
|
+
search: string;
|
|
85
|
+
paging: PAGING;
|
|
86
|
+
page_count: number;
|
|
87
|
+
page_index: number;
|
|
88
|
+
load_parents: LoadParents;
|
|
89
|
+
load_parents_list: string[];
|
|
90
|
+
load_child: LoadChild;
|
|
91
|
+
load_child_list: string[];
|
|
92
|
+
load_child_count: LoadChildCount;
|
|
93
|
+
load_child_count_list: string[];
|
|
94
|
+
include_details: Record<string, any>;
|
|
95
|
+
where_relations: Record<string, any>;
|
|
96
|
+
order_by: {
|
|
97
|
+
name: string;
|
|
98
|
+
field: string;
|
|
99
|
+
direction: OrderBy;
|
|
100
|
+
}[];
|
|
101
|
+
include_master_data: YesNo;
|
|
102
|
+
date_format_id: string;
|
|
103
|
+
time_zone_id: string;
|
|
104
|
+
organisation_ids: string[];
|
|
105
|
+
country_ids: string[];
|
|
106
|
+
fuel_company_ids: string[];
|
|
107
|
+
}, {
|
|
108
|
+
date_format_id: string;
|
|
109
|
+
time_zone_id: string;
|
|
110
|
+
status?: Status[] | undefined;
|
|
111
|
+
search?: string | undefined;
|
|
112
|
+
paging?: PAGING | undefined;
|
|
113
|
+
page_count?: unknown;
|
|
114
|
+
page_index?: unknown;
|
|
115
|
+
load_parents?: LoadParents | undefined;
|
|
116
|
+
load_parents_list?: string[] | undefined;
|
|
117
|
+
load_child?: LoadChild | undefined;
|
|
118
|
+
load_child_list?: string[] | undefined;
|
|
119
|
+
load_child_count?: LoadChildCount | undefined;
|
|
120
|
+
load_child_count_list?: string[] | undefined;
|
|
121
|
+
include_details?: Record<string, any> | undefined;
|
|
122
|
+
where_relations?: Record<string, any> | undefined;
|
|
123
|
+
order_by?: {
|
|
124
|
+
name: string;
|
|
125
|
+
field: string;
|
|
126
|
+
direction: OrderBy;
|
|
127
|
+
}[] | undefined;
|
|
128
|
+
include_master_data?: YesNo | undefined;
|
|
129
|
+
organisation_ids?: string[] | undefined;
|
|
130
|
+
country_ids?: string[] | undefined;
|
|
131
|
+
fuel_company_ids?: string[] | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
type MasterFuelCompanyQueryDTO = z.infer<typeof MasterFuelCompanyQuerySchema>;
|
|
134
|
+
declare const toMasterFuelCompanyPayload: (masterFuelCompany: MasterFuelCompany) => MasterFuelCompanyDTO;
|
|
135
|
+
declare const newMasterFuelCompanyPayload: () => MasterFuelCompanyDTO;
|
|
136
|
+
declare const findMasterFuelCompanys: (data: MasterFuelCompanyQueryDTO) => Promise<FBR<MasterFuelCompany[]>>;
|
|
137
|
+
declare const createMasterFuelCompany: (data: MasterFuelCompanyDTO) => Promise<SBR>;
|
|
138
|
+
declare const updateMasterFuelCompany: (id: string, data: MasterFuelCompanyDTO) => Promise<SBR>;
|
|
139
|
+
declare const deleteMasterFuelCompany: (id: string) => Promise<SBR>;
|
|
140
|
+
declare const getMasterFuelCompanyCache: (organisation_id: string) => Promise<FBR<MasterFuelCompany[]>>;
|
|
141
|
+
|
|
142
|
+
export { type MasterFuelCompany, type MasterFuelCompanyDTO, type MasterFuelCompanyQueryDTO, MasterFuelCompanyQuerySchema, MasterFuelCompanySchema, createMasterFuelCompany, deleteMasterFuelCompany, findMasterFuelCompanys, getMasterFuelCompanyCache, newMasterFuelCompanyPayload, toMasterFuelCompanyPayload, updateMasterFuelCompany };
|
|
@@ -0,0 +1,298 @@
|
|
|
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 apiGet = async (url, params) => {
|
|
13
|
+
const response = await getAxiosInstance().get(url, { params });
|
|
14
|
+
return response.data;
|
|
15
|
+
};
|
|
16
|
+
var apiPost = async (url, data) => {
|
|
17
|
+
const response = await getAxiosInstance().post(url, data);
|
|
18
|
+
return response.data;
|
|
19
|
+
};
|
|
20
|
+
var apiPatch = async (url, data) => {
|
|
21
|
+
const response = await getAxiosInstance().patch(url, data);
|
|
22
|
+
return response.data;
|
|
23
|
+
};
|
|
24
|
+
var apiDelete = async (url) => {
|
|
25
|
+
const response = await getAxiosInstance().delete(url);
|
|
26
|
+
return response.data;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/services/master/expense/master_fuel_company_service.ts
|
|
30
|
+
import { z as z3 } from "zod";
|
|
31
|
+
|
|
32
|
+
// src/zod_utils/zod_utils.ts
|
|
33
|
+
import { z } from "zod";
|
|
34
|
+
|
|
35
|
+
// src/core/BaseResponse.ts
|
|
36
|
+
var r_log = (data = {}) => {
|
|
37
|
+
return data;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/zod_utils/zod_utils.ts
|
|
41
|
+
var handleNullOrUndefined = (value) => typeof value === "string" ? value : "";
|
|
42
|
+
var stringMandatory = (fieldName, min = 1, max = 100) => {
|
|
43
|
+
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);
|
|
44
|
+
return schema;
|
|
45
|
+
};
|
|
46
|
+
var stringOptional = (fieldName, min = 0, max = 255, defaultValue = "") => {
|
|
47
|
+
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);
|
|
48
|
+
return schema;
|
|
49
|
+
};
|
|
50
|
+
var stringArrayOptional = (fieldName, min = 0, max = 100, defaultValue = [], unique = false) => {
|
|
51
|
+
const schema = z.array(z.string().trim(), {
|
|
52
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
53
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
54
|
+
if (unique) {
|
|
55
|
+
schema.refine(
|
|
56
|
+
(arr) => new Set(arr).size === arr.length,
|
|
57
|
+
`${fieldName} must contain unique values.`
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
return schema.optional().default(defaultValue);
|
|
61
|
+
};
|
|
62
|
+
var numberOptional = (fieldName, min = 0, max = 1e9, defaultValue = 0) => {
|
|
63
|
+
return z.preprocess(
|
|
64
|
+
(val) => typeof val === "string" && val.trim() !== "" ? Number(val) : val,
|
|
65
|
+
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)
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
var enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
69
|
+
return z.union([
|
|
70
|
+
z.nativeEnum(enumType, {
|
|
71
|
+
invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
|
|
72
|
+
enumType
|
|
73
|
+
).join(", ")}.`
|
|
74
|
+
}),
|
|
75
|
+
z.string().refine((val) => Object.values(enumType).includes(val), {
|
|
76
|
+
message: `${fieldName} should be one of the following values: ${Object.values(
|
|
77
|
+
enumType
|
|
78
|
+
).join(", ")}.`
|
|
79
|
+
})
|
|
80
|
+
]).default(defaultValue).refine((val) => val !== "", {
|
|
81
|
+
message: `Please select ${fieldName}.`
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
85
|
+
return z.nativeEnum(enumType, {
|
|
86
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
87
|
+
enumType
|
|
88
|
+
).join(", ")}.`
|
|
89
|
+
}).optional().default(() => defaultValue);
|
|
90
|
+
};
|
|
91
|
+
var getAllEnums = (enumType) => {
|
|
92
|
+
return Object.values(enumType);
|
|
93
|
+
};
|
|
94
|
+
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
95
|
+
const schema = z.array(z.nativeEnum(enumType), {
|
|
96
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
97
|
+
enumType
|
|
98
|
+
).join(", ")}.`
|
|
99
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
100
|
+
if (unique) {
|
|
101
|
+
schema.refine(
|
|
102
|
+
(arr) => new Set(arr).size === arr.length,
|
|
103
|
+
`${fieldName} must contain unique values.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return schema.optional().default(() => defaultValue);
|
|
107
|
+
};
|
|
108
|
+
var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
|
|
109
|
+
var single_select_mandatory = (fieldName) => {
|
|
110
|
+
const schema = z.string().trim().nonempty(`Please select ${fieldName}.`).transform(handleNullOrUndefined);
|
|
111
|
+
return schema;
|
|
112
|
+
};
|
|
113
|
+
var single_select_optional = (fieldName) => {
|
|
114
|
+
r_log(fieldName);
|
|
115
|
+
const schema = z.string().trim().transform(handleNullOrUndefined);
|
|
116
|
+
return schema;
|
|
117
|
+
};
|
|
118
|
+
var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
|
|
119
|
+
const schema = z.array(
|
|
120
|
+
z.string({
|
|
121
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
122
|
+
})
|
|
123
|
+
).max(
|
|
124
|
+
max,
|
|
125
|
+
`Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
|
|
126
|
+
);
|
|
127
|
+
return schema.optional().default(defaultValue);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// src/zod_utils/zod_base_schema.ts
|
|
131
|
+
import { z as z2 } from "zod";
|
|
132
|
+
|
|
133
|
+
// src/core/Enums.ts
|
|
134
|
+
var PAGING = /* @__PURE__ */ ((PAGING2) => {
|
|
135
|
+
PAGING2["Yes"] = "Yes";
|
|
136
|
+
PAGING2["No"] = "No";
|
|
137
|
+
return PAGING2;
|
|
138
|
+
})(PAGING || {});
|
|
139
|
+
var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
|
|
140
|
+
LoadParents2["Yes"] = "Yes";
|
|
141
|
+
LoadParents2["No"] = "No";
|
|
142
|
+
LoadParents2["Custom"] = "Custom";
|
|
143
|
+
return LoadParents2;
|
|
144
|
+
})(LoadParents || {});
|
|
145
|
+
var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
|
|
146
|
+
LoadChild2["No"] = "No";
|
|
147
|
+
LoadChild2["Yes"] = "Yes";
|
|
148
|
+
LoadChild2["Count"] = "Count";
|
|
149
|
+
LoadChild2["Custom"] = "Custom";
|
|
150
|
+
LoadChild2["Direct"] = "Direct";
|
|
151
|
+
return LoadChild2;
|
|
152
|
+
})(LoadChild || {});
|
|
153
|
+
var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
|
|
154
|
+
LoadChildCount2["No"] = "No";
|
|
155
|
+
LoadChildCount2["Yes"] = "Yes";
|
|
156
|
+
LoadChildCount2["Custom"] = "Custom";
|
|
157
|
+
return LoadChildCount2;
|
|
158
|
+
})(LoadChildCount || {});
|
|
159
|
+
var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
|
|
160
|
+
OrderBy2["asc"] = "asc";
|
|
161
|
+
OrderBy2["desc"] = "desc";
|
|
162
|
+
return OrderBy2;
|
|
163
|
+
})(OrderBy || {});
|
|
164
|
+
var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
|
|
165
|
+
LoginFrom2["Web"] = "Web";
|
|
166
|
+
LoginFrom2["Android"] = "Android";
|
|
167
|
+
LoginFrom2["IPhone"] = "IPhone";
|
|
168
|
+
return LoginFrom2;
|
|
169
|
+
})(LoginFrom || {});
|
|
170
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
171
|
+
Status2["Active"] = "Active";
|
|
172
|
+
Status2["Inactive"] = "Inactive";
|
|
173
|
+
return Status2;
|
|
174
|
+
})(Status || {});
|
|
175
|
+
var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
176
|
+
YesNo2["Yes"] = "Yes";
|
|
177
|
+
YesNo2["No"] = "No";
|
|
178
|
+
return YesNo2;
|
|
179
|
+
})(YesNo || {});
|
|
180
|
+
|
|
181
|
+
// src/zod_utils/zod_base_schema.ts
|
|
182
|
+
var OrderBySchema = z2.array(
|
|
183
|
+
z2.object({
|
|
184
|
+
name: stringMandatory("Order Field Name", 0, 255),
|
|
185
|
+
field: stringMandatory("Order Field Name", 0, 255),
|
|
186
|
+
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
187
|
+
})
|
|
188
|
+
);
|
|
189
|
+
var BaseQuerySchema = z2.object({
|
|
190
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
191
|
+
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
192
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
193
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
194
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
195
|
+
load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
|
|
196
|
+
load_parents_list: stringArrayOptional("Load Parents List"),
|
|
197
|
+
load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
|
|
198
|
+
load_child_list: stringArrayOptional("Load Child List"),
|
|
199
|
+
load_child_count: enumOptional(
|
|
200
|
+
"Load Child",
|
|
201
|
+
LoadChildCount,
|
|
202
|
+
"No" /* No */
|
|
203
|
+
),
|
|
204
|
+
load_child_count_list: stringArrayOptional("Load Child List"),
|
|
205
|
+
include_details: dynamicJsonSchema("Include Details", {}),
|
|
206
|
+
where_relations: dynamicJsonSchema("Where Relations", {}),
|
|
207
|
+
order_by: OrderBySchema.optional().default([]),
|
|
208
|
+
include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
|
|
209
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
210
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
211
|
+
});
|
|
212
|
+
var MongoBaseQuerySchema = z2.object({
|
|
213
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
214
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
215
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
216
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
217
|
+
login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
|
|
218
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
219
|
+
// ✅ Single-selection -> MasterMainDateFormat
|
|
220
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
221
|
+
// ✅ Single-selection -> MasterMainTimeZone
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// src/services/master/expense/master_fuel_company_service.ts
|
|
225
|
+
var URL = "master/expense/fuel_company";
|
|
226
|
+
var ENDPOINTS = {
|
|
227
|
+
find: `${URL}/search`,
|
|
228
|
+
create: URL,
|
|
229
|
+
update: (id) => `${URL}/${id}`,
|
|
230
|
+
delete: (id) => `${URL}/${id}`,
|
|
231
|
+
cache: (organisation_id) => `${URL}/cache/${organisation_id}`
|
|
232
|
+
};
|
|
233
|
+
var MasterFuelCompanySchema = z3.object({
|
|
234
|
+
organisation_id: single_select_mandatory("Organisation"),
|
|
235
|
+
// ✅ Single-selection -> UserOrganisation
|
|
236
|
+
country_id: single_select_mandatory("Master Main Country"),
|
|
237
|
+
// ✅ Single-selection -> MasterMainCountry
|
|
238
|
+
company_name: stringMandatory("Company Name", 3, 100),
|
|
239
|
+
description: stringOptional("Description", 0, 200),
|
|
240
|
+
logo_url: stringOptional("Logo URL", 0, 300),
|
|
241
|
+
logo_key: stringOptional("Logo Key", 0, 300),
|
|
242
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
243
|
+
});
|
|
244
|
+
var MasterFuelCompanyQuerySchema = BaseQuerySchema.extend({
|
|
245
|
+
organisation_ids: multi_select_optional("Organisation"),
|
|
246
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
247
|
+
country_ids: multi_select_optional("Master Main Country"),
|
|
248
|
+
// ✅ Multi-selection -> MasterMainCountry
|
|
249
|
+
fuel_company_ids: multi_select_optional("Master Fuel Company")
|
|
250
|
+
// ✅ Multi-selection -> MasterFuelCompany
|
|
251
|
+
});
|
|
252
|
+
var toMasterFuelCompanyPayload = (masterFuelCompany) => ({
|
|
253
|
+
organisation_id: masterFuelCompany.organisation_id ?? "",
|
|
254
|
+
country_id: masterFuelCompany.country_id ?? "",
|
|
255
|
+
company_name: masterFuelCompany.company_name,
|
|
256
|
+
logo_url: "",
|
|
257
|
+
logo_key: "",
|
|
258
|
+
description: masterFuelCompany.description ?? "",
|
|
259
|
+
status: masterFuelCompany.status
|
|
260
|
+
});
|
|
261
|
+
var newMasterFuelCompanyPayload = () => ({
|
|
262
|
+
organisation_id: "",
|
|
263
|
+
country_id: "",
|
|
264
|
+
company_name: "",
|
|
265
|
+
description: "",
|
|
266
|
+
logo_url: "",
|
|
267
|
+
logo_key: "",
|
|
268
|
+
status: "Active" /* Active */
|
|
269
|
+
});
|
|
270
|
+
var findMasterFuelCompanys = async (data) => {
|
|
271
|
+
return apiPost(
|
|
272
|
+
ENDPOINTS.find,
|
|
273
|
+
data
|
|
274
|
+
);
|
|
275
|
+
};
|
|
276
|
+
var createMasterFuelCompany = async (data) => {
|
|
277
|
+
return apiPost(ENDPOINTS.create, data);
|
|
278
|
+
};
|
|
279
|
+
var updateMasterFuelCompany = async (id, data) => {
|
|
280
|
+
return apiPatch(ENDPOINTS.update(id), data);
|
|
281
|
+
};
|
|
282
|
+
var deleteMasterFuelCompany = async (id) => {
|
|
283
|
+
return apiDelete(ENDPOINTS.delete(id));
|
|
284
|
+
};
|
|
285
|
+
var getMasterFuelCompanyCache = async (organisation_id) => {
|
|
286
|
+
return apiGet(ENDPOINTS.cache(organisation_id));
|
|
287
|
+
};
|
|
288
|
+
export {
|
|
289
|
+
MasterFuelCompanyQuerySchema,
|
|
290
|
+
MasterFuelCompanySchema,
|
|
291
|
+
createMasterFuelCompany,
|
|
292
|
+
deleteMasterFuelCompany,
|
|
293
|
+
findMasterFuelCompanys,
|
|
294
|
+
getMasterFuelCompanyCache,
|
|
295
|
+
newMasterFuelCompanyPayload,
|
|
296
|
+
toMasterFuelCompanyPayload,
|
|
297
|
+
updateMasterFuelCompany
|
|
298
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
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 '../../../user_organisation_service-DJWj2iMa.js';
|
|
5
|
+
import '../../../zod_utils/zod_base_schema.js';
|
|
6
|
+
import '../main/master_main_sim_provider_service.js';
|
|
7
|
+
|
|
8
|
+
interface MasterVendorDocumentType extends Record<string, unknown> {
|
|
9
|
+
document_type_id: string;
|
|
10
|
+
document_type: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
status: Status;
|
|
13
|
+
added_date_time: string;
|
|
14
|
+
modified_date_time: string;
|
|
15
|
+
organisation_id?: string;
|
|
16
|
+
UserOrganisation?: UserOrganisation;
|
|
17
|
+
}
|
|
18
|
+
declare const MasterVendorDocumentTypeSchema: z.ZodObject<{
|
|
19
|
+
organisation_id: z.ZodEffects<z.ZodString, string, string>;
|
|
20
|
+
document_type: z.ZodEffects<z.ZodString, string, string>;
|
|
21
|
+
description: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
22
|
+
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
document_type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
status: Status;
|
|
27
|
+
organisation_id: string;
|
|
28
|
+
}, {
|
|
29
|
+
document_type: string;
|
|
30
|
+
status: Status;
|
|
31
|
+
organisation_id: string;
|
|
32
|
+
description?: string | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
type MasterVendorDocumentTypeDTO = z.infer<typeof MasterVendorDocumentTypeSchema>;
|
|
35
|
+
declare const MasterVendorDocumentTypeQuerySchema: z.ZodObject<{
|
|
36
|
+
search: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
37
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Status>, "many">>>;
|
|
38
|
+
paging: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PAGING>>>;
|
|
39
|
+
page_count: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
40
|
+
page_index: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
41
|
+
load_parents: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadParents>>>;
|
|
42
|
+
load_parents_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
43
|
+
load_child: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChild>>>;
|
|
44
|
+
load_child_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
45
|
+
load_child_count: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof LoadChildCount>>>;
|
|
46
|
+
load_child_count_list: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
47
|
+
include_details: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
48
|
+
where_relations: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
49
|
+
order_by: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
51
|
+
field: z.ZodEffects<z.ZodString, string, string>;
|
|
52
|
+
direction: z.ZodType<OrderBy, z.ZodTypeDef, OrderBy>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
name: string;
|
|
55
|
+
field: string;
|
|
56
|
+
direction: OrderBy;
|
|
57
|
+
}, {
|
|
58
|
+
name: string;
|
|
59
|
+
field: string;
|
|
60
|
+
direction: OrderBy;
|
|
61
|
+
}>, "many">>>;
|
|
62
|
+
include_master_data: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof YesNo>>>;
|
|
63
|
+
date_format_id: z.ZodEffects<z.ZodString, string, string>;
|
|
64
|
+
time_zone_id: z.ZodEffects<z.ZodString, string, string>;
|
|
65
|
+
} & {
|
|
66
|
+
organisation_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
67
|
+
document_type_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
status: Status[];
|
|
70
|
+
search: string;
|
|
71
|
+
paging: PAGING;
|
|
72
|
+
page_count: number;
|
|
73
|
+
page_index: number;
|
|
74
|
+
load_parents: LoadParents;
|
|
75
|
+
load_parents_list: string[];
|
|
76
|
+
load_child: LoadChild;
|
|
77
|
+
load_child_list: string[];
|
|
78
|
+
load_child_count: LoadChildCount;
|
|
79
|
+
load_child_count_list: string[];
|
|
80
|
+
include_details: Record<string, any>;
|
|
81
|
+
where_relations: Record<string, any>;
|
|
82
|
+
order_by: {
|
|
83
|
+
name: string;
|
|
84
|
+
field: string;
|
|
85
|
+
direction: OrderBy;
|
|
86
|
+
}[];
|
|
87
|
+
include_master_data: YesNo;
|
|
88
|
+
date_format_id: string;
|
|
89
|
+
time_zone_id: string;
|
|
90
|
+
organisation_ids: string[];
|
|
91
|
+
document_type_ids: string[];
|
|
92
|
+
}, {
|
|
93
|
+
date_format_id: string;
|
|
94
|
+
time_zone_id: string;
|
|
95
|
+
status?: Status[] | undefined;
|
|
96
|
+
search?: string | undefined;
|
|
97
|
+
paging?: PAGING | undefined;
|
|
98
|
+
page_count?: unknown;
|
|
99
|
+
page_index?: unknown;
|
|
100
|
+
load_parents?: LoadParents | undefined;
|
|
101
|
+
load_parents_list?: string[] | undefined;
|
|
102
|
+
load_child?: LoadChild | undefined;
|
|
103
|
+
load_child_list?: string[] | undefined;
|
|
104
|
+
load_child_count?: LoadChildCount | undefined;
|
|
105
|
+
load_child_count_list?: string[] | undefined;
|
|
106
|
+
include_details?: Record<string, any> | undefined;
|
|
107
|
+
where_relations?: Record<string, any> | undefined;
|
|
108
|
+
order_by?: {
|
|
109
|
+
name: string;
|
|
110
|
+
field: string;
|
|
111
|
+
direction: OrderBy;
|
|
112
|
+
}[] | undefined;
|
|
113
|
+
include_master_data?: YesNo | undefined;
|
|
114
|
+
organisation_ids?: string[] | undefined;
|
|
115
|
+
document_type_ids?: string[] | undefined;
|
|
116
|
+
}>;
|
|
117
|
+
type MasterVendorDocumentTypeQueryDTO = z.infer<typeof MasterVendorDocumentTypeQuerySchema>;
|
|
118
|
+
declare const toMasterVendorDocumentTypePayload: (masterVendorDocumentType: MasterVendorDocumentType) => MasterVendorDocumentTypeDTO;
|
|
119
|
+
declare const newMasterVendorDocumentTypePayload: () => MasterVendorDocumentTypeDTO;
|
|
120
|
+
declare const findMasterVendorDocumentTypes: (data: MasterVendorDocumentTypeQueryDTO) => Promise<FBR<MasterVendorDocumentType[]>>;
|
|
121
|
+
declare const createMasterVendorDocumentType: (data: MasterVendorDocumentTypeDTO) => Promise<SBR>;
|
|
122
|
+
declare const updateMasterVendorDocumentType: (id: string, data: MasterVendorDocumentTypeDTO) => Promise<SBR>;
|
|
123
|
+
declare const deleteMasterVendorDocumentType: (id: string) => Promise<SBR>;
|
|
124
|
+
declare const getMasterVendorDocumentTypeCache: (organisation_id: string) => Promise<FBR<MasterVendorDocumentType[]>>;
|
|
125
|
+
|
|
126
|
+
export { type MasterVendorDocumentType, type MasterVendorDocumentTypeDTO, type MasterVendorDocumentTypeQueryDTO, MasterVendorDocumentTypeQuerySchema, MasterVendorDocumentTypeSchema, createMasterVendorDocumentType, deleteMasterVendorDocumentType, findMasterVendorDocumentTypes, getMasterVendorDocumentTypeCache, newMasterVendorDocumentTypePayload, toMasterVendorDocumentTypePayload, updateMasterVendorDocumentType };
|
|
@@ -0,0 +1,286 @@
|
|
|
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 apiGet = async (url, params) => {
|
|
13
|
+
const response = await getAxiosInstance().get(url, { params });
|
|
14
|
+
return response.data;
|
|
15
|
+
};
|
|
16
|
+
var apiPost = async (url, data) => {
|
|
17
|
+
const response = await getAxiosInstance().post(url, data);
|
|
18
|
+
return response.data;
|
|
19
|
+
};
|
|
20
|
+
var apiPatch = async (url, data) => {
|
|
21
|
+
const response = await getAxiosInstance().patch(url, data);
|
|
22
|
+
return response.data;
|
|
23
|
+
};
|
|
24
|
+
var apiDelete = async (url) => {
|
|
25
|
+
const response = await getAxiosInstance().delete(url);
|
|
26
|
+
return response.data;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/services/master/expense/master_vendor_document_type_service.ts
|
|
30
|
+
import { z as z3 } from "zod";
|
|
31
|
+
|
|
32
|
+
// src/zod_utils/zod_utils.ts
|
|
33
|
+
import { z } from "zod";
|
|
34
|
+
|
|
35
|
+
// src/core/BaseResponse.ts
|
|
36
|
+
var r_log = (data = {}) => {
|
|
37
|
+
return data;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/zod_utils/zod_utils.ts
|
|
41
|
+
var handleNullOrUndefined = (value) => typeof value === "string" ? value : "";
|
|
42
|
+
var stringMandatory = (fieldName, min = 1, max = 100) => {
|
|
43
|
+
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);
|
|
44
|
+
return schema;
|
|
45
|
+
};
|
|
46
|
+
var stringOptional = (fieldName, min = 0, max = 255, defaultValue = "") => {
|
|
47
|
+
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);
|
|
48
|
+
return schema;
|
|
49
|
+
};
|
|
50
|
+
var stringArrayOptional = (fieldName, min = 0, max = 100, defaultValue = [], unique = false) => {
|
|
51
|
+
const schema = z.array(z.string().trim(), {
|
|
52
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
53
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
54
|
+
if (unique) {
|
|
55
|
+
schema.refine(
|
|
56
|
+
(arr) => new Set(arr).size === arr.length,
|
|
57
|
+
`${fieldName} must contain unique values.`
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
return schema.optional().default(defaultValue);
|
|
61
|
+
};
|
|
62
|
+
var numberOptional = (fieldName, min = 0, max = 1e9, defaultValue = 0) => {
|
|
63
|
+
return z.preprocess(
|
|
64
|
+
(val) => typeof val === "string" && val.trim() !== "" ? Number(val) : val,
|
|
65
|
+
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)
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
var enumMandatory = (fieldName, enumType, defaultValue) => {
|
|
69
|
+
return z.union([
|
|
70
|
+
z.nativeEnum(enumType, {
|
|
71
|
+
invalid_type_error: `${fieldName} should be one of the following values: ${Object.values(
|
|
72
|
+
enumType
|
|
73
|
+
).join(", ")}.`
|
|
74
|
+
}),
|
|
75
|
+
z.string().refine((val) => Object.values(enumType).includes(val), {
|
|
76
|
+
message: `${fieldName} should be one of the following values: ${Object.values(
|
|
77
|
+
enumType
|
|
78
|
+
).join(", ")}.`
|
|
79
|
+
})
|
|
80
|
+
]).default(defaultValue).refine((val) => val !== "", {
|
|
81
|
+
message: `Please select ${fieldName}.`
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
var enumOptional = (fieldName, enumType, defaultValue) => {
|
|
85
|
+
return z.nativeEnum(enumType, {
|
|
86
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
87
|
+
enumType
|
|
88
|
+
).join(", ")}.`
|
|
89
|
+
}).optional().default(() => defaultValue);
|
|
90
|
+
};
|
|
91
|
+
var getAllEnums = (enumType) => {
|
|
92
|
+
return Object.values(enumType);
|
|
93
|
+
};
|
|
94
|
+
var enumArrayOptional = (fieldName, enumType, defaultValue = getAllEnums(enumType), min = 0, max = 100, unique = false) => {
|
|
95
|
+
const schema = z.array(z.nativeEnum(enumType), {
|
|
96
|
+
invalid_type_error: `${fieldName} must be an array containing only the following values: ${Object.values(
|
|
97
|
+
enumType
|
|
98
|
+
).join(", ")}.`
|
|
99
|
+
}).min(min, `${fieldName} must contain at least ${min} items.`).max(max, `${fieldName} must contain at most ${max} items.`);
|
|
100
|
+
if (unique) {
|
|
101
|
+
schema.refine(
|
|
102
|
+
(arr) => new Set(arr).size === arr.length,
|
|
103
|
+
`${fieldName} must contain unique values.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return schema.optional().default(() => defaultValue);
|
|
107
|
+
};
|
|
108
|
+
var dynamicJsonSchema = (fieldName, defaultValue = {}) => z.record(z.any()).optional().default(() => defaultValue);
|
|
109
|
+
var single_select_mandatory = (fieldName) => {
|
|
110
|
+
const schema = z.string().trim().nonempty(`Please select ${fieldName}.`).transform(handleNullOrUndefined);
|
|
111
|
+
return schema;
|
|
112
|
+
};
|
|
113
|
+
var single_select_optional = (fieldName) => {
|
|
114
|
+
r_log(fieldName);
|
|
115
|
+
const schema = z.string().trim().transform(handleNullOrUndefined);
|
|
116
|
+
return schema;
|
|
117
|
+
};
|
|
118
|
+
var multi_select_optional = (fieldName, max = 1e3, defaultValue = []) => {
|
|
119
|
+
const schema = z.array(
|
|
120
|
+
z.string({
|
|
121
|
+
invalid_type_error: `${fieldName} must be an array of strings.`
|
|
122
|
+
})
|
|
123
|
+
).max(
|
|
124
|
+
max,
|
|
125
|
+
`Please select at most ${max} ${fieldName}${max > 1 ? "s" : ""}.`
|
|
126
|
+
);
|
|
127
|
+
return schema.optional().default(defaultValue);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// src/zod_utils/zod_base_schema.ts
|
|
131
|
+
import { z as z2 } from "zod";
|
|
132
|
+
|
|
133
|
+
// src/core/Enums.ts
|
|
134
|
+
var PAGING = /* @__PURE__ */ ((PAGING2) => {
|
|
135
|
+
PAGING2["Yes"] = "Yes";
|
|
136
|
+
PAGING2["No"] = "No";
|
|
137
|
+
return PAGING2;
|
|
138
|
+
})(PAGING || {});
|
|
139
|
+
var LoadParents = /* @__PURE__ */ ((LoadParents2) => {
|
|
140
|
+
LoadParents2["Yes"] = "Yes";
|
|
141
|
+
LoadParents2["No"] = "No";
|
|
142
|
+
LoadParents2["Custom"] = "Custom";
|
|
143
|
+
return LoadParents2;
|
|
144
|
+
})(LoadParents || {});
|
|
145
|
+
var LoadChild = /* @__PURE__ */ ((LoadChild2) => {
|
|
146
|
+
LoadChild2["No"] = "No";
|
|
147
|
+
LoadChild2["Yes"] = "Yes";
|
|
148
|
+
LoadChild2["Count"] = "Count";
|
|
149
|
+
LoadChild2["Custom"] = "Custom";
|
|
150
|
+
LoadChild2["Direct"] = "Direct";
|
|
151
|
+
return LoadChild2;
|
|
152
|
+
})(LoadChild || {});
|
|
153
|
+
var LoadChildCount = /* @__PURE__ */ ((LoadChildCount2) => {
|
|
154
|
+
LoadChildCount2["No"] = "No";
|
|
155
|
+
LoadChildCount2["Yes"] = "Yes";
|
|
156
|
+
LoadChildCount2["Custom"] = "Custom";
|
|
157
|
+
return LoadChildCount2;
|
|
158
|
+
})(LoadChildCount || {});
|
|
159
|
+
var OrderBy = /* @__PURE__ */ ((OrderBy2) => {
|
|
160
|
+
OrderBy2["asc"] = "asc";
|
|
161
|
+
OrderBy2["desc"] = "desc";
|
|
162
|
+
return OrderBy2;
|
|
163
|
+
})(OrderBy || {});
|
|
164
|
+
var LoginFrom = /* @__PURE__ */ ((LoginFrom2) => {
|
|
165
|
+
LoginFrom2["Web"] = "Web";
|
|
166
|
+
LoginFrom2["Android"] = "Android";
|
|
167
|
+
LoginFrom2["IPhone"] = "IPhone";
|
|
168
|
+
return LoginFrom2;
|
|
169
|
+
})(LoginFrom || {});
|
|
170
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
171
|
+
Status2["Active"] = "Active";
|
|
172
|
+
Status2["Inactive"] = "Inactive";
|
|
173
|
+
return Status2;
|
|
174
|
+
})(Status || {});
|
|
175
|
+
var YesNo = /* @__PURE__ */ ((YesNo2) => {
|
|
176
|
+
YesNo2["Yes"] = "Yes";
|
|
177
|
+
YesNo2["No"] = "No";
|
|
178
|
+
return YesNo2;
|
|
179
|
+
})(YesNo || {});
|
|
180
|
+
|
|
181
|
+
// src/zod_utils/zod_base_schema.ts
|
|
182
|
+
var OrderBySchema = z2.array(
|
|
183
|
+
z2.object({
|
|
184
|
+
name: stringMandatory("Order Field Name", 0, 255),
|
|
185
|
+
field: stringMandatory("Order Field Name", 0, 255),
|
|
186
|
+
direction: enumMandatory("Order Direction", OrderBy, "asc" /* asc */)
|
|
187
|
+
})
|
|
188
|
+
);
|
|
189
|
+
var BaseQuerySchema = z2.object({
|
|
190
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
191
|
+
status: enumArrayOptional("Status", Status, getAllEnums(Status), 0, 10, true),
|
|
192
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
193
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
194
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
195
|
+
load_parents: enumOptional("Load Parents", LoadParents, "No" /* No */),
|
|
196
|
+
load_parents_list: stringArrayOptional("Load Parents List"),
|
|
197
|
+
load_child: enumOptional("Load Child", LoadChild, "No" /* No */),
|
|
198
|
+
load_child_list: stringArrayOptional("Load Child List"),
|
|
199
|
+
load_child_count: enumOptional(
|
|
200
|
+
"Load Child",
|
|
201
|
+
LoadChildCount,
|
|
202
|
+
"No" /* No */
|
|
203
|
+
),
|
|
204
|
+
load_child_count_list: stringArrayOptional("Load Child List"),
|
|
205
|
+
include_details: dynamicJsonSchema("Include Details", {}),
|
|
206
|
+
where_relations: dynamicJsonSchema("Where Relations", {}),
|
|
207
|
+
order_by: OrderBySchema.optional().default([]),
|
|
208
|
+
include_master_data: enumOptional("Include Master Data", YesNo, "No" /* No */),
|
|
209
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
210
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
211
|
+
});
|
|
212
|
+
var MongoBaseQuerySchema = z2.object({
|
|
213
|
+
search: stringOptional("Search", 0, 255, ""),
|
|
214
|
+
paging: enumOptional("Paging", PAGING, "Yes" /* Yes */),
|
|
215
|
+
page_count: numberOptional("Page Count", 0, 1e3, 100),
|
|
216
|
+
page_index: numberOptional("Page Index", 0, 1e3, 0),
|
|
217
|
+
login_from: enumMandatory("Login From", LoginFrom, "Web" /* Web */),
|
|
218
|
+
date_format_id: single_select_optional("MasterMainDateFormat"),
|
|
219
|
+
// ✅ Single-selection -> MasterMainDateFormat
|
|
220
|
+
time_zone_id: single_select_optional("MasterMainTimeZone")
|
|
221
|
+
// ✅ Single-selection -> MasterMainTimeZone
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// src/services/master/expense/master_vendor_document_type_service.ts
|
|
225
|
+
var URL = "master/expense/vendor_document_type";
|
|
226
|
+
var ENDPOINTS = {
|
|
227
|
+
find: `${URL}/search`,
|
|
228
|
+
create: URL,
|
|
229
|
+
update: (id) => `${URL}/${id}`,
|
|
230
|
+
delete: (id) => `${URL}/${id}`,
|
|
231
|
+
cache: (organisation_id) => `${URL}/cache/${organisation_id}`
|
|
232
|
+
};
|
|
233
|
+
var MasterVendorDocumentTypeSchema = z3.object({
|
|
234
|
+
organisation_id: single_select_mandatory("Organisation"),
|
|
235
|
+
// ✅ Single-selection -> UserOrganisation
|
|
236
|
+
document_type: stringMandatory("Document Type", 3, 100),
|
|
237
|
+
description: stringOptional("Description", 0, 100),
|
|
238
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
239
|
+
});
|
|
240
|
+
var MasterVendorDocumentTypeQuerySchema = BaseQuerySchema.extend({
|
|
241
|
+
organisation_ids: multi_select_optional("Organisation"),
|
|
242
|
+
// ✅ Multi-selection -> UserOrganisation
|
|
243
|
+
document_type_ids: multi_select_optional("Document Type")
|
|
244
|
+
// ✅ Multi-selection -> MasterVendorDocumentType
|
|
245
|
+
});
|
|
246
|
+
var toMasterVendorDocumentTypePayload = (masterVendorDocumentType) => ({
|
|
247
|
+
organisation_id: masterVendorDocumentType.organisation_id ?? "",
|
|
248
|
+
document_type: masterVendorDocumentType.document_type,
|
|
249
|
+
description: masterVendorDocumentType.description ?? "",
|
|
250
|
+
status: masterVendorDocumentType.status
|
|
251
|
+
});
|
|
252
|
+
var newMasterVendorDocumentTypePayload = () => ({
|
|
253
|
+
organisation_id: "",
|
|
254
|
+
document_type: "",
|
|
255
|
+
description: "",
|
|
256
|
+
status: "Active" /* Active */
|
|
257
|
+
});
|
|
258
|
+
var findMasterVendorDocumentTypes = async (data) => {
|
|
259
|
+
return apiPost(
|
|
260
|
+
ENDPOINTS.find,
|
|
261
|
+
data
|
|
262
|
+
);
|
|
263
|
+
};
|
|
264
|
+
var createMasterVendorDocumentType = async (data) => {
|
|
265
|
+
return apiPost(ENDPOINTS.create, data);
|
|
266
|
+
};
|
|
267
|
+
var updateMasterVendorDocumentType = async (id, data) => {
|
|
268
|
+
return apiPatch(ENDPOINTS.update(id), data);
|
|
269
|
+
};
|
|
270
|
+
var deleteMasterVendorDocumentType = async (id) => {
|
|
271
|
+
return apiDelete(ENDPOINTS.delete(id));
|
|
272
|
+
};
|
|
273
|
+
var getMasterVendorDocumentTypeCache = async (organisation_id) => {
|
|
274
|
+
return apiGet(ENDPOINTS.cache(organisation_id));
|
|
275
|
+
};
|
|
276
|
+
export {
|
|
277
|
+
MasterVendorDocumentTypeQuerySchema,
|
|
278
|
+
MasterVendorDocumentTypeSchema,
|
|
279
|
+
createMasterVendorDocumentType,
|
|
280
|
+
deleteMasterVendorDocumentType,
|
|
281
|
+
findMasterVendorDocumentTypes,
|
|
282
|
+
getMasterVendorDocumentTypeCache,
|
|
283
|
+
newMasterVendorDocumentTypePayload,
|
|
284
|
+
toMasterVendorDocumentTypePayload,
|
|
285
|
+
updateMasterVendorDocumentType
|
|
286
|
+
};
|
|
@@ -15,12 +15,12 @@ declare const MasterMainEwayBillProviderSchema: z.ZodObject<{
|
|
|
15
15
|
provider_code: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
16
16
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
status: Status;
|
|
18
19
|
provider_name: string;
|
|
19
20
|
provider_code: string;
|
|
20
|
-
status: Status;
|
|
21
21
|
}, {
|
|
22
|
-
provider_name: string;
|
|
23
22
|
status: Status;
|
|
23
|
+
provider_name: string;
|
|
24
24
|
provider_code?: string | undefined;
|
|
25
25
|
}>;
|
|
26
26
|
type MasterMainEwayBillProviderDTO = z.infer<typeof MasterMainEwayBillProviderSchema>;
|
|
@@ -15,12 +15,12 @@ declare const MasterMainFasttagSchema: z.ZodObject<{
|
|
|
15
15
|
bank_code: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
16
16
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
status: Status;
|
|
19
18
|
bank_name: string;
|
|
20
19
|
bank_code: string;
|
|
21
|
-
}, {
|
|
22
20
|
status: Status;
|
|
21
|
+
}, {
|
|
23
22
|
bank_name: string;
|
|
23
|
+
status: Status;
|
|
24
24
|
bank_code?: string | undefined;
|
|
25
25
|
}>;
|
|
26
26
|
type MasterMainFasttagDTO = z.infer<typeof MasterMainFasttagSchema>;
|
|
@@ -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;
|
|
@@ -19,11 +19,11 @@ declare const StaticPageSchema: z.ZodObject<{
|
|
|
19
19
|
page_content: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
20
20
|
status: z.ZodType<Status, z.ZodTypeDef, Status>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
status: Status;
|
|
23
22
|
page_name: string;
|
|
24
23
|
page_code: string;
|
|
25
24
|
page_url: string;
|
|
26
25
|
page_content: string;
|
|
26
|
+
status: Status;
|
|
27
27
|
}, {
|
|
28
28
|
status: Status;
|
|
29
29
|
page_name?: string | undefined;
|
package/package.json
CHANGED