ultracart_rest_api_v2_typescript 4.1.168 → 4.1.169
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 +2 -0
- package/README.md +3 -2
- package/dist/apis/SfvbApi.d.ts +38 -1
- package/dist/apis/SfvbApi.js +74 -0
- package/dist/models/SfvbItemContainer.d.ts +80 -0
- package/dist/models/SfvbItemContainer.js +70 -0
- package/dist/models/SfvbItemContainersResponse.d.ts +74 -0
- package/dist/models/SfvbItemContainersResponse.js +65 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/apis/SfvbApi.ts +94 -0
- package/src/models/SfvbItemContainer.ts +132 -0
- package/src/models/SfvbItemContainersResponse.ts +130 -0
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -1026,6 +1026,8 @@ src/models/SfvbFileVersionsResponse.ts
|
|
|
1026
1026
|
src/models/SfvbFileWriteRequest.ts
|
|
1027
1027
|
src/models/SfvbFileWriteResponse.ts
|
|
1028
1028
|
src/models/SfvbFilesResponse.ts
|
|
1029
|
+
src/models/SfvbItemContainer.ts
|
|
1030
|
+
src/models/SfvbItemContainersResponse.ts
|
|
1029
1031
|
src/models/SfvbLibraryEntry.ts
|
|
1030
1032
|
src/models/SfvbLibraryFacet.ts
|
|
1031
1033
|
src/models/SfvbLibraryResponse.ts
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# UltraCart Typescript SDK
|
|
2
|
-
## ultracart_rest_api_v2_typescript@4.1.
|
|
2
|
+
## ultracart_rest_api_v2_typescript@4.1.169
|
|
3
3
|
|
|
4
4
|
Every API method call has a sample for every language SDK. See https://github.com/UltraCart/sdk_samples
|
|
5
5
|
|
|
6
6
|
Installation
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
npm install ultracart_rest_api_v2_typescript@4.1.
|
|
9
|
+
npm install ultracart_rest_api_v2_typescript@4.1.169 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -84,6 +84,7 @@ Not every change is committed to every SDK.
|
|
|
84
84
|
|
|
85
85
|
| Version | Date | Comments |
|
|
86
86
|
| --: | :-: | --- |
|
|
87
|
+
| 4.1.169 | 09/22/2026 | sfvb builder |
|
|
87
88
|
| 4.1.168 | 09/21/2026 | further automation testing |
|
|
88
89
|
| 4.1.167 | 09/21/2026 | automation test |
|
|
89
90
|
| 4.1.165 | 09/21/2026 | automation testing |
|
package/dist/apis/SfvbApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { SfvbBlogPostsResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbLibraryEntry, SfvbLibraryResponse, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplatesResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffersResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
|
|
13
|
+
import { SfvbBlogPostsResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbItemContainersResponse, SfvbLibraryEntry, SfvbLibraryResponse, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplatesResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffersResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
|
|
14
14
|
export interface AddSfvbPageBlogPostsRequest {
|
|
15
15
|
storefrontOid: number;
|
|
16
16
|
path: string;
|
|
@@ -184,6 +184,14 @@ export interface ListSfvbFilesRequest {
|
|
|
184
184
|
themeOid?: number;
|
|
185
185
|
maxEntries?: number;
|
|
186
186
|
}
|
|
187
|
+
export interface ListSfvbItemContainersRequest {
|
|
188
|
+
storefrontOid: number;
|
|
189
|
+
merchantItemId?: string;
|
|
190
|
+
merchantItemOid?: number;
|
|
191
|
+
containerName?: string;
|
|
192
|
+
maxResults?: number;
|
|
193
|
+
offset?: number;
|
|
194
|
+
}
|
|
187
195
|
export interface ListSfvbPagesRequest {
|
|
188
196
|
storefrontOid: number;
|
|
189
197
|
under?: string;
|
|
@@ -965,6 +973,25 @@ export interface SfvbApiInterface {
|
|
|
965
973
|
* List a storefront directory
|
|
966
974
|
*/
|
|
967
975
|
listSfvbFiles(requestParameters: ListSfvbFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbFilesResponse>;
|
|
976
|
+
/**
|
|
977
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
978
|
+
* @summary List the item containers on the account
|
|
979
|
+
* @param {number} storefrontOid
|
|
980
|
+
* @param {string} [merchantItemId] Restrict to one item, by the merchant item id a storefront carries
|
|
981
|
+
* @param {number} [merchantItemOid] Restrict to one item, by oid. Send this or merchant_item_id, not both
|
|
982
|
+
* @param {string} [containerName] Restrict to one slot name, matched without regard to case
|
|
983
|
+
* @param {number} [maxResults]
|
|
984
|
+
* @param {number} [offset]
|
|
985
|
+
* @param {*} [options] Override http request option.
|
|
986
|
+
* @throws {RequiredError}
|
|
987
|
+
* @memberof SfvbApiInterface
|
|
988
|
+
*/
|
|
989
|
+
listSfvbItemContainersRaw(requestParameters: ListSfvbItemContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbItemContainersResponse>>;
|
|
990
|
+
/**
|
|
991
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
992
|
+
* List the item containers on the account
|
|
993
|
+
*/
|
|
994
|
+
listSfvbItemContainers(requestParameters: ListSfvbItemContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemContainersResponse>;
|
|
968
995
|
/**
|
|
969
996
|
* Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
970
997
|
* @summary List the storefront\'s pages
|
|
@@ -1830,6 +1857,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1830
1857
|
* List a storefront directory
|
|
1831
1858
|
*/
|
|
1832
1859
|
listSfvbFiles(requestParameters: ListSfvbFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbFilesResponse>;
|
|
1860
|
+
/**
|
|
1861
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
1862
|
+
* List the item containers on the account
|
|
1863
|
+
*/
|
|
1864
|
+
listSfvbItemContainersRaw(requestParameters: ListSfvbItemContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbItemContainersResponse>>;
|
|
1865
|
+
/**
|
|
1866
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
1867
|
+
* List the item containers on the account
|
|
1868
|
+
*/
|
|
1869
|
+
listSfvbItemContainers(requestParameters: ListSfvbItemContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemContainersResponse>;
|
|
1833
1870
|
/**
|
|
1834
1871
|
* Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
1835
1872
|
* List the storefront\'s pages
|
package/dist/apis/SfvbApi.js
CHANGED
|
@@ -2738,6 +2738,80 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
2738
2738
|
});
|
|
2739
2739
|
});
|
|
2740
2740
|
};
|
|
2741
|
+
/**
|
|
2742
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
2743
|
+
* List the item containers on the account
|
|
2744
|
+
*/
|
|
2745
|
+
SfvbApi.prototype.listSfvbItemContainersRaw = function (requestParameters, initOverrides) {
|
|
2746
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2747
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
2748
|
+
return __generator(this, function (_c) {
|
|
2749
|
+
switch (_c.label) {
|
|
2750
|
+
case 0:
|
|
2751
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
2752
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling listSfvbItemContainers.');
|
|
2753
|
+
}
|
|
2754
|
+
queryParameters = {};
|
|
2755
|
+
if (requestParameters.merchantItemId !== undefined) {
|
|
2756
|
+
queryParameters['merchant_item_id'] = requestParameters.merchantItemId;
|
|
2757
|
+
}
|
|
2758
|
+
if (requestParameters.merchantItemOid !== undefined) {
|
|
2759
|
+
queryParameters['merchant_item_oid'] = requestParameters.merchantItemOid;
|
|
2760
|
+
}
|
|
2761
|
+
if (requestParameters.containerName !== undefined) {
|
|
2762
|
+
queryParameters['container_name'] = requestParameters.containerName;
|
|
2763
|
+
}
|
|
2764
|
+
if (requestParameters.maxResults !== undefined) {
|
|
2765
|
+
queryParameters['max_results'] = requestParameters.maxResults;
|
|
2766
|
+
}
|
|
2767
|
+
if (requestParameters.offset !== undefined) {
|
|
2768
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
2769
|
+
}
|
|
2770
|
+
headerParameters = {};
|
|
2771
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
2772
|
+
// oauth required
|
|
2773
|
+
_a = headerParameters;
|
|
2774
|
+
_b = "Authorization";
|
|
2775
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
2776
|
+
case 1:
|
|
2777
|
+
// oauth required
|
|
2778
|
+
_a[_b] = _c.sent();
|
|
2779
|
+
_c.label = 2;
|
|
2780
|
+
case 2:
|
|
2781
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2782
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
2783
|
+
}
|
|
2784
|
+
return [4 /*yield*/, this.request({
|
|
2785
|
+
path: "/sfvb/storefronts/{storefront_oid}/item_containers".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
2786
|
+
method: 'GET',
|
|
2787
|
+
headers: headerParameters,
|
|
2788
|
+
query: queryParameters,
|
|
2789
|
+
}, initOverrides)];
|
|
2790
|
+
case 3:
|
|
2791
|
+
response = _c.sent();
|
|
2792
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbItemContainersResponseFromJSON)(jsonValue); })];
|
|
2793
|
+
}
|
|
2794
|
+
});
|
|
2795
|
+
});
|
|
2796
|
+
};
|
|
2797
|
+
/**
|
|
2798
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
2799
|
+
* List the item containers on the account
|
|
2800
|
+
*/
|
|
2801
|
+
SfvbApi.prototype.listSfvbItemContainers = function (requestParameters, initOverrides) {
|
|
2802
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2803
|
+
var response;
|
|
2804
|
+
return __generator(this, function (_a) {
|
|
2805
|
+
switch (_a.label) {
|
|
2806
|
+
case 0: return [4 /*yield*/, this.listSfvbItemContainersRaw(requestParameters, initOverrides)];
|
|
2807
|
+
case 1:
|
|
2808
|
+
response = _a.sent();
|
|
2809
|
+
return [4 /*yield*/, response.value()];
|
|
2810
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
2811
|
+
}
|
|
2812
|
+
});
|
|
2813
|
+
});
|
|
2814
|
+
};
|
|
2741
2815
|
/**
|
|
2742
2816
|
* Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
2743
2817
|
* List the storefront\'s pages
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SfvbItemContainer
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbItemContainer {
|
|
18
|
+
/**
|
|
19
|
+
* Size of the CJSON in UTF-8 bytes, which is the same unit the container version size and the upsell offer cjson_size use.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof SfvbItemContainer
|
|
22
|
+
*/
|
|
23
|
+
cjson_size?: number;
|
|
24
|
+
/**
|
|
25
|
+
* The slot name. This is the value an itemcontainer element's itemContainerName setting holds, which is what ties a container to the element that renders it.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SfvbItemContainer
|
|
28
|
+
*/
|
|
29
|
+
container_name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* SHA-256 of the container's CJSON. Identical to the value a read of the container returns, so a listing is enough to start an If-Match write without reading first.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SfvbItemContainer
|
|
34
|
+
*/
|
|
35
|
+
hash_sha256?: string;
|
|
36
|
+
/**
|
|
37
|
+
* When the container was last written. Absent for a container untouched since the storage began recording the time, so read an absent value as unknown rather than as never modified.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SfvbItemContainer
|
|
40
|
+
*/
|
|
41
|
+
last_modified?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The owning item's merchant item id. This is the identifier a storefront carries and a merchant recognizes; the oid appears nowhere on a rendered page. Send it as owner_type itemid to address the same container without converting it first.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof SfvbItemContainer
|
|
46
|
+
*/
|
|
47
|
+
merchant_item_id?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The merchant item oid, spelled the way containers/item/{owner_object_id} takes it.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof SfvbItemContainer
|
|
52
|
+
*/
|
|
53
|
+
owner_object_id?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Always item. Carried so a row is usable as an address without the caller having to know which listing it came from.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof SfvbItemContainer
|
|
58
|
+
*/
|
|
59
|
+
owner_type?: SfvbItemContainerOwnerTypeEnum;
|
|
60
|
+
/**
|
|
61
|
+
* The element types this container uses, recorded by the storage when it was written. A large cjson_size beside a handful of element types is the signature of markup pasted into a single html element. Absent on a container written before the storage began recording this.
|
|
62
|
+
* @type {Array<string>}
|
|
63
|
+
* @memberof SfvbItemContainer
|
|
64
|
+
*/
|
|
65
|
+
used_elements?: Array<string>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export declare const SfvbItemContainerOwnerTypeEnum: {
|
|
71
|
+
readonly Item: "item";
|
|
72
|
+
};
|
|
73
|
+
export type SfvbItemContainerOwnerTypeEnum = typeof SfvbItemContainerOwnerTypeEnum[keyof typeof SfvbItemContainerOwnerTypeEnum];
|
|
74
|
+
/**
|
|
75
|
+
* Check if a given object implements the SfvbItemContainer interface.
|
|
76
|
+
*/
|
|
77
|
+
export declare function instanceOfSfvbItemContainer(value: object): boolean;
|
|
78
|
+
export declare function SfvbItemContainerFromJSON(json: any): SfvbItemContainer;
|
|
79
|
+
export declare function SfvbItemContainerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbItemContainer;
|
|
80
|
+
export declare function SfvbItemContainerToJSON(value?: SfvbItemContainer | null): any;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SfvbItemContainerToJSON = exports.SfvbItemContainerFromJSONTyped = exports.SfvbItemContainerFromJSON = exports.instanceOfSfvbItemContainer = exports.SfvbItemContainerOwnerTypeEnum = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.SfvbItemContainerOwnerTypeEnum = {
|
|
22
|
+
Item: 'item'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the SfvbItemContainer interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfSfvbItemContainer(value) {
|
|
28
|
+
var isInstance = true;
|
|
29
|
+
return isInstance;
|
|
30
|
+
}
|
|
31
|
+
exports.instanceOfSfvbItemContainer = instanceOfSfvbItemContainer;
|
|
32
|
+
function SfvbItemContainerFromJSON(json) {
|
|
33
|
+
return SfvbItemContainerFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
exports.SfvbItemContainerFromJSON = SfvbItemContainerFromJSON;
|
|
36
|
+
function SfvbItemContainerFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if ((json === undefined) || (json === null)) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'cjson_size': !(0, runtime_1.exists)(json, 'cjson_size') ? undefined : json['cjson_size'],
|
|
42
|
+
'container_name': !(0, runtime_1.exists)(json, 'container_name') ? undefined : json['container_name'],
|
|
43
|
+
'hash_sha256': !(0, runtime_1.exists)(json, 'hash_sha256') ? undefined : json['hash_sha256'],
|
|
44
|
+
'last_modified': !(0, runtime_1.exists)(json, 'last_modified') ? undefined : json['last_modified'],
|
|
45
|
+
'merchant_item_id': !(0, runtime_1.exists)(json, 'merchant_item_id') ? undefined : json['merchant_item_id'],
|
|
46
|
+
'owner_object_id': !(0, runtime_1.exists)(json, 'owner_object_id') ? undefined : json['owner_object_id'],
|
|
47
|
+
'owner_type': !(0, runtime_1.exists)(json, 'owner_type') ? undefined : json['owner_type'],
|
|
48
|
+
'used_elements': !(0, runtime_1.exists)(json, 'used_elements') ? undefined : json['used_elements'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.SfvbItemContainerFromJSONTyped = SfvbItemContainerFromJSONTyped;
|
|
52
|
+
function SfvbItemContainerToJSON(value) {
|
|
53
|
+
if (value === undefined) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
if (value === null) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'cjson_size': value.cjson_size,
|
|
61
|
+
'container_name': value.container_name,
|
|
62
|
+
'hash_sha256': value.hash_sha256,
|
|
63
|
+
'last_modified': value.last_modified,
|
|
64
|
+
'merchant_item_id': value.merchant_item_id,
|
|
65
|
+
'owner_object_id': value.owner_object_id,
|
|
66
|
+
'owner_type': value.owner_type,
|
|
67
|
+
'used_elements': value.used_elements,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
exports.SfvbItemContainerToJSON = SfvbItemContainerToJSON;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { SfvbItemContainer } from './SfvbItemContainer';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SfvbItemContainersResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface SfvbItemContainersResponse {
|
|
19
|
+
/**
|
|
20
|
+
* The containers on this page, ordered by merchant item id then container name.
|
|
21
|
+
* @type {Array<SfvbItemContainer>}
|
|
22
|
+
* @memberof SfvbItemContainersResponse
|
|
23
|
+
*/
|
|
24
|
+
item_containers?: Array<SfvbItemContainer>;
|
|
25
|
+
/**
|
|
26
|
+
* The cap that was applied.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof SfvbItemContainersResponse
|
|
29
|
+
*/
|
|
30
|
+
max_results?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Offset to send for the next page. Zero when truncated is false. Never truncates without giving a way to continue.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof SfvbItemContainersResponse
|
|
35
|
+
*/
|
|
36
|
+
next_offset?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Containers skipped to produce this page.
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof SfvbItemContainersResponse
|
|
41
|
+
*/
|
|
42
|
+
offset?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Number of containers returned on this page.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof SfvbItemContainersResponse
|
|
47
|
+
*/
|
|
48
|
+
result_count?: number;
|
|
49
|
+
/**
|
|
50
|
+
* Total containers matching the filter. With container_name supplied this is the answer to how many items carry that slot.
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof SfvbItemContainersResponse
|
|
53
|
+
*/
|
|
54
|
+
total_count?: number;
|
|
55
|
+
/**
|
|
56
|
+
* True when containers exist beyond this page. next_offset is populated when it is.
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof SfvbItemContainersResponse
|
|
59
|
+
*/
|
|
60
|
+
truncated?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Advice for the caller when truncated is true.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof SfvbItemContainersResponse
|
|
65
|
+
*/
|
|
66
|
+
truncation_advice?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the SfvbItemContainersResponse interface.
|
|
70
|
+
*/
|
|
71
|
+
export declare function instanceOfSfvbItemContainersResponse(value: object): boolean;
|
|
72
|
+
export declare function SfvbItemContainersResponseFromJSON(json: any): SfvbItemContainersResponse;
|
|
73
|
+
export declare function SfvbItemContainersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbItemContainersResponse;
|
|
74
|
+
export declare function SfvbItemContainersResponseToJSON(value?: SfvbItemContainersResponse | null): any;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SfvbItemContainersResponseToJSON = exports.SfvbItemContainersResponseFromJSONTyped = exports.SfvbItemContainersResponseFromJSON = exports.instanceOfSfvbItemContainersResponse = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var SfvbItemContainer_1 = require("./SfvbItemContainer");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the SfvbItemContainersResponse interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfSfvbItemContainersResponse(value) {
|
|
23
|
+
var isInstance = true;
|
|
24
|
+
return isInstance;
|
|
25
|
+
}
|
|
26
|
+
exports.instanceOfSfvbItemContainersResponse = instanceOfSfvbItemContainersResponse;
|
|
27
|
+
function SfvbItemContainersResponseFromJSON(json) {
|
|
28
|
+
return SfvbItemContainersResponseFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.SfvbItemContainersResponseFromJSON = SfvbItemContainersResponseFromJSON;
|
|
31
|
+
function SfvbItemContainersResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'item_containers': !(0, runtime_1.exists)(json, 'item_containers') ? undefined : (json['item_containers'].map(SfvbItemContainer_1.SfvbItemContainerFromJSON)),
|
|
37
|
+
'max_results': !(0, runtime_1.exists)(json, 'max_results') ? undefined : json['max_results'],
|
|
38
|
+
'next_offset': !(0, runtime_1.exists)(json, 'next_offset') ? undefined : json['next_offset'],
|
|
39
|
+
'offset': !(0, runtime_1.exists)(json, 'offset') ? undefined : json['offset'],
|
|
40
|
+
'result_count': !(0, runtime_1.exists)(json, 'result_count') ? undefined : json['result_count'],
|
|
41
|
+
'total_count': !(0, runtime_1.exists)(json, 'total_count') ? undefined : json['total_count'],
|
|
42
|
+
'truncated': !(0, runtime_1.exists)(json, 'truncated') ? undefined : json['truncated'],
|
|
43
|
+
'truncation_advice': !(0, runtime_1.exists)(json, 'truncation_advice') ? undefined : json['truncation_advice'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.SfvbItemContainersResponseFromJSONTyped = SfvbItemContainersResponseFromJSONTyped;
|
|
47
|
+
function SfvbItemContainersResponseToJSON(value) {
|
|
48
|
+
if (value === undefined) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
if (value === null) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'item_containers': value.item_containers === undefined ? undefined : (value.item_containers.map(SfvbItemContainer_1.SfvbItemContainerToJSON)),
|
|
56
|
+
'max_results': value.max_results,
|
|
57
|
+
'next_offset': value.next_offset,
|
|
58
|
+
'offset': value.offset,
|
|
59
|
+
'result_count': value.result_count,
|
|
60
|
+
'total_count': value.total_count,
|
|
61
|
+
'truncated': value.truncated,
|
|
62
|
+
'truncation_advice': value.truncation_advice,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
exports.SfvbItemContainersResponseToJSON = SfvbItemContainersResponseToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -996,6 +996,8 @@ export * from './SfvbFileVersionsResponse';
|
|
|
996
996
|
export * from './SfvbFileWriteRequest';
|
|
997
997
|
export * from './SfvbFileWriteResponse';
|
|
998
998
|
export * from './SfvbFilesResponse';
|
|
999
|
+
export * from './SfvbItemContainer';
|
|
1000
|
+
export * from './SfvbItemContainersResponse';
|
|
999
1001
|
export * from './SfvbLibraryEntry';
|
|
1000
1002
|
export * from './SfvbLibraryFacet';
|
|
1001
1003
|
export * from './SfvbLibraryResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -1014,6 +1014,8 @@ __exportStar(require("./SfvbFileVersionsResponse"), exports);
|
|
|
1014
1014
|
__exportStar(require("./SfvbFileWriteRequest"), exports);
|
|
1015
1015
|
__exportStar(require("./SfvbFileWriteResponse"), exports);
|
|
1016
1016
|
__exportStar(require("./SfvbFilesResponse"), exports);
|
|
1017
|
+
__exportStar(require("./SfvbItemContainer"), exports);
|
|
1018
|
+
__exportStar(require("./SfvbItemContainersResponse"), exports);
|
|
1017
1019
|
__exportStar(require("./SfvbLibraryEntry"), exports);
|
|
1018
1020
|
__exportStar(require("./SfvbLibraryFacet"), exports);
|
|
1019
1021
|
__exportStar(require("./SfvbLibraryResponse"), exports);
|
package/package.json
CHANGED
package/src/apis/SfvbApi.ts
CHANGED
|
@@ -96,6 +96,9 @@ import {
|
|
|
96
96
|
SfvbFilesResponse,
|
|
97
97
|
SfvbFilesResponseFromJSON,
|
|
98
98
|
SfvbFilesResponseToJSON,
|
|
99
|
+
SfvbItemContainersResponse,
|
|
100
|
+
SfvbItemContainersResponseFromJSON,
|
|
101
|
+
SfvbItemContainersResponseToJSON,
|
|
99
102
|
SfvbLibraryEntry,
|
|
100
103
|
SfvbLibraryEntryFromJSON,
|
|
101
104
|
SfvbLibraryEntryToJSON,
|
|
@@ -436,6 +439,15 @@ export interface ListSfvbFilesRequest {
|
|
|
436
439
|
maxEntries?: number;
|
|
437
440
|
}
|
|
438
441
|
|
|
442
|
+
export interface ListSfvbItemContainersRequest {
|
|
443
|
+
storefrontOid: number;
|
|
444
|
+
merchantItemId?: string;
|
|
445
|
+
merchantItemOid?: number;
|
|
446
|
+
containerName?: string;
|
|
447
|
+
maxResults?: number;
|
|
448
|
+
offset?: number;
|
|
449
|
+
}
|
|
450
|
+
|
|
439
451
|
export interface ListSfvbPagesRequest {
|
|
440
452
|
storefrontOid: number;
|
|
441
453
|
under?: string;
|
|
@@ -1328,6 +1340,27 @@ export interface SfvbApiInterface {
|
|
|
1328
1340
|
*/
|
|
1329
1341
|
listSfvbFiles(requestParameters: ListSfvbFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbFilesResponse>;
|
|
1330
1342
|
|
|
1343
|
+
/**
|
|
1344
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
1345
|
+
* @summary List the item containers on the account
|
|
1346
|
+
* @param {number} storefrontOid
|
|
1347
|
+
* @param {string} [merchantItemId] Restrict to one item, by the merchant item id a storefront carries
|
|
1348
|
+
* @param {number} [merchantItemOid] Restrict to one item, by oid. Send this or merchant_item_id, not both
|
|
1349
|
+
* @param {string} [containerName] Restrict to one slot name, matched without regard to case
|
|
1350
|
+
* @param {number} [maxResults]
|
|
1351
|
+
* @param {number} [offset]
|
|
1352
|
+
* @param {*} [options] Override http request option.
|
|
1353
|
+
* @throws {RequiredError}
|
|
1354
|
+
* @memberof SfvbApiInterface
|
|
1355
|
+
*/
|
|
1356
|
+
listSfvbItemContainersRaw(requestParameters: ListSfvbItemContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbItemContainersResponse>>;
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
1360
|
+
* List the item containers on the account
|
|
1361
|
+
*/
|
|
1362
|
+
listSfvbItemContainers(requestParameters: ListSfvbItemContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemContainersResponse>;
|
|
1363
|
+
|
|
1331
1364
|
/**
|
|
1332
1365
|
* Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
1333
1366
|
* @summary List the storefront\'s pages
|
|
@@ -3813,6 +3846,67 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
3813
3846
|
return await response.value();
|
|
3814
3847
|
}
|
|
3815
3848
|
|
|
3849
|
+
/**
|
|
3850
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
3851
|
+
* List the item containers on the account
|
|
3852
|
+
*/
|
|
3853
|
+
async listSfvbItemContainersRaw(requestParameters: ListSfvbItemContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbItemContainersResponse>> {
|
|
3854
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
3855
|
+
throw new runtime.RequiredError('storefrontOid','Required parameter requestParameters.storefrontOid was null or undefined when calling listSfvbItemContainers.');
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
const queryParameters: any = {};
|
|
3859
|
+
|
|
3860
|
+
if (requestParameters.merchantItemId !== undefined) {
|
|
3861
|
+
queryParameters['merchant_item_id'] = requestParameters.merchantItemId;
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
if (requestParameters.merchantItemOid !== undefined) {
|
|
3865
|
+
queryParameters['merchant_item_oid'] = requestParameters.merchantItemOid;
|
|
3866
|
+
}
|
|
3867
|
+
|
|
3868
|
+
if (requestParameters.containerName !== undefined) {
|
|
3869
|
+
queryParameters['container_name'] = requestParameters.containerName;
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3872
|
+
if (requestParameters.maxResults !== undefined) {
|
|
3873
|
+
queryParameters['max_results'] = requestParameters.maxResults;
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3876
|
+
if (requestParameters.offset !== undefined) {
|
|
3877
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
3881
|
+
|
|
3882
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3883
|
+
// oauth required
|
|
3884
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
|
|
3885
|
+
}
|
|
3886
|
+
|
|
3887
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3888
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
3889
|
+
}
|
|
3890
|
+
|
|
3891
|
+
const response = await this.request({
|
|
3892
|
+
path: `/sfvb/storefronts/{storefront_oid}/item_containers`.replace(`{${"storefront_oid"}}`, encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
3893
|
+
method: 'GET',
|
|
3894
|
+
headers: headerParameters,
|
|
3895
|
+
query: queryParameters,
|
|
3896
|
+
}, initOverrides);
|
|
3897
|
+
|
|
3898
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SfvbItemContainersResponseFromJSON(jsonValue));
|
|
3899
|
+
}
|
|
3900
|
+
|
|
3901
|
+
/**
|
|
3902
|
+
* An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller\'s storefront but does not narrow the result.
|
|
3903
|
+
* List the item containers on the account
|
|
3904
|
+
*/
|
|
3905
|
+
async listSfvbItemContainers(requestParameters: ListSfvbItemContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemContainersResponse> {
|
|
3906
|
+
const response = await this.listSfvbItemContainersRaw(requestParameters, initOverrides);
|
|
3907
|
+
return await response.value();
|
|
3908
|
+
}
|
|
3909
|
+
|
|
3816
3910
|
/**
|
|
3817
3911
|
* Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
3818
3912
|
* List the storefront\'s pages
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SfvbItemContainer
|
|
20
|
+
*/
|
|
21
|
+
export interface SfvbItemContainer {
|
|
22
|
+
/**
|
|
23
|
+
* Size of the CJSON in UTF-8 bytes, which is the same unit the container version size and the upsell offer cjson_size use.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof SfvbItemContainer
|
|
26
|
+
*/
|
|
27
|
+
cjson_size?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The slot name. This is the value an itemcontainer element's itemContainerName setting holds, which is what ties a container to the element that renders it.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SfvbItemContainer
|
|
32
|
+
*/
|
|
33
|
+
container_name?: string;
|
|
34
|
+
/**
|
|
35
|
+
* SHA-256 of the container's CJSON. Identical to the value a read of the container returns, so a listing is enough to start an If-Match write without reading first.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SfvbItemContainer
|
|
38
|
+
*/
|
|
39
|
+
hash_sha256?: string;
|
|
40
|
+
/**
|
|
41
|
+
* When the container was last written. Absent for a container untouched since the storage began recording the time, so read an absent value as unknown rather than as never modified.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SfvbItemContainer
|
|
44
|
+
*/
|
|
45
|
+
last_modified?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The owning item's merchant item id. This is the identifier a storefront carries and a merchant recognizes; the oid appears nowhere on a rendered page. Send it as owner_type itemid to address the same container without converting it first.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SfvbItemContainer
|
|
50
|
+
*/
|
|
51
|
+
merchant_item_id?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The merchant item oid, spelled the way containers/item/{owner_object_id} takes it.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof SfvbItemContainer
|
|
56
|
+
*/
|
|
57
|
+
owner_object_id?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Always item. Carried so a row is usable as an address without the caller having to know which listing it came from.
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof SfvbItemContainer
|
|
62
|
+
*/
|
|
63
|
+
owner_type?: SfvbItemContainerOwnerTypeEnum;
|
|
64
|
+
/**
|
|
65
|
+
* The element types this container uses, recorded by the storage when it was written. A large cjson_size beside a handful of element types is the signature of markup pasted into a single html element. Absent on a container written before the storage began recording this.
|
|
66
|
+
* @type {Array<string>}
|
|
67
|
+
* @memberof SfvbItemContainer
|
|
68
|
+
*/
|
|
69
|
+
used_elements?: Array<string>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @export
|
|
76
|
+
*/
|
|
77
|
+
export const SfvbItemContainerOwnerTypeEnum = {
|
|
78
|
+
Item: 'item'
|
|
79
|
+
} as const;
|
|
80
|
+
export type SfvbItemContainerOwnerTypeEnum = typeof SfvbItemContainerOwnerTypeEnum[keyof typeof SfvbItemContainerOwnerTypeEnum];
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Check if a given object implements the SfvbItemContainer interface.
|
|
85
|
+
*/
|
|
86
|
+
export function instanceOfSfvbItemContainer(value: object): boolean {
|
|
87
|
+
let isInstance = true;
|
|
88
|
+
|
|
89
|
+
return isInstance;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function SfvbItemContainerFromJSON(json: any): SfvbItemContainer {
|
|
93
|
+
return SfvbItemContainerFromJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function SfvbItemContainerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbItemContainer {
|
|
97
|
+
if ((json === undefined) || (json === null)) {
|
|
98
|
+
return json;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
|
|
102
|
+
'cjson_size': !exists(json, 'cjson_size') ? undefined : json['cjson_size'],
|
|
103
|
+
'container_name': !exists(json, 'container_name') ? undefined : json['container_name'],
|
|
104
|
+
'hash_sha256': !exists(json, 'hash_sha256') ? undefined : json['hash_sha256'],
|
|
105
|
+
'last_modified': !exists(json, 'last_modified') ? undefined : json['last_modified'],
|
|
106
|
+
'merchant_item_id': !exists(json, 'merchant_item_id') ? undefined : json['merchant_item_id'],
|
|
107
|
+
'owner_object_id': !exists(json, 'owner_object_id') ? undefined : json['owner_object_id'],
|
|
108
|
+
'owner_type': !exists(json, 'owner_type') ? undefined : json['owner_type'],
|
|
109
|
+
'used_elements': !exists(json, 'used_elements') ? undefined : json['used_elements'],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function SfvbItemContainerToJSON(value?: SfvbItemContainer | null): any {
|
|
114
|
+
if (value === undefined) {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
if (value === null) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
|
|
122
|
+
'cjson_size': value.cjson_size,
|
|
123
|
+
'container_name': value.container_name,
|
|
124
|
+
'hash_sha256': value.hash_sha256,
|
|
125
|
+
'last_modified': value.last_modified,
|
|
126
|
+
'merchant_item_id': value.merchant_item_id,
|
|
127
|
+
'owner_object_id': value.owner_object_id,
|
|
128
|
+
'owner_type': value.owner_type,
|
|
129
|
+
'used_elements': value.used_elements,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
SfvbItemContainer,
|
|
18
|
+
SfvbItemContainerFromJSON,
|
|
19
|
+
SfvbItemContainerFromJSONTyped,
|
|
20
|
+
SfvbItemContainerToJSON,
|
|
21
|
+
} from './SfvbItemContainer';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface SfvbItemContainersResponse
|
|
27
|
+
*/
|
|
28
|
+
export interface SfvbItemContainersResponse {
|
|
29
|
+
/**
|
|
30
|
+
* The containers on this page, ordered by merchant item id then container name.
|
|
31
|
+
* @type {Array<SfvbItemContainer>}
|
|
32
|
+
* @memberof SfvbItemContainersResponse
|
|
33
|
+
*/
|
|
34
|
+
item_containers?: Array<SfvbItemContainer>;
|
|
35
|
+
/**
|
|
36
|
+
* The cap that was applied.
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof SfvbItemContainersResponse
|
|
39
|
+
*/
|
|
40
|
+
max_results?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Offset to send for the next page. Zero when truncated is false. Never truncates without giving a way to continue.
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof SfvbItemContainersResponse
|
|
45
|
+
*/
|
|
46
|
+
next_offset?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Containers skipped to produce this page.
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof SfvbItemContainersResponse
|
|
51
|
+
*/
|
|
52
|
+
offset?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Number of containers returned on this page.
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof SfvbItemContainersResponse
|
|
57
|
+
*/
|
|
58
|
+
result_count?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Total containers matching the filter. With container_name supplied this is the answer to how many items carry that slot.
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof SfvbItemContainersResponse
|
|
63
|
+
*/
|
|
64
|
+
total_count?: number;
|
|
65
|
+
/**
|
|
66
|
+
* True when containers exist beyond this page. next_offset is populated when it is.
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
* @memberof SfvbItemContainersResponse
|
|
69
|
+
*/
|
|
70
|
+
truncated?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Advice for the caller when truncated is true.
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof SfvbItemContainersResponse
|
|
75
|
+
*/
|
|
76
|
+
truncation_advice?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Check if a given object implements the SfvbItemContainersResponse interface.
|
|
83
|
+
*/
|
|
84
|
+
export function instanceOfSfvbItemContainersResponse(value: object): boolean {
|
|
85
|
+
let isInstance = true;
|
|
86
|
+
|
|
87
|
+
return isInstance;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function SfvbItemContainersResponseFromJSON(json: any): SfvbItemContainersResponse {
|
|
91
|
+
return SfvbItemContainersResponseFromJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function SfvbItemContainersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbItemContainersResponse {
|
|
95
|
+
if ((json === undefined) || (json === null)) {
|
|
96
|
+
return json;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'item_containers': !exists(json, 'item_containers') ? undefined : ((json['item_containers'] as Array<any>).map(SfvbItemContainerFromJSON)),
|
|
101
|
+
'max_results': !exists(json, 'max_results') ? undefined : json['max_results'],
|
|
102
|
+
'next_offset': !exists(json, 'next_offset') ? undefined : json['next_offset'],
|
|
103
|
+
'offset': !exists(json, 'offset') ? undefined : json['offset'],
|
|
104
|
+
'result_count': !exists(json, 'result_count') ? undefined : json['result_count'],
|
|
105
|
+
'total_count': !exists(json, 'total_count') ? undefined : json['total_count'],
|
|
106
|
+
'truncated': !exists(json, 'truncated') ? undefined : json['truncated'],
|
|
107
|
+
'truncation_advice': !exists(json, 'truncation_advice') ? undefined : json['truncation_advice'],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function SfvbItemContainersResponseToJSON(value?: SfvbItemContainersResponse | null): any {
|
|
112
|
+
if (value === undefined) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
if (value === null) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'item_containers': value.item_containers === undefined ? undefined : ((value.item_containers as Array<any>).map(SfvbItemContainerToJSON)),
|
|
121
|
+
'max_results': value.max_results,
|
|
122
|
+
'next_offset': value.next_offset,
|
|
123
|
+
'offset': value.offset,
|
|
124
|
+
'result_count': value.result_count,
|
|
125
|
+
'total_count': value.total_count,
|
|
126
|
+
'truncated': value.truncated,
|
|
127
|
+
'truncation_advice': value.truncation_advice,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -998,6 +998,8 @@ export * from './SfvbFileVersionsResponse';
|
|
|
998
998
|
export * from './SfvbFileWriteRequest';
|
|
999
999
|
export * from './SfvbFileWriteResponse';
|
|
1000
1000
|
export * from './SfvbFilesResponse';
|
|
1001
|
+
export * from './SfvbItemContainer';
|
|
1002
|
+
export * from './SfvbItemContainersResponse';
|
|
1001
1003
|
export * from './SfvbLibraryEntry';
|
|
1002
1004
|
export * from './SfvbLibraryFacet';
|
|
1003
1005
|
export * from './SfvbLibraryResponse';
|