@redotech/redo-api-schema 2.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/openapi.ts ADDED
@@ -0,0 +1,1059 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+
7
+ /** OneOf type helpers */
8
+ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
9
+ type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
10
+ type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
11
+
12
+ export interface paths {
13
+ "/__return": {
14
+ /** Return event [Webhook] */
15
+ post: operations["Webhook return event"];
16
+ };
17
+ "/returns/{returnId}/comments": {
18
+ /**
19
+ * List return comments
20
+ * @description List return comments.
21
+ */
22
+ get: operations["Return comments get"];
23
+ /**
24
+ * Create return comment
25
+ * @description Create return comment.
26
+ */
27
+ post: operations["Return comment create"];
28
+ parameters: {
29
+ path: {
30
+ returnId: components["parameters"]["return-id.param"];
31
+ };
32
+ };
33
+ };
34
+ "/returns/{returnId}/status": {
35
+ /**
36
+ * Get return status
37
+ * @description Get return status.
38
+ */
39
+ get: operations["Return status get"];
40
+ /**
41
+ * Update return status
42
+ * @description Update return status.
43
+ */
44
+ put: operations["Return status update"];
45
+ parameters: {
46
+ path: {
47
+ returnId: components["parameters"]["return-id.param"];
48
+ };
49
+ };
50
+ };
51
+ "/stores/{storeId}/returns": {
52
+ /**
53
+ * List returns
54
+ * @description List returns, sorted by most recent to least recent.
55
+ */
56
+ get: operations["Returns list"];
57
+ parameters: {
58
+ path: {
59
+ storeId: components["parameters"]["store-id.param"];
60
+ };
61
+ };
62
+ };
63
+ "/stores/{storeId}/webhooks": {
64
+ /**
65
+ * List webhooks
66
+ * @description List webhooks for store.
67
+ */
68
+ get: operations["Webhooks list"];
69
+ /**
70
+ * Create or update webhook
71
+ * @description Create webhook for store. Or if webhook already exists with `externalId`, update it.
72
+ */
73
+ post: operations["Webhook create"];
74
+ parameters: {
75
+ path: {
76
+ storeId: components["parameters"]["store-id.param"];
77
+ };
78
+ };
79
+ };
80
+ "/webhooks/{webhookId}": {
81
+ /**
82
+ * Get webhook
83
+ * @description Get a webhook.
84
+ */
85
+ get: operations["Webhook get"];
86
+ /**
87
+ * Update webhook
88
+ * @description Update a webhook.
89
+ */
90
+ put: operations["Webhook update"];
91
+ /**
92
+ * Delete webhook
93
+ * @description Delete a webbhook.
94
+ */
95
+ delete: operations["Webhook delete"];
96
+ parameters: {
97
+ path: {
98
+ webhookId: components["parameters"]["webhook-id.param"];
99
+ };
100
+ };
101
+ };
102
+ "/webhooks/{webhookId}/replay": {
103
+ /**
104
+ * Replay webhook
105
+ * @description Replay a webhook.
106
+ */
107
+ post: operations["Webhook replay"];
108
+ parameters: {
109
+ path: {
110
+ webhookId: components["parameters"]["webhook-id.param"];
111
+ };
112
+ };
113
+ };
114
+ }
115
+
116
+ export interface webhooks {
117
+ "return": {
118
+ /** Return event [Webhook] */
119
+ post: operations["Webhook return event"];
120
+ };
121
+ }
122
+
123
+ export interface components {
124
+ schemas: {
125
+ /**
126
+ * Address
127
+ * @description Address.
128
+ */
129
+ "address.schema": {
130
+ /**
131
+ * City
132
+ * @description City name
133
+ */
134
+ city: string;
135
+ /**
136
+ * Country
137
+ * @description Country code
138
+ */
139
+ country: string;
140
+ /**
141
+ * Line 1
142
+ * @description Line 1
143
+ */
144
+ line1: string;
145
+ /**
146
+ * Line 2
147
+ * @description Line 2
148
+ * @default
149
+ */
150
+ line2?: string;
151
+ /**
152
+ * Postal code
153
+ * @description Postal or ZIP code
154
+ */
155
+ postalCode: string;
156
+ /**
157
+ * State
158
+ * @description State or province
159
+ */
160
+ state: string;
161
+ };
162
+ /**
163
+ * Comment
164
+ * @description Comment with either message or image.
165
+ */
166
+ "comment.schema": OneOf<[{
167
+ /**
168
+ * Image
169
+ * @description Base64-encoded image
170
+ */
171
+ image?: string;
172
+ }, {
173
+ /**
174
+ * Message
175
+ * @description Message.
176
+ */
177
+ message?: string;
178
+ }]>;
179
+ /**
180
+ * Problem details
181
+ * @description See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
182
+ */
183
+ "error.schema": {
184
+ /** @description A human-readable explanation specific to this occurrence of the problem. */
185
+ detail?: string;
186
+ /** @description A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. */
187
+ instance?: string;
188
+ /** @description The HTTP status code ([[RFC7231], Section 6](https://datatracker.ietf.org/doc/html/rfc7231#section-6)) generated by the origin server for this occurrence of the problem. */
189
+ status?: number;
190
+ /** @description A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [[RFC7231], Section 3.4](https://datatracker.ietf.org/doc/html/rfc7231#section-3.4)). */
191
+ title?: string;
192
+ /**
193
+ * Format: uri-reference
194
+ * @description A URI reference [[RFC3986](https://datatracker.ietf.org/doc/html/rfc3986)] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [[W3C.REC-html5-20141028](https://datatracker.ietf.org/doc/html/rfc7807#ref-W3C.REC-html5-20141028)]). When this member is not present, its value is assumed to be "about:blank".
195
+ * @default about:blank
196
+ */
197
+ type?: string;
198
+ };
199
+ /**
200
+ * Exchang provision
201
+ * @example deferred
202
+ * @enum {string}
203
+ */
204
+ "exchange-provision.schema": "instant" | "deferred";
205
+ /**
206
+ * HTTPS callback
207
+ * @description HTTPS callback
208
+ */
209
+ "https-callback.schema": {
210
+ /**
211
+ * Authorization
212
+ * @description Authorization.
213
+ */
214
+ auth: OneOf<[{
215
+ /**
216
+ * Bearer
217
+ * @description Bearer
218
+ */
219
+ bearer?: {
220
+ /**
221
+ * Token
222
+ * Format: password
223
+ * @description Token for Bearer authorization.
224
+ * @example abc123
225
+ */
226
+ token?: string;
227
+ };
228
+ }, null]>;
229
+ /**
230
+ * URL
231
+ * Format: uri
232
+ * @description HTTPS callback URL.
233
+ * @example https://subscriber.example.org/events
234
+ */
235
+ url: string;
236
+ };
237
+ /**
238
+ * Item quantity
239
+ * @description Item quantity.
240
+ * @example 1
241
+ */
242
+ "item-quantity.schema": number;
243
+ /**
244
+ * Money
245
+ * @description Currency amount
246
+ */
247
+ "money.schema": {
248
+ /** Amount */
249
+ amount?: number;
250
+ /** Currency */
251
+ currency?: string;
252
+ };
253
+ /**
254
+ * Order
255
+ * @description Order.
256
+ */
257
+ "order-read.schema": {
258
+ customer: {
259
+ /**
260
+ * Email address
261
+ * Format: email
262
+ * @description Email address of customer.
263
+ */
264
+ emailAddress?: string;
265
+ /**
266
+ * Name
267
+ * @description Name of customer.
268
+ */
269
+ name: components["schemas"]["person-name.schema"];
270
+ /**
271
+ * Phone number
272
+ * @description Phone number of customer.
273
+ */
274
+ phoneNumber?: components["schemas"]["phone-number.schema"];
275
+ };
276
+ /**
277
+ * External ID
278
+ * @description Shopify ID
279
+ */
280
+ externalId?: string;
281
+ /**
282
+ * ID
283
+ * @description Order ID
284
+ * @example 64e4da943dd822979a70bd12
285
+ */
286
+ id: string;
287
+ /** Line items */
288
+ items: {
289
+ /** @example 123 */
290
+ externalId?: string;
291
+ /**
292
+ * ID
293
+ * @description Line item ID
294
+ */
295
+ id: string;
296
+ /** Product */
297
+ product: components["schemas"]["product.schema"];
298
+ /** Quantity */
299
+ quantity: components["schemas"]["item-quantity.schema"];
300
+ /** Variant */
301
+ variant: components["schemas"]["product-variant.schema"];
302
+ }[];
303
+ /**
304
+ * Name
305
+ * @description Shopify name.
306
+ */
307
+ name: string;
308
+ };
309
+ /**
310
+ * Person name
311
+ * @description Person name.
312
+ */
313
+ "person-name.schema": {
314
+ /** @description Given name */
315
+ given: string;
316
+ /** @description Surname */
317
+ surname: string;
318
+ };
319
+ /**
320
+ * Phone number
321
+ * @description Phone number, in E.164 format
322
+ */
323
+ "phone-number.schema": string;
324
+ /** Product variant */
325
+ "product-variant.schema": {
326
+ /** External ID */
327
+ externalId?: string;
328
+ /** Title */
329
+ name: string;
330
+ /** SKU */
331
+ sku?: string;
332
+ /** Weight */
333
+ weight?: components["schemas"]["weight.schema"];
334
+ };
335
+ /**
336
+ * Product
337
+ * @description Product.
338
+ */
339
+ "product.schema": {
340
+ /**
341
+ * External ID
342
+ * @description Product ID in external system (e.g. shopify).
343
+ */
344
+ externalId?: string;
345
+ /**
346
+ * Name
347
+ * @description Product title
348
+ */
349
+ name: string;
350
+ };
351
+ /**
352
+ * Return
353
+ * @description Return read.
354
+ */
355
+ "return-read.schema": {
356
+ /**
357
+ * Created at
358
+ * Format: date-time
359
+ * @description Time of creation.
360
+ */
361
+ createdAt: string;
362
+ destination: {
363
+ /**
364
+ * Mailing address
365
+ * @description Mailing address to send the returned items.
366
+ */
367
+ mailingAddress?: components["schemas"]["address.schema"];
368
+ /**
369
+ * Phone number
370
+ * @description Phone number of the destination.
371
+ */
372
+ phoneNumber?: components["schemas"]["phone-number.schema"];
373
+ };
374
+ /**
375
+ * Exchange
376
+ * @description Exchange order
377
+ */
378
+ exchange?: {
379
+ /** Line items */
380
+ items: {
381
+ /** ID */
382
+ id: string;
383
+ /** Product */
384
+ product: components["schemas"]["product.schema"];
385
+ /** Quantity */
386
+ quantity: components["schemas"]["item-quantity.schema"];
387
+ variant: components["schemas"]["product-variant.schema"];
388
+ }[];
389
+ order?: {
390
+ /**
391
+ * External ID
392
+ * @description ID of external order
393
+ */
394
+ externalId?: string;
395
+ id?: string;
396
+ };
397
+ /** Provision */
398
+ provision: components["schemas"]["exchange-provision.schema"];
399
+ };
400
+ /**
401
+ * Identifier
402
+ * @description Return identifier.
403
+ */
404
+ id: string;
405
+ /** @description Return items */
406
+ items: ({
407
+ /** Exchange item */
408
+ exchangeItem?: {
409
+ /**
410
+ * ID
411
+ * @description ID of exchange line item
412
+ */
413
+ id?: string;
414
+ };
415
+ /**
416
+ * ID
417
+ * @description Return item ID.
418
+ */
419
+ id?: string;
420
+ /**
421
+ * Order item
422
+ * @description Order line item
423
+ */
424
+ orderItem?: {
425
+ /**
426
+ * ID
427
+ * @description Line item ID in original order. Note: There can be more than return item for an original line item, with different quantity, return reasons, etc.
428
+ */
429
+ id?: string;
430
+ };
431
+ /** Quantity */
432
+ quantity: components["schemas"]["item-quantity.schema"];
433
+ /** @description Return reason */
434
+ reason: string;
435
+ /** @description Refund */
436
+ refund?: {
437
+ /** Amount */
438
+ amount: components["schemas"]["money.schema"];
439
+ /** Planned amount */
440
+ pendingAmount: components["schemas"]["money.schema"];
441
+ /**
442
+ * Taxes
443
+ * @description Taxes.
444
+ */
445
+ pendingTaxAmount: components["schemas"]["money.schema"];
446
+ /**
447
+ * Taxes
448
+ * @description Taxes.
449
+ */
450
+ taxAmount: components["schemas"]["money.schema"];
451
+ /**
452
+ * @description Refund method
453
+ * @enum {string}
454
+ */
455
+ type: "credit" | "refund";
456
+ };
457
+ })[];
458
+ /**
459
+ * Order
460
+ * @description Original order.
461
+ */
462
+ order: {
463
+ /**
464
+ * ID
465
+ * @description Order ID.
466
+ * @example abc123
467
+ */
468
+ id: string;
469
+ };
470
+ /**
471
+ * Shipment
472
+ * @description Shipment, if has been made
473
+ */
474
+ shipment?: {
475
+ /**
476
+ * Carrier
477
+ * @description Carrier code
478
+ */
479
+ carrier?: string;
480
+ /**
481
+ * Status
482
+ * @description Status of shipment
483
+ * @enum {string}
484
+ */
485
+ status?: "pre_transit" | "transit" | "delivered" | "cancelled" | "flagged";
486
+ /**
487
+ * Tracker
488
+ * @description Tracking number
489
+ */
490
+ tracker?: string;
491
+ };
492
+ source: {
493
+ /**
494
+ * Email address
495
+ * Format: email
496
+ * @description Email address.
497
+ */
498
+ emailAddress: string;
499
+ /**
500
+ * Mailing address
501
+ * @description Mailing address returned items are sent from.
502
+ */
503
+ mailingAddress: components["schemas"]["address.schema"];
504
+ /**
505
+ * Name
506
+ * @description Name of returner.
507
+ */
508
+ name: components["schemas"]["person-name.schema"];
509
+ /**
510
+ * Phone number
511
+ * @description Phone number of returner.
512
+ */
513
+ phoneNumber: components["schemas"]["phone-number.schema"];
514
+ };
515
+ /**
516
+ * Status
517
+ * @description Return status.
518
+ */
519
+ status: components["schemas"]["return-status.schema"];
520
+ /**
521
+ * Updated at
522
+ * Format: date-time
523
+ * @description Time of last update.
524
+ */
525
+ updatedAt: string;
526
+ };
527
+ /**
528
+ * Return status
529
+ * @description Return status.
530
+ *
531
+ * * manual_review: Return requires pre-shipment merchant authorization.
532
+ * * open: Return has been approved is awaiting shipment.
533
+ * * transit: Return shipment is in transit.
534
+ * * delivered: Return shipment has been delievered and awaiting processing.
535
+ * * flagged: A problem with return processing requires merchant action.
536
+ * * cancelled: The return has been cancelled.
537
+ * * closed: The return has been completed.
538
+ *
539
+ * @example open
540
+ * @enum {string}
541
+ */
542
+ "return-status.schema": "manual_review" | "open" | "transit" | "delivered" | "flagged" | "cancelled" | "closed";
543
+ /**
544
+ * Webhook create
545
+ * @description Webhook create.
546
+ */
547
+ "webhook-create.schema": {
548
+ /**
549
+ * Backfill
550
+ * @description Create events for already-existing items
551
+ * @default false
552
+ */
553
+ backfill?: boolean;
554
+ /**
555
+ * HTTPS callback
556
+ * @description HTTPS callback to POST events.
557
+ */
558
+ callback: components["schemas"]["https-callback.schema"];
559
+ /**
560
+ * External ID
561
+ * @description Optional external identifier.
562
+ * @default null
563
+ */
564
+ externalId?: string | null;
565
+ /**
566
+ * Topic
567
+ * @description Topic.
568
+ */
569
+ topic: components["schemas"]["webhook-topic.schema"];
570
+ };
571
+ /**
572
+ * Webhook read
573
+ * @description Webhook read.
574
+ */
575
+ "webhook-read.schema": {
576
+ /**
577
+ * Callback
578
+ * @description HTTPS callback URL to POST events.
579
+ */
580
+ callback: components["schemas"]["https-callback.schema"];
581
+ /**
582
+ * Created at.
583
+ * Format: date-time
584
+ * @description Time created.
585
+ */
586
+ createdAt: string;
587
+ /**
588
+ * External ID
589
+ * @description Optional external identifier.
590
+ * @default null
591
+ */
592
+ externalId?: string | null;
593
+ /**
594
+ * ID
595
+ * @description Webhook ID.
596
+ */
597
+ id?: string;
598
+ /**
599
+ * Topic
600
+ * @description Topic.
601
+ */
602
+ topic: components["schemas"]["webhook-topic.schema"];
603
+ /**
604
+ * Updated at.
605
+ * Format: date-time
606
+ * @description Last time updated.
607
+ */
608
+ updatedAt: string;
609
+ };
610
+ /**
611
+ * Webhook topic
612
+ * @description Webhook topic.
613
+ * @enum {string}
614
+ */
615
+ "webhook-topic.schema": "return";
616
+ /**
617
+ * Webhook update
618
+ * @description Webhook update.
619
+ */
620
+ "webhook-update.schema": {
621
+ /**
622
+ * HTTPS callback
623
+ * @description HTTPS callback to POST events.
624
+ */
625
+ callback: components["schemas"]["https-callback.schema"];
626
+ /**
627
+ * External ID
628
+ * @description Optional external identifier.
629
+ * @default null
630
+ */
631
+ externalId?: string | null;
632
+ };
633
+ /**
634
+ * Weight
635
+ * @description Weight.
636
+ */
637
+ "weight.schema": {
638
+ /**
639
+ * Kilograms
640
+ * @description Weight in kilograms
641
+ */
642
+ kg?: number;
643
+ };
644
+ };
645
+ responses: never;
646
+ parameters: {
647
+ /**
648
+ * @description Page marker, from X-Page-Next header
649
+ * @example 64df700931a04885276c3364
650
+ */
651
+ "page-continue.param"?: string;
652
+ /**
653
+ * @description Page size, defaults to 20
654
+ * @example 20
655
+ */
656
+ "page-size.param"?: number;
657
+ /** @description Return ID */
658
+ "return-id.param": string;
659
+ /** @description Store ID */
660
+ "store-id.param": string;
661
+ /**
662
+ * @description Maximum updated time, exclusive
663
+ * @example 2000-02-01T00:00:00Z
664
+ */
665
+ "updated-at-max.param"?: string;
666
+ /**
667
+ * @description Minimum updated time, inclusive
668
+ * @example 2000-01-01T00:00:00Z
669
+ */
670
+ "updated-at-min.param"?: string;
671
+ /** @description Webhook ID */
672
+ "webhook-id.param": string;
673
+ };
674
+ requestBodies: never;
675
+ headers: {
676
+ /** @description Next value for X-Page-Continue, for more results */
677
+ "page-next.header": string;
678
+ };
679
+ pathItems: never;
680
+ }
681
+
682
+ export type $defs = Record<string, never>;
683
+
684
+ export type external = Record<string, never>;
685
+
686
+ export interface operations {
687
+
688
+ /** Return event [Webhook] */
689
+ "Webhook return event": {
690
+ /**
691
+ * @description Return event webhook.
692
+ *
693
+ * <!-- theme: warning -->
694
+ * > #### Note
695
+ * >
696
+ * > This is not an actual Redo API endpoint, but a webhook.
697
+ */
698
+ requestBody: {
699
+ content: {
700
+ "application/json": {
701
+ /**
702
+ * At
703
+ * Format: date-time
704
+ * @description Event time
705
+ */
706
+ at?: string;
707
+ /**
708
+ * Order
709
+ * @description Order for return.
710
+ */
711
+ order?: components["schemas"]["order-read.schema"];
712
+ /**
713
+ * Return
714
+ * @description Return.
715
+ */
716
+ return?: components["schemas"]["return-read.schema"];
717
+ /**
718
+ * @description Event type
719
+ * @enum {string}
720
+ */
721
+ type?: "backfill" | "created" | "updated";
722
+ };
723
+ };
724
+ };
725
+ responses: {
726
+ /** @description Success. Return a 2xx status code to indicate success. */
727
+ "2xx": {
728
+ content: never;
729
+ };
730
+ /** @description Error. The event will be retried multiple times and then discarded. */
731
+ default: {
732
+ content: never;
733
+ };
734
+ };
735
+ };
736
+ /**
737
+ * List return comments
738
+ * @description List return comments.
739
+ */
740
+ "Return comments get": {
741
+ parameters: {
742
+ path: {
743
+ returnId: components["parameters"]["return-id.param"];
744
+ };
745
+ };
746
+ responses: {
747
+ /** @description Success */
748
+ 200: {
749
+ content: {
750
+ "application/json": {
751
+ /**
752
+ * Comments
753
+ * @description Return comments.
754
+ */
755
+ comments: components["schemas"]["comment.schema"][];
756
+ };
757
+ };
758
+ };
759
+ };
760
+ };
761
+ /**
762
+ * Create return comment
763
+ * @description Create return comment.
764
+ */
765
+ "Return comment create": {
766
+ parameters: {
767
+ path: {
768
+ returnId: components["parameters"]["return-id.param"];
769
+ };
770
+ };
771
+ requestBody: {
772
+ content: {
773
+ "application/json": {
774
+ comment: components["schemas"]["comment.schema"];
775
+ };
776
+ };
777
+ };
778
+ responses: {
779
+ /** @description Created */
780
+ 201: {
781
+ content: {
782
+ "application/json": {
783
+ comment: components["schemas"]["comment.schema"];
784
+ };
785
+ };
786
+ };
787
+ /** @description Error */
788
+ default: {
789
+ content: {
790
+ "application/problem+json": components["schemas"]["error.schema"];
791
+ };
792
+ };
793
+ };
794
+ };
795
+ /**
796
+ * Get return status
797
+ * @description Get return status.
798
+ */
799
+ "Return status get": {
800
+ parameters: {
801
+ path: {
802
+ returnId: components["parameters"]["return-id.param"];
803
+ };
804
+ };
805
+ responses: {
806
+ /** @description Success */
807
+ 200: {
808
+ content: {
809
+ "application/json": {
810
+ status: components["schemas"]["return-status.schema"];
811
+ };
812
+ };
813
+ };
814
+ /** @description Error */
815
+ default: {
816
+ content: {
817
+ "application/problem+json": components["schemas"]["error.schema"];
818
+ };
819
+ };
820
+ };
821
+ };
822
+ /**
823
+ * Update return status
824
+ * @description Update return status.
825
+ */
826
+ "Return status update": {
827
+ parameters: {
828
+ path: {
829
+ returnId: components["parameters"]["return-id.param"];
830
+ };
831
+ };
832
+ requestBody: {
833
+ content: {
834
+ "application/json": {
835
+ status: components["schemas"]["return-status.schema"];
836
+ };
837
+ };
838
+ };
839
+ responses: {
840
+ /** @description Updated */
841
+ 204: {
842
+ content: never;
843
+ };
844
+ /** @description Error */
845
+ default: {
846
+ content: {
847
+ "application/problem+json": components["schemas"]["error.schema"];
848
+ };
849
+ };
850
+ };
851
+ };
852
+ /**
853
+ * List returns
854
+ * @description List returns, sorted by most recent to least recent.
855
+ */
856
+ "Returns list": {
857
+ parameters: {
858
+ query?: {
859
+ updated_at_max?: components["parameters"]["updated-at-max.param"];
860
+ updated_at_min?: components["parameters"]["updated-at-min.param"];
861
+ };
862
+ header?: {
863
+ "X-Page-Continue"?: components["parameters"]["page-continue.param"];
864
+ "X-Page-Size"?: components["parameters"]["page-size.param"];
865
+ };
866
+ path: {
867
+ storeId: components["parameters"]["store-id.param"];
868
+ };
869
+ };
870
+ responses: {
871
+ /** @description Success */
872
+ 200: {
873
+ headers: {
874
+ "X-Page-Next": components["headers"]["page-next.header"];
875
+ };
876
+ content: {
877
+ "application/json": {
878
+ orders: components["schemas"]["order-read.schema"][];
879
+ returns: components["schemas"]["return-read.schema"][];
880
+ };
881
+ };
882
+ };
883
+ /** @description Error */
884
+ default: {
885
+ content: {
886
+ "application/problem+json": components["schemas"]["error.schema"];
887
+ };
888
+ };
889
+ };
890
+ };
891
+ /**
892
+ * List webhooks
893
+ * @description List webhooks for store.
894
+ */
895
+ "Webhooks list": {
896
+ parameters: {
897
+ path: {
898
+ storeId: components["parameters"]["store-id.param"];
899
+ };
900
+ };
901
+ responses: {
902
+ /** @description Success */
903
+ 200: {
904
+ content: {
905
+ "application/json": {
906
+ webhooks: components["schemas"]["webhook-read.schema"][];
907
+ };
908
+ };
909
+ };
910
+ /** @description Error */
911
+ default: {
912
+ content: {
913
+ "application/problem+json": components["schemas"]["error.schema"];
914
+ };
915
+ };
916
+ };
917
+ };
918
+ /**
919
+ * Create or update webhook
920
+ * @description Create webhook for store. Or if webhook already exists with `externalId`, update it.
921
+ */
922
+ "Webhook create": {
923
+ parameters: {
924
+ path: {
925
+ storeId: components["parameters"]["store-id.param"];
926
+ };
927
+ };
928
+ requestBody: {
929
+ content: {
930
+ "application/json": {
931
+ webhook?: components["schemas"]["webhook-create.schema"];
932
+ };
933
+ };
934
+ };
935
+ responses: {
936
+ /** @description Updated */
937
+ 200: {
938
+ content: {
939
+ "application/json": {
940
+ webhook?: components["schemas"]["webhook-read.schema"];
941
+ };
942
+ };
943
+ };
944
+ /** @description Created */
945
+ 201: {
946
+ content: {
947
+ "application/json": {
948
+ webhook?: components["schemas"]["webhook-read.schema"];
949
+ };
950
+ };
951
+ };
952
+ /** @description Error */
953
+ default: {
954
+ content: {
955
+ "application/problem+json": components["schemas"]["error.schema"];
956
+ };
957
+ };
958
+ };
959
+ };
960
+ /**
961
+ * Get webhook
962
+ * @description Get a webhook.
963
+ */
964
+ "Webhook get": {
965
+ parameters: {
966
+ path: {
967
+ webhookId: components["parameters"]["webhook-id.param"];
968
+ };
969
+ };
970
+ responses: {
971
+ /** @description Success */
972
+ 200: {
973
+ content: {
974
+ "application/json": {
975
+ webhook: components["schemas"]["webhook-read.schema"];
976
+ };
977
+ };
978
+ };
979
+ };
980
+ };
981
+ /**
982
+ * Update webhook
983
+ * @description Update a webhook.
984
+ */
985
+ "Webhook update": {
986
+ parameters: {
987
+ path: {
988
+ webhookId: components["parameters"]["webhook-id.param"];
989
+ };
990
+ };
991
+ requestBody: {
992
+ content: {
993
+ "application/json": {
994
+ webhook?: components["schemas"]["webhook-update.schema"];
995
+ };
996
+ };
997
+ };
998
+ responses: {
999
+ /** @description Success */
1000
+ 204: {
1001
+ content: never;
1002
+ };
1003
+ /** @description Error */
1004
+ default: {
1005
+ content: {
1006
+ "application/problem+json": components["schemas"]["error.schema"];
1007
+ };
1008
+ };
1009
+ };
1010
+ };
1011
+ /**
1012
+ * Delete webhook
1013
+ * @description Delete a webbhook.
1014
+ */
1015
+ "Webhook delete": {
1016
+ parameters: {
1017
+ path: {
1018
+ webhookId: components["parameters"]["webhook-id.param"];
1019
+ };
1020
+ };
1021
+ responses: {
1022
+ /** @description Deleted */
1023
+ 204: {
1024
+ content: never;
1025
+ };
1026
+ };
1027
+ };
1028
+ /**
1029
+ * Replay webhook
1030
+ * @description Replay a webhook.
1031
+ */
1032
+ "Webhook replay": {
1033
+ parameters: {
1034
+ path: {
1035
+ webhookId: components["parameters"]["webhook-id.param"];
1036
+ };
1037
+ };
1038
+ requestBody: {
1039
+ content: {
1040
+ "application/json": {
1041
+ /** Format: date-time */
1042
+ start: string;
1043
+ };
1044
+ };
1045
+ };
1046
+ responses: {
1047
+ /** @description Success */
1048
+ 202: {
1049
+ content: never;
1050
+ };
1051
+ /** @description Error */
1052
+ default: {
1053
+ content: {
1054
+ "application/problem+json": components["schemas"]["error.schema"];
1055
+ };
1056
+ };
1057
+ };
1058
+ };
1059
+ }