repzo-sap-absjo 1.0.9 → 1.0.10

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 (73) hide show
  1. package/lib/actions/create_invoice.d.ts +13 -19
  2. package/lib/actions/create_invoice.js +206 -363
  3. package/lib/actions/create_payment.d.ts +1 -4
  4. package/lib/actions/create_payment.js +117 -200
  5. package/lib/actions/create_proforma.d.ts +1 -4
  6. package/lib/actions/create_proforma.js +155 -290
  7. package/lib/actions/create_return_invoice.d.ts +1 -4
  8. package/lib/actions/create_return_invoice.js +169 -321
  9. package/lib/actions/create_transfer.d.ts +1 -4
  10. package/lib/actions/create_transfer.js +136 -220
  11. package/lib/actions/index.js +15 -23
  12. package/lib/commands/adjust_inventory.d.ts +2 -4
  13. package/lib/commands/adjust_inventory.js +160 -290
  14. package/lib/commands/bank.d.ts +2 -4
  15. package/lib/commands/bank.js +157 -279
  16. package/lib/commands/basic.js +47 -66
  17. package/lib/commands/category.d.ts +1 -3
  18. package/lib/commands/category.js +104 -178
  19. package/lib/commands/channel.d.ts +1 -3
  20. package/lib/commands/channel.js +117 -198
  21. package/lib/commands/client.d.ts +32 -34
  22. package/lib/commands/client.js +244 -404
  23. package/lib/commands/client_disabled.d.ts +1 -3
  24. package/lib/commands/client_disabled.js +94 -163
  25. package/lib/commands/index.d.ts +11 -15
  26. package/lib/commands/index.js +60 -60
  27. package/lib/commands/join.js +66 -192
  28. package/lib/commands/measureunit.d.ts +14 -19
  29. package/lib/commands/measureunit.js +191 -289
  30. package/lib/commands/measureunit_family.d.ts +8 -10
  31. package/lib/commands/measureunit_family.js +138 -250
  32. package/lib/commands/payment_term.d.ts +1 -3
  33. package/lib/commands/payment_term.js +123 -202
  34. package/lib/commands/price_list.d.ts +15 -15
  35. package/lib/commands/price_list.js +326 -612
  36. package/lib/commands/product.d.ts +30 -32
  37. package/lib/commands/product.js +243 -425
  38. package/lib/commands/product_disabled.d.ts +1 -3
  39. package/lib/commands/product_disabled.js +94 -164
  40. package/lib/commands/rep.js +141 -221
  41. package/lib/commands/tag.js +109 -174
  42. package/lib/commands/tax.js +112 -177
  43. package/lib/commands/warehouse.d.ts +1 -3
  44. package/lib/commands/warehouse.js +119 -207
  45. package/lib/index.d.ts +12 -21
  46. package/lib/test/actions/create_invoice.js +188 -193
  47. package/lib/test/actions/create_payment.js +107 -112
  48. package/lib/test/actions/create_proforma.js +216 -220
  49. package/lib/test/actions/create_return_invoice.js +200 -205
  50. package/lib/test/actions/create_transfer.js +115 -120
  51. package/lib/test/commands/adjust_inventory.js +90 -90
  52. package/lib/test/commands/bank.js +90 -90
  53. package/lib/test/commands/basic.js +327 -328
  54. package/lib/test/commands/category.js +90 -90
  55. package/lib/test/commands/channel.js +90 -90
  56. package/lib/test/commands/client.js +353 -355
  57. package/lib/test/commands/client_disabled.js +90 -90
  58. package/lib/test/commands/join.js +327 -328
  59. package/lib/test/commands/measureunit.js +90 -90
  60. package/lib/test/commands/measureunit_family.js +90 -90
  61. package/lib/test/commands/payment_term.js +90 -90
  62. package/lib/test/commands/price_list.js +334 -337
  63. package/lib/test/commands/product.js +90 -90
  64. package/lib/test/commands/product_disabled.js +90 -90
  65. package/lib/test/commands/rep.js +344 -346
  66. package/lib/test/commands/tag.js +90 -90
  67. package/lib/test/commands/tax.js +90 -90
  68. package/lib/test/commands/warehouse.js +90 -90
  69. package/lib/types.d.ts +60 -83
  70. package/lib/util.d.ts +19 -70
  71. package/lib/util.js +144 -170
  72. package/package.json +1 -1
  73. package/src/actions/create_transfer.ts +2 -2
