@zauru-sdk/services 2.0.62 → 2.0.64

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.
@@ -6,14 +6,15 @@ import { httpZauru } from "./httpZauru.js";
6
6
  /**
7
7
  * getPaymentTerms
8
8
  */
9
- export async function getPaymentTerms(session, config = {
10
- includeAllowedDiscounts: false,
11
- includeAllowedPaymentTerms: false,
12
- onlyActives: true,
13
- }) {
9
+ export async function getPaymentTerms(session, config) {
14
10
  return handlePossibleAxiosErrors(async () => {
15
11
  const headers = await getGraphQLAPIHeaders(session);
16
- const query = getPaymentTermsStringQuery(config);
12
+ const defaultConfig = {
13
+ includeAllowedDiscounts: false,
14
+ includeAllowedPaymentTerms: false,
15
+ onlyActives: true,
16
+ };
17
+ const query = getPaymentTermsStringQuery({ ...defaultConfig, ...config });
17
18
  const response = await httpGraphQLAPI.post("", {
18
19
  query,
19
20
  }, { headers });
@@ -4,9 +4,9 @@ import { AxiosUtilsResponse, PaymentTermGraphQL } from "@zauru-sdk/types";
4
4
  * getPaymentTerms
5
5
  */
6
6
  export declare function getPaymentTerms(session: Session, config?: {
7
- includeAllowedDiscounts: boolean;
8
- includeAllowedPaymentTerms: boolean;
9
- onlyActives: boolean;
7
+ includeAllowedDiscounts?: boolean;
8
+ includeAllowedPaymentTerms?: boolean;
9
+ onlyActives?: boolean;
10
10
  }): Promise<AxiosUtilsResponse<PaymentTermGraphQL[]>>;
11
11
  /**
12
12
  * getPaymentTermById
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.0.62",
3
+ "version": "2.0.64",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -26,10 +26,10 @@
26
26
  "@remix-run/node": "^2.8.1",
27
27
  "@zauru-sdk/common": "^2.0.51",
28
28
  "@zauru-sdk/config": "^2.0.0",
29
- "@zauru-sdk/graphql": "^2.0.62",
29
+ "@zauru-sdk/graphql": "^2.0.64",
30
30
  "@zauru-sdk/types": "^2.0.51",
31
31
  "axios": "^1.6.7",
32
32
  "chalk": "5.3.0"
33
33
  },
34
- "gitHead": "54574ba8e5fa86be3b372d5803f228e95ee53c27"
34
+ "gitHead": "bc674a76dc43a806132167b53287e02ca3d5a8fc"
35
35
  }