repzo-sap-absjo 1.0.6 → 1.0.8

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 (80) hide show
  1. package/changelog.md +4 -0
  2. package/lib/actions/create_invoice.d.ts +13 -19
  3. package/lib/actions/create_invoice.js +216 -336
  4. package/lib/actions/create_payment.d.ts +1 -4
  5. package/lib/actions/create_payment.js +125 -171
  6. package/lib/actions/create_proforma.d.ts +1 -4
  7. package/lib/actions/create_proforma.js +165 -268
  8. package/lib/actions/create_return_invoice.d.ts +1 -4
  9. package/lib/actions/create_return_invoice.js +177 -295
  10. package/lib/actions/create_transfer.d.ts +1 -4
  11. package/lib/actions/create_transfer.js +143 -198
  12. package/lib/actions/index.js +15 -23
  13. package/lib/commands/adjust_inventory.d.ts +2 -4
  14. package/lib/commands/adjust_inventory.js +160 -290
  15. package/lib/commands/bank.d.ts +2 -4
  16. package/lib/commands/bank.js +157 -279
  17. package/lib/commands/basic.js +47 -66
  18. package/lib/commands/category.d.ts +1 -3
  19. package/lib/commands/category.js +104 -178
  20. package/lib/commands/channel.d.ts +1 -3
  21. package/lib/commands/channel.js +117 -198
  22. package/lib/commands/client.d.ts +32 -34
  23. package/lib/commands/client.js +244 -404
  24. package/lib/commands/client_disabled.d.ts +1 -3
  25. package/lib/commands/client_disabled.js +94 -163
  26. package/lib/commands/index.d.ts +11 -15
  27. package/lib/commands/index.js +60 -60
  28. package/lib/commands/join.js +66 -192
  29. package/lib/commands/measureunit.d.ts +14 -19
  30. package/lib/commands/measureunit.js +191 -289
  31. package/lib/commands/measureunit_family.d.ts +8 -10
  32. package/lib/commands/measureunit_family.js +138 -250
  33. package/lib/commands/payment_term.d.ts +1 -3
  34. package/lib/commands/payment_term.js +123 -202
  35. package/lib/commands/price_list.d.ts +15 -15
  36. package/lib/commands/price_list.js +327 -571
  37. package/lib/commands/product.d.ts +30 -32
  38. package/lib/commands/product.js +243 -425
  39. package/lib/commands/product_disabled.d.ts +1 -3
  40. package/lib/commands/product_disabled.js +94 -164
  41. package/lib/commands/rep.js +141 -221
  42. package/lib/commands/tag.js +109 -174
  43. package/lib/commands/tax.js +112 -177
  44. package/lib/commands/warehouse.d.ts +1 -3
  45. package/lib/commands/warehouse.js +119 -207
  46. package/lib/index.d.ts +12 -21
  47. package/lib/test/actions/create_invoice.js +188 -193
  48. package/lib/test/actions/create_payment.js +107 -112
  49. package/lib/test/actions/create_proforma.js +216 -220
  50. package/lib/test/actions/create_return_invoice.js +200 -205
  51. package/lib/test/actions/create_transfer.js +115 -120
  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 +327 -328
  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 +353 -355
  58. package/lib/test/commands/client_disabled.js +90 -90
  59. package/lib/test/commands/join.js +327 -328
  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 -90
  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 +344 -346
  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 +60 -83
  71. package/lib/util.d.ts +19 -70
  72. package/lib/util.js +144 -170
  73. package/package.json +1 -1
  74. package/src/actions/create_invoice.ts +35 -0
  75. package/src/actions/create_payment.ts +35 -0
  76. package/src/actions/create_proforma.ts +35 -0
  77. package/src/actions/create_return_invoice.ts +35 -0
  78. package/src/actions/create_transfer.ts +34 -0
  79. package/src/commands/price_list.ts +40 -4
  80. package/src/test/commands/price_list.ts +263 -13
@@ -3,277 +3,174 @@ import { _create } from "../util.js";
3
3
  import { v4 as uuid } from "uuid";
4
4
  import moment from "moment-timezone";