@@ -1,143 +1,138 @@
1
1
  import { Actions } from "../../index.js";
2
- Actions(
3
- {
2
+ Actions({
4
3
  version: "2.0",
5
4
  routeKey: "POST /actions",
6
5
  rawPath: "/actions",
7
6
  rawQueryString: "app=repzo-sap-absjo&action=create_transfer",
8
7
  headers: {
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",
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",
23
22
  },
24
23
  queryStringParameters: {
25
- action: "create_transfer",
26
- app: "repzo-sap-absjo",
24
+ action: "create_transfer",
25
+ app: "repzo-sap-absjo",
27
26
  },
28
27
  requestContext: {
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,
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,
45
44
  },
46
45
  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: {
60
- __v: 0,
61
- _id: "6391cca5ca8b3e4981aa36e5",
62
- code: "1",
63
- company_namespace: ["unipaljo"],
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
46
  __v: 0,
83
- _id: "6391ccb3f3a9fd99bd2d1698",
84
- code: "VS18",
47
+ _id: "639ec8c54183c8b556b44687",
48
+ authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjY2ZWEzYThlZGE1MTQxNDllOGY1ZSIsImVtYWlsIjoid2FsZWVkLm1vaGFtbWFkQHVuaXBhbGd0LmNvbSIsIm5hbWUiOiJXYWxlZWQgTW9oYW1tYWQiLCJ0ZWFtIjpbXSwic2NvcGUiOiJhZG1pbiIsIm5hbWVTcGFjZSI6WyJ1bmlwYWxqbyJdLCJwZXJtYVN0cmluZyI6InZ2djB2b3Z2bzB2dnZvb3Zvb3Z2dm9vb29vb29vb29vbzBvb292dm9vdm92dm9vb29vb3Z2b29vb29vb29vb3ZvdjBvdnZ2dm92b3Z2dm9vb3Zvb3Zvb29vb28wb3Z2dnZ2djAwMDBvMHYwdm9vb29vdm9vdm9vdm92b29vb292b292b3Z2b292b29vb29vb29vb29vb29vb29vb29vb29vb29zb29vb29zb291b29vb291dXV1dXVvb3Zvb28wMG9vb29vMG9vb29vMG9vb29vb29vb29vb29vb29vb29vb29vb29vb3Z2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2MHYwdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYiLCJ0aW1lem9uZSI6IkFzaWEvUml5YWRoIiwiYXBwX2NvZGUiOiJyZXB6b19wcm8iLCJjb3VudHJ5X2NvZGUiOlsiSk8iXSwiaWF0IjoxNjcxMzQxMjU1LCJleHAiOjE2NzEzODQ0NTV9.M8tGNeyKGoBDpPJ-7A5_sZvVi4KQSFk64hG_jCgRm5Q",
49
+ business_day: "2022-12-18",
85
50
  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",
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",
107
74
  },
108
- ],
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",
89
+ },
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
+ ],
109
107
  }),
110
108
  isBase64Encoded: false,
111
- },
112
- {
109
+ }, {
113
110
  app_id: "",
114
111
  repzoEndPoint: "",
115
112
  serviceEndPoint: "",
116
113
  env: "staging",
117
114
  data: {
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",
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",
141
137
  },
142
- }
143
- );
138
+ });
@@ -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
- },
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,
37
75
  },
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
- },
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",
49
83
  },
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",
84
+ options_formData: {},
85
+ createdAt: "2022-12-08T08:50:06.903Z",
86
+ updatedAt: "2022-12-08T09:43:21.620Z",
87
+ __v: 0,
83
88
  },
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",
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
- },
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,
37
75
  },
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
- },
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",
49
83
  },
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",
84
+ options_formData: {},
85
+ createdAt: "2022-12-08T08:50:06.903Z",
86
+ updatedAt: "2022-12-08T09:43:21.620Z",
87
+ __v: 0,
83
88
  },
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",
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);