@chargezen/sdk 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1980 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/customers": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /** Find customers by email, phone, order number or name */
14
+ get: operations["searchCustomers"];
15
+ put?: never;
16
+ post?: never;
17
+ delete?: never;
18
+ options?: never;
19
+ head?: never;
20
+ patch?: never;
21
+ trace?: never;
22
+ };
23
+ "/customers/{customer_id}/subscriptions": {
24
+ parameters: {
25
+ query?: never;
26
+ header?: never;
27
+ path?: never;
28
+ cookie?: never;
29
+ };
30
+ /** List a customer's active subscriptions */
31
+ get: operations["listSubscriptions"];
32
+ put?: never;
33
+ /** Create a subscription for a customer */
34
+ post: operations["createSubscription"];
35
+ delete?: never;
36
+ options?: never;
37
+ head?: never;
38
+ patch?: never;
39
+ trace?: never;
40
+ };
41
+ "/customers/{customer_id}/subscriptions/{id}": {
42
+ parameters: {
43
+ query?: never;
44
+ header?: never;
45
+ path?: never;
46
+ cookie?: never;
47
+ };
48
+ /** Read a subscription */
49
+ get: operations["getSubscription"];
50
+ put?: never;
51
+ post?: never;
52
+ delete?: never;
53
+ options?: never;
54
+ head?: never;
55
+ patch?: never;
56
+ trace?: never;
57
+ };
58
+ "/customers/{customer_id}/subscriptions/{id}/upcoming_orders": {
59
+ parameters: {
60
+ query?: never;
61
+ header?: never;
62
+ path?: never;
63
+ cookie?: never;
64
+ };
65
+ /** List the coming orders */
66
+ get: operations["listUpcomingOrders"];
67
+ put?: never;
68
+ post?: never;
69
+ delete?: never;
70
+ options?: never;
71
+ head?: never;
72
+ patch?: never;
73
+ trace?: never;
74
+ };
75
+ "/customers/{customer_id}/subscriptions/{id}/swap_options": {
76
+ parameters: {
77
+ query?: never;
78
+ header?: never;
79
+ path?: never;
80
+ cookie?: never;
81
+ };
82
+ /** List the replacements swap_product takes */
83
+ get: operations["listSwapOptions"];
84
+ put?: never;
85
+ post?: never;
86
+ delete?: never;
87
+ options?: never;
88
+ head?: never;
89
+ patch?: never;
90
+ trace?: never;
91
+ };
92
+ "/customers/{customer_id}/subscriptions/{id}/order_now": {
93
+ parameters: {
94
+ query?: never;
95
+ header?: never;
96
+ path?: never;
97
+ cookie?: never;
98
+ };
99
+ get?: never;
100
+ put?: never;
101
+ /** Place the next coming order now */
102
+ post: operations["orderNow"];
103
+ delete?: never;
104
+ options?: never;
105
+ head?: never;
106
+ patch?: never;
107
+ trace?: never;
108
+ };
109
+ "/customers/{customer_id}/subscriptions/{id}/pause": {
110
+ parameters: {
111
+ query?: never;
112
+ header?: never;
113
+ path?: never;
114
+ cookie?: never;
115
+ };
116
+ get?: never;
117
+ put?: never;
118
+ /** Pause a subscription */
119
+ post: operations["pause"];
120
+ delete?: never;
121
+ options?: never;
122
+ head?: never;
123
+ patch?: never;
124
+ trace?: never;
125
+ };
126
+ "/customers/{customer_id}/subscriptions/{id}/resume": {
127
+ parameters: {
128
+ query?: never;
129
+ header?: never;
130
+ path?: never;
131
+ cookie?: never;
132
+ };
133
+ get?: never;
134
+ put?: never;
135
+ /** Resume a paused subscription */
136
+ post: operations["resume"];
137
+ delete?: never;
138
+ options?: never;
139
+ head?: never;
140
+ patch?: never;
141
+ trace?: never;
142
+ };
143
+ "/customers/{customer_id}/subscriptions/{id}/cancel": {
144
+ parameters: {
145
+ query?: never;
146
+ header?: never;
147
+ path?: never;
148
+ cookie?: never;
149
+ };
150
+ get?: never;
151
+ put?: never;
152
+ /** Cancel a subscription */
153
+ post: operations["cancel"];
154
+ delete?: never;
155
+ options?: never;
156
+ head?: never;
157
+ patch?: never;
158
+ trace?: never;
159
+ };
160
+ "/customers/{customer_id}/subscriptions/{id}/skip_next": {
161
+ parameters: {
162
+ query?: never;
163
+ header?: never;
164
+ path?: never;
165
+ cookie?: never;
166
+ };
167
+ get?: never;
168
+ put?: never;
169
+ /** Skip the next order */
170
+ post: operations["skipNext"];
171
+ delete?: never;
172
+ options?: never;
173
+ head?: never;
174
+ patch?: never;
175
+ trace?: never;
176
+ };
177
+ "/customers/{customer_id}/subscriptions/{id}/restore_skipped_order": {
178
+ parameters: {
179
+ query?: never;
180
+ header?: never;
181
+ path?: never;
182
+ cookie?: never;
183
+ };
184
+ get?: never;
185
+ put?: never;
186
+ /** Restore a skipped order */
187
+ post: operations["restoreSkippedOrder"];
188
+ delete?: never;
189
+ options?: never;
190
+ head?: never;
191
+ patch?: never;
192
+ trace?: never;
193
+ };
194
+ "/customers/{customer_id}/subscriptions/{id}/reschedule_next_charge": {
195
+ parameters: {
196
+ query?: never;
197
+ header?: never;
198
+ path?: never;
199
+ cookie?: never;
200
+ };
201
+ get?: never;
202
+ put?: never;
203
+ /** Move the next charge to another date */
204
+ post: operations["rescheduleNextCharge"];
205
+ delete?: never;
206
+ options?: never;
207
+ head?: never;
208
+ patch?: never;
209
+ trace?: never;
210
+ };
211
+ "/customers/{customer_id}/subscriptions/{id}/update_quantity": {
212
+ parameters: {
213
+ query?: never;
214
+ header?: never;
215
+ path?: never;
216
+ cookie?: never;
217
+ };
218
+ get?: never;
219
+ put?: never;
220
+ /** Change an item's quantity */
221
+ post: operations["updateQuantity"];
222
+ delete?: never;
223
+ options?: never;
224
+ head?: never;
225
+ patch?: never;
226
+ trace?: never;
227
+ };
228
+ "/customers/{customer_id}/subscriptions/{id}/swap_product": {
229
+ parameters: {
230
+ query?: never;
231
+ header?: never;
232
+ path?: never;
233
+ cookie?: never;
234
+ };
235
+ get?: never;
236
+ put?: never;
237
+ /** Swap items for the reviewed replacements */
238
+ post: operations["swapProduct"];
239
+ delete?: never;
240
+ options?: never;
241
+ head?: never;
242
+ patch?: never;
243
+ trace?: never;
244
+ };
245
+ "/customers/{customer_id}/subscriptions/{id}/remove_item": {
246
+ parameters: {
247
+ query?: never;
248
+ header?: never;
249
+ path?: never;
250
+ cookie?: never;
251
+ };
252
+ get?: never;
253
+ put?: never;
254
+ /** Remove an item */
255
+ post: operations["removeItem"];
256
+ delete?: never;
257
+ options?: never;
258
+ head?: never;
259
+ patch?: never;
260
+ trace?: never;
261
+ };
262
+ "/customers/{customer_id}/subscriptions/{id}/change_next_order_item": {
263
+ parameters: {
264
+ query?: never;
265
+ header?: never;
266
+ path?: never;
267
+ cookie?: never;
268
+ };
269
+ get?: never;
270
+ put?: never;
271
+ /** Change or remove an item on one coming order */
272
+ post: operations["changeNextOrderItem"];
273
+ delete?: never;
274
+ options?: never;
275
+ head?: never;
276
+ patch?: never;
277
+ trace?: never;
278
+ };
279
+ "/customers/{customer_id}/subscriptions/{id}/update_frequency": {
280
+ parameters: {
281
+ query?: never;
282
+ header?: never;
283
+ path?: never;
284
+ cookie?: never;
285
+ };
286
+ get?: never;
287
+ put?: never;
288
+ /** Change how often it renews */
289
+ post: operations["updateFrequency"];
290
+ delete?: never;
291
+ options?: never;
292
+ head?: never;
293
+ patch?: never;
294
+ trace?: never;
295
+ };
296
+ "/customers/{customer_id}/subscriptions/{id}/update_shipping_address": {
297
+ parameters: {
298
+ query?: never;
299
+ header?: never;
300
+ path?: never;
301
+ cookie?: never;
302
+ };
303
+ get?: never;
304
+ put?: never;
305
+ /** Change the shipping address */
306
+ post: operations["updateShippingAddress"];
307
+ delete?: never;
308
+ options?: never;
309
+ head?: never;
310
+ patch?: never;
311
+ trace?: never;
312
+ };
313
+ "/customers/{customer_id}/subscriptions/{id}/apply_discount": {
314
+ parameters: {
315
+ query?: never;
316
+ header?: never;
317
+ path?: never;
318
+ cookie?: never;
319
+ };
320
+ get?: never;
321
+ put?: never;
322
+ /** Apply a discount code */
323
+ post: operations["applyDiscount"];
324
+ delete?: never;
325
+ options?: never;
326
+ head?: never;
327
+ patch?: never;
328
+ trace?: never;
329
+ };
330
+ "/customers/{customer_id}/subscriptions/{id}/request_payment_method_update": {
331
+ parameters: {
332
+ query?: never;
333
+ header?: never;
334
+ path?: never;
335
+ cookie?: never;
336
+ };
337
+ get?: never;
338
+ put?: never;
339
+ /** Email the customer a link to update their payment method */
340
+ post: operations["requestPaymentMethodUpdate"];
341
+ delete?: never;
342
+ options?: never;
343
+ head?: never;
344
+ patch?: never;
345
+ trace?: never;
346
+ };
347
+ "/products": {
348
+ parameters: {
349
+ query?: never;
350
+ header?: never;
351
+ path?: never;
352
+ cookie?: never;
353
+ };
354
+ /** Find products */
355
+ get: operations["searchProducts"];
356
+ put?: never;
357
+ post?: never;
358
+ delete?: never;
359
+ options?: never;
360
+ head?: never;
361
+ patch?: never;
362
+ trace?: never;
363
+ };
364
+ "/subscription_plans": {
365
+ parameters: {
366
+ query?: never;
367
+ header?: never;
368
+ path?: never;
369
+ cookie?: never;
370
+ };
371
+ /** List the priced plans a product can be subscribed to */
372
+ get: operations["listSubscriptionPlans"];
373
+ put?: never;
374
+ post?: never;
375
+ delete?: never;
376
+ options?: never;
377
+ head?: never;
378
+ patch?: never;
379
+ trace?: never;
380
+ };
381
+ "/subscription_creations/{id}": {
382
+ parameters: {
383
+ query?: never;
384
+ header?: never;
385
+ path?: never;
386
+ cookie?: never;
387
+ };
388
+ /** Follow a subscription creation until it is ready */
389
+ get: operations["getSubscriptionCreation"];
390
+ put?: never;
391
+ post?: never;
392
+ delete?: never;
393
+ options?: never;
394
+ head?: never;
395
+ patch?: never;
396
+ trace?: never;
397
+ };
398
+ "/email/messages": {
399
+ parameters: {
400
+ query?: never;
401
+ header?: never;
402
+ path?: never;
403
+ cookie?: never;
404
+ };
405
+ get?: never;
406
+ put?: never;
407
+ /** Send an email from the workspace */
408
+ post: operations["sendEmail"];
409
+ delete?: never;
410
+ options?: never;
411
+ head?: never;
412
+ patch?: never;
413
+ trace?: never;
414
+ };
415
+ }
416
+ export type webhooks = Record<string, never>;
417
+ export interface components {
418
+ schemas: {
419
+ Error: {
420
+ error: {
421
+ code: string;
422
+ message: string;
423
+ /** @enum {string} */
424
+ failure?: "permanent" | "temporary";
425
+ };
426
+ };
427
+ EmailResult: {
428
+ created: boolean;
429
+ duplicate: boolean;
430
+ dispatched: boolean;
431
+ approval_required: boolean;
432
+ provider_message_id?: string | null;
433
+ email_message?: Record<string, never> | null;
434
+ email_delivery_attempt?: Record<string, never> | null;
435
+ email_send_approval?: Record<string, never> | null;
436
+ email_bridge?: Record<string, never>;
437
+ };
438
+ };
439
+ responses: {
440
+ /** @description Refused; `failure` says whether retrying can help */
441
+ Error: {
442
+ headers: {
443
+ [name: string]: unknown;
444
+ };
445
+ content: {
446
+ "application/json": components["schemas"]["Error"];
447
+ };
448
+ };
449
+ /** @description Refused */
450
+ EmailError: {
451
+ headers: {
452
+ [name: string]: unknown;
453
+ };
454
+ content: {
455
+ "application/json": {
456
+ error: string;
457
+ };
458
+ };
459
+ };
460
+ };
461
+ parameters: {
462
+ IdempotencyKey: string;
463
+ };
464
+ requestBodies: never;
465
+ headers: never;
466
+ pathItems: never;
467
+ }
468
+ export type $defs = Record<string, never>;
469
+ export interface operations {
470
+ searchCustomers: {
471
+ parameters: {
472
+ query: {
473
+ query: string;
474
+ };
475
+ header?: never;
476
+ path?: never;
477
+ cookie?: never;
478
+ };
479
+ requestBody?: never;
480
+ responses: {
481
+ /** @description OK */
482
+ 200: {
483
+ headers: {
484
+ [name: string]: unknown;
485
+ };
486
+ content: {
487
+ "application/json": {
488
+ customers: {
489
+ customer_ref: {
490
+ /** @constant */
491
+ type: "customer_modal";
492
+ /** Format: uuid */
493
+ id: string;
494
+ };
495
+ name: string | null;
496
+ email: string | null;
497
+ phone: string | null;
498
+ address: {
499
+ address1: string | null;
500
+ address2: string | null;
501
+ city: string | null;
502
+ state: string | null;
503
+ zip_code: string | null;
504
+ country: string | null;
505
+ } | null;
506
+ }[];
507
+ has_more: boolean;
508
+ };
509
+ };
510
+ };
511
+ 401: components["responses"]["Error"];
512
+ 403: components["responses"]["Error"];
513
+ 404: components["responses"]["Error"];
514
+ 409: components["responses"]["Error"];
515
+ 422: components["responses"]["Error"];
516
+ 503: components["responses"]["Error"];
517
+ };
518
+ };
519
+ listSubscriptions: {
520
+ parameters: {
521
+ query?: {
522
+ after?: string;
523
+ };
524
+ header?: never;
525
+ path: {
526
+ customer_id: string;
527
+ };
528
+ cookie?: never;
529
+ };
530
+ requestBody?: never;
531
+ responses: {
532
+ /** @description OK */
533
+ 200: {
534
+ headers: {
535
+ [name: string]: unknown;
536
+ };
537
+ content: {
538
+ "application/json": {
539
+ active_subscriptions: {
540
+ subscription_ref: {
541
+ /** @enum {string} */
542
+ type: "customer_subscription_contract" | "recharge_subscription" | "stripe_subscription";
543
+ id: string;
544
+ };
545
+ /** @constant */
546
+ status: "active";
547
+ items: {
548
+ line_id: string | null;
549
+ product_title: string | null;
550
+ variant_title: string | null;
551
+ quantity: number | null;
552
+ unit_price: string | null;
553
+ }[] | null;
554
+ recurring_total: string | null;
555
+ currency_code: string | null;
556
+ next_charge_at: string | null;
557
+ billing_interval: string | null;
558
+ billing_interval_count: number | null;
559
+ delivery_interval: string | null;
560
+ delivery_interval_count: number | null;
561
+ created_at: string | null;
562
+ updated_at: string | null;
563
+ }[];
564
+ has_more: boolean;
565
+ observed_at: string;
566
+ next_cursor?: string | null;
567
+ };
568
+ };
569
+ };
570
+ 401: components["responses"]["Error"];
571
+ 403: components["responses"]["Error"];
572
+ 404: components["responses"]["Error"];
573
+ 409: components["responses"]["Error"];
574
+ 422: components["responses"]["Error"];
575
+ 503: components["responses"]["Error"];
576
+ };
577
+ };
578
+ createSubscription: {
579
+ parameters: {
580
+ query?: never;
581
+ header: {
582
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
583
+ };
584
+ path: {
585
+ customer_id: string;
586
+ };
587
+ cookie?: never;
588
+ };
589
+ requestBody: {
590
+ content: {
591
+ "application/json": {
592
+ subscription_selection: {
593
+ product_selection: {
594
+ product_record_id: string;
595
+ /** @constant */
596
+ provider: "shopify";
597
+ product_id: string;
598
+ variant_id: string;
599
+ product_card_id: string | null;
600
+ };
601
+ plan_ref: {
602
+ selling_plan_group_id: string;
603
+ selling_plan_id: string;
604
+ };
605
+ plan_name: string;
606
+ /** @enum {string} */
607
+ kind: "subscription" | "pre_order" | "try_before_you_buy";
608
+ group_name: string | null;
609
+ /** @enum {string} */
610
+ billing_interval: "DAY" | "WEEK" | "MONTH" | "YEAR";
611
+ billing_interval_count: number;
612
+ /** @enum {string} */
613
+ delivery_interval: "DAY" | "WEEK" | "MONTH" | "YEAR";
614
+ delivery_interval_count: number;
615
+ price_adjustment: {
616
+ /** @enum {string} */
617
+ type: "percentage" | "fixed_amount" | "none";
618
+ value: string | null;
619
+ };
620
+ variant_price_amount: string;
621
+ currency: string;
622
+ };
623
+ quantity: number;
624
+ first_billing_date: string;
625
+ discount?: {
626
+ /** @constant */
627
+ value_type: "percentage";
628
+ value: number;
629
+ title?: string | null;
630
+ } | {
631
+ /** @constant */
632
+ value_type: "fixed_amount";
633
+ value: number;
634
+ title?: string | null;
635
+ } | null;
636
+ shipping_address?: {
637
+ first_name?: string | null;
638
+ last_name?: string | null;
639
+ address1: string;
640
+ address2?: string | null;
641
+ city: string;
642
+ province_code?: string | null;
643
+ country_code: string;
644
+ zip?: string | null;
645
+ phone?: string | null;
646
+ } | null;
647
+ };
648
+ };
649
+ };
650
+ responses: {
651
+ /** @description Created */
652
+ 201: {
653
+ headers: {
654
+ [name: string]: unknown;
655
+ };
656
+ content: {
657
+ "application/json": {
658
+ id: string;
659
+ } & {
660
+ /** @constant */
661
+ status: "created";
662
+ subscription_contract_id: string;
663
+ requested_first_billing_date: string;
664
+ next_billing_date: string | null;
665
+ contract_status: string | null;
666
+ /** @enum {string|null} */
667
+ billing_interval: "DAY" | "WEEK" | "MONTH" | "YEAR" | null;
668
+ billing_interval_count: number | null;
669
+ unit_price: string;
670
+ currency: string;
671
+ };
672
+ };
673
+ };
674
+ 401: components["responses"]["Error"];
675
+ 403: components["responses"]["Error"];
676
+ 404: components["responses"]["Error"];
677
+ 409: components["responses"]["Error"];
678
+ 422: components["responses"]["Error"];
679
+ 503: components["responses"]["Error"];
680
+ };
681
+ };
682
+ getSubscription: {
683
+ parameters: {
684
+ query?: never;
685
+ header?: never;
686
+ path: {
687
+ customer_id: string;
688
+ id: string;
689
+ };
690
+ cookie?: never;
691
+ };
692
+ requestBody?: never;
693
+ responses: {
694
+ /** @description OK */
695
+ 200: {
696
+ headers: {
697
+ [name: string]: unknown;
698
+ };
699
+ content: {
700
+ "application/json": {
701
+ subscription: {
702
+ subscription_ref: {
703
+ /** @enum {string} */
704
+ type: "customer_subscription_contract";
705
+ id: string;
706
+ };
707
+ status: string | null;
708
+ items: {
709
+ line_id: string | null;
710
+ product_title: string | null;
711
+ variant_title: string | null;
712
+ quantity: number | null;
713
+ unit_price: string | null;
714
+ }[] | null;
715
+ recurring_total: string | null;
716
+ currency_code: string | null;
717
+ next_charge_at: string | null;
718
+ billing_interval: string | null;
719
+ billing_interval_count: number | null;
720
+ delivery_interval: string | null;
721
+ delivery_interval_count: number | null;
722
+ created_at: string | null;
723
+ updated_at: string | null;
724
+ paused_at: string | null;
725
+ resumes_at: string | null;
726
+ pause_at: string | null;
727
+ cancel_at: string | null;
728
+ cancelled_at: string | null;
729
+ delivery_address: {
730
+ firstName: string | null;
731
+ lastName: string | null;
732
+ address1: string | null;
733
+ address2: string | null;
734
+ city: string | null;
735
+ company: string | null;
736
+ provinceCode: string | null;
737
+ zip: string | null;
738
+ countryCode: string | null;
739
+ phone: string | null;
740
+ } | null;
741
+ payment_method: {
742
+ kind: string | null;
743
+ brand: string | null;
744
+ last_digits: string | null;
745
+ expiry_month: number | null;
746
+ expiry_year: number | null;
747
+ expires_soon: boolean;
748
+ revoked: boolean;
749
+ } | null;
750
+ };
751
+ };
752
+ };
753
+ };
754
+ 401: components["responses"]["Error"];
755
+ 403: components["responses"]["Error"];
756
+ 404: components["responses"]["Error"];
757
+ 409: components["responses"]["Error"];
758
+ 422: components["responses"]["Error"];
759
+ 503: components["responses"]["Error"];
760
+ };
761
+ };
762
+ listUpcomingOrders: {
763
+ parameters: {
764
+ query?: never;
765
+ header?: never;
766
+ path: {
767
+ customer_id: string;
768
+ id: string;
769
+ };
770
+ cookie?: never;
771
+ };
772
+ requestBody?: never;
773
+ responses: {
774
+ /** @description OK */
775
+ 200: {
776
+ headers: {
777
+ [name: string]: unknown;
778
+ };
779
+ content: {
780
+ "application/json": {
781
+ subscription_ref: {
782
+ /** @enum {string} */
783
+ type: "customer_subscription_contract" | "recharge_subscription" | "stripe_subscription";
784
+ id: string;
785
+ };
786
+ currency_code: string | null;
787
+ orders: {
788
+ scheduled_at: string;
789
+ cycle_index: number;
790
+ charge_on: string;
791
+ next_order: boolean;
792
+ items: {
793
+ line_id: string;
794
+ product_title: string | null;
795
+ variant_title: string | null;
796
+ quantity: number;
797
+ unit_price: string | null;
798
+ this_order_only: boolean;
799
+ every_order_quantity: number | null;
800
+ }[];
801
+ }[];
802
+ skipped_orders: {
803
+ scheduled_at: string;
804
+ cycle_index: number;
805
+ }[];
806
+ };
807
+ };
808
+ };
809
+ 401: components["responses"]["Error"];
810
+ 403: components["responses"]["Error"];
811
+ 404: components["responses"]["Error"];
812
+ 409: components["responses"]["Error"];
813
+ 422: components["responses"]["Error"];
814
+ 503: components["responses"]["Error"];
815
+ };
816
+ };
817
+ listSwapOptions: {
818
+ parameters: {
819
+ query?: never;
820
+ header?: never;
821
+ path: {
822
+ customer_id: string;
823
+ id: string;
824
+ };
825
+ cookie?: never;
826
+ };
827
+ requestBody?: never;
828
+ responses: {
829
+ /** @description OK */
830
+ 200: {
831
+ headers: {
832
+ [name: string]: unknown;
833
+ };
834
+ content: {
835
+ "application/json": {
836
+ subscription: {
837
+ subscription_ref: {
838
+ /** @constant */
839
+ type: "customer_subscription_contract";
840
+ id: string;
841
+ };
842
+ lines: {
843
+ line_id: string;
844
+ product_title: string | null;
845
+ variant_title: string | null;
846
+ quantity: number | null;
847
+ unit_price: string | null;
848
+ replacements: {
849
+ selected_options: {
850
+ name: string;
851
+ value: string;
852
+ }[] | null;
853
+ sku: string | null;
854
+ price_amount: string | null;
855
+ compare_at_price_amount: string | null;
856
+ currency: string;
857
+ available_for_sale: boolean | null;
858
+ inventory: {
859
+ quantity: number | null;
860
+ /** @enum {string|null} */
861
+ policy: "deny" | "continue" | null;
862
+ tracked: boolean | null;
863
+ };
864
+ purchase_options: {
865
+ plan_ref: {
866
+ selling_plan_group_id: string;
867
+ selling_plan_id: string;
868
+ };
869
+ plan_name: string;
870
+ /** @enum {string} */
871
+ kind: "subscription" | "pre_order" | "try_before_you_buy";
872
+ price_adjustment: {
873
+ /** @enum {string} */
874
+ type: "percentage" | "fixed_amount" | "price";
875
+ value: string;
876
+ } | null;
877
+ subscription: {
878
+ billing_interval: string | null;
879
+ billing_interval_count: number | null;
880
+ delivery_interval: string | null;
881
+ delivery_interval_count: number | null;
882
+ } | null;
883
+ pre_order: {
884
+ ships: {
885
+ /** @enum {string} */
886
+ timing: "asap" | "on_date" | "unknown";
887
+ date: string | null;
888
+ } | null;
889
+ checkout_charge: {
890
+ /** @enum {string} */
891
+ type: "full" | "deposit";
892
+ percentage: string | null;
893
+ amount: string | null;
894
+ } | null;
895
+ balance_charge: {
896
+ /** @enum {string} */
897
+ timing: "none" | "on_date" | "days_after_checkout";
898
+ date: string | null;
899
+ days_after_checkout: number | null;
900
+ } | null;
901
+ } | null;
902
+ try_before_you_buy: {
903
+ ships: {
904
+ /** @enum {string} */
905
+ timing: "asap" | "on_date" | "unknown";
906
+ date: string | null;
907
+ } | null;
908
+ checkout_charge: {
909
+ /** @enum {string} */
910
+ type: "full" | "deposit";
911
+ percentage: string | null;
912
+ amount: string | null;
913
+ } | null;
914
+ balance_charge: {
915
+ /** @enum {string} */
916
+ timing: "none" | "on_date" | "days_after_checkout";
917
+ date: string | null;
918
+ days_after_checkout: number | null;
919
+ } | null;
920
+ } | null;
921
+ }[];
922
+ product_id: string;
923
+ variant_id: string;
924
+ title: string;
925
+ variant_title: string;
926
+ unit_price: string;
927
+ quantity: number;
928
+ }[];
929
+ }[];
930
+ };
931
+ };
932
+ };
933
+ };
934
+ 401: components["responses"]["Error"];
935
+ 403: components["responses"]["Error"];
936
+ 404: components["responses"]["Error"];
937
+ 409: components["responses"]["Error"];
938
+ 422: components["responses"]["Error"];
939
+ 503: components["responses"]["Error"];
940
+ };
941
+ };
942
+ orderNow: {
943
+ parameters: {
944
+ query?: never;
945
+ header: {
946
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
947
+ };
948
+ path: {
949
+ customer_id: string;
950
+ id: string;
951
+ };
952
+ cookie?: never;
953
+ };
954
+ requestBody: {
955
+ content: {
956
+ "application/json": {
957
+ billing_occurrence: {
958
+ cycle_index: number;
959
+ scheduled_at: string;
960
+ };
961
+ };
962
+ };
963
+ };
964
+ responses: {
965
+ /** @description OK */
966
+ 200: {
967
+ headers: {
968
+ [name: string]: unknown;
969
+ };
970
+ content: {
971
+ "application/json": {
972
+ /** @constant */
973
+ status: "placed";
974
+ next_charge_at: string | null;
975
+ } | {
976
+ /** @constant */
977
+ status: "needs_payment_approval";
978
+ /** Format: uri */
979
+ payment_approval_url: string;
980
+ };
981
+ };
982
+ };
983
+ /** @description Still charging: repeat the request with the same Idempotency-Key */
984
+ 202: {
985
+ headers: {
986
+ [name: string]: unknown;
987
+ };
988
+ content: {
989
+ "application/json": {
990
+ /** @constant */
991
+ status: "processing";
992
+ };
993
+ };
994
+ };
995
+ 401: components["responses"]["Error"];
996
+ 403: components["responses"]["Error"];
997
+ 404: components["responses"]["Error"];
998
+ 409: components["responses"]["Error"];
999
+ 422: components["responses"]["Error"];
1000
+ 503: components["responses"]["Error"];
1001
+ };
1002
+ };
1003
+ pause: {
1004
+ parameters: {
1005
+ query?: never;
1006
+ header: {
1007
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1008
+ };
1009
+ path: {
1010
+ customer_id: string;
1011
+ id: string;
1012
+ };
1013
+ cookie?: never;
1014
+ };
1015
+ requestBody: {
1016
+ content: {
1017
+ "application/json": {
1018
+ /** Format: date */
1019
+ resume_on?: string | null;
1020
+ };
1021
+ };
1022
+ };
1023
+ responses: {
1024
+ /** @description OK */
1025
+ 200: {
1026
+ headers: {
1027
+ [name: string]: unknown;
1028
+ };
1029
+ content: {
1030
+ "application/json": {
1031
+ provider: string;
1032
+ subscription: {
1033
+ id: string;
1034
+ shopify_id?: string;
1035
+ provider?: string;
1036
+ status: string;
1037
+ /** Format: date */
1038
+ resume_on?: string;
1039
+ };
1040
+ };
1041
+ };
1042
+ };
1043
+ 401: components["responses"]["Error"];
1044
+ 403: components["responses"]["Error"];
1045
+ 404: components["responses"]["Error"];
1046
+ 409: components["responses"]["Error"];
1047
+ 422: components["responses"]["Error"];
1048
+ 503: components["responses"]["Error"];
1049
+ };
1050
+ };
1051
+ resume: {
1052
+ parameters: {
1053
+ query?: never;
1054
+ header: {
1055
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1056
+ };
1057
+ path: {
1058
+ customer_id: string;
1059
+ id: string;
1060
+ };
1061
+ cookie?: never;
1062
+ };
1063
+ requestBody: {
1064
+ content: {
1065
+ "application/json": {
1066
+ /** Format: date */
1067
+ next_billing_date?: string;
1068
+ notify_customer?: boolean;
1069
+ };
1070
+ };
1071
+ };
1072
+ responses: {
1073
+ /** @description OK */
1074
+ 200: {
1075
+ headers: {
1076
+ [name: string]: unknown;
1077
+ };
1078
+ content: {
1079
+ "application/json": {
1080
+ provider: string;
1081
+ subscription: {
1082
+ id: string;
1083
+ shopify_id?: string;
1084
+ provider?: string;
1085
+ status: string;
1086
+ /** Format: date */
1087
+ next_billing_date?: string;
1088
+ one_time_items?: Record<string, never>;
1089
+ };
1090
+ };
1091
+ };
1092
+ };
1093
+ 401: components["responses"]["Error"];
1094
+ 403: components["responses"]["Error"];
1095
+ 404: components["responses"]["Error"];
1096
+ 409: components["responses"]["Error"];
1097
+ 422: components["responses"]["Error"];
1098
+ 503: components["responses"]["Error"];
1099
+ };
1100
+ };
1101
+ cancel: {
1102
+ parameters: {
1103
+ query?: never;
1104
+ header: {
1105
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1106
+ };
1107
+ path: {
1108
+ customer_id: string;
1109
+ id: string;
1110
+ };
1111
+ cookie?: never;
1112
+ };
1113
+ requestBody?: never;
1114
+ responses: {
1115
+ /** @description OK */
1116
+ 200: {
1117
+ headers: {
1118
+ [name: string]: unknown;
1119
+ };
1120
+ content: {
1121
+ "application/json": {
1122
+ subscription_ref: {
1123
+ /** @enum {string} */
1124
+ type: "customer_subscription_contract" | "recharge_subscription" | "stripe_subscription";
1125
+ id: string;
1126
+ };
1127
+ /** @constant */
1128
+ status: "cancelled";
1129
+ };
1130
+ };
1131
+ };
1132
+ 401: components["responses"]["Error"];
1133
+ 403: components["responses"]["Error"];
1134
+ 404: components["responses"]["Error"];
1135
+ 409: components["responses"]["Error"];
1136
+ 422: components["responses"]["Error"];
1137
+ 503: components["responses"]["Error"];
1138
+ };
1139
+ };
1140
+ skipNext: {
1141
+ parameters: {
1142
+ query?: never;
1143
+ header: {
1144
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1145
+ };
1146
+ path: {
1147
+ customer_id: string;
1148
+ id: string;
1149
+ };
1150
+ cookie?: never;
1151
+ };
1152
+ requestBody: {
1153
+ content: {
1154
+ "application/json": {
1155
+ next_charge_at: string;
1156
+ };
1157
+ };
1158
+ };
1159
+ responses: {
1160
+ /** @description OK */
1161
+ 200: {
1162
+ headers: {
1163
+ [name: string]: unknown;
1164
+ };
1165
+ content: {
1166
+ "application/json": {
1167
+ subscription_ref: {
1168
+ /** @enum {string} */
1169
+ type: "customer_subscription_contract" | "recharge_subscription" | "stripe_subscription";
1170
+ id: string;
1171
+ };
1172
+ skipped_charge_at: string;
1173
+ /** @constant */
1174
+ status: "skipped";
1175
+ };
1176
+ };
1177
+ };
1178
+ 401: components["responses"]["Error"];
1179
+ 403: components["responses"]["Error"];
1180
+ 404: components["responses"]["Error"];
1181
+ 409: components["responses"]["Error"];
1182
+ 422: components["responses"]["Error"];
1183
+ 503: components["responses"]["Error"];
1184
+ };
1185
+ };
1186
+ restoreSkippedOrder: {
1187
+ parameters: {
1188
+ query?: never;
1189
+ header: {
1190
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1191
+ };
1192
+ path: {
1193
+ customer_id: string;
1194
+ id: string;
1195
+ };
1196
+ cookie?: never;
1197
+ };
1198
+ requestBody: {
1199
+ content: {
1200
+ "application/json": {
1201
+ scheduled_at: string;
1202
+ };
1203
+ };
1204
+ };
1205
+ responses: {
1206
+ /** @description OK */
1207
+ 200: {
1208
+ headers: {
1209
+ [name: string]: unknown;
1210
+ };
1211
+ content: {
1212
+ "application/json": {
1213
+ provider: string;
1214
+ subscription: {
1215
+ id: string;
1216
+ shopify_id?: string;
1217
+ provider?: string;
1218
+ status: string;
1219
+ restored_charge_at?: string;
1220
+ };
1221
+ };
1222
+ };
1223
+ };
1224
+ 401: components["responses"]["Error"];
1225
+ 403: components["responses"]["Error"];
1226
+ 404: components["responses"]["Error"];
1227
+ 409: components["responses"]["Error"];
1228
+ 422: components["responses"]["Error"];
1229
+ 503: components["responses"]["Error"];
1230
+ };
1231
+ };
1232
+ rescheduleNextCharge: {
1233
+ parameters: {
1234
+ query?: never;
1235
+ header: {
1236
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1237
+ };
1238
+ path: {
1239
+ customer_id: string;
1240
+ id: string;
1241
+ };
1242
+ cookie?: never;
1243
+ };
1244
+ requestBody: {
1245
+ content: {
1246
+ "application/json": {
1247
+ /** Format: date */
1248
+ next_billing_date: string;
1249
+ };
1250
+ };
1251
+ };
1252
+ responses: {
1253
+ /** @description OK */
1254
+ 200: {
1255
+ headers: {
1256
+ [name: string]: unknown;
1257
+ };
1258
+ content: {
1259
+ "application/json": {
1260
+ provider: string;
1261
+ subscription: {
1262
+ id: string;
1263
+ shopify_id?: string;
1264
+ provider?: string;
1265
+ status: string;
1266
+ /** Format: date */
1267
+ next_billing_date?: string;
1268
+ one_time_items?: Record<string, never>;
1269
+ };
1270
+ };
1271
+ };
1272
+ };
1273
+ 401: components["responses"]["Error"];
1274
+ 403: components["responses"]["Error"];
1275
+ 404: components["responses"]["Error"];
1276
+ 409: components["responses"]["Error"];
1277
+ 422: components["responses"]["Error"];
1278
+ 503: components["responses"]["Error"];
1279
+ };
1280
+ };
1281
+ updateQuantity: {
1282
+ parameters: {
1283
+ query?: never;
1284
+ header: {
1285
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1286
+ };
1287
+ path: {
1288
+ customer_id: string;
1289
+ id: string;
1290
+ };
1291
+ cookie?: never;
1292
+ };
1293
+ requestBody: {
1294
+ content: {
1295
+ "application/json": {
1296
+ line_id?: string;
1297
+ quantity: number;
1298
+ };
1299
+ };
1300
+ };
1301
+ responses: {
1302
+ /** @description OK */
1303
+ 200: {
1304
+ headers: {
1305
+ [name: string]: unknown;
1306
+ };
1307
+ content: {
1308
+ "application/json": {
1309
+ provider: string;
1310
+ subscription: {
1311
+ id: string;
1312
+ shopify_id?: string;
1313
+ provider?: string;
1314
+ status: string;
1315
+ line?: {
1316
+ id?: string;
1317
+ quantity?: number;
1318
+ };
1319
+ };
1320
+ };
1321
+ };
1322
+ };
1323
+ 401: components["responses"]["Error"];
1324
+ 403: components["responses"]["Error"];
1325
+ 404: components["responses"]["Error"];
1326
+ 409: components["responses"]["Error"];
1327
+ 422: components["responses"]["Error"];
1328
+ 503: components["responses"]["Error"];
1329
+ };
1330
+ };
1331
+ swapProduct: {
1332
+ parameters: {
1333
+ query?: never;
1334
+ header: {
1335
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1336
+ };
1337
+ path: {
1338
+ customer_id: string;
1339
+ id: string;
1340
+ };
1341
+ cookie?: never;
1342
+ };
1343
+ requestBody: {
1344
+ content: {
1345
+ "application/json": {
1346
+ replacements: {
1347
+ line_id: string;
1348
+ variant_id: string;
1349
+ plan_id?: string;
1350
+ expected_unit_price?: string;
1351
+ currency?: string;
1352
+ expected_quantity?: number;
1353
+ }[];
1354
+ };
1355
+ };
1356
+ };
1357
+ responses: {
1358
+ /** @description OK */
1359
+ 200: {
1360
+ headers: {
1361
+ [name: string]: unknown;
1362
+ };
1363
+ content: {
1364
+ "application/json": {
1365
+ provider: string;
1366
+ subscription: {
1367
+ id: string;
1368
+ shopify_id?: string;
1369
+ provider?: string;
1370
+ status: string;
1371
+ lines?: Record<string, never>[];
1372
+ };
1373
+ };
1374
+ };
1375
+ };
1376
+ 401: components["responses"]["Error"];
1377
+ 403: components["responses"]["Error"];
1378
+ 404: components["responses"]["Error"];
1379
+ 409: components["responses"]["Error"];
1380
+ 422: components["responses"]["Error"];
1381
+ 503: components["responses"]["Error"];
1382
+ };
1383
+ };
1384
+ removeItem: {
1385
+ parameters: {
1386
+ query?: never;
1387
+ header: {
1388
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1389
+ };
1390
+ path: {
1391
+ customer_id: string;
1392
+ id: string;
1393
+ };
1394
+ cookie?: never;
1395
+ };
1396
+ requestBody: {
1397
+ content: {
1398
+ "application/json": {
1399
+ line_id: string;
1400
+ };
1401
+ };
1402
+ };
1403
+ responses: {
1404
+ /** @description OK */
1405
+ 200: {
1406
+ headers: {
1407
+ [name: string]: unknown;
1408
+ };
1409
+ content: {
1410
+ "application/json": {
1411
+ provider: string;
1412
+ subscription: {
1413
+ id: string;
1414
+ shopify_id?: string;
1415
+ provider?: string;
1416
+ status: string;
1417
+ removed_line_id?: string;
1418
+ };
1419
+ };
1420
+ };
1421
+ };
1422
+ 401: components["responses"]["Error"];
1423
+ 403: components["responses"]["Error"];
1424
+ 404: components["responses"]["Error"];
1425
+ 409: components["responses"]["Error"];
1426
+ 422: components["responses"]["Error"];
1427
+ 503: components["responses"]["Error"];
1428
+ };
1429
+ };
1430
+ changeNextOrderItem: {
1431
+ parameters: {
1432
+ query?: never;
1433
+ header: {
1434
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1435
+ };
1436
+ path: {
1437
+ customer_id: string;
1438
+ id: string;
1439
+ };
1440
+ cookie?: never;
1441
+ };
1442
+ requestBody: {
1443
+ content: {
1444
+ "application/json": {
1445
+ billing_occurrence: {
1446
+ cycle_index: number;
1447
+ scheduled_at: string;
1448
+ };
1449
+ line_id: string;
1450
+ remove?: boolean;
1451
+ quantity?: number;
1452
+ };
1453
+ };
1454
+ };
1455
+ responses: {
1456
+ /** @description OK */
1457
+ 200: {
1458
+ headers: {
1459
+ [name: string]: unknown;
1460
+ };
1461
+ content: {
1462
+ "application/json": {
1463
+ provider: string;
1464
+ subscription: {
1465
+ id: string;
1466
+ shopify_id?: string;
1467
+ provider?: string;
1468
+ status: string;
1469
+ next_order?: Record<string, never>;
1470
+ };
1471
+ };
1472
+ };
1473
+ };
1474
+ 401: components["responses"]["Error"];
1475
+ 403: components["responses"]["Error"];
1476
+ 404: components["responses"]["Error"];
1477
+ 409: components["responses"]["Error"];
1478
+ 422: components["responses"]["Error"];
1479
+ 503: components["responses"]["Error"];
1480
+ };
1481
+ };
1482
+ updateFrequency: {
1483
+ parameters: {
1484
+ query?: never;
1485
+ header: {
1486
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1487
+ };
1488
+ path: {
1489
+ customer_id: string;
1490
+ id: string;
1491
+ };
1492
+ cookie?: never;
1493
+ };
1494
+ requestBody: {
1495
+ content: {
1496
+ "application/json": {
1497
+ /** @enum {string} */
1498
+ interval: "day" | "week" | "month" | "year";
1499
+ interval_count: number;
1500
+ };
1501
+ };
1502
+ };
1503
+ responses: {
1504
+ /** @description OK */
1505
+ 200: {
1506
+ headers: {
1507
+ [name: string]: unknown;
1508
+ };
1509
+ content: {
1510
+ "application/json": {
1511
+ provider: string;
1512
+ subscription: {
1513
+ id: string;
1514
+ shopify_id?: string;
1515
+ provider?: string;
1516
+ status: string;
1517
+ billing_policy?: {
1518
+ interval?: string;
1519
+ interval_count?: number;
1520
+ };
1521
+ };
1522
+ };
1523
+ };
1524
+ };
1525
+ 401: components["responses"]["Error"];
1526
+ 403: components["responses"]["Error"];
1527
+ 404: components["responses"]["Error"];
1528
+ 409: components["responses"]["Error"];
1529
+ 422: components["responses"]["Error"];
1530
+ 503: components["responses"]["Error"];
1531
+ };
1532
+ };
1533
+ updateShippingAddress: {
1534
+ parameters: {
1535
+ query?: never;
1536
+ header: {
1537
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1538
+ };
1539
+ path: {
1540
+ customer_id: string;
1541
+ id: string;
1542
+ };
1543
+ cookie?: never;
1544
+ };
1545
+ requestBody: {
1546
+ content: {
1547
+ "application/json": {
1548
+ address: {
1549
+ firstName?: string | null;
1550
+ lastName?: string | null;
1551
+ address1?: string | null;
1552
+ address2?: string | null;
1553
+ city?: string | null;
1554
+ company?: string | null;
1555
+ provinceCode?: string | null;
1556
+ zip?: string | null;
1557
+ countryCode?: string | null;
1558
+ phone?: string | null;
1559
+ };
1560
+ };
1561
+ };
1562
+ };
1563
+ responses: {
1564
+ /** @description OK */
1565
+ 200: {
1566
+ headers: {
1567
+ [name: string]: unknown;
1568
+ };
1569
+ content: {
1570
+ "application/json": {
1571
+ provider: string;
1572
+ subscription: {
1573
+ id: string;
1574
+ shopify_id?: string;
1575
+ provider?: string;
1576
+ status: string;
1577
+ address?: Record<string, never>;
1578
+ };
1579
+ };
1580
+ };
1581
+ };
1582
+ 401: components["responses"]["Error"];
1583
+ 403: components["responses"]["Error"];
1584
+ 404: components["responses"]["Error"];
1585
+ 409: components["responses"]["Error"];
1586
+ 422: components["responses"]["Error"];
1587
+ 503: components["responses"]["Error"];
1588
+ };
1589
+ };
1590
+ applyDiscount: {
1591
+ parameters: {
1592
+ query?: never;
1593
+ header: {
1594
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1595
+ };
1596
+ path: {
1597
+ customer_id: string;
1598
+ id: string;
1599
+ };
1600
+ cookie?: never;
1601
+ };
1602
+ requestBody: {
1603
+ content: {
1604
+ "application/json": {
1605
+ discount_code: string;
1606
+ };
1607
+ };
1608
+ };
1609
+ responses: {
1610
+ /** @description OK */
1611
+ 200: {
1612
+ headers: {
1613
+ [name: string]: unknown;
1614
+ };
1615
+ content: {
1616
+ "application/json": {
1617
+ provider: string;
1618
+ subscription: {
1619
+ id: string;
1620
+ shopify_id?: string;
1621
+ provider?: string;
1622
+ status: string;
1623
+ discount_code?: string;
1624
+ };
1625
+ };
1626
+ };
1627
+ };
1628
+ 401: components["responses"]["Error"];
1629
+ 403: components["responses"]["Error"];
1630
+ 404: components["responses"]["Error"];
1631
+ 409: components["responses"]["Error"];
1632
+ 422: components["responses"]["Error"];
1633
+ 503: components["responses"]["Error"];
1634
+ };
1635
+ };
1636
+ requestPaymentMethodUpdate: {
1637
+ parameters: {
1638
+ query?: never;
1639
+ header: {
1640
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
1641
+ };
1642
+ path: {
1643
+ customer_id: string;
1644
+ id: string;
1645
+ };
1646
+ cookie?: never;
1647
+ };
1648
+ requestBody?: never;
1649
+ responses: {
1650
+ /** @description OK */
1651
+ 200: {
1652
+ headers: {
1653
+ [name: string]: unknown;
1654
+ };
1655
+ content: {
1656
+ "application/json": {
1657
+ /** @constant */
1658
+ status: "requested";
1659
+ /** @enum {string} */
1660
+ channel: "shopify_email" | "recharge_hosted_url";
1661
+ payment_method: {
1662
+ kind: string;
1663
+ brand: string | null;
1664
+ last_digits: string | null;
1665
+ } | null;
1666
+ hosted_checkout_url: string | null;
1667
+ };
1668
+ };
1669
+ };
1670
+ 401: components["responses"]["Error"];
1671
+ 403: components["responses"]["Error"];
1672
+ 404: components["responses"]["Error"];
1673
+ 409: components["responses"]["Error"];
1674
+ 422: components["responses"]["Error"];
1675
+ 503: components["responses"]["Error"];
1676
+ };
1677
+ };
1678
+ searchProducts: {
1679
+ parameters: {
1680
+ query: {
1681
+ query: string;
1682
+ };
1683
+ header?: never;
1684
+ path?: never;
1685
+ cookie?: never;
1686
+ };
1687
+ requestBody?: never;
1688
+ responses: {
1689
+ /** @description OK */
1690
+ 200: {
1691
+ headers: {
1692
+ [name: string]: unknown;
1693
+ };
1694
+ content: {
1695
+ "application/json": {
1696
+ matches: {
1697
+ title: string;
1698
+ description: string;
1699
+ image_url: string | null;
1700
+ status: string;
1701
+ options: {
1702
+ name: string;
1703
+ values: string[];
1704
+ }[] | null;
1705
+ requires_selling_plan: boolean | null;
1706
+ /** @enum {string} */
1707
+ stock_status: "in_stock" | "low_stock" | "out_of_stock" | "untracked" | "unknown";
1708
+ product_kind: string;
1709
+ commerce_role: string;
1710
+ selections: {
1711
+ product_selection: {
1712
+ product_record_id: string;
1713
+ provider: string;
1714
+ product_id: string;
1715
+ variant_id: string | null;
1716
+ product_card_id: string | null;
1717
+ };
1718
+ variant_title: string | null;
1719
+ selected_options: {
1720
+ name: string;
1721
+ value: string;
1722
+ }[] | null;
1723
+ sku: string | null;
1724
+ price_amount: string | null;
1725
+ compare_at_price_amount: string | null;
1726
+ currency: string | null;
1727
+ available_for_sale: boolean | null;
1728
+ inventory: {
1729
+ quantity: number | null;
1730
+ /** @enum {string|null} */
1731
+ policy: "deny" | "continue" | null;
1732
+ tracked: boolean | null;
1733
+ };
1734
+ purchase_options: {
1735
+ plan_ref: {
1736
+ selling_plan_group_id: string;
1737
+ selling_plan_id: string;
1738
+ };
1739
+ plan_name: string;
1740
+ /** @enum {string} */
1741
+ kind: "subscription" | "pre_order" | "try_before_you_buy";
1742
+ price_adjustment: {
1743
+ /** @enum {string} */
1744
+ type: "percentage" | "fixed_amount" | "price";
1745
+ value: string;
1746
+ } | null;
1747
+ subscription: {
1748
+ billing_interval: string | null;
1749
+ billing_interval_count: number | null;
1750
+ delivery_interval: string | null;
1751
+ delivery_interval_count: number | null;
1752
+ } | null;
1753
+ pre_order: {
1754
+ ships: {
1755
+ /** @enum {string} */
1756
+ timing: "asap" | "on_date" | "unknown";
1757
+ date: string | null;
1758
+ } | null;
1759
+ checkout_charge: {
1760
+ /** @enum {string} */
1761
+ type: "full" | "deposit";
1762
+ percentage: string | null;
1763
+ amount: string | null;
1764
+ } | null;
1765
+ balance_charge: {
1766
+ /** @enum {string} */
1767
+ timing: "none" | "on_date" | "days_after_checkout";
1768
+ date: string | null;
1769
+ days_after_checkout: number | null;
1770
+ } | null;
1771
+ } | null;
1772
+ try_before_you_buy: {
1773
+ ships: {
1774
+ /** @enum {string} */
1775
+ timing: "asap" | "on_date" | "unknown";
1776
+ date: string | null;
1777
+ } | null;
1778
+ checkout_charge: {
1779
+ /** @enum {string} */
1780
+ type: "full" | "deposit";
1781
+ percentage: string | null;
1782
+ amount: string | null;
1783
+ } | null;
1784
+ balance_charge: {
1785
+ /** @enum {string} */
1786
+ timing: "none" | "on_date" | "days_after_checkout";
1787
+ date: string | null;
1788
+ days_after_checkout: number | null;
1789
+ } | null;
1790
+ } | null;
1791
+ }[];
1792
+ }[];
1793
+ }[];
1794
+ has_more: boolean;
1795
+ };
1796
+ };
1797
+ };
1798
+ 401: components["responses"]["Error"];
1799
+ 403: components["responses"]["Error"];
1800
+ 404: components["responses"]["Error"];
1801
+ 409: components["responses"]["Error"];
1802
+ 422: components["responses"]["Error"];
1803
+ 503: components["responses"]["Error"];
1804
+ };
1805
+ };
1806
+ listSubscriptionPlans: {
1807
+ parameters: {
1808
+ query: {
1809
+ product_selection: {
1810
+ product_record_id: string;
1811
+ /** @constant */
1812
+ provider: "shopify";
1813
+ product_id: string;
1814
+ variant_id: string;
1815
+ product_card_id: string | null;
1816
+ };
1817
+ plan_ref?: {
1818
+ selling_plan_group_id: string;
1819
+ selling_plan_id: string;
1820
+ };
1821
+ };
1822
+ header?: never;
1823
+ path?: never;
1824
+ cookie?: never;
1825
+ };
1826
+ requestBody?: never;
1827
+ responses: {
1828
+ /** @description OK */
1829
+ 200: {
1830
+ headers: {
1831
+ [name: string]: unknown;
1832
+ };
1833
+ content: {
1834
+ "application/json": {
1835
+ subscription_selections: {
1836
+ product_selection: {
1837
+ product_record_id: string;
1838
+ /** @constant */
1839
+ provider: "shopify";
1840
+ product_id: string;
1841
+ variant_id: string;
1842
+ product_card_id: string | null;
1843
+ };
1844
+ plan_ref: {
1845
+ selling_plan_group_id: string;
1846
+ selling_plan_id: string;
1847
+ };
1848
+ plan_name: string;
1849
+ /** @enum {string} */
1850
+ kind: "subscription" | "pre_order" | "try_before_you_buy";
1851
+ group_name: string | null;
1852
+ /** @enum {string} */
1853
+ billing_interval: "DAY" | "WEEK" | "MONTH" | "YEAR";
1854
+ billing_interval_count: number;
1855
+ /** @enum {string} */
1856
+ delivery_interval: "DAY" | "WEEK" | "MONTH" | "YEAR";
1857
+ delivery_interval_count: number;
1858
+ price_adjustment: {
1859
+ /** @enum {string} */
1860
+ type: "percentage" | "fixed_amount" | "none";
1861
+ value: string | null;
1862
+ };
1863
+ variant_price_amount: string;
1864
+ currency: string;
1865
+ }[];
1866
+ has_more: boolean;
1867
+ };
1868
+ };
1869
+ };
1870
+ 401: components["responses"]["Error"];
1871
+ 403: components["responses"]["Error"];
1872
+ 404: components["responses"]["Error"];
1873
+ 409: components["responses"]["Error"];
1874
+ 422: components["responses"]["Error"];
1875
+ 503: components["responses"]["Error"];
1876
+ };
1877
+ };
1878
+ getSubscriptionCreation: {
1879
+ parameters: {
1880
+ query?: never;
1881
+ header?: never;
1882
+ path: {
1883
+ id: string;
1884
+ };
1885
+ cookie?: never;
1886
+ };
1887
+ requestBody?: never;
1888
+ responses: {
1889
+ /** @description OK */
1890
+ 200: {
1891
+ headers: {
1892
+ [name: string]: unknown;
1893
+ };
1894
+ content: {
1895
+ "application/json": {
1896
+ /** @enum {string} */
1897
+ status: "pending" | "ready";
1898
+ subscription_contract_id: string;
1899
+ subscription_ref: {
1900
+ /** @enum {string} */
1901
+ type: "customer_subscription_contract";
1902
+ id: string;
1903
+ } | null;
1904
+ observed_at: string;
1905
+ };
1906
+ };
1907
+ };
1908
+ 401: components["responses"]["Error"];
1909
+ 403: components["responses"]["Error"];
1910
+ 404: components["responses"]["Error"];
1911
+ 409: components["responses"]["Error"];
1912
+ 422: components["responses"]["Error"];
1913
+ 503: components["responses"]["Error"];
1914
+ };
1915
+ };
1916
+ sendEmail: {
1917
+ parameters: {
1918
+ query?: never;
1919
+ header?: never;
1920
+ path?: never;
1921
+ cookie?: never;
1922
+ };
1923
+ requestBody: {
1924
+ content: {
1925
+ "application/json": {
1926
+ message: {
1927
+ lane_type: string;
1928
+ mailbox_identity_id?: number;
1929
+ from?: string;
1930
+ subject: string;
1931
+ body_text?: string;
1932
+ body_html?: string;
1933
+ idempotency_key?: string;
1934
+ source_record_type: string;
1935
+ source_record_id: string;
1936
+ source_event?: string;
1937
+ to: string[];
1938
+ cc?: string[];
1939
+ bcc?: string[];
1940
+ reply_to?: string[];
1941
+ headers?: Record<string, never>;
1942
+ metadata?: Record<string, never>;
1943
+ };
1944
+ };
1945
+ };
1946
+ };
1947
+ responses: {
1948
+ /** @description Already sent with this idempotency_key */
1949
+ 200: {
1950
+ headers: {
1951
+ [name: string]: unknown;
1952
+ };
1953
+ content: {
1954
+ "application/json": components["schemas"]["EmailResult"];
1955
+ };
1956
+ };
1957
+ /** @description Sent */
1958
+ 201: {
1959
+ headers: {
1960
+ [name: string]: unknown;
1961
+ };
1962
+ content: {
1963
+ "application/json": components["schemas"]["EmailResult"];
1964
+ };
1965
+ };
1966
+ /** @description Held for approval */
1967
+ 202: {
1968
+ headers: {
1969
+ [name: string]: unknown;
1970
+ };
1971
+ content: {
1972
+ "application/json": components["schemas"]["EmailResult"];
1973
+ };
1974
+ };
1975
+ 401: components["responses"]["EmailError"];
1976
+ 403: components["responses"]["EmailError"];
1977
+ 422: components["responses"]["EmailError"];
1978
+ };
1979
+ };
1980
+ }