@redotech/redo-api-schema 2.2.45 → 2.2.63

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 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,18 @@ 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
+ parameters: {
73
+ path: {
74
+ storeId: components["parameters"]["store-id.param"];
75
+ };
76
+ };
77
+ };
59
78
  "/stores/{storeId}/returns": {
60
79
  /**
61
80
  * List returns
@@ -249,6 +268,29 @@ export interface components {
249
268
  */
250
269
  url: string;
251
270
  };
271
+ /** @description Schema for an invoice. */
272
+ "invoice.schema": {
273
+ /** @description The charge that the invoice is for. */
274
+ charge: components["schemas"]["money.schema"];
275
+ /**
276
+ * Format: date-time
277
+ * @description The time the invoice was created.
278
+ */
279
+ createdAt: string;
280
+ /** @description The ID of the charge. */
281
+ id?: string;
282
+ /** @description The status of the invoice. */
283
+ status: string;
284
+ store?: {
285
+ /** @description The ID of the store. */
286
+ id: string;
287
+ };
288
+ /**
289
+ * Format: date-time
290
+ * @description The time the invoice was last updated.
291
+ */
292
+ updatedAt: string;
293
+ };
252
294
  /**
253
295
  * Item quantity
254
296
  * @description Item quantity.
@@ -261,7 +303,7 @@ export interface components {
261
303
  */
262
304
  "money.schema": {
263
305
  /** Amount */
264
- amount?: number;
306
+ amount?: string;
265
307
  /** Currency */
266
308
  currency?: string;
267
309
  };
@@ -300,21 +342,28 @@ export interface components {
300
342
  */
301
343
  id: string;
302
344
  /** Line items */
303
- items: {
345
+ items: ({
304
346
  /** @example 123 */
305
347
  externalId?: string;
348
+ /**
349
+ * @description ID of the location where the item was be fulfilled.
350
+ * @example 123
351
+ */
352
+ fulfillmentLocationId: string | Record<string, never>;
306
353
  /**
307
354
  * ID
308
355
  * @description Line item ID
309
356
  */
310
357
  id: string;
358
+ /** Price */
359
+ price: components["schemas"]["money.schema"];
311
360
  /** Product */
312
361
  product: components["schemas"]["product.schema"];
313
362
  /** Quantity */
314
363
  quantity: components["schemas"]["item-quantity.schema"];
315
364
  /** Variant */
316
365
  variant: components["schemas"]["product-variant.schema"];
317
- }[];
366
+ })[];
318
367
  /**
319
368
  * Name
320
369
  * @description Shopify name.
@@ -677,6 +726,8 @@ export interface components {
677
726
  };
678
727
  responses: never;
679
728
  parameters: {
729
+ /** @description Invoice ID */
730
+ "invoice-id.param": string;
680
731
  /**
681
732
  * @description Page marker, from X-Page-Next header
682
733
  * @example 64df700931a04885276c3364
@@ -718,6 +769,31 @@ export type external = Record<string, never>;
718
769
 
719
770
  export interface operations {
720
771
 
772
+ /**
773
+ * Get invoice
774
+ * @description Get an invoice as a CSV.
775
+ */
776
+ "Invoice csv get": {
777
+ parameters: {
778
+ path: {
779
+ invoiceId: components["parameters"]["invoice-id.param"];
780
+ };
781
+ };
782
+ responses: {
783
+ /** @description Success */
784
+ 200: {
785
+ content: {
786
+ "text/csv": string;
787
+ };
788
+ };
789
+ /** @description Error */
790
+ default: {
791
+ content: {
792
+ "application/problem+json": components["schemas"]["error.schema"];
793
+ };
794
+ };
795
+ };
796
+ };
721
797
  /**
722
798
  * Get return
723
799
  * @description Get return.
@@ -862,6 +938,33 @@ export interface operations {
862
938
  };
863
939
  };
864
940
  };
941
+ /**
942
+ * Get invoice
943
+ * @description Get a list of invoices.
944
+ */
945
+ "Invoice list": {
946
+ parameters: {
947
+ path: {
948
+ storeId: components["parameters"]["store-id.param"];
949
+ };
950
+ };
951
+ responses: {
952
+ /** @description Success */
953
+ 200: {
954
+ content: {
955
+ "application/json": {
956
+ invoice: components["schemas"]["invoice.schema"];
957
+ };
958
+ };
959
+ };
960
+ /** @description Error */
961
+ default: {
962
+ content: {
963
+ "application/problem+json": components["schemas"]["error.schema"];
964
+ };
965
+ };
966
+ };
967
+ };
865
968
  /**
866
969
  * List returns
867
970
  * @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: number
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,37 @@ 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
+ responses:
1009
+ '200':
1010
+ content:
1011
+ application/json:
1012
+ schema:
1013
+ properties:
1014
+ invoice:
1015
+ $ref: '#/components/schemas/invoice.schema'
1016
+ required:
1017
+ - invoice
1018
+ type: object
1019
+ description: Success
1020
+ default:
1021
+ content:
1022
+ application/problem+json:
1023
+ schema:
1024
+ $ref: '#/components/schemas/error.schema'
1025
+ description: Error
1026
+ security:
1027
+ Bearer: []
1028
+ summary: Get invoice
1029
+ tags:
1030
+ - Invoice
1031
+ parameters:
1032
+ - $ref: '#/components/parameters/store-id.param'
1033
+ summary: Invoice
922
1034
  /stores/{storeId}/returns:
923
1035
  description: List of returns for store.
924
1036
  get:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.45"
34
+ "version": "2.2.63"
35
35
  }