repzo 1.0.118 → 1.0.120

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/changelog.md CHANGED
@@ -8,6 +8,7 @@
8
8
  - update adjustInventory @maramalshen
9
9
  - update FullInvoice with ubl keys @maramalshen
10
10
  - add: approval-request @maramalshen
11
+ - add: workorder-request @maramalshen
11
12
 
12
13
  ### Changed
13
14
 
package/lib/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export default class Repzo {
45
45
  readonly CUSTOM_LIST_ITEM: "custom-list-item";
46
46
  readonly INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason";
47
47
  readonly WORKORDER: "workorder";
48
+ readonly WORKORDER_REQUEST: "workorder-request";
48
49
  readonly SUPPLIER: "supplier";
49
50
  readonly QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf";
50
51
  readonly VISIT: "visit";
@@ -86,6 +87,7 @@ export default class Repzo {
86
87
  readonly SETTINGS: "settings";
87
88
  readonly MAIL_UNSUBSCRIBE: "mail-unsubscribe";
88
89
  readonly APPROVAL_REQUEST: "approval-request";
90
+ readonly SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter";
89
91
  };
90
92
  private _fetch;
91
93
  private _create;
@@ -655,6 +657,26 @@ export default class Repzo {
655
657
  id: Service.Workorder.Remove.ID
656
658
  ) => Promise<Service.Workorder.Remove.Result>;
657
659
  };
660
+ workorderRequest: {
661
+ _path: "workorder-request";
662
+ find: (
663
+ params?: Service.WorkorderRequest.Find.Params
664
+ ) => Promise<Service.WorkorderRequest.Find.Result>;
665
+ get: (
666
+ id: Service.WorkorderRequest.Get.ID,
667
+ params?: Service.WorkorderRequest.Get.Params
668
+ ) => Promise<Service.WorkorderRequest.Get.Result>;
669
+ create: (
670
+ body: Service.WorkorderRequest.Create.Body
671
+ ) => Promise<Service.WorkorderRequest.Create.Result>;
672
+ update: (
673
+ id: Service.WorkorderRequest.Update.ID,
674
+ body: Service.WorkorderRequest.Update.Body
675
+ ) => Promise<Service.WorkorderRequest.Update.Result>;
676
+ remove: (
677
+ id: Service.WorkorderRequest.Remove.ID
678
+ ) => Promise<Service.WorkorderRequest.Remove.Result>;
679
+ };
658
680
  supplier: {
659
681
  _path: "supplier";
660
682
  find: (
@@ -1338,4 +1360,11 @@ export default class Repzo {
1338
1360
  params: Service.ApprovalRequest.Remove.Params
1339
1361
  ) => Promise<Service.ApprovalRequest.Remove.Result>;
1340
1362
  };
1363
+ safeInvoiceSerialCounter: {
1364
+ _path: "safe-invoice-serial-counter";
1365
+ update: (
1366
+ id: Service.SafeInvoiceSerialCounter.Update.ID,
1367
+ body: Service.SafeInvoiceSerialCounter.Update.Body
1368
+ ) => Promise<Service.SafeInvoiceSerialCounter.Update.Result>;
1369
+ };
1341
1370
  }
