@zauru-sdk/graphql 2.0.52 → 2.0.58
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/dist/esm/GraphQL.queries.js +46 -44
- package/package.json +2 -2
|
@@ -1193,55 +1193,57 @@ const getSuggestedPricesStringQuery = (config = {
|
|
|
1193
1193
|
withItems: false,
|
|
1194
1194
|
withItemCategories: false,
|
|
1195
1195
|
onlyCurrent: false,
|
|
1196
|
-
}) =>
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
.join(", ")}
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
price_list {
|
|
1219
|
-
payee_categories {
|
|
1196
|
+
}) => {
|
|
1197
|
+
const conditions = [];
|
|
1198
|
+
if (config.onlyCurrent) {
|
|
1199
|
+
conditions.push("current: { _eq: true }");
|
|
1200
|
+
}
|
|
1201
|
+
if (config.notNullPriceList) {
|
|
1202
|
+
conditions.push("price_list_id: { _is_null: false }");
|
|
1203
|
+
}
|
|
1204
|
+
const whereClause = conditions.length
|
|
1205
|
+
? `where: { ${conditions.join(", ")} }`
|
|
1206
|
+
: "";
|
|
1207
|
+
const itemCategories = config?.withItemCategories
|
|
1208
|
+
? `item_category {
|
|
1209
|
+
id
|
|
1210
|
+
name
|
|
1211
|
+
notes
|
|
1212
|
+
items_count
|
|
1213
|
+
}
|
|
1214
|
+
`
|
|
1215
|
+
: "";
|
|
1216
|
+
const items = config?.withItems
|
|
1217
|
+
? `item {
|
|
1220
1218
|
id
|
|
1219
|
+
name
|
|
1220
|
+
stocks_only_integer
|
|
1221
|
+
code
|
|
1222
|
+
product_type
|
|
1223
|
+
${itemCategories}
|
|
1224
|
+
}`
|
|
1225
|
+
: "";
|
|
1226
|
+
return `query getSuggestedPrices {
|
|
1227
|
+
suggested_prices (${whereClause}) {
|
|
1228
|
+
id
|
|
1229
|
+
current
|
|
1230
|
+
currency_id
|
|
1231
|
+
amount
|
|
1232
|
+
bundle_id
|
|
1233
|
+
item_id
|
|
1234
|
+
notes
|
|
1235
|
+
price_list_id
|
|
1236
|
+
flexible_price
|
|
1237
|
+
price_list {
|
|
1238
|
+
payee_categories {
|
|
1239
|
+
id
|
|
1240
|
+
}
|
|
1221
1241
|
}
|
|
1242
|
+
${items}
|
|
1222
1243
|
}
|
|
1223
|
-
${config?.withItems
|
|
1224
|
-
? `item {
|
|
1225
|
-
id
|
|
1226
|
-
name
|
|
1227
|
-
stocks_only_integer
|
|
1228
|
-
code
|
|
1229
|
-
product_type
|
|
1230
|
-
${config?.withItemCategories
|
|
1231
|
-
? `
|
|
1232
|
-
item_category {
|
|
1233
|
-
id
|
|
1234
|
-
name
|
|
1235
|
-
notes
|
|
1236
|
-
items_count
|
|
1237
|
-
}
|
|
1238
|
-
`
|
|
1239
|
-
: ""}
|
|
1240
|
-
}`
|
|
1241
|
-
: ""}
|
|
1242
1244
|
}
|
|
1243
|
-
}
|
|
1244
1245
|
`;
|
|
1246
|
+
};
|
|
1245
1247
|
exports.getSuggestedPricesStringQuery = getSuggestedPricesStringQuery;
|
|
1246
1248
|
const getPaymentTermsStringQuery = (config = { includeDiscounts: false }) => `
|
|
1247
1249
|
query getPaymentTerms {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.58",
|
|
4
4
|
"description": "Queries de uso común para las aplicación de Zauru.",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"typescript": "^5.1.6"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "43724125bceb5eb92c786f9673a62ee0849d5901"
|
|
25
25
|
}
|