repzo-sap-absjo 1.0.53 → 1.0.54

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.
@@ -95,6 +95,7 @@ export const create_client = async (event, options) => {
95
95
  );
96
96
  });
97
97
  const sap_customer = {
98
+ CardName: repzo_client.name,
98
99
  AdditionalID: repzo_client._id,
99
100
  CLIENTID: repzo_client.client_code,
100
101
  CLIENTDESCF: repzo_client.local_name,
@@ -14,7 +14,7 @@ export interface SAPOpenInvoice {
14
14
  export declare const create_invoice: (
15
15
  event: EVENT,
16
16
  options: Config
17
- ) => Promise<any>;
17
+ ) => Promise<unknown>;
18
18
  export declare const get_invoice_from_sap: (
19
19
  serviceEndPoint: string,
20
20
  query?: {
@@ -2,4 +2,4 @@ import { EVENT, Config } from "../types";
2
2
  export declare const create_payment: (
3
3
  event: EVENT,
4
4
  options: Config
5
- ) => Promise<any>;
5
+ ) => Promise<unknown>;
@@ -2,4 +2,4 @@ import { EVENT, Config } from "../types";
2
2
  export declare const create_proforma: (
3
3
  event: EVENT,
4
4
  options: Config
5
- ) => Promise<any>;
5
+ ) => Promise<unknown>;
@@ -2,4 +2,4 @@ import { EVENT, Config } from "../types";
2
2
  export declare const create_return_invoice: (
3
3
  event: EVENT,
4
4
  options: Config
5
- ) => Promise<any>;
5
+ ) => Promise<unknown>;
@@ -2,4 +2,4 @@ import { EVENT, Config } from "../types";
2
2
  export declare const create_transfer: (
3
3
  event: EVENT,
4
4
  options: Config
5
- ) => Promise<any>;
5
+ ) => Promise<unknown>;
@@ -1,3 +1,3 @@
1
1
  import { Config, Action } from "../types";
2
- export declare const actions: (event: any, options: Config) => Promise<any>;
2
+ export declare const actions: (event: any, options: Config) => Promise<unknown>;
3
3
  export declare const actionsList: Action[];
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export declare const Actions: (
2
2
  event: any,
3
3
  options: import("./types.js").Config
4
- ) => Promise<any>;
4
+ ) => Promise<unknown>;
5
5
  export declare const ActionsList: import("./types.js").Action[];
