@redotech/redo-api-schema 2.2.42 → 2.2.43

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,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
- "/__return": {
14
- /** Return event [Webhook] */
15
- post: operations["Webhook return event"];
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
  /**
@@ -703,51 +711,31 @@ export type external = Record<string, never>;
703
711
 
704
712
  export interface operations {
705
713
 
706
- /** Return event [Webhook] */
707
- "Webhook return event": {
708
- /**
709
- * @description Return event webhook.
710
- *
711
- * <!-- theme: warning -->
712
- * > #### Note
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
- };
714
+ /**
715
+ * Get return
716
+ * @description Get return.
717
+ */
718
+ "Return get": {
719
+ parameters: {
720
+ path: {
721
+ storeId: components["parameters"]["store-id.param"];
741
722
  };
742
723
  };
743
724
  responses: {
744
- /** @description Success. Return a 2xx status code to indicate success. */
745
- "2xx": {
746
- content: never;
725
+ /** @description Success */
726
+ 200: {
727
+ content: {
728
+ "application/json": {
729
+ order: components["schemas"]["order-read.schema"];
730
+ return: components["schemas"]["return-read.schema"];
731
+ };
732
+ };
747
733
  };
748
- /** @description Error. The event will be retried multiple times and then discarded. */
734
+ /** @description Error */
749
735
  default: {
750
- content: never;
736
+ content: {
737
+ "application/problem+json": components["schemas"]["error.schema"];
738
+ };
751
739
  };
752
740
  };
753
741
  };
@@ -1074,4 +1062,52 @@ export interface operations {
1074
1062
  };
1075
1063
  };
1076
1064
  };
1065
+ /** Return event [Webhook] */
1066
+ "Webhook return event": {
1067
+ /**
1068
+ * @description Return event webhook.
1069
+ *
1070
+ * <!-- theme: warning -->
1071
+ * > #### Note
1072
+ * >
1073
+ * > This is not an actual Redo API endpoint, but a webhook.
1074
+ */
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
@@ -762,56 +762,40 @@ info:
762
762
  version: 2.2.0
763
763
  openapi: 3.1.0
764
764
  paths:
765
- /__return:
766
- description: Return event webhook.
767
- post:
768
- operationId: Webhook return event
769
- requestBody:
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
- 2xx:
806
- description: Success. Return a 2xx status code to indicate success.
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
- description: Error. The event will be retried multiple times and then discarded.
786
+ content:
787
+ application/problem+json:
788
+ schema:
789
+ $ref: '#/components/schemas/error.schema'
790
+ description: Error
809
791
  security:
810
- - UserBearer: []
811
- summary: Return event [Webhook]
792
+ - Bearer: []
793
+ summary: Get return
812
794
  tags:
813
795
  - Returns
814
- summary: Return event [Webhook]
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:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.42"
34
+ "version": "2.2.43"
35
35
  }