ce-storefront 0.15.7 → 0.15.8
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 +2 -21
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/components/index.d.ts +0 -2
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +0 -2
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/operations/index.d.ts +0 -8
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +0 -8
- package/esm/models/operations/index.js.map +1 -1
- package/esm/sdk/sdk.d.ts +0 -3
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +0 -4
- 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/lib/config.ts +2 -2
- package/src/models/components/index.ts +0 -2
- package/src/models/operations/index.ts +0 -8
- package/src/sdk/sdk.ts +0 -6
- package/docs/sdks/pos/README.md +0 -610
- package/esm/funcs/posCreatePosCart.d.ts +0 -17
- package/esm/funcs/posCreatePosCart.d.ts.map +0 -1
- package/esm/funcs/posCreatePosCart.js +0 -80
- package/esm/funcs/posCreatePosCart.js.map +0 -1
- package/esm/funcs/posLoginPosDeviceWithEmail.d.ts +0 -17
- package/esm/funcs/posLoginPosDeviceWithEmail.d.ts.map +0 -1
- package/esm/funcs/posLoginPosDeviceWithEmail.js +0 -85
- package/esm/funcs/posLoginPosDeviceWithEmail.js.map +0 -1
- package/esm/funcs/posLoginPosDeviceWithPhone.d.ts +0 -17
- package/esm/funcs/posLoginPosDeviceWithPhone.d.ts.map +0 -1
- package/esm/funcs/posLoginPosDeviceWithPhone.js +0 -85
- package/esm/funcs/posLoginPosDeviceWithPhone.js.map +0 -1
- package/esm/funcs/posLoginPosDeviceWithWhatsapp.d.ts +0 -17
- package/esm/funcs/posLoginPosDeviceWithWhatsapp.d.ts.map +0 -1
- package/esm/funcs/posLoginPosDeviceWithWhatsapp.js +0 -85
- package/esm/funcs/posLoginPosDeviceWithWhatsapp.js.map +0 -1
- package/esm/funcs/posPairPosDevice.d.ts +0 -17
- package/esm/funcs/posPairPosDevice.d.ts.map +0 -1
- package/esm/funcs/posPairPosDevice.js +0 -84
- package/esm/funcs/posPairPosDevice.js.map +0 -1
- package/esm/funcs/posRefreshPosAccessToken.d.ts +0 -17
- package/esm/funcs/posRefreshPosAccessToken.d.ts.map +0 -1
- package/esm/funcs/posRefreshPosAccessToken.js +0 -81
- package/esm/funcs/posRefreshPosAccessToken.js.map +0 -1
- package/esm/funcs/posUpdatePosCart.d.ts +0 -17
- package/esm/funcs/posUpdatePosCart.d.ts.map +0 -1
- package/esm/funcs/posUpdatePosCart.js +0 -84
- package/esm/funcs/posUpdatePosCart.js.map +0 -1
- package/esm/funcs/posVerifyPosLoginOtp.d.ts +0 -17
- package/esm/funcs/posVerifyPosLoginOtp.d.ts.map +0 -1
- package/esm/funcs/posVerifyPosLoginOtp.js +0 -84
- package/esm/funcs/posVerifyPosLoginOtp.js.map +0 -1
- package/esm/models/components/posdevice.d.ts +0 -71
- package/esm/models/components/posdevice.d.ts.map +0 -1
- package/esm/models/components/posdevice.js +0 -85
- package/esm/models/components/posdevice.js.map +0 -1
- package/esm/models/components/posuser.d.ts +0 -124
- package/esm/models/components/posuser.d.ts.map +0 -1
- package/esm/models/components/posuser.js +0 -139
- package/esm/models/components/posuser.js.map +0 -1
- package/esm/models/operations/createposcart.d.ts +0 -90
- package/esm/models/operations/createposcart.d.ts.map +0 -1
- package/esm/models/operations/createposcart.js +0 -86
- package/esm/models/operations/createposcart.js.map +0 -1
- package/esm/models/operations/loginposdevicewithemail.d.ts +0 -138
- package/esm/models/operations/loginposdevicewithemail.d.ts.map +0 -1
- package/esm/models/operations/loginposdevicewithemail.js +0 -159
- package/esm/models/operations/loginposdevicewithemail.js.map +0 -1
- package/esm/models/operations/loginposdevicewithphone.d.ts +0 -146
- package/esm/models/operations/loginposdevicewithphone.d.ts.map +0 -1
- package/esm/models/operations/loginposdevicewithphone.js +0 -163
- package/esm/models/operations/loginposdevicewithphone.js.map +0 -1
- package/esm/models/operations/loginposdevicewithwhatsapp.d.ts +0 -146
- package/esm/models/operations/loginposdevicewithwhatsapp.d.ts.map +0 -1
- package/esm/models/operations/loginposdevicewithwhatsapp.js +0 -163
- package/esm/models/operations/loginposdevicewithwhatsapp.js.map +0 -1
- package/esm/models/operations/pairposdevice.d.ts +0 -112
- package/esm/models/operations/pairposdevice.d.ts.map +0 -1
- package/esm/models/operations/pairposdevice.js +0 -128
- package/esm/models/operations/pairposdevice.js.map +0 -1
- package/esm/models/operations/refreshposaccesstoken.d.ts +0 -88
- package/esm/models/operations/refreshposaccesstoken.d.ts.map +0 -1
- package/esm/models/operations/refreshposaccesstoken.js +0 -106
- package/esm/models/operations/refreshposaccesstoken.js.map +0 -1
- package/esm/models/operations/updateposcart.d.ts +0 -120
- package/esm/models/operations/updateposcart.d.ts.map +0 -1
- package/esm/models/operations/updateposcart.js +0 -122
- package/esm/models/operations/updateposcart.js.map +0 -1
- package/esm/models/operations/verifyposloginotp.d.ts +0 -158
- package/esm/models/operations/verifyposloginotp.d.ts.map +0 -1
- package/esm/models/operations/verifyposloginotp.js +0 -169
- package/esm/models/operations/verifyposloginotp.js.map +0 -1
- package/esm/sdk/pos.d.ts +0 -61
- package/esm/sdk/pos.d.ts.map +0 -1
- package/esm/sdk/pos.js +0 -88
- package/esm/sdk/pos.js.map +0 -1
- package/src/funcs/posCreatePosCart.ts +0 -165
- package/src/funcs/posLoginPosDeviceWithEmail.ts +0 -173
- package/src/funcs/posLoginPosDeviceWithPhone.ts +0 -173
- package/src/funcs/posLoginPosDeviceWithWhatsapp.ts +0 -176
- package/src/funcs/posPairPosDevice.ts +0 -174
- package/src/funcs/posRefreshPosAccessToken.ts +0 -164
- package/src/funcs/posUpdatePosCart.ts +0 -167
- package/src/funcs/posVerifyPosLoginOtp.ts +0 -174
- package/src/models/components/posdevice.ts +0 -141
- package/src/models/components/posuser.ts +0 -263
- package/src/models/operations/createposcart.ts +0 -197
- package/src/models/operations/loginposdevicewithemail.ts +0 -328
- package/src/models/operations/loginposdevicewithphone.ts +0 -340
- package/src/models/operations/loginposdevicewithwhatsapp.ts +0 -347
- package/src/models/operations/pairposdevice.ts +0 -269
- package/src/models/operations/refreshposaccesstoken.ts +0 -223
- package/src/models/operations/updateposcart.ts +0 -271
- package/src/models/operations/verifyposloginotp.ts +0 -345
- package/src/sdk/pos.ts +0 -163
package/docs/sdks/pos/README.md
DELETED
|
@@ -1,610 +0,0 @@
|
|
|
1
|
-
# Pos
|
|
2
|
-
(*pos*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [pairPosDevice](#pairposdevice) - Pair POS device
|
|
9
|
-
* [loginPosDeviceWithPhone](#loginposdevicewithphone) - Login with phone
|
|
10
|
-
* [loginPosDeviceWithWhatsapp](#loginposdevicewithwhatsapp) - Login with whatsapp
|
|
11
|
-
* [loginPosDeviceWithEmail](#loginposdevicewithemail) - Login with email
|
|
12
|
-
* [verifyPosLoginOtp](#verifyposloginotp) - Verify OTP
|
|
13
|
-
* [refreshPosAccessToken](#refreshposaccesstoken) - Refresh POS access token
|
|
14
|
-
* [createPosCart](#createposcart) - Create cart
|
|
15
|
-
* [updatePosCart](#updateposcart) - Add/update/delete cart item
|
|
16
|
-
|
|
17
|
-
## pairPosDevice
|
|
18
|
-
|
|
19
|
-
Pair POS device
|
|
20
|
-
|
|
21
|
-
### Example Usage
|
|
22
|
-
|
|
23
|
-
<!-- UsageSnippet language="typescript" operationID="pair-pos-device" method="post" path="/pos/auth/pair-device" -->
|
|
24
|
-
```typescript
|
|
25
|
-
import { CeStorefront } from "ce-storefront";
|
|
26
|
-
|
|
27
|
-
const ceStorefront = new CeStorefront();
|
|
28
|
-
|
|
29
|
-
async function run() {
|
|
30
|
-
const result = await ceStorefront.pos.pairPosDevice({
|
|
31
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
console.log(result);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
run();
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Standalone function
|
|
41
|
-
|
|
42
|
-
The standalone function version of this method:
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
46
|
-
import { posPairPosDevice } from "ce-storefront/funcs/posPairPosDevice.js";
|
|
47
|
-
|
|
48
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
49
|
-
// You can create one instance of it to use across an application.
|
|
50
|
-
const ceStorefront = new CeStorefrontCore();
|
|
51
|
-
|
|
52
|
-
async function run() {
|
|
53
|
-
const res = await posPairPosDevice(ceStorefront, {
|
|
54
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
55
|
-
});
|
|
56
|
-
if (res.ok) {
|
|
57
|
-
const { value: result } = res;
|
|
58
|
-
console.log(result);
|
|
59
|
-
} else {
|
|
60
|
-
console.log("posPairPosDevice failed:", res.error);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
run();
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Parameters
|
|
68
|
-
|
|
69
|
-
| Parameter | Type | Required | Description |
|
|
70
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
71
|
-
| `request` | [operations.PairPosDeviceRequestBody](../../models/operations/pairposdevicerequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
72
|
-
| `security` | [operations.PairPosDeviceSecurity](../../models/operations/pairposdevicesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
73
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
74
|
-
| `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. |
|
|
75
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
76
|
-
|
|
77
|
-
### Response
|
|
78
|
-
|
|
79
|
-
**Promise\<[operations.PairPosDeviceResponseBody](../../models/operations/pairposdeviceresponsebody.md)\>**
|
|
80
|
-
|
|
81
|
-
### Errors
|
|
82
|
-
|
|
83
|
-
| Error Type | Status Code | Content Type |
|
|
84
|
-
| -------------- | -------------- | -------------- |
|
|
85
|
-
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
86
|
-
|
|
87
|
-
## loginPosDeviceWithPhone
|
|
88
|
-
|
|
89
|
-
Login to POS device using phone.
|
|
90
|
-
|
|
91
|
-
### Example Usage
|
|
92
|
-
|
|
93
|
-
<!-- UsageSnippet language="typescript" operationID="login-pos-device-with-phone" method="post" path="/pos/auth/login/phone" -->
|
|
94
|
-
```typescript
|
|
95
|
-
import { CeStorefront } from "ce-storefront";
|
|
96
|
-
|
|
97
|
-
const ceStorefront = new CeStorefront();
|
|
98
|
-
|
|
99
|
-
async function run() {
|
|
100
|
-
const result = await ceStorefront.pos.loginPosDeviceWithPhone({
|
|
101
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
console.log(result);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
run();
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Standalone function
|
|
111
|
-
|
|
112
|
-
The standalone function version of this method:
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
116
|
-
import { posLoginPosDeviceWithPhone } from "ce-storefront/funcs/posLoginPosDeviceWithPhone.js";
|
|
117
|
-
|
|
118
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
119
|
-
// You can create one instance of it to use across an application.
|
|
120
|
-
const ceStorefront = new CeStorefrontCore();
|
|
121
|
-
|
|
122
|
-
async function run() {
|
|
123
|
-
const res = await posLoginPosDeviceWithPhone(ceStorefront, {
|
|
124
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
125
|
-
});
|
|
126
|
-
if (res.ok) {
|
|
127
|
-
const { value: result } = res;
|
|
128
|
-
console.log(result);
|
|
129
|
-
} else {
|
|
130
|
-
console.log("posLoginPosDeviceWithPhone failed:", res.error);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
run();
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Parameters
|
|
138
|
-
|
|
139
|
-
| Parameter | Type | Required | Description |
|
|
140
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
141
|
-
| `request` | [operations.LoginPosDeviceWithPhoneRequestBody](../../models/operations/loginposdevicewithphonerequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
142
|
-
| `security` | [operations.LoginPosDeviceWithPhoneSecurity](../../models/operations/loginposdevicewithphonesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
143
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
144
|
-
| `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. |
|
|
145
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
146
|
-
|
|
147
|
-
### Response
|
|
148
|
-
|
|
149
|
-
**Promise\<[operations.LoginPosDeviceWithPhoneResponseBody](../../models/operations/loginposdevicewithphoneresponsebody.md)\>**
|
|
150
|
-
|
|
151
|
-
### Errors
|
|
152
|
-
|
|
153
|
-
| Error Type | Status Code | Content Type |
|
|
154
|
-
| -------------- | -------------- | -------------- |
|
|
155
|
-
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
156
|
-
|
|
157
|
-
## loginPosDeviceWithWhatsapp
|
|
158
|
-
|
|
159
|
-
Login to POS device using whatsapp.
|
|
160
|
-
|
|
161
|
-
### Example Usage
|
|
162
|
-
|
|
163
|
-
<!-- UsageSnippet language="typescript" operationID="login-pos-device-with-whatsapp" method="post" path="/pos/auth/login/whatsapp" -->
|
|
164
|
-
```typescript
|
|
165
|
-
import { CeStorefront } from "ce-storefront";
|
|
166
|
-
|
|
167
|
-
const ceStorefront = new CeStorefront();
|
|
168
|
-
|
|
169
|
-
async function run() {
|
|
170
|
-
const result = await ceStorefront.pos.loginPosDeviceWithWhatsapp({
|
|
171
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
console.log(result);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
run();
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Standalone function
|
|
181
|
-
|
|
182
|
-
The standalone function version of this method:
|
|
183
|
-
|
|
184
|
-
```typescript
|
|
185
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
186
|
-
import { posLoginPosDeviceWithWhatsapp } from "ce-storefront/funcs/posLoginPosDeviceWithWhatsapp.js";
|
|
187
|
-
|
|
188
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
189
|
-
// You can create one instance of it to use across an application.
|
|
190
|
-
const ceStorefront = new CeStorefrontCore();
|
|
191
|
-
|
|
192
|
-
async function run() {
|
|
193
|
-
const res = await posLoginPosDeviceWithWhatsapp(ceStorefront, {
|
|
194
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
195
|
-
});
|
|
196
|
-
if (res.ok) {
|
|
197
|
-
const { value: result } = res;
|
|
198
|
-
console.log(result);
|
|
199
|
-
} else {
|
|
200
|
-
console.log("posLoginPosDeviceWithWhatsapp failed:", res.error);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
run();
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### Parameters
|
|
208
|
-
|
|
209
|
-
| Parameter | Type | Required | Description |
|
|
210
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
211
|
-
| `request` | [operations.LoginPosDeviceWithWhatsappRequestBody](../../models/operations/loginposdevicewithwhatsapprequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
212
|
-
| `security` | [operations.LoginPosDeviceWithWhatsappSecurity](../../models/operations/loginposdevicewithwhatsappsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
213
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
214
|
-
| `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. |
|
|
215
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
216
|
-
|
|
217
|
-
### Response
|
|
218
|
-
|
|
219
|
-
**Promise\<[operations.LoginPosDeviceWithWhatsappResponseBody](../../models/operations/loginposdevicewithwhatsappresponsebody.md)\>**
|
|
220
|
-
|
|
221
|
-
### Errors
|
|
222
|
-
|
|
223
|
-
| Error Type | Status Code | Content Type |
|
|
224
|
-
| -------------- | -------------- | -------------- |
|
|
225
|
-
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
226
|
-
|
|
227
|
-
## loginPosDeviceWithEmail
|
|
228
|
-
|
|
229
|
-
Login to POS device using email.
|
|
230
|
-
|
|
231
|
-
### Example Usage
|
|
232
|
-
|
|
233
|
-
<!-- UsageSnippet language="typescript" operationID="login-pos-device-with-email" method="post" path="/pos/auth/login/email" -->
|
|
234
|
-
```typescript
|
|
235
|
-
import { CeStorefront } from "ce-storefront";
|
|
236
|
-
|
|
237
|
-
const ceStorefront = new CeStorefront();
|
|
238
|
-
|
|
239
|
-
async function run() {
|
|
240
|
-
const result = await ceStorefront.pos.loginPosDeviceWithEmail({
|
|
241
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
console.log(result);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
run();
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Standalone function
|
|
251
|
-
|
|
252
|
-
The standalone function version of this method:
|
|
253
|
-
|
|
254
|
-
```typescript
|
|
255
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
256
|
-
import { posLoginPosDeviceWithEmail } from "ce-storefront/funcs/posLoginPosDeviceWithEmail.js";
|
|
257
|
-
|
|
258
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
259
|
-
// You can create one instance of it to use across an application.
|
|
260
|
-
const ceStorefront = new CeStorefrontCore();
|
|
261
|
-
|
|
262
|
-
async function run() {
|
|
263
|
-
const res = await posLoginPosDeviceWithEmail(ceStorefront, {
|
|
264
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
265
|
-
});
|
|
266
|
-
if (res.ok) {
|
|
267
|
-
const { value: result } = res;
|
|
268
|
-
console.log(result);
|
|
269
|
-
} else {
|
|
270
|
-
console.log("posLoginPosDeviceWithEmail failed:", res.error);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
run();
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### Parameters
|
|
278
|
-
|
|
279
|
-
| Parameter | Type | Required | Description |
|
|
280
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
281
|
-
| `request` | [operations.LoginPosDeviceWithEmailRequestBody](../../models/operations/loginposdevicewithemailrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
282
|
-
| `security` | [operations.LoginPosDeviceWithEmailSecurity](../../models/operations/loginposdevicewithemailsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
283
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
284
|
-
| `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. |
|
|
285
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
286
|
-
|
|
287
|
-
### Response
|
|
288
|
-
|
|
289
|
-
**Promise\<[operations.LoginPosDeviceWithEmailResponseBody](../../models/operations/loginposdevicewithemailresponsebody.md)\>**
|
|
290
|
-
|
|
291
|
-
### Errors
|
|
292
|
-
|
|
293
|
-
| Error Type | Status Code | Content Type |
|
|
294
|
-
| -------------- | -------------- | -------------- |
|
|
295
|
-
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
296
|
-
|
|
297
|
-
## verifyPosLoginOtp
|
|
298
|
-
|
|
299
|
-
Verify POS login otp.
|
|
300
|
-
|
|
301
|
-
### Example Usage
|
|
302
|
-
|
|
303
|
-
<!-- UsageSnippet language="typescript" operationID="verify-pos-login-otp" method="post" path="/pos/auth/verify-otp" -->
|
|
304
|
-
```typescript
|
|
305
|
-
import { CeStorefront } from "ce-storefront";
|
|
306
|
-
|
|
307
|
-
const ceStorefront = new CeStorefront();
|
|
308
|
-
|
|
309
|
-
async function run() {
|
|
310
|
-
const result = await ceStorefront.pos.verifyPosLoginOtp({
|
|
311
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
console.log(result);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
run();
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### Standalone function
|
|
321
|
-
|
|
322
|
-
The standalone function version of this method:
|
|
323
|
-
|
|
324
|
-
```typescript
|
|
325
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
326
|
-
import { posVerifyPosLoginOtp } from "ce-storefront/funcs/posVerifyPosLoginOtp.js";
|
|
327
|
-
|
|
328
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
329
|
-
// You can create one instance of it to use across an application.
|
|
330
|
-
const ceStorefront = new CeStorefrontCore();
|
|
331
|
-
|
|
332
|
-
async function run() {
|
|
333
|
-
const res = await posVerifyPosLoginOtp(ceStorefront, {
|
|
334
|
-
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
335
|
-
});
|
|
336
|
-
if (res.ok) {
|
|
337
|
-
const { value: result } = res;
|
|
338
|
-
console.log(result);
|
|
339
|
-
} else {
|
|
340
|
-
console.log("posVerifyPosLoginOtp failed:", res.error);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
run();
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
### Parameters
|
|
348
|
-
|
|
349
|
-
| Parameter | Type | Required | Description |
|
|
350
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
351
|
-
| `request` | [operations.VerifyPosLoginOtpRequestBody](../../models/operations/verifyposloginotprequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
352
|
-
| `security` | [operations.VerifyPosLoginOtpSecurity](../../models/operations/verifyposloginotpsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
353
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
354
|
-
| `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. |
|
|
355
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
356
|
-
|
|
357
|
-
### Response
|
|
358
|
-
|
|
359
|
-
**Promise\<[operations.VerifyPosLoginOtpResponseBody](../../models/operations/verifyposloginotpresponsebody.md)\>**
|
|
360
|
-
|
|
361
|
-
### Errors
|
|
362
|
-
|
|
363
|
-
| Error Type | Status Code | Content Type |
|
|
364
|
-
| -------------- | -------------- | -------------- |
|
|
365
|
-
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
366
|
-
|
|
367
|
-
## refreshPosAccessToken
|
|
368
|
-
|
|
369
|
-
Refresh POS access token
|
|
370
|
-
|
|
371
|
-
### Example Usage
|
|
372
|
-
|
|
373
|
-
<!-- UsageSnippet language="typescript" operationID="refresh-pos-access-token" method="post" path="/pos/auth/refresh-token" -->
|
|
374
|
-
```typescript
|
|
375
|
-
import { CeStorefront } from "ce-storefront";
|
|
376
|
-
|
|
377
|
-
const ceStorefront = new CeStorefront({
|
|
378
|
-
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
async function run() {
|
|
382
|
-
const result = await ceStorefront.pos.refreshPosAccessToken();
|
|
383
|
-
|
|
384
|
-
console.log(result);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
run();
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
### Standalone function
|
|
391
|
-
|
|
392
|
-
The standalone function version of this method:
|
|
393
|
-
|
|
394
|
-
```typescript
|
|
395
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
396
|
-
import { posRefreshPosAccessToken } from "ce-storefront/funcs/posRefreshPosAccessToken.js";
|
|
397
|
-
|
|
398
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
399
|
-
// You can create one instance of it to use across an application.
|
|
400
|
-
const ceStorefront = new CeStorefrontCore({
|
|
401
|
-
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
async function run() {
|
|
405
|
-
const res = await posRefreshPosAccessToken(ceStorefront);
|
|
406
|
-
if (res.ok) {
|
|
407
|
-
const { value: result } = res;
|
|
408
|
-
console.log(result);
|
|
409
|
-
} else {
|
|
410
|
-
console.log("posRefreshPosAccessToken failed:", res.error);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
run();
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
### Parameters
|
|
418
|
-
|
|
419
|
-
| Parameter | Type | Required | Description |
|
|
420
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
421
|
-
| `request` | [operations.RefreshPosAccessTokenRequestBody](../../models/operations/refreshposaccesstokenrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
422
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
423
|
-
| `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. |
|
|
424
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
425
|
-
|
|
426
|
-
### Response
|
|
427
|
-
|
|
428
|
-
**Promise\<[operations.RefreshPosAccessTokenResponseBody](../../models/operations/refreshposaccesstokenresponsebody.md)\>**
|
|
429
|
-
|
|
430
|
-
### Errors
|
|
431
|
-
|
|
432
|
-
| Error Type | Status Code | Content Type |
|
|
433
|
-
| -------------- | -------------- | -------------- |
|
|
434
|
-
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
435
|
-
|
|
436
|
-
## createPosCart
|
|
437
|
-
|
|
438
|
-
Create cart from POS device
|
|
439
|
-
|
|
440
|
-
### Example Usage
|
|
441
|
-
|
|
442
|
-
<!-- UsageSnippet language="typescript" operationID="create-pos-cart" method="post" path="/pos/carts" -->
|
|
443
|
-
```typescript
|
|
444
|
-
import { CeStorefront } from "ce-storefront";
|
|
445
|
-
|
|
446
|
-
const ceStorefront = new CeStorefront({
|
|
447
|
-
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
448
|
-
});
|
|
449
|
-
|
|
450
|
-
async function run() {
|
|
451
|
-
const result = await ceStorefront.pos.createPosCart({
|
|
452
|
-
items: [
|
|
453
|
-
{
|
|
454
|
-
productId: "01H9XYZ12345ABCDE",
|
|
455
|
-
variantId: null,
|
|
456
|
-
quantity: 1,
|
|
457
|
-
},
|
|
458
|
-
],
|
|
459
|
-
});
|
|
460
|
-
|
|
461
|
-
console.log(result);
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
run();
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
### Standalone function
|
|
468
|
-
|
|
469
|
-
The standalone function version of this method:
|
|
470
|
-
|
|
471
|
-
```typescript
|
|
472
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
473
|
-
import { posCreatePosCart } from "ce-storefront/funcs/posCreatePosCart.js";
|
|
474
|
-
|
|
475
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
476
|
-
// You can create one instance of it to use across an application.
|
|
477
|
-
const ceStorefront = new CeStorefrontCore({
|
|
478
|
-
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
479
|
-
});
|
|
480
|
-
|
|
481
|
-
async function run() {
|
|
482
|
-
const res = await posCreatePosCart(ceStorefront, {
|
|
483
|
-
items: [
|
|
484
|
-
{
|
|
485
|
-
productId: "01H9XYZ12345ABCDE",
|
|
486
|
-
variantId: null,
|
|
487
|
-
quantity: 1,
|
|
488
|
-
},
|
|
489
|
-
],
|
|
490
|
-
});
|
|
491
|
-
if (res.ok) {
|
|
492
|
-
const { value: result } = res;
|
|
493
|
-
console.log(result);
|
|
494
|
-
} else {
|
|
495
|
-
console.log("posCreatePosCart failed:", res.error);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
run();
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
### Parameters
|
|
503
|
-
|
|
504
|
-
| Parameter | Type | Required | Description |
|
|
505
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
506
|
-
| `request` | [operations.CreatePosCartRequestBody](../../models/operations/createposcartrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
507
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
508
|
-
| `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. |
|
|
509
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
510
|
-
|
|
511
|
-
### Response
|
|
512
|
-
|
|
513
|
-
**Promise\<[operations.CreatePosCartResponseBody](../../models/operations/createposcartresponsebody.md)\>**
|
|
514
|
-
|
|
515
|
-
### Errors
|
|
516
|
-
|
|
517
|
-
| Error Type | Status Code | Content Type |
|
|
518
|
-
| -------------- | -------------- | -------------- |
|
|
519
|
-
| errors.CeError | 4XX, 5XX | \*/\* |
|
|
520
|
-
|
|
521
|
-
## updatePosCart
|
|
522
|
-
|
|
523
|
-
Add/update item to cart. To delete item from cart, pass quantity = 0
|
|
524
|
-
|
|
525
|
-
### Example Usage
|
|
526
|
-
|
|
527
|
-
<!-- UsageSnippet language="typescript" operationID="update-pos-cart" method="post" path="/pos/carts/{id}/items" -->
|
|
528
|
-
```typescript
|
|
529
|
-
import { CeStorefront } from "ce-storefront";
|
|
530
|
-
|
|
531
|
-
const ceStorefront = new CeStorefront({
|
|
532
|
-
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
533
|
-
});
|
|
534
|
-
|
|
535
|
-
async function run() {
|
|
536
|
-
const result = await ceStorefront.pos.updatePosCart({
|
|
537
|
-
id: "<id>",
|
|
538
|
-
requestBody: {
|
|
539
|
-
items: [
|
|
540
|
-
{
|
|
541
|
-
productId: "01H9XYZ12345ABCDE",
|
|
542
|
-
variantId: null,
|
|
543
|
-
quantity: 1,
|
|
544
|
-
},
|
|
545
|
-
],
|
|
546
|
-
},
|
|
547
|
-
});
|
|
548
|
-
|
|
549
|
-
console.log(result);
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
run();
|
|
553
|
-
```
|
|
554
|
-
|
|
555
|
-
### Standalone function
|
|
556
|
-
|
|
557
|
-
The standalone function version of this method:
|
|
558
|
-
|
|
559
|
-
```typescript
|
|
560
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
561
|
-
import { posUpdatePosCart } from "ce-storefront/funcs/posUpdatePosCart.js";
|
|
562
|
-
|
|
563
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
564
|
-
// You can create one instance of it to use across an application.
|
|
565
|
-
const ceStorefront = new CeStorefrontCore({
|
|
566
|
-
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
567
|
-
});
|
|
568
|
-
|
|
569
|
-
async function run() {
|
|
570
|
-
const res = await posUpdatePosCart(ceStorefront, {
|
|
571
|
-
id: "<id>",
|
|
572
|
-
requestBody: {
|
|
573
|
-
items: [
|
|
574
|
-
{
|
|
575
|
-
productId: "01H9XYZ12345ABCDE",
|
|
576
|
-
variantId: null,
|
|
577
|
-
quantity: 1,
|
|
578
|
-
},
|
|
579
|
-
],
|
|
580
|
-
},
|
|
581
|
-
});
|
|
582
|
-
if (res.ok) {
|
|
583
|
-
const { value: result } = res;
|
|
584
|
-
console.log(result);
|
|
585
|
-
} else {
|
|
586
|
-
console.log("posUpdatePosCart failed:", res.error);
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
run();
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
### Parameters
|
|
594
|
-
|
|
595
|
-
| Parameter | Type | Required | Description |
|
|
596
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
597
|
-
| `request` | [operations.UpdatePosCartRequest](../../models/operations/updateposcartrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
598
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
599
|
-
| `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. |
|
|
600
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
601
|
-
|
|
602
|
-
### Response
|
|
603
|
-
|
|
604
|
-
**Promise\<[operations.UpdatePosCartResponseBody](../../models/operations/updateposcartresponsebody.md)\>**
|
|
605
|
-
|
|
606
|
-
### Errors
|
|
607
|
-
|
|
608
|
-
| Error Type | Status Code | Content Type |
|
|
609
|
-
| -------------- | -------------- | -------------- |
|
|
610
|
-
| errors.CeError | 4XX, 5XX | \*/\* |
|