repzo-sap-absjo 1.0.1

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.
Files changed (157) hide show
  1. package/README.md +3 -0
  2. package/changelog.md +17 -0
  3. package/lib/actions/create_invoice.d.ts +26 -0
  4. package/lib/actions/create_invoice.js +311 -0
  5. package/lib/actions/create_payment.d.ts +5 -0
  6. package/lib/actions/create_payment.js +177 -0
  7. package/lib/actions/create_proforma.d.ts +5 -0
  8. package/lib/actions/create_proforma.js +241 -0
  9. package/lib/actions/create_return_invoice.d.ts +5 -0
  10. package/lib/actions/create_return_invoice.js +268 -0
  11. package/lib/actions/create_transfer.d.ts +5 -0
  12. package/lib/actions/create_transfer.js +171 -0
  13. package/lib/actions/index.d.ts +3 -0
  14. package/lib/actions/index.js +31 -0
  15. package/lib/commands/adjust_inventory.d.ts +6 -0
  16. package/lib/commands/adjust_inventory.js +303 -0
  17. package/lib/commands/bank.d.ts +7 -0
  18. package/lib/commands/bank.js +301 -0
  19. package/lib/commands/basic.d.ts +2 -0
  20. package/lib/commands/basic.js +73 -0
  21. package/lib/commands/category.d.ts +4 -0
  22. package/lib/commands/category.js +193 -0
  23. package/lib/commands/channel.d.ts +4 -0
  24. package/lib/commands/channel.js +213 -0
  25. package/lib/commands/client.d.ts +39 -0
  26. package/lib/commands/client.js +410 -0
  27. package/lib/commands/client_disabled.d.ts +4 -0
  28. package/lib/commands/client_disabled.js +183 -0
  29. package/lib/commands/index.d.ts +23 -0
  30. package/lib/commands/index.js +82 -0
  31. package/lib/commands/join.d.ts +2 -0
  32. package/lib/commands/join.js +134 -0
  33. package/lib/commands/measureunit.d.ts +23 -0
  34. package/lib/commands/measureunit.js +314 -0
  35. package/lib/commands/measureunit_family.d.ts +12 -0
  36. package/lib/commands/measureunit_family.js +263 -0
  37. package/lib/commands/payment_term.d.ts +4 -0
  38. package/lib/commands/payment_term.js +217 -0
  39. package/lib/commands/price_list.d.ts +18 -0
  40. package/lib/commands/price_list.js +608 -0
  41. package/lib/commands/product.d.ts +39 -0
  42. package/lib/commands/product.js +454 -0
  43. package/lib/commands/product_disabled.d.ts +4 -0
  44. package/lib/commands/product_disabled.js +178 -0
  45. package/lib/commands/rep.d.ts +2 -0
  46. package/lib/commands/rep.js +246 -0
  47. package/lib/commands/tag.d.ts +2 -0
  48. package/lib/commands/tag.js +195 -0
  49. package/lib/commands/tax.d.ts +2 -0
  50. package/lib/commands/tax.js +198 -0
  51. package/lib/commands/warehouse.d.ts +4 -0
  52. package/lib/commands/warehouse.js +221 -0
  53. package/lib/index.d.ts +29 -0
  54. package/lib/index.js +6 -0
  55. package/lib/test/actions/create_invoice.d.ts +1 -0
  56. package/lib/test/actions/create_invoice.js +214 -0
  57. package/lib/test/actions/create_payment.d.ts +1 -0
  58. package/lib/test/actions/create_payment.js +131 -0
  59. package/lib/test/actions/create_proforma.d.ts +1 -0
  60. package/lib/test/actions/create_proforma.js +242 -0
  61. package/lib/test/actions/create_return_invoice.d.ts +1 -0
  62. package/lib/test/actions/create_return_invoice.js +226 -0
  63. package/lib/test/actions/create_transfer.d.ts +1 -0
  64. package/lib/test/actions/create_transfer.js +142 -0
  65. package/lib/test/commands/adjust_inventory.d.ts +1 -0
  66. package/lib/test/commands/adjust_inventory.js +97 -0
  67. package/lib/test/commands/bank.d.ts +1 -0
  68. package/lib/test/commands/bank.js +97 -0
  69. package/lib/test/commands/basic.d.ts +1 -0
  70. package/lib/test/commands/basic.js +339 -0
  71. package/lib/test/commands/category.d.ts +1 -0
  72. package/lib/test/commands/category.js +97 -0
  73. package/lib/test/commands/channel.d.ts +1 -0
  74. package/lib/test/commands/channel.js +97 -0
  75. package/lib/test/commands/client.d.ts +1 -0
  76. package/lib/test/commands/client.js +97 -0
  77. package/lib/test/commands/client_disabled.d.ts +1 -0
  78. package/lib/test/commands/client_disabled.js +97 -0
  79. package/lib/test/commands/join.d.ts +1 -0
  80. package/lib/test/commands/join.js +339 -0
  81. package/lib/test/commands/measureunit.d.ts +1 -0
  82. package/lib/test/commands/measureunit.js +97 -0
  83. package/lib/test/commands/measureunit_family.d.ts +1 -0
  84. package/lib/test/commands/measureunit_family.js +97 -0
  85. package/lib/test/commands/payment_term.d.ts +1 -0
  86. package/lib/test/commands/payment_term.js +97 -0
  87. package/lib/test/commands/price_list.d.ts +1 -0
  88. package/lib/test/commands/price_list.js +97 -0
  89. package/lib/test/commands/product.d.ts +1 -0
  90. package/lib/test/commands/product.js +97 -0
  91. package/lib/test/commands/product_disabled.d.ts +1 -0
  92. package/lib/test/commands/product_disabled.js +97 -0
  93. package/lib/test/commands/rep.d.ts +1 -0
  94. package/lib/test/commands/rep.js +97 -0
  95. package/lib/test/commands/tag.d.ts +1 -0
  96. package/lib/test/commands/tag.js +97 -0
  97. package/lib/test/commands/tax.d.ts +1 -0
  98. package/lib/test/commands/tax.js +97 -0
  99. package/lib/test/commands/warehouse.d.ts +1 -0
  100. package/lib/test/commands/warehouse.js +97 -0
  101. package/lib/types.d.ts +77 -0
  102. package/lib/types.js +1 -0
  103. package/lib/util.d.ts +70 -0
  104. package/lib/util.js +164 -0
  105. package/package.json +51 -0
  106. package/src/actions/create_invoice.ts +275 -0
  107. package/src/actions/create_payment.ts +138 -0
  108. package/src/actions/create_proforma.ts +187 -0
  109. package/src/actions/create_return_invoice.ts +217 -0
  110. package/src/actions/create_transfer.ts +160 -0
  111. package/src/actions/index.ts +27 -0
  112. package/src/commands/adjust_inventory.ts +250 -0
  113. package/src/commands/bank.ts +243 -0
  114. package/src/commands/basic.ts +64 -0
  115. package/src/commands/category.ts +176 -0
  116. package/src/commands/channel.ts +219 -0
  117. package/src/commands/client.ts +368 -0
  118. package/src/commands/client_disabled.ts +158 -0
  119. package/src/commands/index.ts +87 -0
  120. package/src/commands/join.ts +80 -0
  121. package/src/commands/measureunit.ts +276 -0
  122. package/src/commands/measureunit_family.ts +209 -0
  123. package/src/commands/payment_term.ts +224 -0
  124. package/src/commands/price_list.ts +434 -0
  125. package/src/commands/product.ts +359 -0
  126. package/src/commands/product_disabled.ts +152 -0
  127. package/src/commands/rep.ts +209 -0
  128. package/src/commands/tag.ts +173 -0
  129. package/src/commands/tax.ts +178 -0
  130. package/src/commands/warehouse.ts +204 -0
  131. package/src/index.ts +7 -0
  132. package/src/test/actions/create_invoice.ts +214 -0
  133. package/src/test/actions/create_payment.ts +131 -0
  134. package/src/test/actions/create_proforma.ts +242 -0
  135. package/src/test/actions/create_return_invoice.ts +226 -0
  136. package/src/test/actions/create_transfer.ts +142 -0
  137. package/src/test/commands/adjust_inventory.ts +100 -0
  138. package/src/test/commands/bank.ts +100 -0
  139. package/src/test/commands/basic.ts +342 -0
  140. package/src/test/commands/category.ts +100 -0
  141. package/src/test/commands/channel.ts +100 -0
  142. package/src/test/commands/client.ts +100 -0
  143. package/src/test/commands/client_disabled.ts +100 -0
  144. package/src/test/commands/join.ts +342 -0
  145. package/src/test/commands/measureunit.ts +100 -0
  146. package/src/test/commands/measureunit_family.ts +100 -0
  147. package/src/test/commands/payment_term.ts +100 -0
  148. package/src/test/commands/price_list.ts +100 -0
  149. package/src/test/commands/product.ts +100 -0
  150. package/src/test/commands/product_disabled.ts +100 -0
  151. package/src/test/commands/rep.ts +100 -0
  152. package/src/test/commands/tag.ts +100 -0
  153. package/src/test/commands/tax.ts +100 -0
  154. package/src/test/commands/warehouse.ts +100 -0
  155. package/src/types.ts +76 -0
  156. package/src/util.ts +205 -0
  157. package/tsconfig.json +15 -0
