repzo-sap-absjo 1.0.10 → 1.0.12

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 (79) hide show
  1. package/changelog.md +2 -0
  2. package/lib/actions/create_invoice.d.ts +19 -13
  3. package/lib/actions/create_invoice.js +356 -208
  4. package/lib/actions/create_payment.d.ts +4 -1
  5. package/lib/actions/create_payment.js +191 -117
  6. package/lib/actions/create_proforma.d.ts +4 -1
  7. package/lib/actions/create_proforma.js +285 -155
  8. package/lib/actions/create_return_invoice.d.ts +4 -1
  9. package/lib/actions/create_return_invoice.js +312 -169
  10. package/lib/actions/create_transfer.d.ts +4 -1
  11. package/lib/actions/create_transfer.js +223 -136
  12. package/lib/actions/index.js +23 -15
  13. package/lib/commands/adjust_inventory.d.ts +4 -2
  14. package/lib/commands/adjust_inventory.js +290 -160
  15. package/lib/commands/bank.d.ts +4 -2
  16. package/lib/commands/bank.js +279 -157
  17. package/lib/commands/basic.js +66 -47
  18. package/lib/commands/category.d.ts +3 -1
  19. package/lib/commands/category.js +178 -104
  20. package/lib/commands/channel.d.ts +3 -1
  21. package/lib/commands/channel.js +198 -117
  22. package/lib/commands/client.d.ts +34 -32
  23. package/lib/commands/client.js +404 -244
  24. package/lib/commands/client_disabled.d.ts +3 -1
  25. package/lib/commands/client_disabled.js +163 -94
  26. package/lib/commands/index.d.ts +15 -11
  27. package/lib/commands/index.js +60 -60
  28. package/lib/commands/join.js +192 -66
  29. package/lib/commands/measureunit.d.ts +19 -14
  30. package/lib/commands/measureunit.js +289 -191
  31. package/lib/commands/measureunit_family.d.ts +10 -8
  32. package/lib/commands/measureunit_family.js +250 -138
  33. package/lib/commands/payment_term.d.ts +3 -1
  34. package/lib/commands/payment_term.js +202 -123
  35. package/lib/commands/price_list.d.ts +15 -15
  36. package/lib/commands/price_list.js +612 -326
  37. package/lib/commands/product.d.ts +32 -30
  38. package/lib/commands/product.js +426 -243
  39. package/lib/commands/product_disabled.d.ts +3 -1
  40. package/lib/commands/product_disabled.js +164 -94
  41. package/lib/commands/rep.js +221 -141
  42. package/lib/commands/tag.js +174 -109
  43. package/lib/commands/tax.js +177 -112
  44. package/lib/commands/warehouse.d.ts +3 -1
  45. package/lib/commands/warehouse.js +207 -119
  46. package/lib/index.d.ts +21 -12
  47. package/lib/test/actions/create_invoice.js +193 -188
  48. package/lib/test/actions/create_payment.js +112 -107
  49. package/lib/test/actions/create_proforma.js +220 -216
  50. package/lib/test/actions/create_return_invoice.js +205 -200
  51. package/lib/test/actions/create_transfer.js +120 -115
  52. package/lib/test/commands/adjust_inventory.js +90 -90
  53. package/lib/test/commands/bank.js +90 -90
  54. package/lib/test/commands/basic.js +328 -327
  55. package/lib/test/commands/category.js +90 -90
  56. package/lib/test/commands/channel.js +90 -90
  57. package/lib/test/commands/client.js +355 -353
  58. package/lib/test/commands/client_disabled.js +90 -90
  59. package/lib/test/commands/join.js +328 -327
  60. package/lib/test/commands/measureunit.js +90 -90
  61. package/lib/test/commands/measureunit_family.js +90 -90
  62. package/lib/test/commands/payment_term.js +90 -90
  63. package/lib/test/commands/price_list.js +337 -334
  64. package/lib/test/commands/product.js +90 -90
  65. package/lib/test/commands/product_disabled.js +90 -90
  66. package/lib/test/commands/rep.js +346 -344
  67. package/lib/test/commands/tag.js +90 -90
  68. package/lib/test/commands/tax.js +90 -90
  69. package/lib/test/commands/warehouse.js +90 -90
  70. package/lib/types.d.ts +83 -60
  71. package/lib/util.d.ts +70 -19
  72. package/lib/util.js +170 -144
  73. package/package.json +2 -2
  74. package/src/actions/create_invoice.ts +11 -16
  75. package/src/actions/create_payment.ts +11 -16
  76. package/src/actions/create_proforma.ts +19 -24
  77. package/src/actions/create_return_invoice.ts +11 -16
  78. package/src/actions/create_transfer.ts +23 -28
  79. package/src/commands/product.ts +1 -0
