ultracart_rest_api_v2_typescript 4.1.154 → 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 +3 -2
- package/dist/apis/SfvbApi.d.ts +30 -1
- package/dist/apis/SfvbApi.js +61 -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/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/apis/SfvbApi.ts +72 -0
- package/src/models/SfvbPreviewAccessRequest.ts +83 -0
- package/src/models/SfvbPreviewAccessResponse.ts +123 -0
- 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,7 @@ 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 |
|
|
88
89
|
| 4.1.154 | 09/14/2026 | sfvb internal testing |
|
|
89
90
|
| 4.1.153 | 09/14/2026 | sfvb internal testing |
|
|
90
91
|
| 4.1.152 | 09/09/2026 | sfvb - internal testing |
|
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
|
|
@@ -903,6 +922,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
903
922
|
* Compile CJSON to Velocity
|
|
904
923
|
*/
|
|
905
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>;
|
|
906
935
|
/**
|
|
907
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.
|
|
908
937
|
* Create a preview session
|
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
|
|
@@ -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;
|
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
|
|
@@ -1205,6 +1233,50 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
1205
1233
|
return await response.value();
|
|
1206
1234
|
}
|
|
1207
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
|
+
|
|
1208
1280
|
/**
|
|
1209
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.
|
|
1210
1282
|
* Create a preview session
|
|
@@ -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
|
+
|
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';
|