@infrab4a/connect 4.3.1-beta.0 → 4.3.2-beta.0
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/index.cjs.js +0 -22
- package/index.esm.js +0 -22
- package/package.json +2 -2
- package/src/domain/shopping/models/coupons/coupon.d.ts +3 -0
package/index.cjs.js
CHANGED
|
@@ -4503,28 +4503,6 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
4503
4503
|
.map((productId) => ({ category_id: categoryId, product_id: productId })),
|
|
4504
4504
|
},
|
|
4505
4505
|
});
|
|
4506
|
-
const productsOrder = products.map((product, index) => {
|
|
4507
|
-
return {
|
|
4508
|
-
id: product,
|
|
4509
|
-
order: index,
|
|
4510
|
-
};
|
|
4511
|
-
});
|
|
4512
|
-
const updateQueries = productsOrder.map((product) => ({
|
|
4513
|
-
where: {
|
|
4514
|
-
category_id: { _eq: category.id },
|
|
4515
|
-
product_id: { _eq: product.id },
|
|
4516
|
-
},
|
|
4517
|
-
_set: {
|
|
4518
|
-
order: product.order,
|
|
4519
|
-
},
|
|
4520
|
-
}));
|
|
4521
|
-
await this.mutation('update_category_product_many', ['affected_rows'], {
|
|
4522
|
-
updates: {
|
|
4523
|
-
value: updateQueries,
|
|
4524
|
-
type: '[category_product_updates!]',
|
|
4525
|
-
required: true,
|
|
4526
|
-
},
|
|
4527
|
-
});
|
|
4528
4506
|
return plainData.products;
|
|
4529
4507
|
}
|
|
4530
4508
|
async updateMetadata(categoryId, { metadata }) {
|
package/index.esm.js
CHANGED
|
@@ -4497,28 +4497,6 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
4497
4497
|
.map((productId) => ({ category_id: categoryId, product_id: productId })),
|
|
4498
4498
|
},
|
|
4499
4499
|
});
|
|
4500
|
-
const productsOrder = products.map((product, index) => {
|
|
4501
|
-
return {
|
|
4502
|
-
id: product,
|
|
4503
|
-
order: index,
|
|
4504
|
-
};
|
|
4505
|
-
});
|
|
4506
|
-
const updateQueries = productsOrder.map((product) => ({
|
|
4507
|
-
where: {
|
|
4508
|
-
category_id: { _eq: category.id },
|
|
4509
|
-
product_id: { _eq: product.id },
|
|
4510
|
-
},
|
|
4511
|
-
_set: {
|
|
4512
|
-
order: product.order,
|
|
4513
|
-
},
|
|
4514
|
-
}));
|
|
4515
|
-
await this.mutation('update_category_product_many', ['affected_rows'], {
|
|
4516
|
-
updates: {
|
|
4517
|
-
value: updateQueries,
|
|
4518
|
-
type: '[category_product_updates!]',
|
|
4519
|
-
required: true,
|
|
4520
|
-
},
|
|
4521
|
-
});
|
|
4522
4500
|
return plainData.products;
|
|
4523
4501
|
}
|
|
4524
4502
|
async updateMetadata(categoryId, { metadata }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrab4a/connect",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2-beta.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"class-transformer": "^0.5.1",
|
|
14
14
|
"date-fns": "^2.28.0",
|
|
15
15
|
"debug": "^4.3.4",
|
|
16
|
-
"firebase": "^9.
|
|
16
|
+
"firebase": "^9.23.0",
|
|
17
17
|
"gql-query-builder": "3.7.0",
|
|
18
18
|
"lodash": "^4.17.21",
|
|
19
19
|
"reflect-metadata": "^0.1.13",
|
|
@@ -25,16 +25,19 @@ export declare class Coupon extends BaseModel<Coupon> {
|
|
|
25
25
|
unlimited?: boolean;
|
|
26
26
|
total?: number;
|
|
27
27
|
limitedPerUser?: boolean;
|
|
28
|
+
firstOrder?: boolean;
|
|
28
29
|
};
|
|
29
30
|
non_subscriber: {
|
|
30
31
|
unlimited?: boolean;
|
|
31
32
|
total?: number;
|
|
32
33
|
limitedPerUser?: boolean;
|
|
34
|
+
firstOrder?: boolean;
|
|
33
35
|
};
|
|
34
36
|
subscription?: {
|
|
35
37
|
unlimited?: boolean;
|
|
36
38
|
total?: number;
|
|
37
39
|
limitedPerUser?: boolean;
|
|
40
|
+
firstOrder?: boolean;
|
|
38
41
|
};
|
|
39
42
|
};
|
|
40
43
|
user?: string;
|