@@ -1,138 +1,143 @@
1
1
  import { Actions } from "../../index.js";
2
- Actions({
2
+ Actions(
3
+ {
3
4
  version: "2.0",
4
5
  routeKey: "POST /actions",
5
6
  rawPath: "/actions",
6
7
  rawQueryString: "app=repzo-sap-absjo&action=create_transfer",
7
8
  headers: {
8
- action_sync_id: "Actions-0000005",
9
- accept: "*/*",
10
- "accept-encoding": "gzip, deflate",
11
- "content-length": "3658",
12
- "content-type": "application/json",
13
- host: "staging.marketplace.api.repzo.me",
14
- "svix-id": "msg_29I1By29ETyPiZ4SNrc99KIg7D6",
15
- "svix-signature": "v1,OkktM+dibxzeb0M6383POFjBr7DX14HECpBIh17FQnU=",
16
- "svix-timestamp": "1652785653",
17
- "user-agent": "Svix-Webhooks/1.4",
18
- "x-amzn-trace-id": "Root=1-628381f6-0b2c6f346d2eb5d207b582ee",
19
- "x-forwarded-for": "52.215.16.239",
20
- "x-forwarded-port": "443",
21
- "x-forwarded-proto": "https",
9
+ action_sync_id: "Actions-0000005",
10
+ accept: "*/*",
11
+ "accept-encoding": "gzip, deflate",
12
+ "content-length": "3658",
13
+ "content-type": "application/json",
14
+ host: "staging.marketplace.api.repzo.me",
15
+ "svix-id": "msg_29I1By29ETyPiZ4SNrc99KIg7D6",
16
+ "svix-signature": "v1,OkktM+dibxzeb0M6383POFjBr7DX14HECpBIh17FQnU=",
17
+ "svix-timestamp": "1652785653",
18
+ "user-agent": "Svix-Webhooks/1.4",
19
+ "x-amzn-trace-id": "Root=1-628381f6-0b2c6f346d2eb5d207b582ee",
20
+ "x-forwarded-for": "52.215.16.239",
21
+ "x-forwarded-port": "443",
22
+ "x-forwarded-proto": "https",
22
23
  },
23
24
  queryStringParameters: {
24
- action: "create_transfer",
25
- app: "repzo-sap-absjo",
25
+ action: "create_transfer",
26
+ app: "repzo-sap-absjo",
26
27
  },
27
28
  requestContext: {
28
- accountId: "478266140170",
29
- apiId: "ulkb1ikop2",
30
- domainName: "staging.marketplace.api.repzo.me",
31
- domainPrefix: "staging",
32
- http: {
33
- method: "POST",
34
- path: "/actions",
35
- protocol: "HTTP/1.1",
36
- sourceIp: "52.215.16.239",
37
- userAgent: "Svix-Webhooks/1.4",
38
- },
39
- requestId: "SRE-ejb6IAMEPWQ=",
40
- routeKey: "POST /actions",
41
- stage: "$default",
42
- time: "17/May/2022:11:07:34 +0000",
43
- timeEpoch: 1652785654069,
29
+ accountId: "478266140170",
30
+ apiId: "ulkb1ikop2",
31
+ domainName: "staging.marketplace.api.repzo.me",
32
+ domainPrefix: "staging",
33
+ http: {
34
+ method: "POST",
35
+ path: "/actions",
36
+ protocol: "HTTP/1.1",
37
+ sourceIp: "52.215.16.239",
38
+ userAgent: "Svix-Webhooks/1.4",
39
+ },
40
+ requestId: "SRE-ejb6IAMEPWQ=",
41
+ routeKey: "POST /actions",
42
+ stage: "$default",
43
+ time: "17/May/2022:11:07:34 +0000",
44
+ timeEpoch: 1652785654069,
44
45
  },
45
46
  body: JSON.stringify({
47
+ __v: 0,
48
+ _id: "639ec8c54183c8b556b44687",
49
+ authorization:
50
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjY2ZWEzYThlZGE1MTQxNDllOGY1ZSIsImVtYWlsIjoid2FsZWVkLm1vaGFtbWFkQHVuaXBhbGd0LmNvbSIsIm5hbWUiOiJXYWxlZWQgTW9oYW1tYWQiLCJ0ZWFtIjpbXSwic2NvcGUiOiJhZG1pbiIsIm5hbWVTcGFjZSI6WyJ1bmlwYWxqbyJdLCJwZXJtYVN0cmluZyI6InZ2djB2b3Z2bzB2dnZvb3Zvb3Z2dm9vb29vb29vb29vbzBvb292dm9vdm92dm9vb29vb3Z2b29vb29vb29vb3ZvdjBvdnZ2dm92b3Z2dm9vb3Zvb3Zvb29vb28wb3Z2dnZ2djAwMDBvMHYwdm9vb29vdm9vdm9vdm92b29vb292b292b3Z2b292b29vb29vb29vb29vb29vb29vb29vb29vb29zb29vb29zb291b29vb291dXV1dXVvb3Zvb28wMG9vb29vMG9vb29vMG9vb29vb29vb29vb29vb29vb29vb29vb29vb3Z2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2MHYwdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYiLCJ0aW1lem9uZSI6IkFzaWEvUml5YWRoIiwiYXBwX2NvZGUiOiJyZXB6b19wcm8iLCJjb3VudHJ5X2NvZGUiOlsiSk8iXSwiaWF0IjoxNjcxMzQxMjU1LCJleHAiOjE2NzEzODQ0NTV9.M8tGNeyKGoBDpPJ-7A5_sZvVi4KQSFk64hG_jCgRm5Q",
51
+ business_day: "2022-12-18",
52
+ company_namespace: ["unipaljo"],
53
+ createdAt: "2022-12-18T08:01:09.790Z",
54
+ creator: {
55
+ _id: "6395af32a7fbbe901db1c22f",
56
+ name: "VS Omar Saleh Khalif Al-Kharas",
57
+ type: "rep",
58
+ },
59
+ from: {
46
60
  __v: 0,
47
- _id: "639ec8c54183c8b556b44687",
48
- authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjY2ZWEzYThlZGE1MTQxNDllOGY1ZSIsImVtYWlsIjoid2FsZWVkLm1vaGFtbWFkQHVuaXBhbGd0LmNvbSIsIm5hbWUiOiJXYWxlZWQgTW9oYW1tYWQiLCJ0ZWFtIjpbXSwic2NvcGUiOiJhZG1pbiIsIm5hbWVTcGFjZSI6WyJ1bmlwYWxqbyJdLCJwZXJtYVN0cmluZyI6InZ2djB2b3Z2bzB2dnZvb3Zvb3Z2dm9vb29vb29vb29vbzBvb292dm9vdm92dm9vb29vb3Z2b29vb29vb29vb3ZvdjBvdnZ2dm92b3Z2dm9vb3Zvb3Zvb29vb28wb3Z2dnZ2djAwMDBvMHYwdm9vb29vdm9vdm9vdm92b29vb292b292b3Z2b292b29vb29vb29vb29vb29vb29vb29vb29vb29zb29vb29zb291b29vb291dXV1dXVvb3Zvb28wMG9vb29vMG9vb29vMG9vb29vb29vb29vb29vb29vb29vb29vb29vb3Z2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2MHYwdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYiLCJ0aW1lem9uZSI6IkFzaWEvUml5YWRoIiwiYXBwX2NvZGUiOiJyZXB6b19wcm8iLCJjb3VudHJ5X2NvZGUiOlsiSk8iXSwiaWF0IjoxNjcxMzQxMjU1LCJleHAiOjE2NzEzODQ0NTV9.M8tGNeyKGoBDpPJ-7A5_sZvVi4KQSFk64hG_jCgRm5Q",
49
- business_day: "2022-12-18",
61
+ _id: "6391cca5ca8b3e4981aa36e5",
62
+ code: "1",
50
63
  company_namespace: ["unipaljo"],
51
- createdAt: "2022-12-18T08:01:09.790Z",
52
- creator: {
53
- _id: "6395af32a7fbbe901db1c22f",
54
- name: "VS Omar Saleh Khalif Al-Kharas",
55
- type: "rep",
56
- },
57
- from: {
58
- __v: 0,
59
- _id: "6391cca5ca8b3e4981aa36e5",
60
- code: "1",
61
- company_namespace: ["unipaljo"],
62
- createdAt: "2021-12-27T11:31:13.774Z",
63
- disabled: false,
64
- name: "المستودع الرئيسي",
65
- type: "main",
66
- updatedAt: "2022-12-18T07:53:25.629Z",
67
- },
68
- items_count: 11,
69
- serial_number: {
70
- _id: "639ec8c54183c8b556b44688",
71
- count: 204,
72
- formatted: "TRN-1018-204",
73
- identifier: "1018",
74
- },
75
- status: "processed",
76
- sync_id: "76c43919-e414-4e94-af99-eac0fdb323ab",
77
- teams: ["638c9ce9df9dc77291b1d278"],
78
- time: 1671350468404,
79
- to: {
80
- __v: 0,
81
- _id: "6391ccb3f3a9fd99bd2d1698",
82
- code: "VS18",
83
- company_namespace: ["unipaljo"],
84
- createdAt: "2021-12-27T11:31:14.803Z",
85
- disabled: false,
86
- name: "VS Omar Saleh Khalif Al-Kharas",
87
- type: "van",
88
- updatedAt: "2022-12-18T07:53:36.052Z",
64
+ createdAt: "2021-12-27T11:31:13.774Z",
65
+ disabled: false,
66
+ name: "المستودع الرئيسي",
67
+ type: "main",
68
+ updatedAt: "2022-12-18T07:53:25.629Z",
69
+ },
70
+ items_count: 11,
71
+ serial_number: {
72
+ _id: "639ec8c54183c8b556b44688",
73
+ count: 204,
74
+ formatted: "TRN-1018-204",
75
+ identifier: "1018",
76
+ },
77
+ status: "processed",
78
+ sync_id: "76c43919-e414-4e94-af99-eac0fdb323ab",
79
+ teams: ["638c9ce9df9dc77291b1d278"],
80
+ time: 1671350468404,
81
+ to: {
82
+ __v: 0,
83
+ _id: "6391ccb3f3a9fd99bd2d1698",
84
+ code: "VS18",
85
+ company_namespace: ["unipaljo"],
86
+ createdAt: "2021-12-27T11:31:14.803Z",
87
+ disabled: false,
88
+ name: "VS Omar Saleh Khalif Al-Kharas",
89
+ type: "van",
90
+ updatedAt: "2022-12-18T07:53:36.052Z",
91
+ },
92
+ total_items_base_unit_qty: 2249,
93
+ type: "load",
94
+ updatedAt: "2022-12-18T08:37:02.304Z",
95
+ variants: [
96
+ {
97
+ _id: "6398a6c30242db686d4715ec",
98
+ measure_unit_factor: 25,
99
+ measure_unit_id: "63981cc4bee5dd4b6b12f5f4",
100
+ measure_unit_name: "CRTN",
101
+ measure_unit_qty: 5,
102
+ product_id: "6398a6c30242db686d4715ea",
103
+ product_name: "NADEC WHITE FETA CHEESE 200GR",
104
+ qty: 125,
105
+ variant_id: "6398a6c30242db686d4715ec",
106
+ variant_name: "010-NAD-CH0039",
89
107
  },
90
- total_items_base_unit_qty: 2249,
91
- type: "load",
92
- updatedAt: "2022-12-18T08:37:02.304Z",
93
- variants: [
94
- {
95
- _id: "6398a6c30242db686d4715ec",
96
- measure_unit_factor: 25,
97
- measure_unit_id: "63981cc4bee5dd4b6b12f5f4",
98
- measure_unit_name: "CRTN",
99
- measure_unit_qty: 5,
100
- product_id: "6398a6c30242db686d4715ea",
101
- product_name: "NADEC WHITE FETA CHEESE 200GR",
102
- qty: 125,
103
- variant_id: "6398a6c30242db686d4715ec",
104
- variant_name: "010-NAD-CH0039",
105
- },
106
- ],
108
+ ],
107
109
  }),
108
110
  isBase64Encoded: false,
109
- }, {
111
+ },
112
+ {
110
113
  app_id: "",
111
114
  repzoEndPoint: "",
112
115
  serviceEndPoint: "",
113
116
  env: "staging",
114
117
  data: {
115
- invoices: {
116
- createInvoiceHook: false,
117
- createReturnInvoiceHook: false,
118
- },
119
- payments: {
120
- createPaymentHook: false,
121
- },
122
- proformas: {
123
- createApprovedProformaHook: false,
124
- },
125
- transfer: {
126
- createApprovedTransferHook: false,
127
- },
128
- repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
129
- sapHostUrl: "http://unipal.b1pro.com:8083/api",
130
- errorEmail: "maram.alshen@repzoapp.com",
131
- serviceApiKey: "awdas",
132
- warehouseDefaultUpdateDate: "2015-01-01",
133
- DepartmentCode: "D2",
134
- return_reason: '[{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"}]',
135
- SalPersCode: "111",
136
- SalesPersonCode: "111",
118
+ invoices: {
119
+ createInvoiceHook: false,
120
+ createReturnInvoiceHook: false,
121
+ },
122
+ payments: {
123
+ createPaymentHook: false,
124
+ },
125
+ proformas: {
126
+ createApprovedProformaHook: false,
127
+ },
128
+ transfer: {
129
+ createApprovedTransferHook: false,
130
+ },
131
+ repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
132
+ sapHostUrl: "http://unipal.b1pro.com:8083/api",
133
+ errorEmail: "maram.alshen@repzoapp.com",
134
+ serviceApiKey: "awdas",
135
+ warehouseDefaultUpdateDate: "2015-01-01",
136
+ DepartmentCode: "D2",
137
+ return_reason:
138
+ '[{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"}]',
139
+ SalPersCode: "111",
140
+ SalesPersonCode: "111",
137
141
  },
138
- });
142
+ }
143
+ );
@@ -1,97 +1,97 @@
1
1
  import { Commands } from "../../index.js";
2
2
  let commandEvent = {
3
- app: {
4
- _id: "6391a53edb71ef6435719794",
5
- name: "SAP",
6
- disabled: false,
7
- available_app: {
8
- _id: "6391a268db71ef64357195da",
9
- name: "repzo-sap-absjo",
10
- title: "SAP ABS JO",
11
- logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
12
- description: "",
13
- disabled: false,
14
- JSONSchema: {
15
- title: "SAP Integration Settings",
16
- type: "object",
17
- required: ["repzoApiKey", "sapHostUrl"],
18
- properties: {
19
- repzoApiKey: {
20
- type: "string",
21
- title: "Repzo API KEY",
22
- },
23
- sapHostUrl: {
24
- type: "string",
25
- title: "SAP Host Url",
26
- },
27
- errorEmail: {
28
- type: "string",
29
- format: "email",
30
- title: "Email in case of error",
31
- },
32
- warehouseDefaultUpdateDate: {
33
- type: "string",
34
- format: "date",
35
- title: "Warehouse: Default Update Date",
36
- },
37
- },
38
- },
39
- options_JSONSchema: {
40
- title: "SAP Integration Optional Settings",
41
- type: "object",
42
- required: [],
43
- properties: {
44
- bench_time_warehouse: {
45
- title: "Bench Time: Warehouse",
46
- type: "string",
47
- format: "date",
48
- },
49
- },
50
- },
51
- app_settings: {
52
- repo: "",
53
- serviceEndPoint: "",
54
- _id: "6391a268db71ef64357195db",
55
- },
56
- app_category: "6249fa8466312f76e595634a",
57
- commands: [
58
- {
59
- command: "basic",
60
- name: "Full Sync",
61
- description: "",
62
- _id: "6391a268db71ef64357195dc",
63
- },
64
- {
65
- command: "join",
66
- name: "Join",
67
- description: "",
68
- _id: "6391a268db71ef64357195dd",
69
- },
70
- ],
71
- actions: [],
72
- createdAt: "2022-12-08T08:38:00.915Z",
73
- updatedAt: "2022-12-08T09:42:49.236Z",
74
- __v: 0,
3
+ app: {
4
+ _id: "6391a53edb71ef6435719794",
5
+ name: "SAP",
6
+ disabled: false,
7
+ available_app: {
8
+ _id: "6391a268db71ef64357195da",
9
+ name: "repzo-sap-absjo",
10
+ title: "SAP ABS JO",
11
+ logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
12
+ description: "",
13
+ disabled: false,
14
+ JSONSchema: {
15
+ title: "SAP Integration Settings",
16
+ type: "object",
17
+ required: ["repzoApiKey", "sapHostUrl"],
18
+ properties: {
19
+ repzoApiKey: {
20
+ type: "string",
21
+ title: "Repzo API KEY",
22
+ },
23
+ sapHostUrl: {
24
+ type: "string",
25
+ title: "SAP Host Url",
26
+ },
27
+ errorEmail: {
28
+ type: "string",
29
+ format: "email",
30
+ title: "Email in case of error",
31
+ },
32
+ warehouseDefaultUpdateDate: {
33
+ type: "string",
34
+ format: "date",
35
+ title: "Warehouse: Default Update Date",
36
+ },
75
37
  },
76
- company_namespace: ["unisap"],
77
- formData: {
78
- repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
79
- sapHostUrl: "http://unipal.b1pro.com:8083/api",
80
- errorEmail: "maram.alshen@repzoapp.com",
81
- serviceApiKey: "awdas",
82
- warehouseDefaultUpdateDate: "2015-01-01",
38
+ },
39
+ options_JSONSchema: {
40
+ title: "SAP Integration Optional Settings",
41
+ type: "object",
42
+ required: [],
43
+ properties: {
44
+ bench_time_warehouse: {
45
+ title: "Bench Time: Warehouse",
46
+ type: "string",
47
+ format: "date",
48
+ },
83
49
  },
84
- options_formData: {},
85
- createdAt: "2022-12-08T08:50:06.903Z",
86
- updatedAt: "2022-12-08T09:43:21.620Z",
87
- __v: 0,
50
+ },
51
+ app_settings: {
52
+ repo: "",
53
+ serviceEndPoint: "",
54
+ _id: "6391a268db71ef64357195db",
55
+ },
56
+ app_category: "6249fa8466312f76e595634a",
57
+ commands: [
58
+ {
59
+ command: "basic",
60
+ name: "Full Sync",
61
+ description: "",
62
+ _id: "6391a268db71ef64357195dc",
63
+ },
64
+ {
65
+ command: "join",
66
+ name: "Join",
67
+ description: "",
68
+ _id: "6391a268db71ef64357195dd",
69
+ },
70
+ ],
71
+ actions: [],
72
+ createdAt: "2022-12-08T08:38:00.915Z",
73
+ updatedAt: "2022-12-08T09:42:49.236Z",
74
+ __v: 0,
75
+ },
76
+ company_namespace: ["unisap"],
77
+ formData: {
78
+ repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
79
+ sapHostUrl: "http://unipal.b1pro.com:8083/api",
80
+ errorEmail: "maram.alshen@repzoapp.com",
81
+ serviceApiKey: "awdas",
82
+ warehouseDefaultUpdateDate: "2015-01-01",
88
83
  },
89
- end_of_day: "04:00",
90
- nameSpace: ["unisap"],
91
- timezone: "Asia/Amman",
92
- meta: "",
93
- env: "staging",
94
- sync_id: "47c9c804-e136-4d54-928a-000016",
95
- command: "adjust_inventory",
84
+ options_formData: {},
85
+ createdAt: "2022-12-08T08:50:06.903Z",
86
+ updatedAt: "2022-12-08T09:43:21.620Z",
87
+ __v: 0,
88
+ },
89
+ end_of_day: "04:00",
90
+ nameSpace: ["unisap"],
91
+ timezone: "Asia/Amman",
92
+ meta: "",
93
+ env: "staging",
94
+ sync_id: "47c9c804-e136-4d54-928a-000016",
95
+ command: "adjust_inventory",
96
96
  };
97
97
  Commands(commandEvent);
@@ -1,97 +1,97 @@
1
1
  import { Commands } from "../../index.js";
2
2
  let commandEvent = {
3
- app: {
4
- _id: "6391a53edb71ef6435719794",
5
- name: "SAP",
6
- disabled: false,
7
- available_app: {
8
- _id: "6391a268db71ef64357195da",
9
- name: "repzo-sap-absjo",
10
- title: "SAP ABS JO",
11
- logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
12
- description: "",
13
- disabled: false,
14
- JSONSchema: {
15
- title: "SAP Integration Settings",
16
- type: "object",
17
- required: ["repzoApiKey", "sapHostUrl"],
18
- properties: {
19
- repzoApiKey: {
20
- type: "string",
21
- title: "Repzo API KEY",
22
- },
23
- sapHostUrl: {
24
- type: "string",
25
- title: "SAP Host Url",
26
- },
27
- errorEmail: {
28
- type: "string",
29
- format: "email",
30
- title: "Email in case of error",
31
- },
32
- warehouseDefaultUpdateDate: {
33
- type: "string",
34
- format: "date",
35
- title: "Warehouse: Default Update Date",
36
- },
37
- },
38
- },
39
- options_JSONSchema: {
40
- title: "SAP Integration Optional Settings",
41
- type: "object",
42
- required: [],
43
- properties: {
44
- bench_time_warehouse: {
45
- title: "Bench Time: Warehouse",
46
- type: "string",
47
- format: "date",
48
- },
49
- },
50
- },
51
- app_settings: {
52
- repo: "",
53
- serviceEndPoint: "",
54
- _id: "6391a268db71ef64357195db",
55
- },
56
- app_category: "6249fa8466312f76e595634a",
57
- commands: [
58
- {
59
- command: "basic",
60
- name: "Full Sync",
61
- description: "",
62
- _id: "6391a268db71ef64357195dc",
63
- },
64
- {
65
- command: "join",
66
- name: "Join",
67
- description: "",
68
- _id: "6391a268db71ef64357195dd",
69
- },
70
- ],
71
- actions: [],
72
- createdAt: "2022-12-08T08:38:00.915Z",
73
- updatedAt: "2022-12-08T09:42:49.236Z",
74
- __v: 0,
3
+ app: {
4
+ _id: "6391a53edb71ef6435719794",
5
+ name: "SAP",
6
+ disabled: false,
7
+ available_app: {
8
+ _id: "6391a268db71ef64357195da",
9
+ name: "repzo-sap-absjo",
10
+ title: "SAP ABS JO",
11
+ logo: "https://www.e2abs.com/wp-content/uploads/2021/03/Website-Main-Logo-1.svg",
12
+ description: "",
13
+ disabled: false,
14
+ JSONSchema: {
15
+ title: "SAP Integration Settings",
16
+ type: "object",
17
+ required: ["repzoApiKey", "sapHostUrl"],
18
+ properties: {
19
+ repzoApiKey: {
20
+ type: "string",
21
+ title: "Repzo API KEY",
22
+ },
23
+ sapHostUrl: {
24
+ type: "string",
25
+ title: "SAP Host Url",
26
+ },
27
+ errorEmail: {
28
+ type: "string",
29
+ format: "email",
30
+ title: "Email in case of error",
31
+ },
32
+ warehouseDefaultUpdateDate: {
33
+ type: "string",
34
+ format: "date",
35
+ title: "Warehouse: Default Update Date",
36
+ },
75
37
  },
76
- company_namespace: ["unisap"],
77
- formData: {
78
- repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
79
- sapHostUrl: "http://unipal.b1pro.com:8083/api",
80
- errorEmail: "maram.alshen@repzoapp.com",
81
- serviceApiKey: "awdas",
82
- warehouseDefaultUpdateDate: "2015-01-01",
38
+ },
39
+ options_JSONSchema: {
40
+ title: "SAP Integration Optional Settings",
41
+ type: "object",
42
+ required: [],
43
+ properties: {
44
+ bench_time_warehouse: {
45
+ title: "Bench Time: Warehouse",
46
+ type: "string",
47
+ format: "date",
48
+ },
83
49
  },
84
- options_formData: {},
85
- createdAt: "2022-12-08T08:50:06.903Z",
86
- updatedAt: "2022-12-08T09:43:21.620Z",
87
- __v: 0,
50
+ },
51
+ app_settings: {
52
+ repo: "",
53
+ serviceEndPoint: "",
54
+ _id: "6391a268db71ef64357195db",
55
+ },
56
+ app_category: "6249fa8466312f76e595634a",
57
+ commands: [
58
+ {
59
+ command: "basic",
60
+ name: "Full Sync",
61
+ description: "",
62
+ _id: "6391a268db71ef64357195dc",
63
+ },
64
+ {
65
+ command: "join",
66
+ name: "Join",
67
+ description: "",
68
+ _id: "6391a268db71ef64357195dd",
69
+ },
70
+ ],
71
+ actions: [],
72
+ createdAt: "2022-12-08T08:38:00.915Z",
73
+ updatedAt: "2022-12-08T09:42:49.236Z",
74
+ __v: 0,
75
+ },
76
+ company_namespace: ["unisap"],
77
+ formData: {
78
+ repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
79
+ sapHostUrl: "http://unipal.b1pro.com:8083/api",
80
+ errorEmail: "maram.alshen@repzoapp.com",
81
+ serviceApiKey: "awdas",
82
+ warehouseDefaultUpdateDate: "2015-01-01",
88
83
  },
89
- end_of_day: "04:00",
90
- nameSpace: ["unisap"],
91
- timezone: "Asia/Amman",
92
- meta: "",
93
- env: "staging",
94
- sync_id: "47c9c804-e136-4d54-928a-000009",
95
- command: "bank",
84
+ options_formData: {},
85
+ createdAt: "2022-12-08T08:50:06.903Z",
86
+ updatedAt: "2022-12-08T09:43:21.620Z",
87
+ __v: 0,
88
+ },
89
+ end_of_day: "04:00",
90
+ nameSpace: ["unisap"],
91
+ timezone: "Asia/Amman",
92
+ meta: "",
93
+ env: "staging",
94
+ sync_id: "47c9c804-e136-4d54-928a-000009",
95
+ command: "bank",
96
96
  };
97
97
  Commands(commandEvent);