repzo 1.0.133 → 1.0.135
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 +114 -27
- package/lib/index.js +91 -89
- package/package.json +1 -1
- package/src/index.ts +91 -88
package/lib/index.d.ts
CHANGED
|
@@ -1,12 +1,99 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
Params,
|
|
3
|
-
Data,
|
|
4
2
|
Service,
|
|
5
3
|
Options,
|
|
6
4
|
Headers,
|
|
7
5
|
StringId,
|
|
8
6
|
NameSpaces,
|
|
9
7
|
} from "./types/index";
|
|
8
|
+
export declare const end_points: {
|
|
9
|
+
readonly CLIENT: "client";
|
|
10
|
+
readonly PRODUCT: "product";
|
|
11
|
+
readonly VARIANT: "variant";
|
|
12
|
+
readonly CATEGORY: "product-category";
|
|
13
|
+
readonly SUB_CATEGORY: "product-sub-category";
|
|
14
|
+
readonly BRAND: "product-brand";
|
|
15
|
+
readonly PRODUCT_GROUP: "product-group";
|
|
16
|
+
readonly TAX: "tax";
|
|
17
|
+
readonly MEASUREUNIT: "measureunits";
|
|
18
|
+
readonly MEASUREUNIT_FAMILY: "measureunit-family";
|
|
19
|
+
readonly MEDIA: "media";
|
|
20
|
+
readonly PRICELIST: "pricelists";
|
|
21
|
+
readonly PRICELIST_ITEM: "pricelistsitems";
|
|
22
|
+
readonly TEAM: "teams";
|
|
23
|
+
readonly RETURN_REASON: "return-reason";
|
|
24
|
+
readonly REP: "rep";
|
|
25
|
+
readonly TAG: "tag";
|
|
26
|
+
readonly WAREHOUSE: "warehouse";
|
|
27
|
+
readonly ROUTE: "route";
|
|
28
|
+
readonly PRODUCT_MODIFIERS_GROUP: "product-modifiers-group";
|
|
29
|
+
readonly CHANNEL: "client-channel";
|
|
30
|
+
readonly SPECIALITY: "speciality";
|
|
31
|
+
readonly CLIENT_CONTACT: "client-contact";
|
|
32
|
+
readonly PAYMENT_TERM: "paymentterms";
|
|
33
|
+
readonly BANK: "banks";
|
|
34
|
+
readonly BANK_LIST: "bankslists";
|
|
35
|
+
readonly CUSTOM_STATUS: "custom-status";
|
|
36
|
+
readonly CUSTOM_LIST: "custom-list";
|
|
37
|
+
readonly CUSTOM_LIST_ITEM: "custom-list-item";
|
|
38
|
+
readonly INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason";
|
|
39
|
+
readonly WORKORDER: "workorder";
|
|
40
|
+
readonly WORKORDER_REQUEST: "workorder-request";
|
|
41
|
+
readonly SUPPLIER: "supplier";
|
|
42
|
+
readonly QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf";
|
|
43
|
+
readonly VISIT: "visit";
|
|
44
|
+
readonly INVOICE: "fullinvoices";
|
|
45
|
+
readonly PROFORMA: "proforma";
|
|
46
|
+
readonly PAYMENT: "payments";
|
|
47
|
+
readonly REFUND: "refund";
|
|
48
|
+
readonly SETTLEMENT: "settlement";
|
|
49
|
+
readonly CHECK: "checks";
|
|
50
|
+
readonly DAY: "day";
|
|
51
|
+
readonly RECEIVING_MATERIAL: "receiving-material";
|
|
52
|
+
readonly ADJUST_ACCOUNT: "adjust-account";
|
|
53
|
+
readonly TRANSFER: "transfer";
|
|
54
|
+
readonly MSL: "msl";
|
|
55
|
+
readonly MSL_PRODUCT: "msl-products";
|
|
56
|
+
readonly MEDIA_STORAGE: "media-storage";
|
|
57
|
+
readonly STORECHECK_TEMPLATE: "storecheck-template";
|
|
58
|
+
readonly ACTIVITY_STORECHECK: "activity-storecheck";
|
|
59
|
+
readonly ADJUST_INVENTORY: "adjust-inventory";
|
|
60
|
+
readonly INVENTORY: "inventory";
|
|
61
|
+
readonly INTEGRATION_APP: "integration-app";
|
|
62
|
+
readonly JOIN_ACTIONS_WEBHOOK: "svix-integration";
|
|
63
|
+
readonly INTEGRATION_ACTION_LOG: "integration-action-log";
|
|
64
|
+
readonly INTEGRATION_COMMAND_LOG: "integration-command-log";
|
|
65
|
+
readonly PATCH_ACTION: "patch-action";
|
|
66
|
+
readonly UPDATE_INTEGRATION_META: "update-integration-meta";
|
|
67
|
+
readonly ASSET_PART_TYPE: "asset-part-type";
|
|
68
|
+
readonly ASSET_PART: "asset-part";
|
|
69
|
+
readonly ASSET_PART_UNIT: "asset-part-unit";
|
|
70
|
+
readonly ASSET_PART_RECEIVAL: "asset-part-receival";
|
|
71
|
+
readonly ASSET_PART_TRANSFER: "asset-part-transfer";
|
|
72
|
+
readonly RETURN_ASSET_PART_UNIT: "return-asset-part-unit";
|
|
73
|
+
readonly STORE_ASSET_PART_UNIT: "store-asset-part-unit";
|
|
74
|
+
readonly OCR_INVOICE_JOB_TEMPLATE: "ocr-invoice-job-template";
|
|
75
|
+
readonly OCR_INVOICE_JOB_GROUP: "ocr-invoice-job-group";
|
|
76
|
+
readonly ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order";
|
|
77
|
+
readonly OCR_INVOICE_JOB: "ocr-invoice-job";
|
|
78
|
+
readonly OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page";
|
|
79
|
+
readonly SETTINGS: "settings";
|
|
80
|
+
readonly MAIL_UNSUBSCRIBE: "mail-unsubscribe";
|
|
81
|
+
readonly APPROVAL_REQUEST: "approval-request";
|
|
82
|
+
readonly SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter";
|
|
83
|
+
readonly CLIENT_LOCATION: "client-location";
|
|
84
|
+
readonly ASSET_TYPE: "asset-type";
|
|
85
|
+
readonly ASSET: "asset";
|
|
86
|
+
readonly ASSET_UNIT: "asset-unit";
|
|
87
|
+
readonly WORKORDER_PORTAL: "workorder-portal";
|
|
88
|
+
readonly APPROVAL: "approvals";
|
|
89
|
+
readonly ACTIVITY_FEEDBACK: "activity-feedback";
|
|
90
|
+
readonly ACTIVITY_FEEDBACKV2: "activity-feedback-v2";
|
|
91
|
+
readonly FEEDBACK_OPTION: "feedback-options";
|
|
92
|
+
readonly WORKORDER_CATEGORY: "workorder-category";
|
|
93
|
+
readonly CONTRACT: "contract";
|
|
94
|
+
readonly CONTRACT_INSTALLMENT: "contract-installment";
|
|
95
|
+
};
|
|
96
|
+
export type EndPoints = typeof end_points[keyof typeof end_points];
|
|
10
97
|
export default class Repzo {
|
|
11
98
|
private svAPIEndpoint;
|
|
12
99
|
headers: Headers;
|
|
@@ -1092,9 +1179,9 @@ export default class Repzo {
|
|
|
1092
1179
|
status: Service.ActionLogs.Status;
|
|
1093
1180
|
error?: any;
|
|
1094
1181
|
start_time: number;
|
|
1095
|
-
end_time?: number
|
|
1096
|
-
total_time?: number
|
|
1097
|
-
company_namespace?: NameSpaces
|
|
1182
|
+
end_time?: number;
|
|
1183
|
+
total_time?: number;
|
|
1184
|
+
company_namespace?: NameSpaces;
|
|
1098
1185
|
body?: any;
|
|
1099
1186
|
meta?: any;
|
|
1100
1187
|
message: string;
|
|
@@ -1102,12 +1189,12 @@ export default class Repzo {
|
|
|
1102
1189
|
sync_id: string;
|
|
1103
1190
|
isOld: boolean;
|
|
1104
1191
|
superThis: Repzo;
|
|
1105
|
-
load(sync_id: string): Promise
|
|
1106
|
-
setStatus(status: Service.ActionLogs.Status, error?: any): any;
|
|
1107
|
-
setBody(body: any): any;
|
|
1108
|
-
setMeta(meta: any): any;
|
|
1109
|
-
commit(): Promise
|
|
1110
|
-
addDetail(detail: string, meta?: any): any;
|
|
1192
|
+
load(sync_id: string): Promise</*elided*/ any>;
|
|
1193
|
+
setStatus(status: Service.ActionLogs.Status, error?: any): /*elided*/ any;
|
|
1194
|
+
setBody(body: any): /*elided*/ any;
|
|
1195
|
+
setMeta(meta: any): /*elided*/ any;
|
|
1196
|
+
commit(): Promise</*elided*/ any>;
|
|
1197
|
+
addDetail(detail: string, meta?: any): /*elided*/ any;
|
|
1111
1198
|
};
|
|
1112
1199
|
};
|
|
1113
1200
|
static CommandLog: {
|
|
@@ -1125,8 +1212,8 @@ export default class Repzo {
|
|
|
1125
1212
|
status: Service.CommandLog.Status;
|
|
1126
1213
|
error?: any;
|
|
1127
1214
|
start_time: number;
|
|
1128
|
-
end_time?: number
|
|
1129
|
-
total_time?: number
|
|
1215
|
+
end_time?: number;
|
|
1216
|
+
total_time?: number;
|
|
1130
1217
|
company_namespace: NameSpaces;
|
|
1131
1218
|
body?: any;
|
|
1132
1219
|
sync_details: {
|
|
@@ -1146,24 +1233,24 @@ export default class Repzo {
|
|
|
1146
1233
|
details: Service.CommandLog.Detail[];
|
|
1147
1234
|
sync_id: string;
|
|
1148
1235
|
isOld: boolean;
|
|
1149
|
-
priority?: number
|
|
1236
|
+
priority?: number;
|
|
1150
1237
|
isPrioritized: boolean;
|
|
1151
1238
|
retries: number;
|
|
1152
|
-
queuedAt?: Date
|
|
1153
|
-
failedAt?: Date
|
|
1154
|
-
succeededAt?: Date
|
|
1155
|
-
skippedAt?: Date
|
|
1156
|
-
receivedAt?: Date
|
|
1157
|
-
processedAt?: Date
|
|
1239
|
+
queuedAt?: Date;
|
|
1240
|
+
failedAt?: Date;
|
|
1241
|
+
succeededAt?: Date;
|
|
1242
|
+
skippedAt?: Date;
|
|
1243
|
+
receivedAt?: Date;
|
|
1244
|
+
processedAt?: Date;
|
|
1158
1245
|
onGoing: boolean;
|
|
1159
|
-
trigger?: string
|
|
1246
|
+
trigger?: string;
|
|
1160
1247
|
superThis: Repzo;
|
|
1161
|
-
load(sync_id?: string, retries?: number): Promise
|
|
1162
|
-
setStatus(status: Service.CommandLog.Status, error?: any): any;
|
|
1163
|
-
setBody(body: any): any;
|
|
1164
|
-
setMeta(meta: any): any;
|
|
1165
|
-
commit(): Promise
|
|
1166
|
-
addDetail(detail: string, meta?: any): any;
|
|
1248
|
+
load(sync_id?: string, retries?: number): Promise</*elided*/ any>;
|
|
1249
|
+
setStatus(status: Service.CommandLog.Status, error?: any): /*elided*/ any;
|
|
1250
|
+
setBody(body: any): /*elided*/ any;
|
|
1251
|
+
setMeta(meta: any): /*elided*/ any;
|
|
1252
|
+
commit(): Promise</*elided*/ any>;
|
|
1253
|
+
addDetail(detail: string, meta?: any): /*elided*/ any;
|
|
1167
1254
|
};
|
|
1168
1255
|
};
|
|
1169
1256
|
patchAction: {
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,94 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
2
|
import { v4 as uuid } from "uuid";
|
|
3
|
-
export
|
|
3
|
+
export const end_points = {
|
|
4
|
+
CLIENT: "client",
|
|
5
|
+
PRODUCT: "product",
|
|
6
|
+
VARIANT: "variant",
|
|
7
|
+
CATEGORY: "product-category",
|
|
8
|
+
SUB_CATEGORY: "product-sub-category",
|
|
9
|
+
BRAND: "product-brand",
|
|
10
|
+
PRODUCT_GROUP: "product-group",
|
|
11
|
+
TAX: "tax",
|
|
12
|
+
MEASUREUNIT: "measureunits",
|
|
13
|
+
MEASUREUNIT_FAMILY: "measureunit-family",
|
|
14
|
+
MEDIA: "media",
|
|
15
|
+
PRICELIST: "pricelists",
|
|
16
|
+
PRICELIST_ITEM: "pricelistsitems",
|
|
17
|
+
TEAM: "teams",
|
|
18
|
+
RETURN_REASON: "return-reason",
|
|
19
|
+
REP: "rep",
|
|
20
|
+
TAG: "tag",
|
|
21
|
+
WAREHOUSE: "warehouse",
|
|
22
|
+
ROUTE: "route",
|
|
23
|
+
PRODUCT_MODIFIERS_GROUP: "product-modifiers-group",
|
|
24
|
+
CHANNEL: "client-channel",
|
|
25
|
+
SPECIALITY: "speciality",
|
|
26
|
+
CLIENT_CONTACT: "client-contact",
|
|
27
|
+
PAYMENT_TERM: "paymentterms",
|
|
28
|
+
BANK: "banks",
|
|
29
|
+
BANK_LIST: "bankslists",
|
|
30
|
+
CUSTOM_STATUS: "custom-status",
|
|
31
|
+
CUSTOM_LIST: "custom-list",
|
|
32
|
+
CUSTOM_LIST_ITEM: "custom-list-item",
|
|
33
|
+
INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
|
|
34
|
+
WORKORDER: "workorder",
|
|
35
|
+
WORKORDER_REQUEST: "workorder-request",
|
|
36
|
+
SUPPLIER: "supplier",
|
|
37
|
+
QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
|
|
38
|
+
VISIT: "visit",
|
|
39
|
+
INVOICE: "fullinvoices",
|
|
40
|
+
PROFORMA: "proforma",
|
|
41
|
+
PAYMENT: "payments",
|
|
42
|
+
REFUND: "refund",
|
|
43
|
+
SETTLEMENT: "settlement",
|
|
44
|
+
CHECK: "checks",
|
|
45
|
+
DAY: "day",
|
|
46
|
+
RECEIVING_MATERIAL: "receiving-material",
|
|
47
|
+
ADJUST_ACCOUNT: "adjust-account",
|
|
48
|
+
TRANSFER: "transfer",
|
|
49
|
+
MSL: "msl",
|
|
50
|
+
MSL_PRODUCT: "msl-products",
|
|
51
|
+
MEDIA_STORAGE: "media-storage",
|
|
52
|
+
STORECHECK_TEMPLATE: "storecheck-template",
|
|
53
|
+
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
54
|
+
ADJUST_INVENTORY: "adjust-inventory",
|
|
55
|
+
INVENTORY: "inventory",
|
|
56
|
+
INTEGRATION_APP: "integration-app",
|
|
57
|
+
JOIN_ACTIONS_WEBHOOK: "svix-integration",
|
|
58
|
+
INTEGRATION_ACTION_LOG: "integration-action-log",
|
|
59
|
+
INTEGRATION_COMMAND_LOG: "integration-command-log",
|
|
60
|
+
PATCH_ACTION: "patch-action",
|
|
61
|
+
UPDATE_INTEGRATION_META: "update-integration-meta",
|
|
62
|
+
ASSET_PART_TYPE: "asset-part-type",
|
|
63
|
+
ASSET_PART: "asset-part",
|
|
64
|
+
ASSET_PART_UNIT: "asset-part-unit",
|
|
65
|
+
ASSET_PART_RECEIVAL: "asset-part-receival",
|
|
66
|
+
ASSET_PART_TRANSFER: "asset-part-transfer",
|
|
67
|
+
RETURN_ASSET_PART_UNIT: "return-asset-part-unit",
|
|
68
|
+
STORE_ASSET_PART_UNIT: "store-asset-part-unit",
|
|
69
|
+
OCR_INVOICE_JOB_TEMPLATE: "ocr-invoice-job-template",
|
|
70
|
+
OCR_INVOICE_JOB_GROUP: "ocr-invoice-job-group",
|
|
71
|
+
ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order",
|
|
72
|
+
OCR_INVOICE_JOB: "ocr-invoice-job",
|
|
73
|
+
OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
|
|
74
|
+
SETTINGS: "settings",
|
|
75
|
+
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
76
|
+
APPROVAL_REQUEST: "approval-request",
|
|
77
|
+
SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
|
|
78
|
+
CLIENT_LOCATION: "client-location",
|
|
79
|
+
ASSET_TYPE: "asset-type",
|
|
80
|
+
ASSET: "asset",
|
|
81
|
+
ASSET_UNIT: "asset-unit",
|
|
82
|
+
WORKORDER_PORTAL: "workorder-portal",
|
|
83
|
+
APPROVAL: "approvals",
|
|
84
|
+
ACTIVITY_FEEDBACK: "activity-feedback",
|
|
85
|
+
ACTIVITY_FEEDBACKV2: "activity-feedback-v2",
|
|
86
|
+
FEEDBACK_OPTION: "feedback-options",
|
|
87
|
+
WORKORDER_CATEGORY: "workorder-category",
|
|
88
|
+
CONTRACT: "contract",
|
|
89
|
+
CONTRACT_INSTALLMENT: "contract-installment",
|
|
90
|
+
};
|
|
91
|
+
class Repzo {
|
|
4
92
|
constructor(apiKey, options) {
|
|
5
93
|
this.client = {
|
|
6
94
|
_path: Repzo._end_points.CLIENT,
|
|
@@ -2985,94 +3073,7 @@ export default class Repzo {
|
|
|
2985
3073
|
return res.data;
|
|
2986
3074
|
}
|
|
2987
3075
|
}
|
|
2988
|
-
Repzo._end_points =
|
|
2989
|
-
CLIENT: "client",
|
|
2990
|
-
PRODUCT: "product",
|
|
2991
|
-
VARIANT: "variant",
|
|
2992
|
-
CATEGORY: "product-category",
|
|
2993
|
-
SUB_CATEGORY: "product-sub-category",
|
|
2994
|
-
BRAND: "product-brand",
|
|
2995
|
-
PRODUCT_GROUP: "product-group",
|
|
2996
|
-
TAX: "tax",
|
|
2997
|
-
MEASUREUNIT: "measureunits",
|
|
2998
|
-
MEASUREUNIT_FAMILY: "measureunit-family",
|
|
2999
|
-
MEDIA: "media",
|
|
3000
|
-
PRICELIST: "pricelists",
|
|
3001
|
-
PRICELIST_ITEM: "pricelistsitems",
|
|
3002
|
-
TEAM: "teams",
|
|
3003
|
-
RETURN_REASON: "return-reason",
|
|
3004
|
-
REP: "rep",
|
|
3005
|
-
TAG: "tag",
|
|
3006
|
-
WAREHOUSE: "warehouse",
|
|
3007
|
-
ROUTE: "route",
|
|
3008
|
-
PRODUCT_MODIFIERS_GROUP: "product-modifiers-group",
|
|
3009
|
-
CHANNEL: "client-channel",
|
|
3010
|
-
SPECIALITY: "speciality",
|
|
3011
|
-
CLIENT_CONTACT: "client-contact",
|
|
3012
|
-
PAYMENT_TERM: "paymentterms",
|
|
3013
|
-
BANK: "banks",
|
|
3014
|
-
BANK_LIST: "bankslists",
|
|
3015
|
-
CUSTOM_STATUS: "custom-status",
|
|
3016
|
-
CUSTOM_LIST: "custom-list",
|
|
3017
|
-
CUSTOM_LIST_ITEM: "custom-list-item",
|
|
3018
|
-
INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
|
|
3019
|
-
WORKORDER: "workorder",
|
|
3020
|
-
WORKORDER_REQUEST: "workorder-request",
|
|
3021
|
-
SUPPLIER: "supplier",
|
|
3022
|
-
QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
|
|
3023
|
-
VISIT: "visit",
|
|
3024
|
-
INVOICE: "fullinvoices",
|
|
3025
|
-
PROFORMA: "proforma",
|
|
3026
|
-
PAYMENT: "payments",
|
|
3027
|
-
REFUND: "refund",
|
|
3028
|
-
SETTLEMENT: "settlement",
|
|
3029
|
-
CHECK: "checks",
|
|
3030
|
-
DAY: "day",
|
|
3031
|
-
RECEIVING_MATERIAL: "receiving-material",
|
|
3032
|
-
ADJUST_ACCOUNT: "adjust-account",
|
|
3033
|
-
TRANSFER: "transfer",
|
|
3034
|
-
MSL: "msl",
|
|
3035
|
-
MSL_PRODUCT: "msl-products",
|
|
3036
|
-
MEDIA_STORAGE: "media-storage",
|
|
3037
|
-
STORECHECK_TEMPLATE: "storecheck-template",
|
|
3038
|
-
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
3039
|
-
ADJUST_INVENTORY: "adjust-inventory",
|
|
3040
|
-
INVENTORY: "inventory",
|
|
3041
|
-
INTEGRATION_APP: "integration-app",
|
|
3042
|
-
JOIN_ACTIONS_WEBHOOK: "svix-integration",
|
|
3043
|
-
INTEGRATION_ACTION_LOG: "integration-action-log",
|
|
3044
|
-
INTEGRATION_COMMAND_LOG: "integration-command-log",
|
|
3045
|
-
PATCH_ACTION: "patch-action",
|
|
3046
|
-
UPDATE_INTEGRATION_META: "update-integration-meta",
|
|
3047
|
-
ASSET_PART_TYPE: "asset-part-type",
|
|
3048
|
-
ASSET_PART: "asset-part",
|
|
3049
|
-
ASSET_PART_UNIT: "asset-part-unit",
|
|
3050
|
-
ASSET_PART_RECEIVAL: "asset-part-receival",
|
|
3051
|
-
ASSET_PART_TRANSFER: "asset-part-transfer",
|
|
3052
|
-
RETURN_ASSET_PART_UNIT: "return-asset-part-unit",
|
|
3053
|
-
STORE_ASSET_PART_UNIT: "store-asset-part-unit",
|
|
3054
|
-
OCR_INVOICE_JOB_TEMPLATE: "ocr-invoice-job-template",
|
|
3055
|
-
OCR_INVOICE_JOB_GROUP: "ocr-invoice-job-group",
|
|
3056
|
-
ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order",
|
|
3057
|
-
OCR_INVOICE_JOB: "ocr-invoice-job",
|
|
3058
|
-
OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
|
|
3059
|
-
SETTINGS: "settings",
|
|
3060
|
-
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
3061
|
-
APPROVAL_REQUEST: "approval-request",
|
|
3062
|
-
SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
|
|
3063
|
-
CLIENT_LOCATION: "client-location",
|
|
3064
|
-
ASSET_TYPE: "asset-type",
|
|
3065
|
-
ASSET: "asset",
|
|
3066
|
-
ASSET_UNIT: "asset-unit",
|
|
3067
|
-
WORKORDER_PORTAL: "workorder-portal",
|
|
3068
|
-
APPROVAL: "approvals",
|
|
3069
|
-
ACTIVITY_FEEDBACK: "activity-feedback",
|
|
3070
|
-
ACTIVITY_FEEDBACKV2: "activity-feedback-v2",
|
|
3071
|
-
FEEDBACK_OPTION: "feedback-options",
|
|
3072
|
-
WORKORDER_CATEGORY: "workorder-category",
|
|
3073
|
-
CONTRACT: "contract",
|
|
3074
|
-
CONTRACT_INSTALLMENT: "contract-installment",
|
|
3075
|
-
};
|
|
3076
|
+
Repzo._end_points = end_points;
|
|
3076
3077
|
Repzo.ActionLogs = class {
|
|
3077
3078
|
constructor(superThis, sync_id) {
|
|
3078
3079
|
this.superThis = superThis;
|
|
@@ -3369,6 +3370,7 @@ Repzo.CommandLog = class {
|
|
|
3369
3370
|
return this;
|
|
3370
3371
|
}
|
|
3371
3372
|
};
|
|
3373
|
+
export default Repzo;
|
|
3372
3374
|
function normalizeParams(params) {
|
|
3373
3375
|
const normalized = {};
|
|
3374
3376
|
for (const key in params) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -10,6 +10,96 @@ import type {
|
|
|
10
10
|
NameSpaces,
|
|
11
11
|
} from "./types/index";
|
|
12
12
|
|
|
13
|
+
export const end_points = {
|
|
14
|
+
CLIENT: "client",
|
|
15
|
+
PRODUCT: "product",
|
|
16
|
+
VARIANT: "variant",
|
|
17
|
+
CATEGORY: "product-category",
|
|
18
|
+
SUB_CATEGORY: "product-sub-category",
|
|
19
|
+
BRAND: "product-brand",
|
|
20
|
+
PRODUCT_GROUP: "product-group",
|
|
21
|
+
TAX: "tax",
|
|
22
|
+
MEASUREUNIT: "measureunits",
|
|
23
|
+
MEASUREUNIT_FAMILY: "measureunit-family",
|
|
24
|
+
MEDIA: "media",
|
|
25
|
+
PRICELIST: "pricelists",
|
|
26
|
+
PRICELIST_ITEM: "pricelistsitems",
|
|
27
|
+
TEAM: "teams",
|
|
28
|
+
RETURN_REASON: "return-reason",
|
|
29
|
+
REP: "rep",
|
|
30
|
+
TAG: "tag",
|
|
31
|
+
WAREHOUSE: "warehouse",
|
|
32
|
+
ROUTE: "route",
|
|
33
|
+
PRODUCT_MODIFIERS_GROUP: "product-modifiers-group",
|
|
34
|
+
CHANNEL: "client-channel",
|
|
35
|
+
SPECIALITY: "speciality",
|
|
36
|
+
CLIENT_CONTACT: "client-contact",
|
|
37
|
+
PAYMENT_TERM: "paymentterms",
|
|
38
|
+
BANK: "banks",
|
|
39
|
+
BANK_LIST: "bankslists",
|
|
40
|
+
CUSTOM_STATUS: "custom-status",
|
|
41
|
+
CUSTOM_LIST: "custom-list",
|
|
42
|
+
CUSTOM_LIST_ITEM: "custom-list-item",
|
|
43
|
+
INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
|
|
44
|
+
WORKORDER: "workorder",
|
|
45
|
+
WORKORDER_REQUEST: "workorder-request",
|
|
46
|
+
SUPPLIER: "supplier",
|
|
47
|
+
QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
|
|
48
|
+
VISIT: "visit",
|
|
49
|
+
INVOICE: "fullinvoices",
|
|
50
|
+
PROFORMA: "proforma",
|
|
51
|
+
PAYMENT: "payments",
|
|
52
|
+
REFUND: "refund",
|
|
53
|
+
SETTLEMENT: "settlement",
|
|
54
|
+
CHECK: "checks",
|
|
55
|
+
DAY: "day",
|
|
56
|
+
RECEIVING_MATERIAL: "receiving-material",
|
|
57
|
+
ADJUST_ACCOUNT: "adjust-account",
|
|
58
|
+
TRANSFER: "transfer",
|
|
59
|
+
MSL: "msl",
|
|
60
|
+
MSL_PRODUCT: "msl-products",
|
|
61
|
+
MEDIA_STORAGE: "media-storage",
|
|
62
|
+
STORECHECK_TEMPLATE: "storecheck-template",
|
|
63
|
+
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
64
|
+
ADJUST_INVENTORY: "adjust-inventory",
|
|
65
|
+
INVENTORY: "inventory",
|
|
66
|
+
INTEGRATION_APP: "integration-app",
|
|
67
|
+
JOIN_ACTIONS_WEBHOOK: "svix-integration",
|
|
68
|
+
INTEGRATION_ACTION_LOG: "integration-action-log",
|
|
69
|
+
INTEGRATION_COMMAND_LOG: "integration-command-log",
|
|
70
|
+
PATCH_ACTION: "patch-action",
|
|
71
|
+
UPDATE_INTEGRATION_META: "update-integration-meta",
|
|
72
|
+
ASSET_PART_TYPE: "asset-part-type",
|
|
73
|
+
ASSET_PART: "asset-part",
|
|
74
|
+
ASSET_PART_UNIT: "asset-part-unit",
|
|
75
|
+
ASSET_PART_RECEIVAL: "asset-part-receival",
|
|
76
|
+
ASSET_PART_TRANSFER: "asset-part-transfer",
|
|
77
|
+
RETURN_ASSET_PART_UNIT: "return-asset-part-unit",
|
|
78
|
+
STORE_ASSET_PART_UNIT: "store-asset-part-unit",
|
|
79
|
+
OCR_INVOICE_JOB_TEMPLATE: "ocr-invoice-job-template",
|
|
80
|
+
OCR_INVOICE_JOB_GROUP: "ocr-invoice-job-group",
|
|
81
|
+
ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order",
|
|
82
|
+
OCR_INVOICE_JOB: "ocr-invoice-job",
|
|
83
|
+
OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
|
|
84
|
+
SETTINGS: "settings",
|
|
85
|
+
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
86
|
+
APPROVAL_REQUEST: "approval-request",
|
|
87
|
+
SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
|
|
88
|
+
CLIENT_LOCATION: "client-location",
|
|
89
|
+
ASSET_TYPE: "asset-type",
|
|
90
|
+
ASSET: "asset",
|
|
91
|
+
ASSET_UNIT: "asset-unit",
|
|
92
|
+
WORKORDER_PORTAL: "workorder-portal",
|
|
93
|
+
APPROVAL: "approvals",
|
|
94
|
+
ACTIVITY_FEEDBACK: "activity-feedback",
|
|
95
|
+
ACTIVITY_FEEDBACKV2: "activity-feedback-v2",
|
|
96
|
+
FEEDBACK_OPTION: "feedback-options",
|
|
97
|
+
WORKORDER_CATEGORY: "workorder-category",
|
|
98
|
+
CONTRACT: "contract",
|
|
99
|
+
CONTRACT_INSTALLMENT: "contract-installment",
|
|
100
|
+
} as const;
|
|
101
|
+
export type EndPoints = typeof end_points[keyof typeof end_points];
|
|
102
|
+
|
|
13
103
|
export default class Repzo {
|
|
14
104
|
private svAPIEndpoint: string;
|
|
15
105
|
headers: Headers;
|
|
@@ -37,94 +127,7 @@ export default class Repzo {
|
|
|
37
127
|
}
|
|
38
128
|
}
|
|
39
129
|
|
|
40
|
-
private static _end_points =
|
|
41
|
-
CLIENT: "client",
|
|
42
|
-
PRODUCT: "product",
|
|
43
|
-
VARIANT: "variant",
|
|
44
|
-
CATEGORY: "product-category",
|
|
45
|
-
SUB_CATEGORY: "product-sub-category",
|
|
46
|
-
BRAND: "product-brand",
|
|
47
|
-
PRODUCT_GROUP: "product-group",
|
|
48
|
-
TAX: "tax",
|
|
49
|
-
MEASUREUNIT: "measureunits",
|
|
50
|
-
MEASUREUNIT_FAMILY: "measureunit-family",
|
|
51
|
-
MEDIA: "media",
|
|
52
|
-
PRICELIST: "pricelists",
|
|
53
|
-
PRICELIST_ITEM: "pricelistsitems",
|
|
54
|
-
TEAM: "teams",
|
|
55
|
-
RETURN_REASON: "return-reason",
|
|
56
|
-
REP: "rep",
|
|
57
|
-
TAG: "tag",
|
|
58
|
-
WAREHOUSE: "warehouse",
|
|
59
|
-
ROUTE: "route",
|
|
60
|
-
PRODUCT_MODIFIERS_GROUP: "product-modifiers-group",
|
|
61
|
-
CHANNEL: "client-channel",
|
|
62
|
-
SPECIALITY: "speciality",
|
|
63
|
-
CLIENT_CONTACT: "client-contact",
|
|
64
|
-
PAYMENT_TERM: "paymentterms",
|
|
65
|
-
BANK: "banks",
|
|
66
|
-
BANK_LIST: "bankslists",
|
|
67
|
-
CUSTOM_STATUS: "custom-status",
|
|
68
|
-
CUSTOM_LIST: "custom-list",
|
|
69
|
-
CUSTOM_LIST_ITEM: "custom-list-item",
|
|
70
|
-
INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
|
|
71
|
-
WORKORDER: "workorder",
|
|
72
|
-
WORKORDER_REQUEST: "workorder-request",
|
|
73
|
-
SUPPLIER: "supplier",
|
|
74
|
-
QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
|
|
75
|
-
VISIT: "visit",
|
|
76
|
-
INVOICE: "fullinvoices",
|
|
77
|
-
PROFORMA: "proforma",
|
|
78
|
-
PAYMENT: "payments",
|
|
79
|
-
REFUND: "refund",
|
|
80
|
-
SETTLEMENT: "settlement",
|
|
81
|
-
CHECK: "checks",
|
|
82
|
-
DAY: "day",
|
|
83
|
-
RECEIVING_MATERIAL: "receiving-material",
|
|
84
|
-
ADJUST_ACCOUNT: "adjust-account",
|
|
85
|
-
TRANSFER: "transfer",
|
|
86
|
-
MSL: "msl",
|
|
87
|
-
MSL_PRODUCT: "msl-products",
|
|
88
|
-
MEDIA_STORAGE: "media-storage",
|
|
89
|
-
STORECHECK_TEMPLATE: "storecheck-template",
|
|
90
|
-
ACTIVITY_STORECHECK: "activity-storecheck",
|
|
91
|
-
ADJUST_INVENTORY: "adjust-inventory",
|
|
92
|
-
INVENTORY: "inventory",
|
|
93
|
-
INTEGRATION_APP: "integration-app",
|
|
94
|
-
JOIN_ACTIONS_WEBHOOK: "svix-integration",
|
|
95
|
-
INTEGRATION_ACTION_LOG: "integration-action-log",
|
|
96
|
-
INTEGRATION_COMMAND_LOG: "integration-command-log",
|
|
97
|
-
PATCH_ACTION: "patch-action",
|
|
98
|
-
UPDATE_INTEGRATION_META: "update-integration-meta",
|
|
99
|
-
ASSET_PART_TYPE: "asset-part-type",
|
|
100
|
-
ASSET_PART: "asset-part",
|
|
101
|
-
ASSET_PART_UNIT: "asset-part-unit",
|
|
102
|
-
ASSET_PART_RECEIVAL: "asset-part-receival",
|
|
103
|
-
ASSET_PART_TRANSFER: "asset-part-transfer",
|
|
104
|
-
RETURN_ASSET_PART_UNIT: "return-asset-part-unit",
|
|
105
|
-
STORE_ASSET_PART_UNIT: "store-asset-part-unit",
|
|
106
|
-
OCR_INVOICE_JOB_TEMPLATE: "ocr-invoice-job-template",
|
|
107
|
-
OCR_INVOICE_JOB_GROUP: "ocr-invoice-job-group",
|
|
108
|
-
ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order",
|
|
109
|
-
OCR_INVOICE_JOB: "ocr-invoice-job",
|
|
110
|
-
OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
|
|
111
|
-
SETTINGS: "settings",
|
|
112
|
-
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
113
|
-
APPROVAL_REQUEST: "approval-request",
|
|
114
|
-
SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
|
|
115
|
-
CLIENT_LOCATION: "client-location",
|
|
116
|
-
ASSET_TYPE: "asset-type",
|
|
117
|
-
ASSET: "asset",
|
|
118
|
-
ASSET_UNIT: "asset-unit",
|
|
119
|
-
WORKORDER_PORTAL: "workorder-portal",
|
|
120
|
-
APPROVAL: "approvals",
|
|
121
|
-
ACTIVITY_FEEDBACK: "activity-feedback",
|
|
122
|
-
ACTIVITY_FEEDBACKV2: "activity-feedback-v2",
|
|
123
|
-
FEEDBACK_OPTION: "feedback-options",
|
|
124
|
-
WORKORDER_CATEGORY: "workorder-category",
|
|
125
|
-
CONTRACT: "contract",
|
|
126
|
-
CONTRACT_INSTALLMENT: "contract-installment",
|
|
127
|
-
} as const;
|
|
130
|
+
private static _end_points = end_points;
|
|
128
131
|
public static get END_POINTS() {
|
|
129
132
|
return Repzo._end_points;
|
|
130
133
|
}
|