@puntjes/sdk 0.0.0-stage → 2.0.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.
Files changed (63) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +152 -2
  3. package/dist/auth/token-source.d.ts +20 -0
  4. package/dist/auth/token-source.js +105 -0
  5. package/dist/auth/token-store.d.ts +21 -0
  6. package/dist/auth/token-store.js +13 -0
  7. package/dist/create-puntjes.d.ts +25 -0
  8. package/dist/create-puntjes.js +48 -0
  9. package/dist/errors.d.ts +55 -0
  10. package/dist/errors.js +60 -0
  11. package/dist/generated/client/client.gen.d.ts +2 -0
  12. package/dist/generated/client/client.gen.js +216 -0
  13. package/dist/generated/client/index.d.ts +10 -0
  14. package/dist/generated/client/index.js +6 -0
  15. package/dist/generated/client/types.gen.d.ts +120 -0
  16. package/dist/generated/client/types.gen.js +2 -0
  17. package/dist/generated/client/utils.gen.d.ts +37 -0
  18. package/dist/generated/client/utils.gen.js +228 -0
  19. package/dist/generated/client.gen.d.ts +12 -0
  20. package/dist/generated/client.gen.js +3 -0
  21. package/dist/generated/core/auth.gen.d.ts +25 -0
  22. package/dist/generated/core/auth.gen.js +14 -0
  23. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  24. package/dist/generated/core/bodySerializer.gen.js +57 -0
  25. package/dist/generated/core/params.gen.d.ts +43 -0
  26. package/dist/generated/core/params.gen.js +109 -0
  27. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  28. package/dist/generated/core/pathSerializer.gen.js +106 -0
  29. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  30. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  31. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  32. package/dist/generated/core/serverSentEvents.gen.js +132 -0
  33. package/dist/generated/core/types.gen.d.ts +83 -0
  34. package/dist/generated/core/types.gen.js +2 -0
  35. package/dist/generated/core/utils.gen.d.ts +19 -0
  36. package/dist/generated/core/utils.gen.js +87 -0
  37. package/dist/generated/error-codes.gen.d.ts +56 -0
  38. package/dist/generated/error-codes.gen.js +110 -0
  39. package/dist/generated/index.d.ts +2 -0
  40. package/dist/generated/index.js +2 -0
  41. package/dist/generated/sdk.gen.d.ts +69 -0
  42. package/dist/generated/sdk.gen.js +323 -0
  43. package/dist/generated/types.gen.d.ts +2794 -0
  44. package/dist/generated/types.gen.js +2 -0
  45. package/dist/http/auth-fetch.d.ts +8 -0
  46. package/dist/http/auth-fetch.js +24 -0
  47. package/dist/http/error-body.d.ts +18 -0
  48. package/dist/http/error-body.js +75 -0
  49. package/dist/http/error-fetch.d.ts +3 -0
  50. package/dist/http/error-fetch.js +22 -0
  51. package/dist/http/fetch.d.ts +9 -0
  52. package/dist/http/fetch.js +4 -0
  53. package/dist/http/retry-fetch.d.ts +16 -0
  54. package/dist/http/retry-fetch.js +93 -0
  55. package/dist/idempotency-key.d.ts +2 -0
  56. package/dist/idempotency-key.js +4 -0
  57. package/dist/index.d.ts +9 -0
  58. package/dist/index.js +8 -0
  59. package/dist/paginate.d.ts +10 -0
  60. package/dist/paginate.js +16 -0
  61. package/dist/wallet-pass.d.ts +5 -0
  62. package/dist/wallet-pass.js +12 -0
  63. package/package.json +45 -4
