@zauru-sdk/graphql 1.0.68 → 1.0.71
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/GraphQL.queries.d.ts +2 -0
- package/dist/cjs/GraphQL.queries.js +21 -13
- package/dist/esm/GraphQL.queries.js +21 -13
- package/package.json +2 -2
|
@@ -15,6 +15,7 @@ export declare const getPurchaseOrdersBetweenDatesStringQuery: (config?: {
|
|
|
15
15
|
poDetailTagId?: number;
|
|
16
16
|
withLotStocks?: boolean;
|
|
17
17
|
betweenIssueDate?: boolean;
|
|
18
|
+
id_number?: string;
|
|
18
19
|
}) => string;
|
|
19
20
|
export declare const getPayeesStringQuery = "\nquery getPayees {\n payees {\n id\n id_number\n name\n tin\n vendor\n address_line_1\n }\n}\n";
|
|
20
21
|
export declare const getProvidersStringQuery = "\nquery getProviders {\n payees (where: {vendor: {_eq: true}}) {\n id\n id_number\n name\n tin\n address_line_1\n }\n}\n";
|
|
@@ -60,6 +61,7 @@ export declare const getInvoiceFormSubmissionsByAgencyIdStringQuery: (filters?:
|
|
|
60
61
|
bundle_ids?: number[];
|
|
61
62
|
startDate?: string;
|
|
62
63
|
endDate?: string;
|
|
64
|
+
formZid?: number | string;
|
|
63
65
|
}) => string;
|
|
64
66
|
export declare const getLastInvoiceFormSubmissionStringQuery: (filters?: {
|
|
65
67
|
formZid?: number;
|
|
@@ -209,12 +209,12 @@ const getPurchaseOrdersBetweenDatesStringQuery = (config = {
|
|
|
209
209
|
withLotStocks: false,
|
|
210
210
|
betweenIssueDate: false,
|
|
211
211
|
}) => `
|
|
212
|
-
query getPurchaseOrdersBetweenDates
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
query getPurchaseOrdersBetweenDates ${config.id_number
|
|
213
|
+
? ""
|
|
214
|
+
: `(
|
|
215
|
+
$startDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
216
|
+
$endDate: ${config?.betweenIssueDate ? "date" : "timestamp"}
|
|
217
|
+
)`} {
|
|
218
218
|
purchase_orders (
|
|
219
219
|
order_by: {id: desc},
|
|
220
220
|
where: {
|
|
@@ -238,15 +238,18 @@ query getPurchaseOrdersBetweenDates(
|
|
|
238
238
|
},`
|
|
239
239
|
: ""}
|
|
240
240
|
${config.lotItemIdExclusion
|
|
241
|
-
?
|
|
241
|
+
? `lots: {item_id: {_neq: ${config.lotItemIdExclusion}}},`
|
|
242
242
|
: ""}
|
|
243
243
|
${config.poDetailTagId
|
|
244
|
-
?
|
|
244
|
+
? `purchase_order_details: {tag_id: {_eq: ${config.poDetailTagId}}},`
|
|
245
245
|
: ""}
|
|
246
246
|
${config.consolidateIdFilter ? "consolidate_id: {_is_null: true}," : ""}
|
|
247
|
-
${config.
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
${config.id_number ? `id_number: {_ilike: "%${config.id_number}%"}` : ""}
|
|
248
|
+
${config.id_number
|
|
249
|
+
? ""
|
|
250
|
+
: config.betweenIssueDate
|
|
251
|
+
? "issue_date: {_gte: $startDate, _lte: $endDate}"
|
|
252
|
+
: "created_at: {_gte: $startDate, _lte: $endDate}"}
|
|
250
253
|
}
|
|
251
254
|
) {
|
|
252
255
|
id
|
|
@@ -888,6 +891,9 @@ query getInvoiceFormSubmissionsByAgencyId (
|
|
|
888
891
|
submission_invoices(
|
|
889
892
|
where: {
|
|
890
893
|
settings_form_submission: {
|
|
894
|
+
${filters?.formZid
|
|
895
|
+
? `settings_form: {zid: {_eq: ${filters?.formZid}}},`
|
|
896
|
+
: ""}
|
|
891
897
|
${filters?.some_field_value
|
|
892
898
|
? `settings_form_submission_values: {
|
|
893
899
|
value: { _eq: "${filters?.some_field_value}" }
|
|
@@ -896,13 +902,15 @@ query getInvoiceFormSubmissionsByAgencyId (
|
|
|
896
902
|
voided: {_eq: false}
|
|
897
903
|
},
|
|
898
904
|
${filters?.startDate?.length && filters?.endDate?.length
|
|
899
|
-
? `created_at: { _gte: "${filters?.startDate}", _lte: "${filters?.endDate}" },`
|
|
905
|
+
? `created_at: { _gte: "${filters?.startDate}T00:00:00", _lte: "${filters?.endDate}T00:00:00" },`
|
|
900
906
|
: ""}
|
|
901
907
|
invoice: {
|
|
902
908
|
agency_id: {_eq: $agency_id},
|
|
903
909
|
${filters?.seller_id ? `seller_id: {_eq: ${filters?.seller_id} },` : ""}
|
|
904
910
|
${filters?.payee_id_number_search
|
|
905
|
-
? `payee: {
|
|
911
|
+
? `payee: {
|
|
912
|
+
id_number: { _ilike: "%${filters?.payee_id_number_search}%"}
|
|
913
|
+
},`
|
|
906
914
|
: ""}
|
|
907
915
|
${filters?.item_ids?.length
|
|
908
916
|
? `invoice_details: {item_id: {_in: [${filters?.item_ids?.join(",")}]}}`
|
|
@@ -209,12 +209,12 @@ const getPurchaseOrdersBetweenDatesStringQuery = (config = {
|
|
|
209
209
|
withLotStocks: false,
|
|
210
210
|
betweenIssueDate: false,
|
|
211
211
|
}) => `
|
|
212
|
-
query getPurchaseOrdersBetweenDates
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
query getPurchaseOrdersBetweenDates ${config.id_number
|
|
213
|
+
? ""
|
|
214
|
+
: `(
|
|
215
|
+
$startDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
216
|
+
$endDate: ${config?.betweenIssueDate ? "date" : "timestamp"}
|
|
217
|
+
)`} {
|
|
218
218
|
purchase_orders (
|
|
219
219
|
order_by: {id: desc},
|
|
220
220
|
where: {
|
|
@@ -238,15 +238,18 @@ query getPurchaseOrdersBetweenDates(
|
|
|
238
238
|
},`
|
|
239
239
|
: ""}
|
|
240
240
|
${config.lotItemIdExclusion
|
|
241
|
-
?
|
|
241
|
+
? `lots: {item_id: {_neq: ${config.lotItemIdExclusion}}},`
|
|
242
242
|
: ""}
|
|
243
243
|
${config.poDetailTagId
|
|
244
|
-
?
|
|
244
|
+
? `purchase_order_details: {tag_id: {_eq: ${config.poDetailTagId}}},`
|
|
245
245
|
: ""}
|
|
246
246
|
${config.consolidateIdFilter ? "consolidate_id: {_is_null: true}," : ""}
|
|
247
|
-
${config.
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
${config.id_number ? `id_number: {_ilike: "%${config.id_number}%"}` : ""}
|
|
248
|
+
${config.id_number
|
|
249
|
+
? ""
|
|
250
|
+
: config.betweenIssueDate
|
|
251
|
+
? "issue_date: {_gte: $startDate, _lte: $endDate}"
|
|
252
|
+
: "created_at: {_gte: $startDate, _lte: $endDate}"}
|
|
250
253
|
}
|
|
251
254
|
) {
|
|
252
255
|
id
|
|
@@ -888,6 +891,9 @@ query getInvoiceFormSubmissionsByAgencyId (
|
|
|
888
891
|
submission_invoices(
|
|
889
892
|
where: {
|
|
890
893
|
settings_form_submission: {
|
|
894
|
+
${filters?.formZid
|
|
895
|
+
? `settings_form: {zid: {_eq: ${filters?.formZid}}},`
|
|
896
|
+
: ""}
|
|
891
897
|
${filters?.some_field_value
|
|
892
898
|
? `settings_form_submission_values: {
|
|
893
899
|
value: { _eq: "${filters?.some_field_value}" }
|
|
@@ -896,13 +902,15 @@ query getInvoiceFormSubmissionsByAgencyId (
|
|
|
896
902
|
voided: {_eq: false}
|
|
897
903
|
},
|
|
898
904
|
${filters?.startDate?.length && filters?.endDate?.length
|
|
899
|
-
? `created_at: { _gte: "${filters?.startDate}", _lte: "${filters?.endDate}" },`
|
|
905
|
+
? `created_at: { _gte: "${filters?.startDate}T00:00:00", _lte: "${filters?.endDate}T00:00:00" },`
|
|
900
906
|
: ""}
|
|
901
907
|
invoice: {
|
|
902
908
|
agency_id: {_eq: $agency_id},
|
|
903
909
|
${filters?.seller_id ? `seller_id: {_eq: ${filters?.seller_id} },` : ""}
|
|
904
910
|
${filters?.payee_id_number_search
|
|
905
|
-
? `payee: {
|
|
911
|
+
? `payee: {
|
|
912
|
+
id_number: { _ilike: "%${filters?.payee_id_number_search}%"}
|
|
913
|
+
},`
|
|
906
914
|
: ""}
|
|
907
915
|
${filters?.item_ids?.length
|
|
908
916
|
? `invoice_details: {item_id: {_in: [${filters?.item_ids?.join(",")}]}}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71",
|
|
4
4
|
"description": "Queries de uso común para las aplicación de Zauru.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "^5.1.6"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "14735e4cb251cbbb8484920003e813b1da124663"
|
|
26
26
|
}
|