@@ -0,0 +1,342 @@
1
+ import { CommandEvent, Result } from "../../types";
2
+ import { Commands } from "../../index.js";
3
+
4
+ let commandEvent: CommandEvent | any = {
5
+ app: {
6
+ _id: "6391a53edb71ef6435719794",
7
+ name: "SAP",
8
+ disabled: false,
9
+ available_app: {
10
+ _id: "6391a268db71ef64357195da",
11
+ name: "repzo-sap-absjo",
12
+ title: "SAP ABS JO",
13
+ logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
14
+ description: "",
15
+ disabled: false,
16
+ JSONSchema: {
17
+ title: "SAP Integration Settings",
18
+ type: "object",
19
+ required: ["repzoApiKey", "sapHostUrl"],
20
+ properties: {
21
+ repzoApiKey: {
22
+ type: "string",
23
+ title: "Repzo API KEY",
24
+ },
25
+ sapHostUrl: {
26
+ type: "string",
27
+ title: "SAP Host Url",
28
+ },
29
+ errorEmail: {
30
+ type: "string",
31
+ format: "email",
32
+ title: "Email in case of error",
33
+ },
34
+ GroupCode: {
35
+ type: "string",
36
+ format: "string",
37
+ title: "Customers GroupCode",
38
+ },
39
+ warehouseDefaultUpdateDate: {
40
+ type: "string",
41
+ format: "date",
42
+ title: "Warehouse: Default Update Date",
43
+ },
44
+ DepartmentCode: {
45
+ type: "string",
46
+ format: "string",
47
+ title: "Invoice/Return Department Code",
48
+ },
49
+ return_reason: {
50
+ type: "string",
51
+ format: "string",
52
+ title: "Return Reason Array",
53
+ },
54
+ SalPersCode: {
55
+ type: "string",
56
+ format: "string",
57
+ title: "Default Sales Person Code For Sales Orders",
58
+ },
59
+ SalesPersonCode: {
60
+ type: "string",
61
+ format: "string",
62
+ title: "Default Sales Person Code For Transfer",
63
+ },
64
+ invoices: {
65
+ type: "object",
66
+ title: "Invoices",
67
+ required: ["createInvoiceHook", "createReturnInvoiceHook"],
68
+ properties: {
69
+ createInvoiceHook: {
70
+ type: "boolean",
71
+ title: "Live Sync Invoices from Repzo to SAP",
72
+ default: false,
73
+ },
74
+ createReturnInvoiceHook: {
75
+ type: "boolean",
76
+ title: "Live Sync Return Invoice from Repzo to SAP",
77
+ default: false,
78
+ },
79
+ },
80
+ },
81
+ payments: {
82
+ type: "object",
83
+ title: "Payments",
84
+ required: ["createPaymentHook"],
85
+ properties: {
86
+ createPaymentHook: {
87
+ type: "boolean",
88
+ title: "Live Sync Payments from Repzo to SAP",
89
+ default: false,
90
+ },
91
+ },
92
+ },
93
+ proformas: {
94
+ type: "object",
95
+ title: "Sales Orders",
96
+ required: ["createApprovedProformaHook"],
97
+ properties: {
98
+ createApprovedProformaHook: {
99
+ type: "boolean",
100
+ title: "Live Sync Approved Sales Orders from Repzo to SAP",
101
+ default: false,
102
+ },
103
+ },
104
+ },
105
+ transfers: {
106
+ type: "object",
107
+ title: "Transfers",
108
+ required: ["createApprovedTransferHook"],
109
+ properties: {
110
+ createApprovedTransferHook: {
111
+ type: "boolean",
112
+ title: "Live Sync Approved Transfers from Repzo to SAP",
113
+ default: false,
114
+ },
115
+ },
116
+ },
117
+ },
118
+ },
119
+ options_JSONSchema: {
120
+ title: "SAP Integration Optional Settings",
121
+ type: "object",
122
+ required: [],
123
+ properties: {
124
+ bench_time_warehouse: {
125
+ title: "Bench Time: Warehouse",
126
+ type: "string",
127
+ format: "date",
128
+ },
129
+ },
130
+ },
131
+ app_settings: {
132
+ repo: "",
133
+ serviceEndPoint: "",
134
+ _id: "6391a268db71ef64357195db",
135
+ },
136
+ app_category: "6249fa8466312f76e595634a",
137
+ commands: [
138
+ {
139
+ command: "basic",
140
+ name: "Full Sync",
141
+ description: "",
142
+ _id: "6391a268db71ef64357195dc",
143
+ },
144
+ {
145
+ command: "join",
146
+ name: "Join",
147
+ description: "",
148
+ _id: "6391a268db71ef64357195dd",
149
+ },
150
+ {
151
+ command: "warehouse",
152
+ name: "Sync Warehouse",
153
+ description: "Sync Warehouses From SAP to Repzo",
154
+ _id: "6391c42a1b0f4f7a30e40f40",
155
+ },
156
+ {
157
+ command: "rep",
158
+ name: "Sync Representatives",
159
+ description: "Sync Representatives From SAP to Repzo",
160
+ _id: "639715c2bee5dd4b6b11e129",
161
+ },
162
+ {
163
+ command: "tax",
164
+ name: "Sync Taxes",
165
+ description: "Sync Taxes From SAP to Repzo",
166
+ _id: "639715c2bee5dd4b6b11e12a",
167
+ },
168
+ {
169
+ command: "tag",
170
+ name: "Sync Area Tags",
171
+ description: "Sync Area Tags From SAP to Repzo",
172
+ _id: "639715c2bee5dd4b6b11e12b",
173
+ },
174
+ {
175
+ command: "measureunit",
176
+ name: "Sync Measure Units",
177
+ description: "Sync Measure Units From SAP to Repzo",
178
+ _id: "639817eaedafde008af0ad0e",
179
+ },
180
+ {
181
+ command: "measureunit_family",
182
+ name: "Sync Measure Units Family",
183
+ description: "Sync Measure Units Family From SAP to Repzo",
184
+ _id: "63982d09edafde008af0f698",
185
+ },
186
+ {
187
+ command: "category",
188
+ name: "Sync Product Category",
189
+ description: "Sync Product Categories From SAP to Repzo",
190
+ _id: "63984085edafde008af2f689",
191
+ },
192
+ {
193
+ command: "channel",
194
+ name: "Sync Client's Channels",
195
+ description: "Sync Client's Channels From SAP to Repzo",
196
+ _id: "63984085edafde008af2f689",
197
+ },
198
+ {
199
+ command: "payment_term",
200
+ name: "Sync Payments Term",
201
+ description: "Sync Payments Term From SAP to Repzo",
202
+ _id: "63984085edafde008af2f68a",
203
+ },
204
+ {
205
+ command: "bank",
206
+ name: "Sync Banks",
207
+ description: "Sync Banks From SAP to Repzo",
208
+ _id: "63986018333b84929c538570",
209
+ },
210
+ {
211
+ command: "product",
212
+ name: "Sync Products",
213
+ description: "Sync Active Products From SAP to Repzo",
214
+ _id: "63987139333b84929c53a293",
215
+ },
216
+ {
217
+ command: "disabled_product",
218
+ name: "Sync Inactive Products",
219
+ description: "Sync Inactive Products From SAP to Repzo",
220
+ _id: "6399714d0242db686d496466",
221
+ },
222
+ {
223
+ command: "price_list",
224
+ name: "Sync Price Lists",
225
+ description: "Sync Price Lists From SAP to Repzo",
226
+ _id: "639972d6e8a1cfdd26deaa7e",
227
+ },
228
+ {
229
+ command: "client",
230
+ name: "Sync Clients",
231
+ description: "Sync Clients From SAP to Repzo",
232
+ _id: "63997615e8a1cfdd26ded7d1",
233
+ },
234
+ {
235
+ command: "disabled_client",
236
+ name: "Sync Inactive Clients",
237
+ description: "Sync Inactive Clients From SAP to Repzo",
238
+ _id: "639ac554e157f1c63770c1bc",
239
+ },
240
+ {
241
+ command: "adjust_inventory",
242
+ name: "Adjust Inventories",
243
+ description: "Adjust Inventories From SAP to Repzo",
244
+ _id: "639ac56fe157f1c63770c2eb",
245
+ },
246
+ ],
247
+ actions: [
248
+ {
249
+ action: "create_invoice",
250
+ name: "Sync Invoices",
251
+ description: "Sync Invoices From Repzo to SAP",
252
+ _id: "639ebeacdbba64d7af94520c",
253
+ },
254
+ {
255
+ action: "create_return_invoice",
256
+ name: "Sync Return Invoices",
257
+ description: "Sync Return Invoices From Repzo to SAP",
258
+ _id: "639ebeacdbba64d7af94520d",
259
+ },
260
+ {
261
+ action: "create_proforma",
262
+ name: "Sync Approved Sales Orders",
263
+ description: "Sync Approved Sales Orders From Repzo to SAP",
264
+ _id: "639ebeacdbba64d7af94520e",
265
+ },
266
+ {
267
+ action: "create_payment",
268
+ name: "Sync Paymants",
269
+ description: "Sync Paymants From Repzo to SAP",
270
+ _id: "639ebeacdbba64d7af94520f",
271
+ },
272
+ {
273
+ action: "create_transfer",
274
+ name: "Sync Approved Transfers",
275
+ description: "Sync Approved Transfers From Repzo to SAP",
276
+ _id: "639ebeacdbba64d7af945210",
277
+ },
278
+ ],
279
+ createdAt: "2022-12-08T08:38:00.915Z",
280
+ updatedAt: "2022-12-18T09:01:24.539Z",
281
+ __v: 0,
282
+ },
283
+ company_namespace: ["unisap"],
284
+ formData: {
285
+ invoices: {
286
+ createInvoiceHook: false,
287
+ createReturnInvoiceHook: false,
288
+ },
289
+ payments: {
290
+ createPaymentHook: false,
291
+ },
292
+ proformas: {
293
+ createApprovedProformaHook: false,
294
+ },
295
+ transfers: {
296
+ createApprovedTransferHook: false,
297
+ },
298
+ transfer: {
299
+ createApprovedTransferHook: true,
300
+ },
301
+ repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
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",
311
+ },
312
+ options_formData: {
313
+ bench_time_warehouse: "2022-12-08",
314
+ bench_time_rep: "2022-12-12T11:43:07.899Z",
315
+ bench_time_tax: "2022-12-13T05:52:47.025Z",
316
+ bench_time_tag: "2022-12-13T06:00:22.724Z",
317
+ bench_time_measureunit: "2022-12-13T06:48:44.370Z",
318
+ bench_time_measureunit_family: "2022-12-13T08:27:26.562Z",
319
+ bench_time_category: "2022-12-13T09:14:26.572Z",
320
+ bench_time_channel: "2022-12-13T09:18:07.697Z",
321
+ bench_time_payment_term: "2022-12-13T09:19:50.316Z",
322
+ bench_time_bank: "2022-12-13T11:50:08.710Z",
323
+ bench_time_product: "2022-12-18T05:48:21.443Z",
324
+ bench_time_product_disabled: "2022-12-14T06:53:26.903Z",
325
+ bench_time_price_list: "2022-12-14T11:41:36.811Z",
326
+ bench_time_client: "2022-12-18T05:28:57.853Z",
327
+ bench_time_disabled_client: "2022-12-18T05:40:29.169Z",
328
+ },
329
+ createdAt: "2022-12-08T08:50:06.903Z",
330
+ updatedAt: "2022-12-18T09:02:48.580Z",
331
+ __v: 0,
332
+ },
333
+ end_of_day: "04:00",
334
+ nameSpace: ["unisap"],
335
+ timezone: "Asia/Amman",
336
+ meta: "",
337
+ env: "staging",
338
+ sync_id: "47c9c804-e136-4d54-928a-000018",
339
+ command: "basic",
340
+ };
341
+
342
+ Commands(commandEvent);
@@ -0,0 +1,100 @@
1
+ import { CommandEvent, Result } from "../../types";
2
+ import { Commands } from "../../index.js";
3
+
4
+ let commandEvent: CommandEvent | any = {
5
+ app: {
6
+ _id: "6391a53edb71ef6435719794",
7
+ name: "SAP",
8
+ disabled: false,
9
+ available_app: {
10
+ _id: "6391a268db71ef64357195da",
11
+ name: "repzo-sap-absjo",
12
+ title: "SAP ABS JO",
13
+ logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
14
+ description: "",
15
+ disabled: false,
16
+ JSONSchema: {
17
+ title: "SAP Integration Settings",
18
+ type: "object",
19
+ required: ["repzoApiKey", "sapHostUrl"],
20
+ properties: {
21
+ repzoApiKey: {
22
+ type: "string",
23
+ title: "Repzo API KEY",
24
+ },
25
+ sapHostUrl: {
26
+ type: "string",
27
+ title: "SAP Host Url",
28
+ },
29
+ errorEmail: {
30
+ type: "string",
31
+ format: "email",
32
+ title: "Email in case of error",
33
+ },
34
+ warehouseDefaultUpdateDate: {
35
+ type: "string",
36
+ format: "date",
37
+ title: "Warehouse: Default Update Date",
38
+ },
39
+ },
40
+ },
41
+ options_JSONSchema: {
42
+ title: "SAP Integration Optional Settings",
43
+ type: "object",
44
+ required: [],
45
+ properties: {
46
+ bench_time_warehouse: {
47
+ title: "Bench Time: Warehouse",
48
+ type: "string",
49
+ format: "date",
50
+ },
51
+ },
52
+ },
53
+ app_settings: {
54
+ repo: "",
55
+ serviceEndPoint: "",
56
+ _id: "6391a268db71ef64357195db",
57
+ },
58
+ app_category: "6249fa8466312f76e595634a",
59
+ commands: [
60
+ {
61
+ command: "basic",
62
+ name: "Full Sync",
63
+ description: "",
64
+ _id: "6391a268db71ef64357195dc",
65
+ },
66
+ {
67
+ command: "join",
68
+ name: "Join",
69
+ description: "",
70
+ _id: "6391a268db71ef64357195dd",
71
+ },
72
+ ],
73
+ actions: [],
74
+ createdAt: "2022-12-08T08:38:00.915Z",
75
+ updatedAt: "2022-12-08T09:42:49.236Z",
76
+ __v: 0,
77
+ },
78
+ company_namespace: ["unisap"],
79
+ formData: {
80
+ repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
81
+ sapHostUrl: "http://unipal.b1pro.com:8083/api",
82
+ errorEmail: "maram.alshen@repzoapp.com",
83
+ serviceApiKey: "awdas",
84
+ warehouseDefaultUpdateDate: "2015-01-01",
85
+ },
86
+ options_formData: {},
87
+ createdAt: "2022-12-08T08:50:06.903Z",
88
+ updatedAt: "2022-12-08T09:43:21.620Z",
89
+ __v: 0,
90
+ },
91
+ end_of_day: "04:00",
92
+ nameSpace: ["unisap"], // demosv
93
+ timezone: "Asia/Amman",
94
+ meta: "",
95
+ env: "staging",
96
+ sync_id: "47c9c804-e136-4d54-928a-000006",
97
+ command: "category",
98
+ };
99
+
100
+ Commands(commandEvent);
@@ -0,0 +1,100 @@
1
+ import { CommandEvent, Result } from "../../types";
2
+ import { Commands } from "../../index.js";
3
+
4
+ let commandEvent: CommandEvent | any = {
5
+ app: {
6
+ _id: "6391a53edb71ef6435719794",
7
+ name: "SAP",
8
+ disabled: false,
9
+ available_app: {
10
+ _id: "6391a268db71ef64357195da",
11
+ name: "repzo-sap-absjo",
12
+ title: "SAP ABS JO",
13
+ logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
14
+ description: "",
15
+ disabled: false,
16
+ JSONSchema: {
17
+ title: "SAP Integration Settings",
18
+ type: "object",
19
+ required: ["repzoApiKey", "sapHostUrl"],
20
+ properties: {
21
+ repzoApiKey: {
22
+ type: "string",
23
+ title: "Repzo API KEY",
24
+ },
25
+ sapHostUrl: {
26
+ type: "string",
27
+ title: "SAP Host Url",
28
+ },
29
+ errorEmail: {
30
+ type: "string",
31
+ format: "email",
32
+ title: "Email in case of error",
33
+ },
34
+ warehouseDefaultUpdateDate: {
35
+ type: "string",
36
+ format: "date",
37
+ title: "Warehouse: Default Update Date",
38
+ },
39
+ },
40
+ },
41
+ options_JSONSchema: {
42
+ title: "SAP Integration Optional Settings",
43
+ type: "object",
44
+ required: [],
45
+ properties: {
46
+ bench_time_warehouse: {
47
+ title: "Bench Time: Warehouse",
48
+ type: "string",
49
+ format: "date",
50
+ },
51
+ },
52
+ },
53
+ app_settings: {
54
+ repo: "",
55
+ serviceEndPoint: "",
56
+ _id: "6391a268db71ef64357195db",
57
+ },
58
+ app_category: "6249fa8466312f76e595634a",
59
+ commands: [
60
+ {
61
+ command: "basic",
62
+ name: "Full Sync",
63
+ description: "",
64
+ _id: "6391a268db71ef64357195dc",
65
+ },
66
+ {
67
+ command: "join",
68
+ name: "Join",
69
+ description: "",
70
+ _id: "6391a268db71ef64357195dd",
71
+ },
72
+ ],
73
+ actions: [],
74
+ createdAt: "2022-12-08T08:38:00.915Z",
75
+ updatedAt: "2022-12-08T09:42:49.236Z",
76
+ __v: 0,
77
+ },
78
+ company_namespace: ["unisap"],
79
+ formData: {
80
+ repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
81
+ sapHostUrl: "http://unipal.b1pro.com:8083/api",
82
+ errorEmail: "maram.alshen@repzoapp.com",
83
+ serviceApiKey: "awdas",
84
+ warehouseDefaultUpdateDate: "2015-01-01",
85
+ },
86
+ options_formData: {},
87
+ createdAt: "2022-12-08T08:50:06.903Z",
88
+ updatedAt: "2022-12-08T09:43:21.620Z",
89
+ __v: 0,
90
+ },
91
+ end_of_day: "04:00",
92
+ nameSpace: ["unisap"], // demosv
93
+ timezone: "Asia/Amman",
94
+ meta: "",
95
+ env: "staging",
96
+ sync_id: "47c9c804-e136-4d54-928a-000007",
97
+ command: "channel",
98
+ };
99
+
100
+ Commands(commandEvent);
@@ -0,0 +1,100 @@
1
+ import { CommandEvent, Result } from "../../types";
2
+ import { Commands } from "../../index.js";
3
+
4
+ let commandEvent: CommandEvent | any = {
5
+ app: {
6
+ _id: "6391a53edb71ef6435719794",
7
+ name: "SAP",
8
+ disabled: false,
9
+ available_app: {
10
+ _id: "6391a268db71ef64357195da",
11
+ name: "repzo-sap-absjo",
12
+ title: "SAP ABS JO",
13
+ logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
14
+ description: "",
15
+ disabled: false,
16
+ JSONSchema: {
17
+ title: "SAP Integration Settings",
18
+ type: "object",
19
+ required: ["repzoApiKey", "sapHostUrl"],
20
+ properties: {
21
+ repzoApiKey: {
22
+ type: "string",
23
+ title: "Repzo API KEY",
24
+ },
25
+ sapHostUrl: {
26
+ type: "string",
27
+ title: "SAP Host Url",
28
+ },
29
+ errorEmail: {
30
+ type: "string",
31
+ format: "email",
32
+ title: "Email in case of error",
33
+ },
34
+ warehouseDefaultUpdateDate: {
35
+ type: "string",
36
+ format: "date",
37
+ title: "Warehouse: Default Update Date",
38
+ },
39
+ },
40
+ },
41
+ options_JSONSchema: {
42
+ title: "SAP Integration Optional Settings",
43
+ type: "object",
44
+ required: [],
45
+ properties: {
46
+ bench_time_warehouse: {
47
+ title: "Bench Time: Warehouse",
48
+ type: "string",
49
+ format: "date",
50
+ },
51
+ },
52
+ },
53
+ app_settings: {
54
+ repo: "",
55
+ serviceEndPoint: "",
56
+ _id: "6391a268db71ef64357195db",
57
+ },
58
+ app_category: "6249fa8466312f76e595634a",
59
+ commands: [
60
+ {
61
+ command: "basic",
62
+ name: "Full Sync",
63
+ description: "",
64
+ _id: "6391a268db71ef64357195dc",
65
+ },
66
+ {
67
+ command: "join",
68
+ name: "Join",
69
+ description: "",
70
+ _id: "6391a268db71ef64357195dd",
71
+ },
72
+ ],
73
+ actions: [],
74
+ createdAt: "2022-12-08T08:38:00.915Z",
75
+ updatedAt: "2022-12-08T09:42:49.236Z",
76
+ __v: 0,
77
+ },
78
+ company_namespace: ["unisap"],
79
+ formData: {
80
+ repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
81
+ sapHostUrl: "http://unipal.b1pro.com:8083/api",
82
+ errorEmail: "maram.alshen@repzoapp.com",
83
+ serviceApiKey: "awdas",
84
+ warehouseDefaultUpdateDate: "2015-01-01",
85
+ },
86
+ options_formData: {},
87
+ createdAt: "2022-12-08T08:50:06.903Z",
88
+ updatedAt: "2022-12-08T09:43:21.620Z",
89
+ __v: 0,
90
+ },
91
+ end_of_day: "04:00",
92
+ nameSpace: ["unisap"],
93
+ timezone: "Asia/Amman",
94
+ meta: "",
95
+ env: "staging",
96
+ sync_id: "47c9c804-e136-4d54-928a-000014",
97
+ command: "client",
98
+ };
99
+
100
+ Commands(commandEvent);