@zauru-sdk/graphql 2.0.183 → 2.0.185
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 +4 -1
- package/dist/esm/GraphQL.queries.js +29 -15
- package/package.json +2 -2
|
@@ -73,7 +73,9 @@ export declare const getItemsStringQuery = "\nquery getItems {\n items (where:
|
|
|
73
73
|
export declare const getItemsBySuperCategoryStringQuery: (id: number, agency_id: number) => string;
|
|
74
74
|
export declare const getConsolidatesBetweenDatesStringQuery: (startDate: string, endDate: string) => string;
|
|
75
75
|
export declare const getEmployeeProfileStringQuery: (id: number) => string;
|
|
76
|
-
export declare const getEmployeesStringQuery
|
|
76
|
+
export declare const getEmployeesStringQuery: (filters?: {
|
|
77
|
+
id?: number;
|
|
78
|
+
}) => string;
|
|
77
79
|
export declare const getEmployeesByAgencyIdStringQuery: (id: number) => string;
|
|
78
80
|
export declare const getBundlesByItemCategoryIdStringQuery: (id: number) => string;
|
|
79
81
|
export declare const getBundleByNameStringQuery: (name: string) => string;
|
|
@@ -132,6 +134,7 @@ export declare const getInvoicesByAgencyIdStringQuery: (id: number, filters: {
|
|
|
132
134
|
invoice_id?: string;
|
|
133
135
|
}) => string;
|
|
134
136
|
export declare const getCasesStringQuery: (filters?: {
|
|
137
|
+
id?: number;
|
|
135
138
|
responsible_id?: number;
|
|
136
139
|
client_id?: number;
|
|
137
140
|
closed?: boolean;
|
|
@@ -750,23 +750,33 @@ query getEmployeeProfile {
|
|
|
750
750
|
}
|
|
751
751
|
`;
|
|
752
752
|
exports.getEmployeeProfileStringQuery = getEmployeeProfileStringQuery;
|
|
753
|
-
|
|
753
|
+
const getEmployeesStringQuery = (filters) => {
|
|
754
|
+
const conditions = [];
|
|
755
|
+
if (filters?.id) {
|
|
756
|
+
conditions.push(`id: {_eq: ${filters.id}}`);
|
|
757
|
+
}
|
|
758
|
+
const whereClause = conditions.length
|
|
759
|
+
? `where: { ${conditions.join(", ")} },`
|
|
760
|
+
: "";
|
|
761
|
+
return `
|
|
754
762
|
query getEmployees {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
763
|
+
employees (${whereClause} order_by: {id: desc}) {
|
|
764
|
+
name
|
|
765
|
+
id
|
|
766
|
+
user_id
|
|
767
|
+
email
|
|
768
|
+
seller
|
|
769
|
+
accountant
|
|
770
|
+
buyer
|
|
771
|
+
support_agent
|
|
772
|
+
inventory_controller
|
|
773
|
+
active
|
|
774
|
+
position
|
|
775
|
+
}
|
|
767
776
|
}
|
|
768
|
-
|
|
769
|
-
|
|
777
|
+
`;
|
|
778
|
+
};
|
|
779
|
+
exports.getEmployeesStringQuery = getEmployeesStringQuery;
|
|
770
780
|
const getEmployeesByAgencyIdStringQuery = (id) => `
|
|
771
781
|
query getEmployeesByAgencyId {
|
|
772
782
|
employees(where: {agency_id: {_eq: ${id}}}) {
|
|
@@ -1535,6 +1545,9 @@ query getInvoicesByAgencyId {
|
|
|
1535
1545
|
exports.getInvoicesByAgencyIdStringQuery = getInvoicesByAgencyIdStringQuery;
|
|
1536
1546
|
const getCasesStringQuery = (filters) => {
|
|
1537
1547
|
const conditions = [];
|
|
1548
|
+
if (filters?.id) {
|
|
1549
|
+
conditions.push(`id: {_eq: ${filters.id}}`);
|
|
1550
|
+
}
|
|
1538
1551
|
if (filters?.responsible_id) {
|
|
1539
1552
|
conditions.push(`responsible_id: {_eq: ${filters.responsible_id}}`);
|
|
1540
1553
|
}
|
|
@@ -1572,6 +1585,7 @@ const getCasesStringQuery = (filters) => {
|
|
|
1572
1585
|
warranty
|
|
1573
1586
|
courtesy
|
|
1574
1587
|
total
|
|
1588
|
+
responsible_id
|
|
1575
1589
|
client {
|
|
1576
1590
|
name
|
|
1577
1591
|
tin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.185",
|
|
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": "0089d558e05e0992d82d19cc9345bb37500862e0"
|
|
25
25
|
}
|