repzo 1.0.119 → 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 +1 -0
- package/lib/index.d.ts +21 -0
- package/lib/index.js +42 -0
- package/lib/types/index.d.ts +194 -0
- package/package.json +1 -1
- package/src/index.ts +55 -0
- package/src/types/index.ts +184 -0
package/changelog.md
CHANGED
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";
|
|
@@ -656,6 +657,26 @@ export default class Repzo {
|
|
|
656
657
|
id: Service.Workorder.Remove.ID
|
|
657
658
|
) => Promise<Service.Workorder.Remove.Result>;
|
|
658
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
|
+
};
|
|
659
680
|
supplier: {
|
|
660
681
|
_path: "supplier";
|
|
661
682
|
find: (
|
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",
|
|
@@ -1274,6 +1275,47 @@ export default class Repzo {
|
|
|
1274
1275
|
return res;
|
|
1275
1276
|
},
|
|
1276
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
|
+
};
|
|
1277
1319
|
this.supplier = {
|
|
1278
1320
|
_path: this._end_points.SUPPLIER,
|
|
1279
1321
|
find: async (params) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -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;
|
package/package.json
CHANGED
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",
|
|
@@ -1823,6 +1824,60 @@ export default class Repzo {
|
|
|
1823
1824
|
},
|
|
1824
1825
|
};
|
|
1825
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
|
+
|
|
1826
1881
|
supplier = {
|
|
1827
1882
|
_path: this._end_points.SUPPLIER,
|
|
1828
1883
|
find: async (
|
package/src/types/index.ts
CHANGED
|
@@ -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;
|