ultracart_rest_api_v2_typescript 4.1.156 → 4.1.158
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 +4 -0
- package/README.md +4 -2
- package/dist/apis/SfvbApi.d.ts +77 -18
- package/dist/apis/SfvbApi.js +133 -8
- package/dist/models/SfvbContainerResponse.d.ts +6 -0
- package/dist/models/SfvbContainerResponse.js +2 -0
- package/dist/models/SfvbSiteAttribute.d.ts +87 -0
- package/dist/models/SfvbSiteAttribute.js +81 -0
- package/dist/models/SfvbSiteAttributeUpdate.d.ts +56 -0
- package/dist/models/SfvbSiteAttributeUpdate.js +66 -0
- package/dist/models/SfvbSiteAttributeUpdateRequest.d.ts +32 -0
- package/dist/models/SfvbSiteAttributeUpdateRequest.js +51 -0
- package/dist/models/SfvbSiteAttributesResponse.d.ts +38 -0
- package/dist/models/SfvbSiteAttributesResponse.js +53 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/SfvbApi.ts +157 -17
- package/src/models/SfvbContainerResponse.ts +8 -0
- package/src/models/SfvbSiteAttribute.ts +137 -0
- package/src/models/SfvbSiteAttributeUpdate.ts +98 -0
- package/src/models/SfvbSiteAttributeUpdateRequest.ts +74 -0
- package/src/models/SfvbSiteAttributesResponse.ts +82 -0
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -1032,6 +1032,10 @@ src/models/SfvbPreviewSessionResponse.ts
|
|
|
1032
1032
|
src/models/SfvbPreviewUrlResponse.ts
|
|
1033
1033
|
src/models/SfvbRenderRequest.ts
|
|
1034
1034
|
src/models/SfvbRenderResponse.ts
|
|
1035
|
+
src/models/SfvbSiteAttribute.ts
|
|
1036
|
+
src/models/SfvbSiteAttributeUpdate.ts
|
|
1037
|
+
src/models/SfvbSiteAttributeUpdateRequest.ts
|
|
1038
|
+
src/models/SfvbSiteAttributesResponse.ts
|
|
1035
1039
|
src/models/SfvbStorefront.ts
|
|
1036
1040
|
src/models/SfvbStorefrontsResponse.ts
|
|
1037
1041
|
src/models/SfvbTheme.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.158
|
|
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.158 --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.158 | 09/18/2026 | sfvb internal testing |
|
|
89
|
+
| 4.1.157 | 09/18/2026 | sfvb internal testing |
|
|
88
90
|
| 4.1.156 | 09/16/2026 | sfvb internal testing |
|
|
89
91
|
| 4.1.155 | 09/15/2026 | sfvb internal testing |
|
|
90
92
|
| 4.1.154 | 09/14/2026 | sfvb internal testing |
|
package/dist/apis/SfvbApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbLibraryEntry, SfvbLibraryResponse, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, 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';
|
|
13
|
+
import { SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbLibraryEntry, SfvbLibraryResponse, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbPageAttributeUpdateRequest, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, 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
|
}
|
|
@@ -93,6 +93,9 @@ export interface GetSfvbPreviewUrlRequest {
|
|
|
93
93
|
previewSessionId: string;
|
|
94
94
|
path?: string;
|
|
95
95
|
}
|
|
96
|
+
export interface GetSfvbSiteAttributesRequest {
|
|
97
|
+
storefrontOid: number;
|
|
98
|
+
}
|
|
96
99
|
export interface GetSfvbThemeRequest {
|
|
97
100
|
storefrontOid: number;
|
|
98
101
|
themeOid: number;
|
|
@@ -168,6 +171,10 @@ export interface PutSfvbPreviewSessionRequest {
|
|
|
168
171
|
previewSession: SfvbPreviewSessionRequest;
|
|
169
172
|
themeOid?: number;
|
|
170
173
|
}
|
|
174
|
+
export interface PutSfvbSiteAttributesRequest {
|
|
175
|
+
storefrontOid: number;
|
|
176
|
+
siteAttributeUpdateRequest: SfvbSiteAttributeUpdateRequest;
|
|
177
|
+
}
|
|
171
178
|
export interface PutSfvbThemeAttributesRequest {
|
|
172
179
|
storefrontOid: number;
|
|
173
180
|
themeOid: number;
|
|
@@ -362,7 +369,7 @@ export interface SfvbApiInterface {
|
|
|
362
369
|
*/
|
|
363
370
|
getSfvbCjsonUsedElements(requestParameters: GetSfvbCjsonUsedElementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementsResponse>;
|
|
364
371
|
/**
|
|
365
|
-
* owner_type is one of upsell, email, postcardfront, postcardback or item. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
372
|
+
* owner_type is one of upsell, email, postcardfront, postcardback, item or itemid. It also says how owner_object_id is read - item and upsell take an oid, itemid takes a merchant item id, and the rest take an esp uuid. itemid reaches the same containers as item and is the way to address one from a storefront, where data-context-item-id carries the merchant item id and the oid appears nowhere. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
366
373
|
* @summary Read a container stored outside the file system
|
|
367
374
|
* @param {number} storefrontOid
|
|
368
375
|
* @param {string} ownerType
|
|
@@ -374,12 +381,12 @@ export interface SfvbApiInterface {
|
|
|
374
381
|
*/
|
|
375
382
|
getSfvbContainerRaw(requestParameters: GetSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerResponse>>;
|
|
376
383
|
/**
|
|
377
|
-
* owner_type is one of upsell, email, postcardfront, postcardback or item. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
384
|
+
* owner_type is one of upsell, email, postcardfront, postcardback, item or itemid. It also says how owner_object_id is read - item and upsell take an oid, itemid takes a merchant item id, and the rest take an esp uuid. itemid reaches the same containers as item and is the way to address one from a storefront, where data-context-item-id carries the merchant item id and the oid appears nowhere. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
378
385
|
* Read a container stored outside the file system
|
|
379
386
|
*/
|
|
380
387
|
getSfvbContainer(requestParameters: GetSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerResponse>;
|
|
381
388
|
/**
|
|
382
|
-
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route.
|
|
389
|
+
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route. owner_type also says how owner_object_id is read, and itemid addresses an item container by merchant item id.
|
|
383
390
|
* @summary Read the CJSON stored in one container history entry
|
|
384
391
|
* @param {number} storefrontOid
|
|
385
392
|
* @param {number} containerHistoryOid
|
|
@@ -392,7 +399,7 @@ export interface SfvbApiInterface {
|
|
|
392
399
|
*/
|
|
393
400
|
getSfvbContainerVersionRaw(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerVersion>>;
|
|
394
401
|
/**
|
|
395
|
-
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route.
|
|
402
|
+
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route. owner_type also says how owner_object_id is read, and itemid addresses an item container by merchant item id.
|
|
396
403
|
* Read the CJSON stored in one container history entry
|
|
397
404
|
*/
|
|
398
405
|
getSfvbContainerVersion(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersion>;
|
|
@@ -516,6 +523,20 @@ export interface SfvbApiInterface {
|
|
|
516
523
|
* URL that renders a preview session
|
|
517
524
|
*/
|
|
518
525
|
getSfvbPreviewUrl(requestParameters: GetSfvbPreviewUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewUrlResponse>;
|
|
526
|
+
/**
|
|
527
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
528
|
+
* @summary Read a storefront\'s site attributes
|
|
529
|
+
* @param {number} storefrontOid
|
|
530
|
+
* @param {*} [options] Override http request option.
|
|
531
|
+
* @throws {RequiredError}
|
|
532
|
+
* @memberof SfvbApiInterface
|
|
533
|
+
*/
|
|
534
|
+
getSfvbSiteAttributesRaw(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbSiteAttributesResponse>>;
|
|
535
|
+
/**
|
|
536
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
537
|
+
* Read a storefront\'s site attributes
|
|
538
|
+
*/
|
|
539
|
+
getSfvbSiteAttributes(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
|
|
519
540
|
/**
|
|
520
541
|
*
|
|
521
542
|
* @summary Get a theme
|
|
@@ -602,7 +623,7 @@ export interface SfvbApiInterface {
|
|
|
602
623
|
*/
|
|
603
624
|
installSfvbLibraryEntry(requestParameters: InstallSfvbLibraryEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbLibraryEntry>;
|
|
604
625
|
/**
|
|
605
|
-
*
|
|
626
|
+
* Addressed the same way as the container itself, so owner_type also says how owner_object_id is read and itemid lists the history of the item container that merchant item id names.
|
|
606
627
|
* @summary Version history for a container stored outside the file system
|
|
607
628
|
* @param {number} storefrontOid
|
|
608
629
|
* @param {string} [ownerType]
|
|
@@ -614,6 +635,7 @@ export interface SfvbApiInterface {
|
|
|
614
635
|
*/
|
|
615
636
|
listSfvbContainerVersionsRaw(requestParameters: ListSfvbContainerVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerVersionsResponse>>;
|
|
616
637
|
/**
|
|
638
|
+
* Addressed the same way as the container itself, so owner_type also says how owner_object_id is read and itemid lists the history of the item container that merchant item id names.
|
|
617
639
|
* Version history for a container stored outside the file system
|
|
618
640
|
*/
|
|
619
641
|
listSfvbContainerVersions(requestParameters: ListSfvbContainerVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersionsResponse>;
|
|
@@ -704,7 +726,7 @@ export interface SfvbApiInterface {
|
|
|
704
726
|
*/
|
|
705
727
|
listSfvbUpsellOffers(requestParameters: ListSfvbUpsellOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbUpsellOffersResponse>;
|
|
706
728
|
/**
|
|
707
|
-
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too.
|
|
729
|
+
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too. owner_type also says how owner_object_id is read; send itemid to address an item container by merchant item id rather than by oid. Either way the history records the one canonical address, so a container written under one spelling is listed and reverted under the other.
|
|
708
730
|
* @summary Write a container stored outside the file system
|
|
709
731
|
* @param {number} storefrontOid
|
|
710
732
|
* @param {string} ownerType
|
|
@@ -718,7 +740,7 @@ export interface SfvbApiInterface {
|
|
|
718
740
|
*/
|
|
719
741
|
putSfvbContainerRaw(requestParameters: PutSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerResponse>>;
|
|
720
742
|
/**
|
|
721
|
-
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too.
|
|
743
|
+
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too. owner_type also says how owner_object_id is read; send itemid to address an item container by merchant item id rather than by oid. Either way the history records the one canonical address, so a container written under one spelling is listed and reverted under the other.
|
|
722
744
|
* Write a container stored outside the file system
|
|
723
745
|
*/
|
|
724
746
|
putSfvbContainer(requestParameters: PutSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerResponse>;
|
|
@@ -805,6 +827,21 @@ export interface SfvbApiInterface {
|
|
|
805
827
|
* Push containers into a preview session
|
|
806
828
|
*/
|
|
807
829
|
putSfvbPreviewSession(requestParameters: PutSfvbPreviewSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewSessionResponse>;
|
|
830
|
+
/**
|
|
831
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
832
|
+
* @summary Change a storefront\'s site attributes
|
|
833
|
+
* @param {number} storefrontOid
|
|
834
|
+
* @param {SfvbSiteAttributeUpdateRequest} siteAttributeUpdateRequest Attributes to change
|
|
835
|
+
* @param {*} [options] Override http request option.
|
|
836
|
+
* @throws {RequiredError}
|
|
837
|
+
* @memberof SfvbApiInterface
|
|
838
|
+
*/
|
|
839
|
+
putSfvbSiteAttributesRaw(requestParameters: PutSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbSiteAttributesResponse>>;
|
|
840
|
+
/**
|
|
841
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
842
|
+
* Change a storefront\'s site attributes
|
|
843
|
+
*/
|
|
844
|
+
putSfvbSiteAttributes(requestParameters: PutSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
|
|
808
845
|
/**
|
|
809
846
|
* A partial update. Only the slots you name are changed and every other slot on the theme keeps its value, so there is no need to send the whole set back to change one color. Send a whole palette in one call rather than one call per color - they are applied together, so the storefront never renders half of a change. Needs sfvb_publish when the theme is the one serving live traffic, because a color is referenced by name from every template that uses it and one write repaints the whole storefront at once. On a dormant theme sfvb_write is enough, which is what makes duplicate-then-restyle work.
|
|
810
847
|
* @summary Change a theme\'s colors, fonts and settings
|
|
@@ -853,7 +890,7 @@ export interface SfvbApiInterface {
|
|
|
853
890
|
*/
|
|
854
891
|
reserveSfvbWidgetIds(requestParameters: ReserveSfvbWidgetIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbWidgetIdsResponse>;
|
|
855
892
|
/**
|
|
856
|
-
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does.
|
|
893
|
+
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does. owner_type also says how owner_object_id is read, so a version written by oid can be reverted by merchant item id and the other way round.
|
|
857
894
|
* @summary Revert a container stored outside the file system
|
|
858
895
|
* @param {number} storefrontOid
|
|
859
896
|
* @param {string} ownerType
|
|
@@ -867,7 +904,7 @@ export interface SfvbApiInterface {
|
|
|
867
904
|
*/
|
|
868
905
|
revertSfvbContainerRaw(requestParameters: RevertSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerResponse>>;
|
|
869
906
|
/**
|
|
870
|
-
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does.
|
|
907
|
+
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does. owner_type also says how owner_object_id is read, so a version written by oid can be reverted by merchant item id and the other way round.
|
|
871
908
|
* Revert a container stored outside the file system
|
|
872
909
|
*/
|
|
873
910
|
revertSfvbContainer(requestParameters: RevertSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerResponse>;
|
|
@@ -1060,22 +1097,22 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1060
1097
|
*/
|
|
1061
1098
|
getSfvbCjsonUsedElements(requestParameters: GetSfvbCjsonUsedElementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementsResponse>;
|
|
1062
1099
|
/**
|
|
1063
|
-
* owner_type is one of upsell, email, postcardfront, postcardback or item. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
1100
|
+
* owner_type is one of upsell, email, postcardfront, postcardback, item or itemid. It also says how owner_object_id is read - item and upsell take an oid, itemid takes a merchant item id, and the rest take an esp uuid. itemid reaches the same containers as item and is the way to address one from a storefront, where data-context-item-id carries the merchant item id and the oid appears nowhere. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
1064
1101
|
* Read a container stored outside the file system
|
|
1065
1102
|
*/
|
|
1066
1103
|
getSfvbContainerRaw(requestParameters: GetSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerResponse>>;
|
|
1067
1104
|
/**
|
|
1068
|
-
* owner_type is one of upsell, email, postcardfront, postcardback or item. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
1105
|
+
* owner_type is one of upsell, email, postcardfront, postcardback, item or itemid. It also says how owner_object_id is read - item and upsell take an oid, itemid takes a merchant item id, and the rest take an esp uuid. itemid reaches the same containers as item and is the way to address one from a storefront, where data-context-item-id carries the merchant item id and the oid appears nowhere. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
1069
1106
|
* Read a container stored outside the file system
|
|
1070
1107
|
*/
|
|
1071
1108
|
getSfvbContainer(requestParameters: GetSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerResponse>;
|
|
1072
1109
|
/**
|
|
1073
|
-
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route.
|
|
1110
|
+
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route. owner_type also says how owner_object_id is read, and itemid addresses an item container by merchant item id.
|
|
1074
1111
|
* Read the CJSON stored in one container history entry
|
|
1075
1112
|
*/
|
|
1076
1113
|
getSfvbContainerVersionRaw(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerVersion>>;
|
|
1077
1114
|
/**
|
|
1078
|
-
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route.
|
|
1115
|
+
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route. owner_type also says how owner_object_id is read, and itemid addresses an item container by merchant item id.
|
|
1079
1116
|
* Read the CJSON stored in one container history entry
|
|
1080
1117
|
*/
|
|
1081
1118
|
getSfvbContainerVersion(requestParameters: GetSfvbContainerVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersion>;
|
|
@@ -1159,6 +1196,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1159
1196
|
* URL that renders a preview session
|
|
1160
1197
|
*/
|
|
1161
1198
|
getSfvbPreviewUrl(requestParameters: GetSfvbPreviewUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewUrlResponse>;
|
|
1199
|
+
/**
|
|
1200
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1201
|
+
* Read a storefront\'s site attributes
|
|
1202
|
+
*/
|
|
1203
|
+
getSfvbSiteAttributesRaw(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbSiteAttributesResponse>>;
|
|
1204
|
+
/**
|
|
1205
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1206
|
+
* Read a storefront\'s site attributes
|
|
1207
|
+
*/
|
|
1208
|
+
getSfvbSiteAttributes(requestParameters: GetSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
|
|
1162
1209
|
/**
|
|
1163
1210
|
* Get a theme
|
|
1164
1211
|
*/
|
|
@@ -1218,10 +1265,12 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1218
1265
|
*/
|
|
1219
1266
|
installSfvbLibraryEntry(requestParameters: InstallSfvbLibraryEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbLibraryEntry>;
|
|
1220
1267
|
/**
|
|
1268
|
+
* Addressed the same way as the container itself, so owner_type also says how owner_object_id is read and itemid lists the history of the item container that merchant item id names.
|
|
1221
1269
|
* Version history for a container stored outside the file system
|
|
1222
1270
|
*/
|
|
1223
1271
|
listSfvbContainerVersionsRaw(requestParameters: ListSfvbContainerVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerVersionsResponse>>;
|
|
1224
1272
|
/**
|
|
1273
|
+
* Addressed the same way as the container itself, so owner_type also says how owner_object_id is read and itemid lists the history of the item container that merchant item id names.
|
|
1225
1274
|
* Version history for a container stored outside the file system
|
|
1226
1275
|
*/
|
|
1227
1276
|
listSfvbContainerVersions(requestParameters: ListSfvbContainerVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerVersionsResponse>;
|
|
@@ -1284,12 +1333,12 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1284
1333
|
*/
|
|
1285
1334
|
listSfvbUpsellOffers(requestParameters: ListSfvbUpsellOffersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbUpsellOffersResponse>;
|
|
1286
1335
|
/**
|
|
1287
|
-
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too.
|
|
1336
|
+
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too. owner_type also says how owner_object_id is read; send itemid to address an item container by merchant item id rather than by oid. Either way the history records the one canonical address, so a container written under one spelling is listed and reverted under the other.
|
|
1288
1337
|
* Write a container stored outside the file system
|
|
1289
1338
|
*/
|
|
1290
1339
|
putSfvbContainerRaw(requestParameters: PutSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerResponse>>;
|
|
1291
1340
|
/**
|
|
1292
|
-
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too.
|
|
1341
|
+
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too. owner_type also says how owner_object_id is read; send itemid to address an item container by merchant item id rather than by oid. Either way the history records the one canonical address, so a container written under one spelling is listed and reverted under the other.
|
|
1293
1342
|
* Write a container stored outside the file system
|
|
1294
1343
|
*/
|
|
1295
1344
|
putSfvbContainer(requestParameters: PutSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerResponse>;
|
|
@@ -1343,6 +1392,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1343
1392
|
* Push containers into a preview session
|
|
1344
1393
|
*/
|
|
1345
1394
|
putSfvbPreviewSession(requestParameters: PutSfvbPreviewSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPreviewSessionResponse>;
|
|
1395
|
+
/**
|
|
1396
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
1397
|
+
* Change a storefront\'s site attributes
|
|
1398
|
+
*/
|
|
1399
|
+
putSfvbSiteAttributesRaw(requestParameters: PutSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbSiteAttributesResponse>>;
|
|
1400
|
+
/**
|
|
1401
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
1402
|
+
* Change a storefront\'s site attributes
|
|
1403
|
+
*/
|
|
1404
|
+
putSfvbSiteAttributes(requestParameters: PutSfvbSiteAttributesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbSiteAttributesResponse>;
|
|
1346
1405
|
/**
|
|
1347
1406
|
* A partial update. Only the slots you name are changed and every other slot on the theme keeps its value, so there is no need to send the whole set back to change one color. Send a whole palette in one call rather than one call per color - they are applied together, so the storefront never renders half of a change. Needs sfvb_publish when the theme is the one serving live traffic, because a color is referenced by name from every template that uses it and one write repaints the whole storefront at once. On a dormant theme sfvb_write is enough, which is what makes duplicate-then-restyle work.
|
|
1348
1407
|
* Change a theme\'s colors, fonts and settings
|
|
@@ -1374,12 +1433,12 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
1374
1433
|
*/
|
|
1375
1434
|
reserveSfvbWidgetIds(requestParameters: ReserveSfvbWidgetIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbWidgetIdsResponse>;
|
|
1376
1435
|
/**
|
|
1377
|
-
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does.
|
|
1436
|
+
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does. owner_type also says how owner_object_id is read, so a version written by oid can be reverted by merchant item id and the other way round.
|
|
1378
1437
|
* Revert a container stored outside the file system
|
|
1379
1438
|
*/
|
|
1380
1439
|
revertSfvbContainerRaw(requestParameters: RevertSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbContainerResponse>>;
|
|
1381
1440
|
/**
|
|
1382
|
-
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does.
|
|
1441
|
+
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does. owner_type also says how owner_object_id is read, so a version written by oid can be reverted by merchant item id and the other way round.
|
|
1383
1442
|
* Revert a container stored outside the file system
|
|
1384
1443
|
*/
|
|
1385
1444
|
revertSfvbContainer(requestParameters: RevertSfvbContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbContainerResponse>;
|
package/dist/apis/SfvbApi.js
CHANGED
|
@@ -640,7 +640,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
640
640
|
});
|
|
641
641
|
};
|
|
642
642
|
/**
|
|
643
|
-
* owner_type is one of upsell, email, postcardfront, postcardback or item. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
643
|
+
* owner_type is one of upsell, email, postcardfront, postcardback, item or itemid. It also says how owner_object_id is read - item and upsell take an oid, itemid takes a merchant item id, and the rest take an esp uuid. itemid reaches the same containers as item and is the way to address one from a storefront, where data-context-item-id carries the merchant item id and the oid appears nowhere. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
644
644
|
* Read a container stored outside the file system
|
|
645
645
|
*/
|
|
646
646
|
SfvbApi.prototype.getSfvbContainerRaw = function (requestParameters, initOverrides) {
|
|
@@ -690,7 +690,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
690
690
|
});
|
|
691
691
|
};
|
|
692
692
|
/**
|
|
693
|
-
* owner_type is one of upsell, email, postcardfront, postcardback or item. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
693
|
+
* owner_type is one of upsell, email, postcardfront, postcardback, item or itemid. It also says how owner_object_id is read - item and upsell take an oid, itemid takes a merchant item id, and the rest take an esp uuid. itemid reaches the same containers as item and is the way to address one from a storefront, where data-context-item-id carries the merchant item id and the oid appears nowhere. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
694
694
|
* Read a container stored outside the file system
|
|
695
695
|
*/
|
|
696
696
|
SfvbApi.prototype.getSfvbContainer = function (requestParameters, initOverrides) {
|
|
@@ -708,7 +708,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
708
708
|
});
|
|
709
709
|
};
|
|
710
710
|
/**
|
|
711
|
-
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route.
|
|
711
|
+
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route. owner_type also says how owner_object_id is read, and itemid addresses an item container by merchant item id.
|
|
712
712
|
* Read the CJSON stored in one container history entry
|
|
713
713
|
*/
|
|
714
714
|
SfvbApi.prototype.getSfvbContainerVersionRaw = function (requestParameters, initOverrides) {
|
|
@@ -761,7 +761,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
761
761
|
});
|
|
762
762
|
};
|
|
763
763
|
/**
|
|
764
|
-
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route.
|
|
764
|
+
* Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route. owner_type also says how owner_object_id is read, and itemid addresses an item container by merchant item id.
|
|
765
765
|
* Read the CJSON stored in one container history entry
|
|
766
766
|
*/
|
|
767
767
|
SfvbApi.prototype.getSfvbContainerVersion = function (requestParameters, initOverrides) {
|
|
@@ -1277,6 +1277,65 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
1277
1277
|
});
|
|
1278
1278
|
});
|
|
1279
1279
|
};
|
|
1280
|
+
/**
|
|
1281
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1282
|
+
* Read a storefront\'s site attributes
|
|
1283
|
+
*/
|
|
1284
|
+
SfvbApi.prototype.getSfvbSiteAttributesRaw = function (requestParameters, initOverrides) {
|
|
1285
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1286
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
1287
|
+
return __generator(this, function (_c) {
|
|
1288
|
+
switch (_c.label) {
|
|
1289
|
+
case 0:
|
|
1290
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
1291
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling getSfvbSiteAttributes.');
|
|
1292
|
+
}
|
|
1293
|
+
queryParameters = {};
|
|
1294
|
+
headerParameters = {};
|
|
1295
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
1296
|
+
// oauth required
|
|
1297
|
+
_a = headerParameters;
|
|
1298
|
+
_b = "Authorization";
|
|
1299
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
1300
|
+
case 1:
|
|
1301
|
+
// oauth required
|
|
1302
|
+
_a[_b] = _c.sent();
|
|
1303
|
+
_c.label = 2;
|
|
1304
|
+
case 2:
|
|
1305
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1306
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1307
|
+
}
|
|
1308
|
+
return [4 /*yield*/, this.request({
|
|
1309
|
+
path: "/sfvb/storefronts/{storefront_oid}/attributes".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
1310
|
+
method: 'GET',
|
|
1311
|
+
headers: headerParameters,
|
|
1312
|
+
query: queryParameters,
|
|
1313
|
+
}, initOverrides)];
|
|
1314
|
+
case 3:
|
|
1315
|
+
response = _c.sent();
|
|
1316
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbSiteAttributesResponseFromJSON)(jsonValue); })];
|
|
1317
|
+
}
|
|
1318
|
+
});
|
|
1319
|
+
});
|
|
1320
|
+
};
|
|
1321
|
+
/**
|
|
1322
|
+
* The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template\'s default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1323
|
+
* Read a storefront\'s site attributes
|
|
1324
|
+
*/
|
|
1325
|
+
SfvbApi.prototype.getSfvbSiteAttributes = function (requestParameters, initOverrides) {
|
|
1326
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1327
|
+
var response;
|
|
1328
|
+
return __generator(this, function (_a) {
|
|
1329
|
+
switch (_a.label) {
|
|
1330
|
+
case 0: return [4 /*yield*/, this.getSfvbSiteAttributesRaw(requestParameters, initOverrides)];
|
|
1331
|
+
case 1:
|
|
1332
|
+
response = _a.sent();
|
|
1333
|
+
return [4 /*yield*/, response.value()];
|
|
1334
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1335
|
+
}
|
|
1336
|
+
});
|
|
1337
|
+
});
|
|
1338
|
+
};
|
|
1280
1339
|
/**
|
|
1281
1340
|
* Get a theme
|
|
1282
1341
|
*/
|
|
@@ -1636,6 +1695,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
1636
1695
|
});
|
|
1637
1696
|
};
|
|
1638
1697
|
/**
|
|
1698
|
+
* Addressed the same way as the container itself, so owner_type also says how owner_object_id is read and itemid lists the history of the item container that merchant item id names.
|
|
1639
1699
|
* Version history for a container stored outside the file system
|
|
1640
1700
|
*/
|
|
1641
1701
|
SfvbApi.prototype.listSfvbContainerVersionsRaw = function (requestParameters, initOverrides) {
|
|
@@ -1685,6 +1745,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
1685
1745
|
});
|
|
1686
1746
|
};
|
|
1687
1747
|
/**
|
|
1748
|
+
* Addressed the same way as the container itself, so owner_type also says how owner_object_id is read and itemid lists the history of the item container that merchant item id names.
|
|
1688
1749
|
* Version history for a container stored outside the file system
|
|
1689
1750
|
*/
|
|
1690
1751
|
SfvbApi.prototype.listSfvbContainerVersions = function (requestParameters, initOverrides) {
|
|
@@ -2063,7 +2124,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
2063
2124
|
});
|
|
2064
2125
|
};
|
|
2065
2126
|
/**
|
|
2066
|
-
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too.
|
|
2127
|
+
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too. owner_type also says how owner_object_id is read; send itemid to address an item container by merchant item id rather than by oid. Either way the history records the one canonical address, so a container written under one spelling is listed and reverted under the other.
|
|
2067
2128
|
* Write a container stored outside the file system
|
|
2068
2129
|
*/
|
|
2069
2130
|
SfvbApi.prototype.putSfvbContainerRaw = function (requestParameters, initOverrides) {
|
|
@@ -2124,7 +2185,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
2124
2185
|
});
|
|
2125
2186
|
};
|
|
2126
2187
|
/**
|
|
2127
|
-
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too.
|
|
2188
|
+
* Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too. owner_type also says how owner_object_id is read; send itemid to address an item container by merchant item id rather than by oid. Either way the history records the one canonical address, so a container written under one spelling is listed and reverted under the other.
|
|
2128
2189
|
* Write a container stored outside the file system
|
|
2129
2190
|
*/
|
|
2130
2191
|
SfvbApi.prototype.putSfvbContainer = function (requestParameters, initOverrides) {
|
|
@@ -2494,6 +2555,70 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
2494
2555
|
});
|
|
2495
2556
|
});
|
|
2496
2557
|
};
|
|
2558
|
+
/**
|
|
2559
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
2560
|
+
* Change a storefront\'s site attributes
|
|
2561
|
+
*/
|
|
2562
|
+
SfvbApi.prototype.putSfvbSiteAttributesRaw = function (requestParameters, initOverrides) {
|
|
2563
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2564
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
2565
|
+
return __generator(this, function (_c) {
|
|
2566
|
+
switch (_c.label) {
|
|
2567
|
+
case 0:
|
|
2568
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
2569
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling putSfvbSiteAttributes.');
|
|
2570
|
+
}
|
|
2571
|
+
if (requestParameters.siteAttributeUpdateRequest === null || requestParameters.siteAttributeUpdateRequest === undefined) {
|
|
2572
|
+
throw new runtime.RequiredError('siteAttributeUpdateRequest', 'Required parameter requestParameters.siteAttributeUpdateRequest was null or undefined when calling putSfvbSiteAttributes.');
|
|
2573
|
+
}
|
|
2574
|
+
queryParameters = {};
|
|
2575
|
+
headerParameters = {};
|
|
2576
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2577
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
2578
|
+
// oauth required
|
|
2579
|
+
_a = headerParameters;
|
|
2580
|
+
_b = "Authorization";
|
|
2581
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
2582
|
+
case 1:
|
|
2583
|
+
// oauth required
|
|
2584
|
+
_a[_b] = _c.sent();
|
|
2585
|
+
_c.label = 2;
|
|
2586
|
+
case 2:
|
|
2587
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2588
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
2589
|
+
}
|
|
2590
|
+
return [4 /*yield*/, this.request({
|
|
2591
|
+
path: "/sfvb/storefronts/{storefront_oid}/attributes".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
2592
|
+
method: 'PUT',
|
|
2593
|
+
headers: headerParameters,
|
|
2594
|
+
query: queryParameters,
|
|
2595
|
+
body: (0, models_1.SfvbSiteAttributeUpdateRequestToJSON)(requestParameters.siteAttributeUpdateRequest),
|
|
2596
|
+
}, initOverrides)];
|
|
2597
|
+
case 3:
|
|
2598
|
+
response = _c.sent();
|
|
2599
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbSiteAttributesResponseFromJSON)(jsonValue); })];
|
|
2600
|
+
}
|
|
2601
|
+
});
|
|
2602
|
+
});
|
|
2603
|
+
};
|
|
2604
|
+
/**
|
|
2605
|
+
* A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, video list, mailing list and item set attributes are refused, and so are the General screen settings other than the title, the SEO description and keywords and the social account names. Credentials are refused. Always needs sfvb_publish, because every theme reads the same attributes and there is no dormant copy to change instead. The admin General screen saves the whole storefront, so a merchant with it open can still overwrite a change made here.
|
|
2606
|
+
* Change a storefront\'s site attributes
|
|
2607
|
+
*/
|
|
2608
|
+
SfvbApi.prototype.putSfvbSiteAttributes = function (requestParameters, initOverrides) {
|
|
2609
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2610
|
+
var response;
|
|
2611
|
+
return __generator(this, function (_a) {
|
|
2612
|
+
switch (_a.label) {
|
|
2613
|
+
case 0: return [4 /*yield*/, this.putSfvbSiteAttributesRaw(requestParameters, initOverrides)];
|
|
2614
|
+
case 1:
|
|
2615
|
+
response = _a.sent();
|
|
2616
|
+
return [4 /*yield*/, response.value()];
|
|
2617
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
2618
|
+
}
|
|
2619
|
+
});
|
|
2620
|
+
});
|
|
2621
|
+
};
|
|
2497
2622
|
/**
|
|
2498
2623
|
* A partial update. Only the slots you name are changed and every other slot on the theme keeps its value, so there is no need to send the whole set back to change one color. Send a whole palette in one call rather than one call per color - they are applied together, so the storefront never renders half of a change. Needs sfvb_publish when the theme is the one serving live traffic, because a color is referenced by name from every template that uses it and one write repaints the whole storefront at once. On a dormant theme sfvb_write is enough, which is what makes duplicate-then-restyle work.
|
|
2499
2624
|
* Change a theme\'s colors, fonts and settings
|
|
@@ -2691,7 +2816,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
2691
2816
|
});
|
|
2692
2817
|
};
|
|
2693
2818
|
/**
|
|
2694
|
-
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does.
|
|
2819
|
+
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does. owner_type also says how owner_object_id is read, so a version written by oid can be reverted by merchant item id and the other way round.
|
|
2695
2820
|
* Revert a container stored outside the file system
|
|
2696
2821
|
*/
|
|
2697
2822
|
SfvbApi.prototype.revertSfvbContainerRaw = function (requestParameters, initOverrides) {
|
|
@@ -2752,7 +2877,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
2752
2877
|
});
|
|
2753
2878
|
};
|
|
2754
2879
|
/**
|
|
2755
|
-
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does.
|
|
2880
|
+
* The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does. owner_type also says how owner_object_id is read, so a version written by oid can be reverted by merchant item id and the other way round.
|
|
2756
2881
|
* Revert a container stored outside the file system
|
|
2757
2882
|
*/
|
|
2758
2883
|
SfvbApi.prototype.revertSfvbContainer = function (requestParameters, initOverrides) {
|
|
@@ -39,6 +39,12 @@ export interface SfvbContainerResponse {
|
|
|
39
39
|
* @memberof SfvbContainerResponse
|
|
40
40
|
*/
|
|
41
41
|
last_modified?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The merchant item id of the owning item, for item containers only and absent for every other owner type. owner_object_id is the item oid, which appears nowhere on a rendered storefront, so this is how a caller confirms which item an oid actually reached. It is read fresh on every call and so reflects a renamed item. A container's own id embeds this value, which is what a preview session keys an item container on.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof SfvbContainerResponse
|
|
46
|
+
*/
|
|
47
|
+
merchant_item_id?: string;
|
|
42
48
|
/**
|
|
43
49
|
* Identifier of the owning object within its store.
|
|
44
50
|
* @type {string}
|
|
@@ -47,6 +47,7 @@ function SfvbContainerResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
47
47
|
'container_name': !(0, runtime_1.exists)(json, 'container_name') ? undefined : json['container_name'],
|
|
48
48
|
'hash_sha256': !(0, runtime_1.exists)(json, 'hash_sha256') ? undefined : json['hash_sha256'],
|
|
49
49
|
'last_modified': !(0, runtime_1.exists)(json, 'last_modified') ? undefined : json['last_modified'],
|
|
50
|
+
'merchant_item_id': !(0, runtime_1.exists)(json, 'merchant_item_id') ? undefined : json['merchant_item_id'],
|
|
50
51
|
'owner_object_id': !(0, runtime_1.exists)(json, 'owner_object_id') ? undefined : json['owner_object_id'],
|
|
51
52
|
'owner_type': !(0, runtime_1.exists)(json, 'owner_type') ? undefined : json['owner_type'],
|
|
52
53
|
};
|
|
@@ -64,6 +65,7 @@ function SfvbContainerResponseToJSON(value) {
|
|
|
64
65
|
'container_name': value.container_name,
|
|
65
66
|
'hash_sha256': value.hash_sha256,
|
|
66
67
|
'last_modified': value.last_modified,
|
|
68
|
+
'merchant_item_id': value.merchant_item_id,
|
|
67
69
|
'owner_object_id': value.owner_object_id,
|
|
68
70
|
'owner_type': value.owner_type,
|
|
69
71
|
};
|