ultracart_rest_api_v2_typescript 4.1.152 → 4.1.154
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 +6 -0
- package/README.md +4 -2
- package/dist/apis/SfvbApi.d.ts +133 -6
- package/dist/apis/SfvbApi.js +280 -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/SfvbPageAttribute.d.ts +96 -0
- package/dist/models/SfvbPageAttribute.js +86 -0
- package/dist/models/SfvbPageAttributeUpdate.d.ts +56 -0
- package/dist/models/SfvbPageAttributeUpdate.js +66 -0
- package/dist/models/SfvbPageAttributeUpdateRequest.d.ts +32 -0
- package/dist/models/SfvbPageAttributeUpdateRequest.js +51 -0
- package/dist/models/SfvbPageMultimedia.d.ts +67 -0
- package/dist/models/SfvbPageMultimedia.js +62 -0
- package/dist/models/SfvbPageMultimediaRequest.d.ts +49 -0
- package/dist/models/SfvbPageMultimediaRequest.js +56 -0
- package/dist/models/SfvbPageResponse.d.ts +45 -0
- package/dist/models/SfvbPageResponse.js +56 -0
- package/dist/models/SfvbThemeJobResponse.d.ts +1 -1
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/SfvbApi.ts +331 -5
- package/src/models/SfvbElement.ts +8 -0
- package/src/models/SfvbElementSchemaResponse.ts +9 -1
- package/src/models/SfvbPageAttribute.ts +148 -0
- package/src/models/SfvbPageAttributeUpdate.ts +98 -0
- package/src/models/SfvbPageAttributeUpdateRequest.ts +74 -0
- package/src/models/SfvbPageMultimedia.ts +115 -0
- package/src/models/SfvbPageMultimediaRequest.ts +91 -0
- package/src/models/SfvbPageResponse.ts +96 -0
- package/src/models/SfvbThemeJobResponse.ts +1 -1
- package/src/models/index.ts +6 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -1015,6 +1015,12 @@ src/models/SfvbFilesResponse.ts
|
|
|
1015
1015
|
src/models/SfvbLibraryEntry.ts
|
|
1016
1016
|
src/models/SfvbLibraryFacet.ts
|
|
1017
1017
|
src/models/SfvbLibraryResponse.ts
|
|
1018
|
+
src/models/SfvbPageAttribute.ts
|
|
1019
|
+
src/models/SfvbPageAttributeUpdate.ts
|
|
1020
|
+
src/models/SfvbPageAttributeUpdateRequest.ts
|
|
1021
|
+
src/models/SfvbPageMultimedia.ts
|
|
1022
|
+
src/models/SfvbPageMultimediaRequest.ts
|
|
1023
|
+
src/models/SfvbPageResponse.ts
|
|
1018
1024
|
src/models/SfvbPreviewSessionRequest.ts
|
|
1019
1025
|
src/models/SfvbPreviewSessionResponse.ts
|
|
1020
1026
|
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.154
|
|
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.154 --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.154 | 09/14/2026 | sfvb internal testing |
|
|
89
|
+
| 4.1.153 | 09/14/2026 | sfvb internal testing |
|
|
88
90
|
| 4.1.152 | 09/09/2026 | sfvb - internal testing |
|
|
89
91
|
| 4.1.151 | 09/04/2026 | conversations - added ai agent capabilities |
|
|
90
92
|
| 4.1.150 | 09/04/2026 | conversations - add ai agent capabilities |
|
package/dist/apis/SfvbApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbLibraryEntry, SfvbLibraryResponse, 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, 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
|
}
|
|
@@ -22,6 +22,12 @@ export interface DeleteSfvbFileRequest {
|
|
|
22
22
|
ifMatch: string;
|
|
23
23
|
path?: string;
|
|
24
24
|
}
|
|
25
|
+
export interface DeleteSfvbPageMultimediaRequest {
|
|
26
|
+
storefrontOid: number;
|
|
27
|
+
path: string;
|
|
28
|
+
code?: string;
|
|
29
|
+
_default?: boolean;
|
|
30
|
+
}
|
|
25
31
|
export interface DeleteSfvbPreviewSessionRequest {
|
|
26
32
|
storefrontOid: number;
|
|
27
33
|
previewSessionId: string;
|
|
@@ -67,6 +73,10 @@ export interface GetSfvbLibraryEntryRequest {
|
|
|
67
73
|
storefrontOid: number;
|
|
68
74
|
libraryOid: number;
|
|
69
75
|
}
|
|
76
|
+
export interface GetSfvbPageRequest {
|
|
77
|
+
storefrontOid: number;
|
|
78
|
+
path: string;
|
|
79
|
+
}
|
|
70
80
|
export interface GetSfvbPreviewUrlRequest {
|
|
71
81
|
storefrontOid: number;
|
|
72
82
|
previewSessionId: string;
|
|
@@ -125,6 +135,16 @@ export interface PutSfvbFileContentRequest {
|
|
|
125
135
|
fileWriteRequest: SfvbFileWriteRequest;
|
|
126
136
|
path?: string;
|
|
127
137
|
}
|
|
138
|
+
export interface PutSfvbPageAttributesRequest {
|
|
139
|
+
storefrontOid: number;
|
|
140
|
+
path: string;
|
|
141
|
+
pageAttributeUpdateRequest: SfvbPageAttributeUpdateRequest;
|
|
142
|
+
}
|
|
143
|
+
export interface PutSfvbPageMultimediaRequest {
|
|
144
|
+
storefrontOid: number;
|
|
145
|
+
path: string;
|
|
146
|
+
pageMultimediaRequest: SfvbPageMultimediaRequest;
|
|
147
|
+
}
|
|
128
148
|
export interface PutSfvbPreviewSessionRequest {
|
|
129
149
|
storefrontOid: number;
|
|
130
150
|
previewSessionId: string;
|
|
@@ -233,6 +253,23 @@ export interface SfvbApiInterface {
|
|
|
233
253
|
* Delete a storefront file
|
|
234
254
|
*/
|
|
235
255
|
deleteSfvbFile(requestParameters: DeleteSfvbFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
256
|
+
/**
|
|
257
|
+
* Name exactly one of code or default. Removes the page\'s copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
258
|
+
* @summary Detach an image from a page
|
|
259
|
+
* @param {number} storefrontOid
|
|
260
|
+
* @param {string} path Page path, for example /catalog/dispensers/
|
|
261
|
+
* @param {string} [code] Image code to detach
|
|
262
|
+
* @param {boolean} [_default] True to detach the default image
|
|
263
|
+
* @param {*} [options] Override http request option.
|
|
264
|
+
* @throws {RequiredError}
|
|
265
|
+
* @memberof SfvbApiInterface
|
|
266
|
+
*/
|
|
267
|
+
deleteSfvbPageMultimediaRaw(requestParameters: DeleteSfvbPageMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPageResponse>>;
|
|
268
|
+
/**
|
|
269
|
+
* Name exactly one of code or default. Removes the page\'s copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
270
|
+
* Detach an image from a page
|
|
271
|
+
*/
|
|
272
|
+
deleteSfvbPageMultimedia(requestParameters: DeleteSfvbPageMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageResponse>;
|
|
236
273
|
/**
|
|
237
274
|
* Releases the session before its eight hour expiry. Without this the only way to free one is to wait, which is a poor answer for a tool that may open a dozen in an afternoon.
|
|
238
275
|
* @summary Delete a preview session
|
|
@@ -328,8 +365,8 @@ export interface SfvbApiInterface {
|
|
|
328
365
|
*/
|
|
329
366
|
getSfvbContainerVersion(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersion>;
|
|
330
367
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @summary Configuration schema for one element type
|
|
368
|
+
* 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.
|
|
369
|
+
* @summary Configuration schema and field card for one element type
|
|
333
370
|
* @param {string} elementType
|
|
334
371
|
* @param {*} [options] Override http request option.
|
|
335
372
|
* @throws {RequiredError}
|
|
@@ -337,7 +374,8 @@ export interface SfvbApiInterface {
|
|
|
337
374
|
*/
|
|
338
375
|
getSfvbElementRaw(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbElementSchemaResponse>>;
|
|
339
376
|
/**
|
|
340
|
-
*
|
|
377
|
+
* 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.
|
|
378
|
+
* Configuration schema and field card for one element type
|
|
341
379
|
*/
|
|
342
380
|
getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse>;
|
|
343
381
|
/**
|
|
@@ -386,6 +424,21 @@ export interface SfvbApiInterface {
|
|
|
386
424
|
* Read one library entry including its CJSON
|
|
387
425
|
*/
|
|
388
426
|
getSfvbLibraryEntry(requestParameters: GetSfvbLibraryEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbLibraryEntry>;
|
|
427
|
+
/**
|
|
428
|
+
* What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
|
|
429
|
+
* @summary Read a page\'s attributes and images
|
|
430
|
+
* @param {number} storefrontOid
|
|
431
|
+
* @param {string} path Page path, for example /catalog/dispensers/
|
|
432
|
+
* @param {*} [options] Override http request option.
|
|
433
|
+
* @throws {RequiredError}
|
|
434
|
+
* @memberof SfvbApiInterface
|
|
435
|
+
*/
|
|
436
|
+
getSfvbPageRaw(requestParameters: GetSfvbPageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPageResponse>>;
|
|
437
|
+
/**
|
|
438
|
+
* What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
|
|
439
|
+
* Read a page\'s attributes and images
|
|
440
|
+
*/
|
|
441
|
+
getSfvbPage(requestParameters: GetSfvbPageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageResponse>;
|
|
389
442
|
/**
|
|
390
443
|
* Refuses a session that does not exist, so a URL you receive is for a session that was really there. expires_in_seconds is the time actually remaining, not the configured lifetime. Needs a token that resolves to a user, because a preview session belongs to the person who created it.
|
|
391
444
|
* @summary URL that renders a preview session
|
|
@@ -625,6 +678,38 @@ export interface SfvbApiInterface {
|
|
|
625
678
|
* Write a storefront file
|
|
626
679
|
*/
|
|
627
680
|
putSfvbFileContent(requestParameters: PutSfvbFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbFileWriteResponse>;
|
|
681
|
+
/**
|
|
682
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, slider, item set, page collection and video list attributes are refused - edit those in the page editor. Always needs sfvb_publish, because a page\'s attributes are shared by every theme and there is no dormant copy to change instead.
|
|
683
|
+
* @summary Change a page\'s attributes
|
|
684
|
+
* @param {number} storefrontOid
|
|
685
|
+
* @param {string} path Page path, for example /catalog/dispensers/
|
|
686
|
+
* @param {SfvbPageAttributeUpdateRequest} pageAttributeUpdateRequest Attributes to change
|
|
687
|
+
* @param {*} [options] Override http request option.
|
|
688
|
+
* @throws {RequiredError}
|
|
689
|
+
* @memberof SfvbApiInterface
|
|
690
|
+
*/
|
|
691
|
+
putSfvbPageAttributesRaw(requestParameters: PutSfvbPageAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPageResponse>>;
|
|
692
|
+
/**
|
|
693
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, slider, item set, page collection and video list attributes are refused - edit those in the page editor. Always needs sfvb_publish, because a page\'s attributes are shared by every theme and there is no dormant copy to change instead.
|
|
694
|
+
* Change a page\'s attributes
|
|
695
|
+
*/
|
|
696
|
+
putSfvbPageAttributes(requestParameters: PutSfvbPageAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageResponse>;
|
|
697
|
+
/**
|
|
698
|
+
* Upload the image with files/upload to the page path followed by a filename first, then name that filename here as either the default image or an image code. The default image is what a pageimage element with no pageImageCode renders, and what a subgroup tile shows. Replaces whatever that slot held. Always needs sfvb_publish.
|
|
699
|
+
* @summary Attach an image to a page
|
|
700
|
+
* @param {number} storefrontOid
|
|
701
|
+
* @param {string} path Page path, for example /catalog/dispensers/
|
|
702
|
+
* @param {SfvbPageMultimediaRequest} pageMultimediaRequest Image to attach
|
|
703
|
+
* @param {*} [options] Override http request option.
|
|
704
|
+
* @throws {RequiredError}
|
|
705
|
+
* @memberof SfvbApiInterface
|
|
706
|
+
*/
|
|
707
|
+
putSfvbPageMultimediaRaw(requestParameters: PutSfvbPageMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPageResponse>>;
|
|
708
|
+
/**
|
|
709
|
+
* Upload the image with files/upload to the page path followed by a filename first, then name that filename here as either the default image or an image code. The default image is what a pageimage element with no pageImageCode renders, and what a subgroup tile shows. Replaces whatever that slot held. Always needs sfvb_publish.
|
|
710
|
+
* Attach an image to a page
|
|
711
|
+
*/
|
|
712
|
+
putSfvbPageMultimedia(requestParameters: PutSfvbPageMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageResponse>;
|
|
628
713
|
/**
|
|
629
714
|
* Stores compiled containers against a session created by createSfvbPreviewSession. Replaces whatever the session held. The session must exist - this does not create one, so a deleted, expired or never issued id is a 404 rather than a new session. Nothing durable is written. Requires a token that resolves to a user, so use the device authorization flow.
|
|
630
715
|
* @summary Push containers into a preview session
|
|
@@ -838,6 +923,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
838
923
|
* Delete a storefront file
|
|
839
924
|
*/
|
|
840
925
|
deleteSfvbFile(requestParameters: DeleteSfvbFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
926
|
+
/**
|
|
927
|
+
* Name exactly one of code or default. Removes the page\'s copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
928
|
+
* Detach an image from a page
|
|
929
|
+
*/
|
|
930
|
+
deleteSfvbPageMultimediaRaw(requestParameters: DeleteSfvbPageMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPageResponse>>;
|
|
931
|
+
/**
|
|
932
|
+
* Name exactly one of code or default. Removes the page\'s copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
933
|
+
* Detach an image from a page
|
|
934
|
+
*/
|
|
935
|
+
deleteSfvbPageMultimedia(requestParameters: DeleteSfvbPageMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageResponse>;
|
|
841
936
|
/**
|
|
842
937
|
* Releases the session before its eight hour expiry. Without this the only way to free one is to wait, which is a poor answer for a tool that may open a dozen in an afternoon.
|
|
843
938
|
* Delete a preview session
|
|
@@ -897,11 +992,13 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
897
992
|
*/
|
|
898
993
|
getSfvbContainerVersion(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersion>;
|
|
899
994
|
/**
|
|
900
|
-
*
|
|
995
|
+
* 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.
|
|
996
|
+
* Configuration schema and field card for one element type
|
|
901
997
|
*/
|
|
902
998
|
getSfvbElementRaw(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbElementSchemaResponse>>;
|
|
903
999
|
/**
|
|
904
|
-
*
|
|
1000
|
+
* 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.
|
|
1001
|
+
* Configuration schema and field card for one element type
|
|
905
1002
|
*/
|
|
906
1003
|
getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse>;
|
|
907
1004
|
/**
|
|
@@ -934,6 +1031,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
934
1031
|
* Read one library entry including its CJSON
|
|
935
1032
|
*/
|
|
936
1033
|
getSfvbLibraryEntry(requestParameters: GetSfvbLibraryEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbLibraryEntry>;
|
|
1034
|
+
/**
|
|
1035
|
+
* What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
|
|
1036
|
+
* Read a page\'s attributes and images
|
|
1037
|
+
*/
|
|
1038
|
+
getSfvbPageRaw(requestParameters: GetSfvbPageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPageResponse>>;
|
|
1039
|
+
/**
|
|
1040
|
+
* What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
|
|
1041
|
+
* Read a page\'s attributes and images
|
|
1042
|
+
*/
|
|
1043
|
+
getSfvbPage(requestParameters: GetSfvbPageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageResponse>;
|
|
937
1044
|
/**
|
|
938
1045
|
* Refuses a session that does not exist, so a URL you receive is for a session that was really there. expires_in_seconds is the time actually remaining, not the configured lifetime. Needs a token that resolves to a user, because a preview session belongs to the person who created it.
|
|
939
1046
|
* URL that renders a preview session
|
|
@@ -1088,6 +1195,26 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1088
1195
|
* Write a storefront file
|
|
1089
1196
|
*/
|
|
1090
1197
|
putSfvbFileContent(requestParameters: PutSfvbFileContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbFileWriteResponse>;
|
|
1198
|
+
/**
|
|
1199
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, slider, item set, page collection and video list attributes are refused - edit those in the page editor. Always needs sfvb_publish, because a page\'s attributes are shared by every theme and there is no dormant copy to change instead.
|
|
1200
|
+
* Change a page\'s attributes
|
|
1201
|
+
*/
|
|
1202
|
+
putSfvbPageAttributesRaw(requestParameters: PutSfvbPageAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPageResponse>>;
|
|
1203
|
+
/**
|
|
1204
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, slider, item set, page collection and video list attributes are refused - edit those in the page editor. Always needs sfvb_publish, because a page\'s attributes are shared by every theme and there is no dormant copy to change instead.
|
|
1205
|
+
* Change a page\'s attributes
|
|
1206
|
+
*/
|
|
1207
|
+
putSfvbPageAttributes(requestParameters: PutSfvbPageAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageResponse>;
|
|
1208
|
+
/**
|
|
1209
|
+
* Upload the image with files/upload to the page path followed by a filename first, then name that filename here as either the default image or an image code. The default image is what a pageimage element with no pageImageCode renders, and what a subgroup tile shows. Replaces whatever that slot held. Always needs sfvb_publish.
|
|
1210
|
+
* Attach an image to a page
|
|
1211
|
+
*/
|
|
1212
|
+
putSfvbPageMultimediaRaw(requestParameters: PutSfvbPageMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbPageResponse>>;
|
|
1213
|
+
/**
|
|
1214
|
+
* Upload the image with files/upload to the page path followed by a filename first, then name that filename here as either the default image or an image code. The default image is what a pageimage element with no pageImageCode renders, and what a subgroup tile shows. Replaces whatever that slot held. Always needs sfvb_publish.
|
|
1215
|
+
* Attach an image to a page
|
|
1216
|
+
*/
|
|
1217
|
+
putSfvbPageMultimedia(requestParameters: PutSfvbPageMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageResponse>;
|
|
1091
1218
|
/**
|
|
1092
1219
|
* Stores compiled containers against a session created by createSfvbPreviewSession. Replaces whatever the session held. The session must exist - this does not create one, so a deleted, expired or never issued id is a 404 rather than a new session. Nothing durable is written. Requires a token that resolves to a user, so use the device authorization flow.
|
|
1093
1220
|
* Push containers into a preview session
|
package/dist/apis/SfvbApi.js
CHANGED
|
@@ -261,6 +261,77 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
261
261
|
});
|
|
262
262
|
});
|
|
263
263
|
};
|
|
264
|
+
/**
|
|
265
|
+
* Name exactly one of code or default. Removes the page\'s copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
266
|
+
* Detach an image from a page
|
|
267
|
+
*/
|
|
268
|
+
SfvbApi.prototype.deleteSfvbPageMultimediaRaw = function (requestParameters, initOverrides) {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
270
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
271
|
+
return __generator(this, function (_c) {
|
|
272
|
+
switch (_c.label) {
|
|
273
|
+
case 0:
|
|
274
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
275
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling deleteSfvbPageMultimedia.');
|
|
276
|
+
}
|
|
277
|
+
if (requestParameters.path === null || requestParameters.path === undefined) {
|
|
278
|
+
throw new runtime.RequiredError('path', 'Required parameter requestParameters.path was null or undefined when calling deleteSfvbPageMultimedia.');
|
|
279
|
+
}
|
|
280
|
+
queryParameters = {};
|
|
281
|
+
if (requestParameters.path !== undefined) {
|
|
282
|
+
queryParameters['path'] = requestParameters.path;
|
|
283
|
+
}
|
|
284
|
+
if (requestParameters.code !== undefined) {
|
|
285
|
+
queryParameters['code'] = requestParameters.code;
|
|
286
|
+
}
|
|
287
|
+
if (requestParameters._default !== undefined) {
|
|
288
|
+
queryParameters['default'] = requestParameters._default;
|
|
289
|
+
}
|
|
290
|
+
headerParameters = {};
|
|
291
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
292
|
+
// oauth required
|
|
293
|
+
_a = headerParameters;
|
|
294
|
+
_b = "Authorization";
|
|
295
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
296
|
+
case 1:
|
|
297
|
+
// oauth required
|
|
298
|
+
_a[_b] = _c.sent();
|
|
299
|
+
_c.label = 2;
|
|
300
|
+
case 2:
|
|
301
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
302
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
303
|
+
}
|
|
304
|
+
return [4 /*yield*/, this.request({
|
|
305
|
+
path: "/sfvb/storefronts/{storefront_oid}/pages/multimedia".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
306
|
+
method: 'DELETE',
|
|
307
|
+
headers: headerParameters,
|
|
308
|
+
query: queryParameters,
|
|
309
|
+
}, initOverrides)];
|
|
310
|
+
case 3:
|
|
311
|
+
response = _c.sent();
|
|
312
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbPageResponseFromJSON)(jsonValue); })];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Name exactly one of code or default. Removes the page\'s copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
319
|
+
* Detach an image from a page
|
|
320
|
+
*/
|
|
321
|
+
SfvbApi.prototype.deleteSfvbPageMultimedia = function (requestParameters, initOverrides) {
|
|
322
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
323
|
+
var response;
|
|
324
|
+
return __generator(this, function (_a) {
|
|
325
|
+
switch (_a.label) {
|
|
326
|
+
case 0: return [4 /*yield*/, this.deleteSfvbPageMultimediaRaw(requestParameters, initOverrides)];
|
|
327
|
+
case 1:
|
|
328
|
+
response = _a.sent();
|
|
329
|
+
return [4 /*yield*/, response.value()];
|
|
330
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
};
|
|
264
335
|
/**
|
|
265
336
|
* Releases the session before its eight hour expiry. Without this the only way to free one is to wait, which is a poor answer for a tool that may open a dozen in an afternoon.
|
|
266
337
|
* Delete a preview session
|
|
@@ -647,7 +718,8 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
647
718
|
});
|
|
648
719
|
};
|
|
649
720
|
/**
|
|
650
|
-
*
|
|
721
|
+
* 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.
|
|
722
|
+
* Configuration schema and field card for one element type
|
|
651
723
|
*/
|
|
652
724
|
SfvbApi.prototype.getSfvbElementRaw = function (requestParameters, initOverrides) {
|
|
653
725
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -687,7 +759,8 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
687
759
|
});
|
|
688
760
|
};
|
|
689
761
|
/**
|
|
690
|
-
*
|
|
762
|
+
* 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.
|
|
763
|
+
* Configuration schema and field card for one element type
|
|
691
764
|
*/
|
|
692
765
|
SfvbApi.prototype.getSfvbElement = function (requestParameters, initOverrides) {
|
|
693
766
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -892,6 +965,71 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
892
965
|
});
|
|
893
966
|
});
|
|
894
967
|
};
|
|
968
|
+
/**
|
|
969
|
+
* What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
|
|
970
|
+
* Read a page\'s attributes and images
|
|
971
|
+
*/
|
|
972
|
+
SfvbApi.prototype.getSfvbPageRaw = function (requestParameters, initOverrides) {
|
|
973
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
974
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
975
|
+
return __generator(this, function (_c) {
|
|
976
|
+
switch (_c.label) {
|
|
977
|
+
case 0:
|
|
978
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
979
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling getSfvbPage.');
|
|
980
|
+
}
|
|
981
|
+
if (requestParameters.path === null || requestParameters.path === undefined) {
|
|
982
|
+
throw new runtime.RequiredError('path', 'Required parameter requestParameters.path was null or undefined when calling getSfvbPage.');
|
|
983
|
+
}
|
|
984
|
+
queryParameters = {};
|
|
985
|
+
if (requestParameters.path !== undefined) {
|
|
986
|
+
queryParameters['path'] = requestParameters.path;
|
|
987
|
+
}
|
|
988
|
+
headerParameters = {};
|
|
989
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
990
|
+
// oauth required
|
|
991
|
+
_a = headerParameters;
|
|
992
|
+
_b = "Authorization";
|
|
993
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
994
|
+
case 1:
|
|
995
|
+
// oauth required
|
|
996
|
+
_a[_b] = _c.sent();
|
|
997
|
+
_c.label = 2;
|
|
998
|
+
case 2:
|
|
999
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1000
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1001
|
+
}
|
|
1002
|
+
return [4 /*yield*/, this.request({
|
|
1003
|
+
path: "/sfvb/storefronts/{storefront_oid}/pages".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
1004
|
+
method: 'GET',
|
|
1005
|
+
headers: headerParameters,
|
|
1006
|
+
query: queryParameters,
|
|
1007
|
+
}, initOverrides)];
|
|
1008
|
+
case 3:
|
|
1009
|
+
response = _c.sent();
|
|
1010
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbPageResponseFromJSON)(jsonValue); })];
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
});
|
|
1014
|
+
};
|
|
1015
|
+
/**
|
|
1016
|
+
* What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
|
|
1017
|
+
* Read a page\'s attributes and images
|
|
1018
|
+
*/
|
|
1019
|
+
SfvbApi.prototype.getSfvbPage = function (requestParameters, initOverrides) {
|
|
1020
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1021
|
+
var response;
|
|
1022
|
+
return __generator(this, function (_a) {
|
|
1023
|
+
switch (_a.label) {
|
|
1024
|
+
case 0: return [4 /*yield*/, this.getSfvbPageRaw(requestParameters, initOverrides)];
|
|
1025
|
+
case 1:
|
|
1026
|
+
response = _a.sent();
|
|
1027
|
+
return [4 /*yield*/, response.value()];
|
|
1028
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
});
|
|
1032
|
+
};
|
|
895
1033
|
/**
|
|
896
1034
|
* Refuses a session that does not exist, so a URL you receive is for a session that was really there. expires_in_seconds is the time actually remaining, not the configured lifetime. Needs a token that resolves to a user, because a preview session belongs to the person who created it.
|
|
897
1035
|
* URL that renders a preview session
|
|
@@ -1894,6 +2032,146 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
1894
2032
|
});
|
|
1895
2033
|
});
|
|
1896
2034
|
};
|
|
2035
|
+
/**
|
|
2036
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, slider, item set, page collection and video list attributes are refused - edit those in the page editor. Always needs sfvb_publish, because a page\'s attributes are shared by every theme and there is no dormant copy to change instead.
|
|
2037
|
+
* Change a page\'s attributes
|
|
2038
|
+
*/
|
|
2039
|
+
SfvbApi.prototype.putSfvbPageAttributesRaw = function (requestParameters, initOverrides) {
|
|
2040
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2041
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
2042
|
+
return __generator(this, function (_c) {
|
|
2043
|
+
switch (_c.label) {
|
|
2044
|
+
case 0:
|
|
2045
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
2046
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling putSfvbPageAttributes.');
|
|
2047
|
+
}
|
|
2048
|
+
if (requestParameters.path === null || requestParameters.path === undefined) {
|
|
2049
|
+
throw new runtime.RequiredError('path', 'Required parameter requestParameters.path was null or undefined when calling putSfvbPageAttributes.');
|
|
2050
|
+
}
|
|
2051
|
+
if (requestParameters.pageAttributeUpdateRequest === null || requestParameters.pageAttributeUpdateRequest === undefined) {
|
|
2052
|
+
throw new runtime.RequiredError('pageAttributeUpdateRequest', 'Required parameter requestParameters.pageAttributeUpdateRequest was null or undefined when calling putSfvbPageAttributes.');
|
|
2053
|
+
}
|
|
2054
|
+
queryParameters = {};
|
|
2055
|
+
if (requestParameters.path !== undefined) {
|
|
2056
|
+
queryParameters['path'] = requestParameters.path;
|
|
2057
|
+
}
|
|
2058
|
+
headerParameters = {};
|
|
2059
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2060
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
2061
|
+
// oauth required
|
|
2062
|
+
_a = headerParameters;
|
|
2063
|
+
_b = "Authorization";
|
|
2064
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
2065
|
+
case 1:
|
|
2066
|
+
// oauth required
|
|
2067
|
+
_a[_b] = _c.sent();
|
|
2068
|
+
_c.label = 2;
|
|
2069
|
+
case 2:
|
|
2070
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2071
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
2072
|
+
}
|
|
2073
|
+
return [4 /*yield*/, this.request({
|
|
2074
|
+
path: "/sfvb/storefronts/{storefront_oid}/pages/attributes".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
2075
|
+
method: 'PUT',
|
|
2076
|
+
headers: headerParameters,
|
|
2077
|
+
query: queryParameters,
|
|
2078
|
+
body: (0, models_1.SfvbPageAttributeUpdateRequestToJSON)(requestParameters.pageAttributeUpdateRequest),
|
|
2079
|
+
}, initOverrides)];
|
|
2080
|
+
case 3:
|
|
2081
|
+
response = _c.sent();
|
|
2082
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbPageResponseFromJSON)(jsonValue); })];
|
|
2083
|
+
}
|
|
2084
|
+
});
|
|
2085
|
+
});
|
|
2086
|
+
};
|
|
2087
|
+
/**
|
|
2088
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, slider, item set, page collection and video list attributes are refused - edit those in the page editor. Always needs sfvb_publish, because a page\'s attributes are shared by every theme and there is no dormant copy to change instead.
|
|
2089
|
+
* Change a page\'s attributes
|
|
2090
|
+
*/
|
|
2091
|
+
SfvbApi.prototype.putSfvbPageAttributes = function (requestParameters, initOverrides) {
|
|
2092
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2093
|
+
var response;
|
|
2094
|
+
return __generator(this, function (_a) {
|
|
2095
|
+
switch (_a.label) {
|
|
2096
|
+
case 0: return [4 /*yield*/, this.putSfvbPageAttributesRaw(requestParameters, initOverrides)];
|
|
2097
|
+
case 1:
|
|
2098
|
+
response = _a.sent();
|
|
2099
|
+
return [4 /*yield*/, response.value()];
|
|
2100
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
2101
|
+
}
|
|
2102
|
+
});
|
|
2103
|
+
});
|
|
2104
|
+
};
|
|
2105
|
+
/**
|
|
2106
|
+
* Upload the image with files/upload to the page path followed by a filename first, then name that filename here as either the default image or an image code. The default image is what a pageimage element with no pageImageCode renders, and what a subgroup tile shows. Replaces whatever that slot held. Always needs sfvb_publish.
|
|
2107
|
+
* Attach an image to a page
|
|
2108
|
+
*/
|
|
2109
|
+
SfvbApi.prototype.putSfvbPageMultimediaRaw = function (requestParameters, initOverrides) {
|
|
2110
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2111
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
2112
|
+
return __generator(this, function (_c) {
|
|
2113
|
+
switch (_c.label) {
|
|
2114
|
+
case 0:
|
|
2115
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
2116
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling putSfvbPageMultimedia.');
|
|
2117
|
+
}
|
|
2118
|
+
if (requestParameters.path === null || requestParameters.path === undefined) {
|
|
2119
|
+
throw new runtime.RequiredError('path', 'Required parameter requestParameters.path was null or undefined when calling putSfvbPageMultimedia.');
|
|
2120
|
+
}
|
|
2121
|
+
if (requestParameters.pageMultimediaRequest === null || requestParameters.pageMultimediaRequest === undefined) {
|
|
2122
|
+
throw new runtime.RequiredError('pageMultimediaRequest', 'Required parameter requestParameters.pageMultimediaRequest was null or undefined when calling putSfvbPageMultimedia.');
|
|
2123
|
+
}
|
|
2124
|
+
queryParameters = {};
|
|
2125
|
+
if (requestParameters.path !== undefined) {
|
|
2126
|
+
queryParameters['path'] = requestParameters.path;
|
|
2127
|
+
}
|
|
2128
|
+
headerParameters = {};
|
|
2129
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2130
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
2131
|
+
// oauth required
|
|
2132
|
+
_a = headerParameters;
|
|
2133
|
+
_b = "Authorization";
|
|
2134
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
2135
|
+
case 1:
|
|
2136
|
+
// oauth required
|
|
2137
|
+
_a[_b] = _c.sent();
|
|
2138
|
+
_c.label = 2;
|
|
2139
|
+
case 2:
|
|
2140
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2141
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
2142
|
+
}
|
|
2143
|
+
return [4 /*yield*/, this.request({
|
|
2144
|
+
path: "/sfvb/storefronts/{storefront_oid}/pages/multimedia".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
2145
|
+
method: 'PUT',
|
|
2146
|
+
headers: headerParameters,
|
|
2147
|
+
query: queryParameters,
|
|
2148
|
+
body: (0, models_1.SfvbPageMultimediaRequestToJSON)(requestParameters.pageMultimediaRequest),
|
|
2149
|
+
}, initOverrides)];
|
|
2150
|
+
case 3:
|
|
2151
|
+
response = _c.sent();
|
|
2152
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbPageResponseFromJSON)(jsonValue); })];
|
|
2153
|
+
}
|
|
2154
|
+
});
|
|
2155
|
+
});
|
|
2156
|
+
};
|
|
2157
|
+
/**
|
|
2158
|
+
* Upload the image with files/upload to the page path followed by a filename first, then name that filename here as either the default image or an image code. The default image is what a pageimage element with no pageImageCode renders, and what a subgroup tile shows. Replaces whatever that slot held. Always needs sfvb_publish.
|
|
2159
|
+
* Attach an image to a page
|
|
2160
|
+
*/
|
|
2161
|
+
SfvbApi.prototype.putSfvbPageMultimedia = function (requestParameters, initOverrides) {
|
|
2162
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2163
|
+
var response;
|
|
2164
|
+
return __generator(this, function (_a) {
|
|
2165
|
+
switch (_a.label) {
|
|
2166
|
+
case 0: return [4 /*yield*/, this.putSfvbPageMultimediaRaw(requestParameters, initOverrides)];
|
|
2167
|
+
case 1:
|
|
2168
|
+
response = _a.sent();
|
|
2169
|
+
return [4 /*yield*/, response.value()];
|
|
2170
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
2171
|
+
}
|
|
2172
|
+
});
|
|
2173
|
+
});
|
|
2174
|
+
};
|
|
1897
2175
|
/**
|
|
1898
2176
|
* Stores compiled containers against a session created by createSfvbPreviewSession. Replaces whatever the session held. The session must exist - this does not create one, so a deleted, expired or never issued id is a 404 rather than a new session. Nothing durable is written. Requires a token that resolves to a user, so use the device authorization flow.
|
|
1899
2177
|
* Push containers into a preview session
|
|
@@ -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
|
*/
|