repzo-sap-absjo 1.0.52 → 1.0.54
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/actions/create_client.d.ts +8 -0
- package/lib/actions/create_client.js +206 -0
- package/lib/actions/create_invoice.d.ts +1 -1
- package/lib/actions/create_payment.d.ts +1 -1
- package/lib/actions/create_proforma.d.ts +1 -1
- package/lib/actions/create_return_invoice.d.ts +1 -1
- package/lib/actions/create_transfer.d.ts +1 -1
- package/lib/actions/index.d.ts +1 -1
- package/lib/actions/index.js +3 -0
- package/lib/commands/join.js +34 -4
- package/lib/index.d.ts +1 -1
- package/lib/test/actions/create_client.d.ts +1 -0
- package/lib/test/actions/create_client.js +141 -0
- package/lib/test/commands/join.js +165 -84
- package/lib/types.d.ts +3 -0
- package/lib/util.d.ts +4 -4
- package/package.json +5 -3
- package/src/actions/create_client.ts +185 -0
- package/src/actions/create_invoice.ts +2 -2
- package/src/actions/index.ts +3 -0
- package/src/commands/adjust_inventory.ts +2 -2
- package/src/commands/bank.ts +5 -1
- package/src/commands/brand.ts +2 -2
- package/src/commands/category.ts +2 -2
- package/src/commands/channel.ts +2 -2
- package/src/commands/client.ts +2 -2
- package/src/commands/client_disabled.ts +2 -2
- package/src/commands/join.ts +8 -0
- package/src/commands/measureunit.ts +2 -2
- package/src/commands/payment_term.ts +2 -2
- package/src/commands/price_list.ts +2 -2
- package/src/commands/price_list_disabled.ts +2 -2
- package/src/commands/product.ts +8 -4
- package/src/commands/product_disabled.ts +8 -4
- package/src/commands/rep.ts +1 -1
- package/src/commands/tag.ts +2 -2
- package/src/commands/tax.ts +2 -2
- package/src/commands/warehouse.ts +2 -2
- package/src/test/actions/create_client.ts +141 -0
- package/src/test/commands/join.ts +165 -84
- package/src/types.ts +1 -0
|
@@ -3,29 +3,24 @@ import { Commands } from "../../index.js";
|
|
|
3
3
|
|
|
4
4
|
let commandEvent: CommandEvent | any = {
|
|
5
5
|
app: {
|
|
6
|
-
_id: "
|
|
7
|
-
name: "SAP",
|
|
6
|
+
_id: "68d11f0322e5865ce90326fe",
|
|
7
|
+
name: "SAP Integration ",
|
|
8
8
|
disabled: false,
|
|
9
9
|
available_app: {
|
|
10
|
-
_id: "
|
|
10
|
+
_id: "639ee4cf462a9df7c25cef4c",
|
|
11
11
|
name: "repzo-sap-absjo",
|
|
12
12
|
title: "SAP ABS JO",
|
|
13
|
-
logo: "https://
|
|
14
|
-
description:
|
|
13
|
+
logo: "https://prod-repzo-media-service.s3.us-east-1.amazonaws.com/repzo/image/2022/12/18/3f73de7d-1920-4786-90db-57c76d18acci-SAP_EBS_JO.png",
|
|
14
|
+
description:
|
|
15
|
+
"SAP Jordan. We provide real value to SMEs by understanding their business and driving their vision forward with SAP Business One",
|
|
15
16
|
disabled: false,
|
|
16
17
|
JSONSchema: {
|
|
17
18
|
title: "SAP Integration Settings",
|
|
18
19
|
type: "object",
|
|
19
20
|
required: ["repzoApiKey", "sapHostUrl"],
|
|
20
21
|
properties: {
|
|
21
|
-
repzoApiKey: {
|
|
22
|
-
|
|
23
|
-
title: "Repzo API KEY",
|
|
24
|
-
},
|
|
25
|
-
sapHostUrl: {
|
|
26
|
-
type: "string",
|
|
27
|
-
title: "SAP Host Url",
|
|
28
|
-
},
|
|
22
|
+
repzoApiKey: { type: "string", title: "Repzo API KEY" },
|
|
23
|
+
sapHostUrl: { type: "string", title: "SAP Host Url" },
|
|
29
24
|
errorEmail: {
|
|
30
25
|
type: "string",
|
|
31
26
|
format: "email",
|
|
@@ -46,11 +41,22 @@ let commandEvent: CommandEvent | any = {
|
|
|
46
41
|
format: "string",
|
|
47
42
|
title: "Invoice/Return Department Code",
|
|
48
43
|
},
|
|
49
|
-
|
|
44
|
+
return_reasons: {
|
|
50
45
|
type: "string",
|
|
51
46
|
format: "string",
|
|
52
47
|
title: "Return Reason Array",
|
|
53
48
|
},
|
|
49
|
+
measureUnitInjections: {
|
|
50
|
+
type: "string",
|
|
51
|
+
format: "string",
|
|
52
|
+
title:
|
|
53
|
+
'Uom Injection Array, example: [{ "itemCode": "010-KEA-JU0003", "uom": "PC" }]',
|
|
54
|
+
},
|
|
55
|
+
defaultWarehouseForSalesOrder: {
|
|
56
|
+
type: "string",
|
|
57
|
+
format: "string",
|
|
58
|
+
title: "Default Warehouse Code For Sales Orders",
|
|
59
|
+
},
|
|
54
60
|
SalPersCode: {
|
|
55
61
|
type: "string",
|
|
56
62
|
format: "string",
|
|
@@ -112,6 +118,24 @@ let commandEvent: CommandEvent | any = {
|
|
|
112
118
|
title: "Live Sync Approved Transfers from Repzo to SAP",
|
|
113
119
|
default: false,
|
|
114
120
|
},
|
|
121
|
+
adjustInventoryInFailedTransfer: {
|
|
122
|
+
type: "boolean",
|
|
123
|
+
title:
|
|
124
|
+
"Adjust Inventories in Repzo if creation Transfer Failed in SAP",
|
|
125
|
+
default: false,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
client: {
|
|
130
|
+
type: "object",
|
|
131
|
+
title: "Client",
|
|
132
|
+
required: ["createClientHook"],
|
|
133
|
+
properties: {
|
|
134
|
+
createClientHook: {
|
|
135
|
+
type: "boolean",
|
|
136
|
+
title: "Live Sync Clients from Repzo to SAP",
|
|
137
|
+
default: false,
|
|
138
|
+
},
|
|
115
139
|
},
|
|
116
140
|
},
|
|
117
141
|
},
|
|
@@ -126,122 +150,189 @@ let commandEvent: CommandEvent | any = {
|
|
|
126
150
|
type: "string",
|
|
127
151
|
format: "date",
|
|
128
152
|
},
|
|
153
|
+
bench_time_channel: {
|
|
154
|
+
title: "Bench Time: Channels",
|
|
155
|
+
type: "string",
|
|
156
|
+
format: "date-time",
|
|
157
|
+
},
|
|
158
|
+
bench_time_payment_term: {
|
|
159
|
+
title: "Bench Time: Payment Terms",
|
|
160
|
+
type: "string",
|
|
161
|
+
format: "date-time",
|
|
162
|
+
},
|
|
163
|
+
bench_time_product: {
|
|
164
|
+
title: "Bench Time: Products",
|
|
165
|
+
type: "string",
|
|
166
|
+
format: "date-time",
|
|
167
|
+
},
|
|
168
|
+
bench_time_product_disabled: {
|
|
169
|
+
title: "Bench Time: Inactive Products",
|
|
170
|
+
type: "string",
|
|
171
|
+
format: "date-time",
|
|
172
|
+
},
|
|
173
|
+
bench_time_price_list: {
|
|
174
|
+
title: "Bench Time: Price List",
|
|
175
|
+
type: "string",
|
|
176
|
+
format: "date-time",
|
|
177
|
+
},
|
|
178
|
+
bench_time_client: {
|
|
179
|
+
title: "Bench Time: Clients",
|
|
180
|
+
type: "string",
|
|
181
|
+
format: "date-time",
|
|
182
|
+
},
|
|
183
|
+
bench_time_disabled_client: {
|
|
184
|
+
title: "Bench Time: Inactive Clients",
|
|
185
|
+
type: "string",
|
|
186
|
+
format: "date-time",
|
|
187
|
+
},
|
|
129
188
|
},
|
|
130
189
|
},
|
|
131
190
|
app_settings: {
|
|
132
191
|
repo: "",
|
|
133
192
|
serviceEndPoint: "",
|
|
134
|
-
_id: "
|
|
193
|
+
_id: "639ee4cf462a9df7c25cef4d",
|
|
135
194
|
},
|
|
136
|
-
app_category: "
|
|
195
|
+
app_category: "629c62fcff7a8a2dc7a21ba1",
|
|
137
196
|
commands: [
|
|
138
197
|
{
|
|
139
198
|
command: "basic",
|
|
140
199
|
name: "Full Sync",
|
|
141
|
-
description: "",
|
|
142
|
-
|
|
200
|
+
description: "Exclude Join & Adjust Inventories",
|
|
201
|
+
group_sync: false,
|
|
202
|
+
_id: "639ee4cf462a9df7c25cef4e",
|
|
143
203
|
},
|
|
144
204
|
{
|
|
145
205
|
command: "join",
|
|
146
206
|
name: "Join",
|
|
147
207
|
description: "",
|
|
148
|
-
|
|
208
|
+
group_sync: false,
|
|
209
|
+
_id: "639ee4cf462a9df7c25cef4f",
|
|
149
210
|
},
|
|
150
211
|
{
|
|
151
212
|
command: "warehouse",
|
|
152
213
|
name: "Sync Warehouse",
|
|
153
214
|
description: "Sync Warehouses From SAP to Repzo",
|
|
154
|
-
|
|
215
|
+
group_sync: false,
|
|
216
|
+
_id: "639ee4cf462a9df7c25cef50",
|
|
155
217
|
},
|
|
156
218
|
{
|
|
157
219
|
command: "rep",
|
|
158
220
|
name: "Sync Representatives",
|
|
159
221
|
description: "Sync Representatives From SAP to Repzo",
|
|
160
|
-
|
|
222
|
+
group_sync: false,
|
|
223
|
+
_id: "639ee4cf462a9df7c25cef51",
|
|
161
224
|
},
|
|
162
225
|
{
|
|
163
226
|
command: "tax",
|
|
164
227
|
name: "Sync Taxes",
|
|
165
228
|
description: "Sync Taxes From SAP to Repzo",
|
|
166
|
-
|
|
229
|
+
group_sync: false,
|
|
230
|
+
_id: "639ee4cf462a9df7c25cef52",
|
|
167
231
|
},
|
|
168
232
|
{
|
|
169
233
|
command: "tag",
|
|
170
234
|
name: "Sync Area Tags",
|
|
171
235
|
description: "Sync Area Tags From SAP to Repzo",
|
|
172
|
-
|
|
236
|
+
group_sync: false,
|
|
237
|
+
_id: "639ee4cf462a9df7c25cef53",
|
|
173
238
|
},
|
|
174
239
|
{
|
|
175
240
|
command: "measureunit",
|
|
176
241
|
name: "Sync Measure Units",
|
|
177
242
|
description: "Sync Measure Units From SAP to Repzo",
|
|
178
|
-
|
|
243
|
+
group_sync: false,
|
|
244
|
+
_id: "639ee4cf462a9df7c25cef54",
|
|
179
245
|
},
|
|
180
246
|
{
|
|
181
247
|
command: "measureunit_family",
|
|
182
248
|
name: "Sync Measure Units Family",
|
|
183
249
|
description: "Sync Measure Units Family From SAP to Repzo",
|
|
184
|
-
|
|
250
|
+
group_sync: false,
|
|
251
|
+
_id: "639ee4cf462a9df7c25cef55",
|
|
185
252
|
},
|
|
186
253
|
{
|
|
187
254
|
command: "category",
|
|
188
255
|
name: "Sync Product Category",
|
|
189
256
|
description: "Sync Product Categories From SAP to Repzo",
|
|
257
|
+
group_sync: false,
|
|
258
|
+
_id: "639ee4cf462a9df7c25cef56",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
command: "brand",
|
|
262
|
+
name: "Sync Product Brand",
|
|
263
|
+
description: "Sync Product Brands From SAP to Repzo",
|
|
264
|
+
group_sync: false,
|
|
190
265
|
_id: "63984085edafde008af2f689",
|
|
191
266
|
},
|
|
192
267
|
{
|
|
193
268
|
command: "channel",
|
|
194
269
|
name: "Sync Client's Channels",
|
|
195
270
|
description: "Sync Client's Channels From SAP to Repzo",
|
|
196
|
-
|
|
271
|
+
group_sync: false,
|
|
272
|
+
_id: "639ee4cf462a9df7c25cef57",
|
|
197
273
|
},
|
|
198
274
|
{
|
|
199
275
|
command: "payment_term",
|
|
200
276
|
name: "Sync Payments Term",
|
|
201
277
|
description: "Sync Payments Term From SAP to Repzo",
|
|
202
|
-
|
|
278
|
+
group_sync: false,
|
|
279
|
+
_id: "639ee4cf462a9df7c25cef58",
|
|
203
280
|
},
|
|
204
281
|
{
|
|
205
282
|
command: "bank",
|
|
206
283
|
name: "Sync Banks",
|
|
207
284
|
description: "Sync Banks From SAP to Repzo",
|
|
208
|
-
|
|
285
|
+
group_sync: false,
|
|
286
|
+
_id: "639ee4cf462a9df7c25cef59",
|
|
209
287
|
},
|
|
210
288
|
{
|
|
211
289
|
command: "product",
|
|
212
290
|
name: "Sync Products",
|
|
213
291
|
description: "Sync Active Products From SAP to Repzo",
|
|
214
|
-
|
|
292
|
+
group_sync: false,
|
|
293
|
+
_id: "639ee4cf462a9df7c25cef5a",
|
|
215
294
|
},
|
|
216
295
|
{
|
|
217
296
|
command: "disabled_product",
|
|
218
297
|
name: "Sync Inactive Products",
|
|
219
298
|
description: "Sync Inactive Products From SAP to Repzo",
|
|
220
|
-
|
|
299
|
+
group_sync: false,
|
|
300
|
+
_id: "639ee4cf462a9df7c25cef5b",
|
|
221
301
|
},
|
|
222
302
|
{
|
|
223
303
|
command: "price_list",
|
|
224
304
|
name: "Sync Price Lists",
|
|
225
305
|
description: "Sync Price Lists From SAP to Repzo",
|
|
226
|
-
|
|
306
|
+
group_sync: false,
|
|
307
|
+
_id: "639ee4cf462a9df7c25cef5c",
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
command: "price_list_disabled",
|
|
311
|
+
name: "Sync Disbaled Price List Items",
|
|
312
|
+
description: "Sync Disbaled Price List Items From SAP to Repzo",
|
|
313
|
+
group_sync: false,
|
|
314
|
+
_id: "656ed4098961a3f97182773f",
|
|
227
315
|
},
|
|
228
316
|
{
|
|
229
317
|
command: "client",
|
|
230
318
|
name: "Sync Clients",
|
|
231
319
|
description: "Sync Clients From SAP to Repzo",
|
|
232
|
-
|
|
320
|
+
group_sync: false,
|
|
321
|
+
_id: "639ee4cf462a9df7c25cef5d",
|
|
233
322
|
},
|
|
234
323
|
{
|
|
235
324
|
command: "disabled_client",
|
|
236
325
|
name: "Sync Inactive Clients",
|
|
237
326
|
description: "Sync Inactive Clients From SAP to Repzo",
|
|
238
|
-
|
|
327
|
+
group_sync: false,
|
|
328
|
+
_id: "639ee4cf462a9df7c25cef5e",
|
|
239
329
|
},
|
|
240
330
|
{
|
|
241
331
|
command: "adjust_inventory",
|
|
242
332
|
name: "Adjust Inventories",
|
|
243
333
|
description: "Adjust Inventories From SAP to Repzo",
|
|
244
|
-
|
|
334
|
+
group_sync: false,
|
|
335
|
+
_id: "639ee4cf462a9df7c25cef5f",
|
|
245
336
|
},
|
|
246
337
|
],
|
|
247
338
|
actions: [
|
|
@@ -249,93 +340,83 @@ let commandEvent: CommandEvent | any = {
|
|
|
249
340
|
action: "create_invoice",
|
|
250
341
|
name: "Sync Invoices",
|
|
251
342
|
description: "Sync Invoices From Repzo to SAP",
|
|
252
|
-
_id: "
|
|
343
|
+
_id: "639ee4cf462a9df7c25cef60",
|
|
253
344
|
},
|
|
254
345
|
{
|
|
255
346
|
action: "create_return_invoice",
|
|
256
347
|
name: "Sync Return Invoices",
|
|
257
348
|
description: "Sync Return Invoices From Repzo to SAP",
|
|
258
|
-
_id: "
|
|
349
|
+
_id: "639ee4cf462a9df7c25cef61",
|
|
259
350
|
},
|
|
260
351
|
{
|
|
261
352
|
action: "create_proforma",
|
|
262
353
|
name: "Sync Approved Sales Orders",
|
|
263
354
|
description: "Sync Approved Sales Orders From Repzo to SAP",
|
|
264
|
-
_id: "
|
|
355
|
+
_id: "639ee4cf462a9df7c25cef62",
|
|
265
356
|
},
|
|
266
357
|
{
|
|
267
358
|
action: "create_payment",
|
|
268
359
|
name: "Sync Paymants",
|
|
269
360
|
description: "Sync Paymants From Repzo to SAP",
|
|
270
|
-
_id: "
|
|
361
|
+
_id: "639ee4cf462a9df7c25cef63",
|
|
271
362
|
},
|
|
272
363
|
{
|
|
273
364
|
action: "create_transfer",
|
|
274
365
|
name: "Sync Approved Transfers",
|
|
275
366
|
description: "Sync Approved Transfers From Repzo to SAP",
|
|
276
|
-
_id: "
|
|
367
|
+
_id: "639ee4cf462a9df7c25cef64",
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
action: "create_client",
|
|
371
|
+
name: "Sync Approved Clients",
|
|
372
|
+
description: "Sync Approved Clients From Repzo to SAP",
|
|
373
|
+
_id: "68edeaa0bfbb2c273b91736f",
|
|
277
374
|
},
|
|
278
375
|
],
|
|
279
|
-
createdAt: "2022-12-
|
|
280
|
-
updatedAt: "
|
|
376
|
+
createdAt: "2022-12-18T10:00:47.414Z",
|
|
377
|
+
updatedAt: "2025-10-14T06:16:00.977Z",
|
|
281
378
|
__v: 0,
|
|
379
|
+
subscription_billing_mode: "free",
|
|
282
380
|
},
|
|
283
|
-
company_namespace: ["
|
|
381
|
+
company_namespace: ["hassanein1"],
|
|
284
382
|
formData: {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
createPaymentHook: false,
|
|
291
|
-
},
|
|
292
|
-
proformas: {
|
|
293
|
-
createApprovedProformaHook: false,
|
|
294
|
-
},
|
|
383
|
+
repzoApiKey: "SZx76pM2TiuFt9kK7fsBCLkW7oY8qA8pIjUHdmgzdZg",
|
|
384
|
+
sapHostUrl: "https://abs-dmz.b1pro.com:9001/api",
|
|
385
|
+
invoices: { createInvoiceHook: true, createReturnInvoiceHook: true },
|
|
386
|
+
payments: { createPaymentHook: true },
|
|
387
|
+
proformas: { createApprovedProformaHook: true },
|
|
295
388
|
transfers: {
|
|
296
|
-
createApprovedTransferHook: false,
|
|
297
|
-
},
|
|
298
|
-
transfer: {
|
|
299
389
|
createApprovedTransferHook: true,
|
|
390
|
+
adjustInventoryInFailedTransfer: true,
|
|
300
391
|
},
|
|
301
|
-
|
|
302
|
-
sapHostUrl: "http://unipal.b1pro.com:8083/api",
|
|
303
|
-
errorEmail: "maram.alshen@repzoapp.com",
|
|
304
|
-
serviceApiKey: "awdas",
|
|
305
|
-
warehouseDefaultUpdateDate: "2015-01-01",
|
|
306
|
-
DepartmentCode: "D2",
|
|
307
|
-
return_reason:
|
|
308
|
-
'[{sap_id:1,sap_name:"BarcodeIssue",repzo_name:"Barcodeissue",repzo_id:"62b074972b332895edf114fc"},{sap_id:2,sap_name:"Damaged",repzo_name:"Damaged",repzo_id:"62b074ace96258fb745982e4"},{sap_id:3,sap_name:"Nearexpiry",repzo_name:"Nearexpiry",repzo_id:"62b074c0a066173bd1c1ea0d"},{sap_id:4,sap_name:"Wrongprinting",repzo_name:"Wrongprinting",repzo_id:"62b074d79e7f41f306a4cb42"},{sap_id:5,sap_name:"experied",repzo_name:"Experied",repzo_id:"62b074faa066173bd1c1eec0"}]',
|
|
309
|
-
SalPersCode: "111",
|
|
310
|
-
SalesPersonCode: "111",
|
|
392
|
+
client: { createClientHook: true },
|
|
311
393
|
},
|
|
312
394
|
options_formData: {
|
|
313
|
-
bench_time_warehouse: "
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
bench_time_disabled_client: "2022-12-18T05:40:29.169Z",
|
|
395
|
+
bench_time_warehouse: "2025-01-01",
|
|
396
|
+
bench_time_channel: "2025-09-22T11:59:38.667Z",
|
|
397
|
+
bench_time_payment_term: "2025-09-24T09:04:47.049Z",
|
|
398
|
+
bench_time_product: "2025-10-06T10:10:13.619Z",
|
|
399
|
+
bench_time_price_list: "2025-10-14T11:00:40.686Z",
|
|
400
|
+
bench_time_client: "2025-10-14T11:20:40.049Z",
|
|
401
|
+
bench_time_rep: "2025-10-12T10:40:25.535Z",
|
|
402
|
+
bench_time_tax: "2025-09-22T12:05:46.901Z",
|
|
403
|
+
bench_time_tag: "2025-09-22T12:06:01.041Z",
|
|
404
|
+
bench_time_measureunit: "2025-10-06T10:16:06.878Z",
|
|
405
|
+
bench_time_measureunit_family: "2025-09-29T13:21:39.534Z",
|
|
406
|
+
bench_time_category: "2025-09-24T09:04:43.969Z",
|
|
407
|
+
bench_time_brand: "2025-09-22T11:59:36.800Z",
|
|
408
|
+
bench_time_price_list_disabled: "2025-09-22T12:23:39.010Z",
|
|
328
409
|
},
|
|
329
|
-
createdAt: "
|
|
330
|
-
updatedAt: "
|
|
410
|
+
createdAt: "2025-09-22T10:03:47.010Z",
|
|
411
|
+
updatedAt: "2025-10-14T11:20:48.859Z",
|
|
331
412
|
__v: 0,
|
|
332
413
|
},
|
|
333
414
|
end_of_day: "04:00",
|
|
334
|
-
nameSpace: ["
|
|
415
|
+
nameSpace: ["hassanein1"],
|
|
335
416
|
timezone: "Asia/Amman",
|
|
336
417
|
meta: "",
|
|
337
418
|
env: "staging",
|
|
338
|
-
sync_id: "
|
|
419
|
+
sync_id: "bacad499-81e4-4925-bba4-b1f0befb7b21",
|
|
339
420
|
command: "join",
|
|
340
421
|
};
|
|
341
422
|
|