repzo 1.0.229 → 1.0.230

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 CHANGED
@@ -38,6 +38,7 @@ 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";
41
42
  readonly PAYMENT: "payments";
42
43
  readonly REFUND: "refund";
43
44
  readonly SETTLEMENT: "settlement";
@@ -165,6 +166,7 @@ export default class Repzo {
165
166
  readonly VISIT: "visit";
166
167
  readonly INVOICE: "fullinvoices";
167
168
  readonly PROFORMA: "proforma";
169
+ readonly PRINT_SETTINGS: "print-settings";
168
170
  readonly PAYMENT: "payments";
169
171
  readonly REFUND: "refund";
170
172
  readonly SETTLEMENT: "settlement";
@@ -1130,4 +1132,11 @@ export default class Repzo {
1130
1132
  _path: "compare-invoice-to-warehouse";
1131
1133
  find: (params?: Service.CompareInvoiceToWarehouse.Find.Params) => Promise<Service.CompareInvoiceToWarehouse.Find.Result>;
1132
1134
  };
1135
+ printSettings: {
1136
+ _path: "print-settings";
1137
+ find: (params?: Service.PrintSetting.Find.Params) => Promise<Service.PrintSetting.Find.Result>;
1138
+ get: (id: Service.PrintSetting.Get.ID) => Promise<Service.PrintSetting.Get.Result>;
1139
+ create: (body: Service.PrintSetting.Create.Body) => Promise<Service.PrintSetting.Create.Result>;
1140
+ update: (id: Service.PrintSetting.Update.ID, body: Service.PrintSetting.Update.Body) => Promise<Service.PrintSetting.Update.Result>;
1141
+ };
1133
1142
  }
package/lib/index.js CHANGED
@@ -39,6 +39,7 @@ export const end_points = {
39
39
  VISIT: "visit",
40
40
  INVOICE: "fullinvoices",
41
41
  PROFORMA: "proforma",
42
+ PRINT_SETTINGS: "print-settings",
42
43
  PAYMENT: "payments",
43
44
  REFUND: "refund",
44
45
  SETTLEMENT: "settlement",
@@ -2317,6 +2318,24 @@ class Repzo {
2317
2318
  return res;
2318
2319
  },
2319
2320
  };
2321
+ this.printSettings = {
2322
+ _path: Repzo._end_points.PRINT_SETTINGS,
2323
+ find: async (params) => {
2324
+ let res = await this._fetch(this.svAPIEndpoint, this.printSettings._path, params);
2325
+ return res;
2326
+ },
2327
+ get: async (id) => {
2328
+ return await this._fetch(this.svAPIEndpoint, this.printSettings._path + `/${id}`);
2329
+ },
2330
+ create: async (body) => {
2331
+ let res = await this._create(this.svAPIEndpoint, this.printSettings._path, body);
2332
+ return res;
2333
+ },
2334
+ update: async (id, body) => {
2335
+ let res = await this._update(this.svAPIEndpoint, this.printSettings._path + `/${id}`, body);
2336
+ return res;
2337
+ },
2338
+ };
2320
2339
  this.svAPIEndpoint =
2321
2340
  !options?.env || options?.env == "production"
2322
2341
  ? "https://sv.api.repzo.me"
@@ -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";
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,324 @@ 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
+ }
17041
17360
  }
17042
17361
  export type StringId = string;
17043
17362
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.229",
3
+ "version": "1.0.230",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -49,6 +49,7 @@ export const end_points = {
49
49
  VISIT: "visit",
50
50
  INVOICE: "fullinvoices",
51
51
  PROFORMA: "proforma",
52
+ PRINT_SETTINGS: "print-settings",
52
53
  PAYMENT: "payments",
53
54
  REFUND: "refund",
54
55
  SETTLEMENT: "settlement",
@@ -5896,6 +5897,53 @@ export default class Repzo {
5896
5897
  return res;
5897
5898
  },
5898
5899
  };
