@unified-api/typescript-sdk 2.9.3 → 2.9.5
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/FUNCTIONS.md +108 -0
- package/README.md +36 -15
- package/RUNTIMES.md +22 -0
- package/docs/sdks/account/README.md +501 -0
- package/docs/sdks/accounting/README.md +3629 -0
- package/docs/sdks/activity/README.md +501 -0
- package/docs/sdks/apicall/README.md +165 -0
- package/docs/sdks/application/README.md +501 -0
- package/docs/sdks/applicationstatus/README.md +88 -0
- package/docs/sdks/ats/README.md +3710 -0
- package/docs/sdks/auth/README.md +173 -0
- package/docs/sdks/branch/README.md +501 -0
- package/docs/sdks/call/README.md +88 -0
- package/docs/sdks/candidate/README.md +501 -0
- package/docs/sdks/channel/README.md +171 -0
- package/docs/sdks/class/README.md +501 -0
- package/docs/sdks/collection/README.md +501 -0
- package/docs/sdks/commerce/README.md +2477 -0
- package/docs/sdks/commit/README.md +501 -0
- package/docs/sdks/company/README.md +1240 -0
- package/docs/sdks/connection/README.md +485 -0
- package/docs/sdks/contact/README.md +1489 -0
- package/docs/sdks/course/README.md +501 -0
- package/docs/sdks/crm/README.md +2971 -0
- package/docs/sdks/customer/README.md +501 -0
- package/docs/sdks/deal/README.md +501 -0
- package/docs/sdks/document/README.md +501 -0
- package/docs/sdks/employee/README.md +501 -0
- package/docs/sdks/enrich/README.md +169 -0
- package/docs/sdks/event/README.md +501 -0
- package/docs/sdks/file/README.md +501 -0
- package/docs/sdks/genai/README.md +169 -0
- package/docs/sdks/group/README.md +995 -0
- package/docs/sdks/hris/README.md +2311 -0
- package/docs/sdks/instructor/README.md +501 -0
- package/docs/sdks/integration/README.md +248 -0
- package/docs/sdks/interview/README.md +501 -0
- package/docs/sdks/inventory/README.md +501 -0
- package/docs/sdks/invoice/README.md +501 -0
- package/docs/sdks/issue/README.md +84 -0
- package/docs/sdks/item/README.md +501 -0
- package/docs/sdks/job/README.md +501 -0
- package/docs/sdks/journal/README.md +501 -0
- package/docs/sdks/kms/README.md +995 -0
- package/docs/sdks/lead/README.md +501 -0
- package/docs/sdks/link/README.md +501 -0
- package/docs/sdks/list/README.md +501 -0
- package/docs/sdks/lms/README.md +1983 -0
- package/docs/sdks/location/README.md +995 -0
- package/docs/sdks/login/README.md +90 -0
- package/docs/sdks/martech/README.md +995 -0
- package/docs/sdks/member/README.md +501 -0
- package/docs/sdks/message/README.md +501 -0
- package/docs/sdks/messaging/README.md +665 -0
- package/docs/sdks/metadata/README.md +501 -0
- package/docs/sdks/model/README.md +88 -0
- package/docs/sdks/note/README.md +501 -0
- package/docs/sdks/order/README.md +501 -0
- package/docs/sdks/organization/README.md +665 -0
- package/docs/sdks/page/README.md +501 -0
- package/docs/sdks/passthrough/README.md +671 -0
- package/docs/sdks/payment/README.md +1323 -0
- package/docs/sdks/payout/README.md +171 -0
- package/docs/sdks/payslip/README.md +171 -0
- package/docs/sdks/person/README.md +88 -0
- package/docs/sdks/pipeline/README.md +501 -0
- package/docs/sdks/project/README.md +501 -0
- package/docs/sdks/prompt/README.md +88 -0
- package/docs/sdks/pullrequest/README.md +501 -0
- package/docs/sdks/refund/README.md +171 -0
- package/docs/sdks/repo/README.md +2477 -0
- package/docs/sdks/repository/README.md +501 -0
- package/docs/sdks/scim/README.md +995 -0
- package/docs/sdks/scorecard/README.md +501 -0
- package/docs/sdks/space/README.md +501 -0
- package/docs/sdks/storage/README.md +501 -0
- package/docs/sdks/student/README.md +501 -0
- package/docs/sdks/task/README.md +995 -0
- package/docs/sdks/taxrate/README.md +501 -0
- package/docs/sdks/ticket/README.md +501 -0
- package/docs/sdks/ticketing/README.md +1489 -0
- package/docs/sdks/timeoff/README.md +171 -0
- package/docs/sdks/transaction/README.md +501 -0
- package/docs/sdks/uc/README.md +582 -0
- package/docs/sdks/unified/README.md +1601 -0
- package/docs/sdks/unifiedto/README.md +7 -0
- package/docs/sdks/user/README.md +501 -0
- package/docs/sdks/webhook/README.md +647 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/primitives.d.ts +2 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +53 -0
- package/lib/primitives.js.map +1 -1
- package/package.json +3 -1
- package/sdk/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/kmspage.d.ts +5 -0
- package/sdk/models/shared/kmspage.d.ts.map +1 -1
- package/sdk/models/shared/kmspage.js +7 -0
- package/sdk/models/shared/kmspage.js.map +1 -1
- package/sdk/models/shared/kmspagemetadata.d.ts +37 -0
- package/sdk/models/shared/kmspagemetadata.d.ts.map +1 -0
- package/sdk/models/shared/kmspagemetadata.js +63 -0
- package/sdk/models/shared/kmspagemetadata.js.map +1 -0
- package/sdk/models/shared/kmsspace.d.ts +2 -0
- package/sdk/models/shared/kmsspace.d.ts.map +1 -1
- package/sdk/models/shared/kmsspace.js +4 -0
- package/sdk/models/shared/kmsspace.js.map +1 -1
- package/sdk/models/shared/security.d.ts +2 -2
- package/sdk/models/shared/security.d.ts.map +1 -1
- package/sdk/models/shared/security.js +2 -2
- package/sdk/models/shared/security.js.map +1 -1
- package/sdk/types/operations.d.ts +5 -3
- package/sdk/types/operations.d.ts.map +1 -1
- package/sdk/types/operations.js +3 -0
- package/sdk/types/operations.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/primitives.ts +62 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/kmspage.ts +16 -0
- package/src/sdk/models/shared/kmspagemetadata.ts +72 -0
- package/src/sdk/models/shared/kmsspace.ts +6 -0
- package/src/sdk/models/shared/security.ts +4 -4
- package/src/sdk/types/operations.ts +11 -5
|
@@ -0,0 +1,2477 @@
|
|
|
1
|
+
# Commerce
|
|
2
|
+
(*commerce*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [createCommerceCollection](#createcommercecollection) - Create a collection
|
|
9
|
+
* [createCommerceInventory](#createcommerceinventory) - Create an inventory
|
|
10
|
+
* [createCommerceItem](#createcommerceitem) - Create an item
|
|
11
|
+
* [createCommerceLocation](#createcommercelocation) - Create a location
|
|
12
|
+
* [createCommerceMetadata](#createcommercemetadata) - Create a metadata
|
|
13
|
+
* [getCommerceCollection](#getcommercecollection) - Retrieve a collection
|
|
14
|
+
* [getCommerceInventory](#getcommerceinventory) - Retrieve an inventory
|
|
15
|
+
* [getCommerceItem](#getcommerceitem) - Retrieve an item
|
|
16
|
+
* [getCommerceLocation](#getcommercelocation) - Retrieve a location
|
|
17
|
+
* [getCommerceMetadata](#getcommercemetadata) - Retrieve a metadata
|
|
18
|
+
* [listCommerceCollections](#listcommercecollections) - List all collections
|
|
19
|
+
* [listCommerceInventories](#listcommerceinventories) - List all inventories
|
|
20
|
+
* [listCommerceItems](#listcommerceitems) - List all items
|
|
21
|
+
* [listCommerceLocations](#listcommercelocations) - List all locations
|
|
22
|
+
* [listCommerceMetadatas](#listcommercemetadatas) - List all metadatas
|
|
23
|
+
* [patchCommerceCollection](#patchcommercecollection) - Update a collection
|
|
24
|
+
* [patchCommerceInventory](#patchcommerceinventory) - Update an inventory
|
|
25
|
+
* [patchCommerceItem](#patchcommerceitem) - Update an item
|
|
26
|
+
* [patchCommerceLocation](#patchcommercelocation) - Update a location
|
|
27
|
+
* [patchCommerceMetadata](#patchcommercemetadata) - Update a metadata
|
|
28
|
+
* [removeCommerceCollection](#removecommercecollection) - Remove a collection
|
|
29
|
+
* [removeCommerceInventory](#removecommerceinventory) - Remove an inventory
|
|
30
|
+
* [removeCommerceItem](#removecommerceitem) - Remove an item
|
|
31
|
+
* [removeCommerceLocation](#removecommercelocation) - Remove a location
|
|
32
|
+
* [removeCommerceMetadata](#removecommercemetadata) - Remove a metadata
|
|
33
|
+
* [updateCommerceCollection](#updatecommercecollection) - Update a collection
|
|
34
|
+
* [updateCommerceInventory](#updatecommerceinventory) - Update an inventory
|
|
35
|
+
* [updateCommerceItem](#updatecommerceitem) - Update an item
|
|
36
|
+
* [updateCommerceLocation](#updatecommercelocation) - Update a location
|
|
37
|
+
* [updateCommerceMetadata](#updatecommercemetadata) - Update a metadata
|
|
38
|
+
|
|
39
|
+
## createCommerceCollection
|
|
40
|
+
|
|
41
|
+
Create a collection
|
|
42
|
+
|
|
43
|
+
### Example Usage
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
47
|
+
|
|
48
|
+
const unifiedTo = new UnifiedTo({
|
|
49
|
+
security: {
|
|
50
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
async function run() {
|
|
55
|
+
const result = await unifiedTo.commerce.createCommerceCollection({
|
|
56
|
+
connectionId: "<value>",
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Handle the result
|
|
60
|
+
console.log(result);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
run();
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Standalone function
|
|
67
|
+
|
|
68
|
+
The standalone function version of this method:
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
72
|
+
import { commerceCreateCommerceCollection } from "@unified-api/typescript-sdk/funcs/commerceCreateCommerceCollection.js";
|
|
73
|
+
|
|
74
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
75
|
+
// You can create one instance of it to use across an application.
|
|
76
|
+
const unifiedTo = new UnifiedToCore({
|
|
77
|
+
security: {
|
|
78
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
async function run() {
|
|
83
|
+
const res = await commerceCreateCommerceCollection(unifiedTo, {
|
|
84
|
+
connectionId: "<value>",
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
if (!res.ok) {
|
|
88
|
+
throw res.error;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const { value: result } = res;
|
|
92
|
+
|
|
93
|
+
// Handle the result
|
|
94
|
+
console.log(result);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
run();
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Parameters
|
|
101
|
+
|
|
102
|
+
| Parameter | Type | Required | Description |
|
|
103
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
104
|
+
| `request` | [operations.CreateCommerceCollectionRequest](../../sdk/models/operations/createcommercecollectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
105
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
106
|
+
| `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. |
|
|
107
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
108
|
+
|
|
109
|
+
### Response
|
|
110
|
+
|
|
111
|
+
**Promise\<[shared.CommerceCollection](../../sdk/models/shared/commercecollection.md)\>**
|
|
112
|
+
|
|
113
|
+
### Errors
|
|
114
|
+
|
|
115
|
+
| Error Type | Status Code | Content Type |
|
|
116
|
+
| --------------- | --------------- | --------------- |
|
|
117
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
118
|
+
|
|
119
|
+
## createCommerceInventory
|
|
120
|
+
|
|
121
|
+
Create an inventory
|
|
122
|
+
|
|
123
|
+
### Example Usage
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
127
|
+
|
|
128
|
+
const unifiedTo = new UnifiedTo({
|
|
129
|
+
security: {
|
|
130
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
async function run() {
|
|
135
|
+
const result = await unifiedTo.commerce.createCommerceInventory({
|
|
136
|
+
connectionId: "<value>",
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// Handle the result
|
|
140
|
+
console.log(result);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
run();
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Standalone function
|
|
147
|
+
|
|
148
|
+
The standalone function version of this method:
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
152
|
+
import { commerceCreateCommerceInventory } from "@unified-api/typescript-sdk/funcs/commerceCreateCommerceInventory.js";
|
|
153
|
+
|
|
154
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
155
|
+
// You can create one instance of it to use across an application.
|
|
156
|
+
const unifiedTo = new UnifiedToCore({
|
|
157
|
+
security: {
|
|
158
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
async function run() {
|
|
163
|
+
const res = await commerceCreateCommerceInventory(unifiedTo, {
|
|
164
|
+
connectionId: "<value>",
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
if (!res.ok) {
|
|
168
|
+
throw res.error;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const { value: result } = res;
|
|
172
|
+
|
|
173
|
+
// Handle the result
|
|
174
|
+
console.log(result);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
run();
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Parameters
|
|
181
|
+
|
|
182
|
+
| Parameter | Type | Required | Description |
|
|
183
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
184
|
+
| `request` | [operations.CreateCommerceInventoryRequest](../../sdk/models/operations/createcommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
185
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
186
|
+
| `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. |
|
|
187
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
188
|
+
|
|
189
|
+
### Response
|
|
190
|
+
|
|
191
|
+
**Promise\<[shared.CommerceInventory](../../sdk/models/shared/commerceinventory.md)\>**
|
|
192
|
+
|
|
193
|
+
### Errors
|
|
194
|
+
|
|
195
|
+
| Error Type | Status Code | Content Type |
|
|
196
|
+
| --------------- | --------------- | --------------- |
|
|
197
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
198
|
+
|
|
199
|
+
## createCommerceItem
|
|
200
|
+
|
|
201
|
+
Create an item
|
|
202
|
+
|
|
203
|
+
### Example Usage
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
207
|
+
|
|
208
|
+
const unifiedTo = new UnifiedTo({
|
|
209
|
+
security: {
|
|
210
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
211
|
+
},
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
async function run() {
|
|
215
|
+
const result = await unifiedTo.commerce.createCommerceItem({
|
|
216
|
+
connectionId: "<value>",
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// Handle the result
|
|
220
|
+
console.log(result);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
run();
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Standalone function
|
|
227
|
+
|
|
228
|
+
The standalone function version of this method:
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
232
|
+
import { commerceCreateCommerceItem } from "@unified-api/typescript-sdk/funcs/commerceCreateCommerceItem.js";
|
|
233
|
+
|
|
234
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
235
|
+
// You can create one instance of it to use across an application.
|
|
236
|
+
const unifiedTo = new UnifiedToCore({
|
|
237
|
+
security: {
|
|
238
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
async function run() {
|
|
243
|
+
const res = await commerceCreateCommerceItem(unifiedTo, {
|
|
244
|
+
connectionId: "<value>",
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
if (!res.ok) {
|
|
248
|
+
throw res.error;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const { value: result } = res;
|
|
252
|
+
|
|
253
|
+
// Handle the result
|
|
254
|
+
console.log(result);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
run();
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Parameters
|
|
261
|
+
|
|
262
|
+
| Parameter | Type | Required | Description |
|
|
263
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
264
|
+
| `request` | [operations.CreateCommerceItemRequest](../../sdk/models/operations/createcommerceitemrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
265
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
266
|
+
| `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. |
|
|
267
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
268
|
+
|
|
269
|
+
### Response
|
|
270
|
+
|
|
271
|
+
**Promise\<[shared.CommerceItem](../../sdk/models/shared/commerceitem.md)\>**
|
|
272
|
+
|
|
273
|
+
### Errors
|
|
274
|
+
|
|
275
|
+
| Error Type | Status Code | Content Type |
|
|
276
|
+
| --------------- | --------------- | --------------- |
|
|
277
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
278
|
+
|
|
279
|
+
## createCommerceLocation
|
|
280
|
+
|
|
281
|
+
Create a location
|
|
282
|
+
|
|
283
|
+
### Example Usage
|
|
284
|
+
|
|
285
|
+
```typescript
|
|
286
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
287
|
+
|
|
288
|
+
const unifiedTo = new UnifiedTo({
|
|
289
|
+
security: {
|
|
290
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
291
|
+
},
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
async function run() {
|
|
295
|
+
const result = await unifiedTo.commerce.createCommerceLocation({
|
|
296
|
+
connectionId: "<value>",
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// Handle the result
|
|
300
|
+
console.log(result);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
run();
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Standalone function
|
|
307
|
+
|
|
308
|
+
The standalone function version of this method:
|
|
309
|
+
|
|
310
|
+
```typescript
|
|
311
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
312
|
+
import { commerceCreateCommerceLocation } from "@unified-api/typescript-sdk/funcs/commerceCreateCommerceLocation.js";
|
|
313
|
+
|
|
314
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
315
|
+
// You can create one instance of it to use across an application.
|
|
316
|
+
const unifiedTo = new UnifiedToCore({
|
|
317
|
+
security: {
|
|
318
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
319
|
+
},
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
async function run() {
|
|
323
|
+
const res = await commerceCreateCommerceLocation(unifiedTo, {
|
|
324
|
+
connectionId: "<value>",
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
if (!res.ok) {
|
|
328
|
+
throw res.error;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
const { value: result } = res;
|
|
332
|
+
|
|
333
|
+
// Handle the result
|
|
334
|
+
console.log(result);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
run();
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Parameters
|
|
341
|
+
|
|
342
|
+
| Parameter | Type | Required | Description |
|
|
343
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
344
|
+
| `request` | [operations.CreateCommerceLocationRequest](../../sdk/models/operations/createcommercelocationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
345
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
346
|
+
| `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. |
|
|
347
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
348
|
+
|
|
349
|
+
### Response
|
|
350
|
+
|
|
351
|
+
**Promise\<[shared.CommerceLocation](../../sdk/models/shared/commercelocation.md)\>**
|
|
352
|
+
|
|
353
|
+
### Errors
|
|
354
|
+
|
|
355
|
+
| Error Type | Status Code | Content Type |
|
|
356
|
+
| --------------- | --------------- | --------------- |
|
|
357
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
358
|
+
|
|
359
|
+
## createCommerceMetadata
|
|
360
|
+
|
|
361
|
+
Create a metadata
|
|
362
|
+
|
|
363
|
+
### Example Usage
|
|
364
|
+
|
|
365
|
+
```typescript
|
|
366
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
367
|
+
|
|
368
|
+
const unifiedTo = new UnifiedTo({
|
|
369
|
+
security: {
|
|
370
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
371
|
+
},
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
async function run() {
|
|
375
|
+
const result = await unifiedTo.commerce.createCommerceMetadata({
|
|
376
|
+
connectionId: "<id>",
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
// Handle the result
|
|
380
|
+
console.log(result);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
run();
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Standalone function
|
|
387
|
+
|
|
388
|
+
The standalone function version of this method:
|
|
389
|
+
|
|
390
|
+
```typescript
|
|
391
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
392
|
+
import { commerceCreateCommerceMetadata } from "@unified-api/typescript-sdk/funcs/commerceCreateCommerceMetadata.js";
|
|
393
|
+
|
|
394
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
395
|
+
// You can create one instance of it to use across an application.
|
|
396
|
+
const unifiedTo = new UnifiedToCore({
|
|
397
|
+
security: {
|
|
398
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
399
|
+
},
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
async function run() {
|
|
403
|
+
const res = await commerceCreateCommerceMetadata(unifiedTo, {
|
|
404
|
+
connectionId: "<id>",
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
if (!res.ok) {
|
|
408
|
+
throw res.error;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const { value: result } = res;
|
|
412
|
+
|
|
413
|
+
// Handle the result
|
|
414
|
+
console.log(result);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
run();
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### Parameters
|
|
421
|
+
|
|
422
|
+
| Parameter | Type | Required | Description |
|
|
423
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
424
|
+
| `request` | [operations.CreateCommerceMetadataRequest](../../sdk/models/operations/createcommercemetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
425
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
426
|
+
| `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. |
|
|
427
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
428
|
+
|
|
429
|
+
### Response
|
|
430
|
+
|
|
431
|
+
**Promise\<[shared.CommerceMetadata](../../sdk/models/shared/commercemetadata.md)\>**
|
|
432
|
+
|
|
433
|
+
### Errors
|
|
434
|
+
|
|
435
|
+
| Error Type | Status Code | Content Type |
|
|
436
|
+
| --------------- | --------------- | --------------- |
|
|
437
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
438
|
+
|
|
439
|
+
## getCommerceCollection
|
|
440
|
+
|
|
441
|
+
Retrieve a collection
|
|
442
|
+
|
|
443
|
+
### Example Usage
|
|
444
|
+
|
|
445
|
+
```typescript
|
|
446
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
447
|
+
|
|
448
|
+
const unifiedTo = new UnifiedTo({
|
|
449
|
+
security: {
|
|
450
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
451
|
+
},
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
async function run() {
|
|
455
|
+
const result = await unifiedTo.commerce.getCommerceCollection({
|
|
456
|
+
connectionId: "<value>",
|
|
457
|
+
id: "<id>",
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
// Handle the result
|
|
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 { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
473
|
+
import { commerceGetCommerceCollection } from "@unified-api/typescript-sdk/funcs/commerceGetCommerceCollection.js";
|
|
474
|
+
|
|
475
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
476
|
+
// You can create one instance of it to use across an application.
|
|
477
|
+
const unifiedTo = new UnifiedToCore({
|
|
478
|
+
security: {
|
|
479
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
480
|
+
},
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
async function run() {
|
|
484
|
+
const res = await commerceGetCommerceCollection(unifiedTo, {
|
|
485
|
+
connectionId: "<value>",
|
|
486
|
+
id: "<id>",
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
if (!res.ok) {
|
|
490
|
+
throw res.error;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
const { value: result } = res;
|
|
494
|
+
|
|
495
|
+
// Handle the result
|
|
496
|
+
console.log(result);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
run();
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### Parameters
|
|
503
|
+
|
|
504
|
+
| Parameter | Type | Required | Description |
|
|
505
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
506
|
+
| `request` | [operations.GetCommerceCollectionRequest](../../sdk/models/operations/getcommercecollectionrequest.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\<[shared.CommerceCollection](../../sdk/models/shared/commercecollection.md)\>**
|
|
514
|
+
|
|
515
|
+
### Errors
|
|
516
|
+
|
|
517
|
+
| Error Type | Status Code | Content Type |
|
|
518
|
+
| --------------- | --------------- | --------------- |
|
|
519
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
520
|
+
|
|
521
|
+
## getCommerceInventory
|
|
522
|
+
|
|
523
|
+
Retrieve an inventory
|
|
524
|
+
|
|
525
|
+
### Example Usage
|
|
526
|
+
|
|
527
|
+
```typescript
|
|
528
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
529
|
+
|
|
530
|
+
const unifiedTo = new UnifiedTo({
|
|
531
|
+
security: {
|
|
532
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
async function run() {
|
|
537
|
+
const result = await unifiedTo.commerce.getCommerceInventory({
|
|
538
|
+
connectionId: "<value>",
|
|
539
|
+
id: "<id>",
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
// Handle the result
|
|
543
|
+
console.log(result);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
run();
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
### Standalone function
|
|
550
|
+
|
|
551
|
+
The standalone function version of this method:
|
|
552
|
+
|
|
553
|
+
```typescript
|
|
554
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
555
|
+
import { commerceGetCommerceInventory } from "@unified-api/typescript-sdk/funcs/commerceGetCommerceInventory.js";
|
|
556
|
+
|
|
557
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
558
|
+
// You can create one instance of it to use across an application.
|
|
559
|
+
const unifiedTo = new UnifiedToCore({
|
|
560
|
+
security: {
|
|
561
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
562
|
+
},
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
async function run() {
|
|
566
|
+
const res = await commerceGetCommerceInventory(unifiedTo, {
|
|
567
|
+
connectionId: "<value>",
|
|
568
|
+
id: "<id>",
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
if (!res.ok) {
|
|
572
|
+
throw res.error;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
const { value: result } = res;
|
|
576
|
+
|
|
577
|
+
// Handle the result
|
|
578
|
+
console.log(result);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
run();
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
### Parameters
|
|
585
|
+
|
|
586
|
+
| Parameter | Type | Required | Description |
|
|
587
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
588
|
+
| `request` | [operations.GetCommerceInventoryRequest](../../sdk/models/operations/getcommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
589
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
590
|
+
| `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. |
|
|
591
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
592
|
+
|
|
593
|
+
### Response
|
|
594
|
+
|
|
595
|
+
**Promise\<[shared.CommerceInventory](../../sdk/models/shared/commerceinventory.md)\>**
|
|
596
|
+
|
|
597
|
+
### Errors
|
|
598
|
+
|
|
599
|
+
| Error Type | Status Code | Content Type |
|
|
600
|
+
| --------------- | --------------- | --------------- |
|
|
601
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
602
|
+
|
|
603
|
+
## getCommerceItem
|
|
604
|
+
|
|
605
|
+
Retrieve an item
|
|
606
|
+
|
|
607
|
+
### Example Usage
|
|
608
|
+
|
|
609
|
+
```typescript
|
|
610
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
611
|
+
|
|
612
|
+
const unifiedTo = new UnifiedTo({
|
|
613
|
+
security: {
|
|
614
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
615
|
+
},
|
|
616
|
+
});
|
|
617
|
+
|
|
618
|
+
async function run() {
|
|
619
|
+
const result = await unifiedTo.commerce.getCommerceItem({
|
|
620
|
+
connectionId: "<value>",
|
|
621
|
+
id: "<id>",
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
// Handle the result
|
|
625
|
+
console.log(result);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
run();
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
### Standalone function
|
|
632
|
+
|
|
633
|
+
The standalone function version of this method:
|
|
634
|
+
|
|
635
|
+
```typescript
|
|
636
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
637
|
+
import { commerceGetCommerceItem } from "@unified-api/typescript-sdk/funcs/commerceGetCommerceItem.js";
|
|
638
|
+
|
|
639
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
640
|
+
// You can create one instance of it to use across an application.
|
|
641
|
+
const unifiedTo = new UnifiedToCore({
|
|
642
|
+
security: {
|
|
643
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
644
|
+
},
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
async function run() {
|
|
648
|
+
const res = await commerceGetCommerceItem(unifiedTo, {
|
|
649
|
+
connectionId: "<value>",
|
|
650
|
+
id: "<id>",
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
if (!res.ok) {
|
|
654
|
+
throw res.error;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
const { value: result } = res;
|
|
658
|
+
|
|
659
|
+
// Handle the result
|
|
660
|
+
console.log(result);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
run();
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
### Parameters
|
|
667
|
+
|
|
668
|
+
| Parameter | Type | Required | Description |
|
|
669
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
670
|
+
| `request` | [operations.GetCommerceItemRequest](../../sdk/models/operations/getcommerceitemrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
671
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
672
|
+
| `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. |
|
|
673
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
674
|
+
|
|
675
|
+
### Response
|
|
676
|
+
|
|
677
|
+
**Promise\<[shared.CommerceItem](../../sdk/models/shared/commerceitem.md)\>**
|
|
678
|
+
|
|
679
|
+
### Errors
|
|
680
|
+
|
|
681
|
+
| Error Type | Status Code | Content Type |
|
|
682
|
+
| --------------- | --------------- | --------------- |
|
|
683
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
684
|
+
|
|
685
|
+
## getCommerceLocation
|
|
686
|
+
|
|
687
|
+
Retrieve a location
|
|
688
|
+
|
|
689
|
+
### Example Usage
|
|
690
|
+
|
|
691
|
+
```typescript
|
|
692
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
693
|
+
|
|
694
|
+
const unifiedTo = new UnifiedTo({
|
|
695
|
+
security: {
|
|
696
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
697
|
+
},
|
|
698
|
+
});
|
|
699
|
+
|
|
700
|
+
async function run() {
|
|
701
|
+
const result = await unifiedTo.commerce.getCommerceLocation({
|
|
702
|
+
connectionId: "<value>",
|
|
703
|
+
id: "<id>",
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
// Handle the result
|
|
707
|
+
console.log(result);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
run();
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
### Standalone function
|
|
714
|
+
|
|
715
|
+
The standalone function version of this method:
|
|
716
|
+
|
|
717
|
+
```typescript
|
|
718
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
719
|
+
import { commerceGetCommerceLocation } from "@unified-api/typescript-sdk/funcs/commerceGetCommerceLocation.js";
|
|
720
|
+
|
|
721
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
722
|
+
// You can create one instance of it to use across an application.
|
|
723
|
+
const unifiedTo = new UnifiedToCore({
|
|
724
|
+
security: {
|
|
725
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
726
|
+
},
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
async function run() {
|
|
730
|
+
const res = await commerceGetCommerceLocation(unifiedTo, {
|
|
731
|
+
connectionId: "<value>",
|
|
732
|
+
id: "<id>",
|
|
733
|
+
});
|
|
734
|
+
|
|
735
|
+
if (!res.ok) {
|
|
736
|
+
throw res.error;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
const { value: result } = res;
|
|
740
|
+
|
|
741
|
+
// Handle the result
|
|
742
|
+
console.log(result);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
run();
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
### Parameters
|
|
749
|
+
|
|
750
|
+
| Parameter | Type | Required | Description |
|
|
751
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
752
|
+
| `request` | [operations.GetCommerceLocationRequest](../../sdk/models/operations/getcommercelocationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
753
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
754
|
+
| `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. |
|
|
755
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
756
|
+
|
|
757
|
+
### Response
|
|
758
|
+
|
|
759
|
+
**Promise\<[shared.CommerceLocation](../../sdk/models/shared/commercelocation.md)\>**
|
|
760
|
+
|
|
761
|
+
### Errors
|
|
762
|
+
|
|
763
|
+
| Error Type | Status Code | Content Type |
|
|
764
|
+
| --------------- | --------------- | --------------- |
|
|
765
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
766
|
+
|
|
767
|
+
## getCommerceMetadata
|
|
768
|
+
|
|
769
|
+
Retrieve a metadata
|
|
770
|
+
|
|
771
|
+
### Example Usage
|
|
772
|
+
|
|
773
|
+
```typescript
|
|
774
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
775
|
+
|
|
776
|
+
const unifiedTo = new UnifiedTo({
|
|
777
|
+
security: {
|
|
778
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
779
|
+
},
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
async function run() {
|
|
783
|
+
const result = await unifiedTo.commerce.getCommerceMetadata({
|
|
784
|
+
connectionId: "<id>",
|
|
785
|
+
id: "<id>",
|
|
786
|
+
});
|
|
787
|
+
|
|
788
|
+
// Handle the result
|
|
789
|
+
console.log(result);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
run();
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
### Standalone function
|
|
796
|
+
|
|
797
|
+
The standalone function version of this method:
|
|
798
|
+
|
|
799
|
+
```typescript
|
|
800
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
801
|
+
import { commerceGetCommerceMetadata } from "@unified-api/typescript-sdk/funcs/commerceGetCommerceMetadata.js";
|
|
802
|
+
|
|
803
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
804
|
+
// You can create one instance of it to use across an application.
|
|
805
|
+
const unifiedTo = new UnifiedToCore({
|
|
806
|
+
security: {
|
|
807
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
808
|
+
},
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
async function run() {
|
|
812
|
+
const res = await commerceGetCommerceMetadata(unifiedTo, {
|
|
813
|
+
connectionId: "<id>",
|
|
814
|
+
id: "<id>",
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
if (!res.ok) {
|
|
818
|
+
throw res.error;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
const { value: result } = res;
|
|
822
|
+
|
|
823
|
+
// Handle the result
|
|
824
|
+
console.log(result);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
run();
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
### Parameters
|
|
831
|
+
|
|
832
|
+
| Parameter | Type | Required | Description |
|
|
833
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
834
|
+
| `request` | [operations.GetCommerceMetadataRequest](../../sdk/models/operations/getcommercemetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
835
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
836
|
+
| `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. |
|
|
837
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
838
|
+
|
|
839
|
+
### Response
|
|
840
|
+
|
|
841
|
+
**Promise\<[shared.CommerceMetadata](../../sdk/models/shared/commercemetadata.md)\>**
|
|
842
|
+
|
|
843
|
+
### Errors
|
|
844
|
+
|
|
845
|
+
| Error Type | Status Code | Content Type |
|
|
846
|
+
| --------------- | --------------- | --------------- |
|
|
847
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
848
|
+
|
|
849
|
+
## listCommerceCollections
|
|
850
|
+
|
|
851
|
+
List all collections
|
|
852
|
+
|
|
853
|
+
### Example Usage
|
|
854
|
+
|
|
855
|
+
```typescript
|
|
856
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
857
|
+
|
|
858
|
+
const unifiedTo = new UnifiedTo({
|
|
859
|
+
security: {
|
|
860
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
861
|
+
},
|
|
862
|
+
});
|
|
863
|
+
|
|
864
|
+
async function run() {
|
|
865
|
+
const result = await unifiedTo.commerce.listCommerceCollections({
|
|
866
|
+
connectionId: "<value>",
|
|
867
|
+
});
|
|
868
|
+
|
|
869
|
+
// Handle the result
|
|
870
|
+
console.log(result);
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
run();
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
### Standalone function
|
|
877
|
+
|
|
878
|
+
The standalone function version of this method:
|
|
879
|
+
|
|
880
|
+
```typescript
|
|
881
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
882
|
+
import { commerceListCommerceCollections } from "@unified-api/typescript-sdk/funcs/commerceListCommerceCollections.js";
|
|
883
|
+
|
|
884
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
885
|
+
// You can create one instance of it to use across an application.
|
|
886
|
+
const unifiedTo = new UnifiedToCore({
|
|
887
|
+
security: {
|
|
888
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
889
|
+
},
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
async function run() {
|
|
893
|
+
const res = await commerceListCommerceCollections(unifiedTo, {
|
|
894
|
+
connectionId: "<value>",
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
if (!res.ok) {
|
|
898
|
+
throw res.error;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
const { value: result } = res;
|
|
902
|
+
|
|
903
|
+
// Handle the result
|
|
904
|
+
console.log(result);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
run();
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
### Parameters
|
|
911
|
+
|
|
912
|
+
| Parameter | Type | Required | Description |
|
|
913
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
914
|
+
| `request` | [operations.ListCommerceCollectionsRequest](../../sdk/models/operations/listcommercecollectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
915
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
916
|
+
| `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. |
|
|
917
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
918
|
+
|
|
919
|
+
### Response
|
|
920
|
+
|
|
921
|
+
**Promise\<[shared.CommerceCollection[]](../../models/.md)\>**
|
|
922
|
+
|
|
923
|
+
### Errors
|
|
924
|
+
|
|
925
|
+
| Error Type | Status Code | Content Type |
|
|
926
|
+
| --------------- | --------------- | --------------- |
|
|
927
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
928
|
+
|
|
929
|
+
## listCommerceInventories
|
|
930
|
+
|
|
931
|
+
List all inventories
|
|
932
|
+
|
|
933
|
+
### Example Usage
|
|
934
|
+
|
|
935
|
+
```typescript
|
|
936
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
937
|
+
|
|
938
|
+
const unifiedTo = new UnifiedTo({
|
|
939
|
+
security: {
|
|
940
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
941
|
+
},
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
async function run() {
|
|
945
|
+
const result = await unifiedTo.commerce.listCommerceInventories({
|
|
946
|
+
connectionId: "<value>",
|
|
947
|
+
});
|
|
948
|
+
|
|
949
|
+
// Handle the result
|
|
950
|
+
console.log(result);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
run();
|
|
954
|
+
```
|
|
955
|
+
|
|
956
|
+
### Standalone function
|
|
957
|
+
|
|
958
|
+
The standalone function version of this method:
|
|
959
|
+
|
|
960
|
+
```typescript
|
|
961
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
962
|
+
import { commerceListCommerceInventories } from "@unified-api/typescript-sdk/funcs/commerceListCommerceInventories.js";
|
|
963
|
+
|
|
964
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
965
|
+
// You can create one instance of it to use across an application.
|
|
966
|
+
const unifiedTo = new UnifiedToCore({
|
|
967
|
+
security: {
|
|
968
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
969
|
+
},
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
async function run() {
|
|
973
|
+
const res = await commerceListCommerceInventories(unifiedTo, {
|
|
974
|
+
connectionId: "<value>",
|
|
975
|
+
});
|
|
976
|
+
|
|
977
|
+
if (!res.ok) {
|
|
978
|
+
throw res.error;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
const { value: result } = res;
|
|
982
|
+
|
|
983
|
+
// Handle the result
|
|
984
|
+
console.log(result);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
run();
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
### Parameters
|
|
991
|
+
|
|
992
|
+
| Parameter | Type | Required | Description |
|
|
993
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
994
|
+
| `request` | [operations.ListCommerceInventoriesRequest](../../sdk/models/operations/listcommerceinventoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
995
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
996
|
+
| `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. |
|
|
997
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
998
|
+
|
|
999
|
+
### Response
|
|
1000
|
+
|
|
1001
|
+
**Promise\<[shared.CommerceInventory[]](../../models/.md)\>**
|
|
1002
|
+
|
|
1003
|
+
### Errors
|
|
1004
|
+
|
|
1005
|
+
| Error Type | Status Code | Content Type |
|
|
1006
|
+
| --------------- | --------------- | --------------- |
|
|
1007
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1008
|
+
|
|
1009
|
+
## listCommerceItems
|
|
1010
|
+
|
|
1011
|
+
List all items
|
|
1012
|
+
|
|
1013
|
+
### Example Usage
|
|
1014
|
+
|
|
1015
|
+
```typescript
|
|
1016
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1017
|
+
|
|
1018
|
+
const unifiedTo = new UnifiedTo({
|
|
1019
|
+
security: {
|
|
1020
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1021
|
+
},
|
|
1022
|
+
});
|
|
1023
|
+
|
|
1024
|
+
async function run() {
|
|
1025
|
+
const result = await unifiedTo.commerce.listCommerceItems({
|
|
1026
|
+
connectionId: "<value>",
|
|
1027
|
+
});
|
|
1028
|
+
|
|
1029
|
+
// Handle the result
|
|
1030
|
+
console.log(result);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
run();
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
### Standalone function
|
|
1037
|
+
|
|
1038
|
+
The standalone function version of this method:
|
|
1039
|
+
|
|
1040
|
+
```typescript
|
|
1041
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1042
|
+
import { commerceListCommerceItems } from "@unified-api/typescript-sdk/funcs/commerceListCommerceItems.js";
|
|
1043
|
+
|
|
1044
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1045
|
+
// You can create one instance of it to use across an application.
|
|
1046
|
+
const unifiedTo = new UnifiedToCore({
|
|
1047
|
+
security: {
|
|
1048
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1049
|
+
},
|
|
1050
|
+
});
|
|
1051
|
+
|
|
1052
|
+
async function run() {
|
|
1053
|
+
const res = await commerceListCommerceItems(unifiedTo, {
|
|
1054
|
+
connectionId: "<value>",
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
if (!res.ok) {
|
|
1058
|
+
throw res.error;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
const { value: result } = res;
|
|
1062
|
+
|
|
1063
|
+
// Handle the result
|
|
1064
|
+
console.log(result);
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
run();
|
|
1068
|
+
```
|
|
1069
|
+
|
|
1070
|
+
### Parameters
|
|
1071
|
+
|
|
1072
|
+
| Parameter | Type | Required | Description |
|
|
1073
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1074
|
+
| `request` | [operations.ListCommerceItemsRequest](../../sdk/models/operations/listcommerceitemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1075
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1076
|
+
| `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. |
|
|
1077
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1078
|
+
|
|
1079
|
+
### Response
|
|
1080
|
+
|
|
1081
|
+
**Promise\<[shared.CommerceItem[]](../../models/.md)\>**
|
|
1082
|
+
|
|
1083
|
+
### Errors
|
|
1084
|
+
|
|
1085
|
+
| Error Type | Status Code | Content Type |
|
|
1086
|
+
| --------------- | --------------- | --------------- |
|
|
1087
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1088
|
+
|
|
1089
|
+
## listCommerceLocations
|
|
1090
|
+
|
|
1091
|
+
List all locations
|
|
1092
|
+
|
|
1093
|
+
### Example Usage
|
|
1094
|
+
|
|
1095
|
+
```typescript
|
|
1096
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1097
|
+
|
|
1098
|
+
const unifiedTo = new UnifiedTo({
|
|
1099
|
+
security: {
|
|
1100
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1101
|
+
},
|
|
1102
|
+
});
|
|
1103
|
+
|
|
1104
|
+
async function run() {
|
|
1105
|
+
const result = await unifiedTo.commerce.listCommerceLocations({
|
|
1106
|
+
connectionId: "<value>",
|
|
1107
|
+
});
|
|
1108
|
+
|
|
1109
|
+
// Handle the result
|
|
1110
|
+
console.log(result);
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
run();
|
|
1114
|
+
```
|
|
1115
|
+
|
|
1116
|
+
### Standalone function
|
|
1117
|
+
|
|
1118
|
+
The standalone function version of this method:
|
|
1119
|
+
|
|
1120
|
+
```typescript
|
|
1121
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1122
|
+
import { commerceListCommerceLocations } from "@unified-api/typescript-sdk/funcs/commerceListCommerceLocations.js";
|
|
1123
|
+
|
|
1124
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1125
|
+
// You can create one instance of it to use across an application.
|
|
1126
|
+
const unifiedTo = new UnifiedToCore({
|
|
1127
|
+
security: {
|
|
1128
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1129
|
+
},
|
|
1130
|
+
});
|
|
1131
|
+
|
|
1132
|
+
async function run() {
|
|
1133
|
+
const res = await commerceListCommerceLocations(unifiedTo, {
|
|
1134
|
+
connectionId: "<value>",
|
|
1135
|
+
});
|
|
1136
|
+
|
|
1137
|
+
if (!res.ok) {
|
|
1138
|
+
throw res.error;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
const { value: result } = res;
|
|
1142
|
+
|
|
1143
|
+
// Handle the result
|
|
1144
|
+
console.log(result);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
run();
|
|
1148
|
+
```
|
|
1149
|
+
|
|
1150
|
+
### Parameters
|
|
1151
|
+
|
|
1152
|
+
| Parameter | Type | Required | Description |
|
|
1153
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1154
|
+
| `request` | [operations.ListCommerceLocationsRequest](../../sdk/models/operations/listcommercelocationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1155
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1156
|
+
| `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. |
|
|
1157
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1158
|
+
|
|
1159
|
+
### Response
|
|
1160
|
+
|
|
1161
|
+
**Promise\<[shared.CommerceLocation[]](../../models/.md)\>**
|
|
1162
|
+
|
|
1163
|
+
### Errors
|
|
1164
|
+
|
|
1165
|
+
| Error Type | Status Code | Content Type |
|
|
1166
|
+
| --------------- | --------------- | --------------- |
|
|
1167
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1168
|
+
|
|
1169
|
+
## listCommerceMetadatas
|
|
1170
|
+
|
|
1171
|
+
List all metadatas
|
|
1172
|
+
|
|
1173
|
+
### Example Usage
|
|
1174
|
+
|
|
1175
|
+
```typescript
|
|
1176
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1177
|
+
|
|
1178
|
+
const unifiedTo = new UnifiedTo({
|
|
1179
|
+
security: {
|
|
1180
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1181
|
+
},
|
|
1182
|
+
});
|
|
1183
|
+
|
|
1184
|
+
async function run() {
|
|
1185
|
+
const result = await unifiedTo.commerce.listCommerceMetadatas({
|
|
1186
|
+
connectionId: "<id>",
|
|
1187
|
+
});
|
|
1188
|
+
|
|
1189
|
+
// Handle the result
|
|
1190
|
+
console.log(result);
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
run();
|
|
1194
|
+
```
|
|
1195
|
+
|
|
1196
|
+
### Standalone function
|
|
1197
|
+
|
|
1198
|
+
The standalone function version of this method:
|
|
1199
|
+
|
|
1200
|
+
```typescript
|
|
1201
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1202
|
+
import { commerceListCommerceMetadatas } from "@unified-api/typescript-sdk/funcs/commerceListCommerceMetadatas.js";
|
|
1203
|
+
|
|
1204
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1205
|
+
// You can create one instance of it to use across an application.
|
|
1206
|
+
const unifiedTo = new UnifiedToCore({
|
|
1207
|
+
security: {
|
|
1208
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1209
|
+
},
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
async function run() {
|
|
1213
|
+
const res = await commerceListCommerceMetadatas(unifiedTo, {
|
|
1214
|
+
connectionId: "<id>",
|
|
1215
|
+
});
|
|
1216
|
+
|
|
1217
|
+
if (!res.ok) {
|
|
1218
|
+
throw res.error;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
const { value: result } = res;
|
|
1222
|
+
|
|
1223
|
+
// Handle the result
|
|
1224
|
+
console.log(result);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
run();
|
|
1228
|
+
```
|
|
1229
|
+
|
|
1230
|
+
### Parameters
|
|
1231
|
+
|
|
1232
|
+
| Parameter | Type | Required | Description |
|
|
1233
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1234
|
+
| `request` | [operations.ListCommerceMetadatasRequest](../../sdk/models/operations/listcommercemetadatasrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1235
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1236
|
+
| `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. |
|
|
1237
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1238
|
+
|
|
1239
|
+
### Response
|
|
1240
|
+
|
|
1241
|
+
**Promise\<[shared.CommerceMetadata[]](../../models/.md)\>**
|
|
1242
|
+
|
|
1243
|
+
### Errors
|
|
1244
|
+
|
|
1245
|
+
| Error Type | Status Code | Content Type |
|
|
1246
|
+
| --------------- | --------------- | --------------- |
|
|
1247
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1248
|
+
|
|
1249
|
+
## patchCommerceCollection
|
|
1250
|
+
|
|
1251
|
+
Update a collection
|
|
1252
|
+
|
|
1253
|
+
### Example Usage
|
|
1254
|
+
|
|
1255
|
+
```typescript
|
|
1256
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1257
|
+
|
|
1258
|
+
const unifiedTo = new UnifiedTo({
|
|
1259
|
+
security: {
|
|
1260
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1261
|
+
},
|
|
1262
|
+
});
|
|
1263
|
+
|
|
1264
|
+
async function run() {
|
|
1265
|
+
const result = await unifiedTo.commerce.patchCommerceCollection({
|
|
1266
|
+
connectionId: "<value>",
|
|
1267
|
+
id: "<id>",
|
|
1268
|
+
});
|
|
1269
|
+
|
|
1270
|
+
// Handle the result
|
|
1271
|
+
console.log(result);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
run();
|
|
1275
|
+
```
|
|
1276
|
+
|
|
1277
|
+
### Standalone function
|
|
1278
|
+
|
|
1279
|
+
The standalone function version of this method:
|
|
1280
|
+
|
|
1281
|
+
```typescript
|
|
1282
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1283
|
+
import { commercePatchCommerceCollection } from "@unified-api/typescript-sdk/funcs/commercePatchCommerceCollection.js";
|
|
1284
|
+
|
|
1285
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1286
|
+
// You can create one instance of it to use across an application.
|
|
1287
|
+
const unifiedTo = new UnifiedToCore({
|
|
1288
|
+
security: {
|
|
1289
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1290
|
+
},
|
|
1291
|
+
});
|
|
1292
|
+
|
|
1293
|
+
async function run() {
|
|
1294
|
+
const res = await commercePatchCommerceCollection(unifiedTo, {
|
|
1295
|
+
connectionId: "<value>",
|
|
1296
|
+
id: "<id>",
|
|
1297
|
+
});
|
|
1298
|
+
|
|
1299
|
+
if (!res.ok) {
|
|
1300
|
+
throw res.error;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
const { value: result } = res;
|
|
1304
|
+
|
|
1305
|
+
// Handle the result
|
|
1306
|
+
console.log(result);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
run();
|
|
1310
|
+
```
|
|
1311
|
+
|
|
1312
|
+
### Parameters
|
|
1313
|
+
|
|
1314
|
+
| Parameter | Type | Required | Description |
|
|
1315
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1316
|
+
| `request` | [operations.PatchCommerceCollectionRequest](../../sdk/models/operations/patchcommercecollectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1317
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1318
|
+
| `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. |
|
|
1319
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1320
|
+
|
|
1321
|
+
### Response
|
|
1322
|
+
|
|
1323
|
+
**Promise\<[shared.CommerceCollection](../../sdk/models/shared/commercecollection.md)\>**
|
|
1324
|
+
|
|
1325
|
+
### Errors
|
|
1326
|
+
|
|
1327
|
+
| Error Type | Status Code | Content Type |
|
|
1328
|
+
| --------------- | --------------- | --------------- |
|
|
1329
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1330
|
+
|
|
1331
|
+
## patchCommerceInventory
|
|
1332
|
+
|
|
1333
|
+
Update an inventory
|
|
1334
|
+
|
|
1335
|
+
### Example Usage
|
|
1336
|
+
|
|
1337
|
+
```typescript
|
|
1338
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1339
|
+
|
|
1340
|
+
const unifiedTo = new UnifiedTo({
|
|
1341
|
+
security: {
|
|
1342
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1343
|
+
},
|
|
1344
|
+
});
|
|
1345
|
+
|
|
1346
|
+
async function run() {
|
|
1347
|
+
const result = await unifiedTo.commerce.patchCommerceInventory({
|
|
1348
|
+
connectionId: "<value>",
|
|
1349
|
+
id: "<id>",
|
|
1350
|
+
});
|
|
1351
|
+
|
|
1352
|
+
// Handle the result
|
|
1353
|
+
console.log(result);
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
run();
|
|
1357
|
+
```
|
|
1358
|
+
|
|
1359
|
+
### Standalone function
|
|
1360
|
+
|
|
1361
|
+
The standalone function version of this method:
|
|
1362
|
+
|
|
1363
|
+
```typescript
|
|
1364
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1365
|
+
import { commercePatchCommerceInventory } from "@unified-api/typescript-sdk/funcs/commercePatchCommerceInventory.js";
|
|
1366
|
+
|
|
1367
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1368
|
+
// You can create one instance of it to use across an application.
|
|
1369
|
+
const unifiedTo = new UnifiedToCore({
|
|
1370
|
+
security: {
|
|
1371
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1372
|
+
},
|
|
1373
|
+
});
|
|
1374
|
+
|
|
1375
|
+
async function run() {
|
|
1376
|
+
const res = await commercePatchCommerceInventory(unifiedTo, {
|
|
1377
|
+
connectionId: "<value>",
|
|
1378
|
+
id: "<id>",
|
|
1379
|
+
});
|
|
1380
|
+
|
|
1381
|
+
if (!res.ok) {
|
|
1382
|
+
throw res.error;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
const { value: result } = res;
|
|
1386
|
+
|
|
1387
|
+
// Handle the result
|
|
1388
|
+
console.log(result);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
run();
|
|
1392
|
+
```
|
|
1393
|
+
|
|
1394
|
+
### Parameters
|
|
1395
|
+
|
|
1396
|
+
| Parameter | Type | Required | Description |
|
|
1397
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1398
|
+
| `request` | [operations.PatchCommerceInventoryRequest](../../sdk/models/operations/patchcommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1399
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1400
|
+
| `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. |
|
|
1401
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1402
|
+
|
|
1403
|
+
### Response
|
|
1404
|
+
|
|
1405
|
+
**Promise\<[shared.CommerceInventory](../../sdk/models/shared/commerceinventory.md)\>**
|
|
1406
|
+
|
|
1407
|
+
### Errors
|
|
1408
|
+
|
|
1409
|
+
| Error Type | Status Code | Content Type |
|
|
1410
|
+
| --------------- | --------------- | --------------- |
|
|
1411
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1412
|
+
|
|
1413
|
+
## patchCommerceItem
|
|
1414
|
+
|
|
1415
|
+
Update an item
|
|
1416
|
+
|
|
1417
|
+
### Example Usage
|
|
1418
|
+
|
|
1419
|
+
```typescript
|
|
1420
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1421
|
+
|
|
1422
|
+
const unifiedTo = new UnifiedTo({
|
|
1423
|
+
security: {
|
|
1424
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1425
|
+
},
|
|
1426
|
+
});
|
|
1427
|
+
|
|
1428
|
+
async function run() {
|
|
1429
|
+
const result = await unifiedTo.commerce.patchCommerceItem({
|
|
1430
|
+
connectionId: "<value>",
|
|
1431
|
+
id: "<id>",
|
|
1432
|
+
});
|
|
1433
|
+
|
|
1434
|
+
// Handle the result
|
|
1435
|
+
console.log(result);
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
run();
|
|
1439
|
+
```
|
|
1440
|
+
|
|
1441
|
+
### Standalone function
|
|
1442
|
+
|
|
1443
|
+
The standalone function version of this method:
|
|
1444
|
+
|
|
1445
|
+
```typescript
|
|
1446
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1447
|
+
import { commercePatchCommerceItem } from "@unified-api/typescript-sdk/funcs/commercePatchCommerceItem.js";
|
|
1448
|
+
|
|
1449
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1450
|
+
// You can create one instance of it to use across an application.
|
|
1451
|
+
const unifiedTo = new UnifiedToCore({
|
|
1452
|
+
security: {
|
|
1453
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1454
|
+
},
|
|
1455
|
+
});
|
|
1456
|
+
|
|
1457
|
+
async function run() {
|
|
1458
|
+
const res = await commercePatchCommerceItem(unifiedTo, {
|
|
1459
|
+
connectionId: "<value>",
|
|
1460
|
+
id: "<id>",
|
|
1461
|
+
});
|
|
1462
|
+
|
|
1463
|
+
if (!res.ok) {
|
|
1464
|
+
throw res.error;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
const { value: result } = res;
|
|
1468
|
+
|
|
1469
|
+
// Handle the result
|
|
1470
|
+
console.log(result);
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
run();
|
|
1474
|
+
```
|
|
1475
|
+
|
|
1476
|
+
### Parameters
|
|
1477
|
+
|
|
1478
|
+
| Parameter | Type | Required | Description |
|
|
1479
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1480
|
+
| `request` | [operations.PatchCommerceItemRequest](../../sdk/models/operations/patchcommerceitemrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1481
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1482
|
+
| `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. |
|
|
1483
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1484
|
+
|
|
1485
|
+
### Response
|
|
1486
|
+
|
|
1487
|
+
**Promise\<[shared.CommerceItem](../../sdk/models/shared/commerceitem.md)\>**
|
|
1488
|
+
|
|
1489
|
+
### Errors
|
|
1490
|
+
|
|
1491
|
+
| Error Type | Status Code | Content Type |
|
|
1492
|
+
| --------------- | --------------- | --------------- |
|
|
1493
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1494
|
+
|
|
1495
|
+
## patchCommerceLocation
|
|
1496
|
+
|
|
1497
|
+
Update a location
|
|
1498
|
+
|
|
1499
|
+
### Example Usage
|
|
1500
|
+
|
|
1501
|
+
```typescript
|
|
1502
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1503
|
+
|
|
1504
|
+
const unifiedTo = new UnifiedTo({
|
|
1505
|
+
security: {
|
|
1506
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1507
|
+
},
|
|
1508
|
+
});
|
|
1509
|
+
|
|
1510
|
+
async function run() {
|
|
1511
|
+
const result = await unifiedTo.commerce.patchCommerceLocation({
|
|
1512
|
+
connectionId: "<value>",
|
|
1513
|
+
id: "<id>",
|
|
1514
|
+
});
|
|
1515
|
+
|
|
1516
|
+
// Handle the result
|
|
1517
|
+
console.log(result);
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
run();
|
|
1521
|
+
```
|
|
1522
|
+
|
|
1523
|
+
### Standalone function
|
|
1524
|
+
|
|
1525
|
+
The standalone function version of this method:
|
|
1526
|
+
|
|
1527
|
+
```typescript
|
|
1528
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1529
|
+
import { commercePatchCommerceLocation } from "@unified-api/typescript-sdk/funcs/commercePatchCommerceLocation.js";
|
|
1530
|
+
|
|
1531
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1532
|
+
// You can create one instance of it to use across an application.
|
|
1533
|
+
const unifiedTo = new UnifiedToCore({
|
|
1534
|
+
security: {
|
|
1535
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1536
|
+
},
|
|
1537
|
+
});
|
|
1538
|
+
|
|
1539
|
+
async function run() {
|
|
1540
|
+
const res = await commercePatchCommerceLocation(unifiedTo, {
|
|
1541
|
+
connectionId: "<value>",
|
|
1542
|
+
id: "<id>",
|
|
1543
|
+
});
|
|
1544
|
+
|
|
1545
|
+
if (!res.ok) {
|
|
1546
|
+
throw res.error;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
const { value: result } = res;
|
|
1550
|
+
|
|
1551
|
+
// Handle the result
|
|
1552
|
+
console.log(result);
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
run();
|
|
1556
|
+
```
|
|
1557
|
+
|
|
1558
|
+
### Parameters
|
|
1559
|
+
|
|
1560
|
+
| Parameter | Type | Required | Description |
|
|
1561
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1562
|
+
| `request` | [operations.PatchCommerceLocationRequest](../../sdk/models/operations/patchcommercelocationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1563
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1564
|
+
| `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. |
|
|
1565
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1566
|
+
|
|
1567
|
+
### Response
|
|
1568
|
+
|
|
1569
|
+
**Promise\<[shared.CommerceLocation](../../sdk/models/shared/commercelocation.md)\>**
|
|
1570
|
+
|
|
1571
|
+
### Errors
|
|
1572
|
+
|
|
1573
|
+
| Error Type | Status Code | Content Type |
|
|
1574
|
+
| --------------- | --------------- | --------------- |
|
|
1575
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1576
|
+
|
|
1577
|
+
## patchCommerceMetadata
|
|
1578
|
+
|
|
1579
|
+
Update a metadata
|
|
1580
|
+
|
|
1581
|
+
### Example Usage
|
|
1582
|
+
|
|
1583
|
+
```typescript
|
|
1584
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1585
|
+
|
|
1586
|
+
const unifiedTo = new UnifiedTo({
|
|
1587
|
+
security: {
|
|
1588
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1589
|
+
},
|
|
1590
|
+
});
|
|
1591
|
+
|
|
1592
|
+
async function run() {
|
|
1593
|
+
const result = await unifiedTo.commerce.patchCommerceMetadata({
|
|
1594
|
+
connectionId: "<id>",
|
|
1595
|
+
id: "<id>",
|
|
1596
|
+
});
|
|
1597
|
+
|
|
1598
|
+
// Handle the result
|
|
1599
|
+
console.log(result);
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
run();
|
|
1603
|
+
```
|
|
1604
|
+
|
|
1605
|
+
### Standalone function
|
|
1606
|
+
|
|
1607
|
+
The standalone function version of this method:
|
|
1608
|
+
|
|
1609
|
+
```typescript
|
|
1610
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1611
|
+
import { commercePatchCommerceMetadata } from "@unified-api/typescript-sdk/funcs/commercePatchCommerceMetadata.js";
|
|
1612
|
+
|
|
1613
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1614
|
+
// You can create one instance of it to use across an application.
|
|
1615
|
+
const unifiedTo = new UnifiedToCore({
|
|
1616
|
+
security: {
|
|
1617
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1618
|
+
},
|
|
1619
|
+
});
|
|
1620
|
+
|
|
1621
|
+
async function run() {
|
|
1622
|
+
const res = await commercePatchCommerceMetadata(unifiedTo, {
|
|
1623
|
+
connectionId: "<id>",
|
|
1624
|
+
id: "<id>",
|
|
1625
|
+
});
|
|
1626
|
+
|
|
1627
|
+
if (!res.ok) {
|
|
1628
|
+
throw res.error;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
const { value: result } = res;
|
|
1632
|
+
|
|
1633
|
+
// Handle the result
|
|
1634
|
+
console.log(result);
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
run();
|
|
1638
|
+
```
|
|
1639
|
+
|
|
1640
|
+
### Parameters
|
|
1641
|
+
|
|
1642
|
+
| Parameter | Type | Required | Description |
|
|
1643
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1644
|
+
| `request` | [operations.PatchCommerceMetadataRequest](../../sdk/models/operations/patchcommercemetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1645
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1646
|
+
| `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. |
|
|
1647
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1648
|
+
|
|
1649
|
+
### Response
|
|
1650
|
+
|
|
1651
|
+
**Promise\<[shared.CommerceMetadata](../../sdk/models/shared/commercemetadata.md)\>**
|
|
1652
|
+
|
|
1653
|
+
### Errors
|
|
1654
|
+
|
|
1655
|
+
| Error Type | Status Code | Content Type |
|
|
1656
|
+
| --------------- | --------------- | --------------- |
|
|
1657
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1658
|
+
|
|
1659
|
+
## removeCommerceCollection
|
|
1660
|
+
|
|
1661
|
+
Remove a collection
|
|
1662
|
+
|
|
1663
|
+
### Example Usage
|
|
1664
|
+
|
|
1665
|
+
```typescript
|
|
1666
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1667
|
+
|
|
1668
|
+
const unifiedTo = new UnifiedTo({
|
|
1669
|
+
security: {
|
|
1670
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1671
|
+
},
|
|
1672
|
+
});
|
|
1673
|
+
|
|
1674
|
+
async function run() {
|
|
1675
|
+
const result = await unifiedTo.commerce.removeCommerceCollection({
|
|
1676
|
+
connectionId: "<value>",
|
|
1677
|
+
id: "<id>",
|
|
1678
|
+
});
|
|
1679
|
+
|
|
1680
|
+
// Handle the result
|
|
1681
|
+
console.log(result);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
run();
|
|
1685
|
+
```
|
|
1686
|
+
|
|
1687
|
+
### Standalone function
|
|
1688
|
+
|
|
1689
|
+
The standalone function version of this method:
|
|
1690
|
+
|
|
1691
|
+
```typescript
|
|
1692
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1693
|
+
import { commerceRemoveCommerceCollection } from "@unified-api/typescript-sdk/funcs/commerceRemoveCommerceCollection.js";
|
|
1694
|
+
|
|
1695
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1696
|
+
// You can create one instance of it to use across an application.
|
|
1697
|
+
const unifiedTo = new UnifiedToCore({
|
|
1698
|
+
security: {
|
|
1699
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1700
|
+
},
|
|
1701
|
+
});
|
|
1702
|
+
|
|
1703
|
+
async function run() {
|
|
1704
|
+
const res = await commerceRemoveCommerceCollection(unifiedTo, {
|
|
1705
|
+
connectionId: "<value>",
|
|
1706
|
+
id: "<id>",
|
|
1707
|
+
});
|
|
1708
|
+
|
|
1709
|
+
if (!res.ok) {
|
|
1710
|
+
throw res.error;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
const { value: result } = res;
|
|
1714
|
+
|
|
1715
|
+
// Handle the result
|
|
1716
|
+
console.log(result);
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
run();
|
|
1720
|
+
```
|
|
1721
|
+
|
|
1722
|
+
### Parameters
|
|
1723
|
+
|
|
1724
|
+
| Parameter | Type | Required | Description |
|
|
1725
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1726
|
+
| `request` | [operations.RemoveCommerceCollectionRequest](../../sdk/models/operations/removecommercecollectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1727
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1728
|
+
| `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. |
|
|
1729
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1730
|
+
|
|
1731
|
+
### Response
|
|
1732
|
+
|
|
1733
|
+
**Promise\<[operations.RemoveCommerceCollectionResponse](../../sdk/models/operations/removecommercecollectionresponse.md)\>**
|
|
1734
|
+
|
|
1735
|
+
### Errors
|
|
1736
|
+
|
|
1737
|
+
| Error Type | Status Code | Content Type |
|
|
1738
|
+
| --------------- | --------------- | --------------- |
|
|
1739
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1740
|
+
|
|
1741
|
+
## removeCommerceInventory
|
|
1742
|
+
|
|
1743
|
+
Remove an inventory
|
|
1744
|
+
|
|
1745
|
+
### Example Usage
|
|
1746
|
+
|
|
1747
|
+
```typescript
|
|
1748
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1749
|
+
|
|
1750
|
+
const unifiedTo = new UnifiedTo({
|
|
1751
|
+
security: {
|
|
1752
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1753
|
+
},
|
|
1754
|
+
});
|
|
1755
|
+
|
|
1756
|
+
async function run() {
|
|
1757
|
+
const result = await unifiedTo.commerce.removeCommerceInventory({
|
|
1758
|
+
connectionId: "<value>",
|
|
1759
|
+
id: "<id>",
|
|
1760
|
+
});
|
|
1761
|
+
|
|
1762
|
+
// Handle the result
|
|
1763
|
+
console.log(result);
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
run();
|
|
1767
|
+
```
|
|
1768
|
+
|
|
1769
|
+
### Standalone function
|
|
1770
|
+
|
|
1771
|
+
The standalone function version of this method:
|
|
1772
|
+
|
|
1773
|
+
```typescript
|
|
1774
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1775
|
+
import { commerceRemoveCommerceInventory } from "@unified-api/typescript-sdk/funcs/commerceRemoveCommerceInventory.js";
|
|
1776
|
+
|
|
1777
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1778
|
+
// You can create one instance of it to use across an application.
|
|
1779
|
+
const unifiedTo = new UnifiedToCore({
|
|
1780
|
+
security: {
|
|
1781
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1782
|
+
},
|
|
1783
|
+
});
|
|
1784
|
+
|
|
1785
|
+
async function run() {
|
|
1786
|
+
const res = await commerceRemoveCommerceInventory(unifiedTo, {
|
|
1787
|
+
connectionId: "<value>",
|
|
1788
|
+
id: "<id>",
|
|
1789
|
+
});
|
|
1790
|
+
|
|
1791
|
+
if (!res.ok) {
|
|
1792
|
+
throw res.error;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
const { value: result } = res;
|
|
1796
|
+
|
|
1797
|
+
// Handle the result
|
|
1798
|
+
console.log(result);
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
run();
|
|
1802
|
+
```
|
|
1803
|
+
|
|
1804
|
+
### Parameters
|
|
1805
|
+
|
|
1806
|
+
| Parameter | Type | Required | Description |
|
|
1807
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1808
|
+
| `request` | [operations.RemoveCommerceInventoryRequest](../../sdk/models/operations/removecommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1809
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1810
|
+
| `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. |
|
|
1811
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1812
|
+
|
|
1813
|
+
### Response
|
|
1814
|
+
|
|
1815
|
+
**Promise\<[operations.RemoveCommerceInventoryResponse](../../sdk/models/operations/removecommerceinventoryresponse.md)\>**
|
|
1816
|
+
|
|
1817
|
+
### Errors
|
|
1818
|
+
|
|
1819
|
+
| Error Type | Status Code | Content Type |
|
|
1820
|
+
| --------------- | --------------- | --------------- |
|
|
1821
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1822
|
+
|
|
1823
|
+
## removeCommerceItem
|
|
1824
|
+
|
|
1825
|
+
Remove an item
|
|
1826
|
+
|
|
1827
|
+
### Example Usage
|
|
1828
|
+
|
|
1829
|
+
```typescript
|
|
1830
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1831
|
+
|
|
1832
|
+
const unifiedTo = new UnifiedTo({
|
|
1833
|
+
security: {
|
|
1834
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1835
|
+
},
|
|
1836
|
+
});
|
|
1837
|
+
|
|
1838
|
+
async function run() {
|
|
1839
|
+
const result = await unifiedTo.commerce.removeCommerceItem({
|
|
1840
|
+
connectionId: "<value>",
|
|
1841
|
+
id: "<id>",
|
|
1842
|
+
});
|
|
1843
|
+
|
|
1844
|
+
// Handle the result
|
|
1845
|
+
console.log(result);
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
run();
|
|
1849
|
+
```
|
|
1850
|
+
|
|
1851
|
+
### Standalone function
|
|
1852
|
+
|
|
1853
|
+
The standalone function version of this method:
|
|
1854
|
+
|
|
1855
|
+
```typescript
|
|
1856
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1857
|
+
import { commerceRemoveCommerceItem } from "@unified-api/typescript-sdk/funcs/commerceRemoveCommerceItem.js";
|
|
1858
|
+
|
|
1859
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1860
|
+
// You can create one instance of it to use across an application.
|
|
1861
|
+
const unifiedTo = new UnifiedToCore({
|
|
1862
|
+
security: {
|
|
1863
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1864
|
+
},
|
|
1865
|
+
});
|
|
1866
|
+
|
|
1867
|
+
async function run() {
|
|
1868
|
+
const res = await commerceRemoveCommerceItem(unifiedTo, {
|
|
1869
|
+
connectionId: "<value>",
|
|
1870
|
+
id: "<id>",
|
|
1871
|
+
});
|
|
1872
|
+
|
|
1873
|
+
if (!res.ok) {
|
|
1874
|
+
throw res.error;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
const { value: result } = res;
|
|
1878
|
+
|
|
1879
|
+
// Handle the result
|
|
1880
|
+
console.log(result);
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
run();
|
|
1884
|
+
```
|
|
1885
|
+
|
|
1886
|
+
### Parameters
|
|
1887
|
+
|
|
1888
|
+
| Parameter | Type | Required | Description |
|
|
1889
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1890
|
+
| `request` | [operations.RemoveCommerceItemRequest](../../sdk/models/operations/removecommerceitemrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1891
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1892
|
+
| `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. |
|
|
1893
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1894
|
+
|
|
1895
|
+
### Response
|
|
1896
|
+
|
|
1897
|
+
**Promise\<[operations.RemoveCommerceItemResponse](../../sdk/models/operations/removecommerceitemresponse.md)\>**
|
|
1898
|
+
|
|
1899
|
+
### Errors
|
|
1900
|
+
|
|
1901
|
+
| Error Type | Status Code | Content Type |
|
|
1902
|
+
| --------------- | --------------- | --------------- |
|
|
1903
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1904
|
+
|
|
1905
|
+
## removeCommerceLocation
|
|
1906
|
+
|
|
1907
|
+
Remove a location
|
|
1908
|
+
|
|
1909
|
+
### Example Usage
|
|
1910
|
+
|
|
1911
|
+
```typescript
|
|
1912
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1913
|
+
|
|
1914
|
+
const unifiedTo = new UnifiedTo({
|
|
1915
|
+
security: {
|
|
1916
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1917
|
+
},
|
|
1918
|
+
});
|
|
1919
|
+
|
|
1920
|
+
async function run() {
|
|
1921
|
+
const result = await unifiedTo.commerce.removeCommerceLocation({
|
|
1922
|
+
connectionId: "<value>",
|
|
1923
|
+
id: "<id>",
|
|
1924
|
+
});
|
|
1925
|
+
|
|
1926
|
+
// Handle the result
|
|
1927
|
+
console.log(result);
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
run();
|
|
1931
|
+
```
|
|
1932
|
+
|
|
1933
|
+
### Standalone function
|
|
1934
|
+
|
|
1935
|
+
The standalone function version of this method:
|
|
1936
|
+
|
|
1937
|
+
```typescript
|
|
1938
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
1939
|
+
import { commerceRemoveCommerceLocation } from "@unified-api/typescript-sdk/funcs/commerceRemoveCommerceLocation.js";
|
|
1940
|
+
|
|
1941
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
1942
|
+
// You can create one instance of it to use across an application.
|
|
1943
|
+
const unifiedTo = new UnifiedToCore({
|
|
1944
|
+
security: {
|
|
1945
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1946
|
+
},
|
|
1947
|
+
});
|
|
1948
|
+
|
|
1949
|
+
async function run() {
|
|
1950
|
+
const res = await commerceRemoveCommerceLocation(unifiedTo, {
|
|
1951
|
+
connectionId: "<value>",
|
|
1952
|
+
id: "<id>",
|
|
1953
|
+
});
|
|
1954
|
+
|
|
1955
|
+
if (!res.ok) {
|
|
1956
|
+
throw res.error;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
const { value: result } = res;
|
|
1960
|
+
|
|
1961
|
+
// Handle the result
|
|
1962
|
+
console.log(result);
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
run();
|
|
1966
|
+
```
|
|
1967
|
+
|
|
1968
|
+
### Parameters
|
|
1969
|
+
|
|
1970
|
+
| Parameter | Type | Required | Description |
|
|
1971
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1972
|
+
| `request` | [operations.RemoveCommerceLocationRequest](../../sdk/models/operations/removecommercelocationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1973
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1974
|
+
| `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. |
|
|
1975
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1976
|
+
|
|
1977
|
+
### Response
|
|
1978
|
+
|
|
1979
|
+
**Promise\<[operations.RemoveCommerceLocationResponse](../../sdk/models/operations/removecommercelocationresponse.md)\>**
|
|
1980
|
+
|
|
1981
|
+
### Errors
|
|
1982
|
+
|
|
1983
|
+
| Error Type | Status Code | Content Type |
|
|
1984
|
+
| --------------- | --------------- | --------------- |
|
|
1985
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
1986
|
+
|
|
1987
|
+
## removeCommerceMetadata
|
|
1988
|
+
|
|
1989
|
+
Remove a metadata
|
|
1990
|
+
|
|
1991
|
+
### Example Usage
|
|
1992
|
+
|
|
1993
|
+
```typescript
|
|
1994
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
1995
|
+
|
|
1996
|
+
const unifiedTo = new UnifiedTo({
|
|
1997
|
+
security: {
|
|
1998
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
1999
|
+
},
|
|
2000
|
+
});
|
|
2001
|
+
|
|
2002
|
+
async function run() {
|
|
2003
|
+
const result = await unifiedTo.commerce.removeCommerceMetadata({
|
|
2004
|
+
connectionId: "<id>",
|
|
2005
|
+
id: "<id>",
|
|
2006
|
+
});
|
|
2007
|
+
|
|
2008
|
+
// Handle the result
|
|
2009
|
+
console.log(result);
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
run();
|
|
2013
|
+
```
|
|
2014
|
+
|
|
2015
|
+
### Standalone function
|
|
2016
|
+
|
|
2017
|
+
The standalone function version of this method:
|
|
2018
|
+
|
|
2019
|
+
```typescript
|
|
2020
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
2021
|
+
import { commerceRemoveCommerceMetadata } from "@unified-api/typescript-sdk/funcs/commerceRemoveCommerceMetadata.js";
|
|
2022
|
+
|
|
2023
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
2024
|
+
// You can create one instance of it to use across an application.
|
|
2025
|
+
const unifiedTo = new UnifiedToCore({
|
|
2026
|
+
security: {
|
|
2027
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2028
|
+
},
|
|
2029
|
+
});
|
|
2030
|
+
|
|
2031
|
+
async function run() {
|
|
2032
|
+
const res = await commerceRemoveCommerceMetadata(unifiedTo, {
|
|
2033
|
+
connectionId: "<id>",
|
|
2034
|
+
id: "<id>",
|
|
2035
|
+
});
|
|
2036
|
+
|
|
2037
|
+
if (!res.ok) {
|
|
2038
|
+
throw res.error;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
const { value: result } = res;
|
|
2042
|
+
|
|
2043
|
+
// Handle the result
|
|
2044
|
+
console.log(result);
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
run();
|
|
2048
|
+
```
|
|
2049
|
+
|
|
2050
|
+
### Parameters
|
|
2051
|
+
|
|
2052
|
+
| Parameter | Type | Required | Description |
|
|
2053
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2054
|
+
| `request` | [operations.RemoveCommerceMetadataRequest](../../sdk/models/operations/removecommercemetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
2055
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
2056
|
+
| `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. |
|
|
2057
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
2058
|
+
|
|
2059
|
+
### Response
|
|
2060
|
+
|
|
2061
|
+
**Promise\<[operations.RemoveCommerceMetadataResponse](../../sdk/models/operations/removecommercemetadataresponse.md)\>**
|
|
2062
|
+
|
|
2063
|
+
### Errors
|
|
2064
|
+
|
|
2065
|
+
| Error Type | Status Code | Content Type |
|
|
2066
|
+
| --------------- | --------------- | --------------- |
|
|
2067
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
2068
|
+
|
|
2069
|
+
## updateCommerceCollection
|
|
2070
|
+
|
|
2071
|
+
Update a collection
|
|
2072
|
+
|
|
2073
|
+
### Example Usage
|
|
2074
|
+
|
|
2075
|
+
```typescript
|
|
2076
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
2077
|
+
|
|
2078
|
+
const unifiedTo = new UnifiedTo({
|
|
2079
|
+
security: {
|
|
2080
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2081
|
+
},
|
|
2082
|
+
});
|
|
2083
|
+
|
|
2084
|
+
async function run() {
|
|
2085
|
+
const result = await unifiedTo.commerce.updateCommerceCollection({
|
|
2086
|
+
connectionId: "<value>",
|
|
2087
|
+
id: "<id>",
|
|
2088
|
+
});
|
|
2089
|
+
|
|
2090
|
+
// Handle the result
|
|
2091
|
+
console.log(result);
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
run();
|
|
2095
|
+
```
|
|
2096
|
+
|
|
2097
|
+
### Standalone function
|
|
2098
|
+
|
|
2099
|
+
The standalone function version of this method:
|
|
2100
|
+
|
|
2101
|
+
```typescript
|
|
2102
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
2103
|
+
import { commerceUpdateCommerceCollection } from "@unified-api/typescript-sdk/funcs/commerceUpdateCommerceCollection.js";
|
|
2104
|
+
|
|
2105
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
2106
|
+
// You can create one instance of it to use across an application.
|
|
2107
|
+
const unifiedTo = new UnifiedToCore({
|
|
2108
|
+
security: {
|
|
2109
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2110
|
+
},
|
|
2111
|
+
});
|
|
2112
|
+
|
|
2113
|
+
async function run() {
|
|
2114
|
+
const res = await commerceUpdateCommerceCollection(unifiedTo, {
|
|
2115
|
+
connectionId: "<value>",
|
|
2116
|
+
id: "<id>",
|
|
2117
|
+
});
|
|
2118
|
+
|
|
2119
|
+
if (!res.ok) {
|
|
2120
|
+
throw res.error;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
const { value: result } = res;
|
|
2124
|
+
|
|
2125
|
+
// Handle the result
|
|
2126
|
+
console.log(result);
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
run();
|
|
2130
|
+
```
|
|
2131
|
+
|
|
2132
|
+
### Parameters
|
|
2133
|
+
|
|
2134
|
+
| Parameter | Type | Required | Description |
|
|
2135
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2136
|
+
| `request` | [operations.UpdateCommerceCollectionRequest](../../sdk/models/operations/updatecommercecollectionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
2137
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
2138
|
+
| `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. |
|
|
2139
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
2140
|
+
|
|
2141
|
+
### Response
|
|
2142
|
+
|
|
2143
|
+
**Promise\<[shared.CommerceCollection](../../sdk/models/shared/commercecollection.md)\>**
|
|
2144
|
+
|
|
2145
|
+
### Errors
|
|
2146
|
+
|
|
2147
|
+
| Error Type | Status Code | Content Type |
|
|
2148
|
+
| --------------- | --------------- | --------------- |
|
|
2149
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
2150
|
+
|
|
2151
|
+
## updateCommerceInventory
|
|
2152
|
+
|
|
2153
|
+
Update an inventory
|
|
2154
|
+
|
|
2155
|
+
### Example Usage
|
|
2156
|
+
|
|
2157
|
+
```typescript
|
|
2158
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
2159
|
+
|
|
2160
|
+
const unifiedTo = new UnifiedTo({
|
|
2161
|
+
security: {
|
|
2162
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2163
|
+
},
|
|
2164
|
+
});
|
|
2165
|
+
|
|
2166
|
+
async function run() {
|
|
2167
|
+
const result = await unifiedTo.commerce.updateCommerceInventory({
|
|
2168
|
+
connectionId: "<value>",
|
|
2169
|
+
id: "<id>",
|
|
2170
|
+
});
|
|
2171
|
+
|
|
2172
|
+
// Handle the result
|
|
2173
|
+
console.log(result);
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
run();
|
|
2177
|
+
```
|
|
2178
|
+
|
|
2179
|
+
### Standalone function
|
|
2180
|
+
|
|
2181
|
+
The standalone function version of this method:
|
|
2182
|
+
|
|
2183
|
+
```typescript
|
|
2184
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
2185
|
+
import { commerceUpdateCommerceInventory } from "@unified-api/typescript-sdk/funcs/commerceUpdateCommerceInventory.js";
|
|
2186
|
+
|
|
2187
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
2188
|
+
// You can create one instance of it to use across an application.
|
|
2189
|
+
const unifiedTo = new UnifiedToCore({
|
|
2190
|
+
security: {
|
|
2191
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2192
|
+
},
|
|
2193
|
+
});
|
|
2194
|
+
|
|
2195
|
+
async function run() {
|
|
2196
|
+
const res = await commerceUpdateCommerceInventory(unifiedTo, {
|
|
2197
|
+
connectionId: "<value>",
|
|
2198
|
+
id: "<id>",
|
|
2199
|
+
});
|
|
2200
|
+
|
|
2201
|
+
if (!res.ok) {
|
|
2202
|
+
throw res.error;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
const { value: result } = res;
|
|
2206
|
+
|
|
2207
|
+
// Handle the result
|
|
2208
|
+
console.log(result);
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
run();
|
|
2212
|
+
```
|
|
2213
|
+
|
|
2214
|
+
### Parameters
|
|
2215
|
+
|
|
2216
|
+
| Parameter | Type | Required | Description |
|
|
2217
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2218
|
+
| `request` | [operations.UpdateCommerceInventoryRequest](../../sdk/models/operations/updatecommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
2219
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
2220
|
+
| `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. |
|
|
2221
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
2222
|
+
|
|
2223
|
+
### Response
|
|
2224
|
+
|
|
2225
|
+
**Promise\<[shared.CommerceInventory](../../sdk/models/shared/commerceinventory.md)\>**
|
|
2226
|
+
|
|
2227
|
+
### Errors
|
|
2228
|
+
|
|
2229
|
+
| Error Type | Status Code | Content Type |
|
|
2230
|
+
| --------------- | --------------- | --------------- |
|
|
2231
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
2232
|
+
|
|
2233
|
+
## updateCommerceItem
|
|
2234
|
+
|
|
2235
|
+
Update an item
|
|
2236
|
+
|
|
2237
|
+
### Example Usage
|
|
2238
|
+
|
|
2239
|
+
```typescript
|
|
2240
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
2241
|
+
|
|
2242
|
+
const unifiedTo = new UnifiedTo({
|
|
2243
|
+
security: {
|
|
2244
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2245
|
+
},
|
|
2246
|
+
});
|
|
2247
|
+
|
|
2248
|
+
async function run() {
|
|
2249
|
+
const result = await unifiedTo.commerce.updateCommerceItem({
|
|
2250
|
+
connectionId: "<value>",
|
|
2251
|
+
id: "<id>",
|
|
2252
|
+
});
|
|
2253
|
+
|
|
2254
|
+
// Handle the result
|
|
2255
|
+
console.log(result);
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
run();
|
|
2259
|
+
```
|
|
2260
|
+
|
|
2261
|
+
### Standalone function
|
|
2262
|
+
|
|
2263
|
+
The standalone function version of this method:
|
|
2264
|
+
|
|
2265
|
+
```typescript
|
|
2266
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
2267
|
+
import { commerceUpdateCommerceItem } from "@unified-api/typescript-sdk/funcs/commerceUpdateCommerceItem.js";
|
|
2268
|
+
|
|
2269
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
2270
|
+
// You can create one instance of it to use across an application.
|
|
2271
|
+
const unifiedTo = new UnifiedToCore({
|
|
2272
|
+
security: {
|
|
2273
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2274
|
+
},
|
|
2275
|
+
});
|
|
2276
|
+
|
|
2277
|
+
async function run() {
|
|
2278
|
+
const res = await commerceUpdateCommerceItem(unifiedTo, {
|
|
2279
|
+
connectionId: "<value>",
|
|
2280
|
+
id: "<id>",
|
|
2281
|
+
});
|
|
2282
|
+
|
|
2283
|
+
if (!res.ok) {
|
|
2284
|
+
throw res.error;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
const { value: result } = res;
|
|
2288
|
+
|
|
2289
|
+
// Handle the result
|
|
2290
|
+
console.log(result);
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
run();
|
|
2294
|
+
```
|
|
2295
|
+
|
|
2296
|
+
### Parameters
|
|
2297
|
+
|
|
2298
|
+
| Parameter | Type | Required | Description |
|
|
2299
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2300
|
+
| `request` | [operations.UpdateCommerceItemRequest](../../sdk/models/operations/updatecommerceitemrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
2301
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
2302
|
+
| `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. |
|
|
2303
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
2304
|
+
|
|
2305
|
+
### Response
|
|
2306
|
+
|
|
2307
|
+
**Promise\<[shared.CommerceItem](../../sdk/models/shared/commerceitem.md)\>**
|
|
2308
|
+
|
|
2309
|
+
### Errors
|
|
2310
|
+
|
|
2311
|
+
| Error Type | Status Code | Content Type |
|
|
2312
|
+
| --------------- | --------------- | --------------- |
|
|
2313
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
2314
|
+
|
|
2315
|
+
## updateCommerceLocation
|
|
2316
|
+
|
|
2317
|
+
Update a location
|
|
2318
|
+
|
|
2319
|
+
### Example Usage
|
|
2320
|
+
|
|
2321
|
+
```typescript
|
|
2322
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
2323
|
+
|
|
2324
|
+
const unifiedTo = new UnifiedTo({
|
|
2325
|
+
security: {
|
|
2326
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2327
|
+
},
|
|
2328
|
+
});
|
|
2329
|
+
|
|
2330
|
+
async function run() {
|
|
2331
|
+
const result = await unifiedTo.commerce.updateCommerceLocation({
|
|
2332
|
+
connectionId: "<value>",
|
|
2333
|
+
id: "<id>",
|
|
2334
|
+
});
|
|
2335
|
+
|
|
2336
|
+
// Handle the result
|
|
2337
|
+
console.log(result);
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
run();
|
|
2341
|
+
```
|
|
2342
|
+
|
|
2343
|
+
### Standalone function
|
|
2344
|
+
|
|
2345
|
+
The standalone function version of this method:
|
|
2346
|
+
|
|
2347
|
+
```typescript
|
|
2348
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
2349
|
+
import { commerceUpdateCommerceLocation } from "@unified-api/typescript-sdk/funcs/commerceUpdateCommerceLocation.js";
|
|
2350
|
+
|
|
2351
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
2352
|
+
// You can create one instance of it to use across an application.
|
|
2353
|
+
const unifiedTo = new UnifiedToCore({
|
|
2354
|
+
security: {
|
|
2355
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2356
|
+
},
|
|
2357
|
+
});
|
|
2358
|
+
|
|
2359
|
+
async function run() {
|
|
2360
|
+
const res = await commerceUpdateCommerceLocation(unifiedTo, {
|
|
2361
|
+
connectionId: "<value>",
|
|
2362
|
+
id: "<id>",
|
|
2363
|
+
});
|
|
2364
|
+
|
|
2365
|
+
if (!res.ok) {
|
|
2366
|
+
throw res.error;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
const { value: result } = res;
|
|
2370
|
+
|
|
2371
|
+
// Handle the result
|
|
2372
|
+
console.log(result);
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
run();
|
|
2376
|
+
```
|
|
2377
|
+
|
|
2378
|
+
### Parameters
|
|
2379
|
+
|
|
2380
|
+
| Parameter | Type | Required | Description |
|
|
2381
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2382
|
+
| `request` | [operations.UpdateCommerceLocationRequest](../../sdk/models/operations/updatecommercelocationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
2383
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
2384
|
+
| `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. |
|
|
2385
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
2386
|
+
|
|
2387
|
+
### Response
|
|
2388
|
+
|
|
2389
|
+
**Promise\<[shared.CommerceLocation](../../sdk/models/shared/commercelocation.md)\>**
|
|
2390
|
+
|
|
2391
|
+
### Errors
|
|
2392
|
+
|
|
2393
|
+
| Error Type | Status Code | Content Type |
|
|
2394
|
+
| --------------- | --------------- | --------------- |
|
|
2395
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
2396
|
+
|
|
2397
|
+
## updateCommerceMetadata
|
|
2398
|
+
|
|
2399
|
+
Update a metadata
|
|
2400
|
+
|
|
2401
|
+
### Example Usage
|
|
2402
|
+
|
|
2403
|
+
```typescript
|
|
2404
|
+
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
2405
|
+
|
|
2406
|
+
const unifiedTo = new UnifiedTo({
|
|
2407
|
+
security: {
|
|
2408
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2409
|
+
},
|
|
2410
|
+
});
|
|
2411
|
+
|
|
2412
|
+
async function run() {
|
|
2413
|
+
const result = await unifiedTo.commerce.updateCommerceMetadata({
|
|
2414
|
+
connectionId: "<id>",
|
|
2415
|
+
id: "<id>",
|
|
2416
|
+
});
|
|
2417
|
+
|
|
2418
|
+
// Handle the result
|
|
2419
|
+
console.log(result);
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
run();
|
|
2423
|
+
```
|
|
2424
|
+
|
|
2425
|
+
### Standalone function
|
|
2426
|
+
|
|
2427
|
+
The standalone function version of this method:
|
|
2428
|
+
|
|
2429
|
+
```typescript
|
|
2430
|
+
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
2431
|
+
import { commerceUpdateCommerceMetadata } from "@unified-api/typescript-sdk/funcs/commerceUpdateCommerceMetadata.js";
|
|
2432
|
+
|
|
2433
|
+
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
2434
|
+
// You can create one instance of it to use across an application.
|
|
2435
|
+
const unifiedTo = new UnifiedToCore({
|
|
2436
|
+
security: {
|
|
2437
|
+
jwt: "<YOUR_API_KEY_HERE>",
|
|
2438
|
+
},
|
|
2439
|
+
});
|
|
2440
|
+
|
|
2441
|
+
async function run() {
|
|
2442
|
+
const res = await commerceUpdateCommerceMetadata(unifiedTo, {
|
|
2443
|
+
connectionId: "<id>",
|
|
2444
|
+
id: "<id>",
|
|
2445
|
+
});
|
|
2446
|
+
|
|
2447
|
+
if (!res.ok) {
|
|
2448
|
+
throw res.error;
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
const { value: result } = res;
|
|
2452
|
+
|
|
2453
|
+
// Handle the result
|
|
2454
|
+
console.log(result);
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
run();
|
|
2458
|
+
```
|
|
2459
|
+
|
|
2460
|
+
### Parameters
|
|
2461
|
+
|
|
2462
|
+
| Parameter | Type | Required | Description |
|
|
2463
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2464
|
+
| `request` | [operations.UpdateCommerceMetadataRequest](../../sdk/models/operations/updatecommercemetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
2465
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
2466
|
+
| `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. |
|
|
2467
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
2468
|
+
|
|
2469
|
+
### Response
|
|
2470
|
+
|
|
2471
|
+
**Promise\<[shared.CommerceMetadata](../../sdk/models/shared/commercemetadata.md)\>**
|
|
2472
|
+
|
|
2473
|
+
### Errors
|
|
2474
|
+
|
|
2475
|
+
| Error Type | Status Code | Content Type |
|
|
2476
|
+
| --------------- | --------------- | --------------- |
|
|
2477
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|