ultracart_rest_api_v2_typescript 4.0.64-RC → 4.0.66-RC
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/.openapi-generator/FILES +3 -0
- package/README.md +4 -2
- package/dist/apis/ItemApi.d.ts +148 -1
- package/dist/apis/ItemApi.js +316 -0
- package/dist/models/ItemDigitalItem.d.ts +25 -0
- package/dist/models/ItemDigitalItem.js +9 -0
- package/dist/models/ItemDigitalItemPdfMeta.d.ts +87 -0
- package/dist/models/ItemDigitalItemPdfMeta.js +62 -0
- package/dist/models/ItemDigitalItemResponse.d.ts +55 -0
- package/dist/models/ItemDigitalItemResponse.js +54 -0
- package/dist/models/ItemDigitalItemsResponse.d.ts +55 -0
- package/dist/models/ItemDigitalItemsResponse.js +54 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/ItemApi.ts +355 -0
- package/src/models/ItemDigitalItem.ts +39 -0
- package/src/models/ItemDigitalItemPdfMeta.ts +136 -0
- package/src/models/ItemDigitalItemResponse.ts +113 -0
- package/src/models/ItemDigitalItemsResponse.ts +113 -0
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -430,6 +430,9 @@ src/models/ItemContentMultimedia.ts
|
|
|
430
430
|
src/models/ItemContentMultimediaThumbnail.ts
|
|
431
431
|
src/models/ItemDigitalDelivery.ts
|
|
432
432
|
src/models/ItemDigitalItem.ts
|
|
433
|
+
src/models/ItemDigitalItemPdfMeta.ts
|
|
434
|
+
src/models/ItemDigitalItemResponse.ts
|
|
435
|
+
src/models/ItemDigitalItemsResponse.ts
|
|
433
436
|
src/models/ItemEbay.ts
|
|
434
437
|
src/models/ItemEbayCategorySpecific.ts
|
|
435
438
|
src/models/ItemEbayMarketListing.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.66-RC
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install ultracart_rest_api_v2_typescript@4.0.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@4.0.66-RC --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,8 @@ Not every change is committed to every SDK.
|
|
|
54
54
|
|
|
55
55
|
| Version | Date | Comments |
|
|
56
56
|
| --: | :-: | --- |
|
|
57
|
+
| 4.0.66-RC | 09/22/2022 | digital item mgmt testing |
|
|
58
|
+
| 4.0.65-RC | 09/22/2022 | testing digital file mgmt calls |
|
|
57
59
|
| 4.0.64-RC | 09/19/2022 | conversations pagination |
|
|
58
60
|
| 4.0.63-RC | 09/13/2022 | storefront comms - postcard tracking |
|
|
59
61
|
| 4.0.62-RC | 09/12/2022 | storefront comm - send back reviews.io configured flag on getEmailSettings |
|
package/dist/apis/ItemApi.d.ts
CHANGED
|
@@ -10,10 +10,24 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { Item, ItemResponse, ItemsRequest, ItemsResponse, PricingTiersResponse, TempMultimediaResponse } from '../models';
|
|
13
|
+
import { Item, ItemDigitalItem, ItemDigitalItemResponse, ItemDigitalItemsResponse, ItemResponse, ItemsRequest, ItemsResponse, PricingTiersResponse, TempMultimediaResponse } from '../models';
|
|
14
|
+
export interface DeleteDigitalItemRequest {
|
|
15
|
+
digitalItemOid: number;
|
|
16
|
+
}
|
|
14
17
|
export interface DeleteItemRequest {
|
|
15
18
|
merchantItemOid: number;
|
|
16
19
|
}
|
|
20
|
+
export interface GetDigitalItemRequest {
|
|
21
|
+
digitalItemOid: number;
|
|
22
|
+
}
|
|
23
|
+
export interface GetDigitalItemsRequest {
|
|
24
|
+
limit?: number;
|
|
25
|
+
offset?: number;
|
|
26
|
+
since?: string;
|
|
27
|
+
sort?: string;
|
|
28
|
+
expand?: string;
|
|
29
|
+
placeholders?: boolean;
|
|
30
|
+
}
|
|
17
31
|
export interface GetItemRequest {
|
|
18
32
|
merchantItemOid: number;
|
|
19
33
|
expand?: string;
|
|
@@ -37,11 +51,18 @@ export interface GetItemsRequest {
|
|
|
37
51
|
export interface GetPricingTiersRequest {
|
|
38
52
|
expand?: string;
|
|
39
53
|
}
|
|
54
|
+
export interface InsertDigitalItemRequest {
|
|
55
|
+
digitalItem: ItemDigitalItem;
|
|
56
|
+
}
|
|
40
57
|
export interface InsertItemRequest {
|
|
41
58
|
item: Item;
|
|
42
59
|
expand?: string;
|
|
43
60
|
placeholders?: boolean;
|
|
44
61
|
}
|
|
62
|
+
export interface UpdateDigitalItemRequest {
|
|
63
|
+
digitalItemOid: number;
|
|
64
|
+
digitalItem: ItemDigitalItem;
|
|
65
|
+
}
|
|
45
66
|
export interface UpdateItemRequest {
|
|
46
67
|
merchantItemOid: number;
|
|
47
68
|
item: Item;
|
|
@@ -64,6 +85,20 @@ export interface UploadTemporaryMultimediaRequest {
|
|
|
64
85
|
* @interface ItemApiInterface
|
|
65
86
|
*/
|
|
66
87
|
export interface ItemApiInterface {
|
|
88
|
+
/**
|
|
89
|
+
* Delete a digital item on the UltraCart account.
|
|
90
|
+
* @summary Delete a digital item, which is a file within the digital library, not an actual merchant item
|
|
91
|
+
* @param {number} digitalItemOid The digital item oid to delete.
|
|
92
|
+
* @param {*} [options] Override http request option.
|
|
93
|
+
* @throws {RequiredError}
|
|
94
|
+
* @memberof ItemApiInterface
|
|
95
|
+
*/
|
|
96
|
+
deleteDigitalItemRaw(requestParameters: DeleteDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
97
|
+
/**
|
|
98
|
+
* Delete a digital item on the UltraCart account.
|
|
99
|
+
* Delete a digital item, which is a file within the digital library, not an actual merchant item
|
|
100
|
+
*/
|
|
101
|
+
deleteDigitalItem(requestParameters: DeleteDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
67
102
|
/**
|
|
68
103
|
* Delete an item on the UltraCart account.
|
|
69
104
|
* @summary Delete an item
|
|
@@ -78,6 +113,39 @@ export interface ItemApiInterface {
|
|
|
78
113
|
* Delete an item
|
|
79
114
|
*/
|
|
80
115
|
deleteItem(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
|
118
|
+
* @summary Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
|
119
|
+
* @param {number} digitalItemOid The digital item oid to retrieve.
|
|
120
|
+
* @param {*} [options] Override http request option.
|
|
121
|
+
* @throws {RequiredError}
|
|
122
|
+
* @memberof ItemApiInterface
|
|
123
|
+
*/
|
|
124
|
+
getDigitalItemRaw(requestParameters: GetDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemDigitalItemResponse>>;
|
|
125
|
+
/**
|
|
126
|
+
* Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
|
127
|
+
* Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
|
128
|
+
*/
|
|
129
|
+
getDigitalItem(requestParameters: GetDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemDigitalItemResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
132
|
+
* @summary Retrieve digital items from the digital library which are digital files that may be attached to normal items
|
|
133
|
+
* @param {number} [limit] The maximum number of records to return on this one API call. (Default 100, Max 2000)
|
|
134
|
+
* @param {number} [offset] Pagination of the record set. Offset is a zero based index.
|
|
135
|
+
* @param {string} [since] Fetch items that have been created/modified since this date/time.
|
|
136
|
+
* @param {string} [sort] The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
|
137
|
+
* @param {string} [expand] The object expansion to perform on the result. See documentation for examples
|
|
138
|
+
* @param {boolean} [placeholders] Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
|
|
139
|
+
* @param {*} [options] Override http request option.
|
|
140
|
+
* @throws {RequiredError}
|
|
141
|
+
* @memberof ItemApiInterface
|
|
142
|
+
*/
|
|
143
|
+
getDigitalItemsRaw(requestParameters: GetDigitalItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemDigitalItemsResponse>>;
|
|
144
|
+
/**
|
|
145
|
+
* Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
146
|
+
* Retrieve digital items from the digital library which are digital files that may be attached to normal items
|
|
147
|
+
*/
|
|
148
|
+
getDigitalItems(requestParameters: GetDigitalItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemDigitalItemsResponse>;
|
|
81
149
|
/**
|
|
82
150
|
* Retrieves a single item using the specified item oid.
|
|
83
151
|
* @summary Retrieve an item
|
|
@@ -145,6 +213,20 @@ export interface ItemApiInterface {
|
|
|
145
213
|
* Retrieve pricing tiers
|
|
146
214
|
*/
|
|
147
215
|
getPricingTiers(requestParameters: GetPricingTiersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PricingTiersResponse>;
|
|
216
|
+
/**
|
|
217
|
+
* Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
|
|
218
|
+
* @summary Create a file within the digital library
|
|
219
|
+
* @param {ItemDigitalItem} digitalItem Digital item to create
|
|
220
|
+
* @param {*} [options] Override http request option.
|
|
221
|
+
* @throws {RequiredError}
|
|
222
|
+
* @memberof ItemApiInterface
|
|
223
|
+
*/
|
|
224
|
+
insertDigitalItemRaw(requestParameters: InsertDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemDigitalItemResponse>>;
|
|
225
|
+
/**
|
|
226
|
+
* Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
|
|
227
|
+
* Create a file within the digital library
|
|
228
|
+
*/
|
|
229
|
+
insertDigitalItem(requestParameters: InsertDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemDigitalItemResponse>;
|
|
148
230
|
/**
|
|
149
231
|
* Create a new item on the UltraCart account.
|
|
150
232
|
* @summary Create an item
|
|
@@ -161,6 +243,21 @@ export interface ItemApiInterface {
|
|
|
161
243
|
* Create an item
|
|
162
244
|
*/
|
|
163
245
|
insertItem(requestParameters: InsertItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemResponse>;
|
|
246
|
+
/**
|
|
247
|
+
* Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
|
248
|
+
* @summary Updates a file within the digital library
|
|
249
|
+
* @param {number} digitalItemOid The digital item oid to update.
|
|
250
|
+
* @param {ItemDigitalItem} digitalItem Digital item to update
|
|
251
|
+
* @param {*} [options] Override http request option.
|
|
252
|
+
* @throws {RequiredError}
|
|
253
|
+
* @memberof ItemApiInterface
|
|
254
|
+
*/
|
|
255
|
+
updateDigitalItemRaw(requestParameters: UpdateDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemDigitalItemResponse>>;
|
|
256
|
+
/**
|
|
257
|
+
* Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
|
258
|
+
* Updates a file within the digital library
|
|
259
|
+
*/
|
|
260
|
+
updateDigitalItem(requestParameters: UpdateDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemDigitalItemResponse>;
|
|
164
261
|
/**
|
|
165
262
|
* Update a new item on the UltraCart account.
|
|
166
263
|
* @summary Update an item
|
|
@@ -214,6 +311,16 @@ export interface ItemApiInterface {
|
|
|
214
311
|
*
|
|
215
312
|
*/
|
|
216
313
|
export declare class ItemApi extends runtime.BaseAPI implements ItemApiInterface {
|
|
314
|
+
/**
|
|
315
|
+
* Delete a digital item on the UltraCart account.
|
|
316
|
+
* Delete a digital item, which is a file within the digital library, not an actual merchant item
|
|
317
|
+
*/
|
|
318
|
+
deleteDigitalItemRaw(requestParameters: DeleteDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
319
|
+
/**
|
|
320
|
+
* Delete a digital item on the UltraCart account.
|
|
321
|
+
* Delete a digital item, which is a file within the digital library, not an actual merchant item
|
|
322
|
+
*/
|
|
323
|
+
deleteDigitalItem(requestParameters: DeleteDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
217
324
|
/**
|
|
218
325
|
* Delete an item on the UltraCart account.
|
|
219
326
|
* Delete an item
|
|
@@ -224,6 +331,26 @@ export declare class ItemApi extends runtime.BaseAPI implements ItemApiInterface
|
|
|
224
331
|
* Delete an item
|
|
225
332
|
*/
|
|
226
333
|
deleteItem(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
334
|
+
/**
|
|
335
|
+
* Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
|
336
|
+
* Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
|
337
|
+
*/
|
|
338
|
+
getDigitalItemRaw(requestParameters: GetDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemDigitalItemResponse>>;
|
|
339
|
+
/**
|
|
340
|
+
* Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
|
341
|
+
* Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
|
342
|
+
*/
|
|
343
|
+
getDigitalItem(requestParameters: GetDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemDigitalItemResponse>;
|
|
344
|
+
/**
|
|
345
|
+
* Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
346
|
+
* Retrieve digital items from the digital library which are digital files that may be attached to normal items
|
|
347
|
+
*/
|
|
348
|
+
getDigitalItemsRaw(requestParameters: GetDigitalItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemDigitalItemsResponse>>;
|
|
349
|
+
/**
|
|
350
|
+
* Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
351
|
+
* Retrieve digital items from the digital library which are digital files that may be attached to normal items
|
|
352
|
+
*/
|
|
353
|
+
getDigitalItems(requestParameters?: GetDigitalItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemDigitalItemsResponse>;
|
|
227
354
|
/**
|
|
228
355
|
* Retrieves a single item using the specified item oid.
|
|
229
356
|
* Retrieve an item
|
|
@@ -264,6 +391,16 @@ export declare class ItemApi extends runtime.BaseAPI implements ItemApiInterface
|
|
|
264
391
|
* Retrieve pricing tiers
|
|
265
392
|
*/
|
|
266
393
|
getPricingTiers(requestParameters?: GetPricingTiersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PricingTiersResponse>;
|
|
394
|
+
/**
|
|
395
|
+
* Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
|
|
396
|
+
* Create a file within the digital library
|
|
397
|
+
*/
|
|
398
|
+
insertDigitalItemRaw(requestParameters: InsertDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemDigitalItemResponse>>;
|
|
399
|
+
/**
|
|
400
|
+
* Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
|
|
401
|
+
* Create a file within the digital library
|
|
402
|
+
*/
|
|
403
|
+
insertDigitalItem(requestParameters: InsertDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemDigitalItemResponse>;
|
|
267
404
|
/**
|
|
268
405
|
* Create a new item on the UltraCart account.
|
|
269
406
|
* Create an item
|
|
@@ -274,6 +411,16 @@ export declare class ItemApi extends runtime.BaseAPI implements ItemApiInterface
|
|
|
274
411
|
* Create an item
|
|
275
412
|
*/
|
|
276
413
|
insertItem(requestParameters: InsertItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemResponse>;
|
|
414
|
+
/**
|
|
415
|
+
* Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
|
416
|
+
* Updates a file within the digital library
|
|
417
|
+
*/
|
|
418
|
+
updateDigitalItemRaw(requestParameters: UpdateDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemDigitalItemResponse>>;
|
|
419
|
+
/**
|
|
420
|
+
* Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
|
421
|
+
* Updates a file within the digital library
|
|
422
|
+
*/
|
|
423
|
+
updateDigitalItem(requestParameters: UpdateDigitalItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemDigitalItemResponse>;
|
|
277
424
|
/**
|
|
278
425
|
* Update a new item on the UltraCart account.
|
|
279
426
|
* Update an item
|
package/dist/apis/ItemApi.js
CHANGED
|
@@ -75,6 +75,63 @@ var ItemApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function ItemApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Delete a digital item on the UltraCart account.
|
|
80
|
+
* Delete a digital item, which is a file within the digital library, not an actual merchant item
|
|
81
|
+
*/
|
|
82
|
+
ItemApi.prototype.deleteDigitalItemRaw = function (requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
85
|
+
return __generator(this, function (_c) {
|
|
86
|
+
switch (_c.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
if (requestParameters.digitalItemOid === null || requestParameters.digitalItemOid === undefined) {
|
|
89
|
+
throw new runtime.RequiredError('digitalItemOid', 'Required parameter requestParameters.digitalItemOid was null or undefined when calling deleteDigitalItem.');
|
|
90
|
+
}
|
|
91
|
+
queryParameters = {};
|
|
92
|
+
headerParameters = {};
|
|
93
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
94
|
+
// oauth required
|
|
95
|
+
_a = headerParameters;
|
|
96
|
+
_b = "Authorization";
|
|
97
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["item_write"])];
|
|
98
|
+
case 1:
|
|
99
|
+
// oauth required
|
|
100
|
+
_a[_b] = _c.sent();
|
|
101
|
+
_c.label = 2;
|
|
102
|
+
case 2:
|
|
103
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
104
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
105
|
+
}
|
|
106
|
+
return [4 /*yield*/, this.request({
|
|
107
|
+
path: "/item/digital_library/{digital_item_oid}".replace("{".concat("digital_item_oid", "}"), encodeURIComponent(String(requestParameters.digitalItemOid))),
|
|
108
|
+
method: 'DELETE',
|
|
109
|
+
headers: headerParameters,
|
|
110
|
+
query: queryParameters,
|
|
111
|
+
}, initOverrides)];
|
|
112
|
+
case 3:
|
|
113
|
+
response = _c.sent();
|
|
114
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Delete a digital item on the UltraCart account.
|
|
121
|
+
* Delete a digital item, which is a file within the digital library, not an actual merchant item
|
|
122
|
+
*/
|
|
123
|
+
ItemApi.prototype.deleteDigitalItem = function (requestParameters, initOverrides) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
+
return __generator(this, function (_a) {
|
|
126
|
+
switch (_a.label) {
|
|
127
|
+
case 0: return [4 /*yield*/, this.deleteDigitalItemRaw(requestParameters, initOverrides)];
|
|
128
|
+
case 1:
|
|
129
|
+
_a.sent();
|
|
130
|
+
return [2 /*return*/];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
};
|
|
78
135
|
/**
|
|
79
136
|
* Delete an item on the UltraCart account.
|
|
80
137
|
* Delete an item
|
|
@@ -132,6 +189,140 @@ var ItemApi = /** @class */ (function (_super) {
|
|
|
132
189
|
});
|
|
133
190
|
});
|
|
134
191
|
};
|
|
192
|
+
/**
|
|
193
|
+
* Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
|
194
|
+
* Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
|
195
|
+
*/
|
|
196
|
+
ItemApi.prototype.getDigitalItemRaw = function (requestParameters, initOverrides) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
198
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
199
|
+
return __generator(this, function (_c) {
|
|
200
|
+
switch (_c.label) {
|
|
201
|
+
case 0:
|
|
202
|
+
if (requestParameters.digitalItemOid === null || requestParameters.digitalItemOid === undefined) {
|
|
203
|
+
throw new runtime.RequiredError('digitalItemOid', 'Required parameter requestParameters.digitalItemOid was null or undefined when calling getDigitalItem.');
|
|
204
|
+
}
|
|
205
|
+
queryParameters = {};
|
|
206
|
+
headerParameters = {};
|
|
207
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
208
|
+
// oauth required
|
|
209
|
+
_a = headerParameters;
|
|
210
|
+
_b = "Authorization";
|
|
211
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["item_read"])];
|
|
212
|
+
case 1:
|
|
213
|
+
// oauth required
|
|
214
|
+
_a[_b] = _c.sent();
|
|
215
|
+
_c.label = 2;
|
|
216
|
+
case 2:
|
|
217
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
218
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
219
|
+
}
|
|
220
|
+
return [4 /*yield*/, this.request({
|
|
221
|
+
path: "/item/digital_library/{digital_item_oid}".replace("{".concat("digital_item_oid", "}"), encodeURIComponent(String(requestParameters.digitalItemOid))),
|
|
222
|
+
method: 'GET',
|
|
223
|
+
headers: headerParameters,
|
|
224
|
+
query: queryParameters,
|
|
225
|
+
}, initOverrides)];
|
|
226
|
+
case 3:
|
|
227
|
+
response = _c.sent();
|
|
228
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ItemDigitalItemResponseFromJSON)(jsonValue); })];
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
|
235
|
+
* Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
|
236
|
+
*/
|
|
237
|
+
ItemApi.prototype.getDigitalItem = function (requestParameters, initOverrides) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
239
|
+
var response;
|
|
240
|
+
return __generator(this, function (_a) {
|
|
241
|
+
switch (_a.label) {
|
|
242
|
+
case 0: return [4 /*yield*/, this.getDigitalItemRaw(requestParameters, initOverrides)];
|
|
243
|
+
case 1:
|
|
244
|
+
response = _a.sent();
|
|
245
|
+
return [4 /*yield*/, response.value()];
|
|
246
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
253
|
+
* Retrieve digital items from the digital library which are digital files that may be attached to normal items
|
|
254
|
+
*/
|
|
255
|
+
ItemApi.prototype.getDigitalItemsRaw = function (requestParameters, initOverrides) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
257
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
258
|
+
return __generator(this, function (_c) {
|
|
259
|
+
switch (_c.label) {
|
|
260
|
+
case 0:
|
|
261
|
+
queryParameters = {};
|
|
262
|
+
if (requestParameters.limit !== undefined) {
|
|
263
|
+
queryParameters['_limit'] = requestParameters.limit;
|
|
264
|
+
}
|
|
265
|
+
if (requestParameters.offset !== undefined) {
|
|
266
|
+
queryParameters['_offset'] = requestParameters.offset;
|
|
267
|
+
}
|
|
268
|
+
if (requestParameters.since !== undefined) {
|
|
269
|
+
queryParameters['_since'] = requestParameters.since;
|
|
270
|
+
}
|
|
271
|
+
if (requestParameters.sort !== undefined) {
|
|
272
|
+
queryParameters['_sort'] = requestParameters.sort;
|
|
273
|
+
}
|
|
274
|
+
if (requestParameters.expand !== undefined) {
|
|
275
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
276
|
+
}
|
|
277
|
+
if (requestParameters.placeholders !== undefined) {
|
|
278
|
+
queryParameters['_placeholders'] = requestParameters.placeholders;
|
|
279
|
+
}
|
|
280
|
+
headerParameters = {};
|
|
281
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
282
|
+
// oauth required
|
|
283
|
+
_a = headerParameters;
|
|
284
|
+
_b = "Authorization";
|
|
285
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["item_read"])];
|
|
286
|
+
case 1:
|
|
287
|
+
// oauth required
|
|
288
|
+
_a[_b] = _c.sent();
|
|
289
|
+
_c.label = 2;
|
|
290
|
+
case 2:
|
|
291
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
292
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
293
|
+
}
|
|
294
|
+
return [4 /*yield*/, this.request({
|
|
295
|
+
path: "/item/digital_library",
|
|
296
|
+
method: 'GET',
|
|
297
|
+
headers: headerParameters,
|
|
298
|
+
query: queryParameters,
|
|
299
|
+
}, initOverrides)];
|
|
300
|
+
case 3:
|
|
301
|
+
response = _c.sent();
|
|
302
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ItemDigitalItemsResponseFromJSON)(jsonValue); })];
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
309
|
+
* Retrieve digital items from the digital library which are digital files that may be attached to normal items
|
|
310
|
+
*/
|
|
311
|
+
ItemApi.prototype.getDigitalItems = function (requestParameters, initOverrides) {
|
|
312
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
313
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
314
|
+
var response;
|
|
315
|
+
return __generator(this, function (_a) {
|
|
316
|
+
switch (_a.label) {
|
|
317
|
+
case 0: return [4 /*yield*/, this.getDigitalItemsRaw(requestParameters, initOverrides)];
|
|
318
|
+
case 1:
|
|
319
|
+
response = _a.sent();
|
|
320
|
+
return [4 /*yield*/, response.value()];
|
|
321
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
};
|
|
135
326
|
/**
|
|
136
327
|
* Retrieves a single item using the specified item oid.
|
|
137
328
|
* Retrieve an item
|
|
@@ -403,6 +594,67 @@ var ItemApi = /** @class */ (function (_super) {
|
|
|
403
594
|
});
|
|
404
595
|
});
|
|
405
596
|
};
|
|
597
|
+
/**
|
|
598
|
+
* Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
|
|
599
|
+
* Create a file within the digital library
|
|
600
|
+
*/
|
|
601
|
+
ItemApi.prototype.insertDigitalItemRaw = function (requestParameters, initOverrides) {
|
|
602
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
603
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
604
|
+
return __generator(this, function (_c) {
|
|
605
|
+
switch (_c.label) {
|
|
606
|
+
case 0:
|
|
607
|
+
if (requestParameters.digitalItem === null || requestParameters.digitalItem === undefined) {
|
|
608
|
+
throw new runtime.RequiredError('digitalItem', 'Required parameter requestParameters.digitalItem was null or undefined when calling insertDigitalItem.');
|
|
609
|
+
}
|
|
610
|
+
queryParameters = {};
|
|
611
|
+
headerParameters = {};
|
|
612
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
613
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
614
|
+
// oauth required
|
|
615
|
+
_a = headerParameters;
|
|
616
|
+
_b = "Authorization";
|
|
617
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["item_write"])];
|
|
618
|
+
case 1:
|
|
619
|
+
// oauth required
|
|
620
|
+
_a[_b] = _c.sent();
|
|
621
|
+
_c.label = 2;
|
|
622
|
+
case 2:
|
|
623
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
624
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
625
|
+
}
|
|
626
|
+
return [4 /*yield*/, this.request({
|
|
627
|
+
path: "/item/digital_library",
|
|
628
|
+
method: 'POST',
|
|
629
|
+
headers: headerParameters,
|
|
630
|
+
query: queryParameters,
|
|
631
|
+
body: (0, models_1.ItemDigitalItemToJSON)(requestParameters.digitalItem),
|
|
632
|
+
}, initOverrides)];
|
|
633
|
+
case 3:
|
|
634
|
+
response = _c.sent();
|
|
635
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ItemDigitalItemResponseFromJSON)(jsonValue); })];
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
});
|
|
639
|
+
};
|
|
640
|
+
/**
|
|
641
|
+
* Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
|
|
642
|
+
* Create a file within the digital library
|
|
643
|
+
*/
|
|
644
|
+
ItemApi.prototype.insertDigitalItem = function (requestParameters, initOverrides) {
|
|
645
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
646
|
+
var response;
|
|
647
|
+
return __generator(this, function (_a) {
|
|
648
|
+
switch (_a.label) {
|
|
649
|
+
case 0: return [4 /*yield*/, this.insertDigitalItemRaw(requestParameters, initOverrides)];
|
|
650
|
+
case 1:
|
|
651
|
+
response = _a.sent();
|
|
652
|
+
return [4 /*yield*/, response.value()];
|
|
653
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
});
|
|
657
|
+
};
|
|
406
658
|
/**
|
|
407
659
|
* Create a new item on the UltraCart account.
|
|
408
660
|
* Create an item
|
|
@@ -470,6 +722,70 @@ var ItemApi = /** @class */ (function (_super) {
|
|
|
470
722
|
});
|
|
471
723
|
});
|
|
472
724
|
};
|
|
725
|
+
/**
|
|
726
|
+
* Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
|
727
|
+
* Updates a file within the digital library
|
|
728
|
+
*/
|
|
729
|
+
ItemApi.prototype.updateDigitalItemRaw = function (requestParameters, initOverrides) {
|
|
730
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
731
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
732
|
+
return __generator(this, function (_c) {
|
|
733
|
+
switch (_c.label) {
|
|
734
|
+
case 0:
|
|
735
|
+
if (requestParameters.digitalItemOid === null || requestParameters.digitalItemOid === undefined) {
|
|
736
|
+
throw new runtime.RequiredError('digitalItemOid', 'Required parameter requestParameters.digitalItemOid was null or undefined when calling updateDigitalItem.');
|
|
737
|
+
}
|
|
738
|
+
if (requestParameters.digitalItem === null || requestParameters.digitalItem === undefined) {
|
|
739
|
+
throw new runtime.RequiredError('digitalItem', 'Required parameter requestParameters.digitalItem was null or undefined when calling updateDigitalItem.');
|
|
740
|
+
}
|
|
741
|
+
queryParameters = {};
|
|
742
|
+
headerParameters = {};
|
|
743
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
744
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
745
|
+
// oauth required
|
|
746
|
+
_a = headerParameters;
|
|
747
|
+
_b = "Authorization";
|
|
748
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["item_write"])];
|
|
749
|
+
case 1:
|
|
750
|
+
// oauth required
|
|
751
|
+
_a[_b] = _c.sent();
|
|
752
|
+
_c.label = 2;
|
|
753
|
+
case 2:
|
|
754
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
755
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
756
|
+
}
|
|
757
|
+
return [4 /*yield*/, this.request({
|
|
758
|
+
path: "/item/digital_library/{digital_item_oid}".replace("{".concat("digital_item_oid", "}"), encodeURIComponent(String(requestParameters.digitalItemOid))),
|
|
759
|
+
method: 'PUT',
|
|
760
|
+
headers: headerParameters,
|
|
761
|
+
query: queryParameters,
|
|
762
|
+
body: (0, models_1.ItemDigitalItemToJSON)(requestParameters.digitalItem),
|
|
763
|
+
}, initOverrides)];
|
|
764
|
+
case 3:
|
|
765
|
+
response = _c.sent();
|
|
766
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ItemDigitalItemResponseFromJSON)(jsonValue); })];
|
|
767
|
+
}
|
|
768
|
+
});
|
|
769
|
+
});
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
|
773
|
+
* Updates a file within the digital library
|
|
774
|
+
*/
|
|
775
|
+
ItemApi.prototype.updateDigitalItem = function (requestParameters, initOverrides) {
|
|
776
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
777
|
+
var response;
|
|
778
|
+
return __generator(this, function (_a) {
|
|
779
|
+
switch (_a.label) {
|
|
780
|
+
case 0: return [4 /*yield*/, this.updateDigitalItemRaw(requestParameters, initOverrides)];
|
|
781
|
+
case 1:
|
|
782
|
+
response = _a.sent();
|
|
783
|
+
return [4 /*yield*/, response.value()];
|
|
784
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
785
|
+
}
|
|
786
|
+
});
|
|
787
|
+
});
|
|
788
|
+
};
|
|
473
789
|
/**
|
|
474
790
|
* Update a new item on the UltraCart account.
|
|
475
791
|
* Update an item
|
|
@@ -9,12 +9,19 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { ItemDigitalItemPdfMeta } from './ItemDigitalItemPdfMeta';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
15
16
|
* @interface ItemDigitalItem
|
|
16
17
|
*/
|
|
17
18
|
export interface ItemDigitalItem {
|
|
19
|
+
/**
|
|
20
|
+
* Click wrap agreement is presented to the customer before they can purchase your product.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ItemDigitalItem
|
|
23
|
+
*/
|
|
24
|
+
click_wrap_agreement?: string;
|
|
18
25
|
/**
|
|
19
26
|
* File creation date
|
|
20
27
|
* @type {string}
|
|
@@ -27,12 +34,24 @@ export interface ItemDigitalItem {
|
|
|
27
34
|
* @memberof ItemDigitalItem
|
|
28
35
|
*/
|
|
29
36
|
description?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The Digital item oid is a primary key used internally by UltraCart. You should not set or change this value. Doing so will have no effect.
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof ItemDigitalItem
|
|
41
|
+
*/
|
|
42
|
+
digital_item_oid?: number;
|
|
30
43
|
/**
|
|
31
44
|
* File size
|
|
32
45
|
* @type {number}
|
|
33
46
|
* @memberof ItemDigitalItem
|
|
34
47
|
*/
|
|
35
48
|
file_size?: number;
|
|
49
|
+
/**
|
|
50
|
+
* This url is sourced to create or update a digital file in your digital library. It is only considered during an insert or update operation.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof ItemDigitalItem
|
|
53
|
+
*/
|
|
54
|
+
import_from_url?: string;
|
|
36
55
|
/**
|
|
37
56
|
* Mime type associated with the file
|
|
38
57
|
* @type {string}
|
|
@@ -45,6 +64,12 @@ export interface ItemDigitalItem {
|
|
|
45
64
|
* @memberof ItemDigitalItem
|
|
46
65
|
*/
|
|
47
66
|
original_filename?: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {ItemDigitalItemPdfMeta}
|
|
70
|
+
* @memberof ItemDigitalItem
|
|
71
|
+
*/
|
|
72
|
+
pdf_meta?: ItemDigitalItemPdfMeta;
|
|
48
73
|
}
|
|
49
74
|
export declare function ItemDigitalItemFromJSON(json: any): ItemDigitalItem;
|
|
50
75
|
export declare function ItemDigitalItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemDigitalItem;
|