@composable-os/pack-offers 0.0.0-stage → 0.1.0-beta.15
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/LICENSE +109 -0
- package/dist/dashboards.d.ts +5 -0
- package/dist/dashboards.js +85 -0
- package/dist/index.d.ts +594 -0
- package/dist/index.js +316 -0
- package/dist/tools.d.ts +285 -0
- package/dist/tools.js +597 -0
- package/package.json +31 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
declare const _default: import("@composable-os/sdk").Extension<{
|
|
2
|
+
readonly id: "offers";
|
|
3
|
+
readonly version: "0.1.0";
|
|
4
|
+
readonly contractVersion: 1;
|
|
5
|
+
readonly label: "Offers";
|
|
6
|
+
readonly description: string;
|
|
7
|
+
readonly permissions: {
|
|
8
|
+
readonly operations: ["query.sql"];
|
|
9
|
+
readonly modules: ["ops"];
|
|
10
|
+
};
|
|
11
|
+
readonly objects: {
|
|
12
|
+
readonly discount: {
|
|
13
|
+
readonly label: "Discount";
|
|
14
|
+
readonly plural: "Discounts";
|
|
15
|
+
readonly icon: "percent";
|
|
16
|
+
readonly titleField: "name";
|
|
17
|
+
readonly description: string;
|
|
18
|
+
readonly navigation: "main";
|
|
19
|
+
readonly navigationOrder: 30;
|
|
20
|
+
readonly fields: {
|
|
21
|
+
readonly name: {
|
|
22
|
+
readonly type: "text";
|
|
23
|
+
readonly label: "Name";
|
|
24
|
+
readonly required: true;
|
|
25
|
+
readonly description: "What staff and the buyer's order call it (January sale, Members' drop-in).";
|
|
26
|
+
};
|
|
27
|
+
readonly note: {
|
|
28
|
+
readonly type: "longText";
|
|
29
|
+
readonly label: "Note";
|
|
30
|
+
readonly description: "Why it exists, for staff.";
|
|
31
|
+
};
|
|
32
|
+
readonly kind: {
|
|
33
|
+
readonly type: "select";
|
|
34
|
+
readonly label: "What is off";
|
|
35
|
+
readonly required: true;
|
|
36
|
+
readonly default: "percent";
|
|
37
|
+
readonly options: readonly [{
|
|
38
|
+
readonly value: "percent";
|
|
39
|
+
readonly label: "A percentage off";
|
|
40
|
+
}, {
|
|
41
|
+
readonly value: "amount";
|
|
42
|
+
readonly label: "An amount off the order";
|
|
43
|
+
}, {
|
|
44
|
+
readonly value: "price";
|
|
45
|
+
readonly label: "A set price for each";
|
|
46
|
+
}];
|
|
47
|
+
};
|
|
48
|
+
readonly percent: {
|
|
49
|
+
readonly type: "number";
|
|
50
|
+
readonly label: "Percentage off";
|
|
51
|
+
readonly description: "For a percentage: 1 to 100. Rounded down on each line by the host.";
|
|
52
|
+
readonly min: 1;
|
|
53
|
+
readonly max: 100;
|
|
54
|
+
};
|
|
55
|
+
readonly amount: {
|
|
56
|
+
readonly type: "currency";
|
|
57
|
+
readonly label: "Amount";
|
|
58
|
+
readonly description: string;
|
|
59
|
+
readonly min: 0;
|
|
60
|
+
};
|
|
61
|
+
readonly automatic: {
|
|
62
|
+
readonly type: "boolean";
|
|
63
|
+
readonly label: "Applies by itself";
|
|
64
|
+
readonly default: false;
|
|
65
|
+
readonly description: string;
|
|
66
|
+
};
|
|
67
|
+
readonly code: {
|
|
68
|
+
readonly type: "text";
|
|
69
|
+
readonly label: "Promo code";
|
|
70
|
+
readonly description: string;
|
|
71
|
+
};
|
|
72
|
+
readonly who: {
|
|
73
|
+
readonly type: "select";
|
|
74
|
+
readonly label: "Who it is for";
|
|
75
|
+
readonly default: "anyone";
|
|
76
|
+
readonly options: readonly [{
|
|
77
|
+
readonly value: "anyone";
|
|
78
|
+
readonly label: "Anyone, guests included";
|
|
79
|
+
}, {
|
|
80
|
+
readonly value: "signed_in";
|
|
81
|
+
readonly label: "Signed-in customers";
|
|
82
|
+
}, {
|
|
83
|
+
readonly value: "members";
|
|
84
|
+
readonly label: "Members (a live membership)";
|
|
85
|
+
}, {
|
|
86
|
+
readonly value: "new_customers";
|
|
87
|
+
readonly label: "New customers";
|
|
88
|
+
}, {
|
|
89
|
+
readonly value: "organisation";
|
|
90
|
+
readonly label: "People of an organisation";
|
|
91
|
+
}, {
|
|
92
|
+
readonly value: "tag";
|
|
93
|
+
readonly label: "People with a tag";
|
|
94
|
+
}];
|
|
95
|
+
readonly description: string;
|
|
96
|
+
};
|
|
97
|
+
readonly organisations: {
|
|
98
|
+
readonly type: "relation";
|
|
99
|
+
readonly label: "Organisations";
|
|
100
|
+
readonly to: "organisation";
|
|
101
|
+
readonly many: true;
|
|
102
|
+
readonly description: "For an organisation's people: a customer rate.";
|
|
103
|
+
};
|
|
104
|
+
readonly tag: {
|
|
105
|
+
readonly type: "text";
|
|
106
|
+
readonly label: "Tag";
|
|
107
|
+
readonly description: "For people with this tag.";
|
|
108
|
+
};
|
|
109
|
+
readonly appliesTo: {
|
|
110
|
+
readonly type: "multiSelect";
|
|
111
|
+
readonly label: "Applies to";
|
|
112
|
+
readonly options: readonly [{
|
|
113
|
+
readonly value: "bookings.booking";
|
|
114
|
+
readonly label: "Drop-in classes";
|
|
115
|
+
}, {
|
|
116
|
+
readonly value: "ticketing.tickettype";
|
|
117
|
+
readonly label: "Event tickets";
|
|
118
|
+
}, {
|
|
119
|
+
readonly value: "memberships.passtype";
|
|
120
|
+
readonly label: "Class passes";
|
|
121
|
+
}, {
|
|
122
|
+
readonly value: "courses.course";
|
|
123
|
+
readonly label: "Courses";
|
|
124
|
+
}, {
|
|
125
|
+
readonly value: "courses.bundle";
|
|
126
|
+
readonly label: "Course bundles";
|
|
127
|
+
}, {
|
|
128
|
+
readonly value: "shop.variant";
|
|
129
|
+
readonly label: "Shop goods";
|
|
130
|
+
}];
|
|
131
|
+
readonly description: "What it takes money off. Empty: everything but postage.";
|
|
132
|
+
};
|
|
133
|
+
readonly from: {
|
|
134
|
+
readonly type: "date";
|
|
135
|
+
readonly label: "From";
|
|
136
|
+
readonly description: "From the start of this day (UTC).";
|
|
137
|
+
};
|
|
138
|
+
readonly until: {
|
|
139
|
+
readonly type: "date";
|
|
140
|
+
readonly label: "Until";
|
|
141
|
+
readonly description: "To the end of this day (UTC).";
|
|
142
|
+
};
|
|
143
|
+
readonly totalUses: {
|
|
144
|
+
readonly type: "number";
|
|
145
|
+
readonly label: "Uses in total";
|
|
146
|
+
readonly description: "The most orders it may be used on, across everyone. Empty: no limit.";
|
|
147
|
+
readonly min: 1;
|
|
148
|
+
readonly step: 1;
|
|
149
|
+
};
|
|
150
|
+
readonly perPerson: {
|
|
151
|
+
readonly type: "number";
|
|
152
|
+
readonly label: "Uses per person";
|
|
153
|
+
readonly description: string;
|
|
154
|
+
readonly min: 1;
|
|
155
|
+
readonly step: 1;
|
|
156
|
+
};
|
|
157
|
+
readonly minSpend: {
|
|
158
|
+
readonly type: "currency";
|
|
159
|
+
readonly label: "Minimum spend";
|
|
160
|
+
readonly description: "The least what it covers must cost on the order. Empty: none.";
|
|
161
|
+
readonly min: 0;
|
|
162
|
+
};
|
|
163
|
+
readonly state: {
|
|
164
|
+
readonly type: "select";
|
|
165
|
+
readonly label: "State";
|
|
166
|
+
readonly default: "draft";
|
|
167
|
+
readonly track: "timeline";
|
|
168
|
+
readonly options: readonly [{
|
|
169
|
+
readonly value: "draft";
|
|
170
|
+
readonly label: "Draft";
|
|
171
|
+
}, {
|
|
172
|
+
readonly value: "active";
|
|
173
|
+
readonly label: "Live";
|
|
174
|
+
}, {
|
|
175
|
+
readonly value: "paused";
|
|
176
|
+
readonly label: "Paused";
|
|
177
|
+
}, {
|
|
178
|
+
readonly value: "ended";
|
|
179
|
+
readonly label: "Ended";
|
|
180
|
+
}];
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly states: {
|
|
184
|
+
readonly field: "state";
|
|
185
|
+
readonly initial: "draft";
|
|
186
|
+
readonly moves: readonly [{
|
|
187
|
+
readonly from: readonly ["draft", "paused"];
|
|
188
|
+
readonly to: "active";
|
|
189
|
+
readonly by: readonly ["host"];
|
|
190
|
+
readonly tools: readonly ["activateDiscount"];
|
|
191
|
+
}, {
|
|
192
|
+
readonly from: "active";
|
|
193
|
+
readonly to: "paused";
|
|
194
|
+
readonly by: readonly ["host"];
|
|
195
|
+
readonly tools: readonly ["pauseDiscount"];
|
|
196
|
+
}, {
|
|
197
|
+
readonly from: readonly ["draft", "active", "paused"];
|
|
198
|
+
readonly to: "ended";
|
|
199
|
+
readonly by: readonly ["host"];
|
|
200
|
+
readonly tools: readonly ["endDiscount"];
|
|
201
|
+
readonly final: true;
|
|
202
|
+
}];
|
|
203
|
+
};
|
|
204
|
+
readonly discount: {
|
|
205
|
+
readonly kind: "kind";
|
|
206
|
+
readonly percent: "percent";
|
|
207
|
+
readonly amount: "amount";
|
|
208
|
+
readonly live: readonly ["active"];
|
|
209
|
+
readonly automatic: "automatic";
|
|
210
|
+
readonly code: "code";
|
|
211
|
+
readonly codes: {
|
|
212
|
+
readonly object: "code";
|
|
213
|
+
readonly discount: "discount";
|
|
214
|
+
readonly word: "word";
|
|
215
|
+
readonly uses: "uses";
|
|
216
|
+
readonly active: "active";
|
|
217
|
+
readonly hashed: true;
|
|
218
|
+
};
|
|
219
|
+
readonly who: "who";
|
|
220
|
+
readonly organisations: "organisations";
|
|
221
|
+
readonly tag: "tag";
|
|
222
|
+
readonly objects: "appliesTo";
|
|
223
|
+
readonly from: "from";
|
|
224
|
+
readonly until: "until";
|
|
225
|
+
readonly totalUses: "totalUses";
|
|
226
|
+
readonly perPerson: "perPerson";
|
|
227
|
+
readonly minSpend: "minSpend";
|
|
228
|
+
};
|
|
229
|
+
readonly indexes: readonly [readonly ["state"], readonly ["automatic", "state"]];
|
|
230
|
+
};
|
|
231
|
+
readonly code: {
|
|
232
|
+
readonly label: "Single-use code";
|
|
233
|
+
readonly plural: "Single-use codes";
|
|
234
|
+
readonly icon: "ticket";
|
|
235
|
+
readonly titleField: "label";
|
|
236
|
+
readonly description: string;
|
|
237
|
+
readonly navigation: "none";
|
|
238
|
+
readonly fields: {
|
|
239
|
+
readonly label: {
|
|
240
|
+
readonly type: "text";
|
|
241
|
+
readonly label: "Label";
|
|
242
|
+
readonly readOnly: true;
|
|
243
|
+
readonly description: "The batch and the code's number in it.";
|
|
244
|
+
};
|
|
245
|
+
readonly discount: {
|
|
246
|
+
readonly type: "relation";
|
|
247
|
+
readonly label: "Discount";
|
|
248
|
+
readonly to: "offers.discount";
|
|
249
|
+
readonly readOnly: true;
|
|
250
|
+
};
|
|
251
|
+
readonly batch: {
|
|
252
|
+
readonly type: "text";
|
|
253
|
+
readonly label: "Batch";
|
|
254
|
+
readonly readOnly: true;
|
|
255
|
+
};
|
|
256
|
+
readonly word: {
|
|
257
|
+
readonly type: "text";
|
|
258
|
+
readonly label: "Code (its hash)";
|
|
259
|
+
readonly readOnly: true;
|
|
260
|
+
readonly description: "What the host keeps of the code: its hash, never the code.";
|
|
261
|
+
};
|
|
262
|
+
readonly uses: {
|
|
263
|
+
readonly type: "number";
|
|
264
|
+
readonly label: "Orders per code";
|
|
265
|
+
readonly readOnly: true;
|
|
266
|
+
readonly min: 1;
|
|
267
|
+
readonly step: 1;
|
|
268
|
+
readonly description: "The most orders this code may be used on.";
|
|
269
|
+
};
|
|
270
|
+
readonly active: {
|
|
271
|
+
readonly type: "boolean";
|
|
272
|
+
readonly label: "Works";
|
|
273
|
+
readonly default: true;
|
|
274
|
+
readonly description: "Off: the code is void. Switched off by voidBatch, voidCodes or a person.";
|
|
275
|
+
};
|
|
276
|
+
readonly madeBy: {
|
|
277
|
+
readonly type: "text";
|
|
278
|
+
readonly label: "Made by";
|
|
279
|
+
readonly readOnly: true;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
readonly indexes: readonly [readonly ["discount", "batch"]];
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
readonly views: {
|
|
286
|
+
readonly liveDiscounts: {
|
|
287
|
+
readonly label: "Live";
|
|
288
|
+
readonly object: "offers.discount";
|
|
289
|
+
readonly filter: {
|
|
290
|
+
readonly field: "state";
|
|
291
|
+
readonly op: "eq";
|
|
292
|
+
readonly value: "active";
|
|
293
|
+
};
|
|
294
|
+
readonly sort: {
|
|
295
|
+
readonly field: "name";
|
|
296
|
+
readonly direction: "asc";
|
|
297
|
+
};
|
|
298
|
+
readonly columns: ["name", "kind", "percent", "amount", "code", "automatic", "who", "until"];
|
|
299
|
+
};
|
|
300
|
+
readonly draftDiscounts: {
|
|
301
|
+
readonly label: "Drafts";
|
|
302
|
+
readonly object: "offers.discount";
|
|
303
|
+
readonly filter: {
|
|
304
|
+
readonly field: "state";
|
|
305
|
+
readonly op: "eq";
|
|
306
|
+
readonly value: "draft";
|
|
307
|
+
};
|
|
308
|
+
readonly sort: {
|
|
309
|
+
readonly field: "createdAt";
|
|
310
|
+
readonly direction: "desc";
|
|
311
|
+
};
|
|
312
|
+
readonly columns: ["name", "kind", "percent", "amount", "code", "automatic", "who", "createdAt"];
|
|
313
|
+
};
|
|
314
|
+
readonly memberPrices: {
|
|
315
|
+
readonly label: "Members' prices and customer rates";
|
|
316
|
+
readonly object: "offers.discount";
|
|
317
|
+
readonly filter: {
|
|
318
|
+
readonly and: [{
|
|
319
|
+
readonly field: "automatic";
|
|
320
|
+
readonly op: "eq";
|
|
321
|
+
readonly value: true;
|
|
322
|
+
}, {
|
|
323
|
+
readonly field: "state";
|
|
324
|
+
readonly op: "in";
|
|
325
|
+
readonly value: readonly ["draft", "active", "paused"];
|
|
326
|
+
}];
|
|
327
|
+
};
|
|
328
|
+
readonly sort: {
|
|
329
|
+
readonly field: "name";
|
|
330
|
+
readonly direction: "asc";
|
|
331
|
+
};
|
|
332
|
+
readonly columns: ["name", "who", "kind", "percent", "amount", "appliesTo", "state"];
|
|
333
|
+
};
|
|
334
|
+
readonly promoCodes: {
|
|
335
|
+
readonly label: "Promo codes";
|
|
336
|
+
readonly object: "offers.discount";
|
|
337
|
+
readonly filter: {
|
|
338
|
+
readonly and: [{
|
|
339
|
+
readonly field: "code";
|
|
340
|
+
readonly op: "is_not_null";
|
|
341
|
+
}, {
|
|
342
|
+
readonly field: "state";
|
|
343
|
+
readonly op: "in";
|
|
344
|
+
readonly value: readonly ["draft", "active", "paused"];
|
|
345
|
+
}];
|
|
346
|
+
};
|
|
347
|
+
readonly sort: {
|
|
348
|
+
readonly field: "name";
|
|
349
|
+
readonly direction: "asc";
|
|
350
|
+
};
|
|
351
|
+
readonly columns: ["name", "code", "kind", "percent", "amount", "from", "until", "state"];
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
readonly dashboards: {
|
|
355
|
+
offersOverview: import("@composable-os/sdk").DashboardDeclaration;
|
|
356
|
+
};
|
|
357
|
+
readonly recordTabs: {
|
|
358
|
+
readonly discountCodes: {
|
|
359
|
+
readonly label: "Single-use codes";
|
|
360
|
+
readonly on: "offers.discount";
|
|
361
|
+
readonly view: {
|
|
362
|
+
readonly type: "table";
|
|
363
|
+
readonly object: "offers.code";
|
|
364
|
+
readonly relation: "discount";
|
|
365
|
+
readonly columns: ["label", "batch", "uses", "active", "madeBy", "createdAt"];
|
|
366
|
+
readonly sort: {
|
|
367
|
+
readonly field: "createdAt";
|
|
368
|
+
readonly direction: "desc";
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
readonly order: 10;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
readonly tools: {
|
|
375
|
+
readonly discounts: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
376
|
+
state: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
377
|
+
draft: "draft";
|
|
378
|
+
active: "active";
|
|
379
|
+
paused: "paused";
|
|
380
|
+
ended: "ended";
|
|
381
|
+
}>>;
|
|
382
|
+
automatic: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
383
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
384
|
+
discounts: import("zod").ZodArray<import("zod").ZodObject<{
|
|
385
|
+
id: import("zod").ZodString;
|
|
386
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
387
|
+
state: import("zod").ZodNullable<import("zod").ZodString>;
|
|
388
|
+
kind: import("zod").ZodNullable<import("zod").ZodString>;
|
|
389
|
+
percent: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
390
|
+
amount: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
391
|
+
automatic: import("zod").ZodBoolean;
|
|
392
|
+
code: import("zod").ZodNullable<import("zod").ZodString>;
|
|
393
|
+
who: import("zod").ZodNullable<import("zod").ZodString>;
|
|
394
|
+
appliesTo: import("zod").ZodArray<import("zod").ZodString>;
|
|
395
|
+
from: import("zod").ZodNullable<import("zod").ZodString>;
|
|
396
|
+
until: import("zod").ZodNullable<import("zod").ZodString>;
|
|
397
|
+
totalUses: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
398
|
+
perPerson: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
399
|
+
minSpend: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
400
|
+
used: import("zod").ZodNumber;
|
|
401
|
+
held: import("zod").ZodNumber;
|
|
402
|
+
given: import("zod").ZodNumber;
|
|
403
|
+
}, import("zod/v4/core").$strip>>;
|
|
404
|
+
truncated: import("zod").ZodBoolean;
|
|
405
|
+
}, import("zod/v4/core").$strip>>;
|
|
406
|
+
readonly codeBatches: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
407
|
+
discountId: import("zod").ZodString;
|
|
408
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
409
|
+
batches: import("zod").ZodArray<import("zod").ZodObject<{
|
|
410
|
+
batch: import("zod").ZodNullable<import("zod").ZodString>;
|
|
411
|
+
made: import("zod").ZodNumber;
|
|
412
|
+
working: import("zod").ZodNumber;
|
|
413
|
+
used: import("zod").ZodNumber;
|
|
414
|
+
usesPerCode: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
415
|
+
madeBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
416
|
+
madeAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
417
|
+
}, import("zod/v4/core").$strip>>;
|
|
418
|
+
}, import("zod/v4/core").$strip>>;
|
|
419
|
+
readonly draftDiscount: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
420
|
+
name: import("zod").ZodString;
|
|
421
|
+
kind: import("zod").ZodEnum<{
|
|
422
|
+
percent: "percent";
|
|
423
|
+
amount: "amount";
|
|
424
|
+
price: "price";
|
|
425
|
+
}>;
|
|
426
|
+
percent: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
427
|
+
amount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
428
|
+
automatic: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
429
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
430
|
+
who: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
431
|
+
[x: string]: string;
|
|
432
|
+
}>>;
|
|
433
|
+
organisations: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
434
|
+
tag: import("zod").ZodOptional<import("zod").ZodString>;
|
|
435
|
+
appliesTo: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
436
|
+
[x: string]: string;
|
|
437
|
+
}>>>;
|
|
438
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
439
|
+
until: import("zod").ZodOptional<import("zod").ZodString>;
|
|
440
|
+
totalUses: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
441
|
+
perPerson: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
442
|
+
minSpend: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
443
|
+
note: import("zod").ZodOptional<import("zod").ZodString>;
|
|
444
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
445
|
+
id: import("zod").ZodString;
|
|
446
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
447
|
+
state: import("zod").ZodNullable<import("zod").ZodString>;
|
|
448
|
+
kind: import("zod").ZodNullable<import("zod").ZodString>;
|
|
449
|
+
percent: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
450
|
+
amount: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
451
|
+
automatic: import("zod").ZodBoolean;
|
|
452
|
+
code: import("zod").ZodNullable<import("zod").ZodString>;
|
|
453
|
+
who: import("zod").ZodNullable<import("zod").ZodString>;
|
|
454
|
+
appliesTo: import("zod").ZodArray<import("zod").ZodString>;
|
|
455
|
+
from: import("zod").ZodNullable<import("zod").ZodString>;
|
|
456
|
+
until: import("zod").ZodNullable<import("zod").ZodString>;
|
|
457
|
+
totalUses: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
458
|
+
perPerson: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
459
|
+
minSpend: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
460
|
+
open: import("zod").ZodObject<{
|
|
461
|
+
object: import("zod").ZodString;
|
|
462
|
+
id: import("zod").ZodString;
|
|
463
|
+
}, import("zod/v4/core").$strip>;
|
|
464
|
+
}, import("zod/v4/core").$strip>>;
|
|
465
|
+
readonly changeDiscount: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
466
|
+
discountId: import("zod").ZodString;
|
|
467
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
468
|
+
kind: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
469
|
+
percent: "percent";
|
|
470
|
+
amount: "amount";
|
|
471
|
+
price: "price";
|
|
472
|
+
}>>;
|
|
473
|
+
percent: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
474
|
+
amount: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
475
|
+
automatic: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
476
|
+
code: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
477
|
+
who: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
478
|
+
[x: string]: string;
|
|
479
|
+
}>>;
|
|
480
|
+
organisations: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
481
|
+
tag: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
482
|
+
appliesTo: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
483
|
+
[x: string]: string;
|
|
484
|
+
}>>>>;
|
|
485
|
+
from: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
486
|
+
until: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
487
|
+
totalUses: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
488
|
+
perPerson: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
489
|
+
minSpend: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
490
|
+
note: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
491
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
492
|
+
id: import("zod").ZodString;
|
|
493
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
494
|
+
state: import("zod").ZodNullable<import("zod").ZodString>;
|
|
495
|
+
kind: import("zod").ZodNullable<import("zod").ZodString>;
|
|
496
|
+
percent: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
497
|
+
amount: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
498
|
+
automatic: import("zod").ZodBoolean;
|
|
499
|
+
code: import("zod").ZodNullable<import("zod").ZodString>;
|
|
500
|
+
who: import("zod").ZodNullable<import("zod").ZodString>;
|
|
501
|
+
appliesTo: import("zod").ZodArray<import("zod").ZodString>;
|
|
502
|
+
from: import("zod").ZodNullable<import("zod").ZodString>;
|
|
503
|
+
until: import("zod").ZodNullable<import("zod").ZodString>;
|
|
504
|
+
totalUses: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
505
|
+
perPerson: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
506
|
+
minSpend: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
507
|
+
}, import("zod/v4/core").$strip>>;
|
|
508
|
+
readonly activateDiscount: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
509
|
+
discountId: import("zod").ZodString;
|
|
510
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
511
|
+
id: import("zod").ZodString;
|
|
512
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
513
|
+
state: import("zod").ZodNullable<import("zod").ZodString>;
|
|
514
|
+
kind: import("zod").ZodNullable<import("zod").ZodString>;
|
|
515
|
+
percent: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
516
|
+
amount: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
517
|
+
automatic: import("zod").ZodBoolean;
|
|
518
|
+
code: import("zod").ZodNullable<import("zod").ZodString>;
|
|
519
|
+
who: import("zod").ZodNullable<import("zod").ZodString>;
|
|
520
|
+
appliesTo: import("zod").ZodArray<import("zod").ZodString>;
|
|
521
|
+
from: import("zod").ZodNullable<import("zod").ZodString>;
|
|
522
|
+
until: import("zod").ZodNullable<import("zod").ZodString>;
|
|
523
|
+
totalUses: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
524
|
+
perPerson: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
525
|
+
minSpend: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
526
|
+
}, import("zod/v4/core").$strip>>;
|
|
527
|
+
readonly pauseDiscount: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
528
|
+
discountId: import("zod").ZodString;
|
|
529
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
530
|
+
id: import("zod").ZodString;
|
|
531
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
532
|
+
state: import("zod").ZodNullable<import("zod").ZodString>;
|
|
533
|
+
kind: import("zod").ZodNullable<import("zod").ZodString>;
|
|
534
|
+
percent: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
535
|
+
amount: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
536
|
+
automatic: import("zod").ZodBoolean;
|
|
537
|
+
code: import("zod").ZodNullable<import("zod").ZodString>;
|
|
538
|
+
who: import("zod").ZodNullable<import("zod").ZodString>;
|
|
539
|
+
appliesTo: import("zod").ZodArray<import("zod").ZodString>;
|
|
540
|
+
from: import("zod").ZodNullable<import("zod").ZodString>;
|
|
541
|
+
until: import("zod").ZodNullable<import("zod").ZodString>;
|
|
542
|
+
totalUses: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
543
|
+
perPerson: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
544
|
+
minSpend: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
545
|
+
}, import("zod/v4/core").$strip>>;
|
|
546
|
+
readonly endDiscount: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
547
|
+
discountId: import("zod").ZodString;
|
|
548
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
549
|
+
id: import("zod").ZodString;
|
|
550
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
551
|
+
state: import("zod").ZodNullable<import("zod").ZodString>;
|
|
552
|
+
kind: import("zod").ZodNullable<import("zod").ZodString>;
|
|
553
|
+
percent: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
554
|
+
amount: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
555
|
+
automatic: import("zod").ZodBoolean;
|
|
556
|
+
code: import("zod").ZodNullable<import("zod").ZodString>;
|
|
557
|
+
who: import("zod").ZodNullable<import("zod").ZodString>;
|
|
558
|
+
appliesTo: import("zod").ZodArray<import("zod").ZodString>;
|
|
559
|
+
from: import("zod").ZodNullable<import("zod").ZodString>;
|
|
560
|
+
until: import("zod").ZodNullable<import("zod").ZodString>;
|
|
561
|
+
totalUses: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
562
|
+
perPerson: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
563
|
+
minSpend: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
564
|
+
}, import("zod/v4/core").$strip>>;
|
|
565
|
+
readonly generateCodes: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
566
|
+
discountId: import("zod").ZodString;
|
|
567
|
+
count: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
568
|
+
usesPerCode: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
569
|
+
batch: import("zod").ZodOptional<import("zod").ZodString>;
|
|
570
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
571
|
+
discountId: import("zod").ZodString;
|
|
572
|
+
batch: import("zod").ZodString;
|
|
573
|
+
made: import("zod").ZodNumber;
|
|
574
|
+
complete: import("zod").ZodBoolean;
|
|
575
|
+
problem: import("zod").ZodNullable<import("zod").ZodString>;
|
|
576
|
+
codes: import("zod").ZodArray<import("zod").ZodString>;
|
|
577
|
+
}, import("zod/v4/core").$strip>>;
|
|
578
|
+
readonly voidBatch: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
579
|
+
discountId: import("zod").ZodString;
|
|
580
|
+
batch: import("zod").ZodString;
|
|
581
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
582
|
+
voided: import("zod").ZodNumber;
|
|
583
|
+
remaining: import("zod").ZodNumber;
|
|
584
|
+
}, import("zod/v4/core").$strip>>;
|
|
585
|
+
readonly voidCodes: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
586
|
+
discountId: import("zod").ZodString;
|
|
587
|
+
codes: import("zod").ZodArray<import("zod").ZodString>;
|
|
588
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
589
|
+
voided: import("zod").ZodNumber;
|
|
590
|
+
remaining: import("zod").ZodNumber;
|
|
591
|
+
}, import("zod/v4/core").$strip>>;
|
|
592
|
+
};
|
|
593
|
+
}>;
|
|
594
|
+
export default _default;
|