ce-storefront 0.16.2 → 0.16.3

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/README.md CHANGED
@@ -127,7 +127,6 @@ run();
127
127
  * [updateCart](docs/sdks/carts/README.md#updatecart) - Add/delete cart item
128
128
  * [redeemLoyaltyPoints](docs/sdks/carts/README.md#redeemloyaltypoints) - Redeem loyalty points
129
129
  * [removeLoyaltyPoints](docs/sdks/carts/README.md#removeloyaltypoints) - Remove loyalty points
130
- * [addShippingMethod](docs/sdks/carts/README.md#addshippingmethod) - Update shipping method
131
130
 
132
131
  ### [catalog](docs/sdks/catalog/README.md)
133
132
 
@@ -201,7 +200,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
201
200
  - [`authRefreshToken`](docs/sdks/auth/README.md#refreshtoken) - Refresh access token
202
201
  - [`authUpdateUser`](docs/sdks/auth/README.md#updateuser) - Update a user
203
202
  - [`authVerifyOtp`](docs/sdks/auth/README.md#verifyotp) - Verify OTP
204
- - [`cartsAddShippingMethod`](docs/sdks/carts/README.md#addshippingmethod) - Update shipping method
205
203
  - [`cartsApplyCoupon`](docs/sdks/carts/README.md#applycoupon) - Apply coupon
206
204
  - [`cartsCreateCart`](docs/sdks/carts/README.md#createcart) - Create cart
207
205
  - [`cartsCreateCartAddress`](docs/sdks/carts/README.md#createcartaddress) - Update cart address
@@ -380,8 +378,8 @@ run();
380
378
 
381
379
 
382
380
  **Inherit from [`CeStorefrontError`](./src/models/errors/cestorefronterror.ts)**:
383
- * [`NotFound`](./src/models/errors/notfound.ts): Requested resource not found. Status code `404`. Applicable to 41 of 52 methods.*
384
- * [`BadRequest`](./src/models/errors/badrequest.ts): Bad request. Status code `400`. Applicable to 30 of 52 methods.*
381
+ * [`NotFound`](./src/models/errors/notfound.ts): Requested resource not found. Status code `404`. Applicable to 40 of 51 methods.*
382
+ * [`BadRequest`](./src/models/errors/badrequest.ts): Bad request. Status code `400`. Applicable to 29 of 51 methods.*
385
383
  * [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
386
384
 
387
385
  </details>
@@ -17,7 +17,6 @@
17
17
  * [updateCart](#updatecart) - Add/delete cart item
18
18
  * [redeemLoyaltyPoints](#redeemloyaltypoints) - Redeem loyalty points
19
19
  * [removeLoyaltyPoints](#removeloyaltypoints) - Remove loyalty points
20
- * [addShippingMethod](#addshippingmethod) - Update shipping method
21
20
 
22
21
  ## createCart
23
22
 
@@ -1028,91 +1027,4 @@ run();
1028
1027
  | ------------------- | ------------------- | ------------------- |
1029
1028
  | errors.BadRequest | 400 | application/json |
1030
1029
  | errors.Unauthorized | 401 | application/json |
1031
- | errors.CeError | 4XX, 5XX | \*/\* |
1032
-
1033
- ## addShippingMethod
1034
-
1035
- Update preferred shipping method and courier.
1036
-
1037
- API reference for the update-shipping-method operation
1038
- <https://llm-docs.commercengine.io/storefront/operations/update-shipping-method>
1039
-
1040
- ### Example Usage
1041
-
1042
- <!-- UsageSnippet language="typescript" operationID="update-shipping-method" method="post" path="/carts/{id}/shipping-method" -->
1043
- ```typescript
1044
- import { CeStorefront } from "ce-storefront";
1045
-
1046
- const ceStorefront = new CeStorefront({
1047
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
1048
- });
1049
-
1050
- async function run() {
1051
- const result = await ceStorefront.carts.addShippingMethod({
1052
- id: "<id>",
1053
- requestBody: {
1054
- shippingProviderId: "<id>",
1055
- courierCompanyId: "<id>",
1056
- },
1057
- });
1058
-
1059
- console.log(result);
1060
- }
1061
-
1062
- run();
1063
- ```
1064
-
1065
- ### Standalone function
1066
-
1067
- The standalone function version of this method:
1068
-
1069
- ```typescript
1070
- import { CeStorefrontCore } from "ce-storefront/core.js";
1071
- import { cartsAddShippingMethod } from "ce-storefront/funcs/cartsAddShippingMethod.js";
1072
-
1073
- // Use `CeStorefrontCore` for best tree-shaking performance.
1074
- // You can create one instance of it to use across an application.
1075
- const ceStorefront = new CeStorefrontCore({
1076
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
1077
- });
1078
-
1079
- async function run() {
1080
- const res = await cartsAddShippingMethod(ceStorefront, {
1081
- id: "<id>",
1082
- requestBody: {
1083
- shippingProviderId: "<id>",
1084
- courierCompanyId: "<id>",
1085
- },
1086
- });
1087
- if (res.ok) {
1088
- const { value: result } = res;
1089
- console.log(result);
1090
- } else {
1091
- console.log("cartsAddShippingMethod failed:", res.error);
1092
- }
1093
- }
1094
-
1095
- run();
1096
- ```
1097
-
1098
- ### Parameters
1099
-
1100
- | Parameter | Type | Required | Description |
1101
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1102
- | `request` | [operations.UpdateShippingMethodRequest](../../models/operations/updateshippingmethodrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1103
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1104
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1105
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1106
-
1107
- ### Response
1108
-
1109
- **Promise\<[operations.UpdateShippingMethodResponseBody](../../models/operations/updateshippingmethodresponsebody.md)\>**
1110
-
1111
- ### Errors
1112
-
1113
- | Error Type | Status Code | Content Type |
1114
- | ------------------- | ------------------- | ------------------- |
1115
- | errors.BadRequest | 400 | application/json |
1116
- | errors.Unauthorized | 401 | application/json |
1117
- | errors.NotFound | 404 | application/json |
1118
1030
  | errors.CeError | 4XX, 5XX | \*/\* |
@@ -46,8 +46,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
46
46
  export declare const SDK_METADATA: {
47
47
  readonly language: "typescript";
48
48
  readonly openapiDocVersion: "1.0";
49
- readonly sdkVersion: "0.16.2";
49
+ readonly sdkVersion: "0.16.3";
50
50
  readonly genVersion: "2.723.11";
51
- readonly userAgent: "speakeasy-sdk/typescript 0.16.2 2.723.11 1.0 ce-storefront";
51
+ readonly userAgent: "speakeasy-sdk/typescript 0.16.3 2.723.11 1.0 ce-storefront";
52
52
  };
53
53
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -39,8 +39,8 @@ export function serverURLFromOptions(options) {
39
39
  export const SDK_METADATA = {
40
40
  language: "typescript",
41
41
  openapiDocVersion: "1.0",
42
- sdkVersion: "0.16.2",
42
+ sdkVersion: "0.16.3",
43
43
  genVersion: "2.723.11",
44
- userAgent: "speakeasy-sdk/typescript 0.16.2 2.723.11 1.0 ce-storefront",
44
+ userAgent: "speakeasy-sdk/typescript 0.16.3 2.723.11 1.0 ce-storefront",
45
45
  };
46
46
  //# sourceMappingURL=config.js.map
@@ -47,7 +47,6 @@ export * from "./searchproducts.js";
47
47
  export * from "./updateaddressdetail.js";
48
48
  export * from "./updatecart.js";
49
49
  export * from "./updatefulfillmentpreference.js";
50
- export * from "./updateshippingmethod.js";
51
50
  export * from "./updateuser.js";
52
51
  export * from "./verifyotp.js";
53
52
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/operations/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;A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Ac,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -50,7 +50,6 @@ export * from "./searchproducts.js";
50
50
  export * from "./updateaddressdetail.js";
51
51
  export * from "./updatecart.js";
52
52
  export * from "./updatefulfillmentpreference.js";
53
- export * from "./updateshippingmethod.js";
54
53
  export * from "./updateuser.js";
55
54
  export * from "./verifyotp.js";
56
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/operations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/operations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -109,14 +109,5 @@ export declare class Carts extends ClientSDK {
109
109
  * @see {@link https://llm-docs.commercengine.io/storefront/operations/remove-loyalty-points} - API reference for the remove-loyalty-points operation
110
110
  */
111
111
  removeLoyaltyPoints(request: operations.RemoveLoyaltyPointsRequest, options?: RequestOptions): Promise<operations.RemoveLoyaltyPointsResponseBody>;
112
- /**
113
- * Update shipping method
114
- *
115
- * @remarks
116
- * Update preferred shipping method and courier.
117
- *
118
- * @see {@link https://llm-docs.commercengine.io/storefront/operations/update-shipping-method} - API reference for the update-shipping-method operation
119
- */
120
- addShippingMethod(request: operations.UpdateShippingMethodRequest, options?: RequestOptions): Promise<operations.UpdateShippingMethodResponseBody>;
121
112
  }
122
113
  //# sourceM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G,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;OAOG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;;;OAOG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;CAOvD"}
package/esm/sdk/carts.js CHANGED
@@ -1,7 +1,6 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import { cartsAddShippingMethod } from "../funcs/cartsAddShippingMethod.js";
5
4
  import { cartsApplyCoupon } from "../funcs/cartsApplyCoupon.js";
6
5
  import { cartsCreateCart } from "../funcs/cartsCreateCart.js";
7
6
  import { cartsCreateCartAddress } from "../funcs/cartsCreateCartAddress.js";
@@ -149,16 +148,5 @@ export class Carts extends ClientSDK {
149
148
  async removeLoyaltyPoints(request, options) {
150
149
  return unwrapAsync(cartsRemoveLoyaltyPoints(this, request, options));
151
150
  }
152
- /**
153
- * Update shipping method
154
- *
155
- * @remarks
156
- * Update preferred shipping method and courier.
157
- *
158
- * @see {@link https://llm-docs.commercengine.io/storefront/operations/update-shipping-method} - API reference for the update-shipping-method operation
159
- */
160
- async addShippingMethod(request, options) {
161
- return unwrapAsync(cartsAddShippingMethod(this, request, options));
162
- }
163
151
  }
164
152
  //# sourceMappingURL=carts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carts.js","sourceRoot":"","sources":["../../src/sdk/carts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5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C,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,iBAAiB,CAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,2BAA2B,CAC/B,OAAsD,EACtD,OAAwB;QAExB,OAAO,WAAW,CAAC,gCAAgC,CACjD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,eAAe,CAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,WAAW,CAAC,wBAAwB,CACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,WAAW,CAAC,wBAAwB,CACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "..": {
20
20
  "name": "ce-storefront",
21
- "version": "0.16.2",
21
+ "version": "0.16.3",
22
22
  "dependencies": {
23
23
  "zod": "^3.20.0"
24
24
  },
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "ce-storefront",
5
- "version": "0.16.2",
5
+ "version": "0.16.3",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ce-storefront",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "author": "TarkAI",
5
5
  "type": "module",
6
6
  "main": "./esm/index.js",
package/src/lib/config.ts CHANGED
@@ -80,7 +80,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "1.0",
83
- sdkVersion: "0.16.2",
83
+ sdkVersion: "0.16.3",
84
84
  genVersion: "2.723.11",
85
- userAgent: "speakeasy-sdk/typescript 0.16.2 2.723.11 1.0 ce-storefront",
85
+ userAgent: "speakeasy-sdk/typescript 0.16.3 2.723.11 1.0 ce-storefront",
86
86
  } as const;
@@ -51,6 +51,5 @@ export * from "./searchproducts.js";
51
51
  export * from "./updateaddressdetail.js";
52
52
  export * from "./updatecart.js";
53
53
  export * from "./updatefulfillmentpreference.js";
54
- export * from "./updateshippingmethod.js";
55
54
  export * from "./updateuser.js";
56
55
  export * from "./verifyotp.js";
package/src/sdk/carts.ts CHANGED
@@ -2,7 +2,6 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { cartsAddShippingMethod } from "../funcs/cartsAddShippingMethod.js";
6
5
  import { cartsApplyCoupon } from "../funcs/cartsApplyCoupon.js";
7
6
  import { cartsCreateCart } from "../funcs/cartsCreateCart.js";
8
7
  import { cartsCreateCartAddress } from "../funcs/cartsCreateCartAddress.js";
@@ -247,23 +246,4 @@ export class Carts extends ClientSDK {
247
246
  options,
248
247
  ));
249
248
  }
250
-
251
- /**
252
- * Update shipping method
253
- *
254
- * @remarks
255
- * Update preferred shipping method and courier.
256
- *
257
- * @see {@link https://llm-docs.commercengine.io/storefront/operations/update-shipping-method} - API reference for the update-shipping-method operation
258
- */
259
- async addShippingMethod(
260
- request: operations.UpdateShippingMethodRequest,
261
- options?: RequestOptions,
262
- ): Promise<operations.UpdateShippingMethodResponseBody> {
263
- return unwrapAsync(cartsAddShippingMethod(
264
- this,
265
- request,
266
- options,
267
- ));
268
- }
269
249
  }
@@ -1,20 +0,0 @@
1
- import { CeStorefrontCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import { CeStorefrontError } from "../models/errors/cestorefronterror.js";
4
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
- import * as errors from "../models/errors/index.js";
6
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
- import * as operations from "../models/operations/index.js";
9
- import { APIPromise } from "../types/async.js";
10
- import { Result } from "../types/fp.js";
11
- /**
12
- * Update shipping method
13
- *
14
- * @remarks
15
- * Update preferred shipping method and courier.
16
- *
17
- * @see {@link https://llm-docs.commercengine.io/storefront/operations/update-shipping-method} - API reference for the update-shipping-method operation
18
- */
19
- export declare function cartsAddShippingMethod(client: CeStorefrontCore, request: operations.UpdateShippingMethodRequest, options?: RequestOptions): APIPromise<Result<operations.UpdateShippingMethodResponseBody, errors.BadRequest | errors.Unauthorized | errors.NotFound | CeStorefrontError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
20
- //# sourceMappingURL=cartsAddShippingMethod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cartsAddShippingMethod.d.ts","sourceRoot":"","sources":["../../src/funcs/cartsAddShippingMethod.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAK9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,gCAAgC,EACzC,MAAM,CAAC,UAAU,GACjB,MAAM,CAAC,YAAY,GACnB,MAAM,CAAC,QAAQ,GACf,iBAAiB,GACjB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1,90 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
5
- import * as M from "../lib/matchers.js";
6
- import { compactMap } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
- import { pathToFunc } from "../lib/url.js";
10
- import * as errors from "../models/errors/index.js";
11
- import * as operations from "../models/operations/index.js";
12
- import { APIPromise } from "../types/async.js";
13
- /**
14
- * Update shipping method
15
- *
16
- * @remarks
17
- * Update preferred shipping method and courier.
18
- *
19
- * @see {@link https://llm-docs.commercengine.io/storefront/operations/update-shipping-method} - API reference for the update-shipping-method operation
20
- */
21
- export function cartsAddShippingMethod(client, request, options) {
22
- return new APIPromise($do(client, request, options));
23
- }
24
- async function $do(client, request, options) {
25
- const parsed = safeParse(request, (value) => operations.UpdateShippingMethodRequest$outboundSchema.parse(value), "Input validation failed");
26
- if (!parsed.ok) {
27
- return [parsed, { status: "invalid" }];
28
- }
29
- const payload = parsed.value;
30
- const body = encodeJSON("body", payload.RequestBody, { explode: true });
31
- const pathParams = {
32
- id: encodeSimple("id", payload.id, {
33
- explode: false,
34
- charEncoding: "percent",
35
- }),
36
- };
37
- const path = pathToFunc("/carts/{id}/shipping-method")(pathParams);
38
- const headers = new Headers(compactMap({
39
- "Content-Type": "application/json",
40
- Accept: "application/json",
41
- }));
42
- const secConfig = await extractSecurity(client._options.authorization);
43
- const securityInput = secConfig == null ? {} : { authorization: secConfig };
44
- const requestSecurity = resolveGlobalSecurity(securityInput);
45
- const context = {
46
- options: client._options,
47
- baseURL: options?.serverURL ?? client._baseURL ?? "",
48
- operationID: "update-shipping-method",
49
- oAuth2Scopes: null,
50
- resolvedSecurity: requestSecurity,
51
- securitySource: client._options.authorization,
52
- retryConfig: options?.retries
53
- || client._options.retryConfig
54
- || { strategy: "none" },
55
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
56
- };
57
- const requestRes = client._createRequest(context, {
58
- security: requestSecurity,
59
- method: "POST",
60
- baseURL: options?.serverURL,
61
- path: path,
62
- headers: headers,
63
- body: body,
64
- userAgent: client._options.userAgent,
65
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
66
- }, options);
67
- if (!requestRes.ok) {
68
- return [requestRes, { status: "invalid" }];
69
- }
70
- const req = requestRes.value;
71
- const doResult = await client._do(req, {
72
- context,
73
- errorCodes: ["400", "401", "404", "4XX", "5XX"],
74
- retryConfig: context.retryConfig,
75
- retryCodes: context.retryCodes,
76
- });
77
- if (!doResult.ok) {
78
- return [doResult, { status: "request-error", request: req }];
79
- }
80
- const response = doResult.value;
81
- const responseFields = {
82
- HttpMeta: { Response: response, Request: req },
83
- };
84
- const [result] = await M.match(M.json(200, operations.UpdateShippingMethodResponseBody$inboundSchema), M.jsonErr(400, errors.BadRequest$inboundSchema), M.jsonErr(401, errors.Unauthorized$inboundSchema), M.jsonErr(404, errors.NotFound$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
85
- if (!result.ok) {
86
- return [result, { status: "complete", request: req, response }];
87
- }
88
- return [result, { status: "complete", request: req, response }];
89
- }
90
- //# sourceMappingURL=cartsAddShippingMethod.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cartsAddShippingMethod.js","sourceRoot":"","sources":["../../src/funcs/cartsAddShippingMethod.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAwB,EACxB,OAA+C,EAC/C,OAAwB;IAiBxB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAwB,EACxB,OAA+C,EAC/C,OAAwB;IAoBxB,MAAM,MAAM,GAAG,SAAS,CACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,0CAA0C,CAAC,KAAK,CAAC,KAAK,CAAC,EACpE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,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C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAc5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,8CAA8C,CAAC,EACtE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,wBAAwB,CAAC,EAC/C,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,0BAA0B,CAAC,EACjD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,sBAAsB,CAAC,EAC7C,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,122 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import * as components from "../components/index.js";
4
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
- export type UpdateShippingMethodRequestBody = {
6
- shippingProviderId: string;
7
- courierCompanyId: string | null;
8
- };
9
- export type UpdateShippingMethodRequest = {
10
- /**
11
- * Cart ID
12
- */
13
- id: string;
14
- requestBody: UpdateShippingMethodRequestBody;
15
- };
16
- export type UpdateShippingMethodContent = {
17
- /**
18
- * This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
19
- */
20
- cart: components.Cart;
21
- };
22
- /**
23
- * OK
24
- */
25
- export type UpdateShippingMethodResponseBody = {
26
- message: string;
27
- success: boolean;
28
- content: UpdateShippingMethodContent;
29
- };
30
- /** @internal */
31
- export declare const UpdateShippingMethodRequestBody$inboundSchema: z.ZodType<UpdateShippingMethodRequestBody, z.ZodTypeDef, unknown>;
32
- /** @internal */
33
- export type UpdateShippingMethodRequestBody$Outbound = {
34
- shipping_provider_id: string;
35
- courier_company_id: string | null;
36
- };
37
- /** @internal */
38
- export declare const UpdateShippingMethodRequestBody$outboundSchema: z.ZodType<UpdateShippingMethodRequestBody$Outbound, z.ZodTypeDef, UpdateShippingMethodRequestBody>;
39
- /**
40
- * @internal
41
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
42
- */
43
- export declare namespace UpdateShippingMethodRequestBody$ {
44
- /** @deprecated use `UpdateShippingMethodRequestBody$inboundSchema` instead. */
45
- const inboundSchema: z.ZodType<UpdateShippingMethodRequestBody, z.ZodTypeDef, unknown>;
46
- /** @deprecated use `UpdateShippingMethodRequestBody$outboundSchema` instead. */
47
- const outboundSchema: z.ZodType<UpdateShippingMethodRequestBody$Outbound, z.ZodTypeDef, UpdateShippingMethodRequestBody>;
48
- /** @deprecated use `UpdateShippingMethodRequestBody$Outbound` instead. */
49
- type Outbound = UpdateShippingMethodRequestBody$Outbound;
50
- }
51
- export declare function updateShippingMethodRequestBodyToJSON(updateShippingMethodRequestBody: UpdateShippingMethodRequestBody): string;
52
- export declare function updateShippingMethodRequestBodyFromJSON(jsonString: string): SafeParseResult<UpdateShippingMethodRequestBody, SDKValidationError>;
53
- /** @internal */
54
- export declare const UpdateShippingMethodRequest$inboundSchema: z.ZodType<UpdateShippingMethodRequest, z.ZodTypeDef, unknown>;
55
- /** @internal */
56
- export type UpdateShippingMethodRequest$Outbound = {
57
- id: string;
58
- RequestBody: UpdateShippingMethodRequestBody$Outbound;
59
- };
60
- /** @internal */
61
- export declare const UpdateShippingMethodRequest$outboundSchema: z.ZodType<UpdateShippingMethodRequest$Outbound, z.ZodTypeDef, UpdateShippingMethodRequest>;
62
- /**
63
- * @internal
64
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
65
- */
66
- export declare namespace UpdateShippingMethodRequest$ {
67
- /** @deprecated use `UpdateShippingMethodRequest$inboundSchema` instead. */
68
- const inboundSchema: z.ZodType<UpdateShippingMethodRequest, z.ZodTypeDef, unknown>;
69
- /** @deprecated use `UpdateShippingMethodRequest$outboundSchema` instead. */
70
- const outboundSchema: z.ZodType<UpdateShippingMethodRequest$Outbound, z.ZodTypeDef, UpdateShippingMethodRequest>;
71
- /** @deprecated use `UpdateShippingMethodRequest$Outbound` instead. */
72
- type Outbound = UpdateShippingMethodRequest$Outbound;
73
- }
74
- export declare function updateShippingMethodRequestToJSON(updateShippingMethodRequest: UpdateShippingMethodRequest): string;
75
- export declare function updateShippingMethodRequestFromJSON(jsonString: string): SafeParseResult<UpdateShippingMethodRequest, SDKValidationError>;
76
- /** @internal */
77
- export declare const UpdateShippingMethodContent$inboundSchema: z.ZodType<UpdateShippingMethodContent, z.ZodTypeDef, unknown>;
78
- /** @internal */
79
- export type UpdateShippingMethodContent$Outbound = {
80
- cart: components.Cart$Outbound;
81
- };
82
- /** @internal */
83
- export declare const UpdateShippingMethodContent$outboundSchema: z.ZodType<UpdateShippingMethodContent$Outbound, z.ZodTypeDef, UpdateShippingMethodContent>;
84
- /**
85
- * @internal
86
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
87
- */
88
- export declare namespace UpdateShippingMethodContent$ {
89
- /** @deprecated use `UpdateShippingMethodContent$inboundSchema` instead. */
90
- const inboundSchema: z.ZodType<UpdateShippingMethodContent, z.ZodTypeDef, unknown>;
91
- /** @deprecated use `UpdateShippingMethodContent$outboundSchema` instead. */
92
- const outboundSchema: z.ZodType<UpdateShippingMethodContent$Outbound, z.ZodTypeDef, UpdateShippingMethodContent>;
93
- /** @deprecated use `UpdateShippingMethodContent$Outbound` instead. */
94
- type Outbound = UpdateShippingMethodContent$Outbound;
95
- }
96
- export declare function updateShippingMethodContentToJSON(updateShippingMethodContent: UpdateShippingMethodContent): string;
97
- export declare function updateShippingMethodContentFromJSON(jsonString: string): SafeParseResult<UpdateShippingMethodContent, SDKValidationError>;
98
- /** @internal */
99
- export declare const UpdateShippingMethodResponseBody$inboundSchema: z.ZodType<UpdateShippingMethodResponseBody, z.ZodTypeDef, unknown>;
100
- /** @internal */
101
- export type UpdateShippingMethodResponseBody$Outbound = {
102
- message: string;
103
- success: boolean;
104
- content: UpdateShippingMethodContent$Outbound;
105
- };
106
- /** @internal */
107
- export declare const UpdateShippingMethodResponseBody$outboundSchema: z.ZodType<UpdateShippingMethodResponseBody$Outbound, z.ZodTypeDef, UpdateShippingMethodResponseBody>;
108
- /**
109
- * @internal
110
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
111
- */
112
- export declare namespace UpdateShippingMethodResponseBody$ {
113
- /** @deprecated use `UpdateShippingMethodResponseBody$inboundSchema` instead. */
114
- const inboundSchema: z.ZodType<UpdateShippingMethodResponseBody, z.ZodTypeDef, unknown>;
115
- /** @deprecated use `UpdateShippingMethodResponseBody$outboundSchema` instead. */
116
- const outboundSchema: z.ZodType<UpdateShippingMethodResponseBody$Outbound, z.ZodTypeDef, UpdateShippingMethodResponseBody>;
117
- /** @deprecated use `UpdateShippingMethodResponseBody$Outbound` instead. */
118
- type Outbound = UpdateShippingMethodResponseBody$Outbound;
119
- }
120
- export declare function updateShippingMethodResponseBodyToJSON(updateShippingMethodResponseBody: UpdateShippingMethodResponseBody): string;
121
- export declare function updateShippingMethodResponseBodyFromJSON(jsonString: string): SafeParseResult<UpdateShippingMethodResponseBody, SDKValidationError>;
122
- //# sourceMappingURL=updateshippingmethod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateshippingmethod.d.ts","sourceRoot":"","sources":["../../../src/models/operations/updateshippingmethod.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,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+0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod";
5
- import { remap as remap$ } from "../../lib/primitives.js";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import * as components from "../components/index.js";
8
- /** @internal */
9
- export const UpdateShippingMethodRequestBody$inboundSchema = z.object({
10
- shipping_provider_id: z.string(),
11
- courier_company_id: z.nullable(z.string()),
12
- }).transform((v) => {
13
- return remap$(v, {
14
- "shipping_provider_id": "shippingProviderId",
15
- "courier_company_id": "courierCompanyId",
16
- });
17
- });
18
- /** @internal */
19
- export const UpdateShippingMethodRequestBody$outboundSchema = z.object({
20
- shippingProviderId: z.string(),
21
- courierCompanyId: z.nullable(z.string()),
22
- }).transform((v) => {
23
- return remap$(v, {
24
- shippingProviderId: "shipping_provider_id",
25
- courierCompanyId: "courier_company_id",
26
- });
27
- });
28
- /**
29
- * @internal
30
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
31
- */
32
- export var UpdateShippingMethodRequestBody$;
33
- (function (UpdateShippingMethodRequestBody$) {
34
- /** @deprecated use `UpdateShippingMethodRequestBody$inboundSchema` instead. */
35
- UpdateShippingMethodRequestBody$.inboundSchema = UpdateShippingMethodRequestBody$inboundSchema;
36
- /** @deprecated use `UpdateShippingMethodRequestBody$outboundSchema` instead. */
37
- UpdateShippingMethodRequestBody$.outboundSchema = UpdateShippingMethodRequestBody$outboundSchema;
38
- })(UpdateShippingMethodRequestBody$ || (UpdateShippingMethodRequestBody$ = {}));
39
- export function updateShippingMethodRequestBodyToJSON(updateShippingMethodRequestBody) {
40
- return JSON.stringify(UpdateShippingMethodRequestBody$outboundSchema.parse(updateShippingMethodRequestBody));
41
- }
42
- export function updateShippingMethodRequestBodyFromJSON(jsonString) {
43
- return safeParse(jsonString, (x) => UpdateShippingMethodRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateShippingMethodRequestBody' from JSON`);
44
- }
45
- /** @internal */
46
- export const UpdateShippingMethodRequest$inboundSchema = z.object({
47
- id: z.string(),
48
- RequestBody: z.lazy(() => UpdateShippingMethodRequestBody$inboundSchema),
49
- }).transform((v) => {
50
- return remap$(v, {
51
- "RequestBody": "requestBody",
52
- });
53
- });
54
- /** @internal */
55
- export const UpdateShippingMethodRequest$outboundSchema = z.object({
56
- id: z.string(),
57
- requestBody: z.lazy(() => UpdateShippingMethodRequestBody$outboundSchema),
58
- }).transform((v) => {
59
- return remap$(v, {
60
- requestBody: "RequestBody",
61
- });
62
- });
63
- /**
64
- * @internal
65
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
- */
67
- export var UpdateShippingMethodRequest$;
68
- (function (UpdateShippingMethodRequest$) {
69
- /** @deprecated use `UpdateShippingMethodRequest$inboundSchema` instead. */
70
- UpdateShippingMethodRequest$.inboundSchema = UpdateShippingMethodRequest$inboundSchema;
71
- /** @deprecated use `UpdateShippingMethodRequest$outboundSchema` instead. */
72
- UpdateShippingMethodRequest$.outboundSchema = UpdateShippingMethodRequest$outboundSchema;
73
- })(UpdateShippingMethodRequest$ || (UpdateShippingMethodRequest$ = {}));
74
- export function updateShippingMethodRequestToJSON(updateShippingMethodRequest) {
75
- return JSON.stringify(UpdateShippingMethodRequest$outboundSchema.parse(updateShippingMethodRequest));
76
- }
77
- export function updateShippingMethodRequestFromJSON(jsonString) {
78
- return safeParse(jsonString, (x) => UpdateShippingMethodRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateShippingMethodRequest' from JSON`);
79
- }
80
- /** @internal */
81
- export const UpdateShippingMethodContent$inboundSchema = z.object({
82
- cart: components.Cart$inboundSchema,
83
- });
84
- /** @internal */
85
- export const UpdateShippingMethodContent$outboundSchema = z.object({
86
- cart: components.Cart$outboundSchema,
87
- });
88
- /**
89
- * @internal
90
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
91
- */
92
- export var UpdateShippingMethodContent$;
93
- (function (UpdateShippingMethodContent$) {
94
- /** @deprecated use `UpdateShippingMethodContent$inboundSchema` instead. */
95
- UpdateShippingMethodContent$.inboundSchema = UpdateShippingMethodContent$inboundSchema;
96
- /** @deprecated use `UpdateShippingMethodContent$outboundSchema` instead. */
97
- UpdateShippingMethodContent$.outboundSchema = UpdateShippingMethodContent$outboundSchema;
98
- })(UpdateShippingMethodContent$ || (UpdateShippingMethodContent$ = {}));
99
- export function updateShippingMethodContentToJSON(updateShippingMethodContent) {
100
- return JSON.stringify(UpdateShippingMethodContent$outboundSchema.parse(updateShippingMethodContent));
101
- }
102
- export function updateShippingMethodContentFromJSON(jsonString) {
103
- return safeParse(jsonString, (x) => UpdateShippingMethodContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateShippingMethodContent' from JSON`);
104
- }
105
- /** @internal */
106
- export const UpdateShippingMethodResponseBody$inboundSchema = z.object({
107
- message: z.string(),
108
- success: z.boolean(),
109
- content: z.lazy(() => UpdateShippingMethodContent$inboundSchema),
110
- });
111
- /** @internal */
112
- export const UpdateShippingMethodResponseBody$outboundSchema = z.object({
113
- message: z.string(),
114
- success: z.boolean(),
115
- content: z.lazy(() => UpdateShippingMethodContent$outboundSchema),
116
- });
117
- /**
118
- * @internal
119
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
120
- */
121
- export var UpdateShippingMethodResponseBody$;
122
- (function (UpdateShippingMethodResponseBody$) {
123
- /** @deprecated use `UpdateShippingMethodResponseBody$inboundSchema` instead. */
124
- UpdateShippingMethodResponseBody$.inboundSchema = UpdateShippingMethodResponseBody$inboundSchema;
125
- /** @deprecated use `UpdateShippingMethodResponseBody$outboundSchema` instead. */
126
- UpdateShippingMethodResponseBody$.outboundSchema = UpdateShippingMethodResponseBody$outboundSchema;
127
- })(UpdateShippingMethodResponseBody$ || (UpdateShippingMethodResponseBody$ = {}));
128
- export function updateShippingMethodResponseBodyToJSON(updateShippingMethodResponseBody) {
129
- return JSON.stringify(UpdateShippingMethodResponseBody$outboundSchema.parse(updateShippingMethodResponseBody));
130
- }
131
- export function updateShippingMethodResponseBodyFromJSON(jsonString) {
132
- return safeParse(jsonString, (x) => UpdateShippingMethodResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateShippingMethodResponseBody' from JSON`);
133
- }
134
- //# sourceMappingURL=updateshippingmethod.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateshippingmethod.js","sourceRoot":"","sources":["../../../src/models/operations/updateshippingmethod.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAgCrD,gBAAgB;AAChB,MAAM,CAAC,MAAM,6CAA6C,GAItD,CAAC,CAAC,MAAM,CAAC;IACX,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE;IAChC,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC3C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,sBAAsB,EAAE,oBAAoB;QAC5C,oBAAoB,EAAE,kBAAkB;KACzC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAQH,gBAAgB;AAChB,MAAM,CAAC,MAAM,8CAA8C,GAIvD,CAAC,CAAC,MAAM,CAAC;IACX,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACzC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,kBAAkB,EAAE,sB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AAC,EAAE,EAAE,CAAC,8CAA8C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1E,8DAA8D,CAC/D,CAAC;AACJ,CAAC"}
@@ -1,187 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { CeStorefrontCore } from "../core.js";
6
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
- import * as M from "../lib/matchers.js";
8
- import { compactMap } from "../lib/primitives.js";
9
- import { safeParse } from "../lib/schemas.js";
10
- import { RequestOptions } from "../lib/sdks.js";
11
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
- import { pathToFunc } from "../lib/url.js";
13
- import { CeStorefrontError } from "../models/errors/cestorefronterror.js";
14
- import {
15
- ConnectionError,
16
- InvalidRequestError,
17
- RequestAbortedError,
18
- RequestTimeoutError,
19
- UnexpectedClientError,
20
- } from "../models/errors/httpclienterrors.js";
21
- import * as errors from "../models/errors/index.js";
22
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
- import * as operations from "../models/operations/index.js";
25
- import { APICall, APIPromise } from "../types/async.js";
26
- import { Result } from "../types/fp.js";
27
-
28
- /**
29
- * Update shipping method
30
- *
31
- * @remarks
32
- * Update preferred shipping method and courier.
33
- *
34
- * @see {@link https://llm-docs.commercengine.io/storefront/operations/update-shipping-method} - API reference for the update-shipping-method operation
35
- */
36
- export function cartsAddShippingMethod(
37
- client: CeStorefrontCore,
38
- request: operations.UpdateShippingMethodRequest,
39
- options?: RequestOptions,
40
- ): APIPromise<
41
- Result<
42
- operations.UpdateShippingMethodResponseBody,
43
- | errors.BadRequest
44
- | errors.Unauthorized
45
- | errors.NotFound
46
- | CeStorefrontError
47
- | ResponseValidationError
48
- | ConnectionError
49
- | RequestAbortedError
50
- | RequestTimeoutError
51
- | InvalidRequestError
52
- | UnexpectedClientError
53
- | SDKValidationError
54
- >
55
- > {
56
- return new APIPromise($do(
57
- client,
58
- request,
59
- options,
60
- ));
61
- }
62
-
63
- async function $do(
64
- client: CeStorefrontCore,
65
- request: operations.UpdateShippingMethodRequest,
66
- options?: RequestOptions,
67
- ): Promise<
68
- [
69
- Result<
70
- operations.UpdateShippingMethodResponseBody,
71
- | errors.BadRequest
72
- | errors.Unauthorized
73
- | errors.NotFound
74
- | CeStorefrontError
75
- | ResponseValidationError
76
- | ConnectionError
77
- | RequestAbortedError
78
- | RequestTimeoutError
79
- | InvalidRequestError
80
- | UnexpectedClientError
81
- | SDKValidationError
82
- >,
83
- APICall,
84
- ]
85
- > {
86
- const parsed = safeParse(
87
- request,
88
- (value) =>
89
- operations.UpdateShippingMethodRequest$outboundSchema.parse(value),
90
- "Input validation failed",
91
- );
92
- if (!parsed.ok) {
93
- return [parsed, { status: "invalid" }];
94
- }
95
- const payload = parsed.value;
96
- const body = encodeJSON("body", payload.RequestBody, { explode: true });
97
-
98
- const pathParams = {
99
- id: encodeSimple("id", payload.id, {
100
- explode: false,
101
- charEncoding: "percent",
102
- }),
103
- };
104
-
105
- const path = pathToFunc("/carts/{id}/shipping-method")(pathParams);
106
-
107
- const headers = new Headers(compactMap({
108
- "Content-Type": "application/json",
109
- Accept: "application/json",
110
- }));
111
-
112
- const secConfig = await extractSecurity(client._options.authorization);
113
- const securityInput = secConfig == null ? {} : { authorization: secConfig };
114
- const requestSecurity = resolveGlobalSecurity(securityInput);
115
-
116
- const context = {
117
- options: client._options,
118
- baseURL: options?.serverURL ?? client._baseURL ?? "",
119
- operationID: "update-shipping-method",
120
- oAuth2Scopes: null,
121
-
122
- resolvedSecurity: requestSecurity,
123
-
124
- securitySource: client._options.authorization,
125
- retryConfig: options?.retries
126
- || client._options.retryConfig
127
- || { strategy: "none" },
128
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
129
- };
130
-
131
- const requestRes = client._createRequest(context, {
132
- security: requestSecurity,
133
- method: "POST",
134
- baseURL: options?.serverURL,
135
- path: path,
136
- headers: headers,
137
- body: body,
138
- userAgent: client._options.userAgent,
139
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
140
- }, options);
141
- if (!requestRes.ok) {
142
- return [requestRes, { status: "invalid" }];
143
- }
144
- const req = requestRes.value;
145
-
146
- const doResult = await client._do(req, {
147
- context,
148
- errorCodes: ["400", "401", "404", "4XX", "5XX"],
149
- retryConfig: context.retryConfig,
150
- retryCodes: context.retryCodes,
151
- });
152
- if (!doResult.ok) {
153
- return [doResult, { status: "request-error", request: req }];
154
- }
155
- const response = doResult.value;
156
-
157
- const responseFields = {
158
- HttpMeta: { Response: response, Request: req },
159
- };
160
-
161
- const [result] = await M.match<
162
- operations.UpdateShippingMethodResponseBody,
163
- | errors.BadRequest
164
- | errors.Unauthorized
165
- | errors.NotFound
166
- | CeStorefrontError
167
- | ResponseValidationError
168
- | ConnectionError
169
- | RequestAbortedError
170
- | RequestTimeoutError
171
- | InvalidRequestError
172
- | UnexpectedClientError
173
- | SDKValidationError
174
- >(
175
- M.json(200, operations.UpdateShippingMethodResponseBody$inboundSchema),
176
- M.jsonErr(400, errors.BadRequest$inboundSchema),
177
- M.jsonErr(401, errors.Unauthorized$inboundSchema),
178
- M.jsonErr(404, errors.NotFound$inboundSchema),
179
- M.fail("4XX"),
180
- M.fail("5XX"),
181
- )(response, req, { extraFields: responseFields });
182
- if (!result.ok) {
183
- return [result, { status: "complete", request: req, response }];
184
- }
185
-
186
- return [result, { status: "complete", request: req, response }];
187
- }
@@ -1,293 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import * as components from "../components/index.js";
10
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- export type UpdateShippingMethodRequestBody = {
13
- shippingProviderId: string;
14
- courierCompanyId: string | null;
15
- };
16
-
17
- export type UpdateShippingMethodRequest = {
18
- /**
19
- * Cart ID
20
- */
21
- id: string;
22
- requestBody: UpdateShippingMethodRequestBody;
23
- };
24
-
25
- export type UpdateShippingMethodContent = {
26
- /**
27
- * This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
28
- */
29
- cart: components.Cart;
30
- };
31
-
32
- /**
33
- * OK
34
- */
35
- export type UpdateShippingMethodResponseBody = {
36
- message: string;
37
- success: boolean;
38
- content: UpdateShippingMethodContent;
39
- };
40
-
41
- /** @internal */
42
- export const UpdateShippingMethodRequestBody$inboundSchema: z.ZodType<
43
- UpdateShippingMethodRequestBody,
44
- z.ZodTypeDef,
45
- unknown
46
- > = z.object({
47
- shipping_provider_id: z.string(),
48
- courier_company_id: z.nullable(z.string()),
49
- }).transform((v) => {
50
- return remap$(v, {
51
- "shipping_provider_id": "shippingProviderId",
52
- "courier_company_id": "courierCompanyId",
53
- });
54
- });
55
-
56
- /** @internal */
57
- export type UpdateShippingMethodRequestBody$Outbound = {
58
- shipping_provider_id: string;
59
- courier_company_id: string | null;
60
- };
61
-
62
- /** @internal */
63
- export const UpdateShippingMethodRequestBody$outboundSchema: z.ZodType<
64
- UpdateShippingMethodRequestBody$Outbound,
65
- z.ZodTypeDef,
66
- UpdateShippingMethodRequestBody
67
- > = z.object({
68
- shippingProviderId: z.string(),
69
- courierCompanyId: z.nullable(z.string()),
70
- }).transform((v) => {
71
- return remap$(v, {
72
- shippingProviderId: "shipping_provider_id",
73
- courierCompanyId: "courier_company_id",
74
- });
75
- });
76
-
77
- /**
78
- * @internal
79
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
- */
81
- export namespace UpdateShippingMethodRequestBody$ {
82
- /** @deprecated use `UpdateShippingMethodRequestBody$inboundSchema` instead. */
83
- export const inboundSchema = UpdateShippingMethodRequestBody$inboundSchema;
84
- /** @deprecated use `UpdateShippingMethodRequestBody$outboundSchema` instead. */
85
- export const outboundSchema = UpdateShippingMethodRequestBody$outboundSchema;
86
- /** @deprecated use `UpdateShippingMethodRequestBody$Outbound` instead. */
87
- export type Outbound = UpdateShippingMethodRequestBody$Outbound;
88
- }
89
-
90
- export function updateShippingMethodRequestBodyToJSON(
91
- updateShippingMethodRequestBody: UpdateShippingMethodRequestBody,
92
- ): string {
93
- return JSON.stringify(
94
- UpdateShippingMethodRequestBody$outboundSchema.parse(
95
- updateShippingMethodRequestBody,
96
- ),
97
- );
98
- }
99
-
100
- export function updateShippingMethodRequestBodyFromJSON(
101
- jsonString: string,
102
- ): SafeParseResult<UpdateShippingMethodRequestBody, SDKValidationError> {
103
- return safeParse(
104
- jsonString,
105
- (x) => UpdateShippingMethodRequestBody$inboundSchema.parse(JSON.parse(x)),
106
- `Failed to parse 'UpdateShippingMethodRequestBody' from JSON`,
107
- );
108
- }
109
-
110
- /** @internal */
111
- export const UpdateShippingMethodRequest$inboundSchema: z.ZodType<
112
- UpdateShippingMethodRequest,
113
- z.ZodTypeDef,
114
- unknown
115
- > = z.object({
116
- id: z.string(),
117
- RequestBody: z.lazy(() => UpdateShippingMethodRequestBody$inboundSchema),
118
- }).transform((v) => {
119
- return remap$(v, {
120
- "RequestBody": "requestBody",
121
- });
122
- });
123
-
124
- /** @internal */
125
- export type UpdateShippingMethodRequest$Outbound = {
126
- id: string;
127
- RequestBody: UpdateShippingMethodRequestBody$Outbound;
128
- };
129
-
130
- /** @internal */
131
- export const UpdateShippingMethodRequest$outboundSchema: z.ZodType<
132
- UpdateShippingMethodRequest$Outbound,
133
- z.ZodTypeDef,
134
- UpdateShippingMethodRequest
135
- > = z.object({
136
- id: z.string(),
137
- requestBody: z.lazy(() => UpdateShippingMethodRequestBody$outboundSchema),
138
- }).transform((v) => {
139
- return remap$(v, {
140
- requestBody: "RequestBody",
141
- });
142
- });
143
-
144
- /**
145
- * @internal
146
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
147
- */
148
- export namespace UpdateShippingMethodRequest$ {
149
- /** @deprecated use `UpdateShippingMethodRequest$inboundSchema` instead. */
150
- export const inboundSchema = UpdateShippingMethodRequest$inboundSchema;
151
- /** @deprecated use `UpdateShippingMethodRequest$outboundSchema` instead. */
152
- export const outboundSchema = UpdateShippingMethodRequest$outboundSchema;
153
- /** @deprecated use `UpdateShippingMethodRequest$Outbound` instead. */
154
- export type Outbound = UpdateShippingMethodRequest$Outbound;
155
- }
156
-
157
- export function updateShippingMethodRequestToJSON(
158
- updateShippingMethodRequest: UpdateShippingMethodRequest,
159
- ): string {
160
- return JSON.stringify(
161
- UpdateShippingMethodRequest$outboundSchema.parse(
162
- updateShippingMethodRequest,
163
- ),
164
- );
165
- }
166
-
167
- export function updateShippingMethodRequestFromJSON(
168
- jsonString: string,
169
- ): SafeParseResult<UpdateShippingMethodRequest, SDKValidationError> {
170
- return safeParse(
171
- jsonString,
172
- (x) => UpdateShippingMethodRequest$inboundSchema.parse(JSON.parse(x)),
173
- `Failed to parse 'UpdateShippingMethodRequest' from JSON`,
174
- );
175
- }
176
-
177
- /** @internal */
178
- export const UpdateShippingMethodContent$inboundSchema: z.ZodType<
179
- UpdateShippingMethodContent,
180
- z.ZodTypeDef,
181
- unknown
182
- > = z.object({
183
- cart: components.Cart$inboundSchema,
184
- });
185
-
186
- /** @internal */
187
- export type UpdateShippingMethodContent$Outbound = {
188
- cart: components.Cart$Outbound;
189
- };
190
-
191
- /** @internal */
192
- export const UpdateShippingMethodContent$outboundSchema: z.ZodType<
193
- UpdateShippingMethodContent$Outbound,
194
- z.ZodTypeDef,
195
- UpdateShippingMethodContent
196
- > = z.object({
197
- cart: components.Cart$outboundSchema,
198
- });
199
-
200
- /**
201
- * @internal
202
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
203
- */
204
- export namespace UpdateShippingMethodContent$ {
205
- /** @deprecated use `UpdateShippingMethodContent$inboundSchema` instead. */
206
- export const inboundSchema = UpdateShippingMethodContent$inboundSchema;
207
- /** @deprecated use `UpdateShippingMethodContent$outboundSchema` instead. */
208
- export const outboundSchema = UpdateShippingMethodContent$outboundSchema;
209
- /** @deprecated use `UpdateShippingMethodContent$Outbound` instead. */
210
- export type Outbound = UpdateShippingMethodContent$Outbound;
211
- }
212
-
213
- export function updateShippingMethodContentToJSON(
214
- updateShippingMethodContent: UpdateShippingMethodContent,
215
- ): string {
216
- return JSON.stringify(
217
- UpdateShippingMethodContent$outboundSchema.parse(
218
- updateShippingMethodContent,
219
- ),
220
- );
221
- }
222
-
223
- export function updateShippingMethodContentFromJSON(
224
- jsonString: string,
225
- ): SafeParseResult<UpdateShippingMethodContent, SDKValidationError> {
226
- return safeParse(
227
- jsonString,
228
- (x) => UpdateShippingMethodContent$inboundSchema.parse(JSON.parse(x)),
229
- `Failed to parse 'UpdateShippingMethodContent' from JSON`,
230
- );
231
- }
232
-
233
- /** @internal */
234
- export const UpdateShippingMethodResponseBody$inboundSchema: z.ZodType<
235
- UpdateShippingMethodResponseBody,
236
- z.ZodTypeDef,
237
- unknown
238
- > = z.object({
239
- message: z.string(),
240
- success: z.boolean(),
241
- content: z.lazy(() => UpdateShippingMethodContent$inboundSchema),
242
- });
243
-
244
- /** @internal */
245
- export type UpdateShippingMethodResponseBody$Outbound = {
246
- message: string;
247
- success: boolean;
248
- content: UpdateShippingMethodContent$Outbound;
249
- };
250
-
251
- /** @internal */
252
- export const UpdateShippingMethodResponseBody$outboundSchema: z.ZodType<
253
- UpdateShippingMethodResponseBody$Outbound,
254
- z.ZodTypeDef,
255
- UpdateShippingMethodResponseBody
256
- > = z.object({
257
- message: z.string(),
258
- success: z.boolean(),
259
- content: z.lazy(() => UpdateShippingMethodContent$outboundSchema),
260
- });
261
-
262
- /**
263
- * @internal
264
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
265
- */
266
- export namespace UpdateShippingMethodResponseBody$ {
267
- /** @deprecated use `UpdateShippingMethodResponseBody$inboundSchema` instead. */
268
- export const inboundSchema = UpdateShippingMethodResponseBody$inboundSchema;
269
- /** @deprecated use `UpdateShippingMethodResponseBody$outboundSchema` instead. */
270
- export const outboundSchema = UpdateShippingMethodResponseBody$outboundSchema;
271
- /** @deprecated use `UpdateShippingMethodResponseBody$Outbound` instead. */
272
- export type Outbound = UpdateShippingMethodResponseBody$Outbound;
273
- }
274
-
275
- export function updateShippingMethodResponseBodyToJSON(
276
- updateShippingMethodResponseBody: UpdateShippingMethodResponseBody,
277
- ): string {
278
- return JSON.stringify(
279
- UpdateShippingMethodResponseBody$outboundSchema.parse(
280
- updateShippingMethodResponseBody,
281
- ),
282
- );
283
- }
284
-
285
- export function updateShippingMethodResponseBodyFromJSON(
286
- jsonString: string,
287
- ): SafeParseResult<UpdateShippingMethodResponseBody, SDKValidationError> {
288
- return safeParse(
289
- jsonString,
290
- (x) => UpdateShippingMethodResponseBody$inboundSchema.parse(JSON.parse(x)),
291
- `Failed to parse 'UpdateShippingMethodResponseBody' from JSON`,
292
- );
293
- }