repzo 1.0.229 → 1.0.231
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/lib/index.d.ts +29 -0
- package/lib/index.js +65 -0
- package/lib/types/index.d.ts +490 -1
- package/package.json +1 -1
- package/src/index.ts +168 -0
- package/src/types/index.ts +555 -1
package/lib/index.d.ts
CHANGED
|
@@ -38,6 +38,9 @@ export declare const end_points: {
|
|
|
38
38
|
readonly VISIT: "visit";
|
|
39
39
|
readonly INVOICE: "fullinvoices";
|
|
40
40
|
readonly PROFORMA: "proforma";
|
|
41
|
+
readonly PRINT_SETTINGS: "print-settings";
|
|
42
|
+
readonly PDF_TEMPLATE_GALLERY: "pdf-template-gallery";
|
|
43
|
+
readonly PDF_TEMPLATE: "pdf-template";
|
|
41
44
|
readonly PAYMENT: "payments";
|
|
42
45
|
readonly REFUND: "refund";
|
|
43
46
|
readonly SETTLEMENT: "settlement";
|
|
@@ -165,6 +168,9 @@ export default class Repzo {
|
|
|
165
168
|
readonly VISIT: "visit";
|
|
166
169
|
readonly INVOICE: "fullinvoices";
|
|
167
170
|
readonly PROFORMA: "proforma";
|
|
171
|
+
readonly PRINT_SETTINGS: "print-settings";
|
|
172
|
+
readonly PDF_TEMPLATE_GALLERY: "pdf-template-gallery";
|
|
173
|
+
readonly PDF_TEMPLATE: "pdf-template";
|
|
168
174
|
readonly PAYMENT: "payments";
|
|
169
175
|
readonly REFUND: "refund";
|
|
170
176
|
readonly SETTLEMENT: "settlement";
|
|
@@ -1130,4 +1136,27 @@ export default class Repzo {
|
|
|
1130
1136
|
_path: "compare-invoice-to-warehouse";
|
|
1131
1137
|
find: (params?: Service.CompareInvoiceToWarehouse.Find.Params) => Promise<Service.CompareInvoiceToWarehouse.Find.Result>;
|
|
1132
1138
|
};
|
|
1139
|
+
printSettings: {
|
|
1140
|
+
_path: "print-settings";
|
|
1141
|
+
find: (params?: Service.PrintSetting.Find.Params) => Promise<Service.PrintSetting.Find.Result>;
|
|
1142
|
+
get: (id: Service.PrintSetting.Get.ID) => Promise<Service.PrintSetting.Get.Result>;
|
|
1143
|
+
create: (body: Service.PrintSetting.Create.Body) => Promise<Service.PrintSetting.Create.Result>;
|
|
1144
|
+
update: (id: Service.PrintSetting.Update.ID, body: Service.PrintSetting.Update.Body) => Promise<Service.PrintSetting.Update.Result>;
|
|
1145
|
+
};
|
|
1146
|
+
pdfTemplateGallery: {
|
|
1147
|
+
_path: "pdf-template-gallery";
|
|
1148
|
+
find: (params?: Service.PdfTemplateGallery.Find.Params) => Promise<Service.PdfTemplateGallery.Find.Result>;
|
|
1149
|
+
get: (id: Service.PdfTemplateGallery.Get.ID, params?: Service.PdfTemplateGallery.Get.Params) => Promise<Service.PdfTemplateGallery.Get.Result>;
|
|
1150
|
+
create: (body: Service.PdfTemplateGallery.Create.Body) => Promise<Service.PdfTemplateGallery.Create.Result>;
|
|
1151
|
+
update: (id: Service.PdfTemplateGallery.Update.ID, body: Service.PdfTemplateGallery.Update.Body) => Promise<Service.PdfTemplateGallery.Update.Result>;
|
|
1152
|
+
remove: (id: Service.PdfTemplateGallery.Remove.ID) => Promise<Service.PdfTemplateGallery.Remove.Result>;
|
|
1153
|
+
};
|
|
1154
|
+
pdfTemplate: {
|
|
1155
|
+
_path: "pdf-template";
|
|
1156
|
+
find: (params?: Service.PdfTemplate.Find.Params) => Promise<Service.PdfTemplate.Find.Result>;
|
|
1157
|
+
get: (id: Service.PdfTemplate.Get.ID, params?: Service.PdfTemplate.Get.Params) => Promise<Service.PdfTemplate.Get.Result>;
|
|
1158
|
+
create: (body: Service.PdfTemplate.Create.Body) => Promise<Service.PdfTemplate.Create.Result>;
|
|
1159
|
+
update: (id: Service.PdfTemplate.Update.ID, body: Service.PdfTemplate.Update.Body) => Promise<Service.PdfTemplate.Update.Result>;
|
|
1160
|
+
remove: (id: Service.PdfTemplate.Remove.ID) => Promise<Service.PdfTemplate.Remove.Result>;
|
|
1161
|
+
};
|
|
1133
1162
|
}
|
package/lib/index.js
CHANGED
|
@@ -39,6 +39,9 @@ export const end_points = {
|
|
|
39
39
|
VISIT: "visit",
|
|
40
40
|
INVOICE: "fullinvoices",
|
|
41
41
|
PROFORMA: "proforma",
|
|
42
|
+
PRINT_SETTINGS: "print-settings",
|
|
43
|
+
PDF_TEMPLATE_GALLERY: "pdf-template-gallery",
|
|
44
|
+
PDF_TEMPLATE: "pdf-template",
|
|
42
45
|
PAYMENT: "payments",
|
|
43
46
|
REFUND: "refund",
|
|
44
47
|
SETTLEMENT: "settlement",
|
|
@@ -2317,6 +2320,68 @@ class Repzo {
|
|
|
2317
2320
|
return res;
|
|
2318
2321
|
},
|
|
2319
2322
|
};
|
|
2323
|
+
this.printSettings = {
|
|
2324
|
+
_path: Repzo._end_points.PRINT_SETTINGS,
|
|
2325
|
+
find: async (params) => {
|
|
2326
|
+
let res = await this._fetch(this.svAPIEndpoint, this.printSettings._path, params);
|
|
2327
|
+
return res;
|
|
2328
|
+
},
|
|
2329
|
+
get: async (id) => {
|
|
2330
|
+
return await this._fetch(this.svAPIEndpoint, this.printSettings._path + `/${id}`);
|
|
2331
|
+
},
|
|
2332
|
+
create: async (body) => {
|
|
2333
|
+
let res = await this._create(this.svAPIEndpoint, this.printSettings._path, body);
|
|
2334
|
+
return res;
|
|
2335
|
+
},
|
|
2336
|
+
update: async (id, body) => {
|
|
2337
|
+
let res = await this._update(this.svAPIEndpoint, this.printSettings._path + `/${id}`, body);
|
|
2338
|
+
return res;
|
|
2339
|
+
},
|
|
2340
|
+
};
|
|
2341
|
+
this.pdfTemplateGallery = {
|
|
2342
|
+
_path: Repzo._end_points.PDF_TEMPLATE_GALLERY,
|
|
2343
|
+
find: async (params) => {
|
|
2344
|
+
let res = await this._fetch(this.svAPIEndpoint, this.pdfTemplateGallery._path, params);
|
|
2345
|
+
return res;
|
|
2346
|
+
},
|
|
2347
|
+
get: async (id, params) => {
|
|
2348
|
+
return await this._fetch(this.svAPIEndpoint, this.pdfTemplateGallery._path + `/${id}`, params);
|
|
2349
|
+
},
|
|
2350
|
+
create: async (body) => {
|
|
2351
|
+
let res = await this._create(this.svAPIEndpoint, this.pdfTemplateGallery._path, body);
|
|
2352
|
+
return res;
|
|
2353
|
+
},
|
|
2354
|
+
update: async (id, body) => {
|
|
2355
|
+
let res = await this._update(this.svAPIEndpoint, this.pdfTemplateGallery._path + `/${id}`, body);
|
|
2356
|
+
return res;
|
|
2357
|
+
},
|
|
2358
|
+
remove: async (id) => {
|
|
2359
|
+
let res = await this._delete(this.svAPIEndpoint, this.pdfTemplateGallery._path + `/${id}`);
|
|
2360
|
+
return res;
|
|
2361
|
+
},
|
|
2362
|
+
};
|
|
2363
|
+
this.pdfTemplate = {
|
|
2364
|
+
_path: Repzo._end_points.PDF_TEMPLATE,
|
|
2365
|
+
find: async (params) => {
|
|
2366
|
+
let res = await this._fetch(this.svAPIEndpoint, this.pdfTemplate._path, params);
|
|
2367
|
+
return res;
|
|
2368
|
+
},
|
|
2369
|
+
get: async (id, params) => {
|
|
2370
|
+
return await this._fetch(this.svAPIEndpoint, this.pdfTemplate._path + `/${id}`, params);
|
|
2371
|
+
},
|
|
2372
|
+
create: async (body) => {
|
|
2373
|
+
let res = await this._create(this.svAPIEndpoint, this.pdfTemplate._path, body);
|
|
2374
|
+
return res;
|
|
2375
|
+
},
|
|
2376
|
+
update: async (id, body) => {
|
|
2377
|
+
let res = await this._update(this.svAPIEndpoint, this.pdfTemplate._path + `/${id}`, body);
|
|
2378
|
+
return res;
|
|
2379
|
+
},
|
|
2380
|
+
remove: async (id) => {
|
|
2381
|
+
let res = await this._delete(this.svAPIEndpoint, this.pdfTemplate._path + `/${id}`);
|
|
2382
|
+
return res;
|
|
2383
|
+
},
|
|
2384
|
+
};
|
|
2320
2385
|
this.svAPIEndpoint =
|
|
2321
2386
|
!options?.env || options?.env == "production"
|
|
2322
2387
|
? "https://sv.api.repzo.me"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -240,7 +240,8 @@ export interface CalendarWeeklyGroup {
|
|
|
240
240
|
}
|
|
241
241
|
export type Model = "quickConvertToPdf" | "warehouses" | "transfers" | "transactions" | "taxes" | "productvariations" | "products" | "pricelistsitems" | "pricelists" | "payments" | "ledger_payments" | "mslsales" | "mslproducts" | "measureunits" | "measureunitfamilies" | "invoicesitems" | "invoices" | "ledger_goods" | "fullinvoices" | "checks" | "clients" | "activities" | "bigReports" | "admins";
|
|
242
242
|
export type DocumentTypes = "form" | "quickConvertToPdf" | "clients" | "asset" | "assetUnit" | "workorder" | "clientLocation" | "clientContact" | "commentsThread" | "workorderRequest" | "workorderPortal" | "invoice" | "products" | "productvariations" | "representatives" | "productcategories" | "productSubCategory" | "speciality" | "line" | "banner" | "intgAvailableApps" | "availability_msl" | "reminders" | "audits" | "availability" | "photos" | "planogram" | "tasks" | "checks" | "notificationsCenter" | "admins" | "settings" | "printWorkorderPortalLink" | "bulkExport" | "generateRule" | "scheduleEmail" | "custom-list-item" | "days" | "bulkImport" | "sv.activitiesstorechecks" | "retailExecutionPreset" | "paymentMethod" | "approvalRequest" | "activityFormV2Result" | "formV2" | "payments" | "ocrInvoiceJob" | "contract" | "contractInstallment" | "form" | "paymentMethod" | "aiObjectDetectionModelVersion" | "aiObjectDetectionTask" | "assetPart" | "assetPartReceival" | "assetPartUnit" | "returnAssetPartUnit" | "storeAssetPartUnit" | "activityAiSalesOrder" | "ocrInvoiceJobGroup";
|
|
243
|
-
export type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
|
|
243
|
+
export type PrintTypes = "workorder" | "form" | "invoice" | "proforma" | "settlement" | "formV2";
|
|
244
|
+
export type InvoiceFontStyles = "InvoiceHeaderTitle" | "InvoiceTaxNumber" | "InvoiceType" | "InvoiceInfo" | "ItemsHeader" | "ItemLabel" | "ItemValue" | "ItemVariant" | "TotalItemsQty" | "TotalAmount" | "RepReciver" | "Address" | "PrintTime" | "InvoiceHeader" | "ClientBalance";
|
|
244
245
|
type Granularity = "Year" | "Year Month" | "Year Week" | "Month" | "Year Month Day" | "Year Month Day Time" | "Year Month Day Time Offset";
|
|
245
246
|
export interface MediaDoc {
|
|
246
247
|
_id?: string;
|
|
@@ -17038,6 +17039,494 @@ export declare namespace Service {
|
|
|
17038
17039
|
}
|
|
17039
17040
|
}
|
|
17040
17041
|
}
|
|
17042
|
+
namespace PrintSetting {
|
|
17043
|
+
type ImageSize = "original" | "small" | "medium" | "large" | "extra";
|
|
17044
|
+
type QrCodeSize = "small" | "medium" | "large";
|
|
17045
|
+
type Alignment = "right" | "left" | "center";
|
|
17046
|
+
interface InvoiceFontsWithSizes {
|
|
17047
|
+
style_name: InvoiceFontStyles;
|
|
17048
|
+
size: number;
|
|
17049
|
+
}
|
|
17050
|
+
interface ItemImage {
|
|
17051
|
+
view_item_image?: boolean;
|
|
17052
|
+
item_image_source?: "variant" | "product";
|
|
17053
|
+
item_image_size?: ImageSize;
|
|
17054
|
+
}
|
|
17055
|
+
interface User {
|
|
17056
|
+
_id: string;
|
|
17057
|
+
type: "admin" | "rep";
|
|
17058
|
+
name?: string;
|
|
17059
|
+
admin?: string;
|
|
17060
|
+
}
|
|
17061
|
+
interface WorkorderBasicDetails {
|
|
17062
|
+
creator?: boolean;
|
|
17063
|
+
workorder_categories?: boolean;
|
|
17064
|
+
client_name?: boolean;
|
|
17065
|
+
description?: boolean;
|
|
17066
|
+
local_name?: boolean;
|
|
17067
|
+
client_location?: boolean;
|
|
17068
|
+
assigned_to?: boolean;
|
|
17069
|
+
media?: boolean;
|
|
17070
|
+
cover_photo?: boolean;
|
|
17071
|
+
status?: boolean;
|
|
17072
|
+
assets?: boolean;
|
|
17073
|
+
asset_units?: boolean;
|
|
17074
|
+
priority_human?: boolean;
|
|
17075
|
+
due_date?: boolean;
|
|
17076
|
+
start_date?: boolean;
|
|
17077
|
+
forms?: boolean;
|
|
17078
|
+
comments?: boolean;
|
|
17079
|
+
createdAt?: boolean;
|
|
17080
|
+
}
|
|
17081
|
+
interface WorkorderClientDetails {
|
|
17082
|
+
withClientDetails?: boolean;
|
|
17083
|
+
basicClientDetails?: {
|
|
17084
|
+
client_code?: boolean;
|
|
17085
|
+
client_local_name?: boolean;
|
|
17086
|
+
client_tags?: boolean;
|
|
17087
|
+
area_tags?: boolean;
|
|
17088
|
+
client_channel?: boolean;
|
|
17089
|
+
is_chain?: boolean;
|
|
17090
|
+
teams?: boolean;
|
|
17091
|
+
product_groups?: boolean;
|
|
17092
|
+
contacts?: boolean;
|
|
17093
|
+
createdAt?: boolean;
|
|
17094
|
+
customFields?: boolean;
|
|
17095
|
+
};
|
|
17096
|
+
sales?: {
|
|
17097
|
+
price_list?: boolean;
|
|
17098
|
+
payment_type?: boolean;
|
|
17099
|
+
credit_limit?: boolean;
|
|
17100
|
+
payment_term?: boolean;
|
|
17101
|
+
};
|
|
17102
|
+
contact_info?: {
|
|
17103
|
+
contact_name?: boolean;
|
|
17104
|
+
client_info?: boolean;
|
|
17105
|
+
email?: boolean;
|
|
17106
|
+
website?: boolean;
|
|
17107
|
+
};
|
|
17108
|
+
}
|
|
17109
|
+
interface WorkorderAssetDetails {
|
|
17110
|
+
withAssetsDetails?: boolean;
|
|
17111
|
+
media?: boolean;
|
|
17112
|
+
local_name?: boolean;
|
|
17113
|
+
description?: boolean;
|
|
17114
|
+
asset_types?: boolean;
|
|
17115
|
+
location?: boolean;
|
|
17116
|
+
model?: boolean;
|
|
17117
|
+
manufacturer?: boolean;
|
|
17118
|
+
year?: boolean;
|
|
17119
|
+
barcode?: boolean;
|
|
17120
|
+
customFields?: boolean;
|
|
17121
|
+
createdAt?: boolean;
|
|
17122
|
+
cover_photo?: boolean;
|
|
17123
|
+
}
|
|
17124
|
+
interface WorkorderAssetUnitDetails {
|
|
17125
|
+
withAssetUnitsDetails?: boolean;
|
|
17126
|
+
media?: boolean;
|
|
17127
|
+
local_name?: boolean;
|
|
17128
|
+
description?: boolean;
|
|
17129
|
+
serial_number?: boolean;
|
|
17130
|
+
asset?: boolean;
|
|
17131
|
+
location?: boolean;
|
|
17132
|
+
customFields?: boolean;
|
|
17133
|
+
createdAt?: boolean;
|
|
17134
|
+
cover_photo?: boolean;
|
|
17135
|
+
}
|
|
17136
|
+
interface WorkorderDetails {
|
|
17137
|
+
document_type: "workorder";
|
|
17138
|
+
number_of_comments?: number;
|
|
17139
|
+
compressed_media_size?: ImageSize;
|
|
17140
|
+
basicDetails?: WorkorderBasicDetails;
|
|
17141
|
+
clientDetails?: WorkorderClientDetails;
|
|
17142
|
+
assetDetails?: WorkorderAssetDetails;
|
|
17143
|
+
assetUnitDetails?: WorkorderAssetUnitDetails;
|
|
17144
|
+
}
|
|
17145
|
+
interface FormResultDetails {
|
|
17146
|
+
document_type: "form";
|
|
17147
|
+
compressed_media_size?: ImageSize;
|
|
17148
|
+
}
|
|
17149
|
+
interface InvoiceBasicDetails {
|
|
17150
|
+
created_at?: boolean;
|
|
17151
|
+
created_by?: boolean;
|
|
17152
|
+
tax_number?: boolean;
|
|
17153
|
+
name_on_invoice?: boolean;
|
|
17154
|
+
client_code?: boolean;
|
|
17155
|
+
client_name?: boolean;
|
|
17156
|
+
client_local_name?: boolean;
|
|
17157
|
+
client_address?: boolean;
|
|
17158
|
+
client_phone?: boolean;
|
|
17159
|
+
client_tax_number?: boolean;
|
|
17160
|
+
client_cell_phone?: boolean;
|
|
17161
|
+
issue_date?: boolean;
|
|
17162
|
+
due_date?: boolean;
|
|
17163
|
+
invoice_status?: boolean;
|
|
17164
|
+
company_logo?: boolean;
|
|
17165
|
+
serial_number?: boolean;
|
|
17166
|
+
advanced_serial_number?: boolean;
|
|
17167
|
+
external_serial_number?: boolean;
|
|
17168
|
+
comment?: boolean;
|
|
17169
|
+
qr_code?: boolean;
|
|
17170
|
+
custom_status?: boolean;
|
|
17171
|
+
payments_data?: boolean;
|
|
17172
|
+
media?: boolean;
|
|
17173
|
+
address?: boolean;
|
|
17174
|
+
remaining_balance?: boolean;
|
|
17175
|
+
invoice_header?: string;
|
|
17176
|
+
invoice_notes?: string;
|
|
17177
|
+
client_balance?: boolean;
|
|
17178
|
+
origin_serial_number?: boolean;
|
|
17179
|
+
origin_advanced_serial_number?: boolean;
|
|
17180
|
+
workorder_serial_number?: boolean;
|
|
17181
|
+
workorder_name?: boolean;
|
|
17182
|
+
workorder_local_name?: boolean;
|
|
17183
|
+
total_items_base_unit_qty?: boolean;
|
|
17184
|
+
total_items_qty?: boolean;
|
|
17185
|
+
total_return_items_base_unit_qty?: boolean;
|
|
17186
|
+
total_return_items_qty?: boolean;
|
|
17187
|
+
}
|
|
17188
|
+
interface InvoiceLineItemDetails {
|
|
17189
|
+
sku?: boolean;
|
|
17190
|
+
barcode?: boolean;
|
|
17191
|
+
product_name?: boolean;
|
|
17192
|
+
variant_name?: boolean;
|
|
17193
|
+
measureunit?: boolean;
|
|
17194
|
+
qty?: boolean;
|
|
17195
|
+
price?: boolean;
|
|
17196
|
+
discount_amount?: boolean;
|
|
17197
|
+
line_total?: boolean;
|
|
17198
|
+
return_reason?: boolean;
|
|
17199
|
+
base_unit_qty?: boolean;
|
|
17200
|
+
original_price?: boolean;
|
|
17201
|
+
total_original_price?: boolean;
|
|
17202
|
+
item_image?: ItemImage;
|
|
17203
|
+
batch_number?: boolean;
|
|
17204
|
+
batch_expiry?: boolean;
|
|
17205
|
+
batch_qty?: boolean;
|
|
17206
|
+
}
|
|
17207
|
+
interface InvoiceMobileDetails {
|
|
17208
|
+
logo_height?: number | string;
|
|
17209
|
+
logo_width?: number | string;
|
|
17210
|
+
align_logo?: Alignment;
|
|
17211
|
+
align_invoice_header?: Alignment;
|
|
17212
|
+
font_styles?: InvoiceFontsWithSizes[];
|
|
17213
|
+
hide_invoice_payment_type?: boolean;
|
|
17214
|
+
invoice_header?: string;
|
|
17215
|
+
client_balance?: boolean;
|
|
17216
|
+
}
|
|
17217
|
+
interface InvoiceDetails {
|
|
17218
|
+
document_type: "invoice";
|
|
17219
|
+
compressed_media_size?: ImageSize;
|
|
17220
|
+
logo_size?: ImageSize;
|
|
17221
|
+
qr_code_size?: QrCodeSize;
|
|
17222
|
+
basicDetails?: InvoiceBasicDetails;
|
|
17223
|
+
lineItemDetails?: InvoiceLineItemDetails;
|
|
17224
|
+
mobileDetails?: InvoiceMobileDetails;
|
|
17225
|
+
}
|
|
17226
|
+
interface ProformaBasicDetails {
|
|
17227
|
+
created_at?: boolean;
|
|
17228
|
+
created_by?: boolean;
|
|
17229
|
+
tax_number?: boolean;
|
|
17230
|
+
name_on_invoice?: boolean;
|
|
17231
|
+
client_code?: boolean;
|
|
17232
|
+
client_name?: boolean;
|
|
17233
|
+
client_local_name?: boolean;
|
|
17234
|
+
client_address?: boolean;
|
|
17235
|
+
client_phone?: boolean;
|
|
17236
|
+
client_tax_number?: boolean;
|
|
17237
|
+
client_cell_phone?: boolean;
|
|
17238
|
+
issue_date?: boolean;
|
|
17239
|
+
order_status?: boolean;
|
|
17240
|
+
company_logo?: boolean;
|
|
17241
|
+
serial_number?: boolean;
|
|
17242
|
+
external_serial_number?: boolean;
|
|
17243
|
+
comment?: boolean;
|
|
17244
|
+
custom_status?: boolean;
|
|
17245
|
+
media?: boolean;
|
|
17246
|
+
address?: boolean;
|
|
17247
|
+
invoice_header?: string;
|
|
17248
|
+
invoice_notes?: string;
|
|
17249
|
+
total_items_base_unit_qty?: boolean;
|
|
17250
|
+
total_items_qty?: boolean;
|
|
17251
|
+
total_return_items_base_unit_qty?: boolean;
|
|
17252
|
+
total_return_items_qty?: boolean;
|
|
17253
|
+
}
|
|
17254
|
+
interface ProformaLineItemDetails {
|
|
17255
|
+
product_name?: boolean;
|
|
17256
|
+
variant_name?: boolean;
|
|
17257
|
+
sku?: boolean;
|
|
17258
|
+
barcode?: boolean;
|
|
17259
|
+
measureunit?: boolean;
|
|
17260
|
+
qty?: boolean;
|
|
17261
|
+
price?: boolean;
|
|
17262
|
+
line_total?: boolean;
|
|
17263
|
+
note?: boolean;
|
|
17264
|
+
base_unit_qty?: boolean;
|
|
17265
|
+
item_image?: ItemImage;
|
|
17266
|
+
return_reason?: boolean;
|
|
17267
|
+
original_price?: boolean;
|
|
17268
|
+
total_original_price?: boolean;
|
|
17269
|
+
batch_number?: boolean;
|
|
17270
|
+
batch_expiry?: boolean;
|
|
17271
|
+
batch_qty?: boolean;
|
|
17272
|
+
}
|
|
17273
|
+
interface ProformaMobileDetails {
|
|
17274
|
+
logo_height?: number | string;
|
|
17275
|
+
logo_width?: number | string;
|
|
17276
|
+
align_logo?: Alignment;
|
|
17277
|
+
font_styles?: InvoiceFontsWithSizes[];
|
|
17278
|
+
align_invoice_header?: Alignment;
|
|
17279
|
+
hide_invoice_payment_type?: boolean;
|
|
17280
|
+
invoice_header?: string;
|
|
17281
|
+
}
|
|
17282
|
+
interface ProformaDetails {
|
|
17283
|
+
document_type: "proforma";
|
|
17284
|
+
compressed_media_size?: ImageSize;
|
|
17285
|
+
logo_size?: ImageSize;
|
|
17286
|
+
basicDetails?: ProformaBasicDetails;
|
|
17287
|
+
lineItemDetails?: ProformaLineItemDetails;
|
|
17288
|
+
mobileDetails?: ProformaMobileDetails;
|
|
17289
|
+
}
|
|
17290
|
+
interface SettlementBasicDetails {
|
|
17291
|
+
creator?: boolean;
|
|
17292
|
+
settlement_date?: boolean;
|
|
17293
|
+
company_logo?: boolean;
|
|
17294
|
+
serial_number?: boolean;
|
|
17295
|
+
note?: boolean;
|
|
17296
|
+
amount?: boolean;
|
|
17297
|
+
payment_type?: boolean;
|
|
17298
|
+
checks?: boolean;
|
|
17299
|
+
rep?: boolean;
|
|
17300
|
+
totals?: boolean;
|
|
17301
|
+
media?: boolean;
|
|
17302
|
+
}
|
|
17303
|
+
interface SettlementCheckDetails {
|
|
17304
|
+
bank_name?: boolean;
|
|
17305
|
+
branch_name?: boolean;
|
|
17306
|
+
drawer_name?: boolean;
|
|
17307
|
+
client_name?: boolean;
|
|
17308
|
+
check_number?: boolean;
|
|
17309
|
+
pay_time?: boolean;
|
|
17310
|
+
rep_name?: boolean;
|
|
17311
|
+
check_date?: boolean;
|
|
17312
|
+
}
|
|
17313
|
+
interface SettlementDetails {
|
|
17314
|
+
document_type: "settlement";
|
|
17315
|
+
compressed_media_size?: ImageSize;
|
|
17316
|
+
basicDetails?: SettlementBasicDetails;
|
|
17317
|
+
checkDetails?: SettlementCheckDetails;
|
|
17318
|
+
}
|
|
17319
|
+
type Details = WorkorderDetails | FormResultDetails | InvoiceDetails | ProformaDetails | SettlementDetails;
|
|
17320
|
+
interface Data {
|
|
17321
|
+
_id: string;
|
|
17322
|
+
creator: User;
|
|
17323
|
+
editor?: User;
|
|
17324
|
+
document_type: PrintTypes;
|
|
17325
|
+
details: Details;
|
|
17326
|
+
company_namespace: string[];
|
|
17327
|
+
createdAt: Date;
|
|
17328
|
+
updatedAt: Date;
|
|
17329
|
+
__v?: number;
|
|
17330
|
+
}
|
|
17331
|
+
interface CreateBody {
|
|
17332
|
+
document_type: PrintTypes;
|
|
17333
|
+
details: Details;
|
|
17334
|
+
}
|
|
17335
|
+
interface UpdateBody {
|
|
17336
|
+
details?: Partial<Details>;
|
|
17337
|
+
}
|
|
17338
|
+
namespace Find {
|
|
17339
|
+
type Params = DefaultPaginationQueryParams & {
|
|
17340
|
+
document_type?: PrintTypes | PrintTypes[];
|
|
17341
|
+
};
|
|
17342
|
+
interface Result extends DefaultPaginationResult {
|
|
17343
|
+
data: Data[];
|
|
17344
|
+
}
|
|
17345
|
+
}
|
|
17346
|
+
namespace Get {
|
|
17347
|
+
type ID = string;
|
|
17348
|
+
type Result = Data;
|
|
17349
|
+
}
|
|
17350
|
+
namespace Create {
|
|
17351
|
+
type Body = CreateBody;
|
|
17352
|
+
type Result = Data;
|
|
17353
|
+
}
|
|
17354
|
+
namespace Update {
|
|
17355
|
+
type ID = string;
|
|
17356
|
+
type Body = UpdateBody;
|
|
17357
|
+
type Result = Data;
|
|
17358
|
+
}
|
|
17359
|
+
}
|
|
17360
|
+
namespace PdfTemplateGallery {
|
|
17361
|
+
export interface Data {
|
|
17362
|
+
_id: string;
|
|
17363
|
+
html_media?: string | MediaDoc;
|
|
17364
|
+
settings?: {
|
|
17365
|
+
[key: string]: any;
|
|
17366
|
+
};
|
|
17367
|
+
cover_photo?: string | MediaDoc;
|
|
17368
|
+
name: string;
|
|
17369
|
+
locale: "en" | "ar";
|
|
17370
|
+
ai_prompt?: string;
|
|
17371
|
+
document_type: PrintTypes;
|
|
17372
|
+
disabled: boolean;
|
|
17373
|
+
createdAt: string;
|
|
17374
|
+
updatedAt: string;
|
|
17375
|
+
}
|
|
17376
|
+
export interface CreateBody {
|
|
17377
|
+
html_media?: string;
|
|
17378
|
+
settings?: {
|
|
17379
|
+
[key: string]: any;
|
|
17380
|
+
};
|
|
17381
|
+
cover_photo?: string;
|
|
17382
|
+
name: string;
|
|
17383
|
+
locale: "en" | "ar";
|
|
17384
|
+
ai_prompt?: string;
|
|
17385
|
+
document_type: PrintTypes;
|
|
17386
|
+
disabled?: boolean;
|
|
17387
|
+
}
|
|
17388
|
+
export interface UpdateBody {
|
|
17389
|
+
html_media?: string;
|
|
17390
|
+
settings?: {
|
|
17391
|
+
[key: string]: any;
|
|
17392
|
+
};
|
|
17393
|
+
cover_photo?: string;
|
|
17394
|
+
name?: string;
|
|
17395
|
+
locale?: "en" | "ar";
|
|
17396
|
+
ai_prompt?: string;
|
|
17397
|
+
document_type?: PrintTypes;
|
|
17398
|
+
}
|
|
17399
|
+
export type PopulatedDoc = Data & {
|
|
17400
|
+
html_media_populated?: MediaDoc;
|
|
17401
|
+
cover_photo_populated?: MediaDoc;
|
|
17402
|
+
};
|
|
17403
|
+
type PopulatedKeys = "html_media" | "cover_photo";
|
|
17404
|
+
export namespace Find {
|
|
17405
|
+
type Params = DefaultPaginationQueryParams & {
|
|
17406
|
+
_id?: string | string[];
|
|
17407
|
+
name?: string;
|
|
17408
|
+
locale?: "en" | "ar";
|
|
17409
|
+
document_type?: PrintTypes;
|
|
17410
|
+
disabled?: boolean;
|
|
17411
|
+
};
|
|
17412
|
+
interface Result extends DefaultPaginationResult {
|
|
17413
|
+
data: PopulatedDoc[];
|
|
17414
|
+
}
|
|
17415
|
+
}
|
|
17416
|
+
export namespace Get {
|
|
17417
|
+
type ID = string;
|
|
17418
|
+
type Params = {
|
|
17419
|
+
populatedKeys?: PopulatedKeys[];
|
|
17420
|
+
};
|
|
17421
|
+
type Result = PopulatedDoc;
|
|
17422
|
+
}
|
|
17423
|
+
export namespace Create {
|
|
17424
|
+
type Body = CreateBody;
|
|
17425
|
+
type Result = Data;
|
|
17426
|
+
}
|
|
17427
|
+
export namespace Update {
|
|
17428
|
+
type ID = string;
|
|
17429
|
+
type Body = UpdateBody;
|
|
17430
|
+
type Result = Data;
|
|
17431
|
+
}
|
|
17432
|
+
export namespace Remove {
|
|
17433
|
+
type ID = string;
|
|
17434
|
+
type Result = Data;
|
|
17435
|
+
}
|
|
17436
|
+
export {};
|
|
17437
|
+
}
|
|
17438
|
+
namespace PdfTemplate {
|
|
17439
|
+
export interface Data {
|
|
17440
|
+
_id: string;
|
|
17441
|
+
html_media?: string | MediaDoc;
|
|
17442
|
+
settings?: {
|
|
17443
|
+
[key: string]: any;
|
|
17444
|
+
};
|
|
17445
|
+
cover_photo?: string | MediaDoc;
|
|
17446
|
+
name: string;
|
|
17447
|
+
is_default: boolean;
|
|
17448
|
+
creator: AdminCreator;
|
|
17449
|
+
editor?: AdminCreator;
|
|
17450
|
+
locale: "en" | "ar";
|
|
17451
|
+
pdf_template_gallery?: string;
|
|
17452
|
+
publish_time?: number | null;
|
|
17453
|
+
document_type: PrintTypes;
|
|
17454
|
+
disabled: boolean;
|
|
17455
|
+
company_namespace: string[];
|
|
17456
|
+
createdAt: string;
|
|
17457
|
+
updatedAt: string;
|
|
17458
|
+
}
|
|
17459
|
+
export interface CreateBody {
|
|
17460
|
+
html_media?: string;
|
|
17461
|
+
settings?: {
|
|
17462
|
+
[key: string]: any;
|
|
17463
|
+
};
|
|
17464
|
+
cover_photo?: string;
|
|
17465
|
+
name: string;
|
|
17466
|
+
is_default?: boolean;
|
|
17467
|
+
locale: "en" | "ar";
|
|
17468
|
+
pdf_template_gallery?: string;
|
|
17469
|
+
publish_time?: number | null;
|
|
17470
|
+
document_type: PrintTypes;
|
|
17471
|
+
}
|
|
17472
|
+
export interface UpdateBody {
|
|
17473
|
+
html_media?: string;
|
|
17474
|
+
settings?: {
|
|
17475
|
+
[key: string]: any;
|
|
17476
|
+
};
|
|
17477
|
+
cover_photo?: string;
|
|
17478
|
+
name?: string;
|
|
17479
|
+
is_default?: boolean;
|
|
17480
|
+
locale?: "en" | "ar";
|
|
17481
|
+
pdf_template_gallery?: string;
|
|
17482
|
+
publish_time?: number | null;
|
|
17483
|
+
document_type?: PrintTypes;
|
|
17484
|
+
}
|
|
17485
|
+
export type PopulatedDoc = Data & {
|
|
17486
|
+
html_media_populated?: MediaDoc;
|
|
17487
|
+
cover_photo_populated?: MediaDoc;
|
|
17488
|
+
pdf_template_gallery_populated?: PdfTemplateGallery.Data;
|
|
17489
|
+
};
|
|
17490
|
+
type PopulatedKeys = "html_media" | "cover_photo" | "pdf_template_gallery";
|
|
17491
|
+
export namespace Find {
|
|
17492
|
+
type Params = DefaultPaginationQueryParams & {
|
|
17493
|
+
name?: string | string[];
|
|
17494
|
+
locale?: "en" | "ar" | ("en" | "ar")[];
|
|
17495
|
+
document_type?: PrintTypes | PrintTypes[];
|
|
17496
|
+
is_default?: boolean;
|
|
17497
|
+
pdf_template_gallery?: string | string[];
|
|
17498
|
+
publish_time?: number | (number | null)[];
|
|
17499
|
+
disabled?: boolean;
|
|
17500
|
+
_id?: string | string[];
|
|
17501
|
+
"creator._id"?: string | string[];
|
|
17502
|
+
"editor._id"?: string | string[];
|
|
17503
|
+
};
|
|
17504
|
+
interface Result extends DefaultPaginationResult {
|
|
17505
|
+
data: PopulatedDoc[];
|
|
17506
|
+
}
|
|
17507
|
+
}
|
|
17508
|
+
export namespace Get {
|
|
17509
|
+
type ID = string;
|
|
17510
|
+
type Params = {
|
|
17511
|
+
populatedKeys?: PopulatedKeys[];
|
|
17512
|
+
};
|
|
17513
|
+
type Result = PopulatedDoc;
|
|
17514
|
+
}
|
|
17515
|
+
export namespace Create {
|
|
17516
|
+
type Body = CreateBody;
|
|
17517
|
+
type Result = Data;
|
|
17518
|
+
}
|
|
17519
|
+
export namespace Update {
|
|
17520
|
+
type ID = string;
|
|
17521
|
+
type Body = UpdateBody;
|
|
17522
|
+
type Result = Data;
|
|
17523
|
+
}
|
|
17524
|
+
export namespace Remove {
|
|
17525
|
+
type ID = string;
|
|
17526
|
+
type Result = Data;
|
|
17527
|
+
}
|
|
17528
|
+
export {};
|
|
17529
|
+
}
|
|
17041
17530
|
}
|
|
17042
17531
|
export type StringId = string;
|
|
17043
17532
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -49,6 +49,9 @@ export const end_points = {
|
|
|
49
49
|
VISIT: "visit",
|
|
50
50
|
INVOICE: "fullinvoices",
|
|
51
51
|
PROFORMA: "proforma",
|
|
52
|
+
PRINT_SETTINGS: "print-settings",
|
|
53
|
+
PDF_TEMPLATE_GALLERY: "pdf-template-gallery",
|
|
54
|
+
PDF_TEMPLATE: "pdf-template",
|
|
52
55
|
PAYMENT: "payments",
|
|
53
56
|
REFUND: "refund",
|
|
54
57
|
SETTLEMENT: "settlement",
|
|
@@ -5896,6 +5899,171 @@ export default class Repzo {
|
|
|
5896
5899
|
return res;
|
|
5897
5900
|
},
|
|
5898
5901
|
};
|
|
5902
|
+
|
|
5903
|
+
printSettings = {
|
|
5904
|
+
_path: Repzo._end_points.PRINT_SETTINGS,
|
|
5905
|
+
|
|
5906
|
+
find: async (
|
|
5907
|
+
params?: Service.PrintSetting.Find.Params,
|
|
5908
|
+
): Promise<Service.PrintSetting.Find.Result> => {
|
|
5909
|
+
let res: Service.PrintSetting.Find.Result = await this._fetch(
|
|
5910
|
+
this.svAPIEndpoint,
|
|
5911
|
+
this.printSettings._path,
|
|
5912
|
+
params,
|
|
5913
|
+
);
|
|
5914
|
+
return res;
|
|
5915
|
+
},
|
|
5916
|
+
|
|
5917
|
+
get: async (
|
|
5918
|
+
id: Service.PrintSetting.Get.ID,
|
|
5919
|
+
): Promise<Service.PrintSetting.Get.Result> => {
|
|
5920
|
+
return await this._fetch(
|
|
5921
|
+
this.svAPIEndpoint,
|
|
5922
|
+
this.printSettings._path + `/${id}`,
|
|
5923
|
+
);
|
|
5924
|
+
},
|
|
5925
|
+
|
|
5926
|
+
create: async (
|
|
5927
|
+
body: Service.PrintSetting.Create.Body,
|
|
5928
|
+
): Promise<Service.PrintSetting.Create.Result> => {
|
|
5929
|
+
let res = await this._create(
|
|
5930
|
+
this.svAPIEndpoint,
|
|
5931
|
+
this.printSettings._path,
|
|
5932
|
+
body,
|
|
5933
|
+
);
|
|
5934
|
+
return res;
|
|
5935
|
+
},
|
|
5936
|
+
|
|
5937
|
+
update: async (
|
|
5938
|
+
id: Service.PrintSetting.Update.ID,
|
|
5939
|
+
body: Service.PrintSetting.Update.Body,
|
|
5940
|
+
): Promise<Service.PrintSetting.Update.Result> => {
|
|
5941
|
+
let res: Service.PrintSetting.Update.Result = await this._update(
|
|
5942
|
+
this.svAPIEndpoint,
|
|
5943
|
+
this.printSettings._path + `/${id}`,
|
|
5944
|
+
body,
|
|
5945
|
+
);
|
|
5946
|
+
return res;
|
|
5947
|
+
},
|
|
5948
|
+
};
|
|
5949
|
+
|
|
5950
|
+
pdfTemplateGallery = {
|
|
5951
|
+
_path: Repzo._end_points.PDF_TEMPLATE_GALLERY,
|
|
5952
|
+
|
|
5953
|
+
find: async (
|
|
5954
|
+
params?: Service.PdfTemplateGallery.Find.Params,
|
|
5955
|
+
): Promise<Service.PdfTemplateGallery.Find.Result> => {
|
|
5956
|
+
let res: Service.PdfTemplateGallery.Find.Result = await this._fetch(
|
|
5957
|
+
this.svAPIEndpoint,
|
|
5958
|
+
this.pdfTemplateGallery._path,
|
|
5959
|
+
params,
|
|
5960
|
+
);
|
|
5961
|
+
return res;
|
|
5962
|
+
},
|
|
5963
|
+
|
|
5964
|
+
get: async (
|
|
5965
|
+
id: Service.PdfTemplateGallery.Get.ID,
|
|
5966
|
+
params?: Service.PdfTemplateGallery.Get.Params,
|
|
5967
|
+
): Promise<Service.PdfTemplateGallery.Get.Result> => {
|
|
5968
|
+
return await this._fetch(
|
|
5969
|
+
this.svAPIEndpoint,
|
|
5970
|
+
this.pdfTemplateGallery._path + `/${id}`,
|
|
5971
|
+
params,
|
|
5972
|
+
);
|
|
5973
|
+
},
|
|
5974
|
+
|
|
5975
|
+
create: async (
|
|
5976
|
+
body: Service.PdfTemplateGallery.Create.Body,
|
|
5977
|
+
): Promise<Service.PdfTemplateGallery.Create.Result> => {
|
|
5978
|
+
let res = await this._create(
|
|
5979
|
+
this.svAPIEndpoint,
|
|
5980
|
+
this.pdfTemplateGallery._path,
|
|
5981
|
+
body,
|
|
5982
|
+
);
|
|
5983
|
+
return res;
|
|
5984
|
+
},
|
|
5985
|
+
|
|
5986
|
+
update: async (
|
|
5987
|
+
id: Service.PdfTemplateGallery.Update.ID,
|
|
5988
|
+
body: Service.PdfTemplateGallery.Update.Body,
|
|
5989
|
+
): Promise<Service.PdfTemplateGallery.Update.Result> => {
|
|
5990
|
+
let res: Service.PdfTemplateGallery.Update.Result = await this._update(
|
|
5991
|
+
this.svAPIEndpoint,
|
|
5992
|
+
this.pdfTemplateGallery._path + `/${id}`,
|
|
5993
|
+
body,
|
|
5994
|
+
);
|
|
5995
|
+
return res;
|
|
5996
|
+
},
|
|
5997
|
+
|
|
5998
|
+
remove: async (
|
|
5999
|
+
id: Service.PdfTemplateGallery.Remove.ID,
|
|
6000
|
+
): Promise<Service.PdfTemplateGallery.Remove.Result> => {
|
|
6001
|
+
let res: Service.PdfTemplateGallery.Remove.Result = await this._delete(
|
|
6002
|
+
this.svAPIEndpoint,
|
|
6003
|
+
this.pdfTemplateGallery._path + `/${id}`,
|
|
6004
|
+
);
|
|
6005
|
+
return res;
|
|
6006
|
+
},
|
|
6007
|
+
};
|
|
6008
|
+
|
|
6009
|
+
pdfTemplate = {
|
|
6010
|
+
_path: Repzo._end_points.PDF_TEMPLATE,
|
|
6011
|
+
|
|
6012
|
+
find: async (
|
|
6013
|
+
params?: Service.PdfTemplate.Find.Params,
|
|
6014
|
+
): Promise<Service.PdfTemplate.Find.Result> => {
|
|
6015
|
+
let res: Service.PdfTemplate.Find.Result = await this._fetch(
|
|
6016
|
+
this.svAPIEndpoint,
|
|
6017
|
+
this.pdfTemplate._path,
|
|
6018
|
+
params,
|
|
6019
|
+
);
|
|
6020
|
+
return res;
|
|
6021
|
+
},
|
|
6022
|
+
|
|
6023
|
+
get: async (
|
|
6024
|
+
id: Service.PdfTemplate.Get.ID,
|
|
6025
|
+
params?: Service.PdfTemplate.Get.Params,
|
|
6026
|
+
): Promise<Service.PdfTemplate.Get.Result> => {
|
|
6027
|
+
return await this._fetch(
|
|
6028
|
+
this.svAPIEndpoint,
|
|
6029
|
+
this.pdfTemplate._path + `/${id}`,
|
|
6030
|
+
params,
|
|
6031
|
+
);
|
|
6032
|
+
},
|
|
6033
|
+
|
|
6034
|
+
create: async (
|
|
6035
|
+
body: Service.PdfTemplate.Create.Body,
|
|
6036
|
+
): Promise<Service.PdfTemplate.Create.Result> => {
|
|
6037
|
+
let res = await this._create(
|
|
6038
|
+
this.svAPIEndpoint,
|
|
6039
|
+
this.pdfTemplate._path,
|
|
6040
|
+
body,
|
|
6041
|
+
);
|
|
6042
|
+
return res;
|
|
6043
|
+
},
|
|
6044
|
+
|
|
6045
|
+
update: async (
|
|
6046
|
+
id: Service.PdfTemplate.Update.ID,
|
|
6047
|
+
body: Service.PdfTemplate.Update.Body,
|
|
6048
|
+
): Promise<Service.PdfTemplate.Update.Result> => {
|
|
6049
|
+
let res: Service.PdfTemplate.Update.Result = await this._update(
|
|
6050
|
+
this.svAPIEndpoint,
|
|
6051
|
+
this.pdfTemplate._path + `/${id}`,
|
|
6052
|
+
body,
|
|
6053
|
+
);
|
|
6054
|
+
return res;
|
|
6055
|
+
},
|
|
6056
|
+
|
|
6057
|
+
remove: async (
|
|
6058
|
+
id: Service.PdfTemplate.Remove.ID,
|
|
6059
|
+
): Promise<Service.PdfTemplate.Remove.Result> => {
|
|
6060
|
+
let res: Service.PdfTemplate.Remove.Result = await this._delete(
|
|
6061
|
+
this.svAPIEndpoint,
|
|
6062
|
+
this.pdfTemplate._path + `/${id}`,
|
|
6063
|
+
);
|
|
6064
|
+
return res;
|
|
6065
|
+
},
|
|
6066
|
+
};
|
|
5899
6067
|
}
|
|
5900
6068
|
|
|
5901
6069
|
function normalizeParams(params: Params): { [key: string]: any } {
|
package/src/types/index.ts
CHANGED
|
@@ -377,7 +377,30 @@ export type DocumentTypes =
|
|
|
377
377
|
| "activityAiSalesOrder"
|
|
378
378
|
| "ocrInvoiceJobGroup";
|
|
379
379
|
|
|
380
|
-
export type PrintTypes =
|
|
380
|
+
export type PrintTypes =
|
|
381
|
+
| "workorder"
|
|
382
|
+
| "form"
|
|
383
|
+
| "invoice"
|
|
384
|
+
| "proforma"
|
|
385
|
+
| "settlement"
|
|
386
|
+
| "formV2";
|
|
387
|
+
|
|
388
|
+
export type InvoiceFontStyles =
|
|
389
|
+
| "InvoiceHeaderTitle"
|
|
390
|
+
| "InvoiceTaxNumber"
|
|
391
|
+
| "InvoiceType"
|
|
392
|
+
| "InvoiceInfo"
|
|
393
|
+
| "ItemsHeader"
|
|
394
|
+
| "ItemLabel"
|
|
395
|
+
| "ItemValue"
|
|
396
|
+
| "ItemVariant"
|
|
397
|
+
| "TotalItemsQty"
|
|
398
|
+
| "TotalAmount"
|
|
399
|
+
| "RepReciver"
|
|
400
|
+
| "Address"
|
|
401
|
+
| "PrintTime"
|
|
402
|
+
| "InvoiceHeader"
|
|
403
|
+
| "ClientBalance";
|
|
381
404
|
type Granularity =
|
|
382
405
|
| "Year"
|
|
383
406
|
| "Year Month"
|
|
@@ -19034,6 +19057,537 @@ export namespace Service {
|
|
|
19034
19057
|
}
|
|
19035
19058
|
}
|
|
19036
19059
|
}
|
|
19060
|
+
|
|
19061
|
+
export namespace PrintSetting {
|
|
19062
|
+
export type ImageSize = "original" | "small" | "medium" | "large" | "extra";
|
|
19063
|
+
export type QrCodeSize = "small" | "medium" | "large";
|
|
19064
|
+
export type Alignment = "right" | "left" | "center";
|
|
19065
|
+
|
|
19066
|
+
export interface InvoiceFontsWithSizes {
|
|
19067
|
+
style_name: InvoiceFontStyles;
|
|
19068
|
+
size: number;
|
|
19069
|
+
}
|
|
19070
|
+
|
|
19071
|
+
export interface ItemImage {
|
|
19072
|
+
view_item_image?: boolean;
|
|
19073
|
+
item_image_source?: "variant" | "product";
|
|
19074
|
+
item_image_size?: ImageSize;
|
|
19075
|
+
}
|
|
19076
|
+
|
|
19077
|
+
export interface User {
|
|
19078
|
+
_id: string;
|
|
19079
|
+
type: "admin" | "rep";
|
|
19080
|
+
name?: string;
|
|
19081
|
+
admin?: string;
|
|
19082
|
+
}
|
|
19083
|
+
|
|
19084
|
+
// Workorder Print Settings
|
|
19085
|
+
export interface WorkorderBasicDetails {
|
|
19086
|
+
creator?: boolean;
|
|
19087
|
+
workorder_categories?: boolean;
|
|
19088
|
+
client_name?: boolean;
|
|
19089
|
+
description?: boolean;
|
|
19090
|
+
local_name?: boolean;
|
|
19091
|
+
client_location?: boolean;
|
|
19092
|
+
assigned_to?: boolean;
|
|
19093
|
+
media?: boolean;
|
|
19094
|
+
cover_photo?: boolean;
|
|
19095
|
+
status?: boolean;
|
|
19096
|
+
assets?: boolean;
|
|
19097
|
+
asset_units?: boolean;
|
|
19098
|
+
priority_human?: boolean;
|
|
19099
|
+
due_date?: boolean;
|
|
19100
|
+
start_date?: boolean;
|
|
19101
|
+
forms?: boolean;
|
|
19102
|
+
comments?: boolean;
|
|
19103
|
+
createdAt?: boolean;
|
|
19104
|
+
}
|
|
19105
|
+
|
|
19106
|
+
export interface WorkorderClientDetails {
|
|
19107
|
+
withClientDetails?: boolean;
|
|
19108
|
+
basicClientDetails?: {
|
|
19109
|
+
client_code?: boolean;
|
|
19110
|
+
client_local_name?: boolean;
|
|
19111
|
+
client_tags?: boolean;
|
|
19112
|
+
area_tags?: boolean;
|
|
19113
|
+
client_channel?: boolean;
|
|
19114
|
+
is_chain?: boolean;
|
|
19115
|
+
teams?: boolean;
|
|
19116
|
+
product_groups?: boolean;
|
|
19117
|
+
contacts?: boolean;
|
|
19118
|
+
createdAt?: boolean;
|
|
19119
|
+
customFields?: boolean;
|
|
19120
|
+
};
|
|
19121
|
+
sales?: {
|
|
19122
|
+
price_list?: boolean;
|
|
19123
|
+
payment_type?: boolean;
|
|
19124
|
+
credit_limit?: boolean;
|
|
19125
|
+
payment_term?: boolean;
|
|
19126
|
+
};
|
|
19127
|
+
contact_info?: {
|
|
19128
|
+
contact_name?: boolean;
|
|
19129
|
+
client_info?: boolean;
|
|
19130
|
+
email?: boolean;
|
|
19131
|
+
website?: boolean;
|
|
19132
|
+
};
|
|
19133
|
+
}
|
|
19134
|
+
|
|
19135
|
+
export interface WorkorderAssetDetails {
|
|
19136
|
+
withAssetsDetails?: boolean;
|
|
19137
|
+
media?: boolean;
|
|
19138
|
+
local_name?: boolean;
|
|
19139
|
+
description?: boolean;
|
|
19140
|
+
asset_types?: boolean;
|
|
19141
|
+
location?: boolean;
|
|
19142
|
+
model?: boolean;
|
|
19143
|
+
manufacturer?: boolean;
|
|
19144
|
+
year?: boolean;
|
|
19145
|
+
barcode?: boolean;
|
|
19146
|
+
customFields?: boolean;
|
|
19147
|
+
createdAt?: boolean;
|
|
19148
|
+
cover_photo?: boolean;
|
|
19149
|
+
}
|
|
19150
|
+
|
|
19151
|
+
export interface WorkorderAssetUnitDetails {
|
|
19152
|
+
withAssetUnitsDetails?: boolean;
|
|
19153
|
+
media?: boolean;
|
|
19154
|
+
local_name?: boolean;
|
|
19155
|
+
description?: boolean;
|
|
19156
|
+
serial_number?: boolean;
|
|
19157
|
+
asset?: boolean;
|
|
19158
|
+
location?: boolean;
|
|
19159
|
+
customFields?: boolean;
|
|
19160
|
+
createdAt?: boolean;
|
|
19161
|
+
cover_photo?: boolean;
|
|
19162
|
+
}
|
|
19163
|
+
|
|
19164
|
+
export interface WorkorderDetails {
|
|
19165
|
+
document_type: "workorder";
|
|
19166
|
+
number_of_comments?: number;
|
|
19167
|
+
compressed_media_size?: ImageSize;
|
|
19168
|
+
basicDetails?: WorkorderBasicDetails;
|
|
19169
|
+
clientDetails?: WorkorderClientDetails;
|
|
19170
|
+
assetDetails?: WorkorderAssetDetails;
|
|
19171
|
+
assetUnitDetails?: WorkorderAssetUnitDetails;
|
|
19172
|
+
}
|
|
19173
|
+
|
|
19174
|
+
// Form Result Settings
|
|
19175
|
+
export interface FormResultDetails {
|
|
19176
|
+
document_type: "form";
|
|
19177
|
+
compressed_media_size?: ImageSize;
|
|
19178
|
+
}
|
|
19179
|
+
|
|
19180
|
+
// Invoice Print Settings
|
|
19181
|
+
export interface InvoiceBasicDetails {
|
|
19182
|
+
created_at?: boolean;
|
|
19183
|
+
created_by?: boolean;
|
|
19184
|
+
tax_number?: boolean;
|
|
19185
|
+
name_on_invoice?: boolean;
|
|
19186
|
+
client_code?: boolean;
|
|
19187
|
+
client_name?: boolean;
|
|
19188
|
+
client_local_name?: boolean;
|
|
19189
|
+
client_address?: boolean;
|
|
19190
|
+
client_phone?: boolean;
|
|
19191
|
+
client_tax_number?: boolean;
|
|
19192
|
+
client_cell_phone?: boolean;
|
|
19193
|
+
issue_date?: boolean;
|
|
19194
|
+
due_date?: boolean;
|
|
19195
|
+
invoice_status?: boolean;
|
|
19196
|
+
company_logo?: boolean;
|
|
19197
|
+
serial_number?: boolean;
|
|
19198
|
+
advanced_serial_number?: boolean;
|
|
19199
|
+
external_serial_number?: boolean;
|
|
19200
|
+
comment?: boolean;
|
|
19201
|
+
qr_code?: boolean;
|
|
19202
|
+
custom_status?: boolean;
|
|
19203
|
+
payments_data?: boolean;
|
|
19204
|
+
media?: boolean;
|
|
19205
|
+
address?: boolean;
|
|
19206
|
+
remaining_balance?: boolean;
|
|
19207
|
+
invoice_header?: string;
|
|
19208
|
+
invoice_notes?: string;
|
|
19209
|
+
client_balance?: boolean;
|
|
19210
|
+
origin_serial_number?: boolean;
|
|
19211
|
+
origin_advanced_serial_number?: boolean;
|
|
19212
|
+
workorder_serial_number?: boolean;
|
|
19213
|
+
workorder_name?: boolean;
|
|
19214
|
+
workorder_local_name?: boolean;
|
|
19215
|
+
total_items_base_unit_qty?: boolean;
|
|
19216
|
+
total_items_qty?: boolean;
|
|
19217
|
+
total_return_items_base_unit_qty?: boolean;
|
|
19218
|
+
total_return_items_qty?: boolean;
|
|
19219
|
+
}
|
|
19220
|
+
|
|
19221
|
+
export interface InvoiceLineItemDetails {
|
|
19222
|
+
sku?: boolean;
|
|
19223
|
+
barcode?: boolean;
|
|
19224
|
+
product_name?: boolean;
|
|
19225
|
+
variant_name?: boolean;
|
|
19226
|
+
measureunit?: boolean;
|
|
19227
|
+
qty?: boolean;
|
|
19228
|
+
price?: boolean;
|
|
19229
|
+
discount_amount?: boolean;
|
|
19230
|
+
line_total?: boolean;
|
|
19231
|
+
return_reason?: boolean;
|
|
19232
|
+
base_unit_qty?: boolean;
|
|
19233
|
+
original_price?: boolean;
|
|
19234
|
+
total_original_price?: boolean;
|
|
19235
|
+
item_image?: ItemImage;
|
|
19236
|
+
batch_number?: boolean;
|
|
19237
|
+
batch_expiry?: boolean;
|
|
19238
|
+
batch_qty?: boolean;
|
|
19239
|
+
}
|
|
19240
|
+
|
|
19241
|
+
export interface InvoiceMobileDetails {
|
|
19242
|
+
logo_height?: number | string;
|
|
19243
|
+
logo_width?: number | string;
|
|
19244
|
+
align_logo?: Alignment;
|
|
19245
|
+
align_invoice_header?: Alignment;
|
|
19246
|
+
font_styles?: InvoiceFontsWithSizes[];
|
|
19247
|
+
hide_invoice_payment_type?: boolean;
|
|
19248
|
+
invoice_header?: string;
|
|
19249
|
+
client_balance?: boolean;
|
|
19250
|
+
}
|
|
19251
|
+
|
|
19252
|
+
export interface InvoiceDetails {
|
|
19253
|
+
document_type: "invoice";
|
|
19254
|
+
compressed_media_size?: ImageSize;
|
|
19255
|
+
logo_size?: ImageSize;
|
|
19256
|
+
qr_code_size?: QrCodeSize;
|
|
19257
|
+
basicDetails?: InvoiceBasicDetails;
|
|
19258
|
+
lineItemDetails?: InvoiceLineItemDetails;
|
|
19259
|
+
mobileDetails?: InvoiceMobileDetails;
|
|
19260
|
+
}
|
|
19261
|
+
|
|
19262
|
+
// Proforma Print Settings
|
|
19263
|
+
export interface ProformaBasicDetails {
|
|
19264
|
+
created_at?: boolean;
|
|
19265
|
+
created_by?: boolean;
|
|
19266
|
+
tax_number?: boolean;
|
|
19267
|
+
name_on_invoice?: boolean;
|
|
19268
|
+
client_code?: boolean;
|
|
19269
|
+
client_name?: boolean;
|
|
19270
|
+
client_local_name?: boolean;
|
|
19271
|
+
client_address?: boolean;
|
|
19272
|
+
client_phone?: boolean;
|
|
19273
|
+
client_tax_number?: boolean;
|
|
19274
|
+
client_cell_phone?: boolean;
|
|
19275
|
+
issue_date?: boolean;
|
|
19276
|
+
order_status?: boolean;
|
|
19277
|
+
company_logo?: boolean;
|
|
19278
|
+
serial_number?: boolean;
|
|
19279
|
+
external_serial_number?: boolean;
|
|
19280
|
+
comment?: boolean;
|
|
19281
|
+
custom_status?: boolean;
|
|
19282
|
+
media?: boolean;
|
|
19283
|
+
address?: boolean;
|
|
19284
|
+
invoice_header?: string;
|
|
19285
|
+
invoice_notes?: string;
|
|
19286
|
+
total_items_base_unit_qty?: boolean;
|
|
19287
|
+
total_items_qty?: boolean;
|
|
19288
|
+
total_return_items_base_unit_qty?: boolean;
|
|
19289
|
+
total_return_items_qty?: boolean;
|
|
19290
|
+
}
|
|
19291
|
+
|
|
19292
|
+
export interface ProformaLineItemDetails {
|
|
19293
|
+
product_name?: boolean;
|
|
19294
|
+
variant_name?: boolean;
|
|
19295
|
+
sku?: boolean;
|
|
19296
|
+
barcode?: boolean;
|
|
19297
|
+
measureunit?: boolean;
|
|
19298
|
+
qty?: boolean;
|
|
19299
|
+
price?: boolean;
|
|
19300
|
+
line_total?: boolean;
|
|
19301
|
+
note?: boolean;
|
|
19302
|
+
base_unit_qty?: boolean;
|
|
19303
|
+
item_image?: ItemImage;
|
|
19304
|
+
return_reason?: boolean;
|
|
19305
|
+
original_price?: boolean;
|
|
19306
|
+
total_original_price?: boolean;
|
|
19307
|
+
batch_number?: boolean;
|
|
19308
|
+
batch_expiry?: boolean;
|
|
19309
|
+
batch_qty?: boolean;
|
|
19310
|
+
}
|
|
19311
|
+
|
|
19312
|
+
export interface ProformaMobileDetails {
|
|
19313
|
+
logo_height?: number | string;
|
|
19314
|
+
logo_width?: number | string;
|
|
19315
|
+
align_logo?: Alignment;
|
|
19316
|
+
font_styles?: InvoiceFontsWithSizes[];
|
|
19317
|
+
align_invoice_header?: Alignment;
|
|
19318
|
+
hide_invoice_payment_type?: boolean;
|
|
19319
|
+
invoice_header?: string;
|
|
19320
|
+
}
|
|
19321
|
+
|
|
19322
|
+
export interface ProformaDetails {
|
|
19323
|
+
document_type: "proforma";
|
|
19324
|
+
compressed_media_size?: ImageSize;
|
|
19325
|
+
logo_size?: ImageSize;
|
|
19326
|
+
basicDetails?: ProformaBasicDetails;
|
|
19327
|
+
lineItemDetails?: ProformaLineItemDetails;
|
|
19328
|
+
mobileDetails?: ProformaMobileDetails;
|
|
19329
|
+
}
|
|
19330
|
+
|
|
19331
|
+
// Settlement Print Settings
|
|
19332
|
+
export interface SettlementBasicDetails {
|
|
19333
|
+
creator?: boolean;
|
|
19334
|
+
settlement_date?: boolean;
|
|
19335
|
+
company_logo?: boolean;
|
|
19336
|
+
serial_number?: boolean;
|
|
19337
|
+
note?: boolean;
|
|
19338
|
+
amount?: boolean;
|
|
19339
|
+
payment_type?: boolean;
|
|
19340
|
+
checks?: boolean;
|
|
19341
|
+
rep?: boolean;
|
|
19342
|
+
totals?: boolean;
|
|
19343
|
+
media?: boolean;
|
|
19344
|
+
}
|
|
19345
|
+
|
|
19346
|
+
export interface SettlementCheckDetails {
|
|
19347
|
+
bank_name?: boolean;
|
|
19348
|
+
branch_name?: boolean;
|
|
19349
|
+
drawer_name?: boolean;
|
|
19350
|
+
client_name?: boolean;
|
|
19351
|
+
check_number?: boolean;
|
|
19352
|
+
pay_time?: boolean;
|
|
19353
|
+
rep_name?: boolean;
|
|
19354
|
+
check_date?: boolean;
|
|
19355
|
+
}
|
|
19356
|
+
|
|
19357
|
+
export interface SettlementDetails {
|
|
19358
|
+
document_type: "settlement";
|
|
19359
|
+
compressed_media_size?: ImageSize;
|
|
19360
|
+
basicDetails?: SettlementBasicDetails;
|
|
19361
|
+
checkDetails?: SettlementCheckDetails;
|
|
19362
|
+
}
|
|
19363
|
+
|
|
19364
|
+
// Union type for all details
|
|
19365
|
+
export type Details =
|
|
19366
|
+
| WorkorderDetails
|
|
19367
|
+
| FormResultDetails
|
|
19368
|
+
| InvoiceDetails
|
|
19369
|
+
| ProformaDetails
|
|
19370
|
+
| SettlementDetails;
|
|
19371
|
+
|
|
19372
|
+
// Main PrintSetting Schema
|
|
19373
|
+
export interface Data {
|
|
19374
|
+
_id: string;
|
|
19375
|
+
creator: User;
|
|
19376
|
+
editor?: User;
|
|
19377
|
+
document_type: PrintTypes;
|
|
19378
|
+
details: Details;
|
|
19379
|
+
company_namespace: string[];
|
|
19380
|
+
createdAt: Date;
|
|
19381
|
+
updatedAt: Date;
|
|
19382
|
+
__v?: number;
|
|
19383
|
+
}
|
|
19384
|
+
|
|
19385
|
+
export interface CreateBody {
|
|
19386
|
+
document_type: PrintTypes;
|
|
19387
|
+
details: Details;
|
|
19388
|
+
}
|
|
19389
|
+
|
|
19390
|
+
export interface UpdateBody {
|
|
19391
|
+
details?: Partial<Details>;
|
|
19392
|
+
}
|
|
19393
|
+
|
|
19394
|
+
export namespace Find {
|
|
19395
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
19396
|
+
document_type?: PrintTypes | PrintTypes[];
|
|
19397
|
+
};
|
|
19398
|
+
export interface Result extends DefaultPaginationResult {
|
|
19399
|
+
data: Data[];
|
|
19400
|
+
}
|
|
19401
|
+
}
|
|
19402
|
+
|
|
19403
|
+
export namespace Get {
|
|
19404
|
+
export type ID = string;
|
|
19405
|
+
export type Result = Data;
|
|
19406
|
+
}
|
|
19407
|
+
|
|
19408
|
+
export namespace Create {
|
|
19409
|
+
export type Body = CreateBody;
|
|
19410
|
+
export type Result = Data;
|
|
19411
|
+
}
|
|
19412
|
+
|
|
19413
|
+
export namespace Update {
|
|
19414
|
+
export type ID = string;
|
|
19415
|
+
export type Body = UpdateBody;
|
|
19416
|
+
export type Result = Data;
|
|
19417
|
+
}
|
|
19418
|
+
}
|
|
19419
|
+
|
|
19420
|
+
export namespace PdfTemplateGallery {
|
|
19421
|
+
export interface Data {
|
|
19422
|
+
_id: string;
|
|
19423
|
+
html_media?: string | MediaDoc;
|
|
19424
|
+
settings?: { [key: string]: any };
|
|
19425
|
+
cover_photo?: string | MediaDoc;
|
|
19426
|
+
name: string;
|
|
19427
|
+
locale: "en" | "ar";
|
|
19428
|
+
ai_prompt?: string;
|
|
19429
|
+
document_type: PrintTypes;
|
|
19430
|
+
disabled: boolean;
|
|
19431
|
+
createdAt: string;
|
|
19432
|
+
updatedAt: string;
|
|
19433
|
+
}
|
|
19434
|
+
|
|
19435
|
+
export interface CreateBody {
|
|
19436
|
+
html_media?: string;
|
|
19437
|
+
settings?: { [key: string]: any };
|
|
19438
|
+
cover_photo?: string;
|
|
19439
|
+
name: string;
|
|
19440
|
+
locale: "en" | "ar";
|
|
19441
|
+
ai_prompt?: string;
|
|
19442
|
+
document_type: PrintTypes;
|
|
19443
|
+
disabled?: boolean;
|
|
19444
|
+
}
|
|
19445
|
+
|
|
19446
|
+
export interface UpdateBody {
|
|
19447
|
+
html_media?: string;
|
|
19448
|
+
settings?: { [key: string]: any };
|
|
19449
|
+
cover_photo?: string;
|
|
19450
|
+
name?: string;
|
|
19451
|
+
locale?: "en" | "ar";
|
|
19452
|
+
ai_prompt?: string;
|
|
19453
|
+
document_type?: PrintTypes;
|
|
19454
|
+
}
|
|
19455
|
+
|
|
19456
|
+
export type PopulatedDoc = Data & {
|
|
19457
|
+
html_media_populated?: MediaDoc;
|
|
19458
|
+
cover_photo_populated?: MediaDoc;
|
|
19459
|
+
};
|
|
19460
|
+
|
|
19461
|
+
type PopulatedKeys = "html_media" | "cover_photo";
|
|
19462
|
+
|
|
19463
|
+
export namespace Find {
|
|
19464
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
19465
|
+
_id?: string | string[];
|
|
19466
|
+
name?: string;
|
|
19467
|
+
locale?: "en" | "ar";
|
|
19468
|
+
document_type?: PrintTypes;
|
|
19469
|
+
disabled?: boolean;
|
|
19470
|
+
};
|
|
19471
|
+
export interface Result extends DefaultPaginationResult {
|
|
19472
|
+
data: PopulatedDoc[];
|
|
19473
|
+
}
|
|
19474
|
+
}
|
|
19475
|
+
|
|
19476
|
+
export namespace Get {
|
|
19477
|
+
export type ID = string;
|
|
19478
|
+
export type Params = { populatedKeys?: PopulatedKeys[] };
|
|
19479
|
+
export type Result = PopulatedDoc;
|
|
19480
|
+
}
|
|
19481
|
+
|
|
19482
|
+
export namespace Create {
|
|
19483
|
+
export type Body = CreateBody;
|
|
19484
|
+
export type Result = Data;
|
|
19485
|
+
}
|
|
19486
|
+
|
|
19487
|
+
export namespace Update {
|
|
19488
|
+
export type ID = string;
|
|
19489
|
+
export type Body = UpdateBody;
|
|
19490
|
+
export type Result = Data;
|
|
19491
|
+
}
|
|
19492
|
+
|
|
19493
|
+
export namespace Remove {
|
|
19494
|
+
export type ID = string;
|
|
19495
|
+
export type Result = Data;
|
|
19496
|
+
}
|
|
19497
|
+
}
|
|
19498
|
+
|
|
19499
|
+
export namespace PdfTemplate {
|
|
19500
|
+
export interface Data {
|
|
19501
|
+
_id: string;
|
|
19502
|
+
html_media?: string | MediaDoc;
|
|
19503
|
+
settings?: { [key: string]: any };
|
|
19504
|
+
cover_photo?: string | MediaDoc;
|
|
19505
|
+
name: string;
|
|
19506
|
+
is_default: boolean;
|
|
19507
|
+
creator: AdminCreator;
|
|
19508
|
+
editor?: AdminCreator;
|
|
19509
|
+
locale: "en" | "ar";
|
|
19510
|
+
pdf_template_gallery?: string;
|
|
19511
|
+
publish_time?: number | null;
|
|
19512
|
+
document_type: PrintTypes;
|
|
19513
|
+
disabled: boolean;
|
|
19514
|
+
company_namespace: string[];
|
|
19515
|
+
createdAt: string;
|
|
19516
|
+
updatedAt: string;
|
|
19517
|
+
}
|
|
19518
|
+
|
|
19519
|
+
export interface CreateBody {
|
|
19520
|
+
html_media?: string;
|
|
19521
|
+
settings?: { [key: string]: any };
|
|
19522
|
+
cover_photo?: string;
|
|
19523
|
+
name: string;
|
|
19524
|
+
is_default?: boolean;
|
|
19525
|
+
locale: "en" | "ar";
|
|
19526
|
+
pdf_template_gallery?: string;
|
|
19527
|
+
publish_time?: number | null;
|
|
19528
|
+
document_type: PrintTypes;
|
|
19529
|
+
}
|
|
19530
|
+
|
|
19531
|
+
export interface UpdateBody {
|
|
19532
|
+
html_media?: string;
|
|
19533
|
+
settings?: { [key: string]: any };
|
|
19534
|
+
cover_photo?: string;
|
|
19535
|
+
name?: string;
|
|
19536
|
+
is_default?: boolean;
|
|
19537
|
+
locale?: "en" | "ar";
|
|
19538
|
+
pdf_template_gallery?: string;
|
|
19539
|
+
publish_time?: number | null;
|
|
19540
|
+
document_type?: PrintTypes;
|
|
19541
|
+
}
|
|
19542
|
+
|
|
19543
|
+
export type PopulatedDoc = Data & {
|
|
19544
|
+
html_media_populated?: MediaDoc;
|
|
19545
|
+
cover_photo_populated?: MediaDoc;
|
|
19546
|
+
pdf_template_gallery_populated?: PdfTemplateGallery.Data;
|
|
19547
|
+
};
|
|
19548
|
+
|
|
19549
|
+
type PopulatedKeys = "html_media" | "cover_photo" | "pdf_template_gallery";
|
|
19550
|
+
|
|
19551
|
+
export namespace Find {
|
|
19552
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
19553
|
+
name?: string | string[];
|
|
19554
|
+
locale?: "en" | "ar" | ("en" | "ar")[];
|
|
19555
|
+
document_type?: PrintTypes | PrintTypes[];
|
|
19556
|
+
is_default?: boolean;
|
|
19557
|
+
pdf_template_gallery?: string | string[];
|
|
19558
|
+
publish_time?: number | (number | null)[];
|
|
19559
|
+
disabled?: boolean;
|
|
19560
|
+
_id?: string | string[];
|
|
19561
|
+
"creator._id"?: string | string[];
|
|
19562
|
+
"editor._id"?: string | string[];
|
|
19563
|
+
};
|
|
19564
|
+
export interface Result extends DefaultPaginationResult {
|
|
19565
|
+
data: PopulatedDoc[];
|
|
19566
|
+
}
|
|
19567
|
+
}
|
|
19568
|
+
|
|
19569
|
+
export namespace Get {
|
|
19570
|
+
export type ID = string;
|
|
19571
|
+
export type Params = { populatedKeys?: PopulatedKeys[] };
|
|
19572
|
+
export type Result = PopulatedDoc;
|
|
19573
|
+
}
|
|
19574
|
+
|
|
19575
|
+
export namespace Create {
|
|
19576
|
+
export type Body = CreateBody;
|
|
19577
|
+
export type Result = Data;
|
|
19578
|
+
}
|
|
19579
|
+
|
|
19580
|
+
export namespace Update {
|
|
19581
|
+
export type ID = string;
|
|
19582
|
+
export type Body = UpdateBody;
|
|
19583
|
+
export type Result = Data;
|
|
19584
|
+
}
|
|
19585
|
+
|
|
19586
|
+
export namespace Remove {
|
|
19587
|
+
export type ID = string;
|
|
19588
|
+
export type Result = Data;
|
|
19589
|
+
}
|
|
19590
|
+
}
|
|
19037
19591
|
}
|
|
19038
19592
|
|
|
19039
19593
|
export type StringId = string;
|