@redotech/redo-api-schema 2.2.45 → 2.2.70
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 +101 -3
- package/lib/openapi.yaml +117 -3
- package/package.json +1 -1
package/lib/openapi.d.ts
CHANGED
|
@@ -10,6 +10,13 @@ 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
|
+
"/invoices/{invoiceId}/items.csv": {
|
|
14
|
+
/**
|
|
15
|
+
* Get invoice
|
|
16
|
+
* @description Get an invoice as a CSV.
|
|
17
|
+
*/
|
|
18
|
+
get: operations["Invoice csv get"];
|
|
19
|
+
};
|
|
13
20
|
"/returns/{returnId}": {
|
|
14
21
|
/**
|
|
15
22
|
* Get return
|
|
@@ -56,6 +63,13 @@ export interface paths {
|
|
|
56
63
|
};
|
|
57
64
|
};
|
|
58
65
|
};
|
|
66
|
+
"/stores/{storeId}/invoices": {
|
|
67
|
+
/**
|
|
68
|
+
* Get invoice
|
|
69
|
+
* @description Get a list of invoices.
|
|
70
|
+
*/
|
|
71
|
+
get: operations["Invoice list"];
|
|
72
|
+
};
|
|
59
73
|
"/stores/{storeId}/returns": {
|
|
60
74
|
/**
|
|
61
75
|
* List returns
|
|
@@ -249,6 +263,29 @@ export interface components {
|
|
|
249
263
|
*/
|
|
250
264
|
url: string;
|
|
251
265
|
};
|
|
266
|
+
/** @description Schema for an invoice. */
|
|
267
|
+
"invoice.schema": {
|
|
268
|
+
/** @description The charge that the invoice is for. */
|
|
269
|
+
charge: components["schemas"]["money.schema"];
|
|
270
|
+
/**
|
|
271
|
+
* Format: date-time
|
|
272
|
+
* @description The time the invoice was created.
|
|
273
|
+
*/
|
|
274
|
+
createdAt: string;
|
|
275
|
+
/** @description The ID of the charge. */
|
|
276
|
+
id?: string;
|
|
277
|
+
/** @description The status of the invoice. */
|
|
278
|
+
status: string;
|
|
279
|
+
store?: {
|
|
280
|
+
/** @description The ID of the store. */
|
|
281
|
+
id: string;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* Format: date-time
|
|
285
|
+
* @description The time the invoice was last updated.
|
|
286
|
+
*/
|
|
287
|
+
updatedAt: string;
|
|
288
|
+
};
|
|
252
289
|
/**
|
|
253
290
|
* Item quantity
|
|
254
291
|
* @description Item quantity.
|
|
@@ -261,7 +298,7 @@ export interface components {
|
|
|
261
298
|
*/
|
|
262
299
|
"money.schema": {
|
|
263
300
|
/** Amount */
|
|
264
|
-
amount?:
|
|
301
|
+
amount?: string;
|
|
265
302
|
/** Currency */
|
|
266
303
|
currency?: string;
|
|
267
304
|
};
|
|
@@ -300,21 +337,28 @@ export interface components {
|
|
|
300
337
|
*/
|
|
301
338
|
id: string;
|
|
302
339
|
/** Line items */
|
|
303
|
-
items: {
|
|
340
|
+
items: ({
|
|
304
341
|
/** @example 123 */
|
|
305
342
|
externalId?: string;
|
|
343
|
+
/**
|
|
344
|
+
* @description ID of the location where the item was be fulfilled.
|
|
345
|
+
* @example 123
|
|
346
|
+
*/
|
|
347
|
+
fulfillmentLocationId: string | null;
|
|
306
348
|
/**
|
|
307
349
|
* ID
|
|
308
350
|
* @description Line item ID
|
|
309
351
|
*/
|
|
310
352
|
id: string;
|
|
353
|
+
/** Price */
|
|
354
|
+
price: components["schemas"]["money.schema"];
|
|
311
355
|
/** Product */
|
|
312
356
|
product: components["schemas"]["product.schema"];
|
|
313
357
|
/** Quantity */
|
|
314
358
|
quantity: components["schemas"]["item-quantity.schema"];
|
|
315
359
|
/** Variant */
|
|
316
360
|
variant: components["schemas"]["product-variant.schema"];
|
|
317
|
-
}[];
|
|
361
|
+
})[];
|
|
318
362
|
/**
|
|
319
363
|
* Name
|
|
320
364
|
* @description Shopify name.
|
|
@@ -677,6 +721,8 @@ export interface components {
|
|
|
677
721
|
};
|
|
678
722
|
responses: never;
|
|
679
723
|
parameters: {
|
|
724
|
+
/** @description Invoice ID */
|
|
725
|
+
"invoice-id.param": string;
|
|
680
726
|
/**
|
|
681
727
|
* @description Page marker, from X-Page-Next header
|
|
682
728
|
* @example 64df700931a04885276c3364
|
|
@@ -718,6 +764,31 @@ export type external = Record<string, never>;
|
|
|
718
764
|
|
|
719
765
|
export interface operations {
|
|
720
766
|
|
|
767
|
+
/**
|
|
768
|
+
* Get invoice
|
|
769
|
+
* @description Get an invoice as a CSV.
|
|
770
|
+
*/
|
|
771
|
+
"Invoice csv get": {
|
|
772
|
+
parameters: {
|
|
773
|
+
path: {
|
|
774
|
+
invoiceId: components["parameters"]["invoice-id.param"];
|
|
775
|
+
};
|
|
776
|
+
};
|
|
777
|
+
responses: {
|
|
778
|
+
/** @description Success */
|
|
779
|
+
200: {
|
|
780
|
+
content: {
|
|
781
|
+
"text/csv": string;
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
/** @description Error */
|
|
785
|
+
default: {
|
|
786
|
+
content: {
|
|
787
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
788
|
+
};
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
};
|
|
721
792
|
/**
|
|
722
793
|
* Get return
|
|
723
794
|
* @description Get return.
|
|
@@ -862,6 +933,33 @@ export interface operations {
|
|
|
862
933
|
};
|
|
863
934
|
};
|
|
864
935
|
};
|
|
936
|
+
/**
|
|
937
|
+
* Get invoice
|
|
938
|
+
* @description Get a list of invoices.
|
|
939
|
+
*/
|
|
940
|
+
"Invoice list": {
|
|
941
|
+
parameters: {
|
|
942
|
+
path: {
|
|
943
|
+
storeId: components["parameters"]["store-id.param"];
|
|
944
|
+
};
|
|
945
|
+
};
|
|
946
|
+
responses: {
|
|
947
|
+
/** @description Success */
|
|
948
|
+
200: {
|
|
949
|
+
content: {
|
|
950
|
+
"application/json": {
|
|
951
|
+
invoices: components["schemas"]["invoice.schema"][];
|
|
952
|
+
};
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
/** @description Error */
|
|
956
|
+
default: {
|
|
957
|
+
content: {
|
|
958
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
959
|
+
};
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
};
|
|
865
963
|
/**
|
|
866
964
|
* List returns
|
|
867
965
|
* @description List returns, sorted by most recent to least recent.
|
package/lib/openapi.yaml
CHANGED
|
@@ -5,6 +5,14 @@ components:
|
|
|
5
5
|
schema:
|
|
6
6
|
type: string
|
|
7
7
|
parameters:
|
|
8
|
+
invoice-id.param:
|
|
9
|
+
description: Invoice ID
|
|
10
|
+
in: path
|
|
11
|
+
name: invoiceId
|
|
12
|
+
required: true
|
|
13
|
+
schema:
|
|
14
|
+
example: 64e4d5e837572a4813b73e40
|
|
15
|
+
type: string
|
|
8
16
|
page-continue.param:
|
|
9
17
|
description: Page marker, from X-Page-Next header
|
|
10
18
|
example: 64df700931a04885276c3364
|
|
@@ -194,6 +202,41 @@ components:
|
|
|
194
202
|
- url
|
|
195
203
|
title: HTTPS callback
|
|
196
204
|
type: object
|
|
205
|
+
invoice.schema:
|
|
206
|
+
description: Schema for an invoice.
|
|
207
|
+
properties:
|
|
208
|
+
charge:
|
|
209
|
+
$ref: '#/components/schemas/money.schema'
|
|
210
|
+
description: The charge that the invoice is for.
|
|
211
|
+
createdAt:
|
|
212
|
+
description: The time the invoice was created.
|
|
213
|
+
format: date-time
|
|
214
|
+
type: string
|
|
215
|
+
id:
|
|
216
|
+
description: The ID of the charge.
|
|
217
|
+
type: string
|
|
218
|
+
status:
|
|
219
|
+
description: The status of the invoice.
|
|
220
|
+
type: string
|
|
221
|
+
store:
|
|
222
|
+
properties:
|
|
223
|
+
id:
|
|
224
|
+
description: The ID of the store.
|
|
225
|
+
type: string
|
|
226
|
+
required:
|
|
227
|
+
- id
|
|
228
|
+
type: object
|
|
229
|
+
updatedAt:
|
|
230
|
+
description: The time the invoice was last updated.
|
|
231
|
+
format: date-time
|
|
232
|
+
type: string
|
|
233
|
+
required:
|
|
234
|
+
- team
|
|
235
|
+
- updatedAt
|
|
236
|
+
- status
|
|
237
|
+
- createdAt
|
|
238
|
+
- charge
|
|
239
|
+
type: object
|
|
197
240
|
item-quantity.schema:
|
|
198
241
|
description: Item quantity.
|
|
199
242
|
example: 1
|
|
@@ -205,10 +248,10 @@ components:
|
|
|
205
248
|
properties:
|
|
206
249
|
amount:
|
|
207
250
|
examples:
|
|
208
|
-
- 50.2
|
|
209
|
-
- 1.78
|
|
251
|
+
- '50.2'
|
|
252
|
+
- '1.78'
|
|
210
253
|
title: Amount
|
|
211
|
-
type:
|
|
254
|
+
type: string
|
|
212
255
|
currency:
|
|
213
256
|
examples:
|
|
214
257
|
- USD
|
|
@@ -256,10 +299,19 @@ components:
|
|
|
256
299
|
externalId:
|
|
257
300
|
example: '123'
|
|
258
301
|
type: string
|
|
302
|
+
fulfillmentLocationId:
|
|
303
|
+
description: ID of the location where the item was be fulfilled.
|
|
304
|
+
example: '123'
|
|
305
|
+
type:
|
|
306
|
+
- string
|
|
307
|
+
- 'null'
|
|
259
308
|
id:
|
|
260
309
|
description: Line item ID
|
|
261
310
|
title: ID
|
|
262
311
|
type: string
|
|
312
|
+
price:
|
|
313
|
+
$ref: '#/components/schemas/money.schema'
|
|
314
|
+
title: Price
|
|
263
315
|
product:
|
|
264
316
|
$ref: '#/components/schemas/product.schema'
|
|
265
317
|
title: Product
|
|
@@ -274,6 +326,8 @@ components:
|
|
|
274
326
|
- product
|
|
275
327
|
- quantity
|
|
276
328
|
- variant
|
|
329
|
+
- price
|
|
330
|
+
- fulfillmentLocationId
|
|
277
331
|
title: Line items
|
|
278
332
|
type: array
|
|
279
333
|
name:
|
|
@@ -762,6 +816,33 @@ info:
|
|
|
762
816
|
version: 2.2.0
|
|
763
817
|
openapi: 3.1.0
|
|
764
818
|
paths:
|
|
819
|
+
/invoices/{invoiceId}/items.csv:
|
|
820
|
+
description: Return invoice CSV file.
|
|
821
|
+
get:
|
|
822
|
+
description: Get an invoice as a CSV.
|
|
823
|
+
operationId: Invoice csv get
|
|
824
|
+
parameters:
|
|
825
|
+
- $ref: '#/components/parameters/invoice-id.param'
|
|
826
|
+
responses:
|
|
827
|
+
'200':
|
|
828
|
+
content:
|
|
829
|
+
text/csv:
|
|
830
|
+
schema:
|
|
831
|
+
format: binary
|
|
832
|
+
type: string
|
|
833
|
+
description: Success
|
|
834
|
+
default:
|
|
835
|
+
content:
|
|
836
|
+
application/problem+json:
|
|
837
|
+
schema:
|
|
838
|
+
$ref: '#/components/schemas/error.schema'
|
|
839
|
+
description: Error
|
|
840
|
+
security:
|
|
841
|
+
- Bearer: []
|
|
842
|
+
summary: Get invoice
|
|
843
|
+
tags:
|
|
844
|
+
- Invoice
|
|
845
|
+
summary: Invoice
|
|
765
846
|
/returns/{returnId}:
|
|
766
847
|
description: Return.
|
|
767
848
|
get:
|
|
@@ -919,6 +1000,39 @@ paths:
|
|
|
919
1000
|
tags:
|
|
920
1001
|
- Returns
|
|
921
1002
|
summary: Return status
|
|
1003
|
+
/stores/{storeId}/invoices:
|
|
1004
|
+
description: Return a list of invoices.
|
|
1005
|
+
get:
|
|
1006
|
+
description: Get a list of invoices.
|
|
1007
|
+
operationId: Invoice list
|
|
1008
|
+
parameters:
|
|
1009
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
1010
|
+
responses:
|
|
1011
|
+
'200':
|
|
1012
|
+
content:
|
|
1013
|
+
application/json:
|
|
1014
|
+
schema:
|
|
1015
|
+
properties:
|
|
1016
|
+
invoices:
|
|
1017
|
+
items:
|
|
1018
|
+
$ref: '#/components/schemas/invoice.schema'
|
|
1019
|
+
type: array
|
|
1020
|
+
required:
|
|
1021
|
+
- invoices
|
|
1022
|
+
type: object
|
|
1023
|
+
description: Success
|
|
1024
|
+
default:
|
|
1025
|
+
content:
|
|
1026
|
+
application/problem+json:
|
|
1027
|
+
schema:
|
|
1028
|
+
$ref: '#/components/schemas/error.schema'
|
|
1029
|
+
description: Error
|
|
1030
|
+
security:
|
|
1031
|
+
Bearer: []
|
|
1032
|
+
summary: Get invoice
|
|
1033
|
+
tags:
|
|
1034
|
+
- Invoice
|
|
1035
|
+
summary: Invoice
|
|
922
1036
|
/stores/{storeId}/returns:
|
|
923
1037
|
description: List of returns for store.
|
|
924
1038
|
get:
|
package/package.json
CHANGED