@@ -0,0 +1,2794 @@
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://puntjes.app/api/v1' | (string & {});
3
+ };
4
+ /**
5
+ * AdjustWalletApiData
6
+ */
7
+ export type AdjustWalletApiData = {
8
+ amount: number;
9
+ reason: string;
10
+ idempotency_key: string;
11
+ };
12
+ /**
13
+ * AnniversaryCampaignConfigData
14
+ */
15
+ export type AnniversaryCampaignConfigData = {
16
+ /**
17
+ * How many years after joining the gift is sent.
18
+ */
19
+ years: number;
20
+ /**
21
+ * What the customer gets. Its `type` says which shape this is.
22
+ */
23
+ gift: ({
24
+ type: 'points';
25
+ } & PointsGiftData) | ({
26
+ type: 'free_product';
27
+ } & FreeProductGiftData) | ({
28
+ type: 'discount';
29
+ } & DiscountGiftData);
30
+ /**
31
+ * Whether customers who passed the mark before the campaign started also get it.
32
+ */
33
+ backfill?: boolean | null;
34
+ /**
35
+ * The branches this campaign runs in. Absent or empty means all of them.
36
+ */
37
+ branch_ids?: Array<number>;
38
+ /**
39
+ * Which shape this is.
40
+ */
41
+ type: 'anniversary';
42
+ };
43
+ /**
44
+ * BranchReferenceData
45
+ */
46
+ export type BranchReferenceData = {
47
+ external_id: string;
48
+ name: string;
49
+ type: string;
50
+ };
51
+ /**
52
+ * BulkUpsertResponseData
53
+ */
54
+ export type BulkUpsertResponseData = {
55
+ results: Array<BulkUpsertResultData>;
56
+ summary: BulkUpsertSummaryData;
57
+ };
58
+ /**
59
+ * BulkUpsertResultData
60
+ */
61
+ export type BulkUpsertResultData = {
62
+ index: number;
63
+ external_id?: string | null;
64
+ status: string;
65
+ product?: ProductData;
66
+ /**
67
+ * Each rejected field and its messages. Absent when the item succeeded.
68
+ */
69
+ errors?: {
70
+ [key: string]: Array<string>;
71
+ };
72
+ };
73
+ /**
74
+ * BulkUpsertSummaryData
75
+ */
76
+ export type BulkUpsertSummaryData = {
77
+ total: number;
78
+ created: number;
79
+ updated: number;
80
+ failed: number;
81
+ };
82
+ /**
83
+ * CampaignListData
84
+ */
85
+ export type CampaignListData = {
86
+ id: number;
87
+ name: string;
88
+ family: string;
89
+ moment: string | null;
90
+ /**
91
+ * Its `type` says which shape this is.
92
+ */
93
+ config: ({
94
+ type: 'transaction';
95
+ } & TransactionCampaignConfigData) | ({
96
+ type: 'moment';
97
+ } & MomentCampaignConfigData) | ({
98
+ type: 'nth_purchase';
99
+ } & NthPurchaseCampaignConfigData) | ({
100
+ type: 'anniversary';
101
+ } & AnniversaryCampaignConfigData) | ({
102
+ type: 'win_back';
103
+ } & WinBackCampaignConfigData);
104
+ version: number;
105
+ multiplier: number | null;
106
+ recurrence_type: string | null;
107
+ /**
108
+ * Its `type` says which shape this is.
109
+ */
110
+ recurrence_config: ({
111
+ type: 'date_range';
112
+ } & DateRangeRecurrenceData) | ({
113
+ type: 'days_of_week';
114
+ } & DaysOfWeekRecurrenceData) | ({
115
+ type: 'specific_dates';
116
+ } & SpecificDatesRecurrenceData);
117
+ schedule_summary: string;
118
+ starts_at: string;
119
+ ends_at: string | null;
120
+ status: CampaignStatusData;
121
+ min_transaction_amount: number | null;
122
+ /**
123
+ * null means every branch
124
+ */
125
+ branches: Array<BranchReferenceData> | null;
126
+ created_at: string | null;
127
+ updated_at: string | null;
128
+ };
129
+ /**
130
+ * CampaignProductRuleData
131
+ */
132
+ export type CampaignProductRuleData = {
133
+ /**
134
+ * Your own identifier for the product, the same one the catalogue uses.
135
+ */
136
+ sku: string;
137
+ /**
138
+ * The product name as it was when the campaign was saved.
139
+ */
140
+ name: string;
141
+ };
142
+ /**
143
+ * CampaignStatusData
144
+ */
145
+ export type CampaignStatusData = {
146
+ value: string;
147
+ label: string;
148
+ };
149
+ /**
150
+ * CampaignVoucherLookupData
151
+ */
152
+ export type CampaignVoucherLookupData = {
153
+ voucher_code: string;
154
+ /**
155
+ * How much comes off, for a discount bon. Its `type` says which shape this is.
156
+ */
157
+ discount: ({
158
+ type: 'percentage';
159
+ } & VoucherPercentageDiscountData) | ({
160
+ type: 'fixed';
161
+ } & VoucherFixedDiscountData);
162
+ valid_until: string | null;
163
+ /**
164
+ * When the bon was spent, or null while it is not.
165
+ */
166
+ consumed_at: string | null;
167
+ campaign_id: number;
168
+ kind: string;
169
+ /**
170
+ * What to hand over, for a free-product bon.
171
+ */
172
+ products: Array<VoucherGiftProductData> | null;
173
+ /**
174
+ * `valid`, `used` or `expired`.
175
+ */
176
+ status: string;
177
+ };
178
+ /**
179
+ * CampaignVoucherVerificationData
180
+ */
181
+ export type CampaignVoucherVerificationData = {
182
+ voucher_code: string;
183
+ /**
184
+ * How much comes off, for a discount bon. Its `type` says which shape this is.
185
+ */
186
+ discount: ({
187
+ type: 'percentage';
188
+ } & VoucherPercentageDiscountData) | ({
189
+ type: 'fixed';
190
+ } & VoucherFixedDiscountData);
191
+ valid_until: string | null;
192
+ consumed_at: string;
193
+ campaign_id: number;
194
+ kind: string;
195
+ /**
196
+ * What to hand over, for a free-product bon.
197
+ */
198
+ products: Array<VoucherGiftProductData> | null;
199
+ };
200
+ /**
201
+ * CategoryRevenueData
202
+ */
203
+ export type CategoryRevenueData = {
204
+ category: string;
205
+ units?: number;
206
+ revenue?: number;
207
+ isOther?: boolean;
208
+ };
209
+ /**
210
+ * CommerceStatisticsData
211
+ */
212
+ export type CommerceStatisticsData = {
213
+ orders: number;
214
+ revenue_cents: number;
215
+ average_order_value_cents: number;
216
+ itemized: ItemizedStatisticsData;
217
+ volume_trend?: Array<VolumeBucketData>;
218
+ };
219
+ /**
220
+ * CreateCustomerData
221
+ */
222
+ export type CreateCustomerData = {
223
+ first_name?: string | null;
224
+ last_name?: string | null;
225
+ email?: string | null;
226
+ phone?: string | null;
227
+ external_id?: string | null;
228
+ date_of_birth?: string | null;
229
+ customer_since?: string | null;
230
+ locale?: 'nl' | 'en' | null;
231
+ marketing_consent?: boolean | null;
232
+ marketing_consent_statement_version?: string | null;
233
+ identifiers?: Array<CreateIdentifierData>;
234
+ };
235
+ /**
236
+ * CreateIdentifierData
237
+ */
238
+ export type CreateIdentifierData = {
239
+ type: 'email' | 'loyalty_card';
240
+ value: string;
241
+ is_primary?: boolean;
242
+ };
243
+ /**
244
+ * CreateProductData
245
+ */
246
+ export type CreateProductData = {
247
+ external_id: string;
248
+ name: string;
249
+ description?: string | null;
250
+ price_cents?: number | null;
251
+ image_url?: string | null;
252
+ category?: string | null;
253
+ stock?: number | null;
254
+ status?: 'active' | 'inactive' | 'archived';
255
+ metadata?: {
256
+ [key: string]: unknown;
257
+ } | null;
258
+ };
259
+ /**
260
+ * CreateRedemptionData
261
+ */
262
+ export type CreateRedemptionData = {
263
+ identifier: string;
264
+ reward_id: number;
265
+ idempotency_key: string;
266
+ branch?: string | null;
267
+ };
268
+ /**
269
+ * CreateRewardFromProductData
270
+ */
271
+ export type CreateRewardFromProductData = {
272
+ point_cost: number;
273
+ name?: string | null;
274
+ description?: string | null;
275
+ total_stock?: number | null;
276
+ status?: 'active' | 'inactive';
277
+ available_from?: string | null;
278
+ available_until?: string | null;
279
+ code_valid_for_hours?: number | null;
280
+ payment_amount?: number | null;
281
+ idempotency_key?: string | null;
282
+ max_redemptions_per_customer?: number | null;
283
+ };
284
+ /**
285
+ * CreateTransactionData
286
+ */
287
+ export type CreateTransactionData = {
288
+ identifier: string;
289
+ idempotency_key: string;
290
+ total_amount: number;
291
+ description?: string | null;
292
+ external_reference?: string | null;
293
+ branch?: string | null;
294
+ /**
295
+ * Optional order line items.
296
+ */
297
+ items?: Array<CreateTransactionItemData>;
298
+ };
299
+ /**
300
+ * CreateTransactionItemData
301
+ */
302
+ export type CreateTransactionItemData = {
303
+ name: string;
304
+ quantity: number;
305
+ unit_price: number;
306
+ sku?: string | null;
307
+ category?: string | null;
308
+ };
309
+ /**
310
+ * CustomerData
311
+ */
312
+ export type CustomerData = {
313
+ id: number;
314
+ first_name: string | null;
315
+ last_name: string | null;
316
+ email: string | null;
317
+ phone: string | null;
318
+ external_id: string | null;
319
+ date_of_birth: string | null;
320
+ customer_since: string | null;
321
+ locale: string | null;
322
+ status: CustomerStatusData;
323
+ identifiers: Array<CustomerIdentifierData>;
324
+ marketingConsent: boolean;
325
+ marketingConsentGrantedAt: string | null;
326
+ marketingConsentGrantedSource: string | null;
327
+ marketingConsentWithdrawnAt: string | null;
328
+ marketingConsentWithdrawnSource: string | null;
329
+ marketingConsentStatementVersion: string | null;
330
+ marketingConsentRecordedBy: string | null;
331
+ marketingConsentRecordedByClientId: string | null;
332
+ loyalty_card_code: string | null;
333
+ deactivated_at: string | null;
334
+ anonymized_at: string | null;
335
+ created_at: string | null;
336
+ updated_at: string | null;
337
+ };
338
+ /**
339
+ * CustomerDetailData
340
+ */
341
+ export type CustomerDetailData = {
342
+ id: number;
343
+ first_name: string | null;
344
+ last_name: string | null;
345
+ email: string | null;
346
+ phone: string | null;
347
+ external_id: string | null;
348
+ date_of_birth: string | null;
349
+ customer_since: string | null;
350
+ locale: string | null;
351
+ status: CustomerStatusData;
352
+ identifiers: Array<CustomerIdentifierData>;
353
+ marketingConsent: boolean;
354
+ marketingConsentGrantedAt: string | null;
355
+ marketingConsentGrantedSource: string | null;
356
+ marketingConsentWithdrawnAt: string | null;
357
+ marketingConsentWithdrawnSource: string | null;
358
+ marketingConsentStatementVersion: string | null;
359
+ marketingConsentRecordedBy: string | null;
360
+ marketingConsentRecordedByClientId: string | null;
361
+ loyalty_card_code: string | null;
362
+ deactivated_at: string | null;
363
+ anonymized_at: string | null;
364
+ created_at: string | null;
365
+ updated_at: string | null;
366
+ /**
367
+ * `true` for a deactivated customer; the key is absent for any other customer.
368
+ */
369
+ is_deactivated?: boolean;
370
+ };
371
+ /**
372
+ * CustomerIdentifierData
373
+ */
374
+ export type CustomerIdentifierData = {
375
+ id: number;
376
+ type: string;
377
+ value: string;
378
+ is_active: boolean;
379
+ is_primary: boolean;
380
+ created_at: string | null;
381
+ };
382
+ /**
383
+ * CustomerLookupData
384
+ */
385
+ export type CustomerLookupData = {
386
+ id: number;
387
+ first_name: string | null;
388
+ last_name: string | null;
389
+ email: string | null;
390
+ phone: string | null;
391
+ external_id: string | null;
392
+ date_of_birth: string | null;
393
+ customer_since: string | null;
394
+ locale: string | null;
395
+ status: CustomerStatusData;
396
+ identifiers: Array<CustomerIdentifierData>;
397
+ marketingConsent: boolean;
398
+ marketingConsentGrantedAt: string | null;
399
+ marketingConsentGrantedSource: string | null;
400
+ marketingConsentWithdrawnAt: string | null;
401
+ marketingConsentWithdrawnSource: string | null;
402
+ marketingConsentStatementVersion: string | null;
403
+ marketingConsentRecordedBy: string | null;
404
+ marketingConsentRecordedByClientId: string | null;
405
+ loyalty_card_code: string | null;
406
+ deactivated_at: string | null;
407
+ anonymized_at: string | null;
408
+ created_at: string | null;
409
+ updated_at: string | null;
410
+ /**
411
+ * The points balance of the customer's wallet, `0` when the customer has no wallet.
412
+ */
413
+ wallet_balance: number;
414
+ /**
415
+ * `true` for a deactivated customer; the key is absent for any other customer.
416
+ */
417
+ is_deactivated?: boolean;
418
+ };
419
+ /**
420
+ * CustomerStatusData
421
+ */
422
+ export type CustomerStatusData = {
423
+ value: string;
424
+ label: string;
425
+ };
426
+ /**
427
+ * CustomerVoucherData
428
+ */
429
+ export type CustomerVoucherData = {
430
+ voucher_code: string;
431
+ campaign_id: number;
432
+ kind: string;
433
+ /**
434
+ * How much comes off, for a discount bon. Its `type` says which shape this is.
435
+ */
436
+ discount: ({
437
+ type: 'percentage';
438
+ } & VoucherPercentageDiscountData) | ({
439
+ type: 'fixed';
440
+ } & VoucherFixedDiscountData);
441
+ /**
442
+ * What to hand over, for a free-product bon.
443
+ */
444
+ products: Array<VoucherGiftProductData> | null;
445
+ /**
446
+ * The last day the bon can be spent, or null when it does not run out.
447
+ */
448
+ valid_until: string | null;
449
+ /**
450
+ * The branches that take the bon; null means every branch.
451
+ */
452
+ branches: Array<BranchReferenceData> | null;
453
+ };
454
+ /**
455
+ * DateRangeRecurrenceData
456
+ */
457
+ export type DateRangeRecurrenceData = {
458
+ /**
459
+ * The first day it runs, as `MM-DD`.
460
+ */
461
+ active_from: string;
462
+ /**
463
+ * The last day it runs, as `MM-DD`. Earlier than `active_from` wraps over new year.
464
+ */
465
+ active_until: string;
466
+ /**
467
+ * Which shape this is.
468
+ */
469
+ type: 'date_range';
470
+ };
471
+ /**
472
+ * DaysOfWeekRecurrenceData
473
+ */
474
+ export type DaysOfWeekRecurrenceData = {
475
+ /**
476
+ * The days it runs, 0 for Sunday through 6 for Saturday.
477
+ */
478
+ days: Array<number>;
479
+ /**
480
+ * Which shape this is.
481
+ */
482
+ type: 'days_of_week';
483
+ };
484
+ /**
485
+ * DiscountGiftData
486
+ */
487
+ export type DiscountGiftData = {
488
+ /**
489
+ * Always `discount` for this shape.
490
+ */
491
+ type: 'discount';
492
+ /**
493
+ * How much comes off. Its `type` says which shape this is.
494
+ */
495
+ discount: ({
496
+ type: 'percentage';
497
+ } & PercentageDiscountData) | ({
498
+ type: 'fixed';
499
+ } & FixedDiscountData);
500
+ /**
501
+ * How many days the customer has to use it.
502
+ */
503
+ validity_days?: number | null;
504
+ /**
505
+ * A line the customer reads with the gift.
506
+ */
507
+ message?: string | null;
508
+ };
509
+ /**
510
+ * DiscountRedemptionData
511
+ */
512
+ export type DiscountRedemptionData = {
513
+ /**
514
+ * How much comes off: a percentage, or an amount in cents.
515
+ */
516
+ discount_value: number;
517
+ /**
518
+ * Which of the two `discount_value` is.
519
+ */
520
+ discount_type: 'fixed_amount' | 'percentage';
521
+ /**
522
+ * The item number of the one product the discount is for; null when it counts on the whole purchase.
523
+ */
524
+ product_reference: string | null;
525
+ /**
526
+ * Which shape this is.
527
+ */
528
+ type: 'discount';
529
+ };
530
+ /**
531
+ * EarnResultData
532
+ */
533
+ export type EarnResultData = {
534
+ rule_id: number;
535
+ rule_name: string;
536
+ rule_type: string;
537
+ points_earned: number;
538
+ family?: string | null;
539
+ moment?: string | null;
540
+ campaign_version?: number | null;
541
+ suppressed_by?: number | null;
542
+ reason?: string | null;
543
+ line_breakdown?: Array<{
544
+ sku: string;
545
+ quantity: number;
546
+ points: number;
547
+ }> | null;
548
+ };
549
+ /**
550
+ * ErrorResponse
551
+ */
552
+ export type ErrorResponse = {
553
+ error: {
554
+ /**
555
+ * The machine-readable code to branch on.
556
+ */
557
+ code: string;
558
+ /**
559
+ * What went wrong, in words.
560
+ */
561
+ message: string;
562
+ /**
563
+ * The HTTP status, repeated in the body.
564
+ */
565
+ status: number;
566
+ /**
567
+ * Identifies this request in our logs. Quote it when you report a problem.
568
+ */
569
+ request_id: string;
570
+ /**
571
+ * Extra context for this failure. A validation error puts each rejected field and its messages here.
572
+ */
573
+ details?: {
574
+ [key: string]: unknown;
575
+ };
576
+ };
577
+ };
578
+ /**
579
+ * FixedDiscountData
580
+ */
581
+ export type FixedDiscountData = {
582
+ /**
583
+ * Deprecated: read `type`, which carries the same value. Always `fixed` for this shape.
584
+ *
585
+ * @deprecated
586
+ */
587
+ kind: 'fixed';
588
+ /**
589
+ * How much to take off, in cents.
590
+ */
591
+ amount_cents: number;
592
+ /**
593
+ * The one product the discount is for; leave it out for the whole purchase.
594
+ */
595
+ product_id?: number | null;
596
+ /**
597
+ * Which shape this is.
598
+ */
599
+ type: 'fixed';
600
+ };
601
+ /**
602
+ * FreeProductGiftData
603
+ */
604
+ export type FreeProductGiftData = {
605
+ /**
606
+ * Always `free_product` for this shape.
607
+ */
608
+ type: 'free_product';
609
+ /**
610
+ * The products the customer gets.
611
+ */
612
+ products: Array<GiftProductData>;
613
+ /**
614
+ * A line the customer reads with the gift.
615
+ */
616
+ message?: string | null;
617
+ };
618
+ /**
619
+ * FreeProductRedemptionData
620
+ */
621
+ export type FreeProductRedemptionData = {
622
+ /**
623
+ * Your own identifier for the product to hand over.
624
+ */
625
+ product_reference: string | null;
626
+ /**
627
+ * What the till collects on top of the points, in cents; `0` when the points cover it.
628
+ */
629
+ payment_amount: number;
630
+ /**
631
+ * Which shape this is.
632
+ */
633
+ type: 'free_product';
634
+ };
635
+ /**
636
+ * GiftProductData
637
+ */
638
+ export type GiftProductData = {
639
+ /**
640
+ * The product this refers to, or null when the product has since been removed.
641
+ */
642
+ id: number | null;
643
+ /**
644
+ * The product name as it was when the gift was issued.
645
+ */
646
+ name: string;
647
+ /**
648
+ * How many of this product the customer gets.
649
+ */
650
+ quantity: number;
651
+ };
652
+ /**
653
+ * GoogleWalletPassData
654
+ */
655
+ export type GoogleWalletPassData = {
656
+ save_url: string;
657
+ };
658
+ /**
659
+ * ItemizedStatisticsData
660
+ */
661
+ export type ItemizedStatisticsData = {
662
+ orders?: number;
663
+ revenue_cents?: number;
664
+ average_items_per_order?: number;
665
+ other_no_item_detail_cents?: number;
666
+ top_products?: Array<TopProductData>;
667
+ categories?: Array<CategoryRevenueData>;
668
+ };
669
+ /**
670
+ * LedgerEntryData
671
+ */
672
+ export type LedgerEntryData = {
673
+ id: number;
674
+ wallet_id: number;
675
+ type: string;
676
+ amount: number;
677
+ running_balance: number;
678
+ reason: string | null;
679
+ causer_type: string | null;
680
+ causer_id: string | null;
681
+ created_at: string;
682
+ };
683
+ /**
684
+ * LinkExternalIdData
685
+ */
686
+ export type LinkExternalIdData = {
687
+ identifier: string;
688
+ external_id: string;
689
+ };
690
+ /**
691
+ * LoyaltyStatisticsData
692
+ */
693
+ export type LoyaltyStatisticsData = {
694
+ points_issued?: number;
695
+ /**
696
+ * Points spent on rewards in the period, including points customers brought along from another loyalty system.
697
+ */
698
+ points_redeemed?: number;
699
+ /**
700
+ * Points that expired in the period, including points customers brought along from another loyalty system.
701
+ */
702
+ points_expired?: number;
703
+ net_adjustments?: number;
704
+ /**
705
+ * points_redeemed divided by points_issued, 3 decimals. Counts imported points when they are spent but not when they arrive, so it can pass 1.0 after an import. Use redemption_rate_excluding_import.
706
+ */
707
+ redemption_rate?: number | null;
708
+ /**
709
+ * points_expired divided by points_issued, 4 decimals. Counts imported points when they expire but not when they arrive, so it can pass 1.0 after an import. Use breakage_rate_excluding_import.
710
+ */
711
+ breakage_rate?: number | null;
712
+ /**
713
+ * The part of points_redeemed that came from points customers brought along from another loyalty system.
714
+ */
715
+ points_redeemed_from_import?: number;
716
+ /**
717
+ * The part of points_expired that came from points customers brought along from another loyalty system.
718
+ */
719
+ points_expired_from_import?: number;
720
+ /**
721
+ * Points redeemed minus points_redeemed_from_import, divided by points_issued, 3 decimals; null when nothing was issued. The rate the dashboard shows.
722
+ */
723
+ redemption_rate_excluding_import?: number | null;
724
+ /**
725
+ * Points expired minus points_expired_from_import, divided by points_issued, 4 decimals; null when nothing was issued. The rate the dashboard shows.
726
+ */
727
+ breakage_rate_excluding_import?: number | null;
728
+ };
729
+ /**
730
+ * MomentCampaignConfigData
731
+ */
732
+ export type MomentCampaignConfigData = {
733
+ /**
734
+ * What the customer gets. Its `type` says which shape this is.
735
+ */
736
+ gift: ({
737
+ type: 'points';
738
+ } & PointsGiftData) | ({
739
+ type: 'free_product';
740
+ } & FreeProductGiftData) | ({
741
+ type: 'discount';
742
+ } & DiscountGiftData);
743
+ /**
744
+ * The branches this campaign runs in. Absent or empty means all of them.
745
+ */
746
+ branch_ids?: Array<number>;
747
+ /**
748
+ * Which shape this is.
749
+ */
750
+ type: 'moment';
751
+ };
752
+ /**
753
+ * NthPurchaseCampaignConfigData
754
+ */
755
+ export type NthPurchaseCampaignConfigData = {
756
+ /**
757
+ * Which purchase triggers the gift. 3 means every third one.
758
+ */
759
+ every_n: number;
760
+ /**
761
+ * What the customer gets. Its `type` says which shape this is.
762
+ */
763
+ gift: ({
764
+ type: 'points';
765
+ } & PointsGiftData) | ({
766
+ type: 'free_product';
767
+ } & FreeProductGiftData) | ({
768
+ type: 'discount';
769
+ } & DiscountGiftData);
770
+ /**
771
+ * The smallest purchase that counts, in cents.
772
+ */
773
+ min_amount?: number | null;
774
+ /**
775
+ * The branches this campaign runs in. Absent or empty means all of them.
776
+ */
777
+ branch_ids?: Array<number>;
778
+ /**
779
+ * Which shape this is.
780
+ */
781
+ type: 'nth_purchase';
782
+ };
783
+ /**
784
+ * PaginationLinks
785
+ */
786
+ export type PaginationLinks = {
787
+ first: string | null;
788
+ last: string | null;
789
+ prev: string | null;
790
+ next: string | null;
791
+ };
792
+ /**
793
+ * PaginationMeta
794
+ */
795
+ export type PaginationMeta = {
796
+ current_page: number;
797
+ last_page: number;
798
+ per_page: number;
799
+ total: number;
800
+ };
801
+ /**
802
+ * PercentageDiscountData
803
+ */
804
+ export type PercentageDiscountData = {
805
+ /**
806
+ * Deprecated: read `type`, which carries the same value. Always `percentage` for this shape.
807
+ *
808
+ * @deprecated
809
+ */
810
+ kind: 'percentage';
811
+ /**
812
+ * How many percent to take off, 1 to 100.
813
+ */
814
+ percentage: number;
815
+ /**
816
+ * The one product the discount is for; leave it out for the whole purchase.
817
+ */
818
+ product_id?: number | null;
819
+ /**
820
+ * Which shape this is.
821
+ */
822
+ type: 'percentage';
823
+ };
824
+ /**
825
+ * PointsGiftData
826
+ */
827
+ export type PointsGiftData = {
828
+ /**
829
+ * Always `points` for this shape.
830
+ */
831
+ type: 'points';
832
+ /**
833
+ * How many points the customer gets.
834
+ */
835
+ points: number;
836
+ /**
837
+ * A line the customer reads with the gift.
838
+ */
839
+ message?: string | null;
840
+ };
841
+ /**
842
+ * ProductData
843
+ */
844
+ export type ProductData = {
845
+ id: number;
846
+ external_id: string;
847
+ name: string;
848
+ description: string | null;
849
+ price_cents: number | null;
850
+ image_url: string | null;
851
+ category: string | null;
852
+ stock: number | null;
853
+ status: string;
854
+ metadata: {
855
+ [key: string]: unknown;
856
+ } | null;
857
+ created_at: string | null;
858
+ updated_at: string | null;
859
+ };
860
+ /**
861
+ * RedemptionCreatedData
862
+ */
863
+ export type RedemptionCreatedData = {
864
+ redemption_id: number;
865
+ confirmation_code: string;
866
+ reward: RedemptionRewardData;
867
+ points_deducted: number;
868
+ remaining_balance: number;
869
+ redeemed_at: string;
870
+ expires_at: string | null;
871
+ /**
872
+ * What the counter needs, shaped by the reward's type. Its `type` says which shape this is.
873
+ */
874
+ type_specific_data: ({
875
+ type: 'discount';
876
+ } & DiscountRedemptionData) | ({
877
+ type: 'free_product';
878
+ } & FreeProductRedemptionData);
879
+ };
880
+ /**
881
+ * RedemptionCustomerData
882
+ */
883
+ export type RedemptionCustomerData = {
884
+ name: string;
885
+ };
886
+ /**
887
+ * RedemptionLookupData
888
+ */
889
+ export type RedemptionLookupData = {
890
+ redemption_id: number;
891
+ confirmation_code: string;
892
+ status: string;
893
+ reward: RedemptionRewardData;
894
+ customer: RedemptionCustomerData;
895
+ points_deducted: number;
896
+ redeemed_at: string;
897
+ verified_at: string | null;
898
+ expires_at: string | null;
899
+ /**
900
+ * What the counter needs, shaped by the reward's type. Its `type` says which shape this is.
901
+ */
902
+ type_specific_data: ({
903
+ type: 'discount';
904
+ } & DiscountRedemptionData) | ({
905
+ type: 'free_product';
906
+ } & FreeProductRedemptionData);
907
+ };
908
+ /**
909
+ * RedemptionRewardData
910
+ */
911
+ export type RedemptionRewardData = {
912
+ name: string;
913
+ type: string;
914
+ };
915
+ /**
916
+ * RedemptionVerificationData
917
+ */
918
+ export type RedemptionVerificationData = {
919
+ redemption_id: number;
920
+ confirmation_code: string;
921
+ status: string;
922
+ reward: RedemptionRewardData;
923
+ points_deducted: number;
924
+ verified_at: string;
925
+ /**
926
+ * What the counter needs, shaped by the reward's type. Its `type` says which shape this is.
927
+ */
928
+ type_specific_data: ({
929
+ type: 'discount';
930
+ } & DiscountRedemptionData) | ({
931
+ type: 'free_product';
932
+ } & FreeProductRedemptionData);
933
+ };
934
+ /**
935
+ * RewardCatalogItemData
936
+ */
937
+ export type RewardCatalogItemData = {
938
+ id: number;
939
+ name: string;
940
+ description: string | null;
941
+ type: string;
942
+ point_cost: number;
943
+ payment_amount: number;
944
+ image_url: string | null;
945
+ remaining_stock: number | null;
946
+ total_stock: number | null;
947
+ available_from: string | null;
948
+ available_until: string | null;
949
+ /**
950
+ * null means every branch
951
+ */
952
+ branches: Array<BranchReferenceData> | null;
953
+ /**
954
+ * The item number the reward is for. Read type first: null is the whole purchase for a discount, no item number for a free product.
955
+ */
956
+ product_reference: string | null;
957
+ /**
958
+ * True when the reward has no stock limit; remaining_stock is then 0.
959
+ */
960
+ is_unlimited: boolean;
961
+ /**
962
+ * `percentage` or `fixed_amount` for a discount, null for a free product.
963
+ */
964
+ discount_type: 'fixed_amount' | 'percentage' | null;
965
+ /**
966
+ * A percentage as a whole number (10 is 10%), a fixed amount in cents; null for a free product.
967
+ */
968
+ discount_value: number | null;
969
+ /**
970
+ * How many times one customer can redeem this reward; null means no limit.
971
+ */
972
+ max_redemptions_per_customer: number | null;
973
+ /**
974
+ * How many times the customer named by identifier redeemed this reward, cancelled ones left out; null when no identifier was sent or it matched nobody.
975
+ */
976
+ customer_redemptions: number | null;
977
+ };
978
+ /**
979
+ * RewardData
980
+ */
981
+ export type RewardData = {
982
+ id: number;
983
+ product_id: number | null;
984
+ name: string;
985
+ description: string | null;
986
+ type: string;
987
+ point_cost: number;
988
+ image_url: string | null;
989
+ total_stock: number | null;
990
+ remaining_stock: number;
991
+ status: RewardStatusData;
992
+ available_from: string | null;
993
+ available_until: string | null;
994
+ discount_value: number | null;
995
+ discount_type: string | null;
996
+ product_reference: string | null;
997
+ payment_amount: number;
998
+ code_valid_for_hours: number | null;
999
+ created_at: string | null;
1000
+ updated_at: string | null;
1001
+ /**
1002
+ * True when the reward has no stock limit; remaining_stock is then 0.
1003
+ */
1004
+ is_unlimited: boolean;
1005
+ max_redemptions_per_customer: number | null;
1006
+ };
1007
+ /**
1008
+ * RewardStatusData
1009
+ */
1010
+ export type RewardStatusData = {
1011
+ value: string;
1012
+ label: string;
1013
+ };
1014
+ /**
1015
+ * SendLoyaltyCardRequestData
1016
+ */
1017
+ export type SendLoyaltyCardRequestData = {
1018
+ channel?: 'email' | null;
1019
+ };
1020
+ /**
1021
+ * SendLoyaltyCardResultData
1022
+ */
1023
+ export type SendLoyaltyCardResultData = {
1024
+ customer_id: number;
1025
+ channel: string;
1026
+ queued: boolean;
1027
+ };
1028
+ /**
1029
+ * SpecificDatesRecurrenceData
1030
+ */
1031
+ export type SpecificDatesRecurrenceData = {
1032
+ /**
1033
+ * The days it runs, each as `YYYY-MM-DD`.
1034
+ */
1035
+ dates: Array<string>;
1036
+ /**
1037
+ * Which shape this is.
1038
+ */
1039
+ type: 'specific_dates';
1040
+ };
1041
+ /**
1042
+ * StatisticsApiData
1043
+ */
1044
+ export type StatisticsApiData = {
1045
+ period: StatisticsPeriodData;
1046
+ commerce: CommerceStatisticsData;
1047
+ loyalty: LoyaltyStatisticsData | null;
1048
+ };
1049
+ /**
1050
+ * StatisticsPeriodData
1051
+ */
1052
+ export type StatisticsPeriodData = {
1053
+ preset: string;
1054
+ from: string;
1055
+ to: string;
1056
+ timezone: string;
1057
+ granularity: string;
1058
+ };
1059
+ /**
1060
+ * TopProductData
1061
+ */
1062
+ export type TopProductData = {
1063
+ name: string;
1064
+ units: number;
1065
+ revenue: number;
1066
+ };
1067
+ /**
1068
+ * TransactionCampaignConfigData
1069
+ */
1070
+ export type TransactionCampaignConfigData = {
1071
+ /**
1072
+ * Multiply the points earned, or add a fixed number. Absent reads as `multiplier`.
1073
+ */
1074
+ reward_type?: 'multiplier' | 'fixed_points';
1075
+ /**
1076
+ * `whole` and `whole_purchase` both mean the whole purchase. Absent reads as `whole`.
1077
+ */
1078
+ scope?: 'whole' | 'whole_purchase' | 'products';
1079
+ /**
1080
+ * Whether it pays out beside another campaign. Older rows carry `combineerbaar`.
1081
+ */
1082
+ stackable?: boolean;
1083
+ /**
1084
+ * The points added, when `reward_type` is `fixed_points`.
1085
+ */
1086
+ points?: number | null;
1087
+ /**
1088
+ * The most this campaign pays out on one purchase.
1089
+ */
1090
+ max_points_per_purchase?: number | null;
1091
+ /**
1092
+ * The products the campaign is limited to, when `scope` is `products`.
1093
+ */
1094
+ products?: Array<CampaignProductRuleData> | null;
1095
+ /**
1096
+ * The branches this campaign runs in. Absent or empty means all of them.
1097
+ */
1098
+ branch_ids?: Array<number>;
1099
+ /**
1100
+ * Which shape this is.
1101
+ */
1102
+ type: 'transaction';
1103
+ };
1104
+ /**
1105
+ * TransactionData
1106
+ */
1107
+ export type TransactionData = {
1108
+ id: number;
1109
+ customer_id: number;
1110
+ idempotency_key: string;
1111
+ total_amount: number;
1112
+ description: string | null;
1113
+ external_reference: string | null;
1114
+ branch: BranchReferenceData | null;
1115
+ created_at: string;
1116
+ points_earned: number;
1117
+ rules_applied: Array<EarnResultData>;
1118
+ items: Array<TransactionItemData>;
1119
+ };
1120
+ /**
1121
+ * TransactionItemData
1122
+ */
1123
+ export type TransactionItemData = {
1124
+ id: number;
1125
+ name: string;
1126
+ sku: string | null;
1127
+ quantity: number;
1128
+ unit_price: number;
1129
+ line_total: number;
1130
+ category: string | null;
1131
+ };
1132
+ /**
1133
+ * UpdateCustomerData
1134
+ */
1135
+ export type UpdateCustomerData = {
1136
+ first_name?: string | null;
1137
+ last_name?: string | null;
1138
+ email?: string | null;
1139
+ phone?: string | null;
1140
+ date_of_birth?: string | null;
1141
+ customer_since?: string | null;
1142
+ locale?: 'nl' | 'en' | null;
1143
+ marketing_consent?: boolean | null;
1144
+ marketing_consent_statement_version?: string | null;
1145
+ };
1146
+ /**
1147
+ * UpdateProductData
1148
+ */
1149
+ export type UpdateProductData = {
1150
+ name?: string;
1151
+ description?: string | null;
1152
+ price_cents?: number | null;
1153
+ image_url?: string | null;
1154
+ category?: string | null;
1155
+ stock?: number | null;
1156
+ status?: 'active' | 'inactive' | 'archived';
1157
+ metadata?: {
1158
+ [key: string]: unknown;
1159
+ } | null;
1160
+ };
1161
+ /**
1162
+ * UpsertProductData
1163
+ */
1164
+ export type UpsertProductData = {
1165
+ name: string;
1166
+ description?: string | null;
1167
+ price_cents?: number | null;
1168
+ image_url?: string | null;
1169
+ category?: string | null;
1170
+ stock?: number | null;
1171
+ status?: 'active' | 'inactive' | 'archived';
1172
+ metadata?: {
1173
+ [key: string]: unknown;
1174
+ } | null;
1175
+ };
1176
+ /**
1177
+ * VendorBrandingData
1178
+ */
1179
+ export type VendorBrandingData = {
1180
+ display_name: string;
1181
+ logo_url: string | null;
1182
+ brand_color_primary: string | null;
1183
+ brand_color_accent: string | null;
1184
+ };
1185
+ /**
1186
+ * VerifyCampaignVoucherData
1187
+ */
1188
+ export type VerifyCampaignVoucherData = {
1189
+ branch?: string | null;
1190
+ idempotency_key?: string | null;
1191
+ };
1192
+ /**
1193
+ * VolumeBucketData
1194
+ */
1195
+ export type VolumeBucketData = {
1196
+ label: string;
1197
+ orders: number;
1198
+ revenue: number;
1199
+ };
1200
+ /**
1201
+ * VoucherFixedDiscountData
1202
+ */
1203
+ export type VoucherFixedDiscountData = {
1204
+ /**
1205
+ * Deprecated: read `type`, which carries the same value. Always `fixed` for this shape.
1206
+ *
1207
+ * @deprecated
1208
+ */
1209
+ kind: 'fixed';
1210
+ /**
1211
+ * How much to take off, in cents.
1212
+ */
1213
+ amount_cents: number;
1214
+ /**
1215
+ * The item number of the one product the discount is for; null for the whole purchase.
1216
+ */
1217
+ product_reference: string | null;
1218
+ /**
1219
+ * Which shape this is.
1220
+ */
1221
+ type: 'fixed';
1222
+ };
1223
+ /**
1224
+ * VoucherGiftProductData
1225
+ */
1226
+ export type VoucherGiftProductData = {
1227
+ /**
1228
+ * The product this refers to, or null when the gift named no catalogue product.
1229
+ */
1230
+ id: number | null;
1231
+ /**
1232
+ * The product name as it was when the bon was issued.
1233
+ */
1234
+ name: string;
1235
+ /**
1236
+ * How many of this product the customer gets.
1237
+ */
1238
+ quantity: number;
1239
+ /**
1240
+ * The item number when the bon was issued, or null when it had none.
1241
+ */
1242
+ product_reference: string | null;
1243
+ };
1244
+ /**
1245
+ * VoucherPercentageDiscountData
1246
+ */
1247
+ export type VoucherPercentageDiscountData = {
1248
+ /**
1249
+ * Deprecated: read `type`, which carries the same value. Always `percentage` for this shape.
1250
+ *
1251
+ * @deprecated
1252
+ */
1253
+ kind: 'percentage';
1254
+ /**
1255
+ * How many percent to take off, 1 to 100.
1256
+ */
1257
+ percentage: number;
1258
+ /**
1259
+ * The item number of the one product the discount is for; null for the whole purchase.
1260
+ */
1261
+ product_reference: string | null;
1262
+ /**
1263
+ * Which shape this is.
1264
+ */
1265
+ type: 'percentage';
1266
+ };
1267
+ /**
1268
+ * WalletData
1269
+ */
1270
+ export type WalletData = {
1271
+ id: number;
1272
+ customer_id: number;
1273
+ balance: number;
1274
+ expiring_soon: number;
1275
+ created_at: string | null;
1276
+ updated_at: string | null;
1277
+ };
1278
+ /**
1279
+ * WinBackCampaignConfigData
1280
+ */
1281
+ export type WinBackCampaignConfigData = {
1282
+ /**
1283
+ * How many months without a purchase before the gift is sent.
1284
+ */
1285
+ months: number;
1286
+ /**
1287
+ * What the customer gets. Its `type` says which shape this is.
1288
+ */
1289
+ gift: ({
1290
+ type: 'points';
1291
+ } & PointsGiftData) | ({
1292
+ type: 'free_product';
1293
+ } & FreeProductGiftData) | ({
1294
+ type: 'discount';
1295
+ } & DiscountGiftData);
1296
+ /**
1297
+ * The branches this campaign runs in. Absent or empty means all of them.
1298
+ */
1299
+ branch_ids?: Array<number>;
1300
+ /**
1301
+ * Which shape this is.
1302
+ */
1303
+ type: 'win_back';
1304
+ };
1305
+ export type LookupCustomerData = {
1306
+ body?: never;
1307
+ path?: never;
1308
+ query?: {
1309
+ identifier?: string;
1310
+ external_id?: string;
1311
+ };
1312
+ url: '/customers/lookup';
1313
+ };
1314
+ export type LookupCustomerErrors = {
1315
+ /**
1316
+ * The credential is missing, malformed, or not accepted.
1317
+ */
1318
+ 401: ErrorResponse;
1319
+ /**
1320
+ * The credential is valid, but this vendor may not do this right now.
1321
+ */
1322
+ 403: ErrorResponse;
1323
+ /**
1324
+ * The route, or the record it names, does not exist.
1325
+ */
1326
+ 404: ErrorResponse;
1327
+ /**
1328
+ * The request was understood, and the API refuses to act on it.
1329
+ */
1330
+ 422: ErrorResponse;
1331
+ /**
1332
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1333
+ */
1334
+ 429: ErrorResponse;
1335
+ /**
1336
+ * Something went wrong on our side. Quote the request_id when you report it.
1337
+ */
1338
+ 500: ErrorResponse;
1339
+ };
1340
+ export type LookupCustomerError = LookupCustomerErrors[keyof LookupCustomerErrors];
1341
+ export type LookupCustomerResponses = {
1342
+ 200: {
1343
+ data: CustomerLookupData;
1344
+ };
1345
+ };
1346
+ export type LookupCustomerResponse = LookupCustomerResponses[keyof LookupCustomerResponses];
1347
+ export type RegisterCustomerData = {
1348
+ body: CreateCustomerData;
1349
+ path?: never;
1350
+ query?: never;
1351
+ url: '/customers';
1352
+ };
1353
+ export type RegisterCustomerErrors = {
1354
+ /**
1355
+ * The request is missing something the API needs before it can act.
1356
+ */
1357
+ 400: ErrorResponse;
1358
+ /**
1359
+ * The credential is missing, malformed, or not accepted.
1360
+ */
1361
+ 401: ErrorResponse;
1362
+ /**
1363
+ * The credential is valid, but this vendor may not do this right now.
1364
+ */
1365
+ 403: ErrorResponse;
1366
+ /**
1367
+ * The request conflicts with something that already exists.
1368
+ */
1369
+ 409: ErrorResponse;
1370
+ /**
1371
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1372
+ */
1373
+ 415: ErrorResponse;
1374
+ /**
1375
+ * The request was understood, and the API refuses to act on it.
1376
+ */
1377
+ 422: ErrorResponse;
1378
+ /**
1379
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1380
+ */
1381
+ 429: ErrorResponse;
1382
+ /**
1383
+ * Something went wrong on our side. Quote the request_id when you report it.
1384
+ */
1385
+ 500: ErrorResponse;
1386
+ };
1387
+ export type RegisterCustomerError = RegisterCustomerErrors[keyof RegisterCustomerErrors];
1388
+ export type RegisterCustomerResponses = {
1389
+ 201: {
1390
+ data: CustomerData;
1391
+ };
1392
+ };
1393
+ export type RegisterCustomerResponse = RegisterCustomerResponses[keyof RegisterCustomerResponses];
1394
+ export type UpdateCustomerByExternalIdData = {
1395
+ body: UpdateCustomerData;
1396
+ path: {
1397
+ externalId: string | null;
1398
+ };
1399
+ query?: never;
1400
+ url: '/customers/by-external-id/{externalId}';
1401
+ };
1402
+ export type UpdateCustomerByExternalIdErrors = {
1403
+ /**
1404
+ * The request is missing something the API needs before it can act.
1405
+ */
1406
+ 400: ErrorResponse;
1407
+ /**
1408
+ * The credential is missing, malformed, or not accepted.
1409
+ */
1410
+ 401: ErrorResponse;
1411
+ /**
1412
+ * The credential is valid, but this vendor may not do this right now.
1413
+ */
1414
+ 403: ErrorResponse;
1415
+ /**
1416
+ * The route, or the record it names, does not exist.
1417
+ */
1418
+ 404: ErrorResponse;
1419
+ /**
1420
+ * The request conflicts with something that already exists.
1421
+ */
1422
+ 409: ErrorResponse;
1423
+ /**
1424
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1425
+ */
1426
+ 415: ErrorResponse;
1427
+ /**
1428
+ * The request was understood, and the API refuses to act on it.
1429
+ */
1430
+ 422: ErrorResponse;
1431
+ /**
1432
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1433
+ */
1434
+ 429: ErrorResponse;
1435
+ /**
1436
+ * Something went wrong on our side. Quote the request_id when you report it.
1437
+ */
1438
+ 500: ErrorResponse;
1439
+ };
1440
+ export type UpdateCustomerByExternalIdError = UpdateCustomerByExternalIdErrors[keyof UpdateCustomerByExternalIdErrors];
1441
+ export type UpdateCustomerByExternalIdResponses = {
1442
+ 200: {
1443
+ data: CustomerData;
1444
+ };
1445
+ };
1446
+ export type UpdateCustomerByExternalIdResponse = UpdateCustomerByExternalIdResponses[keyof UpdateCustomerByExternalIdResponses];
1447
+ export type ReplaceCustomerByExternalIdData = {
1448
+ body: UpdateCustomerData;
1449
+ path: {
1450
+ externalId: string | null;
1451
+ };
1452
+ query?: never;
1453
+ url: '/customers/by-external-id/{externalId}';
1454
+ };
1455
+ export type ReplaceCustomerByExternalIdErrors = {
1456
+ /**
1457
+ * The request is missing something the API needs before it can act.
1458
+ */
1459
+ 400: ErrorResponse;
1460
+ /**
1461
+ * The credential is missing, malformed, or not accepted.
1462
+ */
1463
+ 401: ErrorResponse;
1464
+ /**
1465
+ * The credential is valid, but this vendor may not do this right now.
1466
+ */
1467
+ 403: ErrorResponse;
1468
+ /**
1469
+ * The route, or the record it names, does not exist.
1470
+ */
1471
+ 404: ErrorResponse;
1472
+ /**
1473
+ * The request conflicts with something that already exists.
1474
+ */
1475
+ 409: ErrorResponse;
1476
+ /**
1477
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1478
+ */
1479
+ 415: ErrorResponse;
1480
+ /**
1481
+ * The request was understood, and the API refuses to act on it.
1482
+ */
1483
+ 422: ErrorResponse;
1484
+ /**
1485
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1486
+ */
1487
+ 429: ErrorResponse;
1488
+ /**
1489
+ * Something went wrong on our side. Quote the request_id when you report it.
1490
+ */
1491
+ 500: ErrorResponse;
1492
+ };
1493
+ export type ReplaceCustomerByExternalIdError = ReplaceCustomerByExternalIdErrors[keyof ReplaceCustomerByExternalIdErrors];
1494
+ export type ReplaceCustomerByExternalIdResponses = {
1495
+ 200: {
1496
+ data: CustomerData;
1497
+ };
1498
+ };
1499
+ export type ReplaceCustomerByExternalIdResponse = ReplaceCustomerByExternalIdResponses[keyof ReplaceCustomerByExternalIdResponses];
1500
+ export type LinkCustomerExternalIdData = {
1501
+ body: LinkExternalIdData;
1502
+ path?: never;
1503
+ query?: never;
1504
+ url: '/customers/link-external-id';
1505
+ };
1506
+ export type LinkCustomerExternalIdErrors = {
1507
+ /**
1508
+ * The request is missing something the API needs before it can act.
1509
+ */
1510
+ 400: ErrorResponse;
1511
+ /**
1512
+ * The credential is missing, malformed, or not accepted.
1513
+ */
1514
+ 401: ErrorResponse;
1515
+ /**
1516
+ * The credential is valid, but this vendor may not do this right now.
1517
+ */
1518
+ 403: ErrorResponse;
1519
+ /**
1520
+ * The route, or the record it names, does not exist.
1521
+ */
1522
+ 404: ErrorResponse;
1523
+ /**
1524
+ * The request conflicts with something that already exists.
1525
+ */
1526
+ 409: ErrorResponse;
1527
+ /**
1528
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1529
+ */
1530
+ 415: ErrorResponse;
1531
+ /**
1532
+ * The request was understood, and the API refuses to act on it.
1533
+ */
1534
+ 422: ErrorResponse;
1535
+ /**
1536
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1537
+ */
1538
+ 429: ErrorResponse;
1539
+ /**
1540
+ * Something went wrong on our side. Quote the request_id when you report it.
1541
+ */
1542
+ 500: ErrorResponse;
1543
+ };
1544
+ export type LinkCustomerExternalIdError = LinkCustomerExternalIdErrors[keyof LinkCustomerExternalIdErrors];
1545
+ export type LinkCustomerExternalIdResponses = {
1546
+ 200: {
1547
+ data: CustomerData;
1548
+ };
1549
+ };
1550
+ export type LinkCustomerExternalIdResponse = LinkCustomerExternalIdResponses[keyof LinkCustomerExternalIdResponses];
1551
+ export type SendLoyaltyCardByExternalIdData = {
1552
+ body: SendLoyaltyCardRequestData;
1553
+ path: {
1554
+ externalId: string | null;
1555
+ };
1556
+ query?: never;
1557
+ url: '/customers/by-external-id/{externalId}/send-card';
1558
+ };
1559
+ export type SendLoyaltyCardByExternalIdErrors = {
1560
+ /**
1561
+ * The request is missing something the API needs before it can act.
1562
+ */
1563
+ 400: ErrorResponse;
1564
+ /**
1565
+ * The credential is missing, malformed, or not accepted.
1566
+ */
1567
+ 401: ErrorResponse;
1568
+ /**
1569
+ * The credential is valid, but this vendor may not do this right now.
1570
+ */
1571
+ 403: ErrorResponse;
1572
+ /**
1573
+ * The route, or the record it names, does not exist.
1574
+ */
1575
+ 404: ErrorResponse;
1576
+ /**
1577
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1578
+ */
1579
+ 415: ErrorResponse;
1580
+ /**
1581
+ * The request was understood, and the API refuses to act on it.
1582
+ */
1583
+ 422: ErrorResponse;
1584
+ /**
1585
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1586
+ */
1587
+ 429: ErrorResponse;
1588
+ /**
1589
+ * Something went wrong on our side. Quote the request_id when you report it.
1590
+ */
1591
+ 500: ErrorResponse;
1592
+ };
1593
+ export type SendLoyaltyCardByExternalIdError = SendLoyaltyCardByExternalIdErrors[keyof SendLoyaltyCardByExternalIdErrors];
1594
+ export type SendLoyaltyCardByExternalIdResponses = {
1595
+ 202: {
1596
+ data: SendLoyaltyCardResultData;
1597
+ };
1598
+ };
1599
+ export type SendLoyaltyCardByExternalIdResponse = SendLoyaltyCardByExternalIdResponses[keyof SendLoyaltyCardByExternalIdResponses];
1600
+ export type SendLoyaltyCardData = {
1601
+ body: SendLoyaltyCardRequestData;
1602
+ path: {
1603
+ customer: string | null;
1604
+ };
1605
+ query?: never;
1606
+ url: '/customers/{customer}/send-card';
1607
+ };
1608
+ export type SendLoyaltyCardErrors = {
1609
+ /**
1610
+ * The request is missing something the API needs before it can act.
1611
+ */
1612
+ 400: ErrorResponse;
1613
+ /**
1614
+ * The credential is missing, malformed, or not accepted.
1615
+ */
1616
+ 401: ErrorResponse;
1617
+ /**
1618
+ * The credential is valid, but this vendor may not do this right now.
1619
+ */
1620
+ 403: ErrorResponse;
1621
+ /**
1622
+ * The route, or the record it names, does not exist.
1623
+ */
1624
+ 404: ErrorResponse;
1625
+ /**
1626
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1627
+ */
1628
+ 415: ErrorResponse;
1629
+ /**
1630
+ * The request was understood, and the API refuses to act on it.
1631
+ */
1632
+ 422: ErrorResponse;
1633
+ /**
1634
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1635
+ */
1636
+ 429: ErrorResponse;
1637
+ /**
1638
+ * Something went wrong on our side. Quote the request_id when you report it.
1639
+ */
1640
+ 500: ErrorResponse;
1641
+ };
1642
+ export type SendLoyaltyCardError = SendLoyaltyCardErrors[keyof SendLoyaltyCardErrors];
1643
+ export type SendLoyaltyCardResponses = {
1644
+ 202: {
1645
+ data: SendLoyaltyCardResultData;
1646
+ };
1647
+ };
1648
+ export type SendLoyaltyCardResponse = SendLoyaltyCardResponses[keyof SendLoyaltyCardResponses];
1649
+ export type ShowCustomerData = {
1650
+ body?: never;
1651
+ path: {
1652
+ customer: string | null;
1653
+ };
1654
+ query?: never;
1655
+ url: '/customers/{customer}';
1656
+ };
1657
+ export type ShowCustomerErrors = {
1658
+ /**
1659
+ * The credential is missing, malformed, or not accepted.
1660
+ */
1661
+ 401: ErrorResponse;
1662
+ /**
1663
+ * The credential is valid, but this vendor may not do this right now.
1664
+ */
1665
+ 403: ErrorResponse;
1666
+ /**
1667
+ * The route, or the record it names, does not exist.
1668
+ */
1669
+ 404: ErrorResponse;
1670
+ /**
1671
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1672
+ */
1673
+ 429: ErrorResponse;
1674
+ /**
1675
+ * Something went wrong on our side. Quote the request_id when you report it.
1676
+ */
1677
+ 500: ErrorResponse;
1678
+ };
1679
+ export type ShowCustomerError = ShowCustomerErrors[keyof ShowCustomerErrors];
1680
+ export type ShowCustomerResponses = {
1681
+ 200: {
1682
+ data: CustomerDetailData;
1683
+ };
1684
+ };
1685
+ export type ShowCustomerResponse = ShowCustomerResponses[keyof ShowCustomerResponses];
1686
+ export type SubmitTransactionData = {
1687
+ body: CreateTransactionData;
1688
+ path?: never;
1689
+ query?: never;
1690
+ url: '/transactions';
1691
+ };
1692
+ export type SubmitTransactionErrors = {
1693
+ /**
1694
+ * The request is missing something the API needs before it can act.
1695
+ */
1696
+ 400: ErrorResponse;
1697
+ /**
1698
+ * The credential is missing, malformed, or not accepted.
1699
+ */
1700
+ 401: ErrorResponse;
1701
+ /**
1702
+ * The credential is valid, but this vendor may not do this right now.
1703
+ */
1704
+ 403: ErrorResponse;
1705
+ /**
1706
+ * The route, or the record it names, does not exist.
1707
+ */
1708
+ 404: ErrorResponse;
1709
+ /**
1710
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1711
+ */
1712
+ 415: ErrorResponse;
1713
+ /**
1714
+ * The request was understood, and the API refuses to act on it.
1715
+ */
1716
+ 422: ErrorResponse;
1717
+ /**
1718
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1719
+ */
1720
+ 429: ErrorResponse;
1721
+ /**
1722
+ * Something went wrong on our side. Quote the request_id when you report it.
1723
+ */
1724
+ 500: ErrorResponse;
1725
+ };
1726
+ export type SubmitTransactionError = SubmitTransactionErrors[keyof SubmitTransactionErrors];
1727
+ export type SubmitTransactionResponses = {
1728
+ 201: {
1729
+ data: TransactionData;
1730
+ };
1731
+ };
1732
+ export type SubmitTransactionResponse = SubmitTransactionResponses[keyof SubmitTransactionResponses];
1733
+ export type ListCustomerTransactionsData = {
1734
+ body?: never;
1735
+ path: {
1736
+ customer: string | null;
1737
+ };
1738
+ query?: {
1739
+ date_from?: string;
1740
+ date_to?: string;
1741
+ page?: number;
1742
+ };
1743
+ url: '/customers/{customer}/transactions';
1744
+ };
1745
+ export type ListCustomerTransactionsErrors = {
1746
+ /**
1747
+ * The credential is missing, malformed, or not accepted.
1748
+ */
1749
+ 401: ErrorResponse;
1750
+ /**
1751
+ * The credential is valid, but this vendor may not do this right now.
1752
+ */
1753
+ 403: ErrorResponse;
1754
+ /**
1755
+ * The route, or the record it names, does not exist.
1756
+ */
1757
+ 404: ErrorResponse;
1758
+ /**
1759
+ * The request was understood, and the API refuses to act on it.
1760
+ */
1761
+ 422: ErrorResponse;
1762
+ /**
1763
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1764
+ */
1765
+ 429: ErrorResponse;
1766
+ /**
1767
+ * Something went wrong on our side. Quote the request_id when you report it.
1768
+ */
1769
+ 500: ErrorResponse;
1770
+ };
1771
+ export type ListCustomerTransactionsError = ListCustomerTransactionsErrors[keyof ListCustomerTransactionsErrors];
1772
+ export type ListCustomerTransactionsResponses = {
1773
+ 200: {
1774
+ data: {
1775
+ data: Array<TransactionData>;
1776
+ links: PaginationLinks;
1777
+ meta: PaginationMeta;
1778
+ };
1779
+ };
1780
+ };
1781
+ export type ListCustomerTransactionsResponse = ListCustomerTransactionsResponses[keyof ListCustomerTransactionsResponses];
1782
+ export type ShowWalletData = {
1783
+ body?: never;
1784
+ path: {
1785
+ customer: string | null;
1786
+ };
1787
+ query?: never;
1788
+ url: '/customers/{customer}/wallet';
1789
+ };
1790
+ export type ShowWalletErrors = {
1791
+ /**
1792
+ * The credential is missing, malformed, or not accepted.
1793
+ */
1794
+ 401: ErrorResponse;
1795
+ /**
1796
+ * The credential is valid, but this vendor may not do this right now.
1797
+ */
1798
+ 403: ErrorResponse;
1799
+ /**
1800
+ * The route, or the record it names, does not exist.
1801
+ */
1802
+ 404: ErrorResponse;
1803
+ /**
1804
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1805
+ */
1806
+ 429: ErrorResponse;
1807
+ /**
1808
+ * Something went wrong on our side. Quote the request_id when you report it.
1809
+ */
1810
+ 500: ErrorResponse;
1811
+ };
1812
+ export type ShowWalletError = ShowWalletErrors[keyof ShowWalletErrors];
1813
+ export type ShowWalletResponses = {
1814
+ 200: {
1815
+ data: WalletData;
1816
+ };
1817
+ };
1818
+ export type ShowWalletResponse = ShowWalletResponses[keyof ShowWalletResponses];
1819
+ export type ListLedgerEntriesData = {
1820
+ body?: never;
1821
+ path: {
1822
+ customer: string | null;
1823
+ };
1824
+ query?: {
1825
+ date_from?: string;
1826
+ date_to?: string;
1827
+ type?: 'earn' | 'adjust' | 'redeem' | 'expire';
1828
+ page?: number;
1829
+ };
1830
+ url: '/customers/{customer}/ledger';
1831
+ };
1832
+ export type ListLedgerEntriesErrors = {
1833
+ /**
1834
+ * The credential is missing, malformed, or not accepted.
1835
+ */
1836
+ 401: ErrorResponse;
1837
+ /**
1838
+ * The credential is valid, but this vendor may not do this right now.
1839
+ */
1840
+ 403: ErrorResponse;
1841
+ /**
1842
+ * The route, or the record it names, does not exist.
1843
+ */
1844
+ 404: ErrorResponse;
1845
+ /**
1846
+ * The request was understood, and the API refuses to act on it.
1847
+ */
1848
+ 422: ErrorResponse;
1849
+ /**
1850
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1851
+ */
1852
+ 429: ErrorResponse;
1853
+ /**
1854
+ * Something went wrong on our side. Quote the request_id when you report it.
1855
+ */
1856
+ 500: ErrorResponse;
1857
+ };
1858
+ export type ListLedgerEntriesError = ListLedgerEntriesErrors[keyof ListLedgerEntriesErrors];
1859
+ export type ListLedgerEntriesResponses = {
1860
+ 200: {
1861
+ data: {
1862
+ data: Array<LedgerEntryData>;
1863
+ links: PaginationLinks;
1864
+ meta: PaginationMeta;
1865
+ };
1866
+ };
1867
+ };
1868
+ export type ListLedgerEntriesResponse = ListLedgerEntriesResponses[keyof ListLedgerEntriesResponses];
1869
+ export type DownloadWalletPassData = {
1870
+ body?: never;
1871
+ path: {
1872
+ customer: string | null;
1873
+ };
1874
+ query: {
1875
+ platform: 'apple' | 'google';
1876
+ };
1877
+ url: '/customers/{customer}/wallet-pass';
1878
+ };
1879
+ export type DownloadWalletPassErrors = {
1880
+ /**
1881
+ * The credential is missing, malformed, or not accepted.
1882
+ */
1883
+ 401: ErrorResponse;
1884
+ /**
1885
+ * The credential is valid, but this vendor may not do this right now.
1886
+ */
1887
+ 403: ErrorResponse;
1888
+ /**
1889
+ * The route, or the record it names, does not exist.
1890
+ */
1891
+ 404: ErrorResponse;
1892
+ /**
1893
+ * The request was understood, and the API refuses to act on it.
1894
+ */
1895
+ 422: ErrorResponse;
1896
+ /**
1897
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1898
+ */
1899
+ 429: ErrorResponse;
1900
+ /**
1901
+ * Something went wrong on our side. Quote the request_id when you report it.
1902
+ */
1903
+ 500: ErrorResponse;
1904
+ };
1905
+ export type DownloadWalletPassError = DownloadWalletPassErrors[keyof DownloadWalletPassErrors];
1906
+ export type DownloadWalletPassResponses = {
1907
+ 200: {
1908
+ data: GoogleWalletPassData;
1909
+ };
1910
+ };
1911
+ export type DownloadWalletPassResponse = DownloadWalletPassResponses[keyof DownloadWalletPassResponses];
1912
+ export type AdjustWalletData = {
1913
+ body: AdjustWalletApiData;
1914
+ path: {
1915
+ customer: string | null;
1916
+ };
1917
+ query?: never;
1918
+ url: '/customers/{customer}/wallet/adjust';
1919
+ };
1920
+ export type AdjustWalletErrors = {
1921
+ /**
1922
+ * The request is missing something the API needs before it can act.
1923
+ */
1924
+ 400: ErrorResponse;
1925
+ /**
1926
+ * The credential is missing, malformed, or not accepted.
1927
+ */
1928
+ 401: ErrorResponse;
1929
+ /**
1930
+ * The credential is valid, but this vendor may not do this right now.
1931
+ */
1932
+ 403: ErrorResponse;
1933
+ /**
1934
+ * The route, or the record it names, does not exist.
1935
+ */
1936
+ 404: ErrorResponse;
1937
+ /**
1938
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1939
+ */
1940
+ 415: ErrorResponse;
1941
+ /**
1942
+ * The request was understood, and the API refuses to act on it.
1943
+ */
1944
+ 422: ErrorResponse;
1945
+ /**
1946
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1947
+ */
1948
+ 429: ErrorResponse;
1949
+ /**
1950
+ * Something went wrong on our side. Quote the request_id when you report it.
1951
+ */
1952
+ 500: ErrorResponse;
1953
+ };
1954
+ export type AdjustWalletError = AdjustWalletErrors[keyof AdjustWalletErrors];
1955
+ export type AdjustWalletResponses = {
1956
+ 200: {
1957
+ data: LedgerEntryData;
1958
+ };
1959
+ };
1960
+ export type AdjustWalletResponse = AdjustWalletResponses[keyof AdjustWalletResponses];
1961
+ export type ListRewardsData = {
1962
+ body?: never;
1963
+ path?: never;
1964
+ query?: {
1965
+ affordable?: boolean;
1966
+ identifier?: string;
1967
+ };
1968
+ url: '/rewards';
1969
+ };
1970
+ export type ListRewardsErrors = {
1971
+ /**
1972
+ * The credential is missing, malformed, or not accepted.
1973
+ */
1974
+ 401: ErrorResponse;
1975
+ /**
1976
+ * The credential is valid, but this vendor may not do this right now.
1977
+ */
1978
+ 403: ErrorResponse;
1979
+ /**
1980
+ * The request was understood, and the API refuses to act on it.
1981
+ */
1982
+ 422: ErrorResponse;
1983
+ /**
1984
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1985
+ */
1986
+ 429: ErrorResponse;
1987
+ /**
1988
+ * Something went wrong on our side. Quote the request_id when you report it.
1989
+ */
1990
+ 500: ErrorResponse;
1991
+ };
1992
+ export type ListRewardsError = ListRewardsErrors[keyof ListRewardsErrors];
1993
+ export type ListRewardsResponses = {
1994
+ 200: {
1995
+ data: Array<RewardCatalogItemData>;
1996
+ };
1997
+ };
1998
+ export type ListRewardsResponse = ListRewardsResponses[keyof ListRewardsResponses];
1999
+ export type ListCustomerRedemptionsData = {
2000
+ body?: never;
2001
+ path: {
2002
+ customer: string | null;
2003
+ };
2004
+ query?: {
2005
+ status?: 'valid' | 'used' | 'expired' | 'cancelled';
2006
+ page?: number;
2007
+ };
2008
+ url: '/customers/{customer}/redemptions';
2009
+ };
2010
+ export type ListCustomerRedemptionsErrors = {
2011
+ /**
2012
+ * The credential is missing, malformed, or not accepted.
2013
+ */
2014
+ 401: ErrorResponse;
2015
+ /**
2016
+ * The credential is valid, but this vendor may not do this right now.
2017
+ */
2018
+ 403: ErrorResponse;
2019
+ /**
2020
+ * The route, or the record it names, does not exist.
2021
+ */
2022
+ 404: ErrorResponse;
2023
+ /**
2024
+ * The request was understood, and the API refuses to act on it.
2025
+ */
2026
+ 422: ErrorResponse;
2027
+ /**
2028
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2029
+ */
2030
+ 429: ErrorResponse;
2031
+ /**
2032
+ * Something went wrong on our side. Quote the request_id when you report it.
2033
+ */
2034
+ 500: ErrorResponse;
2035
+ };
2036
+ export type ListCustomerRedemptionsError = ListCustomerRedemptionsErrors[keyof ListCustomerRedemptionsErrors];
2037
+ export type ListCustomerRedemptionsResponses = {
2038
+ 200: {
2039
+ data: {
2040
+ data: Array<RedemptionLookupData>;
2041
+ links: PaginationLinks;
2042
+ meta: PaginationMeta;
2043
+ };
2044
+ };
2045
+ };
2046
+ export type ListCustomerRedemptionsResponse = ListCustomerRedemptionsResponses[keyof ListCustomerRedemptionsResponses];
2047
+ export type RedeemRewardData = {
2048
+ body: CreateRedemptionData;
2049
+ path?: never;
2050
+ query?: never;
2051
+ url: '/redemptions';
2052
+ };
2053
+ export type RedeemRewardErrors = {
2054
+ /**
2055
+ * The request is missing something the API needs before it can act.
2056
+ */
2057
+ 400: ErrorResponse;
2058
+ /**
2059
+ * The credential is missing, malformed, or not accepted.
2060
+ */
2061
+ 401: ErrorResponse;
2062
+ /**
2063
+ * The credential is valid, but this vendor may not do this right now.
2064
+ */
2065
+ 403: ErrorResponse;
2066
+ /**
2067
+ * The route, or the record it names, does not exist.
2068
+ */
2069
+ 404: ErrorResponse;
2070
+ /**
2071
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2072
+ */
2073
+ 415: ErrorResponse;
2074
+ /**
2075
+ * The request was understood, and the API refuses to act on it.
2076
+ */
2077
+ 422: ErrorResponse;
2078
+ /**
2079
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2080
+ */
2081
+ 429: ErrorResponse;
2082
+ /**
2083
+ * Something went wrong on our side. Quote the request_id when you report it.
2084
+ */
2085
+ 500: ErrorResponse;
2086
+ };
2087
+ export type RedeemRewardError = RedeemRewardErrors[keyof RedeemRewardErrors];
2088
+ export type RedeemRewardResponses = {
2089
+ 201: {
2090
+ data: RedemptionCreatedData;
2091
+ };
2092
+ };
2093
+ export type RedeemRewardResponse = RedeemRewardResponses[keyof RedeemRewardResponses];
2094
+ export type LookupRedemptionData = {
2095
+ body?: never;
2096
+ path: {
2097
+ code: string | null;
2098
+ };
2099
+ query?: never;
2100
+ url: '/redemptions/{code}';
2101
+ };
2102
+ export type LookupRedemptionErrors = {
2103
+ /**
2104
+ * The credential is missing, malformed, or not accepted.
2105
+ */
2106
+ 401: ErrorResponse;
2107
+ /**
2108
+ * The credential is valid, but this vendor may not do this right now.
2109
+ */
2110
+ 403: ErrorResponse;
2111
+ /**
2112
+ * The route, or the record it names, does not exist.
2113
+ */
2114
+ 404: ErrorResponse;
2115
+ /**
2116
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2117
+ */
2118
+ 429: ErrorResponse;
2119
+ /**
2120
+ * Something went wrong on our side. Quote the request_id when you report it.
2121
+ */
2122
+ 500: ErrorResponse;
2123
+ };
2124
+ export type LookupRedemptionError = LookupRedemptionErrors[keyof LookupRedemptionErrors];
2125
+ export type LookupRedemptionResponses = {
2126
+ 200: {
2127
+ data: RedemptionLookupData;
2128
+ };
2129
+ };
2130
+ export type LookupRedemptionResponse = LookupRedemptionResponses[keyof LookupRedemptionResponses];
2131
+ export type VerifyRedemptionData = {
2132
+ body?: never;
2133
+ path: {
2134
+ code: string | null;
2135
+ };
2136
+ query?: never;
2137
+ url: '/redemptions/{code}/verify';
2138
+ };
2139
+ export type VerifyRedemptionErrors = {
2140
+ /**
2141
+ * The credential is missing, malformed, or not accepted.
2142
+ */
2143
+ 401: ErrorResponse;
2144
+ /**
2145
+ * The credential is valid, but this vendor may not do this right now.
2146
+ */
2147
+ 403: ErrorResponse;
2148
+ /**
2149
+ * The route, or the record it names, does not exist.
2150
+ */
2151
+ 404: ErrorResponse;
2152
+ /**
2153
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2154
+ */
2155
+ 415: ErrorResponse;
2156
+ /**
2157
+ * The request was understood, and the API refuses to act on it.
2158
+ */
2159
+ 422: ErrorResponse;
2160
+ /**
2161
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2162
+ */
2163
+ 429: ErrorResponse;
2164
+ /**
2165
+ * Something went wrong on our side. Quote the request_id when you report it.
2166
+ */
2167
+ 500: ErrorResponse;
2168
+ };
2169
+ export type VerifyRedemptionError = VerifyRedemptionErrors[keyof VerifyRedemptionErrors];
2170
+ export type VerifyRedemptionResponses = {
2171
+ 200: {
2172
+ data: RedemptionVerificationData;
2173
+ };
2174
+ };
2175
+ export type VerifyRedemptionResponse = VerifyRedemptionResponses[keyof VerifyRedemptionResponses];
2176
+ export type ListProductsData = {
2177
+ body?: never;
2178
+ path?: never;
2179
+ query?: {
2180
+ status?: 'active' | 'inactive' | 'archived';
2181
+ category?: string;
2182
+ search?: string;
2183
+ per_page?: number;
2184
+ page?: number;
2185
+ };
2186
+ url: '/products';
2187
+ };
2188
+ export type ListProductsErrors = {
2189
+ /**
2190
+ * The credential is missing, malformed, or not accepted.
2191
+ */
2192
+ 401: ErrorResponse;
2193
+ /**
2194
+ * The credential is valid, but this vendor may not do this right now.
2195
+ */
2196
+ 403: ErrorResponse;
2197
+ /**
2198
+ * The request was understood, and the API refuses to act on it.
2199
+ */
2200
+ 422: ErrorResponse;
2201
+ /**
2202
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2203
+ */
2204
+ 429: ErrorResponse;
2205
+ /**
2206
+ * Something went wrong on our side. Quote the request_id when you report it.
2207
+ */
2208
+ 500: ErrorResponse;
2209
+ };
2210
+ export type ListProductsError = ListProductsErrors[keyof ListProductsErrors];
2211
+ export type ListProductsResponses = {
2212
+ 200: {
2213
+ data: {
2214
+ data: Array<ProductData>;
2215
+ links: PaginationLinks;
2216
+ meta: PaginationMeta;
2217
+ };
2218
+ };
2219
+ };
2220
+ export type ListProductsResponse = ListProductsResponses[keyof ListProductsResponses];
2221
+ export type CreateProductData2 = {
2222
+ body: CreateProductData;
2223
+ path?: never;
2224
+ query?: never;
2225
+ url: '/products';
2226
+ };
2227
+ export type CreateProductErrors = {
2228
+ /**
2229
+ * The request is missing something the API needs before it can act.
2230
+ */
2231
+ 400: ErrorResponse;
2232
+ /**
2233
+ * The credential is missing, malformed, or not accepted.
2234
+ */
2235
+ 401: ErrorResponse;
2236
+ /**
2237
+ * The credential is valid, but this vendor may not do this right now.
2238
+ */
2239
+ 403: ErrorResponse;
2240
+ /**
2241
+ * The request conflicts with something that already exists.
2242
+ */
2243
+ 409: ErrorResponse;
2244
+ /**
2245
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2246
+ */
2247
+ 415: ErrorResponse;
2248
+ /**
2249
+ * The request was understood, and the API refuses to act on it.
2250
+ */
2251
+ 422: ErrorResponse;
2252
+ /**
2253
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2254
+ */
2255
+ 429: ErrorResponse;
2256
+ /**
2257
+ * Something went wrong on our side. Quote the request_id when you report it.
2258
+ */
2259
+ 500: ErrorResponse;
2260
+ };
2261
+ export type CreateProductError = CreateProductErrors[keyof CreateProductErrors];
2262
+ export type CreateProductResponses = {
2263
+ 201: {
2264
+ data: ProductData;
2265
+ };
2266
+ };
2267
+ export type CreateProductResponse = CreateProductResponses[keyof CreateProductResponses];
2268
+ export type BulkUpsertProductsData = {
2269
+ body: {
2270
+ products: Array<CreateProductData>;
2271
+ };
2272
+ path?: never;
2273
+ query?: never;
2274
+ url: '/products/batch';
2275
+ };
2276
+ export type BulkUpsertProductsErrors = {
2277
+ /**
2278
+ * The request is missing something the API needs before it can act.
2279
+ */
2280
+ 400: ErrorResponse;
2281
+ /**
2282
+ * The credential is missing, malformed, or not accepted.
2283
+ */
2284
+ 401: ErrorResponse;
2285
+ /**
2286
+ * The credential is valid, but this vendor may not do this right now.
2287
+ */
2288
+ 403: ErrorResponse;
2289
+ /**
2290
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2291
+ */
2292
+ 415: ErrorResponse;
2293
+ /**
2294
+ * The request was understood, and the API refuses to act on it.
2295
+ */
2296
+ 422: ErrorResponse;
2297
+ /**
2298
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2299
+ */
2300
+ 429: ErrorResponse;
2301
+ /**
2302
+ * Something went wrong on our side. Quote the request_id when you report it.
2303
+ */
2304
+ 500: ErrorResponse;
2305
+ };
2306
+ export type BulkUpsertProductsError = BulkUpsertProductsErrors[keyof BulkUpsertProductsErrors];
2307
+ export type BulkUpsertProductsResponses = {
2308
+ 200: {
2309
+ data: BulkUpsertResponseData;
2310
+ };
2311
+ };
2312
+ export type BulkUpsertProductsResponse = BulkUpsertProductsResponses[keyof BulkUpsertProductsResponses];
2313
+ export type CreateRewardFromProductData2 = {
2314
+ body: CreateRewardFromProductData;
2315
+ path: {
2316
+ externalId: string | null;
2317
+ };
2318
+ query?: never;
2319
+ url: '/products/{externalId}/reward';
2320
+ };
2321
+ export type CreateRewardFromProductErrors = {
2322
+ /**
2323
+ * The request is missing something the API needs before it can act.
2324
+ */
2325
+ 400: ErrorResponse;
2326
+ /**
2327
+ * The credential is missing, malformed, or not accepted.
2328
+ */
2329
+ 401: ErrorResponse;
2330
+ /**
2331
+ * The credential is valid, but this vendor may not do this right now.
2332
+ */
2333
+ 403: ErrorResponse;
2334
+ /**
2335
+ * The route, or the record it names, does not exist.
2336
+ */
2337
+ 404: ErrorResponse;
2338
+ /**
2339
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2340
+ */
2341
+ 415: ErrorResponse;
2342
+ /**
2343
+ * The request was understood, and the API refuses to act on it.
2344
+ */
2345
+ 422: ErrorResponse;
2346
+ /**
2347
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2348
+ */
2349
+ 429: ErrorResponse;
2350
+ /**
2351
+ * Something went wrong on our side. Quote the request_id when you report it.
2352
+ */
2353
+ 500: ErrorResponse;
2354
+ };
2355
+ export type CreateRewardFromProductError = CreateRewardFromProductErrors[keyof CreateRewardFromProductErrors];
2356
+ export type CreateRewardFromProductResponses = {
2357
+ 201: {
2358
+ data: RewardData;
2359
+ };
2360
+ };
2361
+ export type CreateRewardFromProductResponse = CreateRewardFromProductResponses[keyof CreateRewardFromProductResponses];
2362
+ export type DeleteProductData = {
2363
+ body?: never;
2364
+ path: {
2365
+ externalId: string | null;
2366
+ };
2367
+ query?: never;
2368
+ url: '/products/{externalId}';
2369
+ };
2370
+ export type DeleteProductErrors = {
2371
+ /**
2372
+ * The credential is missing, malformed, or not accepted.
2373
+ */
2374
+ 401: ErrorResponse;
2375
+ /**
2376
+ * The credential is valid, but this vendor may not do this right now.
2377
+ */
2378
+ 403: ErrorResponse;
2379
+ /**
2380
+ * The route, or the record it names, does not exist.
2381
+ */
2382
+ 404: ErrorResponse;
2383
+ /**
2384
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2385
+ */
2386
+ 415: ErrorResponse;
2387
+ /**
2388
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2389
+ */
2390
+ 429: ErrorResponse;
2391
+ /**
2392
+ * Something went wrong on our side. Quote the request_id when you report it.
2393
+ */
2394
+ 500: ErrorResponse;
2395
+ };
2396
+ export type DeleteProductError = DeleteProductErrors[keyof DeleteProductErrors];
2397
+ export type DeleteProductResponses = {
2398
+ 204: void;
2399
+ };
2400
+ export type DeleteProductResponse = DeleteProductResponses[keyof DeleteProductResponses];
2401
+ export type ShowProductData = {
2402
+ body?: never;
2403
+ path: {
2404
+ externalId: string | null;
2405
+ };
2406
+ query?: never;
2407
+ url: '/products/{externalId}';
2408
+ };
2409
+ export type ShowProductErrors = {
2410
+ /**
2411
+ * The credential is missing, malformed, or not accepted.
2412
+ */
2413
+ 401: ErrorResponse;
2414
+ /**
2415
+ * The credential is valid, but this vendor may not do this right now.
2416
+ */
2417
+ 403: ErrorResponse;
2418
+ /**
2419
+ * The route, or the record it names, does not exist.
2420
+ */
2421
+ 404: ErrorResponse;
2422
+ /**
2423
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2424
+ */
2425
+ 429: ErrorResponse;
2426
+ /**
2427
+ * Something went wrong on our side. Quote the request_id when you report it.
2428
+ */
2429
+ 500: ErrorResponse;
2430
+ };
2431
+ export type ShowProductError = ShowProductErrors[keyof ShowProductErrors];
2432
+ export type ShowProductResponses = {
2433
+ 200: {
2434
+ data: ProductData;
2435
+ };
2436
+ };
2437
+ export type ShowProductResponse = ShowProductResponses[keyof ShowProductResponses];
2438
+ export type UpdateProductData2 = {
2439
+ body: UpdateProductData;
2440
+ path: {
2441
+ externalId: string | null;
2442
+ };
2443
+ query?: never;
2444
+ url: '/products/{externalId}';
2445
+ };
2446
+ export type UpdateProductErrors = {
2447
+ /**
2448
+ * The request is missing something the API needs before it can act.
2449
+ */
2450
+ 400: ErrorResponse;
2451
+ /**
2452
+ * The credential is missing, malformed, or not accepted.
2453
+ */
2454
+ 401: ErrorResponse;
2455
+ /**
2456
+ * The credential is valid, but this vendor may not do this right now.
2457
+ */
2458
+ 403: ErrorResponse;
2459
+ /**
2460
+ * The route, or the record it names, does not exist.
2461
+ */
2462
+ 404: ErrorResponse;
2463
+ /**
2464
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2465
+ */
2466
+ 415: ErrorResponse;
2467
+ /**
2468
+ * The request was understood, and the API refuses to act on it.
2469
+ */
2470
+ 422: ErrorResponse;
2471
+ /**
2472
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2473
+ */
2474
+ 429: ErrorResponse;
2475
+ /**
2476
+ * Something went wrong on our side. Quote the request_id when you report it.
2477
+ */
2478
+ 500: ErrorResponse;
2479
+ };
2480
+ export type UpdateProductError = UpdateProductErrors[keyof UpdateProductErrors];
2481
+ export type UpdateProductResponses = {
2482
+ 200: {
2483
+ data: ProductData;
2484
+ };
2485
+ };
2486
+ export type UpdateProductResponse = UpdateProductResponses[keyof UpdateProductResponses];
2487
+ export type UpsertProductData2 = {
2488
+ body: UpsertProductData;
2489
+ path: {
2490
+ externalId: string | null;
2491
+ };
2492
+ query?: never;
2493
+ url: '/products/{externalId}';
2494
+ };
2495
+ export type UpsertProductErrors = {
2496
+ /**
2497
+ * The request is missing something the API needs before it can act.
2498
+ */
2499
+ 400: ErrorResponse;
2500
+ /**
2501
+ * The credential is missing, malformed, or not accepted.
2502
+ */
2503
+ 401: ErrorResponse;
2504
+ /**
2505
+ * The credential is valid, but this vendor may not do this right now.
2506
+ */
2507
+ 403: ErrorResponse;
2508
+ /**
2509
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2510
+ */
2511
+ 415: ErrorResponse;
2512
+ /**
2513
+ * The request was understood, and the API refuses to act on it.
2514
+ */
2515
+ 422: ErrorResponse;
2516
+ /**
2517
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2518
+ */
2519
+ 429: ErrorResponse;
2520
+ /**
2521
+ * Something went wrong on our side. Quote the request_id when you report it.
2522
+ */
2523
+ 500: ErrorResponse;
2524
+ };
2525
+ export type UpsertProductError = UpsertProductErrors[keyof UpsertProductErrors];
2526
+ export type UpsertProductResponses = {
2527
+ 200: {
2528
+ data: ProductData;
2529
+ };
2530
+ 201: {
2531
+ data: ProductData;
2532
+ };
2533
+ };
2534
+ export type UpsertProductResponse = UpsertProductResponses[keyof UpsertProductResponses];
2535
+ export type ListCampaignsData = {
2536
+ body?: never;
2537
+ path?: never;
2538
+ query?: {
2539
+ branch?: string;
2540
+ page?: number;
2541
+ };
2542
+ url: '/campaigns';
2543
+ };
2544
+ export type ListCampaignsErrors = {
2545
+ /**
2546
+ * The credential is missing, malformed, or not accepted.
2547
+ */
2548
+ 401: ErrorResponse;
2549
+ /**
2550
+ * The credential is valid, but this vendor may not do this right now.
2551
+ */
2552
+ 403: ErrorResponse;
2553
+ /**
2554
+ * The request was understood, and the API refuses to act on it.
2555
+ */
2556
+ 422: ErrorResponse;
2557
+ /**
2558
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2559
+ */
2560
+ 429: ErrorResponse;
2561
+ /**
2562
+ * Something went wrong on our side. Quote the request_id when you report it.
2563
+ */
2564
+ 500: ErrorResponse;
2565
+ };
2566
+ export type ListCampaignsError = ListCampaignsErrors[keyof ListCampaignsErrors];
2567
+ export type ListCampaignsResponses = {
2568
+ 200: {
2569
+ data: {
2570
+ data: Array<CampaignListData>;
2571
+ links: PaginationLinks;
2572
+ meta: PaginationMeta;
2573
+ };
2574
+ };
2575
+ };
2576
+ export type ListCampaignsResponse = ListCampaignsResponses[keyof ListCampaignsResponses];
2577
+ export type ListCustomerVouchersData = {
2578
+ body?: never;
2579
+ path: {
2580
+ customer: string | null;
2581
+ };
2582
+ query?: never;
2583
+ url: '/customers/{customer}/vouchers';
2584
+ };
2585
+ export type ListCustomerVouchersErrors = {
2586
+ /**
2587
+ * The credential is missing, malformed, or not accepted.
2588
+ */
2589
+ 401: ErrorResponse;
2590
+ /**
2591
+ * The credential is valid, but this vendor may not do this right now.
2592
+ */
2593
+ 403: ErrorResponse;
2594
+ /**
2595
+ * The route, or the record it names, does not exist.
2596
+ */
2597
+ 404: ErrorResponse;
2598
+ /**
2599
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2600
+ */
2601
+ 429: ErrorResponse;
2602
+ /**
2603
+ * Something went wrong on our side. Quote the request_id when you report it.
2604
+ */
2605
+ 500: ErrorResponse;
2606
+ };
2607
+ export type ListCustomerVouchersError = ListCustomerVouchersErrors[keyof ListCustomerVouchersErrors];
2608
+ export type ListCustomerVouchersResponses = {
2609
+ 200: {
2610
+ data: Array<CustomerVoucherData>;
2611
+ };
2612
+ };
2613
+ export type ListCustomerVouchersResponse = ListCustomerVouchersResponses[keyof ListCustomerVouchersResponses];
2614
+ export type LookupVoucherData = {
2615
+ body?: never;
2616
+ path: {
2617
+ code: string | null;
2618
+ };
2619
+ query?: never;
2620
+ url: '/vouchers/{code}';
2621
+ };
2622
+ export type LookupVoucherErrors = {
2623
+ /**
2624
+ * The credential is missing, malformed, or not accepted.
2625
+ */
2626
+ 401: ErrorResponse;
2627
+ /**
2628
+ * The credential is valid, but this vendor may not do this right now.
2629
+ */
2630
+ 403: ErrorResponse;
2631
+ /**
2632
+ * The route, or the record it names, does not exist.
2633
+ */
2634
+ 404: ErrorResponse;
2635
+ /**
2636
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2637
+ */
2638
+ 429: ErrorResponse;
2639
+ /**
2640
+ * Something went wrong on our side. Quote the request_id when you report it.
2641
+ */
2642
+ 500: ErrorResponse;
2643
+ };
2644
+ export type LookupVoucherError = LookupVoucherErrors[keyof LookupVoucherErrors];
2645
+ export type LookupVoucherResponses = {
2646
+ 200: {
2647
+ data: CampaignVoucherLookupData;
2648
+ };
2649
+ };
2650
+ export type LookupVoucherResponse = LookupVoucherResponses[keyof LookupVoucherResponses];
2651
+ export type VerifyVoucherData = {
2652
+ body: VerifyCampaignVoucherData;
2653
+ path: {
2654
+ code: string | null;
2655
+ };
2656
+ query?: never;
2657
+ url: '/vouchers/{code}/verify';
2658
+ };
2659
+ export type VerifyVoucherErrors = {
2660
+ /**
2661
+ * The request is missing something the API needs before it can act.
2662
+ */
2663
+ 400: ErrorResponse;
2664
+ /**
2665
+ * The credential is missing, malformed, or not accepted.
2666
+ */
2667
+ 401: ErrorResponse;
2668
+ /**
2669
+ * The credential is valid, but this vendor may not do this right now.
2670
+ */
2671
+ 403: ErrorResponse;
2672
+ /**
2673
+ * The route, or the record it names, does not exist.
2674
+ */
2675
+ 404: ErrorResponse;
2676
+ /**
2677
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
2678
+ */
2679
+ 415: ErrorResponse;
2680
+ /**
2681
+ * The request was understood, and the API refuses to act on it.
2682
+ */
2683
+ 422: ErrorResponse;
2684
+ /**
2685
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2686
+ */
2687
+ 429: ErrorResponse;
2688
+ /**
2689
+ * Something went wrong on our side. Quote the request_id when you report it.
2690
+ */
2691
+ 500: ErrorResponse;
2692
+ };
2693
+ export type VerifyVoucherError = VerifyVoucherErrors[keyof VerifyVoucherErrors];
2694
+ export type VerifyVoucherResponses = {
2695
+ 200: {
2696
+ data: CampaignVoucherVerificationData;
2697
+ };
2698
+ };
2699
+ export type VerifyVoucherResponse = VerifyVoucherResponses[keyof VerifyVoucherResponses];
2700
+ export type ShowStatisticsData = {
2701
+ body?: never;
2702
+ path?: never;
2703
+ query?: {
2704
+ period?: 'today' | '7d' | '30d' | '90d';
2705
+ top_products_limit?: number;
2706
+ branch?: string;
2707
+ };
2708
+ url: '/statistics';
2709
+ };
2710
+ export type ShowStatisticsErrors = {
2711
+ /**
2712
+ * The request is missing something the API needs before it can act.
2713
+ */
2714
+ 400: ErrorResponse;
2715
+ /**
2716
+ * The credential is missing, malformed, or not accepted.
2717
+ */
2718
+ 401: ErrorResponse;
2719
+ /**
2720
+ * The credential is valid, but this vendor may not do this right now.
2721
+ */
2722
+ 403: ErrorResponse;
2723
+ /**
2724
+ * The request was understood, and the API refuses to act on it.
2725
+ */
2726
+ 422: ErrorResponse;
2727
+ /**
2728
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2729
+ */
2730
+ 429: ErrorResponse;
2731
+ /**
2732
+ * Something went wrong on our side. Quote the request_id when you report it.
2733
+ */
2734
+ 500: ErrorResponse;
2735
+ };
2736
+ export type ShowStatisticsError = ShowStatisticsErrors[keyof ShowStatisticsErrors];
2737
+ export type ShowStatisticsResponses = {
2738
+ 200: {
2739
+ data: StatisticsApiData;
2740
+ };
2741
+ };
2742
+ export type ShowStatisticsResponse = ShowStatisticsResponses[keyof ShowStatisticsResponses];
2743
+ export type ShowMeData = {
2744
+ body?: never;
2745
+ path?: never;
2746
+ query?: never;
2747
+ url: '/me';
2748
+ };
2749
+ export type ShowMeErrors = {
2750
+ /**
2751
+ * The credential is missing, malformed, or not accepted.
2752
+ */
2753
+ 401: ErrorResponse;
2754
+ /**
2755
+ * The credential is valid, but this vendor may not do this right now.
2756
+ */
2757
+ 403: ErrorResponse;
2758
+ /**
2759
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
2760
+ */
2761
+ 429: ErrorResponse;
2762
+ /**
2763
+ * Something went wrong on our side. Quote the request_id when you report it.
2764
+ */
2765
+ 500: ErrorResponse;
2766
+ };
2767
+ export type ShowMeError = ShowMeErrors[keyof ShowMeErrors];
2768
+ export type ShowMeResponses = {
2769
+ 200: {
2770
+ data: VendorBrandingData;
2771
+ };
2772
+ };
2773
+ export type ShowMeResponse = ShowMeResponses[keyof ShowMeResponses];
2774
+ export type CheckHealthData = {
2775
+ body?: never;
2776
+ path?: never;
2777
+ query?: never;
2778
+ url: '/health';
2779
+ };
2780
+ export type CheckHealthErrors = {
2781
+ /**
2782
+ * Something went wrong on our side. Quote the request_id when you report it.
2783
+ */
2784
+ 500: ErrorResponse;
2785
+ };
2786
+ export type CheckHealthError = CheckHealthErrors[keyof CheckHealthErrors];
2787
+ export type CheckHealthResponses = {
2788
+ 200: {
2789
+ data: {
2790
+ status: 'ok';
2791
+ };
2792
+ };
2793
+ };
2794
+ export type CheckHealthResponse = CheckHealthResponses[keyof CheckHealthResponses];