@fctc/interface-logic 3.7.10 → 3.8.0

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.
@@ -2,7 +2,7 @@ declare const axiosClient: {
2
2
  init(config: any): {
3
3
  get: (url: string, headers?: any, hardService?: string) => Promise<any>;
4
4
  post: (url: string, body: any, headers?: any, hardService?: string) => Promise<any>;
5
- post_excel: (url: string, body: any, headers?: any) => Promise<any>;
5
+ post_excel: (url: string, body: any, headers?: any, hardService?: string) => Promise<any>;
6
6
  put: (url: string, body: any, headers?: any, hardService?: string) => Promise<any>;
7
7
  patch: (url: string, body: any, headers?: any, hardService?: string) => Promise<any>;
8
8
  delete: (url: string, headers?: any, hardService?: string) => Promise<any>;
package/dist/configs.d.ts CHANGED
@@ -2,7 +2,7 @@ declare const axiosClient: {
2
2
  init(config: any): {
3
3
  get: (url: string, headers?: any, hardService?: string) => Promise<any>;
4
4
  post: (url: string, body: any, headers?: any, hardService?: string) => Promise<any>;
5
- post_excel: (url: string, body: any, headers?: any) => Promise<any>;
5
+ post_excel: (url: string, body: any, headers?: any, hardService?: string) => Promise<any>;
6
6
  put: (url: string, body: any, headers?: any, hardService?: string) => Promise<any>;
7
7
  patch: (url: string, body: any, headers?: any, hardService?: string) => Promise<any>;
8
8
  delete: (url: string, headers?: any, hardService?: string) => Promise<any>;
package/dist/configs.js CHANGED
@@ -2445,14 +2445,19 @@ var axiosClient = {
2445
2445
  body,
2446
2446
  getHeaders(headers)
2447
2447
  ).then(responseBody),
2448
- post_excel: (url, body, headers) => instance.post(formatUrl(getBaseUrl(config?.baseUrl) + url, db), body, {
2449
- responseType: "arraybuffer",
2450
- headers: {
2451
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
2452
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2453
- ...headers
2448
+ post_excel: (url, body, headers, hardService) => instance.post(
2449
+ formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
2450
+ body,
2451
+ {
2452
+ responseType: "arraybuffer",
2453
+ headers: {
2454
+ "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
2455
+ Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2456
+ ...headers,
2457
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
2458
+ }
2454
2459
  }
2455
- }).then(responseBody),
2460
+ ).then(responseBody),
2456
2461
  put: (url, body, headers, hardService) => instance.put(
2457
2462
  formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
2458
2463
  body,
package/dist/configs.mjs CHANGED
@@ -2409,14 +2409,19 @@ var axiosClient = {
2409
2409
  body,
2410
2410
  getHeaders(headers)
2411
2411
  ).then(responseBody),
2412
- post_excel: (url, body, headers) => instance.post(formatUrl(getBaseUrl(config?.baseUrl) + url, db), body, {
2413
- responseType: "arraybuffer",
2414
- headers: {
2415
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
2416
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2417
- ...headers
2412
+ post_excel: (url, body, headers, hardService) => instance.post(
2413
+ formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
2414
+ body,
2415
+ {
2416
+ responseType: "arraybuffer",
2417
+ headers: {
2418
+ "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
2419
+ Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2420
+ ...headers,
2421
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
2422
+ }
2418
2423
  }
2419
- }).then(responseBody),
2424
+ ).then(responseBody),
2420
2425
  put: (url, body, headers, hardService) => instance.put(
2421
2426
  formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
2422
2427
  body,
@@ -2447,14 +2447,19 @@ var axiosClient = {
2447
2447
  body,
2448
2448
  getHeaders(headers)
2449
2449
  ).then(responseBody),
2450
- post_excel: (url, body, headers) => instance.post(formatUrl(getBaseUrl(config?.baseUrl) + url, db), body, {
2451
- responseType: "arraybuffer",
2452
- headers: {
2453
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
2454
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2455
- ...headers
2450
+ post_excel: (url, body, headers, hardService) => instance.post(
2451
+ formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
2452
+ body,
2453
+ {
2454
+ responseType: "arraybuffer",
2455
+ headers: {
2456
+ "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
2457
+ Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2458
+ ...headers,
2459
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
2460
+ }
2456
2461
  }
2457
- }).then(responseBody),
2462
+ ).then(responseBody),
2458
2463
  put: (url, body, headers, hardService) => instance.put(
2459
2464
  formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
2460
2465
  body,
@@ -2409,14 +2409,19 @@ var axiosClient = {
2409
2409
  body,
2410
2410
  getHeaders(headers)
2411
2411
  ).then(responseBody),
2412
- post_excel: (url, body, headers) => instance.post(formatUrl(getBaseUrl(config?.baseUrl) + url, db), body, {
2413
- responseType: "arraybuffer",
2414
- headers: {
2415
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
2416
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2417
- ...headers
2412
+ post_excel: (url, body, headers, hardService) => instance.post(
2413
+ formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
2414
+ body,
2415
+ {
2416
+ responseType: "arraybuffer",
2417
+ headers: {
2418
+ "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
2419
+ Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
2420
+ ...headers,
2421
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
2422
+ }
2418
2423
  }
2419
- }).then(responseBody),
2424
+ ).then(responseBody),
2420
2425
  put: (url, body, headers, hardService) => instance.put(
2421
2426
  formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
2422
2427
  body,
package/dist/hooks.js CHANGED
@@ -3734,7 +3734,10 @@ function useExcelService() {
3734
3734
  `/export/${type}`,
3735
3735
  jsonData,
3736
3736
  {
3737
- headers: { "Content-Type": "application/json", "X-Node": xNode }
3737
+ headers: {
3738
+ "Content-Type": "application/json",
3739
+ ...xNode ? { "X-Node": xNode } : {}
3740
+ }
3738
3741
  },
3739
3742
  service
3740
3743
  );
package/dist/hooks.mjs CHANGED
@@ -3594,7 +3594,10 @@ function useExcelService() {
3594
3594
  `/export/${type}`,
3595
3595
  jsonData,
3596
3596
  {
3597
- headers: { "Content-Type": "application/json", "X-Node": xNode }
3597
+ headers: {
3598
+ "Content-Type": "application/json",
3599
+ ...xNode ? { "X-Node": xNode } : {}
3600
+ }
3598
3601
  },
3599
3602
  service
3600
3603
  );
package/dist/provider.js CHANGED
@@ -3723,7 +3723,10 @@ function useExcelService() {
3723
3723
  `/export/${type}`,
3724
3724
  jsonData,
3725
3725
  {
3726
- headers: { "Content-Type": "application/json", "X-Node": xNode }
3726
+ headers: {
3727
+ "Content-Type": "application/json",
3728
+ ...xNode ? { "X-Node": xNode } : {}
3729
+ }
3727
3730
  },
3728
3731
  service
3729
3732
  );
@@ -6073,14 +6076,19 @@ var axiosClient = {
6073
6076
  body,
6074
6077
  getHeaders(headers)
6075
6078
  ).then(responseBody),
6076
- post_excel: (url, body, headers) => instance.post(formatUrl(getBaseUrl(config?.baseUrl) + url, db), body, {
6077
- responseType: "arraybuffer",
6078
- headers: {
6079
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
6080
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
6081
- ...headers
6079
+ post_excel: (url, body, headers, hardService) => instance.post(
6080
+ formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
6081
+ body,
6082
+ {
6083
+ responseType: "arraybuffer",
6084
+ headers: {
6085
+ "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
6086
+ Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
6087
+ ...headers,
6088
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
6089
+ }
6082
6090
  }
6083
- }).then(responseBody),
6091
+ ).then(responseBody),
6084
6092
  put: (url, body, headers, hardService) => instance.put(
6085
6093
  formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
6086
6094
  body,
package/dist/provider.mjs CHANGED
@@ -3680,7 +3680,10 @@ function useExcelService() {
3680
3680
  `/export/${type}`,
3681
3681
  jsonData,
3682
3682
  {
3683
- headers: { "Content-Type": "application/json", "X-Node": xNode }
3683
+ headers: {
3684
+ "Content-Type": "application/json",
3685
+ ...xNode ? { "X-Node": xNode } : {}
3686
+ }
3684
3687
  },
3685
3688
  service
3686
3689
  );
@@ -6030,14 +6033,19 @@ var axiosClient = {
6030
6033
  body,
6031
6034
  getHeaders(headers)
6032
6035
  ).then(responseBody),
6033
- post_excel: (url, body, headers) => instance.post(formatUrl(getBaseUrl(config?.baseUrl) + url, db), body, {
6034
- responseType: "arraybuffer",
6035
- headers: {
6036
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
6037
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
6038
- ...headers
6036
+ post_excel: (url, body, headers, hardService) => instance.post(
6037
+ formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
6038
+ body,
6039
+ {
6040
+ responseType: "arraybuffer",
6041
+ headers: {
6042
+ "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
6043
+ Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
6044
+ ...headers,
6045
+ ...sessionStorage2.getXNode() ? { "X-Node": sessionStorage2.getXNode() } : {}
6046
+ }
6039
6047
  }
6040
- }).then(responseBody),
6048
+ ).then(responseBody),
6041
6049
  put: (url, body, headers, hardService) => instance.put(
6042
6050
  formatUrl(getBaseUrl(config?.baseUrl, hardService) + url, db),
6043
6051
  body,
package/dist/services.js CHANGED
@@ -3925,7 +3925,10 @@ function useExcelService() {
3925
3925
  `/export/${type}`,
3926
3926
  jsonData,
3927
3927
  {
3928
- headers: { "Content-Type": "application/json", "X-Node": xNode }
3928
+ headers: {
3929
+ "Content-Type": "application/json",
3930
+ ...xNode ? { "X-Node": xNode } : {}
3931
+ }
3929
3932
  },
3930
3933
  service
3931
3934
  );
package/dist/services.mjs CHANGED
@@ -3880,7 +3880,10 @@ function useExcelService() {
3880
3880
  `/export/${type}`,
3881
3881
  jsonData,
3882
3882
  {
3883
- headers: { "Content-Type": "application/json", "X-Node": xNode }
3883
+ headers: {
3884
+ "Content-Type": "application/json",
3885
+ ...xNode ? { "X-Node": xNode } : {}
3886
+ }
3884
3887
  },
3885
3888
  service
3886
3889
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "3.7.10",
3
+ "version": "3.8.0",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",