6
6
  export declare const Commands: (
7
7
  CommandEvent: import("./types.js").CommandEvent
package/lib/util.d.ts CHANGED
@@ -16,27 +16,27 @@ export declare const _fetch: (
16
16
  path: string,
17
17
  headers?: Headers,
18
18
  params?: Params
19
- ) => Promise<any>;
19
+ ) => Promise<unknown>;
20
20
  export declare const _create: (
21
21
  baseUrl: string,
22
22
  path: string,
23
23
  body: Data,
24
24
  headers?: Headers,
25
25
  params?: Params
26
- ) => Promise<any>;
26
+ ) => Promise<unknown>;
27
27
  export declare const _update: (
28
28
  baseUrl: string,
29
29
  path: string,
30
30
  body: Data,
31
31
  headers?: Headers,
32
32
  params?: Params
33
- ) => Promise<any>;
33
+ ) => Promise<unknown>;
34
34
  export declare const _delete: (
35
35
  baseUrl: string,
36
36
  path: string,
37
37
  headers?: Headers,
38
38
  params?: Params
39
- ) => Promise<any>;
39
+ ) => Promise<unknown>;
40
40
  export declare const update_bench_time: (
41
41
  repzo: Repzo,
42
42
  app_id: string,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "repzo-sap-absjo",
3
3
  "description": "repzo SAP ABS jo integration",
4
- "version": "1.0.53",
4
+ "version": "1.0.54",
5
5
  "homepage": "",
6
6
  "keywords": [],
7
7
  "author": {
@@ -6,7 +6,7 @@ import { v4 as uuid } from "uuid";
6
6
 
7
7
  interface SAPCustomer {
8
8
  AdditionalID: string; // "68eb85af0a28bf5038627c91";
9
- CardName?: string; // "ÄBD";
9
+ CardName: string; // "ÄBD";
10
10
  Phone1?: string; // "0788877776";
11
11
  cellular?: string; // "234567";
12
12
  CLIENTID?: string; // "CL01483";
@@ -95,6 +95,7 @@ export const create_client = async (event: EVENT, options: Config) => {
95
95
  );
96
96
 
97
97
  const sap_customer: SAPCustomer = {
98
+ CardName: repzo_client.name,
98
99
  AdditionalID: repzo_client._id,
99
100
  CLIENTID: repzo_client.client_code,
100
101
  CLIENTDESCF: repzo_client.local_name,
@@ -136,7 +137,7 @@ export const create_client = async (event: EVENT, options: Config) => {
136
137
  const result: {
137
138
  result: "Success";
138
139
  message: string | "The Customer already Exists in SAP";
139
- } = await _create(SAP_HOST_URL, "/AddCustomer", sap_customer);
140
+ } = (await _create(SAP_HOST_URL, "/AddCustomer", sap_customer)) as any;
140
141
 
141
142
  // console.log(result);
142
143
 
@@ -402,7 +402,7 @@ export const get_invoice_from_sap = async (
402
402
  query?: { updatedAt: string; Status: string; InvoiceId: string }
403
403
  ): Promise<SAPOpenInvoice[]> => {
404
404
  try {
405
- const sap_openInvoices: SAPOpenInvoices = await _create(
405
+ const sap_openInvoices: SAPOpenInvoices = (await _create(
406
406
  serviceEndPoint,
407
407
  "/OpenInvoices",
408
408
  {
@@ -410,7 +410,7 @@ export const get_invoice_from_sap = async (
410
410
  Status: query?.Status,
411
411
  InvoiceId: query?.InvoiceId,
412
412
  }
413
- );
413
+ )) as SAPOpenInvoices;
414
414
  return sap_openInvoices?.OpenInvoices;
415
415
  } catch (e: any) {
416
416
  throw e;
@@ -238,11 +238,11 @@ const get_sap_inventories = async (
238
238
  query?: { updateAt?: string }
239
239
  ): Promise<SAPStoresBalance[]> => {
240
240
  try {
241
- const sap_inventories: SAPStoresBalances = await _create(
241
+ const sap_inventories: SAPStoresBalances = (await _create(
242
242
  serviceEndPoint,
243
243
  "/StoresBalance",
244
244
  {}
245
- );
245
+ )) as SAPStoresBalances;
246
246
  return sap_inventories.StoresBalance;
247
247
  } catch (e: any) {
248
248
  throw e;
@@ -235,7 +235,11 @@ const get_sap_banks = async (
235
235
  query?: { updateAt?: string }
236
236
  ): Promise<SAPBank[]> => {
237
237
  try {
238
- const sap_banks: SAPBanks = await _create(serviceEndPoint, "/Banks", {});
238
+ const sap_banks: SAPBanks = (await _create(
239
+ serviceEndPoint,
240
+ "/Banks",
241
+ {}
242
+ )) as SAPBanks;
239
243
  return sap_banks.Banks;
240
244
  } catch (e: any) {
241
245
  throw e;
@@ -158,11 +158,11 @@ const get_sap_brands = async (
158
158
  query?: { updateAt?: string }
159
159
  ): Promise<SAPBrand[]> => {
160
160
  try {
161
- const sap_brands: SAPBrands = await _create(
161
+ const sap_brands: SAPBrands = (await _create(
162
162
  serviceEndPoint,
163
163
  "/ParentCategory",
164
164
  { UpdateAt: "20201230:000000", Active: "Y" }
165
- );
165
+ )) as SAPBrands;
166
166
  return sap_brands.ItemSubGroup;
167
167
  } catch (e: any) {
168
168
  throw e;
@@ -164,11 +164,11 @@ const get_sap_categories = async (
164
164
  query?: { updateAt?: string }
165
165
  ): Promise<SAPCategory[]> => {
166
166
  try {
167
- const sap_categories: SAPCategories = await _create(
167
+ const sap_categories: SAPCategories = (await _create(
168
168
  serviceEndPoint,
169
169
  "/ItemGroup",
170
170
  {}
171
- );
171
+ )) as SAPCategories;
172
172
  return sap_categories.ItemGroup;
173
173
  } catch (e: any) {
174
174
  throw e;
@@ -202,7 +202,7 @@ const get_sap_clients = async (
202
202
  query?: { updateAt?: string; GroupCode?: string }
203
203
  ): Promise<SAPClient[]> => {
204
204
  try {
205
- const sap_clients: SAPClients = await _create(
205
+ const sap_clients: SAPClients = (await _create(
206
206
  serviceEndPoint,
207
207
  "/Customers",
208
208
  {
@@ -211,7 +211,7 @@ const get_sap_clients = async (
211
211
  UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
212
212
  GroupCode: query?.GroupCode || "",
213
213
  }
214
- );
214
+ )) as SAPClients;
215
215
  return sap_clients.Customers;
216
216
  } catch (e: any) {
217
217
  throw e;
@@ -312,7 +312,7 @@ const get_sap_clients = async (
312
312
  query?: { updateAt?: string; GroupCode?: string }
313
313
  ): Promise<SAPClient[]> => {
314
314
  try {
315
- const sap_clients: SAPClients = await _create(
315
+ const sap_clients: SAPClients = (await _create(
316
316
  serviceEndPoint,
317
317
  "/Customers",
318
318
  {
@@ -321,7 +321,7 @@ const get_sap_clients = async (
321
321
  UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
322
322
  GroupCode: query?.GroupCode || "",
323
323
  }
324
- );
324
+ )) as SAPClients;
325
325
  return sap_clients.Customers;
326
326
  } catch (e: any) {
327
327
  throw e;
@@ -142,7 +142,7 @@ const get_sap_clients = async (
142
142
  query?: { updateAt?: string; GroupCode?: string }
143
143
  ): Promise<SAPClient[]> => {
144
144
  try {
145
- const sap_clients: SAPClients = await _create(
145
+ const sap_clients: SAPClients = (await _create(
146
146
  serviceEndPoint,
147
147
  "/Customers",
148
148
  {
@@ -151,7 +151,7 @@ const get_sap_clients = async (
151
151
  UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
152
152
  GroupCode: query?.GroupCode || "",
153
153
  }
154
- );
154
+ )) as SAPClients;
155
155
  return sap_clients.Customers;
156
156
  } catch (e: any) {
157
157
  throw e;
@@ -279,10 +279,10 @@ export const get_sap_UoMs = async (
279
279
  query?: { updateAt?: string }
280
280
  ): Promise<SAPUoM[]> => {
281
281
  try {
282
- const sap_UoMs: SAPUoMs = await _create(serviceEndPoint, "/Uom", {
282
+ const sap_UoMs: SAPUoMs = (await _create(serviceEndPoint, "/Uom", {
283
283
  Inactive: "N",
284
284
  Locked: "N",
285
- });
285
+ })) as SAPUoMs;
286
286
  return sap_UoMs?.UoM;
287
287
  } catch (e: any) {
288
288
  throw e;
@@ -207,7 +207,7 @@ const get_sap_clients = async (
207
207
  query?: { updateAt?: string; GroupCode?: string }
208
208
  ): Promise<SAPClient[]> => {
209
209
  try {
210
- const sap_clients: SAPClients = await _create(
210
+ const sap_clients: SAPClients = (await _create(
211
211
  serviceEndPoint,
212
212
  "/Customers",
213
213
  {
@@ -216,7 +216,7 @@ const get_sap_clients = async (
216
216
  UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
217
217
  GroupCode: query?.GroupCode || "",
218
218
  }
219
- );
219
+ )) as SAPClients;
220
220
  return sap_clients.Customers;
221
221
  } catch (e: any) {
222
222
  throw e;
@@ -463,11 +463,11 @@ const get_sap_price_list = async (
463
463
  query?: { updateAt?: string }
464
464
  ): Promise<SAPPriceListItem[]> => {
465
465
  try {
466
- const sap_price_lists: SAPPriceListItems = await _create(
466
+ const sap_price_lists: SAPPriceListItems = (await _create(
467
467
  serviceEndPoint,
468
468
  "/PriceList",
469
469
  { UpdateAt: query?.updateAt }
470
- );
470
+ )) as SAPPriceListItems;
471
471
  return sap_price_lists.PriceList;
472
472
  } catch (e: any) {
473
473
  throw e;
@@ -182,11 +182,11 @@ const get_sap_price_list = async (
182
182
  query?: { updateAt?: string; PLDID?: string }
183
183
  ): Promise<SAPPriceListItem[]> => {
184
184
  try {
185
- const sap_price_lists: SAPPriceListItems = await _create(
185
+ const sap_price_lists: SAPPriceListItems = (await _create(
186
186
  serviceEndPoint,
187
187
  "/PriceList",
188
188
  { UpdateAt: query?.updateAt, PLDID: query?.PLDID }
189
- );
189
+ )) as SAPPriceListItems;
190
190
  return sap_price_lists.PriceList;
191
191
  } catch (e: any) {
192
192
  throw e;
@@ -326,10 +326,14 @@ const get_sap_products = async (
326
326
  query?: { updateAt?: string }
327
327
  ): Promise<SAPProduct[]> => {
328
328
  try {
329
- const sap_products: SAPProducts = await _create(serviceEndPoint, "/Items", {
330
- Active: "Y",
331
- UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
332
- });
329
+ const sap_products: SAPProducts = (await _create(
330
+ serviceEndPoint,
331
+ "/Items",
332
+ {
333
+ Active: "Y",
334
+ UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
335
+ }
336
+ )) as SAPProducts;
333
337
  return sap_products.Items;
334
338
  } catch (e: any) {
335
339
  throw e;
@@ -144,10 +144,14 @@ const get_sap_disabled_products = async (
144
144
  query?: { updateAt?: string }
145
145
  ): Promise<SAPProduct[]> => {
146
146
  try {
147
- const sap_products: SAPProducts = await _create(serviceEndPoint, "/Items", {
148
- Active: "N",
149
- UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
150
- });
147
+ const sap_products: SAPProducts = (await _create(
148
+ serviceEndPoint,
149
+ "/Items",
150
+ {
151
+ Active: "N",
152
+ UpdateAt: date_formatting(query?.updateAt, "YYYYMMDD:000000"),
153
+ }
154
+ )) as SAPProducts;
151
155
  return sap_products.Items;
152
156
  } catch (e: any) {
153
157
  throw e;
@@ -214,7 +214,7 @@ const get_sap_reps = async (
214
214
  query?: { updateAt?: string }
215
215
  ): Promise<SAPReps> => {
216
216
  try {
217
- const sap_reps: SAPReps = await _create(serviceEndPoint, "/Users", {});
217
+ const sap_reps = (await _create(serviceEndPoint, "/Users", {})) as SAPReps;
218
218
  return sap_reps;
219
219
  } catch (e: any) {
220
220
  throw e;
@@ -163,9 +163,9 @@ const get_sap_tags = async (
163
163
  query?: { updateAt?: string }
164
164
  ): Promise<SAPTags> => {
165
165
  try {
166
- const sap_tags: SAPTags = await _create(serviceEndPoint, "/Territories", {
166
+ const sap_tags: SAPTags = (await _create(serviceEndPoint, "/Territories", {
167
167
  Inactive: "N",
168
- });
168
+ })) as SAPTags;
169
169
  return sap_tags;
170
170
  } catch (e: any) {
171
171
  throw e;
@@ -168,9 +168,9 @@ const get_sap_taxes = async (
168
168
  query?: { updateAt?: string }
169
169
  ): Promise<SAPTaxes> => {
170
170
  try {
171
- const sap_taxes: SAPTaxes = await _create(serviceEndPoint, "/Taxes", {
171
+ const sap_taxes: SAPTaxes = (await _create(serviceEndPoint, "/Taxes", {
172
172
  Inactive: "N",
173
- });
173
+ })) as SAPTaxes;
174
174
  return sap_taxes;
175
175
  } catch (e: any) {
176
176
  throw e;
@@ -188,7 +188,7 @@ const get_sap_warehouses = async (
188
188
  query?: { updateAt?: string }
189
189
  ): Promise<SAPWarehouses> => {
190
190
  try {
191
- const sap_warehouses: SAPWarehouses = await _create(
191
+ const sap_warehouses: SAPWarehouses = (await _create(
192
192
  serviceEndPoint,
193
193
  "/Warehouses",
194
194
  {
@@ -196,7 +196,7 @@ const get_sap_warehouses = async (
196
196
  Inactive: "N",
197
197
  Locked: "N",
198
198
  }
199
- );
199
+ )) as SAPWarehouses;
200
200
  return sap_warehouses;
201
201
  } catch (e: any) {
202
202
  throw e;