5
5
  export const create_proforma = async (event, options) => {
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7
- const repzo = new Repzo(
8
- (_a = options.data) === null || _a === void 0 ? void 0 : _a.repzoApiKey,
9
- { env: options.env }
10
- );
11
- const action_sync_id =
12
- ((_b = event === null || event === void 0 ? void 0 : event.headers) ===
13
- null || _b === void 0
14
- ? void 0
15
- : _b.action_sync_id) || uuid();
16
- const actionLog = new Repzo.ActionLogs(repzo, action_sync_id);
17
- let body;
18
- try {
19
- // console.log("create_proforma");
20
- await actionLog.load(action_sync_id);
21
- body = event.body;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7
+ const repzo = new Repzo((_a = options.data) === null || _a === void 0 ? void 0 : _a.repzoApiKey, { env: options.env });
8
+ const action_sync_id = ((_b = event === null || event === void 0 ? void 0 : event.headers) === null || _b === void 0 ? void 0 : _b.action_sync_id) || uuid();
9
+ const actionLog = new Repzo.ActionLogs(repzo, action_sync_id);
10
+ let body;
22
11
  try {
23
- if (body) body = JSON.parse(body);
24
- } catch (e) {}
25
- const repzo_serial_number =
26
- (_c = body === null || body === void 0 ? void 0 : body.serial_number) ===
27
- null || _c === void 0
28
- ? void 0
29
- : _c.formatted;
30
- await actionLog
31
- .addDetail(
32
- `SalesOrder - ${repzo_serial_number} => ${
33
- body === null || body === void 0 ? void 0 : body.sync_id
34
- }`
35
- )
36
- .addDetail(
37
- `Repzo => SAP: Started Create SalesOrder - ${repzo_serial_number}`
38
- )
39
- .commit();
40
- const SAP_HOST_URL =
41
- (_d = options.data) === null || _d === void 0 ? void 0 : _d.sapHostUrl;
42
- if (!SAP_HOST_URL)
43
- throw `SAP Host Url is missing and Required: ${SAP_HOST_URL}`;
44
- const repzo_proforma = body;
45
- // Get Repzo Rep
46
- let repzo_rep;
47
- if (repzo_proforma.creator.type == "rep") {
48
- repzo_rep = await repzo.rep.get(
49
- (_e =
50
- repzo_proforma === null || repzo_proforma === void 0
51
- ? void 0
52
- : repzo_proforma.creator) === null || _e === void 0
53
- ? void 0
54
- : _e._id
55
- );
56
- if (!repzo_rep)
57
- throw `Rep with _id: ${repzo_proforma.creator._id} not found in Repzo`;
58
- }
59
- // Get Repzo Client
60
- const repzo_client = await repzo.client.get(
61
- repzo_proforma === null || repzo_proforma === void 0
62
- ? void 0
63
- : repzo_proforma.client_id
64
- );
65
- if (!repzo_client)
66
- throw `Client with _id: ${repzo_proforma.client_id} not found in Repzo`;
67
- const repzo_tax_ids = {};
68
- const repzo_measureunit_ids = {};
69
- const repzo_product_ids = {};
70
- (_f = repzo_proforma.items) === null || _f === void 0
71
- ? void 0
72
- : _f.forEach((item) => {
73
- var _a, _b, _c;
74
- if (item) {
75
- repzo_tax_ids[
76
- (_a = item.tax) === null || _a === void 0 ? void 0 : _a._id
77
- ] = true;
78
- repzo_measureunit_ids[
79
- (_b = item.measureunit) === null || _b === void 0
80
- ? void 0
81
- : _b._id
82
- ] = true;
83
- repzo_product_ids[
84
- (_c = item.variant) === null || _c === void 0
85
- ? void 0
86
- : _c.product_id
87
- ] = true;
88
- }
12
+ // console.log("create_proforma");
13
+ await actionLog.load(action_sync_id);
14
+ body = event.body;
15
+ try {
16
+ if (body)
17
+ body = JSON.parse(body);
18
+ }
19
+ catch (e) { }
20
+ const repzo_serial_number = (_c = body === null || body === void 0 ? void 0 : body.serial_number) === null || _c === void 0 ? void 0 : _c.formatted;
21
+ try {
22
+ if (body === null || body === void 0 ? void 0 : body._id) {
23
+ body.integration_meta = (body === null || body === void 0 ? void 0 : body.integration_meta) || {};
24
+ body.integration_meta.sync_to_sap_started = true;
25
+ body.integration_meta.sync_to_sap_succeeded =
26
+ body.integration_meta.sync_to_sap_succeeded || false;
27
+ await repzo.proforma.update(body._id, {
28
+ integration_meta: body.integration_meta,
29
+ });
30
+ }
31
+ }
32
+ catch (e) {
33
+ console.error(e);
34
+ await actionLog
35
+ .addDetail(`Failed updating integration_meta of SalesOrder: ${repzo_serial_number}`)
36
+ .commit();
37
+ }
38
+ await actionLog
39
+ .addDetail(`SalesOrder - ${repzo_serial_number} => ${body === null || body === void 0 ? void 0 : body.sync_id}`)
40
+ .addDetail(`Repzo => SAP: Started Create SalesOrder - ${repzo_serial_number}`)
41
+ .commit();
42
+ const SAP_HOST_URL = (_d = options.data) === null || _d === void 0 ? void 0 : _d.sapHostUrl;
43
+ if (!SAP_HOST_URL)
44
+ throw `SAP Host Url is missing and Required: ${SAP_HOST_URL}`;
45
+ const repzo_proforma = body;
46
+ // Get Repzo Rep
47
+ let repzo_rep;
48
+ if (repzo_proforma.creator.type == "rep") {
49
+ repzo_rep = await repzo.rep.get((_e = repzo_proforma === null || repzo_proforma === void 0 ? void 0 : repzo_proforma.creator) === null || _e === void 0 ? void 0 : _e._id);
50
+ if (!repzo_rep)
51
+ throw `Rep with _id: ${repzo_proforma.creator._id} not found in Repzo`;
52
+ }
53
+ // Get Repzo Client
54
+ const repzo_client = await repzo.client.get(repzo_proforma === null || repzo_proforma === void 0 ? void 0 : repzo_proforma.client_id);
55
+ if (!repzo_client)
56
+ throw `Client with _id: ${repzo_proforma.client_id} not found in Repzo`;
57
+ const repzo_tax_ids = {};
58
+ const repzo_measureunit_ids = {};
59
+ const repzo_product_ids = {};
60
+ (_f = repzo_proforma.items) === null || _f === void 0 ? void 0 : _f.forEach((item) => {
61
+ var _a, _b, _c;
62
+ if (item) {
63
+ repzo_tax_ids[(_a = item.tax) === null || _a === void 0 ? void 0 : _a._id] = true;
64
+ repzo_measureunit_ids[(_b = item.measureunit) === null || _b === void 0 ? void 0 : _b._id] = true;
65
+ repzo_product_ids[(_c = item.variant) === null || _c === void 0 ? void 0 : _c.product_id] = true;
66
+ }
89
67
  });
90
- const repzo_taxes = await repzo.patchAction.create(
91
- {
92
- slug: "tax",
93
- readQuery: [
94
- {
95
- key: "_id",
96
- value: Object.keys(repzo_tax_ids),
97
- operator: "in",
98
- },
99
- ],
100
- },
101
- { per_page: 50000 }
102
- );
103
- const repzo_measureunits = await repzo.patchAction.create(
104
- {
105
- slug: "measureunits",
106
- readQuery: [
107
- {
108
- key: "_id",
109
- value: Object.keys(repzo_measureunit_ids),
110
- operator: "in",
111
- },
112
- ],
113
- },
114
- { per_page: 50000 }
115
- );
116
- const repzo_products = await repzo.patchAction.create(
117
- {
118
- slug: "product",
119
- readQuery: [
120
- {
121
- key: "_id",
122
- value: Object.keys(repzo_product_ids),
123
- operator: "in",
124
- },
125
- ],
126
- },
127
- { per_page: 50000 }
128
- );
129
- // Prepare SAP_invoice_items
130
- const items = [];
131
- for (
132
- let i = 0;
133
- i <
134
- ((_g =
135
- repzo_proforma === null || repzo_proforma === void 0
136
- ? void 0
137
- : repzo_proforma.items) === null || _g === void 0
138
- ? void 0
139
- : _g.length);
140
- i++
141
- ) {
142
- const item = repzo_proforma.items[i];
143
- // Get Repzo Tax
144
- const repzo_tax =
145
- (_h =
146
- repzo_taxes === null || repzo_taxes === void 0
147
- ? void 0
148
- : repzo_taxes.data) === null || _h === void 0
149
- ? void 0
150
- : _h.find((t) => {
151
- var _a, _b, _c;
152
- return (
153
- ((_a = t._id) === null || _a === void 0
154
- ? void 0
155
- : _a.toString()) ==
156
- ((_c =
157
- (_b = item.tax) === null || _b === void 0
158
- ? void 0
159
- : _b._id) === null || _c === void 0
160
- ? void 0
161
- : _c.toString())
162
- );
163
- });
164
- if (!repzo_tax) throw `Tax with _id: ${item.tax._id} not found in Repzo`;
165
- // Get Repzo UoM
166
- const repzo_measureunit =
167
- (_j =
168
- repzo_measureunits === null || repzo_measureunits === void 0
169
- ? void 0
170
- : repzo_measureunits.data) === null || _j === void 0
171
- ? void 0
172
- : _j.find((m) => {
173
- var _a, _b, _c;
174
- return (
175
- ((_a = m._id) === null || _a === void 0
176
- ? void 0
177
- : _a.toString()) ==
178
- ((_c =
179
- (_b = item.measureunit) === null || _b === void 0
180
- ? void 0
181
- : _b._id) === null || _c === void 0
182
- ? void 0
183
- : _c.toString())
184
- );
68
+ const repzo_taxes = await repzo.patchAction.create({
69
+ slug: "tax",
70
+ readQuery: [
71
+ {
72
+ key: "_id",
73
+ value: Object.keys(repzo_tax_ids),
74
+ operator: "in",
75
+ },
76
+ ],
77
+ }, { per_page: 50000 });
78
+ const repzo_measureunits = await repzo.patchAction.create({
79
+ slug: "measureunits",
80
+ readQuery: [
81
+ {
82
+ key: "_id",
83
+ value: Object.keys(repzo_measureunit_ids),
84
+ operator: "in",
85
+ },
86
+ ],
87
+ }, { per_page: 50000 });
88
+ const repzo_products = await repzo.patchAction.create({
89
+ slug: "product",
90
+ readQuery: [
91
+ {
92
+ key: "_id",
93
+ value: Object.keys(repzo_product_ids),
94
+ operator: "in",
95
+ },
96
+ ],
97
+ }, { per_page: 50000 });
98
+ // Prepare SAP_invoice_items
99
+ const items = [];
100
+ for (let i = 0; i < ((_g = repzo_proforma === null || repzo_proforma === void 0 ? void 0 : repzo_proforma.items) === null || _g === void 0 ? void 0 : _g.length); i++) {
101
+ const item = repzo_proforma.items[i];
102
+ // Get Repzo Tax
103
+ const repzo_tax = (_h = repzo_taxes === null || repzo_taxes === void 0 ? void 0 : repzo_taxes.data) === null || _h === void 0 ? void 0 : _h.find((t) => { var _a, _b, _c; return ((_a = t._id) === null || _a === void 0 ? void 0 : _a.toString()) == ((_c = (_b = item.tax) === null || _b === void 0 ? void 0 : _b._id) === null || _c === void 0 ? void 0 : _c.toString()); });
104
+ if (!repzo_tax)
105
+ throw `Tax with _id: ${item.tax._id} not found in Repzo`;
106
+ // Get Repzo UoM
107
+ const repzo_measureunit = (_j = repzo_measureunits === null || repzo_measureunits === void 0 ? void 0 : repzo_measureunits.data) === null || _j === void 0 ? void 0 : _j.find((m) => { var _a, _b, _c; return ((_a = m._id) === null || _a === void 0 ? void 0 : _a.toString()) == ((_c = (_b = item.measureunit) === null || _b === void 0 ? void 0 : _b._id) === null || _c === void 0 ? void 0 : _c.toString()); });
108
+ if (!repzo_measureunit)
109
+ throw `Uom with _id: ${(_k = item.measureunit) === null || _k === void 0 ? void 0 : _k._id} not found in Repzo`;
110
+ // Get Repzo Product
111
+ const repzo_product = (_l = repzo_products === null || repzo_products === void 0 ? void 0 : repzo_products.data) === null || _l === void 0 ? void 0 : _l.find((p) => { var _a, _b, _c; return ((_a = p._id) === null || _a === void 0 ? void 0 : _a.toString()) == ((_c = (_b = item.variant) === null || _b === void 0 ? void 0 : _b.product_id) === null || _c === void 0 ? void 0 : _c.toString()); });
112
+ if (!repzo_product)
113
+ throw `Product with _id: ${item.measureunit._id} not found in Repzo`;
114
+ items.push({
115
+ ItemCode: item.variant.variant_name,
116
+ Quantity: item.qty,
117
+ TaxCode: repzo_tax.integration_meta.TaxCode,
118
+ UnitPrice: (item.price * repzo_measureunit.factor) / 1000,
119
+ DiscountPerc: "0",
120
+ //@ts-ignore
121
+ LineTotal: item.total_before_tax / 1000,
122
+ UomCode: repzo_measureunit.integration_meta.ALTUOMID,
123
+ Brand: (_m = repzo_product.integration_meta) === null || _m === void 0 ? void 0 : _m.BRAND,
124
+ Department: ((_o = repzo_rep === null || repzo_rep === void 0 ? void 0 : repzo_rep.integration_meta) === null || _o === void 0 ? void 0 : _o.DEPARTMENTCODE) ||
125
+ ((_p = options.data) === null || _p === void 0 ? void 0 : _p.DepartmentCode), // "D2"
185
126
  });
186
- if (!repzo_measureunit)
187
- throw `Uom with _id: ${
188
- (_k = item.measureunit) === null || _k === void 0 ? void 0 : _k._id
189
- } not found in Repzo`;
190
- // Get Repzo Product
191
- const repzo_product =
192
- (_l =
193
- repzo_products === null || repzo_products === void 0
194
- ? void 0
195
- : repzo_products.data) === null || _l === void 0
196
- ? void 0
197
- : _l.find((p) => {
198
- var _a, _b, _c;
199
- return (
200
- ((_a = p._id) === null || _a === void 0
201
- ? void 0
202
- : _a.toString()) ==
203
- ((_c =
204
- (_b = item.variant) === null || _b === void 0
205
- ? void 0
206
- : _b.product_id) === null || _c === void 0
207
- ? void 0
208
- : _c.toString())
209
- );
210
- });
211
- if (!repzo_product)
212
- throw `Product with _id: ${item.measureunit._id} not found in Repzo`;
213
- items.push({
214
- ItemCode: item.variant.variant_name,
215
- Quantity: item.qty,
216
- TaxCode: repzo_tax.integration_meta.TaxCode,
217
- UnitPrice: (item.price * repzo_measureunit.factor) / 1000,
218
- DiscountPerc: "0",
127
+ }
128
+ const sap_invoice = {
129
+ RefNum: repzo_proforma.serial_number.formatted,
130
+ SalPersCode: repzo_rep
131
+ ? repzo_rep.integration_id
132
+ : (_q = options.data) === null || _q === void 0 ? void 0 : _q.SalPersCode,
133
+ DocDate: moment(repzo_proforma.issue_date, "YYYY-MM-DD").format("YYYYMMDD"),
134
+ DocDueDate: moment(repzo_proforma.issue_date, "YYYY-MM-DD").format("YYYYMMDD"),
135
+ ClientCode: repzo_client.client_code,
136
+ DiscountPerc: "0",
137
+ Note: repzo_proforma.comment,
138
+ // WarehouseCode: "1",
139
+ LinesDetails: items,
140
+ };
141
+ // console.dir(sap_invoice, { depth: null });
142
+ await actionLog
143
+ .addDetail(`Repzo => SAP: SalesOrder - ${repzo_serial_number}`, sap_invoice)
144
+ .commit();
145
+ const result = await _create(SAP_HOST_URL, "/AddOrder", sap_invoice);
146
+ // console.log(result);
147
+ try {
148
+ if (body === null || body === void 0 ? void 0 : body._id) {
149
+ body.integration_meta = (body === null || body === void 0 ? void 0 : body.integration_meta) || {};
150
+ body.integration_meta.sync_to_sap_succeeded = true;
151
+ await repzo.proforma.update(body._id, {
152
+ integration_meta: body.integration_meta,
153
+ });
154
+ }
155
+ }
156
+ catch (e) {
157
+ console.error(e);
158
+ await actionLog
159
+ .addDetail(`Failed updating integration_meta of SalesOrder: ${repzo_serial_number}`)
160
+ .commit();
161
+ }
162
+ await actionLog
163
+ .addDetail(`SAP Responded with `, result)
164
+ .addDetail(`Repzo => SAP: SalesOrder - ${repzo_serial_number}`)
165
+ .setStatus("success")
166
+ .setBody(repzo_proforma)
167
+ .commit();
168
+ return result;
169
+ }
170
+ catch (e) {
219
171
  //@ts-ignore
220
- LineTotal: item.total_before_tax / 1000,
221
- UomCode: repzo_measureunit.integration_meta.ALTUOMID,
222
- Brand:
223
- (_m = repzo_product.integration_meta) === null || _m === void 0
224
- ? void 0
225
- : _m.BRAND,
226
- Department:
227
- ((_o =
228
- repzo_rep === null || repzo_rep === void 0
229
- ? void 0
230
- : repzo_rep.integration_meta) === null || _o === void 0
231
- ? void 0
232
- : _o.DEPARTMENTCODE) ||
233
- ((_p = options.data) === null || _p === void 0
234
- ? void 0
235
- : _p.DepartmentCode), // "D2"
236
- });
172
+ console.error((e === null || e === void 0 ? void 0 : e.response) || e);
173
+ await actionLog.setStatus("fail", e).setBody(body).commit();
174
+ throw e;
237
175
  }
238
- const sap_invoice = {
239
- RefNum: repzo_proforma.serial_number.formatted,
240
- SalPersCode: repzo_rep
241
- ? repzo_rep.integration_id
242
- : (_q = options.data) === null || _q === void 0
243
- ? void 0
244
- : _q.SalPersCode,
245
- DocDate: moment(repzo_proforma.issue_date, "YYYY-MM-DD").format(
246
- "YYYYMMDD"
247
- ),
248
- DocDueDate: moment(repzo_proforma.issue_date, "YYYY-MM-DD").format(
249
- "YYYYMMDD"
250
- ),
251
- ClientCode: repzo_client.client_code,
252
- DiscountPerc: "0",
253
- Note: repzo_proforma.comment,
254
- // WarehouseCode: "1",
255
- LinesDetails: items,
256
- };
257
- // console.dir(sap_invoice, { depth: null });
258
- await actionLog
259
- .addDetail(
260
- `Repzo => SAP: SalesOrder - ${repzo_serial_number}`,
261
- sap_invoice
262
- )
263
- .commit();
264
- const result = await _create(SAP_HOST_URL, "/AddOrder", sap_invoice);
265
- // console.log(result);
266
- await actionLog
267
- .addDetail(`SAP Responded with `, result)
268
- .addDetail(`Repzo => SAP: SalesOrder - ${repzo_serial_number}`)
269
- .setStatus("success")
270
- .setBody(repzo_proforma)
271
- .commit();
272
- return result;
273
- } catch (e) {
274
- //@ts-ignore
275
- console.error((e === null || e === void 0 ? void 0 : e.response) || e);
276
- await actionLog.setStatus("fail", e).setBody(body).commit();
277
- throw e;
278
- }
279
176
  };
@@ -1,5 +1,2 @@
1
1
  import { EVENT, Config } from "../types";
2
- export declare const create_return_invoice: (
3
- event: EVENT,
4
- options: Config
5
- ) => Promise<any>;
2
+ export declare const create_return_invoice: (event: EVENT, options: Config) => Promise<any>;