repzo 1.0.107 → 1.0.109
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 +22 -0
- package/lib/index.js +49 -0
- package/lib/types/index.d.ts +869 -83
- package/package.json +1 -1
- package/src/index.ts +64 -0
- package/src/types/index.ts +752 -83
package/lib/index.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export default class Repzo {
|
|
|
83
83
|
readonly ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order";
|
|
84
84
|
readonly OCR_INVOICE_JOB: "ocr-invoice-job";
|
|
85
85
|
readonly OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page";
|
|
86
|
+
readonly SETTINGS: "settings";
|
|
86
87
|
};
|
|
87
88
|
private _fetch;
|
|
88
89
|
private _create;
|
|
@@ -641,6 +642,16 @@ export default class Repzo {
|
|
|
641
642
|
id: Service.Workorder.Get.ID,
|
|
642
643
|
params?: Service.Workorder.Get.Params
|
|
643
644
|
) => Promise<Service.Workorder.Get.Result>;
|
|
645
|
+
create: (
|
|
646
|
+
body: Service.Workorder.Create.Body
|
|
647
|
+
) => Promise<Service.Workorder.Create.Result>;
|
|
648
|
+
update: (
|
|
649
|
+
id: Service.Workorder.Update.ID,
|
|
650
|
+
body: Service.Workorder.Update.Body
|
|
651
|
+
) => Promise<Service.Workorder.Update.Result>;
|
|
652
|
+
remove: (
|
|
653
|
+
id: Service.Workorder.Remove.ID
|
|
654
|
+
) => Promise<Service.Workorder.Remove.Result>;
|
|
644
655
|
};
|
|
645
656
|
supplier: {
|
|
646
657
|
_path: "supplier";
|
|
@@ -1284,4 +1295,15 @@ export default class Repzo {
|
|
|
1284
1295
|
body: Service.OcrInvoiceJobPage.Update.Body
|
|
1285
1296
|
) => Promise<Service.OcrInvoiceJobPage.Update.Result>;
|
|
1286
1297
|
};
|
|
1298
|
+
settings: {
|
|
1299
|
+
_path: "settings";
|
|
1300
|
+
find: (
|
|
1301
|
+
params?: Service.Settings.Find.Params
|
|
1302
|
+
) => Promise<Service.Settings.Find.Result>;
|
|
1303
|
+
get: (id: Service.Settings.Get.ID) => Promise<Service.Settings.Get.Result>;
|
|
1304
|
+
update: (
|
|
1305
|
+
id: Service.Settings.Update.ID,
|
|
1306
|
+
body: Service.Settings.Update.Body
|
|
1307
|
+
) => Promise<Service.Settings.Update.Result>;
|
|
1308
|
+
};
|
|
1287
1309
|
}
|
package/lib/index.js
CHANGED
|
@@ -72,6 +72,7 @@ export default class Repzo {
|
|
|
72
72
|
ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order",
|
|
73
73
|
OCR_INVOICE_JOB: "ocr-invoice-job",
|
|
74
74
|
OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
|
|
75
|
+
SETTINGS: "settings",
|
|
75
76
|
};
|
|
76
77
|
this.END_POINTS = this._end_points;
|
|
77
78
|
this.client = {
|
|
@@ -1246,6 +1247,29 @@ export default class Repzo {
|
|
|
1246
1247
|
params
|
|
1247
1248
|
);
|
|
1248
1249
|
},
|
|
1250
|
+
create: async (body) => {
|
|
1251
|
+
let res = await this._create(
|
|
1252
|
+
this.svAPIEndpoint,
|
|
1253
|
+
this.workorder._path,
|
|
1254
|
+
body
|
|
1255
|
+
);
|
|
1256
|
+
return res;
|
|
1257
|
+
},
|
|
1258
|
+
update: async (id, body) => {
|
|
1259
|
+
let res = await this._update(
|
|
1260
|
+
this.svAPIEndpoint,
|
|
1261
|
+
this.workorder._path + `/${id}`,
|
|
1262
|
+
body
|
|
1263
|
+
);
|
|
1264
|
+
return res;
|
|
1265
|
+
},
|
|
1266
|
+
remove: async (id) => {
|
|
1267
|
+
let res = await this._delete(
|
|
1268
|
+
this.svAPIEndpoint,
|
|
1269
|
+
this.workorder._path + `/${id}`
|
|
1270
|
+
);
|
|
1271
|
+
return res;
|
|
1272
|
+
},
|
|
1249
1273
|
};
|
|
1250
1274
|
this.supplier = {
|
|
1251
1275
|
_path: this._end_points.SUPPLIER,
|
|
@@ -2356,6 +2380,31 @@ export default class Repzo {
|
|
|
2356
2380
|
return res;
|
|
2357
2381
|
},
|
|
2358
2382
|
};
|
|
2383
|
+
this.settings = {
|
|
2384
|
+
_path: this._end_points.SETTINGS,
|
|
2385
|
+
find: async (params) => {
|
|
2386
|
+
let res = await this._fetch(
|
|
2387
|
+
this.svAPIEndpoint,
|
|
2388
|
+
this.settings._path,
|
|
2389
|
+
params
|
|
2390
|
+
);
|
|
2391
|
+
return res;
|
|
2392
|
+
},
|
|
2393
|
+
get: async (id) => {
|
|
2394
|
+
return await this._fetch(
|
|
2395
|
+
this.svAPIEndpoint,
|
|
2396
|
+
this.settings._path + `/${id}`
|
|
2397
|
+
);
|
|
2398
|
+
},
|
|
2399
|
+
update: async (id, body) => {
|
|
2400
|
+
let res = await this._update(
|
|
2401
|
+
this.svAPIEndpoint,
|
|
2402
|
+
this.settings._path + `/${id}`,
|
|
2403
|
+
body
|
|
2404
|
+
);
|
|
2405
|
+
return res;
|
|
2406
|
+
},
|
|
2407
|
+
};
|
|
2359
2408
|
this.svAPIEndpoint =
|
|
2360
2409
|
!options?.env || options?.env == "production"
|
|
2361
2410
|
? "https://sv.api.repzo.me"
|