5900
+
5901
+ printSettings = {
5902
+ _path: Repzo._end_points.PRINT_SETTINGS,
5903
+
5904
+ find: async (
5905
+ params?: Service.PrintSetting.Find.Params,
5906
+ ): Promise<Service.PrintSetting.Find.Result> => {
5907
+ let res: Service.PrintSetting.Find.Result = await this._fetch(
5908
+ this.svAPIEndpoint,
5909
+ this.printSettings._path,
5910
+ params,
5911
+ );
5912
+ return res;
5913
+ },
5914
+
5915
+ get: async (
5916
+ id: Service.PrintSetting.Get.ID,
5917
+ ): Promise<Service.PrintSetting.Get.Result> => {
5918
+ return await this._fetch(
5919
+ this.svAPIEndpoint,
5920
+ this.printSettings._path + `/${id}`,
5921
+ );
5922
+ },
5923
+
5924
+ create: async (
5925
+ body: Service.PrintSetting.Create.Body,
5926
+ ): Promise<Service.PrintSetting.Create.Result> => {
5927
+ let res = await this._create(
5928
+ this.svAPIEndpoint,
5929
+ this.printSettings._path,
5930
+ body,
5931
+ );
5932
+ return res;
5933
+ },
5934
+
5935
+ update: async (
5936
+ id: Service.PrintSetting.Update.ID,
5937
+ body: Service.PrintSetting.Update.Body,
5938
+ ): Promise<Service.PrintSetting.Update.Result> => {
5939
+ let res: Service.PrintSetting.Update.Result = await this._update(
5940
+ this.svAPIEndpoint,
5941
+ this.printSettings._path + `/${id}`,
5942
+ body,
5943
+ );
5944
+ return res;
5945
+ },
5946
+ };
5899
5947
  }
5900
5948
 
5901
5949
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -377,7 +377,29 @@ export type DocumentTypes =
377
377
  | "activityAiSalesOrder"
378
378
  | "ocrInvoiceJobGroup";
379
379
 
380
- export type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
380
+ export type PrintTypes =
381
+ | "workorder"
382
+ | "form"
383
+ | "invoice"
384
+ | "proforma"
385
+ | "settlement";
386
+
387
+ export type InvoiceFontStyles =
388
+ | "InvoiceHeaderTitle"
389
+ | "InvoiceTaxNumber"
390
+ | "InvoiceType"
391
+ | "InvoiceInfo"
392
+ | "ItemsHeader"
393
+ | "ItemLabel"
394
+ | "ItemValue"
395
+ | "ItemVariant"
396
+ | "TotalItemsQty"
397
+ | "TotalAmount"
398
+ | "RepReciver"
399
+ | "Address"
400
+ | "PrintTime"
401
+ | "InvoiceHeader"
402
+ | "ClientBalance";
381
403
  type Granularity =
382
404
  | "Year"
383
405
  | "Year Month"
@@ -19034,6 +19056,365 @@ export namespace Service {
19034
19056
  }
19035
19057
  }
19036
19058
  }
