@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,501 +0,0 @@
|
|
|
1
|
-
# Inventory
|
|
2
|
-
(*inventory*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [createCommerceInventory](#createcommerceinventory) - Create an inventory
|
|
9
|
-
* [getCommerceInventory](#getcommerceinventory) - Retrieve an inventory
|
|
10
|
-
* [listCommerceInventories](#listcommerceinventories) - List all inventories
|
|
11
|
-
* [patchCommerceInventory](#patchcommerceinventory) - Update an inventory
|
|
12
|
-
* [removeCommerceInventory](#removecommerceinventory) - Remove an inventory
|
|
13
|
-
* [updateCommerceInventory](#updatecommerceinventory) - Update an inventory
|
|
14
|
-
|
|
15
|
-
## createCommerceInventory
|
|
16
|
-
|
|
17
|
-
Create an inventory
|
|
18
|
-
|
|
19
|
-
### Example Usage
|
|
20
|
-
|
|
21
|
-
<!-- UsageSnippet language="typescript" operationID="createCommerceInventory" method="post" path="/commerce/{connection_id}/inventory" -->
|
|
22
|
-
```typescript
|
|
23
|
-
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
24
|
-
|
|
25
|
-
const unifiedTo = new UnifiedTo({
|
|
26
|
-
security: {
|
|
27
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
async function run() {
|
|
32
|
-
const result = await unifiedTo.inventory.createCommerceInventory({
|
|
33
|
-
commerceInventory: {
|
|
34
|
-
available: 7463.62,
|
|
35
|
-
},
|
|
36
|
-
connectionId: "<id>",
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
console.log(result);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
run();
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Standalone function
|
|
46
|
-
|
|
47
|
-
The standalone function version of this method:
|
|
48
|
-
|
|
49
|
-
```typescript
|
|
50
|
-
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
51
|
-
import { commerceCreateCommerceInventory } from "@unified-api/typescript-sdk/funcs/commerceCreateCommerceInventory.js";
|
|
52
|
-
|
|
53
|
-
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
54
|
-
// You can create one instance of it to use across an application.
|
|
55
|
-
const unifiedTo = new UnifiedToCore({
|
|
56
|
-
security: {
|
|
57
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
async function run() {
|
|
62
|
-
const res = await commerceCreateCommerceInventory(unifiedTo, {
|
|
63
|
-
commerceInventory: {
|
|
64
|
-
available: 7463.62,
|
|
65
|
-
},
|
|
66
|
-
connectionId: "<id>",
|
|
67
|
-
});
|
|
68
|
-
if (res.ok) {
|
|
69
|
-
const { value: result } = res;
|
|
70
|
-
console.log(result);
|
|
71
|
-
} else {
|
|
72
|
-
console.log("commerceCreateCommerceInventory failed:", res.error);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
run();
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Parameters
|
|
80
|
-
|
|
81
|
-
| Parameter | Type | Required | Description |
|
|
82
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
83
|
-
| `request` | [operations.CreateCommerceInventoryRequest](../../sdk/models/operations/createcommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
84
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
85
|
-
| `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. |
|
|
86
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
87
|
-
|
|
88
|
-
### Response
|
|
89
|
-
|
|
90
|
-
**Promise\<[shared.CommerceInventory](../../sdk/models/shared/commerceinventory.md)\>**
|
|
91
|
-
|
|
92
|
-
### Errors
|
|
93
|
-
|
|
94
|
-
| Error Type | Status Code | Content Type |
|
|
95
|
-
| --------------- | --------------- | --------------- |
|
|
96
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
97
|
-
|
|
98
|
-
## getCommerceInventory
|
|
99
|
-
|
|
100
|
-
Retrieve an inventory
|
|
101
|
-
|
|
102
|
-
### Example Usage
|
|
103
|
-
|
|
104
|
-
<!-- UsageSnippet language="typescript" operationID="getCommerceInventory" method="get" path="/commerce/{connection_id}/inventory/{id}" -->
|
|
105
|
-
```typescript
|
|
106
|
-
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
107
|
-
|
|
108
|
-
const unifiedTo = new UnifiedTo({
|
|
109
|
-
security: {
|
|
110
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
async function run() {
|
|
115
|
-
const result = await unifiedTo.inventory.getCommerceInventory({
|
|
116
|
-
connectionId: "<id>",
|
|
117
|
-
id: "<id>",
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
console.log(result);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
run();
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Standalone function
|
|
127
|
-
|
|
128
|
-
The standalone function version of this method:
|
|
129
|
-
|
|
130
|
-
```typescript
|
|
131
|
-
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
132
|
-
import { commerceGetCommerceInventory } from "@unified-api/typescript-sdk/funcs/commerceGetCommerceInventory.js";
|
|
133
|
-
|
|
134
|
-
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
135
|
-
// You can create one instance of it to use across an application.
|
|
136
|
-
const unifiedTo = new UnifiedToCore({
|
|
137
|
-
security: {
|
|
138
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
async function run() {
|
|
143
|
-
const res = await commerceGetCommerceInventory(unifiedTo, {
|
|
144
|
-
connectionId: "<id>",
|
|
145
|
-
id: "<id>",
|
|
146
|
-
});
|
|
147
|
-
if (res.ok) {
|
|
148
|
-
const { value: result } = res;
|
|
149
|
-
console.log(result);
|
|
150
|
-
} else {
|
|
151
|
-
console.log("commerceGetCommerceInventory failed:", res.error);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
run();
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Parameters
|
|
159
|
-
|
|
160
|
-
| Parameter | Type | Required | Description |
|
|
161
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
162
|
-
| `request` | [operations.GetCommerceInventoryRequest](../../sdk/models/operations/getcommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
163
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
164
|
-
| `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. |
|
|
165
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
166
|
-
|
|
167
|
-
### Response
|
|
168
|
-
|
|
169
|
-
**Promise\<[shared.CommerceInventory](../../sdk/models/shared/commerceinventory.md)\>**
|
|
170
|
-
|
|
171
|
-
### Errors
|
|
172
|
-
|
|
173
|
-
| Error Type | Status Code | Content Type |
|
|
174
|
-
| --------------- | --------------- | --------------- |
|
|
175
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
176
|
-
|
|
177
|
-
## listCommerceInventories
|
|
178
|
-
|
|
179
|
-
List all inventories
|
|
180
|
-
|
|
181
|
-
### Example Usage
|
|
182
|
-
|
|
183
|
-
<!-- UsageSnippet language="typescript" operationID="listCommerceInventories" method="get" path="/commerce/{connection_id}/inventory" -->
|
|
184
|
-
```typescript
|
|
185
|
-
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
186
|
-
|
|
187
|
-
const unifiedTo = new UnifiedTo({
|
|
188
|
-
security: {
|
|
189
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
190
|
-
},
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
async function run() {
|
|
194
|
-
const result = await unifiedTo.inventory.listCommerceInventories({
|
|
195
|
-
connectionId: "<id>",
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
console.log(result);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
run();
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### Standalone function
|
|
205
|
-
|
|
206
|
-
The standalone function version of this method:
|
|
207
|
-
|
|
208
|
-
```typescript
|
|
209
|
-
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
210
|
-
import { commerceListCommerceInventories } from "@unified-api/typescript-sdk/funcs/commerceListCommerceInventories.js";
|
|
211
|
-
|
|
212
|
-
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
213
|
-
// You can create one instance of it to use across an application.
|
|
214
|
-
const unifiedTo = new UnifiedToCore({
|
|
215
|
-
security: {
|
|
216
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
217
|
-
},
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
async function run() {
|
|
221
|
-
const res = await commerceListCommerceInventories(unifiedTo, {
|
|
222
|
-
connectionId: "<id>",
|
|
223
|
-
});
|
|
224
|
-
if (res.ok) {
|
|
225
|
-
const { value: result } = res;
|
|
226
|
-
console.log(result);
|
|
227
|
-
} else {
|
|
228
|
-
console.log("commerceListCommerceInventories failed:", res.error);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
run();
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### Parameters
|
|
236
|
-
|
|
237
|
-
| Parameter | Type | Required | Description |
|
|
238
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
239
|
-
| `request` | [operations.ListCommerceInventoriesRequest](../../sdk/models/operations/listcommerceinventoriesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
240
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
241
|
-
| `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. |
|
|
242
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
243
|
-
|
|
244
|
-
### Response
|
|
245
|
-
|
|
246
|
-
**Promise\<[shared.CommerceInventory[]](../../models/.md)\>**
|
|
247
|
-
|
|
248
|
-
### Errors
|
|
249
|
-
|
|
250
|
-
| Error Type | Status Code | Content Type |
|
|
251
|
-
| --------------- | --------------- | --------------- |
|
|
252
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
253
|
-
|
|
254
|
-
## patchCommerceInventory
|
|
255
|
-
|
|
256
|
-
Update an inventory
|
|
257
|
-
|
|
258
|
-
### Example Usage
|
|
259
|
-
|
|
260
|
-
<!-- UsageSnippet language="typescript" operationID="patchCommerceInventory" method="patch" path="/commerce/{connection_id}/inventory/{id}" -->
|
|
261
|
-
```typescript
|
|
262
|
-
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
263
|
-
|
|
264
|
-
const unifiedTo = new UnifiedTo({
|
|
265
|
-
security: {
|
|
266
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
267
|
-
},
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
async function run() {
|
|
271
|
-
const result = await unifiedTo.inventory.patchCommerceInventory({
|
|
272
|
-
commerceInventory: {
|
|
273
|
-
available: 7859.84,
|
|
274
|
-
},
|
|
275
|
-
connectionId: "<id>",
|
|
276
|
-
id: "<id>",
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
console.log(result);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
run();
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### Standalone function
|
|
286
|
-
|
|
287
|
-
The standalone function version of this method:
|
|
288
|
-
|
|
289
|
-
```typescript
|
|
290
|
-
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
291
|
-
import { commercePatchCommerceInventory } from "@unified-api/typescript-sdk/funcs/commercePatchCommerceInventory.js";
|
|
292
|
-
|
|
293
|
-
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
294
|
-
// You can create one instance of it to use across an application.
|
|
295
|
-
const unifiedTo = new UnifiedToCore({
|
|
296
|
-
security: {
|
|
297
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
298
|
-
},
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
async function run() {
|
|
302
|
-
const res = await commercePatchCommerceInventory(unifiedTo, {
|
|
303
|
-
commerceInventory: {
|
|
304
|
-
available: 7859.84,
|
|
305
|
-
},
|
|
306
|
-
connectionId: "<id>",
|
|
307
|
-
id: "<id>",
|
|
308
|
-
});
|
|
309
|
-
if (res.ok) {
|
|
310
|
-
const { value: result } = res;
|
|
311
|
-
console.log(result);
|
|
312
|
-
} else {
|
|
313
|
-
console.log("commercePatchCommerceInventory failed:", res.error);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
run();
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### Parameters
|
|
321
|
-
|
|
322
|
-
| Parameter | Type | Required | Description |
|
|
323
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
324
|
-
| `request` | [operations.PatchCommerceInventoryRequest](../../sdk/models/operations/patchcommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
325
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
326
|
-
| `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. |
|
|
327
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
328
|
-
|
|
329
|
-
### Response
|
|
330
|
-
|
|
331
|
-
**Promise\<[shared.CommerceInventory](../../sdk/models/shared/commerceinventory.md)\>**
|
|
332
|
-
|
|
333
|
-
### Errors
|
|
334
|
-
|
|
335
|
-
| Error Type | Status Code | Content Type |
|
|
336
|
-
| --------------- | --------------- | --------------- |
|
|
337
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
338
|
-
|
|
339
|
-
## removeCommerceInventory
|
|
340
|
-
|
|
341
|
-
Remove an inventory
|
|
342
|
-
|
|
343
|
-
### Example Usage
|
|
344
|
-
|
|
345
|
-
<!-- UsageSnippet language="typescript" operationID="removeCommerceInventory" method="delete" path="/commerce/{connection_id}/inventory/{id}" -->
|
|
346
|
-
```typescript
|
|
347
|
-
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
348
|
-
|
|
349
|
-
const unifiedTo = new UnifiedTo({
|
|
350
|
-
security: {
|
|
351
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
352
|
-
},
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
async function run() {
|
|
356
|
-
const result = await unifiedTo.inventory.removeCommerceInventory({
|
|
357
|
-
connectionId: "<id>",
|
|
358
|
-
id: "<id>",
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
console.log(result);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
run();
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
### Standalone function
|
|
368
|
-
|
|
369
|
-
The standalone function version of this method:
|
|
370
|
-
|
|
371
|
-
```typescript
|
|
372
|
-
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
373
|
-
import { commerceRemoveCommerceInventory } from "@unified-api/typescript-sdk/funcs/commerceRemoveCommerceInventory.js";
|
|
374
|
-
|
|
375
|
-
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
376
|
-
// You can create one instance of it to use across an application.
|
|
377
|
-
const unifiedTo = new UnifiedToCore({
|
|
378
|
-
security: {
|
|
379
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
380
|
-
},
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
async function run() {
|
|
384
|
-
const res = await commerceRemoveCommerceInventory(unifiedTo, {
|
|
385
|
-
connectionId: "<id>",
|
|
386
|
-
id: "<id>",
|
|
387
|
-
});
|
|
388
|
-
if (res.ok) {
|
|
389
|
-
const { value: result } = res;
|
|
390
|
-
console.log(result);
|
|
391
|
-
} else {
|
|
392
|
-
console.log("commerceRemoveCommerceInventory failed:", res.error);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
run();
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
### Parameters
|
|
400
|
-
|
|
401
|
-
| Parameter | Type | Required | Description |
|
|
402
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
403
|
-
| `request` | [operations.RemoveCommerceInventoryRequest](../../sdk/models/operations/removecommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
404
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
405
|
-
| `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. |
|
|
406
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
407
|
-
|
|
408
|
-
### Response
|
|
409
|
-
|
|
410
|
-
**Promise\<[operations.RemoveCommerceInventoryResponse](../../sdk/models/operations/removecommerceinventoryresponse.md)\>**
|
|
411
|
-
|
|
412
|
-
### Errors
|
|
413
|
-
|
|
414
|
-
| Error Type | Status Code | Content Type |
|
|
415
|
-
| --------------- | --------------- | --------------- |
|
|
416
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
417
|
-
|
|
418
|
-
## updateCommerceInventory
|
|
419
|
-
|
|
420
|
-
Update an inventory
|
|
421
|
-
|
|
422
|
-
### Example Usage
|
|
423
|
-
|
|
424
|
-
<!-- UsageSnippet language="typescript" operationID="updateCommerceInventory" method="put" path="/commerce/{connection_id}/inventory/{id}" -->
|
|
425
|
-
```typescript
|
|
426
|
-
import { UnifiedTo } from "@unified-api/typescript-sdk";
|
|
427
|
-
|
|
428
|
-
const unifiedTo = new UnifiedTo({
|
|
429
|
-
security: {
|
|
430
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
431
|
-
},
|
|
432
|
-
});
|
|
433
|
-
|
|
434
|
-
async function run() {
|
|
435
|
-
const result = await unifiedTo.inventory.updateCommerceInventory({
|
|
436
|
-
commerceInventory: {
|
|
437
|
-
available: 4497.29,
|
|
438
|
-
},
|
|
439
|
-
connectionId: "<id>",
|
|
440
|
-
id: "<id>",
|
|
441
|
-
});
|
|
442
|
-
|
|
443
|
-
console.log(result);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
run();
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
### Standalone function
|
|
450
|
-
|
|
451
|
-
The standalone function version of this method:
|
|
452
|
-
|
|
453
|
-
```typescript
|
|
454
|
-
import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
|
|
455
|
-
import { commerceUpdateCommerceInventory } from "@unified-api/typescript-sdk/funcs/commerceUpdateCommerceInventory.js";
|
|
456
|
-
|
|
457
|
-
// Use `UnifiedToCore` for best tree-shaking performance.
|
|
458
|
-
// You can create one instance of it to use across an application.
|
|
459
|
-
const unifiedTo = new UnifiedToCore({
|
|
460
|
-
security: {
|
|
461
|
-
jwt: "<YOUR_API_KEY_HERE>",
|
|
462
|
-
},
|
|
463
|
-
});
|
|
464
|
-
|
|
465
|
-
async function run() {
|
|
466
|
-
const res = await commerceUpdateCommerceInventory(unifiedTo, {
|
|
467
|
-
commerceInventory: {
|
|
468
|
-
available: 4497.29,
|
|
469
|
-
},
|
|
470
|
-
connectionId: "<id>",
|
|
471
|
-
id: "<id>",
|
|
472
|
-
});
|
|
473
|
-
if (res.ok) {
|
|
474
|
-
const { value: result } = res;
|
|
475
|
-
console.log(result);
|
|
476
|
-
} else {
|
|
477
|
-
console.log("commerceUpdateCommerceInventory failed:", res.error);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
run();
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
### Parameters
|
|
485
|
-
|
|
486
|
-
| Parameter | Type | Required | Description |
|
|
487
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
488
|
-
| `request` | [operations.UpdateCommerceInventoryRequest](../../sdk/models/operations/updatecommerceinventoryrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
489
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
490
|
-
| `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. |
|
|
491
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
492
|
-
|
|
493
|
-
### Response
|
|
494
|
-
|
|
495
|
-
**Promise\<[shared.CommerceInventory](../../sdk/models/shared/commerceinventory.md)\>**
|
|
496
|
-
|
|
497
|
-
### Errors
|
|
498
|
-
|
|
499
|
-
| Error Type | Status Code | Content Type |
|
|
500
|
-
| --------------- | --------------- | --------------- |
|
|
501
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|