@sonic-commerce/storefront-types 0.13.0 → 0.14.0
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/dist/index.d.ts +4 -1
- package/dist/schema.d.ts +96 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/build.mjs from app/openapi/public-api.json — do not edit.
|
|
2
|
-
// Spec version 0.
|
|
2
|
+
// Spec version 0.14.0, 53 named schemas.
|
|
3
3
|
|
|
4
4
|
export type { paths, components, operations } from "./schema";
|
|
5
5
|
import type { components } from "./schema";
|
|
@@ -44,6 +44,9 @@ export type RegionSummary = components["schemas"]["RegionSummary"];
|
|
|
44
44
|
export type RegisterBody = components["schemas"]["RegisterBody"];
|
|
45
45
|
export type Return = components["schemas"]["Return"];
|
|
46
46
|
export type ReturnItem = components["schemas"]["ReturnItem"];
|
|
47
|
+
export type ReturnQuote = components["schemas"]["ReturnQuote"];
|
|
48
|
+
export type ReturnQuoteBody = components["schemas"]["ReturnQuoteBody"];
|
|
49
|
+
export type ReturnQuoteLine = components["schemas"]["ReturnQuoteLine"];
|
|
47
50
|
export type RewardPoints = components["schemas"]["RewardPoints"];
|
|
48
51
|
export type SalesChannel = components["schemas"]["SalesChannel"];
|
|
49
52
|
export type Session = components["schemas"]["Session"];
|
package/dist/schema.d.ts
CHANGED
|
@@ -3021,6 +3021,81 @@ export interface paths {
|
|
|
3021
3021
|
patch?: never;
|
|
3022
3022
|
trace?: never;
|
|
3023
3023
|
};
|
|
3024
|
+
"/account/orders/{orderId}/return-quote": {
|
|
3025
|
+
parameters: {
|
|
3026
|
+
query?: never;
|
|
3027
|
+
header?: never;
|
|
3028
|
+
path?: never;
|
|
3029
|
+
cookie?: never;
|
|
3030
|
+
};
|
|
3031
|
+
get?: never;
|
|
3032
|
+
put?: never;
|
|
3033
|
+
/**
|
|
3034
|
+
* Price a return
|
|
3035
|
+
* @description Read-only. What requesting a return of these lines would refund, in minor units: each line's price less its share of the order's discount, plus its share of the tax frozen at placement. Validated exactly as the return request is.
|
|
3036
|
+
*/
|
|
3037
|
+
post: {
|
|
3038
|
+
parameters: {
|
|
3039
|
+
query?: never;
|
|
3040
|
+
header?: never;
|
|
3041
|
+
path: {
|
|
3042
|
+
/** @description Order id. */
|
|
3043
|
+
orderId: string;
|
|
3044
|
+
};
|
|
3045
|
+
cookie?: never;
|
|
3046
|
+
};
|
|
3047
|
+
requestBody: {
|
|
3048
|
+
content: {
|
|
3049
|
+
"application/json": components["schemas"]["ReturnQuoteBody"];
|
|
3050
|
+
};
|
|
3051
|
+
};
|
|
3052
|
+
responses: {
|
|
3053
|
+
/** @description Success */
|
|
3054
|
+
200: {
|
|
3055
|
+
headers: {
|
|
3056
|
+
[name: string]: unknown;
|
|
3057
|
+
};
|
|
3058
|
+
content: {
|
|
3059
|
+
"application/json": {
|
|
3060
|
+
data: components["schemas"]["ReturnQuote"];
|
|
3061
|
+
};
|
|
3062
|
+
};
|
|
3063
|
+
};
|
|
3064
|
+
/** @description Invalid request — unknown parameter or bad value. */
|
|
3065
|
+
400: {
|
|
3066
|
+
headers: {
|
|
3067
|
+
[name: string]: unknown;
|
|
3068
|
+
};
|
|
3069
|
+
content: {
|
|
3070
|
+
"application/json": components["schemas"]["Error"];
|
|
3071
|
+
};
|
|
3072
|
+
};
|
|
3073
|
+
/** @description Missing or invalid customer credentials. */
|
|
3074
|
+
401: {
|
|
3075
|
+
headers: {
|
|
3076
|
+
[name: string]: unknown;
|
|
3077
|
+
};
|
|
3078
|
+
content: {
|
|
3079
|
+
"application/json": components["schemas"]["Error"];
|
|
3080
|
+
};
|
|
3081
|
+
};
|
|
3082
|
+
/** @description Rate limit exceeded. */
|
|
3083
|
+
429: {
|
|
3084
|
+
headers: {
|
|
3085
|
+
[name: string]: unknown;
|
|
3086
|
+
};
|
|
3087
|
+
content: {
|
|
3088
|
+
"application/json": components["schemas"]["Error"];
|
|
3089
|
+
};
|
|
3090
|
+
};
|
|
3091
|
+
};
|
|
3092
|
+
};
|
|
3093
|
+
delete?: never;
|
|
3094
|
+
options?: never;
|
|
3095
|
+
head?: never;
|
|
3096
|
+
patch?: never;
|
|
3097
|
+
trace?: never;
|
|
3098
|
+
};
|
|
3024
3099
|
"/account/returns": {
|
|
3025
3100
|
parameters: {
|
|
3026
3101
|
query?: never;
|
|
@@ -3869,6 +3944,27 @@ export interface components {
|
|
|
3869
3944
|
}[];
|
|
3870
3945
|
note?: string;
|
|
3871
3946
|
};
|
|
3947
|
+
ReturnQuoteBody: {
|
|
3948
|
+
items: {
|
|
3949
|
+
item_id: string;
|
|
3950
|
+
quantity: number;
|
|
3951
|
+
}[];
|
|
3952
|
+
};
|
|
3953
|
+
ReturnQuoteLine: {
|
|
3954
|
+
item_id: string;
|
|
3955
|
+
quantity: number;
|
|
3956
|
+
subtotal: number;
|
|
3957
|
+
discount: number;
|
|
3958
|
+
tax: number;
|
|
3959
|
+
total: number;
|
|
3960
|
+
};
|
|
3961
|
+
ReturnQuote: {
|
|
3962
|
+
subtotal: number;
|
|
3963
|
+
discount: number;
|
|
3964
|
+
tax: number;
|
|
3965
|
+
total: number;
|
|
3966
|
+
lines: components["schemas"]["ReturnQuoteLine"][];
|
|
3967
|
+
};
|
|
3872
3968
|
};
|
|
3873
3969
|
responses: never;
|
|
3874
3970
|
parameters: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonic-commerce/storefront-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "TypeScript types for the Sonic Commerce storefront API (/api/v1).",
|
|
5
5
|
"keywords": ["sonic-commerce", "openapi", "types", "storefront"],
|
|
6
6
|
"license": "UNLICENSED",
|