@redotech/redo-api-schema 2.2.42 → 2.2.44
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/lib/openapi.d.ts +87 -51
- package/lib/openapi.yaml +39 -60
- package/package.json +1 -1
package/lib/openapi.d.ts
CHANGED
|
@@ -10,9 +10,17 @@ type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> &
|
|
|
10
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
11
|
|
|
12
12
|
export interface paths {
|
|
13
|
-
"/
|
|
14
|
-
/**
|
|
15
|
-
|
|
13
|
+
"/returns/{returnId}": {
|
|
14
|
+
/**
|
|
15
|
+
* Get return
|
|
16
|
+
* @description Get return.
|
|
17
|
+
*/
|
|
18
|
+
get: operations["Return get"];
|
|
19
|
+
parameters: {
|
|
20
|
+
path: {
|
|
21
|
+
storeId: components["parameters"]["store-id.param"];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
16
24
|
};
|
|
17
25
|
"/returns/{returnId}/comments": {
|
|
18
26
|
/**
|
|
@@ -115,7 +123,7 @@ export interface paths {
|
|
|
115
123
|
|
|
116
124
|
export interface webhooks {
|
|
117
125
|
"return": {
|
|
118
|
-
/** Return event
|
|
126
|
+
/** Return event */
|
|
119
127
|
post: operations["Webhook return event"];
|
|
120
128
|
};
|
|
121
129
|
}
|
|
@@ -178,20 +186,27 @@ export interface components {
|
|
|
178
186
|
}]>;
|
|
179
187
|
/**
|
|
180
188
|
* Problem details
|
|
181
|
-
* @description See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
|
|
189
|
+
* @description Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
|
|
182
190
|
*/
|
|
183
191
|
"error.schema": {
|
|
184
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* Detail
|
|
194
|
+
* @description Human-readable description of the problem.
|
|
195
|
+
*/
|
|
185
196
|
detail?: string;
|
|
186
|
-
/**
|
|
197
|
+
/**
|
|
198
|
+
* Format: uri-reference
|
|
199
|
+
* @description A URI reference that identifies this problem.
|
|
200
|
+
*/
|
|
187
201
|
instance?: string;
|
|
188
|
-
/**
|
|
189
|
-
|
|
190
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Title
|
|
204
|
+
* @description Human-readable summary of the problem type.
|
|
205
|
+
*/
|
|
191
206
|
title?: string;
|
|
192
207
|
/**
|
|
193
208
|
* Format: uri-reference
|
|
194
|
-
* @description A URI reference
|
|
209
|
+
* @description A URI reference that identifies the problem type.
|
|
195
210
|
* @default about:blank
|
|
196
211
|
*/
|
|
197
212
|
type?: string;
|
|
@@ -703,51 +718,31 @@ export type external = Record<string, never>;
|
|
|
703
718
|
|
|
704
719
|
export interface operations {
|
|
705
720
|
|
|
706
|
-
/**
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
* > This is not an actual Redo API endpoint, but a webhook.
|
|
715
|
-
*/
|
|
716
|
-
requestBody: {
|
|
717
|
-
content: {
|
|
718
|
-
"application/json": {
|
|
719
|
-
/**
|
|
720
|
-
* At
|
|
721
|
-
* Format: date-time
|
|
722
|
-
* @description Event time
|
|
723
|
-
*/
|
|
724
|
-
at?: string;
|
|
725
|
-
/**
|
|
726
|
-
* Order
|
|
727
|
-
* @description Order for return.
|
|
728
|
-
*/
|
|
729
|
-
order?: components["schemas"]["order-read.schema"];
|
|
730
|
-
/**
|
|
731
|
-
* Return
|
|
732
|
-
* @description Return.
|
|
733
|
-
*/
|
|
734
|
-
return?: components["schemas"]["return-read.schema"];
|
|
735
|
-
/**
|
|
736
|
-
* @description Event type
|
|
737
|
-
* @enum {string}
|
|
738
|
-
*/
|
|
739
|
-
type?: "backfill" | "created" | "updated";
|
|
740
|
-
};
|
|
721
|
+
/**
|
|
722
|
+
* Get return
|
|
723
|
+
* @description Get return.
|
|
724
|
+
*/
|
|
725
|
+
"Return get": {
|
|
726
|
+
parameters: {
|
|
727
|
+
path: {
|
|
728
|
+
storeId: components["parameters"]["store-id.param"];
|
|
741
729
|
};
|
|
742
730
|
};
|
|
743
731
|
responses: {
|
|
744
|
-
/** @description Success
|
|
745
|
-
|
|
746
|
-
content:
|
|
732
|
+
/** @description Success */
|
|
733
|
+
200: {
|
|
734
|
+
content: {
|
|
735
|
+
"application/json": {
|
|
736
|
+
order: components["schemas"]["order-read.schema"];
|
|
737
|
+
return: components["schemas"]["return-read.schema"];
|
|
738
|
+
};
|
|
739
|
+
};
|
|
747
740
|
};
|
|
748
|
-
/** @description Error
|
|
741
|
+
/** @description Error */
|
|
749
742
|
default: {
|
|
750
|
-
content:
|
|
743
|
+
content: {
|
|
744
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
745
|
+
};
|
|
751
746
|
};
|
|
752
747
|
};
|
|
753
748
|
};
|
|
@@ -1074,4 +1069,45 @@ export interface operations {
|
|
|
1074
1069
|
};
|
|
1075
1070
|
};
|
|
1076
1071
|
};
|
|
1072
|
+
/** Return event */
|
|
1073
|
+
"Webhook return event": {
|
|
1074
|
+
/** @description Return event webhook. */
|
|
1075
|
+
requestBody: {
|
|
1076
|
+
content: {
|
|
1077
|
+
"application/json": {
|
|
1078
|
+
/**
|
|
1079
|
+
* At
|
|
1080
|
+
* Format: date-time
|
|
1081
|
+
* @description Event time
|
|
1082
|
+
*/
|
|
1083
|
+
at?: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Order
|
|
1086
|
+
* @description Order for return.
|
|
1087
|
+
*/
|
|
1088
|
+
order?: components["schemas"]["order-read.schema"];
|
|
1089
|
+
/**
|
|
1090
|
+
* Return
|
|
1091
|
+
* @description Return.
|
|
1092
|
+
*/
|
|
1093
|
+
return?: components["schemas"]["return-read.schema"];
|
|
1094
|
+
/**
|
|
1095
|
+
* @description Event type
|
|
1096
|
+
* @enum {string}
|
|
1097
|
+
*/
|
|
1098
|
+
type?: "backfill" | "created" | "updated";
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
responses: {
|
|
1103
|
+
/** @description Success. Return a 2xx status code to indicate success. */
|
|
1104
|
+
"2xx": {
|
|
1105
|
+
content: never;
|
|
1106
|
+
};
|
|
1107
|
+
/** @description Error. The event will be retried multiple times and then discarded. */
|
|
1108
|
+
default: {
|
|
1109
|
+
content: never;
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1077
1113
|
}
|
package/lib/openapi.yaml
CHANGED
|
@@ -133,23 +133,23 @@ components:
|
|
|
133
133
|
type: object
|
|
134
134
|
title: Comment
|
|
135
135
|
error.schema:
|
|
136
|
-
description: See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
|
|
136
|
+
description: Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
|
|
137
137
|
properties:
|
|
138
138
|
detail:
|
|
139
|
-
description:
|
|
139
|
+
description: Human-readable description of the problem.
|
|
140
|
+
title: Detail
|
|
140
141
|
type: string
|
|
141
142
|
instance:
|
|
142
|
-
description: A URI reference that identifies
|
|
143
|
+
description: A URI reference that identifies this problem.
|
|
144
|
+
format: uri-reference
|
|
143
145
|
type: string
|
|
144
|
-
status:
|
|
145
|
-
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.
|
|
146
|
-
type: number
|
|
147
146
|
title:
|
|
148
|
-
description:
|
|
147
|
+
description: Human-readable summary of the problem type.
|
|
148
|
+
title: Title
|
|
149
149
|
type: string
|
|
150
150
|
type:
|
|
151
151
|
default: about:blank
|
|
152
|
-
description: A URI reference
|
|
152
|
+
description: A URI reference that identifies the problem type.
|
|
153
153
|
format: uri-reference
|
|
154
154
|
type: string
|
|
155
155
|
title: Problem details
|
|
@@ -762,56 +762,40 @@ info:
|
|
|
762
762
|
version: 2.2.0
|
|
763
763
|
openapi: 3.1.0
|
|
764
764
|
paths:
|
|
765
|
-
/
|
|
766
|
-
description: Return
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
content:
|
|
771
|
-
application/json:
|
|
772
|
-
schema:
|
|
773
|
-
description: Return event
|
|
774
|
-
properties:
|
|
775
|
-
at:
|
|
776
|
-
description: Event time
|
|
777
|
-
format: date-time
|
|
778
|
-
title: At
|
|
779
|
-
type: string
|
|
780
|
-
order:
|
|
781
|
-
$ref: '#/components/schemas/order-read.schema'
|
|
782
|
-
description: Order for return.
|
|
783
|
-
title: Order
|
|
784
|
-
return:
|
|
785
|
-
$ref: '#/components/schemas/return-read.schema'
|
|
786
|
-
description: Return.
|
|
787
|
-
title: Return
|
|
788
|
-
type:
|
|
789
|
-
description: Event type
|
|
790
|
-
enum:
|
|
791
|
-
- backfill
|
|
792
|
-
- created
|
|
793
|
-
- updated
|
|
794
|
-
type: string
|
|
795
|
-
type: object
|
|
796
|
-
description: |
|
|
797
|
-
Return event webhook.
|
|
798
|
-
|
|
799
|
-
<!-- theme: warning -->
|
|
800
|
-
> #### Note
|
|
801
|
-
>
|
|
802
|
-
> This is not an actual Redo API endpoint, but a webhook.
|
|
803
|
-
required: true
|
|
765
|
+
/returns/{returnId}:
|
|
766
|
+
description: Return.
|
|
767
|
+
get:
|
|
768
|
+
description: Get return.
|
|
769
|
+
operationId: Return get
|
|
804
770
|
responses:
|
|
805
|
-
|
|
806
|
-
|
|
771
|
+
'200':
|
|
772
|
+
content:
|
|
773
|
+
application/json:
|
|
774
|
+
schema:
|
|
775
|
+
properties:
|
|
776
|
+
order:
|
|
777
|
+
$ref: '#/components/schemas/order-read.schema'
|
|
778
|
+
return:
|
|
779
|
+
$ref: '#/components/schemas/return-read.schema'
|
|
780
|
+
required:
|
|
781
|
+
- return
|
|
782
|
+
- order
|
|
783
|
+
type: object
|
|
784
|
+
description: Success
|
|
807
785
|
default:
|
|
808
|
-
|
|
786
|
+
content:
|
|
787
|
+
application/problem+json:
|
|
788
|
+
schema:
|
|
789
|
+
$ref: '#/components/schemas/error.schema'
|
|
790
|
+
description: Error
|
|
809
791
|
security:
|
|
810
|
-
-
|
|
811
|
-
summary:
|
|
792
|
+
- Bearer: []
|
|
793
|
+
summary: Get return
|
|
812
794
|
tags:
|
|
813
795
|
- Returns
|
|
814
|
-
|
|
796
|
+
parameters:
|
|
797
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
798
|
+
summary: Return
|
|
815
799
|
/returns/{returnId}/comments:
|
|
816
800
|
description: Return comment.
|
|
817
801
|
get:
|
|
@@ -1182,11 +1166,6 @@ webhooks:
|
|
|
1182
1166
|
type: object
|
|
1183
1167
|
description: |
|
|
1184
1168
|
Return event webhook.
|
|
1185
|
-
|
|
1186
|
-
<!-- theme: warning -->
|
|
1187
|
-
> #### Note
|
|
1188
|
-
>
|
|
1189
|
-
> This is not an actual Redo API endpoint, but a webhook.
|
|
1190
1169
|
required: true
|
|
1191
1170
|
responses:
|
|
1192
1171
|
2xx:
|
|
@@ -1195,7 +1174,7 @@ webhooks:
|
|
|
1195
1174
|
description: Error. The event will be retried multiple times and then discarded.
|
|
1196
1175
|
security:
|
|
1197
1176
|
- UserBearer: []
|
|
1198
|
-
summary: Return event
|
|
1177
|
+
summary: Return event
|
|
1199
1178
|
tags:
|
|
1200
1179
|
- Returns
|
|
1201
|
-
summary: Return event
|
|
1180
|
+
summary: Return event
|
package/package.json
CHANGED