repzo 1.0.117 → 1.0.119
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 +8 -0
- package/lib/index.js +12 -0
- package/lib/types/index.d.ts +32 -3
- package/package.json +1 -1
- package/src/index.ts +17 -0
- package/src/types/index.ts +34 -3
package/lib/index.d.ts
CHANGED
|
@@ -86,6 +86,7 @@ export default class Repzo {
|
|
|
86
86
|
readonly SETTINGS: "settings";
|
|
87
87
|
readonly MAIL_UNSUBSCRIBE: "mail-unsubscribe";
|
|
88
88
|
readonly APPROVAL_REQUEST: "approval-request";
|
|
89
|
+
readonly SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter";
|
|
89
90
|
};
|
|
90
91
|
private _fetch;
|
|
91
92
|
private _create;
|
|
@@ -1338,4 +1339,11 @@ export default class Repzo {
|
|
|
1338
1339
|
params: Service.ApprovalRequest.Remove.Params
|
|
1339
1340
|
) => Promise<Service.ApprovalRequest.Remove.Result>;
|
|
1340
1341
|
};
|
|
1342
|
+
safeInvoiceSerialCounter: {
|
|
1343
|
+
_path: "safe-invoice-serial-counter";
|
|
1344
|
+
update: (
|
|
1345
|
+
id: Service.SafeInvoiceSerialCounter.Update.ID,
|
|
1346
|
+
body: Service.SafeInvoiceSerialCounter.Update.Body
|
|
1347
|
+
) => Promise<Service.SafeInvoiceSerialCounter.Update.Result>;
|
|
1348
|
+
};
|
|
1341
1349
|
}
|
package/lib/index.js
CHANGED
|
@@ -75,6 +75,7 @@ export default class Repzo {
|
|
|
75
75
|
SETTINGS: "settings",
|
|
76
76
|
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
77
77
|
APPROVAL_REQUEST: "approval-request",
|
|
78
|
+
SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
|
|
78
79
|
};
|
|
79
80
|
this.END_POINTS = this._end_points;
|
|
80
81
|
this.client = {
|
|
@@ -2467,6 +2468,17 @@ export default class Repzo {
|
|
|
2467
2468
|
return res;
|
|
2468
2469
|
},
|
|
2469
2470
|
};
|
|
2471
|
+
this.safeInvoiceSerialCounter = {
|
|
2472
|
+
_path: this._end_points.SAFE_INVOICE_SERIAL_COUNTER,
|
|
2473
|
+
update: async (id, body) => {
|
|
2474
|
+
let res = await this._update(
|
|
2475
|
+
this.svAPIEndpoint,
|
|
2476
|
+
this.safeInvoiceSerialCounter._path + `/${id}`,
|
|
2477
|
+
body
|
|
2478
|
+
);
|
|
2479
|
+
return res;
|
|
2480
|
+
},
|
|
2481
|
+
};
|
|
2470
2482
|
this.svAPIEndpoint =
|
|
2471
2483
|
!options?.env || options?.env == "production"
|
|
2472
2484
|
? "https://sv.api.repzo.me"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -338,7 +338,24 @@ export type DocumentTypes =
|
|
|
338
338
|
| "sv.activitiesstorechecks"
|
|
339
339
|
| "retailExecutionPreset"
|
|
340
340
|
| "paymentMethod"
|
|
341
|
-
| "approvalRequest"
|
|
341
|
+
| "approvalRequest"
|
|
342
|
+
| "activityFormV2Result"
|
|
343
|
+
| "formV2"
|
|
344
|
+
| "payments"
|
|
345
|
+
| "ocrInvoiceJob"
|
|
346
|
+
| "contract"
|
|
347
|
+
| "contractInstallment"
|
|
348
|
+
| "form"
|
|
349
|
+
| "paymentMethod"
|
|
350
|
+
| "aiObjectDetectionModelVersion"
|
|
351
|
+
| "aiObjectDetectionTask"
|
|
352
|
+
| "assetPart"
|
|
353
|
+
| "assetPartReceival"
|
|
354
|
+
| "assetPartUnit"
|
|
355
|
+
| "returnAssetPartUnit"
|
|
356
|
+
| "storeAssetPartUnit"
|
|
357
|
+
| "activityAiSalesOrder"
|
|
358
|
+
| "ocrInvoiceJobGroup";
|
|
342
359
|
export type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
|
|
343
360
|
export interface MediaDoc {
|
|
344
361
|
_id?: string;
|
|
@@ -355,7 +372,9 @@ export interface MediaDoc {
|
|
|
355
372
|
| "thumbnail"
|
|
356
373
|
| "doc"
|
|
357
374
|
| "docx"
|
|
358
|
-
| "images"
|
|
375
|
+
| "images"
|
|
376
|
+
| "zip"
|
|
377
|
+
| "pt";
|
|
359
378
|
mime_type: "image/jpeg" | string;
|
|
360
379
|
ContentType: "image/jpeg" | string;
|
|
361
380
|
file_name: string;
|
|
@@ -6723,7 +6742,7 @@ export declare namespace Service {
|
|
|
6723
6742
|
};
|
|
6724
6743
|
cycle: Cycle.Schema & {
|
|
6725
6744
|
can_edit: boolean;
|
|
6726
|
-
current_nodes: string[];
|
|
6745
|
+
current_nodes: string[] | AdminOrRep[];
|
|
6727
6746
|
};
|
|
6728
6747
|
};
|
|
6729
6748
|
}
|
|
@@ -12719,6 +12738,16 @@ export declare namespace Service {
|
|
|
12719
12738
|
}
|
|
12720
12739
|
export {};
|
|
12721
12740
|
}
|
|
12741
|
+
namespace SafeInvoiceSerialCounter {
|
|
12742
|
+
interface UpdateBody {
|
|
12743
|
+
counter: number;
|
|
12744
|
+
}
|
|
12745
|
+
namespace Update {
|
|
12746
|
+
type ID = StringId;
|
|
12747
|
+
type Body = UpdateBody;
|
|
12748
|
+
type Result = Settings.Data;
|
|
12749
|
+
}
|
|
12750
|
+
}
|
|
12722
12751
|
}
|
|
12723
12752
|
export type StringId = string;
|
|
12724
12753
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -110,6 +110,7 @@ export default class Repzo {
|
|
|
110
110
|
SETTINGS: "settings",
|
|
111
111
|
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
112
112
|
APPROVAL_REQUEST: "approval-request",
|
|
113
|
+
SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
|
|
113
114
|
} as const;
|
|
114
115
|
public END_POINTS = this._end_points;
|
|
115
116
|
private async _fetch(baseUrl: string, path: string, params?: Params) {
|
|
@@ -3798,6 +3799,22 @@ export default class Repzo {
|
|
|
3798
3799
|
return res;
|
|
3799
3800
|
},
|
|
3800
3801
|
};
|
|
3802
|
+
|
|
3803
|
+
safeInvoiceSerialCounter = {
|
|
3804
|
+
_path: this._end_points.SAFE_INVOICE_SERIAL_COUNTER,
|
|
3805
|
+
|
|
3806
|
+
update: async (
|
|
3807
|
+
id: Service.SafeInvoiceSerialCounter.Update.ID,
|
|
3808
|
+
body: Service.SafeInvoiceSerialCounter.Update.Body
|
|
3809
|
+
): Promise<Service.SafeInvoiceSerialCounter.Update.Result> => {
|
|
3810
|
+
let res: Service.SafeInvoiceSerialCounter.Update.Result = await this._update(
|
|
3811
|
+
this.svAPIEndpoint,
|
|
3812
|
+
this.safeInvoiceSerialCounter._path + `/${id}`,
|
|
3813
|
+
body
|
|
3814
|
+
);
|
|
3815
|
+
return res;
|
|
3816
|
+
},
|
|
3817
|
+
};
|
|
3801
3818
|
}
|
|
3802
3819
|
|
|
3803
3820
|
function normalizeParams(params: Params): { [key: string]: any } {
|
package/src/types/index.ts
CHANGED
|
@@ -341,7 +341,25 @@ export type DocumentTypes =
|
|
|
341
341
|
| "sv.activitiesstorechecks"
|
|
342
342
|
| "retailExecutionPreset"
|
|
343
343
|
| "paymentMethod"
|
|
344
|
-
| "approvalRequest"
|
|
344
|
+
| "approvalRequest"
|
|
345
|
+
| "activityFormV2Result"
|
|
346
|
+
| "formV2"
|
|
347
|
+
| "payments"
|
|
348
|
+
| "ocrInvoiceJob"
|
|
349
|
+
| "contract"
|
|
350
|
+
| "contractInstallment"
|
|
351
|
+
| "form"
|
|
352
|
+
| "paymentMethod"
|
|
353
|
+
| "aiObjectDetectionModelVersion"
|
|
354
|
+
| "aiObjectDetectionTask"
|
|
355
|
+
| "assetPart"
|
|
356
|
+
| "assetPartReceival"
|
|
357
|
+
| "assetPartUnit"
|
|
358
|
+
| "returnAssetPartUnit"
|
|
359
|
+
| "storeAssetPartUnit"
|
|
360
|
+
| "activityAiSalesOrder"
|
|
361
|
+
| "ocrInvoiceJobGroup";
|
|
362
|
+
|
|
345
363
|
export type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
|
|
346
364
|
|
|
347
365
|
export interface MediaDoc {
|
|
@@ -359,7 +377,9 @@ export interface MediaDoc {
|
|
|
359
377
|
| "thumbnail"
|
|
360
378
|
| "doc"
|
|
361
379
|
| "docx"
|
|
362
|
-
| "images"
|
|
380
|
+
| "images"
|
|
381
|
+
| "zip"
|
|
382
|
+
| "pt";
|
|
363
383
|
mime_type: "image/jpeg" | string;
|
|
364
384
|
ContentType: "image/jpeg" | string;
|
|
365
385
|
file_name: string;
|
|
@@ -6628,7 +6648,7 @@ export namespace Service {
|
|
|
6628
6648
|
};
|
|
6629
6649
|
cycle: Cycle.Schema & {
|
|
6630
6650
|
can_edit: boolean;
|
|
6631
|
-
current_nodes: string[];
|
|
6651
|
+
current_nodes: string[] | AdminOrRep[];
|
|
6632
6652
|
};
|
|
6633
6653
|
};
|
|
6634
6654
|
}
|
|
@@ -12256,6 +12276,17 @@ export namespace Service {
|
|
|
12256
12276
|
export type Result = Data;
|
|
12257
12277
|
}
|
|
12258
12278
|
}
|
|
12279
|
+
|
|
12280
|
+
export namespace SafeInvoiceSerialCounter {
|
|
12281
|
+
export interface UpdateBody {
|
|
12282
|
+
counter: number;
|
|
12283
|
+
}
|
|
12284
|
+
export namespace Update {
|
|
12285
|
+
export type ID = StringId;
|
|
12286
|
+
export type Body = UpdateBody;
|
|
12287
|
+
export type Result = Settings.Data;
|
|
12288
|
+
}
|
|
12289
|
+
}
|
|
12259
12290
|
}
|
|
12260
12291
|
|
|
12261
12292
|
export type StringId = string;
|