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