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,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-000004",
95
- command: "measureunit",
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-000004",
95
+ command: "measureunit",
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-000005",
95
- command: "measureunit_family",
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-000005",
95
+ command: "measureunit_family",
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-000008",
95
- command: "payment_term",
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-000008",
95
+ command: "payment_term",
96
96
  };
97
97
  Commands(commandEvent);