19059
+
19060
+ export namespace PrintSetting {
19061
+ export type ImageSize = "original" | "small" | "medium" | "large" | "extra";
19062
+ export type QrCodeSize = "small" | "medium" | "large";
19063
+ export type Alignment = "right" | "left" | "center";
19064
+
19065
+ export interface InvoiceFontsWithSizes {
19066
+ style_name: InvoiceFontStyles;
19067
+ size: number;
19068
+ }
19069
+
19070
+ export interface ItemImage {
19071
+ view_item_image?: boolean;
19072
+ item_image_source?: "variant" | "product";
19073
+ item_image_size?: ImageSize;
19074
+ }
19075
+
19076
+ export interface User {
19077
+ _id: string;
19078
+ type: "admin" | "rep";
19079
+ name?: string;
19080
+ admin?: string;
19081
+ }
19082
+
19083
+ // Workorder Print Settings
19084
+ export interface WorkorderBasicDetails {
19085
+ creator?: boolean;
19086
+ workorder_categories?: boolean;
19087
+ client_name?: boolean;
19088
+ description?: boolean;
19089
+ local_name?: boolean;
19090
+ client_location?: boolean;
19091
+ assigned_to?: boolean;
19092
+ media?: boolean;
19093
+ cover_photo?: boolean;
19094
+ status?: boolean;
19095
+ assets?: boolean;
19096
+ asset_units?: boolean;
19097
+ priority_human?: boolean;
19098
+ due_date?: boolean;
19099
+ start_date?: boolean;
19100
+ forms?: boolean;
19101
+ comments?: boolean;
19102
+ createdAt?: boolean;
19103
+ }
19104
+
19105
+ export interface WorkorderClientDetails {
19106
+ withClientDetails?: boolean;
19107
+ basicClientDetails?: {
19108
+ client_code?: boolean;
19109
+ client_local_name?: boolean;
19110
+ client_tags?: boolean;
19111
+ area_tags?: boolean;
19112
+ client_channel?: boolean;
19113
+ is_chain?: boolean;
19114
+ teams?: boolean;
19115
+ product_groups?: boolean;
19116
+ contacts?: boolean;
19117
+ createdAt?: boolean;
19118
+ customFields?: boolean;
19119
+ };
19120
+ sales?: {
19121
+ price_list?: boolean;
19122
+ payment_type?: boolean;
19123
+ credit_limit?: boolean;
19124
+ payment_term?: boolean;
19125
+ };
19126
+ contact_info?: {
19127
+ contact_name?: boolean;
19128
+ client_info?: boolean;
19129
+ email?: boolean;
19130
+ website?: boolean;
19131
+ };
19132
+ }
19133
+
19134
+ export interface WorkorderAssetDetails {
19135
+ withAssetsDetails?: boolean;
19136
+ media?: boolean;
19137
+ local_name?: boolean;
19138
+ description?: boolean;
19139
+ asset_types?: boolean;
19140
+ location?: boolean;
19141
+ model?: boolean;
19142
+ manufacturer?: boolean;
19143
+ year?: boolean;
19144
+ barcode?: boolean;
19145
+ customFields?: boolean;
19146
+ createdAt?: boolean;
19147
+ cover_photo?: boolean;
19148
+ }
19149
+
19150
+ export interface WorkorderAssetUnitDetails {
19151
+ withAssetUnitsDetails?: boolean;
19152
+ media?: boolean;
19153
+ local_name?: boolean;
19154
+ description?: boolean;
19155
+ serial_number?: boolean;
19156
+ asset?: boolean;
19157
+ location?: boolean;
19158
+ customFields?: boolean;
19159
+ createdAt?: boolean;
19160
+ cover_photo?: boolean;
19161
+ }
19162
+
19163
+ export interface WorkorderDetails {
19164
+ document_type: "workorder";
19165
+ number_of_comments?: number;
19166
+ compressed_media_size?: ImageSize;
19167
+ basicDetails?: WorkorderBasicDetails;
19168
+ clientDetails?: WorkorderClientDetails;
19169
+ assetDetails?: WorkorderAssetDetails;
19170
+ assetUnitDetails?: WorkorderAssetUnitDetails;
19171
+ }
19172
+
19173
+ // Form Result Settings
19174
+ export interface FormResultDetails {
19175
+ document_type: "form";
19176
+ compressed_media_size?: ImageSize;
19177
+ }
19178
+
19179
+ // Invoice Print Settings
19180
+ export interface InvoiceBasicDetails {
19181
+ created_at?: boolean;
19182
+ created_by?: boolean;
19183
+ tax_number?: boolean;
19184
+ name_on_invoice?: boolean;
19185
+ client_code?: boolean;
19186
+ client_name?: boolean;
19187
+ client_local_name?: boolean;
19188
+ client_address?: boolean;
19189
+ client_phone?: boolean;
19190
+ client_tax_number?: boolean;
19191
+ client_cell_phone?: boolean;
19192
+ issue_date?: boolean;
19193
+ due_date?: boolean;
19194
+ invoice_status?: boolean;
19195
+ company_logo?: boolean;
19196
+ serial_number?: boolean;
19197
+ advanced_serial_number?: boolean;
19198
+ external_serial_number?: boolean;
19199
+ comment?: boolean;
19200
+ qr_code?: boolean;
19201
+ custom_status?: boolean;
19202
+ payments_data?: boolean;
19203
+ media?: boolean;
19204
+ address?: boolean;
19205
+ remaining_balance?: boolean;
19206
+ invoice_header?: string;
19207
+ invoice_notes?: string;
19208
+ client_balance?: boolean;
19209
+ origin_serial_number?: boolean;
19210
+ origin_advanced_serial_number?: boolean;
19211
+ workorder_serial_number?: boolean;
19212
+ workorder_name?: boolean;
19213
+ workorder_local_name?: boolean;
19214
+ total_items_base_unit_qty?: boolean;
19215
+ total_items_qty?: boolean;
19216
+ total_return_items_base_unit_qty?: boolean;
19217
+ total_return_items_qty?: boolean;
19218
+ }
19219
+
19220
+ export interface InvoiceLineItemDetails {
19221
+ sku?: boolean;
19222
+ barcode?: boolean;
19223
+ product_name?: boolean;
19224
+ variant_name?: boolean;
19225
+ measureunit?: boolean;
19226
+ qty?: boolean;
19227
+ price?: boolean;
19228
+ discount_amount?: boolean;
19229
+ line_total?: boolean;
19230
+ return_reason?: boolean;
19231
+ base_unit_qty?: boolean;
19232
+ original_price?: boolean;
19233
+ total_original_price?: boolean;
19234
+ item_image?: ItemImage;
19235
+ batch_number?: boolean;
19236
+ batch_expiry?: boolean;
19237
+ batch_qty?: boolean;
19238
+ }
19239
+
19240
+ export interface InvoiceMobileDetails {
19241
+ logo_height?: number | string;
19242
+ logo_width?: number | string;
19243
+ align_logo?: Alignment;
19244
+ align_invoice_header?: Alignment;
19245
+ font_styles?: InvoiceFontsWithSizes[];
19246
+ hide_invoice_payment_type?: boolean;
19247
+ invoice_header?: string;
19248
+ client_balance?: boolean;
19249
+ }
19250
+
19251
+ export interface InvoiceDetails {
19252
+ document_type: "invoice";
19253
+ compressed_media_size?: ImageSize;
19254
+ logo_size?: ImageSize;
19255
+ qr_code_size?: QrCodeSize;
19256
+ basicDetails?: InvoiceBasicDetails;
19257
+ lineItemDetails?: InvoiceLineItemDetails;
19258
+ mobileDetails?: InvoiceMobileDetails;
19259
+ }
19260
+
19261
+ // Proforma Print Settings
19262
+ export interface ProformaBasicDetails {
19263
+ created_at?: boolean;
19264
+ created_by?: boolean;
19265
+ tax_number?: boolean;
19266
+ name_on_invoice?: boolean;
19267
+ client_code?: boolean;
19268
+ client_name?: boolean;
19269
+ client_local_name?: boolean;
19270
+ client_address?: boolean;
19271
+ client_phone?: boolean;
19272
+ client_tax_number?: boolean;
19273
+ client_cell_phone?: boolean;
19274
+ issue_date?: boolean;
19275
+ order_status?: boolean;
19276
+ company_logo?: boolean;
19277
+ serial_number?: boolean;
19278
+ external_serial_number?: boolean;
19279
+ comment?: boolean;
19280
+ custom_status?: boolean;
19281
+ media?: boolean;
19282
+ address?: boolean;
19283
+ invoice_header?: string;
19284
+ invoice_notes?: string;
19285
+ total_items_base_unit_qty?: boolean;
19286
+ total_items_qty?: boolean;
19287
+ total_return_items_base_unit_qty?: boolean;
19288
+ total_return_items_qty?: boolean;
19289
+ }
19290
+
19291
+ export interface ProformaLineItemDetails {
19292
+ product_name?: boolean;
19293
+ variant_name?: boolean;
19294
+ sku?: boolean;
19295
+ barcode?: boolean;
19296
+ measureunit?: boolean;
19297
+ qty?: boolean;
19298
+ price?: boolean;
19299
+ line_total?: boolean;
19300
+ note?: boolean;
19301
+ base_unit_qty?: boolean;
19302
+ item_image?: ItemImage;
19303
+ return_reason?: boolean;
19304
+ original_price?: boolean;
19305
+ total_original_price?: boolean;
19306
+ batch_number?: boolean;
19307
+ batch_expiry?: boolean;
19308
+ batch_qty?: boolean;
19309
+ }
19310
+
19311
+ export interface ProformaMobileDetails {
19312
+ logo_height?: number | string;
19313
+ logo_width?: number | string;
19314
+ align_logo?: Alignment;
19315
+ font_styles?: InvoiceFontsWithSizes[];
19316
+ align_invoice_header?: Alignment;
19317
+ hide_invoice_payment_type?: boolean;
19318
+ invoice_header?: string;
19319
+ }
19320
+
19321
+ export interface ProformaDetails {
19322
+ document_type: "proforma";
19323
+ compressed_media_size?: ImageSize;
19324
+ logo_size?: ImageSize;
19325
+ basicDetails?: ProformaBasicDetails;
19326
+ lineItemDetails?: ProformaLineItemDetails;
19327
+ mobileDetails?: ProformaMobileDetails;
19328
+ }
19329
+
19330
+ // Settlement Print Settings
19331
+ export interface SettlementBasicDetails {
19332
+ creator?: boolean;
19333
+ settlement_date?: boolean;
19334
+ company_logo?: boolean;
19335
+ serial_number?: boolean;
19336
+ note?: boolean;
19337
+ amount?: boolean;
19338
+ payment_type?: boolean;
19339
+ checks?: boolean;
19340
+ rep?: boolean;
19341
+ totals?: boolean;
19342
+ media?: boolean;
19343
+ }
19344
+
19345
+ export interface SettlementCheckDetails {
19346
+ bank_name?: boolean;
19347
+ branch_name?: boolean;
19348
+ drawer_name?: boolean;
19349
+ client_name?: boolean;
19350
+ check_number?: boolean;
19351
+ pay_time?: boolean;
19352
+ rep_name?: boolean;
19353
+ check_date?: boolean;
19354
+ }
19355
+
19356
+ export interface SettlementDetails {
19357
+ document_type: "settlement";
19358
+ compressed_media_size?: ImageSize;
19359
+ basicDetails?: SettlementBasicDetails;
19360
+ checkDetails?: SettlementCheckDetails;
19361
+ }
19362
+
19363
+ // Union type for all details
19364
+ export type Details =
19365
+ | WorkorderDetails
19366
+ | FormResultDetails
19367
+ | InvoiceDetails
19368
+ | ProformaDetails
19369
+ | SettlementDetails;
19370
+
19371
+ // Main PrintSetting Schema
19372
+ export interface Data {
19373
+ _id: string;
19374
+ creator: User;
19375
+ editor?: User;
19376
+ document_type: PrintTypes;
19377
+ details: Details;
19378
+ company_namespace: string[];
19379
+ createdAt: Date;
19380
+ updatedAt: Date;
19381
+ __v?: number;
19382
+ }
19383
+
19384
+ export interface CreateBody {
19385
+ document_type: PrintTypes;
19386
+ details: Details;
19387
+ }
19388
+
19389
+ export interface UpdateBody {
19390
+ details?: Partial<Details>;
19391
+ }
19392
+
19393
+ export namespace Find {
19394
+ export type Params = DefaultPaginationQueryParams & {
19395
+ document_type?: PrintTypes | PrintTypes[];
19396
+ };
19397
+ export interface Result extends DefaultPaginationResult {
19398
+ data: Data[];
19399
+ }
19400
+ }
19401
+
19402
+ export namespace Get {
19403
+ export type ID = string;
19404
+ export type Result = Data;
19405
+ }
19406
+
19407
+ export namespace Create {
19408
+ export type Body = CreateBody;
19409
+ export type Result = Data;
19410
+ }
19411
+
19412
+ export namespace Update {
19413
+ export type ID = string;
19414
+ export type Body = UpdateBody;
19415
+ export type Result = Data;
19416
+ }
19417
+ }
19037
19418
  }
19038
19419
 
19039
19420
  export type StringId = string;