ultracart_rest_api_v2_typescript 4.1.153 → 4.1.155
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 +4 -2
- package/dist/apis/SfvbApi.d.ts +38 -6
- package/dist/apis/SfvbApi.js +65 -2
- package/dist/models/SfvbElement.d.ts +6 -0
- package/dist/models/SfvbElement.js +2 -0
- package/dist/models/SfvbElementSchemaResponse.d.ts +7 -1
- package/dist/models/SfvbElementSchemaResponse.js +2 -0
- package/dist/models/SfvbPreviewAccessRequest.d.ts +43 -0
- package/dist/models/SfvbPreviewAccessRequest.js +54 -0
- package/dist/models/SfvbPreviewAccessResponse.d.ts +73 -0
- package/dist/models/SfvbPreviewAccessResponse.js +64 -0
- package/dist/models/SfvbThemeJobResponse.d.ts +1 -1
- 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 +80 -5
- package/src/models/SfvbElement.ts +8 -0
- package/src/models/SfvbElementSchemaResponse.ts +9 -1
- package/src/models/SfvbPreviewAccessRequest.ts +83 -0
- package/src/models/SfvbPreviewAccessResponse.ts +123 -0
- package/src/models/SfvbThemeJobResponse.ts +1 -1
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -1021,6 +1021,8 @@ src/models/SfvbPageAttributeUpdateRequest.ts
|
|
|
1021
1021
|
src/models/SfvbPageMultimedia.ts
|
|
1022
1022
|
src/models/SfvbPageMultimediaRequest.ts
|
|
1023
1023
|
src/models/SfvbPageResponse.ts
|
|
1024
|
+
src/models/SfvbPreviewAccessRequest.ts
|
|
1025
|
+
src/models/SfvbPreviewAccessResponse.ts
|
|
1024
1026
|
src/models/SfvbPreviewSessionRequest.ts
|
|
1025
1027
|
src/models/SfvbPreviewSessionResponse.ts
|
|
1026
1028
|
src/models/SfvbPreviewUrlResponse.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.155
|
|
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.155 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -85,6 +85,8 @@ Not every change is committed to every SDK.
|
|
|
85
85
|
|
|
86
86
|
| Version | Date | Comments |
|
|
87
87
|
| --: | :-: | --- |
|
|
88
|
+
| 4.1.155 | 09/15/2026 | sfvb internal testing |
|
|
89
|
+
| 4.1.154 | 09/14/2026 | sfvb internal testing |
|
|
88
90
|
| 4.1.153 | 09/14/2026 | sfvb internal testing |
|
|
89
91
|
| 4.1.152 | 09/09/2026 | sfvb - internal testing |
|
|
90
92
|
| 4.1.151 | 09/04/2026 | conversations - added ai agent capabilities |
|
package/dist/apis/SfvbApi.d.ts
CHANGED
|
@@ -10,10 +10,14 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbLibraryEntry, SfvbLibraryResponse, SfvbPageAttributeUpdateRequest, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbStorefrontsResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffersResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
|
|
13
|
+
import { SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbLibraryEntry, SfvbLibraryResponse, SfvbPageAttributeUpdateRequest, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbStorefrontsResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffersResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
|
|
14
14
|
export interface CompileSfvbCjsonRequest {
|
|
15
15
|
compileRequest: SfvbCompileRequest;
|
|
16
16
|
}
|
|
17
|
+
export interface CreateSfvbPreviewAccessRequest {
|
|
18
|
+
storefrontOid: number;
|
|
19
|
+
previewAccess?: SfvbPreviewAccessRequest;
|
|
20
|
+
}
|
|
17
21
|
export interface CreateSfvbPreviewSessionRequest {
|
|
18
22
|
storefrontOid: number;
|
|
19
23
|
}
|
|
@@ -223,6 +227,21 @@ export interface SfvbApiInterface {
|
|
|
223
227
|
* Compile CJSON to Velocity
|
|
224
228
|
*/
|
|
225
229
|
compileSfvbCjson(requestParameters: CompileSfvbCjsonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbCompileResponse>;
|
|
230
|
+
/**
|
|
231
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
232
|
+
* @summary One time link that opens a preview in a browser with no UltraCart login
|
|
233
|
+
* @param {number} storefrontOid
|
|
234
|
+
* @param {SfvbPreviewAccessRequest} [previewAccess] What the browser should see
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
* @memberof SfvbApiInterface
|
|
238
|
+
*/
|
|
239
|
+
createSfvbPreviewAccessRaw(requestParameters: CreateSfvbPreviewAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPreviewAccessResponse>>;
|
|
240
|
+
/**
|
|
241
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
242
|
+
* One time link that opens a preview in a browser with no UltraCart login
|
|
243
|
+
*/
|
|
244
|
+
createSfvbPreviewAccess(requestParameters: CreateSfvbPreviewAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewAccessResponse>;
|
|
226
245
|
/**
|
|
227
246
|
* Returns a server generated session id to push containers into, and opens the session so that id exists rather than merely being random. The id is not caller supplied, because concurrent agents choosing their own would be free to collide, and the browser editor\'s habit of minting one with Math.random is not a property worth carrying into an API. Expires after eight hours and can be deleted sooner. Requires a token that resolves to a user, so use the device authorization flow.
|
|
228
247
|
* @summary Create a preview session
|
|
@@ -365,8 +384,8 @@ export interface SfvbApiInterface {
|
|
|
365
384
|
*/
|
|
366
385
|
getSfvbContainerVersion(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersion>;
|
|
367
386
|
/**
|
|
368
|
-
*
|
|
369
|
-
* @summary Configuration schema for one element type
|
|
387
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
388
|
+
* @summary Configuration schema and field card for one element type
|
|
370
389
|
* @param {string} elementType
|
|
371
390
|
* @param {*} [options] Override http request option.
|
|
372
391
|
* @throws {RequiredError}
|
|
@@ -374,7 +393,8 @@ export interface SfvbApiInterface {
|
|
|
374
393
|
*/
|
|
375
394
|
getSfvbElementRaw(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbElementSchemaResponse>>;
|
|
376
395
|
/**
|
|
377
|
-
*
|
|
396
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
397
|
+
* Configuration schema and field card for one element type
|
|
378
398
|
*/
|
|
379
399
|
getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse>;
|
|
380
400
|
/**
|
|
@@ -902,6 +922,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
902
922
|
* Compile CJSON to Velocity
|
|
903
923
|
*/
|
|
904
924
|
compileSfvbCjson(requestParameters: CompileSfvbCjsonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbCompileResponse>;
|
|
925
|
+
/**
|
|
926
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
927
|
+
* One time link that opens a preview in a browser with no UltraCart login
|
|
928
|
+
*/
|
|
929
|
+
createSfvbPreviewAccessRaw(requestParameters: CreateSfvbPreviewAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPreviewAccessResponse>>;
|
|
930
|
+
/**
|
|
931
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
932
|
+
* One time link that opens a preview in a browser with no UltraCart login
|
|
933
|
+
*/
|
|
934
|
+
createSfvbPreviewAccess(requestParameters: CreateSfvbPreviewAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewAccessResponse>;
|
|
905
935
|
/**
|
|
906
936
|
* Returns a server generated session id to push containers into, and opens the session so that id exists rather than merely being random. The id is not caller supplied, because concurrent agents choosing their own would be free to collide, and the browser editor\'s habit of minting one with Math.random is not a property worth carrying into an API. Expires after eight hours and can be deleted sooner. Requires a token that resolves to a user, so use the device authorization flow.
|
|
907
937
|
* Create a preview session
|
|
@@ -991,11 +1021,13 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
991
1021
|
*/
|
|
992
1022
|
getSfvbContainerVersion(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersion>;
|
|
993
1023
|
/**
|
|
994
|
-
*
|
|
1024
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
1025
|
+
* Configuration schema and field card for one element type
|
|
995
1026
|
*/
|
|
996
1027
|
getSfvbElementRaw(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbElementSchemaResponse>>;
|
|
997
1028
|
/**
|
|
998
|
-
*
|
|
1029
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
1030
|
+
* Configuration schema and field card for one element type
|
|
999
1031
|
*/
|
|
1000
1032
|
getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse>;
|
|
1001
1033
|
/**
|
package/dist/apis/SfvbApi.js
CHANGED
|
@@ -136,6 +136,67 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
141
|
+
* One time link that opens a preview in a browser with no UltraCart login
|
|
142
|
+
*/
|
|
143
|
+
SfvbApi.prototype.createSfvbPreviewAccessRaw = function (requestParameters, initOverrides) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
145
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
146
|
+
return __generator(this, function (_c) {
|
|
147
|
+
switch (_c.label) {
|
|
148
|
+
case 0:
|
|
149
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
150
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling createSfvbPreviewAccess.');
|
|
151
|
+
}
|
|
152
|
+
queryParameters = {};
|
|
153
|
+
headerParameters = {};
|
|
154
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
155
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
156
|
+
// oauth required
|
|
157
|
+
_a = headerParameters;
|
|
158
|
+
_b = "Authorization";
|
|
159
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
160
|
+
case 1:
|
|
161
|
+
// oauth required
|
|
162
|
+
_a[_b] = _c.sent();
|
|
163
|
+
_c.label = 2;
|
|
164
|
+
case 2:
|
|
165
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
166
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
167
|
+
}
|
|
168
|
+
return [4 /*yield*/, this.request({
|
|
169
|
+
path: "/sfvb/storefronts/{storefront_oid}/preview_access".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
170
|
+
method: 'POST',
|
|
171
|
+
headers: headerParameters,
|
|
172
|
+
query: queryParameters,
|
|
173
|
+
body: (0, models_1.SfvbPreviewAccessRequestToJSON)(requestParameters.previewAccess),
|
|
174
|
+
}, initOverrides)];
|
|
175
|
+
case 3:
|
|
176
|
+
response = _c.sent();
|
|
177
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbPreviewAccessResponseFromJSON)(jsonValue); })];
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
184
|
+
* One time link that opens a preview in a browser with no UltraCart login
|
|
185
|
+
*/
|
|
186
|
+
SfvbApi.prototype.createSfvbPreviewAccess = function (requestParameters, initOverrides) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
188
|
+
var response;
|
|
189
|
+
return __generator(this, function (_a) {
|
|
190
|
+
switch (_a.label) {
|
|
191
|
+
case 0: return [4 /*yield*/, this.createSfvbPreviewAccessRaw(requestParameters, initOverrides)];
|
|
192
|
+
case 1:
|
|
193
|
+
response = _a.sent();
|
|
194
|
+
return [4 /*yield*/, response.value()];
|
|
195
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
};
|
|
139
200
|
/**
|
|
140
201
|
* Returns a server generated session id to push containers into, and opens the session so that id exists rather than merely being random. The id is not caller supplied, because concurrent agents choosing their own would be free to collide, and the browser editor\'s habit of minting one with Math.random is not a property worth carrying into an API. Expires after eight hours and can be deleted sooner. Requires a token that resolves to a user, so use the device authorization flow.
|
|
141
202
|
* Create a preview session
|
|
@@ -718,7 +779,8 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
718
779
|
});
|
|
719
780
|
};
|
|
720
781
|
/**
|
|
721
|
-
*
|
|
782
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
783
|
+
* Configuration schema and field card for one element type
|
|
722
784
|
*/
|
|
723
785
|
SfvbApi.prototype.getSfvbElementRaw = function (requestParameters, initOverrides) {
|
|
724
786
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -758,7 +820,8 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
758
820
|
});
|
|
759
821
|
};
|
|
760
822
|
/**
|
|
761
|
-
*
|
|
823
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
824
|
+
* Configuration schema and field card for one element type
|
|
762
825
|
*/
|
|
763
826
|
SfvbApi.prototype.getSfvbElement = function (requestParameters, initOverrides) {
|
|
764
827
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* @interface SfvbElement
|
|
16
16
|
*/
|
|
17
17
|
export interface SfvbElement {
|
|
18
|
+
/**
|
|
19
|
+
* True when a markdown field card for this element is available from elements/{element_type}.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof SfvbElement
|
|
22
|
+
*/
|
|
23
|
+
doc_available?: boolean;
|
|
18
24
|
/**
|
|
19
25
|
* True when a per element configuration schema is available from elements/{element_type}.
|
|
20
26
|
* @type {boolean}
|
|
@@ -32,6 +32,7 @@ function SfvbElementFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
32
|
return json;
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
|
+
'doc_available': !(0, runtime_1.exists)(json, 'doc_available') ? undefined : json['doc_available'],
|
|
35
36
|
'schema_available': !(0, runtime_1.exists)(json, 'schema_available') ? undefined : json['schema_available'],
|
|
36
37
|
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
|
|
37
38
|
};
|
|
@@ -45,6 +46,7 @@ function SfvbElementToJSON(value) {
|
|
|
45
46
|
return null;
|
|
46
47
|
}
|
|
47
48
|
return {
|
|
49
|
+
'doc_available': value.doc_available,
|
|
48
50
|
'schema_available': value.schema_available,
|
|
49
51
|
'type': value.type,
|
|
50
52
|
};
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface SfvbElementSchemaResponse {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Markdown field card for this element, as a string. Omitted when no field card has been published for this element.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbElementSchemaResponse
|
|
22
|
+
*/
|
|
23
|
+
doc?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Draft-07 JSON schema for this element's config object, as a JSON string. Omitted when no schema has been published for this element.
|
|
20
26
|
* @type {string}
|
|
21
27
|
* @memberof SfvbElementSchemaResponse
|
|
22
28
|
*/
|
|
@@ -32,6 +32,7 @@ function SfvbElementSchemaResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
32
|
return json;
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
|
+
'doc': !(0, runtime_1.exists)(json, 'doc') ? undefined : json['doc'],
|
|
35
36
|
'schema': !(0, runtime_1.exists)(json, 'schema') ? undefined : json['schema'],
|
|
36
37
|
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
|
|
37
38
|
};
|
|
@@ -45,6 +46,7 @@ function SfvbElementSchemaResponseToJSON(value) {
|
|
|
45
46
|
return null;
|
|
46
47
|
}
|
|
47
48
|
return {
|
|
49
|
+
'doc': value.doc,
|
|
48
50
|
'schema': value.schema,
|
|
49
51
|
'type': value.type,
|
|
50
52
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
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 SfvbPreviewAccessRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbPreviewAccessRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Storefront path to land on, beginning with a slash. Defaults to /
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbPreviewAccessRequest
|
|
22
|
+
*/
|
|
23
|
+
path?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Staged preview session to show. It must be one this user created and it must not have expired. Leave it out to show the saved containers with nothing staged.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SfvbPreviewAccessRequest
|
|
28
|
+
*/
|
|
29
|
+
preview_session_id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Theme to show, which may be inactive. Must belong to this storefront. Defaults to the active theme.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof SfvbPreviewAccessRequest
|
|
34
|
+
*/
|
|
35
|
+
theme_oid?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the SfvbPreviewAccessRequest interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfSfvbPreviewAccessRequest(value: object): boolean;
|
|
41
|
+
export declare function SfvbPreviewAccessRequestFromJSON(json: any): SfvbPreviewAccessRequest;
|
|
42
|
+
export declare function SfvbPreviewAccessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbPreviewAccessRequest;
|
|
43
|
+
export declare function SfvbPreviewAccessRequestToJSON(value?: SfvbPreviewAccessRequest | null): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.SfvbPreviewAccessRequestToJSON = exports.SfvbPreviewAccessRequestFromJSONTyped = exports.SfvbPreviewAccessRequestFromJSON = exports.instanceOfSfvbPreviewAccessRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the SfvbPreviewAccessRequest interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfSfvbPreviewAccessRequest(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfSfvbPreviewAccessRequest = instanceOfSfvbPreviewAccessRequest;
|
|
26
|
+
function SfvbPreviewAccessRequestFromJSON(json) {
|
|
27
|
+
return SfvbPreviewAccessRequestFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.SfvbPreviewAccessRequestFromJSON = SfvbPreviewAccessRequestFromJSON;
|
|
30
|
+
function SfvbPreviewAccessRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'path': !(0, runtime_1.exists)(json, 'path') ? undefined : json['path'],
|
|
36
|
+
'preview_session_id': !(0, runtime_1.exists)(json, 'preview_session_id') ? undefined : json['preview_session_id'],
|
|
37
|
+
'theme_oid': !(0, runtime_1.exists)(json, 'theme_oid') ? undefined : json['theme_oid'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.SfvbPreviewAccessRequestFromJSONTyped = SfvbPreviewAccessRequestFromJSONTyped;
|
|
41
|
+
function SfvbPreviewAccessRequestToJSON(value) {
|
|
42
|
+
if (value === undefined) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (value === null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'path': value.path,
|
|
50
|
+
'preview_session_id': value.preview_session_id,
|
|
51
|
+
'theme_oid': value.theme_oid,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
exports.SfvbPreviewAccessRequestToJSON = SfvbPreviewAccessRequestToJSON;
|
|
@@ -0,0 +1,73 @@
|
|
|
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 SfvbPreviewAccessResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbPreviewAccessResponse {
|
|
18
|
+
/**
|
|
19
|
+
* One time link on the storefront's own host. Opening it in any browser, including an agent's built in browser with no UltraCart login, gets past the storefront lock and applies the preview session and theme for the rest of that browser's session, then redirects to path. It is a credential until used, so do not paste it anywhere other than the browser that should open it.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbPreviewAccessResponse
|
|
22
|
+
*/
|
|
23
|
+
access_url?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Seconds left to open access_url. It stops working after that, and after its first use.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof SfvbPreviewAccessResponse
|
|
28
|
+
*/
|
|
29
|
+
expires_in_seconds?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Storefront path the browser lands on, after reserved preview parameters are removed.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SfvbPreviewAccessResponse
|
|
34
|
+
*/
|
|
35
|
+
path?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The preview session applied, when one was requested.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SfvbPreviewAccessResponse
|
|
40
|
+
*/
|
|
41
|
+
preview_session_id?: string;
|
|
42
|
+
/**
|
|
43
|
+
* How long the browser stays in preview once access_url is opened. The remaining life of the preview session, or eight hours when none was given. The user and their storefront permission are checked again on every page, so removing either ends it sooner.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof SfvbPreviewAccessResponse
|
|
46
|
+
*/
|
|
47
|
+
session_lifetime_seconds?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Always true. A second open of access_url returns 410.
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof SfvbPreviewAccessResponse
|
|
52
|
+
*/
|
|
53
|
+
single_use?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The theme shown, when one was requested.
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof SfvbPreviewAccessResponse
|
|
58
|
+
*/
|
|
59
|
+
theme_oid?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Plain language instructions, safe to show a user.
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof SfvbPreviewAccessResponse
|
|
64
|
+
*/
|
|
65
|
+
usage_note?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check if a given object implements the SfvbPreviewAccessResponse interface.
|
|
69
|
+
*/
|
|
70
|
+
export declare function instanceOfSfvbPreviewAccessResponse(value: object): boolean;
|
|
71
|
+
export declare function SfvbPreviewAccessResponseFromJSON(json: any): SfvbPreviewAccessResponse;
|
|
72
|
+
export declare function SfvbPreviewAccessResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbPreviewAccessResponse;
|
|
73
|
+
export declare function SfvbPreviewAccessResponseToJSON(value?: SfvbPreviewAccessResponse | null): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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.SfvbPreviewAccessResponseToJSON = exports.SfvbPreviewAccessResponseFromJSONTyped = exports.SfvbPreviewAccessResponseFromJSON = exports.instanceOfSfvbPreviewAccessResponse = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the SfvbPreviewAccessResponse interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfSfvbPreviewAccessResponse(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfSfvbPreviewAccessResponse = instanceOfSfvbPreviewAccessResponse;
|
|
26
|
+
function SfvbPreviewAccessResponseFromJSON(json) {
|
|
27
|
+
return SfvbPreviewAccessResponseFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.SfvbPreviewAccessResponseFromJSON = SfvbPreviewAccessResponseFromJSON;
|
|
30
|
+
function SfvbPreviewAccessResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'access_url': !(0, runtime_1.exists)(json, 'access_url') ? undefined : json['access_url'],
|
|
36
|
+
'expires_in_seconds': !(0, runtime_1.exists)(json, 'expires_in_seconds') ? undefined : json['expires_in_seconds'],
|
|
37
|
+
'path': !(0, runtime_1.exists)(json, 'path') ? undefined : json['path'],
|
|
38
|
+
'preview_session_id': !(0, runtime_1.exists)(json, 'preview_session_id') ? undefined : json['preview_session_id'],
|
|
39
|
+
'session_lifetime_seconds': !(0, runtime_1.exists)(json, 'session_lifetime_seconds') ? undefined : json['session_lifetime_seconds'],
|
|
40
|
+
'single_use': !(0, runtime_1.exists)(json, 'single_use') ? undefined : json['single_use'],
|
|
41
|
+
'theme_oid': !(0, runtime_1.exists)(json, 'theme_oid') ? undefined : json['theme_oid'],
|
|
42
|
+
'usage_note': !(0, runtime_1.exists)(json, 'usage_note') ? undefined : json['usage_note'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.SfvbPreviewAccessResponseFromJSONTyped = SfvbPreviewAccessResponseFromJSONTyped;
|
|
46
|
+
function SfvbPreviewAccessResponseToJSON(value) {
|
|
47
|
+
if (value === undefined) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
if (value === null) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'access_url': value.access_url,
|
|
55
|
+
'expires_in_seconds': value.expires_in_seconds,
|
|
56
|
+
'path': value.path,
|
|
57
|
+
'preview_session_id': value.preview_session_id,
|
|
58
|
+
'session_lifetime_seconds': value.session_lifetime_seconds,
|
|
59
|
+
'single_use': value.single_use,
|
|
60
|
+
'theme_oid': value.theme_oid,
|
|
61
|
+
'usage_note': value.usage_note,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
exports.SfvbPreviewAccessResponseToJSON = SfvbPreviewAccessResponseToJSON;
|
|
@@ -28,7 +28,7 @@ export interface SfvbThemeJobResponse {
|
|
|
28
28
|
*/
|
|
29
29
|
description?: string;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* What to do next when the job did not produce a theme. The internal cause is not returned; it is recorded against the job id in the server log.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof SfvbThemeJobResponse
|
|
34
34
|
*/
|
package/dist/models/index.d.ts
CHANGED
|
@@ -991,6 +991,8 @@ export * from './SfvbPageAttributeUpdateRequest';
|
|
|
991
991
|
export * from './SfvbPageMultimedia';
|
|
992
992
|
export * from './SfvbPageMultimediaRequest';
|
|
993
993
|
export * from './SfvbPageResponse';
|
|
994
|
+
export * from './SfvbPreviewAccessRequest';
|
|
995
|
+
export * from './SfvbPreviewAccessResponse';
|
|
994
996
|
export * from './SfvbPreviewSessionRequest';
|
|
995
997
|
export * from './SfvbPreviewSessionResponse';
|
|
996
998
|
export * from './SfvbPreviewUrlResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -1009,6 +1009,8 @@ __exportStar(require("./SfvbPageAttributeUpdateRequest"), exports);
|
|
|
1009
1009
|
__exportStar(require("./SfvbPageMultimedia"), exports);
|
|
1010
1010
|
__exportStar(require("./SfvbPageMultimediaRequest"), exports);
|
|
1011
1011
|
__exportStar(require("./SfvbPageResponse"), exports);
|
|
1012
|
+
__exportStar(require("./SfvbPreviewAccessRequest"), exports);
|
|
1013
|
+
__exportStar(require("./SfvbPreviewAccessResponse"), exports);
|
|
1012
1014
|
__exportStar(require("./SfvbPreviewSessionRequest"), exports);
|
|
1013
1015
|
__exportStar(require("./SfvbPreviewSessionResponse"), exports);
|
|
1014
1016
|
__exportStar(require("./SfvbPreviewUrlResponse"), exports);
|
package/package.json
CHANGED
package/src/apis/SfvbApi.ts
CHANGED
|
@@ -90,6 +90,12 @@ import {
|
|
|
90
90
|
SfvbPageResponse,
|
|
91
91
|
SfvbPageResponseFromJSON,
|
|
92
92
|
SfvbPageResponseToJSON,
|
|
93
|
+
SfvbPreviewAccessRequest,
|
|
94
|
+
SfvbPreviewAccessRequestFromJSON,
|
|
95
|
+
SfvbPreviewAccessRequestToJSON,
|
|
96
|
+
SfvbPreviewAccessResponse,
|
|
97
|
+
SfvbPreviewAccessResponseFromJSON,
|
|
98
|
+
SfvbPreviewAccessResponseToJSON,
|
|
93
99
|
SfvbPreviewSessionRequest,
|
|
94
100
|
SfvbPreviewSessionRequestFromJSON,
|
|
95
101
|
SfvbPreviewSessionRequestToJSON,
|
|
@@ -153,6 +159,11 @@ export interface CompileSfvbCjsonRequest {
|
|
|
153
159
|
compileRequest: SfvbCompileRequest;
|
|
154
160
|
}
|
|
155
161
|
|
|
162
|
+
export interface CreateSfvbPreviewAccessRequest {
|
|
163
|
+
storefrontOid: number;
|
|
164
|
+
previewAccess?: SfvbPreviewAccessRequest;
|
|
165
|
+
}
|
|
166
|
+
|
|
156
167
|
export interface CreateSfvbPreviewSessionRequest {
|
|
157
168
|
storefrontOid: number;
|
|
158
169
|
}
|
|
@@ -403,6 +414,23 @@ export interface SfvbApiInterface {
|
|
|
403
414
|
*/
|
|
404
415
|
compileSfvbCjson(requestParameters: CompileSfvbCjsonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbCompileResponse>;
|
|
405
416
|
|
|
417
|
+
/**
|
|
418
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
419
|
+
* @summary One time link that opens a preview in a browser with no UltraCart login
|
|
420
|
+
* @param {number} storefrontOid
|
|
421
|
+
* @param {SfvbPreviewAccessRequest} [previewAccess] What the browser should see
|
|
422
|
+
* @param {*} [options] Override http request option.
|
|
423
|
+
* @throws {RequiredError}
|
|
424
|
+
* @memberof SfvbApiInterface
|
|
425
|
+
*/
|
|
426
|
+
createSfvbPreviewAccessRaw(requestParameters: CreateSfvbPreviewAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPreviewAccessResponse>>;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
430
|
+
* One time link that opens a preview in a browser with no UltraCart login
|
|
431
|
+
*/
|
|
432
|
+
createSfvbPreviewAccess(requestParameters: CreateSfvbPreviewAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewAccessResponse>;
|
|
433
|
+
|
|
406
434
|
/**
|
|
407
435
|
* Returns a server generated session id to push containers into, and opens the session so that id exists rather than merely being random. The id is not caller supplied, because concurrent agents choosing their own would be free to collide, and the browser editor\'s habit of minting one with Math.random is not a property worth carrying into an API. Expires after eight hours and can be deleted sooner. Requires a token that resolves to a user, so use the device authorization flow.
|
|
408
436
|
* @summary Create a preview session
|
|
@@ -563,8 +591,8 @@ export interface SfvbApiInterface {
|
|
|
563
591
|
getSfvbContainerVersion(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersion>;
|
|
564
592
|
|
|
565
593
|
/**
|
|
566
|
-
*
|
|
567
|
-
* @summary Configuration schema for one element type
|
|
594
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
595
|
+
* @summary Configuration schema and field card for one element type
|
|
568
596
|
* @param {string} elementType
|
|
569
597
|
* @param {*} [options] Override http request option.
|
|
570
598
|
* @throws {RequiredError}
|
|
@@ -573,7 +601,8 @@ export interface SfvbApiInterface {
|
|
|
573
601
|
getSfvbElementRaw(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbElementSchemaResponse>>;
|
|
574
602
|
|
|
575
603
|
/**
|
|
576
|
-
*
|
|
604
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
605
|
+
* Configuration schema and field card for one element type
|
|
577
606
|
*/
|
|
578
607
|
getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse>;
|
|
579
608
|
|
|
@@ -1204,6 +1233,50 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
1204
1233
|
return await response.value();
|
|
1205
1234
|
}
|
|
1206
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
1238
|
+
* One time link that opens a preview in a browser with no UltraCart login
|
|
1239
|
+
*/
|
|
1240
|
+
async createSfvbPreviewAccessRaw(requestParameters: CreateSfvbPreviewAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPreviewAccessResponse>> {
|
|
1241
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
1242
|
+
throw new runtime.RequiredError('storefrontOid','Required parameter requestParameters.storefrontOid was null or undefined when calling createSfvbPreviewAccess.');
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
const queryParameters: any = {};
|
|
1246
|
+
|
|
1247
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1248
|
+
|
|
1249
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1250
|
+
|
|
1251
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1252
|
+
// oauth required
|
|
1253
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1257
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
const response = await this.request({
|
|
1261
|
+
path: `/sfvb/storefronts/{storefront_oid}/preview_access`.replace(`{${"storefront_oid"}}`, encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
1262
|
+
method: 'POST',
|
|
1263
|
+
headers: headerParameters,
|
|
1264
|
+
query: queryParameters,
|
|
1265
|
+
body: SfvbPreviewAccessRequestToJSON(requestParameters.previewAccess),
|
|
1266
|
+
}, initOverrides);
|
|
1267
|
+
|
|
1268
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SfvbPreviewAccessResponseFromJSON(jsonValue));
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* The preview URL only works in a browser already signed in to UltraCart on the storefront\'s own host, and an agent\'s built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
1273
|
+
* One time link that opens a preview in a browser with no UltraCart login
|
|
1274
|
+
*/
|
|
1275
|
+
async createSfvbPreviewAccess(requestParameters: CreateSfvbPreviewAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewAccessResponse> {
|
|
1276
|
+
const response = await this.createSfvbPreviewAccessRaw(requestParameters, initOverrides);
|
|
1277
|
+
return await response.value();
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1207
1280
|
/**
|
|
1208
1281
|
* Returns a server generated session id to push containers into, and opens the session so that id exists rather than merely being random. The id is not caller supplied, because concurrent agents choosing their own would be free to collide, and the browser editor\'s habit of minting one with Math.random is not a property worth carrying into an API. Expires after eight hours and can be deleted sooner. Requires a token that resolves to a user, so use the device authorization flow.
|
|
1209
1282
|
* Create a preview session
|
|
@@ -1647,7 +1720,8 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
1647
1720
|
}
|
|
1648
1721
|
|
|
1649
1722
|
/**
|
|
1650
|
-
*
|
|
1723
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
1724
|
+
* Configuration schema and field card for one element type
|
|
1651
1725
|
*/
|
|
1652
1726
|
async getSfvbElementRaw(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbElementSchemaResponse>> {
|
|
1653
1727
|
if (requestParameters.elementType === null || requestParameters.elementType === undefined) {
|
|
@@ -1678,7 +1752,8 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
1678
1752
|
}
|
|
1679
1753
|
|
|
1680
1754
|
/**
|
|
1681
|
-
*
|
|
1755
|
+
* schema is the draft-07 JSON schema for the element config object and doc is the markdown field card, both as strings. Either is omitted when none has been published for the element, which is still a 200. The catalog is published by the visual builder release process, and a republish can take up to an hour to appear here.
|
|
1756
|
+
* Configuration schema and field card for one element type
|
|
1682
1757
|
*/
|
|
1683
1758
|
async getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse> {
|
|
1684
1759
|
const response = await this.getSfvbElementRaw(requestParameters, initOverrides);
|
|
@@ -19,6 +19,12 @@ import { exists, mapValues } from '../runtime';
|
|
|
19
19
|
* @interface SfvbElement
|
|
20
20
|
*/
|
|
21
21
|
export interface SfvbElement {
|
|
22
|
+
/**
|
|
23
|
+
* True when a markdown field card for this element is available from elements/{element_type}.
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof SfvbElement
|
|
26
|
+
*/
|
|
27
|
+
doc_available?: boolean;
|
|
22
28
|
/**
|
|
23
29
|
* True when a per element configuration schema is available from elements/{element_type}.
|
|
24
30
|
* @type {boolean}
|
|
@@ -54,6 +60,7 @@ export function SfvbElementFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
54
60
|
}
|
|
55
61
|
return {
|
|
56
62
|
|
|
63
|
+
'doc_available': !exists(json, 'doc_available') ? undefined : json['doc_available'],
|
|
57
64
|
'schema_available': !exists(json, 'schema_available') ? undefined : json['schema_available'],
|
|
58
65
|
'type': !exists(json, 'type') ? undefined : json['type'],
|
|
59
66
|
};
|
|
@@ -68,6 +75,7 @@ export function SfvbElementToJSON(value?: SfvbElement | null): any {
|
|
|
68
75
|
}
|
|
69
76
|
return {
|
|
70
77
|
|
|
78
|
+
'doc_available': value.doc_available,
|
|
71
79
|
'schema_available': value.schema_available,
|
|
72
80
|
'type': value.type,
|
|
73
81
|
};
|
|
@@ -20,7 +20,13 @@ import { exists, mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface SfvbElementSchemaResponse {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Markdown field card for this element, as a string. Omitted when no field card has been published for this element.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SfvbElementSchemaResponse
|
|
26
|
+
*/
|
|
27
|
+
doc?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Draft-07 JSON schema for this element's config object, as a JSON string. Omitted when no schema has been published for this element.
|
|
24
30
|
* @type {string}
|
|
25
31
|
* @memberof SfvbElementSchemaResponse
|
|
26
32
|
*/
|
|
@@ -54,6 +60,7 @@ export function SfvbElementSchemaResponseFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
54
60
|
}
|
|
55
61
|
return {
|
|
56
62
|
|
|
63
|
+
'doc': !exists(json, 'doc') ? undefined : json['doc'],
|
|
57
64
|
'schema': !exists(json, 'schema') ? undefined : json['schema'],
|
|
58
65
|
'type': !exists(json, 'type') ? undefined : json['type'],
|
|
59
66
|
};
|
|
@@ -68,6 +75,7 @@ export function SfvbElementSchemaResponseToJSON(value?: SfvbElementSchemaRespons
|
|
|
68
75
|
}
|
|
69
76
|
return {
|
|
70
77
|
|
|
78
|
+
'doc': value.doc,
|
|
71
79
|
'schema': value.schema,
|
|
72
80
|
'type': value.type,
|
|
73
81
|
};
|
|
@@ -0,0 +1,83 @@
|
|
|
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 SfvbPreviewAccessRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SfvbPreviewAccessRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Storefront path to land on, beginning with a slash. Defaults to /
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SfvbPreviewAccessRequest
|
|
26
|
+
*/
|
|
27
|
+
path?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Staged preview session to show. It must be one this user created and it must not have expired. Leave it out to show the saved containers with nothing staged.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SfvbPreviewAccessRequest
|
|
32
|
+
*/
|
|
33
|
+
preview_session_id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Theme to show, which may be inactive. Must belong to this storefront. Defaults to the active theme.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SfvbPreviewAccessRequest
|
|
38
|
+
*/
|
|
39
|
+
theme_oid?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the SfvbPreviewAccessRequest interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfSfvbPreviewAccessRequest(value: object): boolean {
|
|
48
|
+
let isInstance = true;
|
|
49
|
+
|
|
50
|
+
return isInstance;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function SfvbPreviewAccessRequestFromJSON(json: any): SfvbPreviewAccessRequest {
|
|
54
|
+
return SfvbPreviewAccessRequestFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function SfvbPreviewAccessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbPreviewAccessRequest {
|
|
58
|
+
if ((json === undefined) || (json === null)) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'path': !exists(json, 'path') ? undefined : json['path'],
|
|
64
|
+
'preview_session_id': !exists(json, 'preview_session_id') ? undefined : json['preview_session_id'],
|
|
65
|
+
'theme_oid': !exists(json, 'theme_oid') ? undefined : json['theme_oid'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function SfvbPreviewAccessRequestToJSON(value?: SfvbPreviewAccessRequest | null): any {
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (value === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'path': value.path,
|
|
79
|
+
'preview_session_id': value.preview_session_id,
|
|
80
|
+
'theme_oid': value.theme_oid,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,123 @@
|
|
|
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 SfvbPreviewAccessResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface SfvbPreviewAccessResponse {
|
|
22
|
+
/**
|
|
23
|
+
* One time link on the storefront's own host. Opening it in any browser, including an agent's built in browser with no UltraCart login, gets past the storefront lock and applies the preview session and theme for the rest of that browser's session, then redirects to path. It is a credential until used, so do not paste it anywhere other than the browser that should open it.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SfvbPreviewAccessResponse
|
|
26
|
+
*/
|
|
27
|
+
access_url?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Seconds left to open access_url. It stops working after that, and after its first use.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SfvbPreviewAccessResponse
|
|
32
|
+
*/
|
|
33
|
+
expires_in_seconds?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Storefront path the browser lands on, after reserved preview parameters are removed.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SfvbPreviewAccessResponse
|
|
38
|
+
*/
|
|
39
|
+
path?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The preview session applied, when one was requested.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SfvbPreviewAccessResponse
|
|
44
|
+
*/
|
|
45
|
+
preview_session_id?: string;
|
|
46
|
+
/**
|
|
47
|
+
* How long the browser stays in preview once access_url is opened. The remaining life of the preview session, or eight hours when none was given. The user and their storefront permission are checked again on every page, so removing either ends it sooner.
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof SfvbPreviewAccessResponse
|
|
50
|
+
*/
|
|
51
|
+
session_lifetime_seconds?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Always true. A second open of access_url returns 410.
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof SfvbPreviewAccessResponse
|
|
56
|
+
*/
|
|
57
|
+
single_use?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* The theme shown, when one was requested.
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof SfvbPreviewAccessResponse
|
|
62
|
+
*/
|
|
63
|
+
theme_oid?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Plain language instructions, safe to show a user.
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof SfvbPreviewAccessResponse
|
|
68
|
+
*/
|
|
69
|
+
usage_note?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Check if a given object implements the SfvbPreviewAccessResponse interface.
|
|
76
|
+
*/
|
|
77
|
+
export function instanceOfSfvbPreviewAccessResponse(value: object): boolean {
|
|
78
|
+
let isInstance = true;
|
|
79
|
+
|
|
80
|
+
return isInstance;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function SfvbPreviewAccessResponseFromJSON(json: any): SfvbPreviewAccessResponse {
|
|
84
|
+
return SfvbPreviewAccessResponseFromJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function SfvbPreviewAccessResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbPreviewAccessResponse {
|
|
88
|
+
if ((json === undefined) || (json === null)) {
|
|
89
|
+
return json;
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
|
|
93
|
+
'access_url': !exists(json, 'access_url') ? undefined : json['access_url'],
|
|
94
|
+
'expires_in_seconds': !exists(json, 'expires_in_seconds') ? undefined : json['expires_in_seconds'],
|
|
95
|
+
'path': !exists(json, 'path') ? undefined : json['path'],
|
|
96
|
+
'preview_session_id': !exists(json, 'preview_session_id') ? undefined : json['preview_session_id'],
|
|
97
|
+
'session_lifetime_seconds': !exists(json, 'session_lifetime_seconds') ? undefined : json['session_lifetime_seconds'],
|
|
98
|
+
'single_use': !exists(json, 'single_use') ? undefined : json['single_use'],
|
|
99
|
+
'theme_oid': !exists(json, 'theme_oid') ? undefined : json['theme_oid'],
|
|
100
|
+
'usage_note': !exists(json, 'usage_note') ? undefined : json['usage_note'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function SfvbPreviewAccessResponseToJSON(value?: SfvbPreviewAccessResponse | null): any {
|
|
105
|
+
if (value === undefined) {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
if (value === null) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
|
|
113
|
+
'access_url': value.access_url,
|
|
114
|
+
'expires_in_seconds': value.expires_in_seconds,
|
|
115
|
+
'path': value.path,
|
|
116
|
+
'preview_session_id': value.preview_session_id,
|
|
117
|
+
'session_lifetime_seconds': value.session_lifetime_seconds,
|
|
118
|
+
'single_use': value.single_use,
|
|
119
|
+
'theme_oid': value.theme_oid,
|
|
120
|
+
'usage_note': value.usage_note,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
@@ -32,7 +32,7 @@ export interface SfvbThemeJobResponse {
|
|
|
32
32
|
*/
|
|
33
33
|
description?: string;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* What to do next when the job did not produce a theme. The internal cause is not returned; it is recorded against the job id in the server log.
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof SfvbThemeJobResponse
|
|
38
38
|
*/
|
package/src/models/index.ts
CHANGED
|
@@ -993,6 +993,8 @@ export * from './SfvbPageAttributeUpdateRequest';
|
|
|
993
993
|
export * from './SfvbPageMultimedia';
|
|
994
994
|
export * from './SfvbPageMultimediaRequest';
|
|
995
995
|
export * from './SfvbPageResponse';
|
|
996
|
+
export * from './SfvbPreviewAccessRequest';
|
|
997
|
+
export * from './SfvbPreviewAccessResponse';
|
|
996
998
|
export * from './SfvbPreviewSessionRequest';
|
|
997
999
|
export * from './SfvbPreviewSessionResponse';
|
|
998
1000
|
export * from './SfvbPreviewUrlResponse';
|