ce-storefront 0.15.13 → 0.15.14
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 +12 -1
- package/docs/sdks/pos/README.md +310 -0
- package/esm/funcs/posCreateOrder.d.ts +18 -0
- package/esm/funcs/posCreateOrder.d.ts.map +1 -0
- package/esm/funcs/posCreateOrder.js +82 -0
- package/esm/funcs/posCreateOrder.js.map +1 -0
- package/esm/funcs/posGetOrderDetail.d.ts +18 -0
- package/esm/funcs/posGetOrderDetail.d.ts.map +1 -0
- package/esm/funcs/posGetOrderDetail.js +87 -0
- package/esm/funcs/posGetOrderDetail.js.map +1 -0
- package/esm/funcs/posListOrderShipments.d.ts +18 -0
- package/esm/funcs/posListOrderShipments.d.ts.map +1 -0
- package/esm/funcs/posListOrderShipments.js +87 -0
- package/esm/funcs/posListOrderShipments.js.map +1 -0
- package/esm/funcs/posListOrders.d.ts +17 -0
- package/esm/funcs/posListOrders.d.ts.map +1 -0
- package/esm/funcs/posListOrders.js +85 -0
- package/esm/funcs/posListOrders.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/models/components/cart.d.ts +53 -0
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +62 -0
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/order.d.ts +52 -0
- package/esm/models/components/order.d.ts.map +1 -1
- package/esm/models/components/order.js +62 -0
- package/esm/models/components/order.js.map +1 -1
- package/esm/models/components/orderdetail.d.ts +52 -0
- package/esm/models/components/orderdetail.d.ts.map +1 -1
- package/esm/models/components/orderdetail.js +62 -0
- package/esm/models/components/orderdetail.js.map +1 -1
- package/esm/models/components/ordershipment.d.ts +34 -0
- package/esm/models/components/ordershipment.d.ts.map +1 -1
- package/esm/models/components/ordershipment.js +32 -0
- package/esm/models/components/ordershipment.js.map +1 -1
- package/esm/models/operations/createposorder.d.ts +182 -0
- package/esm/models/operations/createposorder.d.ts.map +1 -0
- package/esm/models/operations/createposorder.js +218 -0
- package/esm/models/operations/createposorder.js.map +1 -0
- package/esm/models/operations/getposorderdetail.d.ts +90 -0
- package/esm/models/operations/getposorderdetail.d.ts.map +1 -0
- package/esm/models/operations/getposorderdetail.js +95 -0
- package/esm/models/operations/getposorderdetail.js.map +1 -0
- package/esm/models/operations/index.d.ts +4 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +4 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/listposorders.d.ts +115 -0
- package/esm/models/operations/listposorders.d.ts.map +1 -0
- package/esm/models/operations/listposorders.js +107 -0
- package/esm/models/operations/listposorders.js.map +1 -0
- package/esm/models/operations/listposordershipments.d.ts +90 -0
- package/esm/models/operations/listposordershipments.d.ts.map +1 -0
- package/esm/models/operations/listposordershipments.js +95 -0
- package/esm/models/operations/listposordershipments.js.map +1 -0
- package/esm/sdk/pos.d.ts +33 -0
- package/esm/sdk/pos.d.ts.map +1 -0
- package/esm/sdk/pos.js +48 -0
- package/esm/sdk/pos.js.map +1 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/posCreateOrder.ts +177 -0
- package/src/funcs/posGetOrderDetail.ts +179 -0
- package/src/funcs/posListOrderShipments.ts +180 -0
- package/src/funcs/posListOrders.ts +168 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/cart.ts +125 -0
- package/src/models/components/order.ts +129 -0
- package/src/models/components/orderdetail.ts +133 -0
- package/src/models/components/ordershipment.ts +48 -0
- package/src/models/operations/createposorder.ts +454 -0
- package/src/models/operations/getposorderdetail.ts +208 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listposorders.ts +243 -0
- package/src/models/operations/listposordershipments.ts +213 -0
- package/src/sdk/pos.ts +81 -0
- package/src/sdk/sdk.ts +6 -0
package/README.md
CHANGED
|
@@ -171,6 +171,13 @@ run();
|
|
|
171
171
|
* [cancelOrder](docs/sdks/orders/README.md#cancelorder) - Cancel order
|
|
172
172
|
* [retryOrderPayment](docs/sdks/orders/README.md#retryorderpayment) - Retry payment
|
|
173
173
|
|
|
174
|
+
### [pos](docs/sdks/pos/README.md)
|
|
175
|
+
|
|
176
|
+
* [createOrder](docs/sdks/pos/README.md#createorder) - Create order
|
|
177
|
+
* [listOrders](docs/sdks/pos/README.md#listorders) - Retrieve all orders
|
|
178
|
+
* [getOrderDetail](docs/sdks/pos/README.md#getorderdetail) - Retrieve order detail
|
|
179
|
+
* [listOrderShipments](docs/sdks/pos/README.md#listordershipments) - Retrieve order shipments
|
|
180
|
+
|
|
174
181
|
### [shipping](docs/sdks/shipping/README.md)
|
|
175
182
|
|
|
176
183
|
* [shippingMethods](docs/sdks/shipping/README.md#shippingmethods) - List available shipping methods
|
|
@@ -243,6 +250,10 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
243
250
|
- [`ordersListOrders`](docs/sdks/orders/README.md#listorders) - Retrieve all orders
|
|
244
251
|
- [`ordersListOrderShipments`](docs/sdks/orders/README.md#listordershipments) - Retrieve order shipments
|
|
245
252
|
- [`ordersRetryOrderPayment`](docs/sdks/orders/README.md#retryorderpayment) - Retry payment
|
|
253
|
+
- [`posCreateOrder`](docs/sdks/pos/README.md#createorder) - Create order
|
|
254
|
+
- [`posGetOrderDetail`](docs/sdks/pos/README.md#getorderdetail) - Retrieve order detail
|
|
255
|
+
- [`posListOrders`](docs/sdks/pos/README.md#listorders) - Retrieve all orders
|
|
256
|
+
- [`posListOrderShipments`](docs/sdks/pos/README.md#listordershipments) - Retrieve order shipments
|
|
246
257
|
- [`shippingFulfillmentOptions`](docs/sdks/shipping/README.md#fulfillmentoptions) - Retrieve fulfillment options
|
|
247
258
|
- [`shippingShippingMethods`](docs/sdks/shipping/README.md#shippingmethods) - List available shipping methods
|
|
248
259
|
|
|
@@ -387,7 +398,7 @@ run();
|
|
|
387
398
|
|
|
388
399
|
|
|
389
400
|
**Inherit from [`CeStorefrontError`](./src/models/errors/cestorefronterror.ts)**:
|
|
390
|
-
* [`BadRequest`](./src/models/errors/badrequest.ts): Bad request. Status code `400`. Applicable to
|
|
401
|
+
* [`BadRequest`](./src/models/errors/badrequest.ts): Bad request. Status code `400`. Applicable to 31 of 55 methods.*
|
|
391
402
|
* [`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.
|
|
392
403
|
|
|
393
404
|
</details>
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# Pos
|
|
2
|
+
(*pos*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [createOrder](#createorder) - Create order
|
|
9
|
+
* [listOrders](#listorders) - Retrieve all orders
|
|
10
|
+
* [getOrderDetail](#getorderdetail) - Retrieve order detail
|
|
11
|
+
* [listOrderShipments](#listordershipments) - Retrieve order shipments
|
|
12
|
+
|
|
13
|
+
## createOrder
|
|
14
|
+
|
|
15
|
+
Create new order
|
|
16
|
+
|
|
17
|
+
### Example Usage
|
|
18
|
+
|
|
19
|
+
<!-- UsageSnippet language="typescript" operationID="create-pos-order" method="post" path="/pos/orders" -->
|
|
20
|
+
```typescript
|
|
21
|
+
import { CeStorefront } from "ce-storefront";
|
|
22
|
+
|
|
23
|
+
const ceStorefront = new CeStorefront({
|
|
24
|
+
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
async function run() {
|
|
28
|
+
const result = await ceStorefront.pos.createOrder({
|
|
29
|
+
cartId: "<id>",
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
console.log(result);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
run();
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Standalone function
|
|
39
|
+
|
|
40
|
+
The standalone function version of this method:
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
44
|
+
import { posCreateOrder } from "ce-storefront/funcs/posCreateOrder.js";
|
|
45
|
+
|
|
46
|
+
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
47
|
+
// You can create one instance of it to use across an application.
|
|
48
|
+
const ceStorefront = new CeStorefrontCore({
|
|
49
|
+
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
async function run() {
|
|
53
|
+
const res = await posCreateOrder(ceStorefront, {
|
|
54
|
+
cartId: "<id>",
|
|
55
|
+
});
|
|
56
|
+
if (res.ok) {
|
|
57
|
+
const { value: result } = res;
|
|
58
|
+
console.log(result);
|
|
59
|
+
} else {
|
|
60
|
+
console.log("posCreateOrder failed:", res.error);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
run();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Parameters
|
|
68
|
+
|
|
69
|
+
| Parameter | Type | Required | Description |
|
|
70
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
71
|
+
| `request` | [operations.CreatePosOrderRequestBody](../../models/operations/createposorderrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
72
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
73
|
+
| `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. |
|
|
74
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
75
|
+
|
|
76
|
+
### Response
|
|
77
|
+
|
|
78
|
+
**Promise\<[operations.CreatePosOrderResponseBody](../../models/operations/createposorderresponsebody.md)\>**
|
|
79
|
+
|
|
80
|
+
### Errors
|
|
81
|
+
|
|
82
|
+
| Error Type | Status Code | Content Type |
|
|
83
|
+
| ------------------- | ------------------- | ------------------- |
|
|
84
|
+
| errors.BadRequest | 400 | application/json |
|
|
85
|
+
| errors.Unauthorized | 401 | application/json |
|
|
86
|
+
| errors.NotFound | 404 | application/json |
|
|
87
|
+
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
88
|
+
|
|
89
|
+
## listOrders
|
|
90
|
+
|
|
91
|
+
list customers all orders
|
|
92
|
+
|
|
93
|
+
### Example Usage
|
|
94
|
+
|
|
95
|
+
<!-- UsageSnippet language="typescript" operationID="list-pos-orders" method="get" path="/pos/orders" -->
|
|
96
|
+
```typescript
|
|
97
|
+
import { CeStorefront } from "ce-storefront";
|
|
98
|
+
|
|
99
|
+
const ceStorefront = new CeStorefront({
|
|
100
|
+
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
async function run() {
|
|
104
|
+
const result = await ceStorefront.pos.listOrders({
|
|
105
|
+
sortBy: "{\"country\":\"asc\",\"city\":\"asc\",\"population\":\"desc\"}",
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
console.log(result);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
run();
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Standalone function
|
|
115
|
+
|
|
116
|
+
The standalone function version of this method:
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
120
|
+
import { posListOrders } from "ce-storefront/funcs/posListOrders.js";
|
|
121
|
+
|
|
122
|
+
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
123
|
+
// You can create one instance of it to use across an application.
|
|
124
|
+
const ceStorefront = new CeStorefrontCore({
|
|
125
|
+
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
async function run() {
|
|
129
|
+
const res = await posListOrders(ceStorefront, {
|
|
130
|
+
sortBy: "{\"country\":\"asc\",\"city\":\"asc\",\"population\":\"desc\"}",
|
|
131
|
+
});
|
|
132
|
+
if (res.ok) {
|
|
133
|
+
const { value: result } = res;
|
|
134
|
+
console.log(result);
|
|
135
|
+
} else {
|
|
136
|
+
console.log("posListOrders failed:", res.error);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
run();
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Parameters
|
|
144
|
+
|
|
145
|
+
| Parameter | Type | Required | Description |
|
|
146
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
147
|
+
| `request` | [operations.ListPosOrdersRequest](../../models/operations/listposordersrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
148
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
149
|
+
| `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. |
|
|
150
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
151
|
+
|
|
152
|
+
### Response
|
|
153
|
+
|
|
154
|
+
**Promise\<[operations.ListPosOrdersResponseBody](../../models/operations/listposordersresponsebody.md)\>**
|
|
155
|
+
|
|
156
|
+
### Errors
|
|
157
|
+
|
|
158
|
+
| Error Type | Status Code | Content Type |
|
|
159
|
+
| -------------- | -------------- | -------------- |
|
|
160
|
+
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
161
|
+
|
|
162
|
+
## getOrderDetail
|
|
163
|
+
|
|
164
|
+
view particular order details
|
|
165
|
+
|
|
166
|
+
### Example Usage
|
|
167
|
+
|
|
168
|
+
<!-- UsageSnippet language="typescript" operationID="get-pos-order-detail" method="get" path="/pos/orders/{order_number}" -->
|
|
169
|
+
```typescript
|
|
170
|
+
import { CeStorefront } from "ce-storefront";
|
|
171
|
+
|
|
172
|
+
const ceStorefront = new CeStorefront({
|
|
173
|
+
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
async function run() {
|
|
177
|
+
const result = await ceStorefront.pos.getOrderDetail({
|
|
178
|
+
orderNumber: "<value>",
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
console.log(result);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
run();
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Standalone function
|
|
188
|
+
|
|
189
|
+
The standalone function version of this method:
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
193
|
+
import { posGetOrderDetail } from "ce-storefront/funcs/posGetOrderDetail.js";
|
|
194
|
+
|
|
195
|
+
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
196
|
+
// You can create one instance of it to use across an application.
|
|
197
|
+
const ceStorefront = new CeStorefrontCore({
|
|
198
|
+
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
async function run() {
|
|
202
|
+
const res = await posGetOrderDetail(ceStorefront, {
|
|
203
|
+
orderNumber: "<value>",
|
|
204
|
+
});
|
|
205
|
+
if (res.ok) {
|
|
206
|
+
const { value: result } = res;
|
|
207
|
+
console.log(result);
|
|
208
|
+
} else {
|
|
209
|
+
console.log("posGetOrderDetail failed:", res.error);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
run();
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Parameters
|
|
217
|
+
|
|
218
|
+
| Parameter | Type | Required | Description |
|
|
219
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
220
|
+
| `request` | [operations.GetPosOrderDetailRequest](../../models/operations/getposorderdetailrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
221
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
222
|
+
| `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. |
|
|
223
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
224
|
+
|
|
225
|
+
### Response
|
|
226
|
+
|
|
227
|
+
**Promise\<[operations.GetPosOrderDetailResponseBody](../../models/operations/getposorderdetailresponsebody.md)\>**
|
|
228
|
+
|
|
229
|
+
### Errors
|
|
230
|
+
|
|
231
|
+
| Error Type | Status Code | Content Type |
|
|
232
|
+
| ------------------- | ------------------- | ------------------- |
|
|
233
|
+
| errors.Unauthorized | 401 | application/json |
|
|
234
|
+
| errors.NotFound | 404 | application/json |
|
|
235
|
+
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
236
|
+
|
|
237
|
+
## listOrderShipments
|
|
238
|
+
|
|
239
|
+
Retrieve order shipments
|
|
240
|
+
|
|
241
|
+
### Example Usage
|
|
242
|
+
|
|
243
|
+
<!-- UsageSnippet language="typescript" operationID="list-pos-order-shipments" method="get" path="/pos/orders/{order_number}/shipments" -->
|
|
244
|
+
```typescript
|
|
245
|
+
import { CeStorefront } from "ce-storefront";
|
|
246
|
+
|
|
247
|
+
const ceStorefront = new CeStorefront({
|
|
248
|
+
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
async function run() {
|
|
252
|
+
const result = await ceStorefront.pos.listOrderShipments({
|
|
253
|
+
orderNumber: "<value>",
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
console.log(result);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
run();
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Standalone function
|
|
263
|
+
|
|
264
|
+
The standalone function version of this method:
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
268
|
+
import { posListOrderShipments } from "ce-storefront/funcs/posListOrderShipments.js";
|
|
269
|
+
|
|
270
|
+
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
271
|
+
// You can create one instance of it to use across an application.
|
|
272
|
+
const ceStorefront = new CeStorefrontCore({
|
|
273
|
+
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
async function run() {
|
|
277
|
+
const res = await posListOrderShipments(ceStorefront, {
|
|
278
|
+
orderNumber: "<value>",
|
|
279
|
+
});
|
|
280
|
+
if (res.ok) {
|
|
281
|
+
const { value: result } = res;
|
|
282
|
+
console.log(result);
|
|
283
|
+
} else {
|
|
284
|
+
console.log("posListOrderShipments failed:", res.error);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
run();
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Parameters
|
|
292
|
+
|
|
293
|
+
| Parameter | Type | Required | Description |
|
|
294
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
295
|
+
| `request` | [operations.ListPosOrderShipmentsRequest](../../models/operations/listposordershipmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
296
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
297
|
+
| `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. |
|
|
298
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
299
|
+
|
|
300
|
+
### Response
|
|
301
|
+
|
|
302
|
+
**Promise\<[operations.ListPosOrderShipmentsResponseBody](../../models/operations/listposordershipmentsresponsebody.md)\>**
|
|
303
|
+
|
|
304
|
+
### Errors
|
|
305
|
+
|
|
306
|
+
| Error Type | Status Code | Content Type |
|
|
307
|
+
| ------------------- | ------------------- | ------------------- |
|
|
308
|
+
| errors.Unauthorized | 401 | application/json |
|
|
309
|
+
| errors.NotFound | 404 | application/json |
|
|
310
|
+
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
* Create order
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Create new order
|
|
16
|
+
*/
|
|
17
|
+
export declare function posCreateOrder(client: CeStorefrontCore, request: operations.CreatePosOrderRequestBody, options?: RequestOptions): APIPromise<Result<operations.CreatePosOrderResponseBody, errors.BadRequest | errors.Unauthorized | errors.NotFound | CeStorefrontError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=posCreateOrder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posCreateOrder.d.ts","sourceRoot":"","sources":["../../src/funcs/posCreateOrder.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;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,0BAA0B,EACnC,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"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { encodeJSON } 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
|
+
* Create order
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Create new order
|
|
18
|
+
*/
|
|
19
|
+
export function posCreateOrder(client, request, options) {
|
|
20
|
+
return new APIPromise($do(client, request, options));
|
|
21
|
+
}
|
|
22
|
+
async function $do(client, request, options) {
|
|
23
|
+
const parsed = safeParse(request, (value) => operations.CreatePosOrderRequestBody$outboundSchema.parse(value), "Input validation failed");
|
|
24
|
+
if (!parsed.ok) {
|
|
25
|
+
return [parsed, { status: "invalid" }];
|
|
26
|
+
}
|
|
27
|
+
const payload = parsed.value;
|
|
28
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
29
|
+
const path = pathToFunc("/pos/orders")();
|
|
30
|
+
const headers = new Headers(compactMap({
|
|
31
|
+
"Content-Type": "application/json",
|
|
32
|
+
Accept: "application/json",
|
|
33
|
+
}));
|
|
34
|
+
const secConfig = await extractSecurity(client._options.authorization);
|
|
35
|
+
const securityInput = secConfig == null ? {} : { authorization: secConfig };
|
|
36
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
37
|
+
const context = {
|
|
38
|
+
options: client._options,
|
|
39
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
40
|
+
operationID: "create-pos-order",
|
|
41
|
+
oAuth2Scopes: [],
|
|
42
|
+
resolvedSecurity: requestSecurity,
|
|
43
|
+
securitySource: client._options.authorization,
|
|
44
|
+
retryConfig: options?.retries
|
|
45
|
+
|| client._options.retryConfig
|
|
46
|
+
|| { strategy: "none" },
|
|
47
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
48
|
+
};
|
|
49
|
+
const requestRes = client._createRequest(context, {
|
|
50
|
+
security: requestSecurity,
|
|
51
|
+
method: "POST",
|
|
52
|
+
baseURL: options?.serverURL,
|
|
53
|
+
path: path,
|
|
54
|
+
headers: headers,
|
|
55
|
+
body: body,
|
|
56
|
+
userAgent: client._options.userAgent,
|
|
57
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
58
|
+
}, options);
|
|
59
|
+
if (!requestRes.ok) {
|
|
60
|
+
return [requestRes, { status: "invalid" }];
|
|
61
|
+
}
|
|
62
|
+
const req = requestRes.value;
|
|
63
|
+
const doResult = await client._do(req, {
|
|
64
|
+
context,
|
|
65
|
+
errorCodes: ["400", "401", "404", "4XX", "5XX"],
|
|
66
|
+
retryConfig: context.retryConfig,
|
|
67
|
+
retryCodes: context.retryCodes,
|
|
68
|
+
});
|
|
69
|
+
if (!doResult.ok) {
|
|
70
|
+
return [doResult, { status: "request-error", request: req }];
|
|
71
|
+
}
|
|
72
|
+
const response = doResult.value;
|
|
73
|
+
const responseFields = {
|
|
74
|
+
HttpMeta: { Response: response, Request: req },
|
|
75
|
+
};
|
|
76
|
+
const [result] = await M.match(M.json(200, operations.CreatePosOrderResponseBody$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 });
|
|
77
|
+
if (!result.ok) {
|
|
78
|
+
return [result, { status: "complete", request: req, response }];
|
|
79
|
+
}
|
|
80
|
+
return [result, { status: "complete", request: req, response }];
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=posCreateOrder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posCreateOrder.js","sourceRoot":"","sources":["../../src/funcs/posCreateOrder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,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;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAwB,EACxB,OAA6C,EAC7C,OAAwB;IAiBxB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM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AE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAc5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,wCAAwC,CAAC,EAChE,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
* Retrieve order detail
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* view particular order details
|
|
16
|
+
*/
|
|
17
|
+
export declare function posGetOrderDetail(client: CeStorefrontCore, request: operations.GetPosOrderDetailRequest, options?: RequestOptions): APIPromise<Result<operations.GetPosOrderDetailResponseBody, errors.Unauthorized | errors.NotFound | CeStorefrontError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=posGetOrderDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posGetOrderDetail.d.ts","sourceRoot":"","sources":["../../src/funcs/posGetOrderDetail.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;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,6BAA6B,EACtC,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"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { 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
|
+
* Retrieve order detail
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* view particular order details
|
|
18
|
+
*/
|
|
19
|
+
export function posGetOrderDetail(client, request, options) {
|
|
20
|
+
return new APIPromise($do(client, request, options));
|
|
21
|
+
}
|
|
22
|
+
async function $do(client, request, options) {
|
|
23
|
+
const parsed = safeParse(request, (value) => operations.GetPosOrderDetailRequest$outboundSchema.parse(value), "Input validation failed");
|
|
24
|
+
if (!parsed.ok) {
|
|
25
|
+
return [parsed, { status: "invalid" }];
|
|
26
|
+
}
|
|
27
|
+
const payload = parsed.value;
|
|
28
|
+
const body = null;
|
|
29
|
+
const pathParams = {
|
|
30
|
+
order_number: encodeSimple("order_number", payload.order_number, {
|
|
31
|
+
explode: false,
|
|
32
|
+
charEncoding: "percent",
|
|
33
|
+
}),
|
|
34
|
+
};
|
|
35
|
+
const path = pathToFunc("/pos/orders/{order_number}")(pathParams);
|
|
36
|
+
const headers = new Headers(compactMap({
|
|
37
|
+
Accept: "application/json",
|
|
38
|
+
}));
|
|
39
|
+
const secConfig = await extractSecurity(client._options.authorization);
|
|
40
|
+
const securityInput = secConfig == null ? {} : { authorization: secConfig };
|
|
41
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
42
|
+
const context = {
|
|
43
|
+
options: client._options,
|
|
44
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
45
|
+
operationID: "get-pos-order-detail",
|
|
46
|
+
oAuth2Scopes: [],
|
|
47
|
+
resolvedSecurity: requestSecurity,
|
|
48
|
+
securitySource: client._options.authorization,
|
|
49
|
+
retryConfig: options?.retries
|
|
50
|
+
|| client._options.retryConfig
|
|
51
|
+
|| { strategy: "none" },
|
|
52
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
53
|
+
};
|
|
54
|
+
const requestRes = client._createRequest(context, {
|
|
55
|
+
security: requestSecurity,
|
|
56
|
+
method: "GET",
|
|
57
|
+
baseURL: options?.serverURL,
|
|
58
|
+
path: path,
|
|
59
|
+
headers: headers,
|
|
60
|
+
body: body,
|
|
61
|
+
userAgent: client._options.userAgent,
|
|
62
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
63
|
+
}, options);
|
|
64
|
+
if (!requestRes.ok) {
|
|
65
|
+
return [requestRes, { status: "invalid" }];
|
|
66
|
+
}
|
|
67
|
+
const req = requestRes.value;
|
|
68
|
+
const doResult = await client._do(req, {
|
|
69
|
+
context,
|
|
70
|
+
errorCodes: ["401", "404", "4XX", "5XX"],
|
|
71
|
+
retryConfig: context.retryConfig,
|
|
72
|
+
retryCodes: context.retryCodes,
|
|
73
|
+
});
|
|
74
|
+
if (!doResult.ok) {
|
|
75
|
+
return [doResult, { status: "request-error", request: req }];
|
|
76
|
+
}
|
|
77
|
+
const response = doResult.value;
|
|
78
|
+
const responseFields = {
|
|
79
|
+
HttpMeta: { Response: response, Request: req },
|
|
80
|
+
};
|
|
81
|
+
const [result] = await M.match(M.json(200, operations.GetPosOrderDetailResponseBody$inboundSchema), M.jsonErr(401, errors.Unauthorized$inboundSchema), M.jsonErr(404, errors.NotFound$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
82
|
+
if (!result.ok) {
|
|
83
|
+
return [result, { status: "complete", request: req, response }];
|
|
84
|
+
}
|
|
85
|
+
return [result, { status: "complete", request: req, response }];
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=posGetOrderDetail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posGetOrderDetail.js","sourceRoot":"","sources":["../../src/funcs/posGetOrderDetail.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,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;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAwB,EACxB,OAA4C,EA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H,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAa5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,2CAA2C,CAAC,EACnE,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
* Retrieve order shipments
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Retrieve order shipments
|
|
16
|
+
*/
|
|
17
|
+
export declare function posListOrderShipments(client: CeStorefrontCore, request: operations.ListPosOrderShipmentsRequest, options?: RequestOptions): APIPromise<Result<operations.ListPosOrderShipmentsResponseBody, errors.Unauthorized | errors.NotFound | CeStorefrontError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=posListOrderShipments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posListOrderShipments.d.ts","sourceRoot":"","sources":["../../src/funcs/posListOrderShipments.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;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,iCAAiC,EAC1C,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"}
|