@zauru-sdk/graphql 1.0.5 → 1.0.9
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.
- package/CHANGELOG.md +16 -0
- package/dist/GraphQL.queries.d.ts +1 -0
- package/dist/GraphQL.queries.js +11 -2
- package/package.json +3 -3
- package/src/GraphQL.queries.ts +13 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.9](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.8...v1.0.9) (2024-03-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @zauru-sdk/graphql
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.7](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.6...v1.0.7) (2024-03-16)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @zauru-sdk/graphql
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.0.5](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.4...v1.0.5) (2024-03-16)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @zauru-sdk/graphql
|
|
@@ -68,6 +68,7 @@ export declare const getSuggestedPricesStringQuery: (config?: {
|
|
|
68
68
|
notNullPriceList: boolean;
|
|
69
69
|
withItems: boolean;
|
|
70
70
|
withItemCategories: boolean;
|
|
71
|
+
onlyCurrent: boolean;
|
|
71
72
|
}) => string;
|
|
72
73
|
export declare const getPaymentTermsStringQuery = "\nquery getPaymentTerms {\n payment_terms {\n active\n id\n memo\n name\n }\n}\n";
|
|
73
74
|
export declare const getPaymentTermByIdStringQuery = "\nquery getPaymentTermById ($id: Int) {\n payment_terms (where: {id: {_eq: $id }}) {\n active\n id\n memo\n name\n account_from_id\n account_to_id\n allowed_payment_terms {\n payee_category_id\n }\n }\n}\n";
|
package/dist/GraphQL.queries.js
CHANGED
|
@@ -967,10 +967,19 @@ export const getSuggestedPricesStringQuery = (config = {
|
|
|
967
967
|
notNullPriceList: false,
|
|
968
968
|
withItems: false,
|
|
969
969
|
withItemCategories: false,
|
|
970
|
+
onlyCurrent: false,
|
|
970
971
|
}) => `
|
|
971
972
|
query getSuggestedPrices {
|
|
972
|
-
suggested_prices ${config?.notNullPriceList
|
|
973
|
-
?
|
|
973
|
+
suggested_prices ${config?.notNullPriceList || config?.onlyCurrent
|
|
974
|
+
? `(
|
|
975
|
+
where: {${[
|
|
976
|
+
config?.onlyCurrent ? "current: { _eq: true }" : "",
|
|
977
|
+
config?.notNullPriceList ? "price_list_id: { _is_null: false }" : "",
|
|
978
|
+
]
|
|
979
|
+
.filter(Boolean)
|
|
980
|
+
.join(", ")}
|
|
981
|
+
}
|
|
982
|
+
)`
|
|
974
983
|
: ""} {
|
|
975
984
|
id
|
|
976
985
|
current
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"description": "Queries de uso común para las aplicación de Zauru.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=18.0.0"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "d5b8e3d9b606d6e275135e4624a27f44d9da7caf"
|
|
23
23
|
}
|
package/src/GraphQL.queries.ts
CHANGED
|
@@ -1069,16 +1069,26 @@ export const getSuggestedPricesStringQuery = (
|
|
|
1069
1069
|
notNullPriceList: boolean;
|
|
1070
1070
|
withItems: boolean;
|
|
1071
1071
|
withItemCategories: boolean;
|
|
1072
|
+
onlyCurrent: boolean;
|
|
1072
1073
|
} = {
|
|
1073
1074
|
notNullPriceList: false,
|
|
1074
1075
|
withItems: false,
|
|
1075
1076
|
withItemCategories: false,
|
|
1077
|
+
onlyCurrent: false,
|
|
1076
1078
|
}
|
|
1077
1079
|
) => `
|
|
1078
1080
|
query getSuggestedPrices {
|
|
1079
1081
|
suggested_prices ${
|
|
1080
|
-
config?.notNullPriceList
|
|
1081
|
-
?
|
|
1082
|
+
config?.notNullPriceList || config?.onlyCurrent
|
|
1083
|
+
? `(
|
|
1084
|
+
where: {${[
|
|
1085
|
+
config?.onlyCurrent ? "current: { _eq: true }" : "",
|
|
1086
|
+
config?.notNullPriceList ? "price_list_id: { _is_null: false }" : "",
|
|
1087
|
+
]
|
|
1088
|
+
.filter(Boolean)
|
|
1089
|
+
.join(", ")}
|
|
1090
|
+
}
|
|
1091
|
+
)`
|
|
1082
1092
|
: ""
|
|
1083
1093
|
} {
|
|
1084
1094
|
id
|
|
@@ -1121,6 +1131,7 @@ query getSuggestedPrices {
|
|
|
1121
1131
|
}
|
|
1122
1132
|
}
|
|
1123
1133
|
`;
|
|
1134
|
+
|
|
1124
1135
|
export const getPaymentTermsStringQuery = `
|
|
1125
1136
|
query getPaymentTerms {
|
|
1126
1137
|
payment_terms {
|