package/lib/index.js CHANGED
@@ -34,6 +34,7 @@ export default class Repzo {
34
34
  CUSTOM_LIST_ITEM: "custom-list-item",
35
35
  INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
36
36
  WORKORDER: "workorder",
37
+ WORKORDER_REQUEST: "workorder-request",
37
38
  SUPPLIER: "supplier",
38
39
  QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
39
40
  VISIT: "visit",
@@ -75,6 +76,7 @@ export default class Repzo {
75
76
  SETTINGS: "settings",
76
77
  MAIL_UNSUBSCRIBE: "mail-unsubscribe",
77
78
  APPROVAL_REQUEST: "approval-request",
79
+ SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
78
80
  };
79
81
  this.END_POINTS = this._end_points;
80
82
  this.client = {
@@ -1273,6 +1275,47 @@ export default class Repzo {
1273
1275
  return res;
1274
1276
  },
1275
1277
  };
1278
+ this.workorderRequest = {
1279
+ _path: this._end_points.WORKORDER_REQUEST,
1280
+ find: async (params) => {
1281
+ let res = await this._fetch(
1282
+ this.svAPIEndpoint,
1283
+ this.workorderRequest._path,
1284
+ params
1285
+ );
1286
+ return res;
1287
+ },
1288
+ get: async (id, params) => {
1289
+ return await this._fetch(
1290
+ this.svAPIEndpoint,
1291
+ this.workorderRequest._path + `/${id}`,
1292
+ params
1293
+ );
1294
+ },
1295
+ create: async (body) => {
1296
+ let res = await this._create(
1297
+ this.svAPIEndpoint,
1298
+ this.workorderRequest._path,
1299
+ body
1300
+ );
1301
+ return res;
1302
+ },
1303
+ update: async (id, body) => {
1304
+ let res = await this._update(
1305
+ this.svAPIEndpoint,
1306
+ this.workorderRequest._path + `/${id}`,
1307
+ body
1308
+ );
1309
+ return res;
1310
+ },
1311
+ remove: async (id) => {
1312
+ let res = await this._delete(
1313
+ this.svAPIEndpoint,
1314
+ this.workorderRequest._path + `/${id}`
1315
+ );
1316
+ return res;
1317
+ },
1318
+ };
1276
1319
  this.supplier = {
1277
1320
  _path: this._end_points.SUPPLIER,
1278
1321
  find: async (params) => {
@@ -2467,6 +2510,17 @@ export default class Repzo {
2467
2510
  return res;
2468
2511
  },
2469
2512
  };
2513
+ this.safeInvoiceSerialCounter = {
2514
+ _path: this._end_points.SAFE_INVOICE_SERIAL_COUNTER,
2515
+ update: async (id, body) => {
2516
+ let res = await this._update(
2517
+ this.svAPIEndpoint,
2518
+ this.safeInvoiceSerialCounter._path + `/${id}`,
2519
+ body
2520
+ );
2521
+ return res;
2522
+ },
2523
+ };
2470
2524
  this.svAPIEndpoint =
2471
2525
  !options?.env || options?.env == "production"
2472
2526
  ? "https://sv.api.repzo.me"
@@ -90,11 +90,15 @@ interface Check {
90
90
  disabled?: boolean;
91
91
  }
92
92
  interface AssetUnitsPopulated {
93
+ _id: StringId;
93
94
  name: string;
95
+ local_name?: string;
94
96
  cover_photo: MediaPopulated;
95
97
  }
96
98
  interface AssetsPopulated {
99
+ _id: StringId;
97
100
  name: string;
101
+ local_name?: string;
98
102
  cover_photo: MediaPopulated;
99
103
  }
100
104
  interface RepresentativesPopulated {
@@ -102,7 +106,9 @@ interface RepresentativesPopulated {
102
106
  _id: string;
103
107
  }
104
108
  interface ClientLocationPopulated {
109
+ _id: StringId;
105
110
  name: string;
111
+ local_name?: string;
106
112
  }
107
113
  interface FormPopulated {
108
114
  name: string;
@@ -171,7 +177,9 @@ export interface DefaultPaginationQueryParams {
171
177
  sortPageOrder?: "asc" | "dsc";
172
178
  }
173
179
  interface WorkorderCategoryPopulated {
180
+ _id: StringId;
174
181
  name: string;
182
+ local_name?: string;
175
183
  }
176
184
  export interface DefaultPaginationResult {
177
185
  total_result: number;
@@ -5220,6 +5228,192 @@ export declare namespace Service {
5220
5228
  }
5221
5229
  export {};
5222
5230
  }
5231
+ namespace WorkorderRequest {
5232
+ export type Status = "pending" | "rejected" | "approved";
5233
+ export interface Data {
5234
+ _id: StringId;
5235
+ name: string;
5236
+ disabled: boolean;
5237
+ client?: StringId;
5238
+ client_location?: StringId;
5239
+ workorder_categories?: StringId[];
5240
+ workorder?: StringId;
5241
+ contract?: StringId;
5242
+ status: Status;
5243
+ customFields?: {
5244
+ [key: string]: any;
5245
+ };
5246
+ media?: StringId[];
5247
+ workorder_portal?: StringId;
5248
+ workorder_portal_link?: StringId;
5249
+ creator: AdminCreator | RepCreator | ClientCreator;
5250
+ editor?: AdminCreator | RepCreator | ClientCreator;
5251
+ teams?: StringId[];
5252
+ sync_id: string;
5253
+ description?: string;
5254
+ assets?: StringId[];
5255
+ asset_units?: StringId[];
5256
+ priority?: Priority;
5257
+ priority_human?: Priority_human;
5258
+ company_namespace: string[];
5259
+ createdAt: Date;
5260
+ updatedAt: Date;
5261
+ }
5262
+ export interface PopulatedData {
5263
+ _id: StringId;
5264
+ name: string;
5265
+ disabled: boolean;
5266
+ client?: StringId;
5267
+ client_location?: StringId;
5268
+ workorder_categories?: StringId[];
5269
+ workorder?: StringId;
5270
+ contract?: StringId;
5271
+ status: Status;
5272
+ customFields?: {
5273
+ [key: string]: any;
5274
+ };
5275
+ media?: StringId[];
5276
+ workorder_portal?: StringId;
5277
+ workorder_portal_link?: StringId;
5278
+ creator: AdminCreator | RepCreator | ClientCreator;
5279
+ editor?: AdminCreator | RepCreator | ClientCreator;
5280
+ teams?: StringId[];
5281
+ sync_id: string;
5282
+ description?: string;
5283
+ assets?: StringId[];
5284
+ asset_units?: StringId[];
5285
+ priority?: Priority;
5286
+ priority_human?: Priority_human;
5287
+ company_namespace: string[];
5288
+ createdAt: Date;
5289
+ updatedAt: Date;
5290
+ client_populated?: Pick<
5291
+ Client.ClientSchema,
5292
+ "client_code" | "name" | "_id"
5293
+ >;
5294
+ asset_units_populated?: AssetUnitsPopulated[];
5295
+ assets_populated?: AssetsPopulated[];
5296
+ client_location_populated?: ClientLocationPopulated;
5297
+ workorder_categories_populated?: WorkorderCategoryPopulated[];
5298
+ media_populated?: MediaPopulated;
5299
+ workorder_populated?: Workorder.WorkorderSchema;
5300
+ }
5301
+ export interface CreateBody {
5302
+ name: string;
5303
+ disabled?: boolean;
5304
+ client?: StringId;
5305
+ client_location?: StringId;
5306
+ workorder_categories?: StringId[];
5307
+ workorder?: StringId;
5308
+ contract?: StringId;
5309
+ status?: Status;
5310
+ customFields?: {
5311
+ [key: string]: any;
5312
+ };
5313
+ media?: StringId[];
5314
+ workorder_portal?: StringId;
5315
+ workorder_portal_link?: StringId;
5316
+ creator?: AdminCreator | RepCreator | ClientCreator;
5317
+ teams?: StringId[];
5318
+ sync_id: string;
5319
+ description?: string;
5320
+ assets?: StringId[];
5321
+ asset_units?: StringId[];
5322
+ priority?: Priority;
5323
+ priority_human?: Priority_human;
5324
+ company_namespace?: string[];
5325
+ }
5326
+ export interface UpdateBody {
5327
+ _id?: StringId;
5328
+ name?: string;
5329
+ disabled?: boolean;
5330
+ client?: StringId;
5331
+ client_location?: StringId;
5332
+ workorder_categories?: StringId[];
5333
+ workorder?: StringId;
5334
+ contract?: StringId;
5335
+ status?: Status;
5336
+ customFields?: {
5337
+ [key: string]: any;
5338
+ };
5339
+ media?: StringId[];
5340
+ workorder_portal?: StringId;
5341
+ workorder_portal_link?: StringId;
5342
+ creator?: AdminCreator | RepCreator | ClientCreator;
5343
+ editor?: AdminCreator | RepCreator | ClientCreator;
5344
+ teams?: StringId[];
5345
+ sync_id?: string;
5346
+ description?: string;
5347
+ assets?: StringId[];
5348
+ asset_units?: StringId[];
5349
+ priority?: Priority;
5350
+ priority_human?: Priority_human;
5351
+ company_namespace?: string[];
5352
+ createdAt?: Date;
5353
+ updatedAt?: Date;
5354
+ }
5355
+ type SortingKeys = "priority" | "updatedAt" | "createdAt" | "_id";
5356
+ type PopulatedKeys =
5357
+ | "client"
5358
+ | "client_location"
5359
+ | "asset_units"
5360
+ | "assets"
5361
+ | "workorder_categories"
5362
+ | "media"
5363
+ | "workorder";
5364
+ export namespace Find {
5365
+ type Params = DefaultPaginationQueryParams & {
5366
+ name?: string | string[];
5367
+ _id?: StringId | StringId[];
5368
+ priority?: Priority | Priority[];
5369
+ priority_human?: Priority_human | Priority_human[];
5370
+ status?: Status | Status[];
5371
+ workorder_categories?: StringId | StringId[];
5372
+ client_location?: StringId | StringId[];
5373
+ client?: StringId | StringId[];
5374
+ assets?: StringId | StringId[];
5375
+ asset_units?: StringId | StringId[];
5376
+ from_createdAt?: number;
5377
+ to_createdAt?: number;
5378
+ from_updatedAt?: number;
5379
+ to_updatedAt?: number;
5380
+ teams?: StringId | StringId[];
5381
+ "creator._id"?: StringId | StringId[];
5382
+ search?: string;
5383
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
5384
+ sortBy?: {
5385
+ field: SortingKeys;
5386
+ type: "asc" | "desc";
5387
+ }[];
5388
+ [key: string]: any;
5389
+ };
5390
+ interface Result extends DefaultPaginationResult {
5391
+ data: Data[] | PopulatedData[];
5392
+ }
5393
+ }
5394
+ export namespace Get {
5395
+ type ID = string;
5396
+ interface Params {
5397
+ populatedKeys?: PopulatedKeys[];
5398
+ [key: string]: any;
5399
+ }
5400
+ type Result = Data | PopulatedData;
5401
+ }
5402
+ export namespace Create {
5403
+ type Body = CreateBody;
5404
+ type Result = Data;
5405
+ }
5406
+ export namespace Update {
5407
+ type ID = string;
5408
+ type Body = UpdateBody;
5409
+ type Result = Data;
5410
+ }
5411
+ export namespace Remove {
5412
+ type ID = string;
5413
+ type Result = Data;
5414
+ }
5415
+ export {};
5416
+ }
5223
5417
  namespace QuickConvertToPdf {
5224
5418
  export interface QuickConvertToPdfSchema {
5225
5419
  _id?: string;
@@ -6742,7 +6936,7 @@ export declare namespace Service {
6742
6936
  };
6743
6937
  cycle: Cycle.Schema & {
6744
6938
  can_edit: boolean;
6745
- current_nodes: string[];
6939
+ current_nodes: string[] | AdminOrRep[];
6746
6940
  };
6747
6941
  };
6748
6942
  }
@@ -12738,6 +12932,16 @@ export declare namespace Service {
12738
12932
  }
12739
12933
  export {};
12740
12934
  }
12935
+ namespace SafeInvoiceSerialCounter {
12936
+ interface UpdateBody {
12937
+ counter: number;
12938
+ }
12939
+ namespace Update {
12940
+ type ID = StringId;
12941
+ type Body = UpdateBody;
12942
+ type Result = Settings.Data;
12943
+ }
12944
+ }
12741
12945
  }
12742
12946
  export type StringId = string;
12743
12947
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.118",
3
+ "version": "1.0.120",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -69,6 +69,7 @@ export default class Repzo {
69
69
  CUSTOM_LIST_ITEM: "custom-list-item",
70
70
  INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
71
71
  WORKORDER: "workorder",
72
+ WORKORDER_REQUEST: "workorder-request",
72
73
  SUPPLIER: "supplier",
73
74
  QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
74
75
  VISIT: "visit",
@@ -110,6 +111,7 @@ export default class Repzo {
110
111
  SETTINGS: "settings",
111
112
  MAIL_UNSUBSCRIBE: "mail-unsubscribe",
112
113
  APPROVAL_REQUEST: "approval-request",
114
+ SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
113
115
  } as const;
114
116
  public END_POINTS = this._end_points;
115
117
  private async _fetch(baseUrl: string, path: string, params?: Params) {
@@ -1822,6 +1824,60 @@ export default class Repzo {
1822
1824
  },
1823
1825
  };
1824
1826
 
1827
+ workorderRequest = {
1828
+ _path: this._end_points.WORKORDER_REQUEST,
1829
+ find: async (
1830
+ params?: Service.WorkorderRequest.Find.Params
1831
+ ): Promise<Service.WorkorderRequest.Find.Result> => {
1832
+ let res: Service.WorkorderRequest.Find.Result = await this._fetch(
1833
+ this.svAPIEndpoint,
1834
+ this.workorderRequest._path,
1835
+ params
1836
+ );
1837
+ return res;
1838
+ },
1839
+ get: async (
1840
+ id: Service.WorkorderRequest.Get.ID,
1841
+ params?: Service.WorkorderRequest.Get.Params
1842
+ ): Promise<Service.WorkorderRequest.Get.Result> => {
1843
+ return await this._fetch(
1844
+ this.svAPIEndpoint,
1845
+ this.workorderRequest._path + `/${id}`,
1846
+ params
1847
+ );
1848
+ },
1849
+ create: async (
1850
+ body: Service.WorkorderRequest.Create.Body
1851
+ ): Promise<Service.WorkorderRequest.Create.Result> => {
1852
+ let res = await this._create(
1853
+ this.svAPIEndpoint,
1854
+ this.workorderRequest._path,
1855
+ body
1856
+ );
1857
+ return res;
1858
+ },
1859
+ update: async (
1860
+ id: Service.WorkorderRequest.Update.ID,
1861
+ body: Service.WorkorderRequest.Update.Body
1862
+ ): Promise<Service.WorkorderRequest.Update.Result> => {
1863
+ let res: Service.WorkorderRequest.Update.Result = await this._update(
1864
+ this.svAPIEndpoint,
1865
+ this.workorderRequest._path + `/${id}`,
1866
+ body
1867
+ );
1868
+ return res;
1869
+ },
1870
+ remove: async (
1871
+ id: Service.WorkorderRequest.Remove.ID
1872
+ ): Promise<Service.WorkorderRequest.Remove.Result> => {
1873
+ let res: Service.WorkorderRequest.Remove.Result = await this._delete(
1874
+ this.svAPIEndpoint,
1875
+ this.workorderRequest._path + `/${id}`
1876
+ );
1877
+ return res;
1878
+ },
1879
+ };
1880
+
1825
1881
  supplier = {
1826
1882
  _path: this._end_points.SUPPLIER,
1827
1883
  find: async (
@@ -3798,6 +3854,22 @@ export default class Repzo {
3798
3854
  return res;
3799
3855
  },
3800
3856
  };
3857
+
3858
+ safeInvoiceSerialCounter = {
3859
+ _path: this._end_points.SAFE_INVOICE_SERIAL_COUNTER,
3860
+
3861
+ update: async (
3862
+ id: Service.SafeInvoiceSerialCounter.Update.ID,
3863
+ body: Service.SafeInvoiceSerialCounter.Update.Body
3864
+ ): Promise<Service.SafeInvoiceSerialCounter.Update.Result> => {
3865
+ let res: Service.SafeInvoiceSerialCounter.Update.Result = await this._update(
3866
+ this.svAPIEndpoint,
3867
+ this.safeInvoiceSerialCounter._path + `/${id}`,
3868
+ body
3869
+ );
3870
+ return res;
3871
+ },
3872
+ };
3801
3873
  }
3802
3874
 
3803
3875
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -93,11 +93,15 @@ interface Check {
93
93
  }
94
94
 
95
95
  interface AssetUnitsPopulated {
96
+ _id: StringId;
96
97
  name: string;
98
+ local_name?: string;
97
99
  cover_photo: MediaPopulated;
98
100
  }
99
101
  interface AssetsPopulated {
102
+ _id: StringId;
100
103
  name: string;
104
+ local_name?: string;
101
105
  cover_photo: MediaPopulated;
102
106
  }
103
107
  interface RepresentativesPopulated {
@@ -105,7 +109,9 @@ interface RepresentativesPopulated {
105
109
  _id: string;
106
110
  }
107
111
  interface ClientLocationPopulated {
112
+ _id: StringId;
108
113
  name: string;
114
+ local_name?: string;
109
115
  }
110
116
  interface FormPopulated {
111
117
  name: string;
@@ -176,7 +182,9 @@ export interface DefaultPaginationQueryParams {
176
182
  sortPageOrder?: "asc" | "dsc";
177
183
  }
178
184
  interface WorkorderCategoryPopulated {
185
+ _id: StringId;
179
186
  name: string;
187
+ local_name?: string;
180
188
  }
181
189
  export interface DefaultPaginationResult {
182
190
  total_result: number;
@@ -5242,6 +5250,182 @@ export namespace Service {
5242
5250
  }
5243
5251
  }
5244
5252
 
5253
+ export namespace WorkorderRequest {
5254
+ export type Status = "pending" | "rejected" | "approved";
5255
+ export interface Data {
5256
+ _id: StringId;
5257
+ name: string;
5258
+ disabled: boolean;
5259
+ client?: StringId;
5260
+ client_location?: StringId;
5261
+ workorder_categories?: StringId[];
5262
+ workorder?: StringId;
5263
+ contract?: StringId;
5264
+ status: Status;
5265
+ customFields?: { [key: string]: any };
5266
+ media?: StringId[];
5267
+ workorder_portal?: StringId;
5268
+ workorder_portal_link?: StringId;
5269
+ creator: AdminCreator | RepCreator | ClientCreator;
5270
+ editor?: AdminCreator | RepCreator | ClientCreator;
5271
+ teams?: StringId[];
5272
+ sync_id: string;
5273
+ description?: string;
5274
+ assets?: StringId[];
5275
+ asset_units?: StringId[];
5276
+ priority?: Priority;
5277
+ priority_human?: Priority_human;
5278
+ company_namespace: string[];
5279
+ createdAt: Date;
5280
+ updatedAt: Date;
5281
+ }
5282
+ export interface PopulatedData {
5283
+ _id: StringId;
5284
+ name: string;
5285
+ disabled: boolean;
5286
+ client?: StringId;
5287
+ client_location?: StringId;
5288
+ workorder_categories?: StringId[];
5289
+ workorder?: StringId;
5290
+ contract?: StringId;
5291
+ status: Status;
5292
+ customFields?: { [key: string]: any };
5293
+ media?: StringId[];
5294
+ workorder_portal?: StringId;
5295
+ workorder_portal_link?: StringId;
5296
+ creator: AdminCreator | RepCreator | ClientCreator;
5297
+ editor?: AdminCreator | RepCreator | ClientCreator;
5298
+ teams?: StringId[];
5299
+ sync_id: string;
5300
+ description?: string;
5301
+ assets?: StringId[];
5302
+ asset_units?: StringId[];
5303
+ priority?: Priority;
5304
+ priority_human?: Priority_human;
5305
+ company_namespace: string[];
5306
+ createdAt: Date;
5307
+ updatedAt: Date;
5308
+ client_populated?: Pick<
5309
+ Client.ClientSchema,
5310
+ "client_code" | "name" | "_id"
5311
+ >;
5312
+ asset_units_populated?: AssetUnitsPopulated[];
5313
+ assets_populated?: AssetsPopulated[];
5314
+ client_location_populated?: ClientLocationPopulated;
5315
+ workorder_categories_populated?: WorkorderCategoryPopulated[];
5316
+ media_populated?: MediaPopulated;
5317
+ workorder_populated?: Workorder.WorkorderSchema;
5318
+ }
5319
+ export interface CreateBody {
5320
+ name: string;
5321
+ disabled?: boolean;
5322
+ client?: StringId;
5323
+ client_location?: StringId;
5324
+ workorder_categories?: StringId[];
5325
+ workorder?: StringId;
5326
+ contract?: StringId;
5327
+ status?: Status;
5328
+ customFields?: { [key: string]: any };
5329
+ media?: StringId[];
5330
+ workorder_portal?: StringId;
5331
+ workorder_portal_link?: StringId;
5332
+ creator?: AdminCreator | RepCreator | ClientCreator;
5333
+ teams?: StringId[];
5334
+ sync_id: string;
5335
+ description?: string;
5336
+ assets?: StringId[];
5337
+ asset_units?: StringId[];
5338
+ priority?: Priority;
5339
+ priority_human?: Priority_human;
5340
+ company_namespace?: string[];
5341
+ }
5342
+ export interface UpdateBody {
5343
+ _id?: StringId;
5344
+ name?: string;
5345
+ disabled?: boolean;
5346
+ client?: StringId;
5347
+ client_location?: StringId;
5348
+ workorder_categories?: StringId[];
5349
+ workorder?: StringId;
5350
+ contract?: StringId;
5351
+ status?: Status;
5352
+ customFields?: { [key: string]: any };
5353
+ media?: StringId[];
5354
+ workorder_portal?: StringId;
5355
+ workorder_portal_link?: StringId;
5356
+ creator?: AdminCreator | RepCreator | ClientCreator;
5357
+ editor?: AdminCreator | RepCreator | ClientCreator;
5358
+ teams?: StringId[];
5359
+ sync_id?: string;
5360
+ description?: string;
5361
+ assets?: StringId[];
5362
+ asset_units?: StringId[];
5363
+ priority?: Priority;
5364
+ priority_human?: Priority_human;
5365
+ company_namespace?: string[];
5366
+ createdAt?: Date;
5367
+ updatedAt?: Date;
5368
+ }
5369
+
5370
+ type SortingKeys = "priority" | "updatedAt" | "createdAt" | "_id";
5371
+ type PopulatedKeys =
5372
+ | "client"
5373
+ | "client_location"
5374
+ | "asset_units"
5375
+ | "assets"
5376
+ | "workorder_categories"
5377
+ | "media"
5378
+ | "workorder";
5379
+ export namespace Find {
5380
+ export type Params = DefaultPaginationQueryParams & {
5381
+ name?: string | string[];
5382
+ _id?: StringId | StringId[];
5383
+ priority?: Priority | Priority[];
5384
+ priority_human?: Priority_human | Priority_human[];
5385
+ status?: Status | Status[];
5386
+ workorder_categories?: StringId | StringId[];
5387
+ client_location?: StringId | StringId[];
5388
+ client?: StringId | StringId[];
5389
+ assets?: StringId | StringId[];
5390
+ asset_units?: StringId | StringId[];
5391
+ from_createdAt?: number;
5392
+ to_createdAt?: number;
5393
+ from_updatedAt?: number;
5394
+ to_updatedAt?: number;
5395
+ teams?: StringId | StringId[];
5396
+ "creator._id"?: StringId | StringId[];
5397
+ search?: string;
5398
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
5399
+ sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
5400
+ [key: string]: any; // integration_meta.
5401
+ };
5402
+ export interface Result extends DefaultPaginationResult {
5403
+ data: Data[] | PopulatedData[];
5404
+ }
5405
+ }
5406
+ export namespace Get {
5407
+ export type ID = string;
5408
+ export interface Params {
5409
+ populatedKeys?: PopulatedKeys[];
5410
+ [key: string]: any;
5411
+ }
5412
+ export type Result = Data | PopulatedData;
5413
+ }
5414
+ export namespace Create {
5415
+ export type Body = CreateBody;
5416
+ export type Result = Data;
5417
+ }
5418
+ export namespace Update {
5419
+ export type ID = string;
5420
+ export type Body = UpdateBody;
5421
+ export type Result = Data;
5422
+ }
5423
+ export namespace Remove {
5424
+ export type ID = string;
5425
+ export type Result = Data;
5426
+ }
5427
+ }
5428
+
5245
5429
  export namespace QuickConvertToPdf {
5246
5430
  export interface QuickConvertToPdfSchema {
5247
5431
  _id?: string;
@@ -6648,7 +6832,7 @@ export namespace Service {
6648
6832
  };
6649
6833
  cycle: Cycle.Schema & {
6650
6834
  can_edit: boolean;
6651
- current_nodes: string[];
6835
+ current_nodes: string[] | AdminOrRep[];
6652
6836
  };
6653
6837
  };
6654
6838
  }
@@ -12276,6 +12460,17 @@ export namespace Service {
12276
12460
  export type Result = Data;
12277
12461
  }
12278
12462
  }
12463
+
12464
+ export namespace SafeInvoiceSerialCounter {
12465
+ export interface UpdateBody {
12466
+ counter: number;
12467
+ }
12468
+ export namespace Update {
12469
+ export type ID = StringId;
12470
+ export type Body = UpdateBody;
12471
+ export type Result = Settings.Data;
12472
+ }
12473
+ }
12279
12474
  }
12280
12475
 
12281
12476
  export type StringId = string;