@usethrottle/discounts 0.2.0 → 0.2.1
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/index.cjs +2 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -95,9 +95,11 @@ var DiscountsClient = class {
|
|
|
95
95
|
}
|
|
96
96
|
async list(params = {}) {
|
|
97
97
|
const query = new URLSearchParams();
|
|
98
|
+
if (params.q) query.set("q", params.q);
|
|
98
99
|
if (params.storeId) query.set("storeId", params.storeId);
|
|
99
100
|
if (params.isActive !== void 0) query.set("isActive", String(params.isActive));
|
|
100
101
|
if (params.code) query.set("code", params.code);
|
|
102
|
+
if (params.type) query.set("type", params.type);
|
|
101
103
|
if (params.limit !== void 0) query.set("limit", String(params.limit));
|
|
102
104
|
if (params.cursor) query.set("cursor", params.cursor);
|
|
103
105
|
if (params.sort) query.set("sort", params.sort);
|
package/dist/index.d.cts
CHANGED
|
@@ -40,9 +40,11 @@ interface UpdateDiscountInput {
|
|
|
40
40
|
metadata?: Record<string, unknown>;
|
|
41
41
|
}
|
|
42
42
|
interface DiscountListParams {
|
|
43
|
+
q?: string;
|
|
43
44
|
storeId?: string;
|
|
44
45
|
isActive?: boolean;
|
|
45
46
|
code?: string;
|
|
47
|
+
type?: DiscountType;
|
|
46
48
|
limit?: number;
|
|
47
49
|
cursor?: string;
|
|
48
50
|
sort?: 'asc' | 'desc';
|
package/dist/index.d.ts
CHANGED
|
@@ -40,9 +40,11 @@ interface UpdateDiscountInput {
|
|
|
40
40
|
metadata?: Record<string, unknown>;
|
|
41
41
|
}
|
|
42
42
|
interface DiscountListParams {
|
|
43
|
+
q?: string;
|
|
43
44
|
storeId?: string;
|
|
44
45
|
isActive?: boolean;
|
|
45
46
|
code?: string;
|
|
47
|
+
type?: DiscountType;
|
|
46
48
|
limit?: number;
|
|
47
49
|
cursor?: string;
|
|
48
50
|
sort?: 'asc' | 'desc';
|
package/dist/index.js
CHANGED
|
@@ -67,9 +67,11 @@ var DiscountsClient = class {
|
|
|
67
67
|
}
|
|
68
68
|
async list(params = {}) {
|
|
69
69
|
const query = new URLSearchParams();
|
|
70
|
+
if (params.q) query.set("q", params.q);
|
|
70
71
|
if (params.storeId) query.set("storeId", params.storeId);
|
|
71
72
|
if (params.isActive !== void 0) query.set("isActive", String(params.isActive));
|
|
72
73
|
if (params.code) query.set("code", params.code);
|
|
74
|
+
if (params.type) query.set("type", params.type);
|
|
73
75
|
if (params.limit !== void 0) query.set("limit", String(params.limit));
|
|
74
76
|
if (params.cursor) query.set("cursor", params.cursor);
|
|
75
77
|
if (params.sort) query.set("sort", params.sort);
|