ultracart_rest_api_v2_typescript 4.1.172 → 4.1.174
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 +3 -0
- package/README.md +4 -2
- package/dist/apis/SfvbApi.d.ts +36 -5
- package/dist/apis/SfvbApi.js +70 -2
- package/dist/models/EmailFlow.d.ts +21 -0
- package/dist/models/EmailFlow.js +13 -1
- package/dist/models/SfvbTemplateResolveCandidate.d.ts +37 -0
- package/dist/models/SfvbTemplateResolveCandidate.js +52 -0
- package/dist/models/SfvbTemplateResolvePath.d.ts +50 -0
- package/dist/models/SfvbTemplateResolvePath.js +57 -0
- package/dist/models/SfvbTemplateResolveResponse.d.ts +68 -0
- package/dist/models/SfvbTemplateResolveResponse.js +63 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/SfvbApi.ts +84 -4
- package/src/models/EmailFlow.ts +27 -0
- package/src/models/SfvbTemplateResolveCandidate.ts +75 -0
- package/src/models/SfvbTemplateResolvePath.ts +98 -0
- package/src/models/SfvbTemplateResolveResponse.ts +122 -0
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -1078,6 +1078,9 @@ src/models/SfvbSiteAttributesResponse.ts
|
|
|
1078
1078
|
src/models/SfvbStorefront.ts
|
|
1079
1079
|
src/models/SfvbStorefrontsResponse.ts
|
|
1080
1080
|
src/models/SfvbTemplate.ts
|
|
1081
|
+
src/models/SfvbTemplateResolveCandidate.ts
|
|
1082
|
+
src/models/SfvbTemplateResolvePath.ts
|
|
1083
|
+
src/models/SfvbTemplateResolveResponse.ts
|
|
1081
1084
|
src/models/SfvbTemplatesResponse.ts
|
|
1082
1085
|
src/models/SfvbTheme.ts
|
|
1083
1086
|
src/models/SfvbThemeAttribute.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.174
|
|
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.174 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -84,6 +84,8 @@ Not every change is committed to every SDK.
|
|
|
84
84
|
|
|
85
85
|
| Version | Date | Comments |
|
|
86
86
|
| --: | :-: | --- |
|
|
87
|
+
| 4.1.174 | 09/25/2026 | sfvb internal testing |
|
|
88
|
+
| 4.1.173 | 09/24/2026 | storefront communications flow re-entry setting |
|
|
87
89
|
| 4.1.172 | 09/24/2026 | storefront communications flow re-entry setting |
|
|
88
90
|
| 4.1.171 | 09/23/2026 | sfvb internal testing |
|
|
89
91
|
| 4.1.170 | 09/22/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 { SfvbBlogPostsResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaRequest, SfvbItemResponse, SfvbItemSeoRequest, SfvbLibraryEntry, SfvbLibraryResponse, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplatesResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffer, SfvbUpsellOffersResponse, SfvbUpsellPath, SfvbUpsellPathDuplicateRequest, SfvbUpsellPathMoveRequest, SfvbUpsellPathsResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
|
|
13
|
+
import { SfvbBlogPostsResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaRequest, SfvbItemResponse, SfvbItemSeoRequest, SfvbLibraryEntry, SfvbLibraryResponse, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplateResolveResponse, SfvbTemplatesResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffer, SfvbUpsellOffersResponse, SfvbUpsellPath, SfvbUpsellPathDuplicateRequest, SfvbUpsellPathMoveRequest, SfvbUpsellPathsResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
|
|
14
14
|
export interface AddSfvbPageBlogPostsRequest {
|
|
15
15
|
storefrontOid: number;
|
|
16
16
|
path: string;
|
|
@@ -394,6 +394,11 @@ export interface ReserveSfvbWidgetIdsRequest {
|
|
|
394
394
|
storefrontOid: number;
|
|
395
395
|
count?: number;
|
|
396
396
|
}
|
|
397
|
+
export interface ResolveSfvbTemplateRequest {
|
|
398
|
+
storefrontOid: number;
|
|
399
|
+
name: string;
|
|
400
|
+
themeOid?: number;
|
|
401
|
+
}
|
|
397
402
|
export interface RevertSfvbContainerRequest {
|
|
398
403
|
storefrontOid: number;
|
|
399
404
|
ownerType: string;
|
|
@@ -739,7 +744,7 @@ export interface SfvbApiInterface {
|
|
|
739
744
|
*/
|
|
740
745
|
duplicateSfvbUpsellPath(requestParameters: DuplicateSfvbUpsellPathRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbUpsellPath>;
|
|
741
746
|
/**
|
|
742
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
747
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
743
748
|
* @summary End an experiment
|
|
744
749
|
* @param {number} storefrontOid
|
|
745
750
|
* @param {number} experimentOid
|
|
@@ -750,7 +755,7 @@ export interface SfvbApiInterface {
|
|
|
750
755
|
*/
|
|
751
756
|
endSfvbExperimentRaw(requestParameters: EndSfvbExperimentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbExperiment>>;
|
|
752
757
|
/**
|
|
753
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
758
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
754
759
|
* End an experiment
|
|
755
760
|
*/
|
|
756
761
|
endSfvbExperiment(requestParameters: EndSfvbExperimentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbExperiment>;
|
|
@@ -1737,6 +1742,22 @@ export interface SfvbApiInterface {
|
|
|
1737
1742
|
* Reserve a block of widget ids
|
|
1738
1743
|
*/
|
|
1739
1744
|
reserveSfvbWidgetIds(requestParameters: ReserveSfvbWidgetIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbWidgetIdsResponse>;
|
|
1745
|
+
/**
|
|
1746
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
1747
|
+
* @summary Resolve a template name to the file a page renders
|
|
1748
|
+
* @param {number} storefrontOid
|
|
1749
|
+
* @param {string} name The template file name, such as catalog.vm
|
|
1750
|
+
* @param {number} [themeOid] Resolve in this theme instead of the active theme
|
|
1751
|
+
* @param {*} [options] Override http request option.
|
|
1752
|
+
* @throws {RequiredError}
|
|
1753
|
+
* @memberof SfvbApiInterface
|
|
1754
|
+
*/
|
|
1755
|
+
resolveSfvbTemplateRaw(requestParameters: ResolveSfvbTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTemplateResolveResponse>>;
|
|
1756
|
+
/**
|
|
1757
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
1758
|
+
* Resolve a template name to the file a page renders
|
|
1759
|
+
*/
|
|
1760
|
+
resolveSfvbTemplate(requestParameters: ResolveSfvbTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTemplateResolveResponse>;
|
|
1740
1761
|
/**
|
|
1741
1762
|
* 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.
|
|
1742
1763
|
* @summary Revert a container stored outside the file system
|
|
@@ -2101,12 +2122,12 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
2101
2122
|
*/
|
|
2102
2123
|
duplicateSfvbUpsellPath(requestParameters: DuplicateSfvbUpsellPathRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbUpsellPath>;
|
|
2103
2124
|
/**
|
|
2104
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
2125
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
2105
2126
|
* End an experiment
|
|
2106
2127
|
*/
|
|
2107
2128
|
endSfvbExperimentRaw(requestParameters: EndSfvbExperimentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbExperiment>>;
|
|
2108
2129
|
/**
|
|
2109
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
2130
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
2110
2131
|
* End an experiment
|
|
2111
2132
|
*/
|
|
2112
2133
|
endSfvbExperiment(requestParameters: EndSfvbExperimentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbExperiment>;
|
|
@@ -2724,6 +2745,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
2724
2745
|
* Reserve a block of widget ids
|
|
2725
2746
|
*/
|
|
2726
2747
|
reserveSfvbWidgetIds(requestParameters: ReserveSfvbWidgetIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbWidgetIdsResponse>;
|
|
2748
|
+
/**
|
|
2749
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
2750
|
+
* Resolve a template name to the file a page renders
|
|
2751
|
+
*/
|
|
2752
|
+
resolveSfvbTemplateRaw(requestParameters: ResolveSfvbTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTemplateResolveResponse>>;
|
|
2753
|
+
/**
|
|
2754
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
2755
|
+
* Resolve a template name to the file a page renders
|
|
2756
|
+
*/
|
|
2757
|
+
resolveSfvbTemplate(requestParameters: ResolveSfvbTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTemplateResolveResponse>;
|
|
2727
2758
|
/**
|
|
2728
2759
|
* 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.
|
|
2729
2760
|
* Revert a container stored outside the file system
|
package/dist/apis/SfvbApi.js
CHANGED
|
@@ -1239,7 +1239,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
1239
1239
|
});
|
|
1240
1240
|
};
|
|
1241
1241
|
/**
|
|
1242
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
1242
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
1243
1243
|
* End an experiment
|
|
1244
1244
|
*/
|
|
1245
1245
|
SfvbApi.prototype.endSfvbExperimentRaw = function (requestParameters, initOverrides) {
|
|
@@ -1285,7 +1285,7 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
1285
1285
|
});
|
|
1286
1286
|
};
|
|
1287
1287
|
/**
|
|
1288
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
1288
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
1289
1289
|
* End an experiment
|
|
1290
1290
|
*/
|
|
1291
1291
|
SfvbApi.prototype.endSfvbExperiment = function (requestParameters, initOverrides) {
|
|
@@ -5390,6 +5390,74 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
5390
5390
|
});
|
|
5391
5391
|
});
|
|
5392
5392
|
};
|
|
5393
|
+
/**
|
|
5394
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
5395
|
+
* Resolve a template name to the file a page renders
|
|
5396
|
+
*/
|
|
5397
|
+
SfvbApi.prototype.resolveSfvbTemplateRaw = function (requestParameters, initOverrides) {
|
|
5398
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5399
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
5400
|
+
return __generator(this, function (_c) {
|
|
5401
|
+
switch (_c.label) {
|
|
5402
|
+
case 0:
|
|
5403
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
5404
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling resolveSfvbTemplate.');
|
|
5405
|
+
}
|
|
5406
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
5407
|
+
throw new runtime.RequiredError('name', 'Required parameter requestParameters.name was null or undefined when calling resolveSfvbTemplate.');
|
|
5408
|
+
}
|
|
5409
|
+
queryParameters = {};
|
|
5410
|
+
if (requestParameters.name !== undefined) {
|
|
5411
|
+
queryParameters['name'] = requestParameters.name;
|
|
5412
|
+
}
|
|
5413
|
+
if (requestParameters.themeOid !== undefined) {
|
|
5414
|
+
queryParameters['theme_oid'] = requestParameters.themeOid;
|
|
5415
|
+
}
|
|
5416
|
+
headerParameters = {};
|
|
5417
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
5418
|
+
// oauth required
|
|
5419
|
+
_a = headerParameters;
|
|
5420
|
+
_b = "Authorization";
|
|
5421
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
5422
|
+
case 1:
|
|
5423
|
+
// oauth required
|
|
5424
|
+
_a[_b] = _c.sent();
|
|
5425
|
+
_c.label = 2;
|
|
5426
|
+
case 2:
|
|
5427
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
5428
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
5429
|
+
}
|
|
5430
|
+
return [4 /*yield*/, this.request({
|
|
5431
|
+
path: "/sfvb/storefronts/{storefront_oid}/templates/resolve".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
5432
|
+
method: 'GET',
|
|
5433
|
+
headers: headerParameters,
|
|
5434
|
+
query: queryParameters,
|
|
5435
|
+
}, initOverrides)];
|
|
5436
|
+
case 3:
|
|
5437
|
+
response = _c.sent();
|
|
5438
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbTemplateResolveResponseFromJSON)(jsonValue); })];
|
|
5439
|
+
}
|
|
5440
|
+
});
|
|
5441
|
+
});
|
|
5442
|
+
};
|
|
5443
|
+
/**
|
|
5444
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
5445
|
+
* Resolve a template name to the file a page renders
|
|
5446
|
+
*/
|
|
5447
|
+
SfvbApi.prototype.resolveSfvbTemplate = function (requestParameters, initOverrides) {
|
|
5448
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5449
|
+
var response;
|
|
5450
|
+
return __generator(this, function (_a) {
|
|
5451
|
+
switch (_a.label) {
|
|
5452
|
+
case 0: return [4 /*yield*/, this.resolveSfvbTemplateRaw(requestParameters, initOverrides)];
|
|
5453
|
+
case 1:
|
|
5454
|
+
response = _a.sent();
|
|
5455
|
+
return [4 /*yield*/, response.value()];
|
|
5456
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
5457
|
+
}
|
|
5458
|
+
});
|
|
5459
|
+
});
|
|
5460
|
+
};
|
|
5393
5461
|
/**
|
|
5394
5462
|
* 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.
|
|
5395
5463
|
* Revert a container stored outside the file system
|
|
@@ -135,6 +135,18 @@ export interface EmailFlow {
|
|
|
135
135
|
* @memberof EmailFlow
|
|
136
136
|
*/
|
|
137
137
|
open_rate_formatted?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Number of days after the last enrollment before a customer may enter this flow again. Only used when reentry_policy is after_days. Maximum 1095.
|
|
140
|
+
* @type {number}
|
|
141
|
+
* @memberof EmailFlow
|
|
142
|
+
*/
|
|
143
|
+
reentry_delay_days?: number;
|
|
144
|
+
/**
|
|
145
|
+
* Whether a customer may enter this flow again after a previous enrollment. anytime (default), after_days (see reentry_delay_days), or never. Enrollment history is kept for 3 years, so never means not within 3 years of the last enrollment.
|
|
146
|
+
* @type {string}
|
|
147
|
+
* @memberof EmailFlow
|
|
148
|
+
*/
|
|
149
|
+
reentry_policy?: EmailFlowReentryPolicyEnum;
|
|
138
150
|
/**
|
|
139
151
|
* Revenue, formatted
|
|
140
152
|
* @type {string}
|
|
@@ -202,6 +214,15 @@ export interface EmailFlow {
|
|
|
202
214
|
*/
|
|
203
215
|
trigger_type?: string;
|
|
204
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* @export
|
|
219
|
+
*/
|
|
220
|
+
export declare const EmailFlowReentryPolicyEnum: {
|
|
221
|
+
readonly Anytime: "anytime";
|
|
222
|
+
readonly AfterDays: "after_days";
|
|
223
|
+
readonly Never: "never";
|
|
224
|
+
};
|
|
225
|
+
export type EmailFlowReentryPolicyEnum = typeof EmailFlowReentryPolicyEnum[keyof typeof EmailFlowReentryPolicyEnum];
|
|
205
226
|
/**
|
|
206
227
|
* Check if a given object implements the EmailFlow interface.
|
|
207
228
|
*/
|
package/dist/models/EmailFlow.js
CHANGED
|
@@ -13,8 +13,16 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.EmailFlowToJSON = exports.EmailFlowFromJSONTyped = exports.EmailFlowFromJSON = exports.instanceOfEmailFlow = void 0;
|
|
16
|
+
exports.EmailFlowToJSON = exports.EmailFlowFromJSONTyped = exports.EmailFlowFromJSON = exports.instanceOfEmailFlow = exports.EmailFlowReentryPolicyEnum = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.EmailFlowReentryPolicyEnum = {
|
|
22
|
+
Anytime: 'anytime',
|
|
23
|
+
AfterDays: 'after_days',
|
|
24
|
+
Never: 'never'
|
|
25
|
+
};
|
|
18
26
|
/**
|
|
19
27
|
* Check if a given object implements the EmailFlow interface.
|
|
20
28
|
*/
|
|
@@ -52,6 +60,8 @@ function EmailFlowFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
60
|
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
53
61
|
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
54
62
|
'open_rate_formatted': !(0, runtime_1.exists)(json, 'open_rate_formatted') ? undefined : json['open_rate_formatted'],
|
|
63
|
+
'reentry_delay_days': !(0, runtime_1.exists)(json, 'reentry_delay_days') ? undefined : json['reentry_delay_days'],
|
|
64
|
+
'reentry_policy': !(0, runtime_1.exists)(json, 'reentry_policy') ? undefined : json['reentry_policy'],
|
|
55
65
|
'revenue_formatted': !(0, runtime_1.exists)(json, 'revenue_formatted') ? undefined : json['revenue_formatted'],
|
|
56
66
|
'revenue_per_customer_formatted': !(0, runtime_1.exists)(json, 'revenue_per_customer_formatted') ? undefined : json['revenue_per_customer_formatted'],
|
|
57
67
|
'screenshot_large_full_url': !(0, runtime_1.exists)(json, 'screenshot_large_full_url') ? undefined : json['screenshot_large_full_url'],
|
|
@@ -94,6 +104,8 @@ function EmailFlowToJSON(value) {
|
|
|
94
104
|
'merchant_id': value.merchant_id,
|
|
95
105
|
'name': value.name,
|
|
96
106
|
'open_rate_formatted': value.open_rate_formatted,
|
|
107
|
+
'reentry_delay_days': value.reentry_delay_days,
|
|
108
|
+
'reentry_policy': value.reentry_policy,
|
|
97
109
|
'revenue_formatted': value.revenue_formatted,
|
|
98
110
|
'revenue_per_customer_formatted': value.revenue_per_customer_formatted,
|
|
99
111
|
'screenshot_large_full_url': value.screenshot_large_full_url,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SfvbTemplateResolveCandidate
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbTemplateResolveCandidate {
|
|
18
|
+
/**
|
|
19
|
+
* Why the storefront never uses this file for a page, or null. snippets means it sits in the resource path's own snippets folder.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbTemplateResolveCandidate
|
|
22
|
+
*/
|
|
23
|
+
skipped?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Where the file sits inside the theme.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SfvbTemplateResolveCandidate
|
|
28
|
+
*/
|
|
29
|
+
theme_relative_path?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the SfvbTemplateResolveCandidate interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfSfvbTemplateResolveCandidate(value: object): boolean;
|
|
35
|
+
export declare function SfvbTemplateResolveCandidateFromJSON(json: any): SfvbTemplateResolveCandidate;
|
|
36
|
+
export declare function SfvbTemplateResolveCandidateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTemplateResolveCandidate;
|
|
37
|
+
export declare function SfvbTemplateResolveCandidateToJSON(value?: SfvbTemplateResolveCandidate | null): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SfvbTemplateResolveCandidateToJSON = exports.SfvbTemplateResolveCandidateFromJSONTyped = exports.SfvbTemplateResolveCandidateFromJSON = exports.instanceOfSfvbTemplateResolveCandidate = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the SfvbTemplateResolveCandidate interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfSfvbTemplateResolveCandidate(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfSfvbTemplateResolveCandidate = instanceOfSfvbTemplateResolveCandidate;
|
|
26
|
+
function SfvbTemplateResolveCandidateFromJSON(json) {
|
|
27
|
+
return SfvbTemplateResolveCandidateFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.SfvbTemplateResolveCandidateFromJSON = SfvbTemplateResolveCandidateFromJSON;
|
|
30
|
+
function SfvbTemplateResolveCandidateFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'skipped': !(0, runtime_1.exists)(json, 'skipped') ? undefined : json['skipped'],
|
|
36
|
+
'theme_relative_path': !(0, runtime_1.exists)(json, 'theme_relative_path') ? undefined : json['theme_relative_path'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.SfvbTemplateResolveCandidateFromJSONTyped = SfvbTemplateResolveCandidateFromJSONTyped;
|
|
40
|
+
function SfvbTemplateResolveCandidateToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'skipped': value.skipped,
|
|
49
|
+
'theme_relative_path': value.theme_relative_path,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.SfvbTemplateResolveCandidateToJSON = SfvbTemplateResolveCandidateToJSON;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { SfvbTemplateResolveCandidate } from './SfvbTemplateResolveCandidate';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SfvbTemplateResolvePath
|
|
17
|
+
*/
|
|
18
|
+
export interface SfvbTemplateResolvePath {
|
|
19
|
+
/**
|
|
20
|
+
* Every file of that name below this path, in the order the storefront searches.
|
|
21
|
+
* @type {Array<SfvbTemplateResolveCandidate>}
|
|
22
|
+
* @memberof SfvbTemplateResolvePath
|
|
23
|
+
*/
|
|
24
|
+
candidates?: Array<SfvbTemplateResolveCandidate>;
|
|
25
|
+
/**
|
|
26
|
+
* False when the theme has no such directory, so the storefront skips this path.
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof SfvbTemplateResolvePath
|
|
29
|
+
*/
|
|
30
|
+
directory_found?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The candidate this path supplies, relative to the theme root, or null. It is the first candidate that is not skipped.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SfvbTemplateResolvePath
|
|
35
|
+
*/
|
|
36
|
+
match?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The resource path, relative to the theme root. / is the theme root itself.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof SfvbTemplateResolvePath
|
|
41
|
+
*/
|
|
42
|
+
resource_path?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the SfvbTemplateResolvePath interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfSfvbTemplateResolvePath(value: object): boolean;
|
|
48
|
+
export declare function SfvbTemplateResolvePathFromJSON(json: any): SfvbTemplateResolvePath;
|
|
49
|
+
export declare function SfvbTemplateResolvePathFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTemplateResolvePath;
|
|
50
|
+
export declare function SfvbTemplateResolvePathToJSON(value?: SfvbTemplateResolvePath | null): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SfvbTemplateResolvePathToJSON = exports.SfvbTemplateResolvePathFromJSONTyped = exports.SfvbTemplateResolvePathFromJSON = exports.instanceOfSfvbTemplateResolvePath = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var SfvbTemplateResolveCandidate_1 = require("./SfvbTemplateResolveCandidate");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the SfvbTemplateResolvePath interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfSfvbTemplateResolvePath(value) {
|
|
23
|
+
var isInstance = true;
|
|
24
|
+
return isInstance;
|
|
25
|
+
}
|
|
26
|
+
exports.instanceOfSfvbTemplateResolvePath = instanceOfSfvbTemplateResolvePath;
|
|
27
|
+
function SfvbTemplateResolvePathFromJSON(json) {
|
|
28
|
+
return SfvbTemplateResolvePathFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.SfvbTemplateResolvePathFromJSON = SfvbTemplateResolvePathFromJSON;
|
|
31
|
+
function SfvbTemplateResolvePathFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'candidates': !(0, runtime_1.exists)(json, 'candidates') ? undefined : (json['candidates'].map(SfvbTemplateResolveCandidate_1.SfvbTemplateResolveCandidateFromJSON)),
|
|
37
|
+
'directory_found': !(0, runtime_1.exists)(json, 'directory_found') ? undefined : json['directory_found'],
|
|
38
|
+
'match': !(0, runtime_1.exists)(json, 'match') ? undefined : json['match'],
|
|
39
|
+
'resource_path': !(0, runtime_1.exists)(json, 'resource_path') ? undefined : json['resource_path'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
exports.SfvbTemplateResolvePathFromJSONTyped = SfvbTemplateResolvePathFromJSONTyped;
|
|
43
|
+
function SfvbTemplateResolvePathToJSON(value) {
|
|
44
|
+
if (value === undefined) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
if (value === null) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'candidates': value.candidates === undefined ? undefined : (value.candidates.map(SfvbTemplateResolveCandidate_1.SfvbTemplateResolveCandidateToJSON)),
|
|
52
|
+
'directory_found': value.directory_found,
|
|
53
|
+
'match': value.match,
|
|
54
|
+
'resource_path': value.resource_path,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
exports.SfvbTemplateResolvePathToJSON = SfvbTemplateResolvePathToJSON;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { SfvbTemplateResolvePath } from './SfvbTemplateResolvePath';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SfvbTemplateResolveResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface SfvbTemplateResolveResponse {
|
|
19
|
+
/**
|
|
20
|
+
* Whether resolved_path is a file. False means a page naming this template cannot render.
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof SfvbTemplateResolveResponse
|
|
23
|
+
*/
|
|
24
|
+
_exists?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* True when no resource path held the name, so the storefront fell back to the name at the theme root.
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof SfvbTemplateResolveResponse
|
|
29
|
+
*/
|
|
30
|
+
fallback?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The template file name that was resolved, as a page's group_template or item_template holds it.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SfvbTemplateResolveResponse
|
|
35
|
+
*/
|
|
36
|
+
name?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The file a page naming this template renders, relative to theme_path. This is the storefront's own answer.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof SfvbTemplateResolveResponse
|
|
41
|
+
*/
|
|
42
|
+
resolved_path?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The theme's resource paths in search order, each with the files of that name found below it. The first path with a match wins, which is how a theme copy overrides a shared core copy.
|
|
45
|
+
* @type {Array<SfvbTemplateResolvePath>}
|
|
46
|
+
* @memberof SfvbTemplateResolveResponse
|
|
47
|
+
*/
|
|
48
|
+
resource_paths?: Array<SfvbTemplateResolvePath>;
|
|
49
|
+
/**
|
|
50
|
+
* The theme the name was resolved in.
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof SfvbTemplateResolveResponse
|
|
53
|
+
*/
|
|
54
|
+
theme_oid?: number;
|
|
55
|
+
/**
|
|
56
|
+
* The theme's path in the file manager, such as /themes/Elements/.
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof SfvbTemplateResolveResponse
|
|
59
|
+
*/
|
|
60
|
+
theme_path?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the SfvbTemplateResolveResponse interface.
|
|
64
|
+
*/
|
|
65
|
+
export declare function instanceOfSfvbTemplateResolveResponse(value: object): boolean;
|
|
66
|
+
export declare function SfvbTemplateResolveResponseFromJSON(json: any): SfvbTemplateResolveResponse;
|
|
67
|
+
export declare function SfvbTemplateResolveResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTemplateResolveResponse;
|
|
68
|
+
export declare function SfvbTemplateResolveResponseToJSON(value?: SfvbTemplateResolveResponse | null): any;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SfvbTemplateResolveResponseToJSON = exports.SfvbTemplateResolveResponseFromJSONTyped = exports.SfvbTemplateResolveResponseFromJSON = exports.instanceOfSfvbTemplateResolveResponse = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var SfvbTemplateResolvePath_1 = require("./SfvbTemplateResolvePath");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the SfvbTemplateResolveResponse interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfSfvbTemplateResolveResponse(value) {
|
|
23
|
+
var isInstance = true;
|
|
24
|
+
return isInstance;
|
|
25
|
+
}
|
|
26
|
+
exports.instanceOfSfvbTemplateResolveResponse = instanceOfSfvbTemplateResolveResponse;
|
|
27
|
+
function SfvbTemplateResolveResponseFromJSON(json) {
|
|
28
|
+
return SfvbTemplateResolveResponseFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.SfvbTemplateResolveResponseFromJSON = SfvbTemplateResolveResponseFromJSON;
|
|
31
|
+
function SfvbTemplateResolveResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'_exists': !(0, runtime_1.exists)(json, 'exists') ? undefined : json['exists'],
|
|
37
|
+
'fallback': !(0, runtime_1.exists)(json, 'fallback') ? undefined : json['fallback'],
|
|
38
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
39
|
+
'resolved_path': !(0, runtime_1.exists)(json, 'resolved_path') ? undefined : json['resolved_path'],
|
|
40
|
+
'resource_paths': !(0, runtime_1.exists)(json, 'resource_paths') ? undefined : (json['resource_paths'].map(SfvbTemplateResolvePath_1.SfvbTemplateResolvePathFromJSON)),
|
|
41
|
+
'theme_oid': !(0, runtime_1.exists)(json, 'theme_oid') ? undefined : json['theme_oid'],
|
|
42
|
+
'theme_path': !(0, runtime_1.exists)(json, 'theme_path') ? undefined : json['theme_path'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.SfvbTemplateResolveResponseFromJSONTyped = SfvbTemplateResolveResponseFromJSONTyped;
|
|
46
|
+
function SfvbTemplateResolveResponseToJSON(value) {
|
|
47
|
+
if (value === undefined) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
if (value === null) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'exists': value._exists,
|
|
55
|
+
'fallback': value.fallback,
|
|
56
|
+
'name': value.name,
|
|
57
|
+
'resolved_path': value.resolved_path,
|
|
58
|
+
'resource_paths': value.resource_paths === undefined ? undefined : (value.resource_paths.map(SfvbTemplateResolvePath_1.SfvbTemplateResolvePathToJSON)),
|
|
59
|
+
'theme_oid': value.theme_oid,
|
|
60
|
+
'theme_path': value.theme_path,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
exports.SfvbTemplateResolveResponseToJSON = SfvbTemplateResolveResponseToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1048,6 +1048,9 @@ export * from './SfvbSiteAttributesResponse';
|
|
|
1048
1048
|
export * from './SfvbStorefront';
|
|
1049
1049
|
export * from './SfvbStorefrontsResponse';
|
|
1050
1050
|
export * from './SfvbTemplate';
|
|
1051
|
+
export * from './SfvbTemplateResolveCandidate';
|
|
1052
|
+
export * from './SfvbTemplateResolvePath';
|
|
1053
|
+
export * from './SfvbTemplateResolveResponse';
|
|
1051
1054
|
export * from './SfvbTemplatesResponse';
|
|
1052
1055
|
export * from './SfvbTheme';
|
|
1053
1056
|
export * from './SfvbThemeAttribute';
|
package/dist/models/index.js
CHANGED
|
@@ -1066,6 +1066,9 @@ __exportStar(require("./SfvbSiteAttributesResponse"), exports);
|
|
|
1066
1066
|
__exportStar(require("./SfvbStorefront"), exports);
|
|
1067
1067
|
__exportStar(require("./SfvbStorefrontsResponse"), exports);
|
|
1068
1068
|
__exportStar(require("./SfvbTemplate"), exports);
|
|
1069
|
+
__exportStar(require("./SfvbTemplateResolveCandidate"), exports);
|
|
1070
|
+
__exportStar(require("./SfvbTemplateResolvePath"), exports);
|
|
1071
|
+
__exportStar(require("./SfvbTemplateResolveResponse"), exports);
|
|
1069
1072
|
__exportStar(require("./SfvbTemplatesResponse"), exports);
|
|
1070
1073
|
__exportStar(require("./SfvbTheme"), exports);
|
|
1071
1074
|
__exportStar(require("./SfvbThemeAttribute"), exports);
|
package/package.json
CHANGED
package/src/apis/SfvbApi.ts
CHANGED
|
@@ -198,6 +198,9 @@ import {
|
|
|
198
198
|
SfvbStorefrontsResponse,
|
|
199
199
|
SfvbStorefrontsResponseFromJSON,
|
|
200
200
|
SfvbStorefrontsResponseToJSON,
|
|
201
|
+
SfvbTemplateResolveResponse,
|
|
202
|
+
SfvbTemplateResolveResponseFromJSON,
|
|
203
|
+
SfvbTemplateResolveResponseToJSON,
|
|
201
204
|
SfvbTemplatesResponse,
|
|
202
205
|
SfvbTemplatesResponseFromJSON,
|
|
203
206
|
SfvbTemplatesResponseToJSON,
|
|
@@ -717,6 +720,12 @@ export interface ReserveSfvbWidgetIdsRequest {
|
|
|
717
720
|
count?: number;
|
|
718
721
|
}
|
|
719
722
|
|
|
723
|
+
export interface ResolveSfvbTemplateRequest {
|
|
724
|
+
storefrontOid: number;
|
|
725
|
+
name: string;
|
|
726
|
+
themeOid?: number;
|
|
727
|
+
}
|
|
728
|
+
|
|
720
729
|
export interface RevertSfvbContainerRequest {
|
|
721
730
|
storefrontOid: number;
|
|
722
731
|
ownerType: string;
|
|
@@ -1109,7 +1118,7 @@ export interface SfvbApiInterface {
|
|
|
1109
1118
|
duplicateSfvbUpsellPath(requestParameters: DuplicateSfvbUpsellPathRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbUpsellPath>;
|
|
1110
1119
|
|
|
1111
1120
|
/**
|
|
1112
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
1121
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
1113
1122
|
* @summary End an experiment
|
|
1114
1123
|
* @param {number} storefrontOid
|
|
1115
1124
|
* @param {number} experimentOid
|
|
@@ -1121,7 +1130,7 @@ export interface SfvbApiInterface {
|
|
|
1121
1130
|
endSfvbExperimentRaw(requestParameters: EndSfvbExperimentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbExperiment>>;
|
|
1122
1131
|
|
|
1123
1132
|
/**
|
|
1124
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
1133
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
1125
1134
|
* End an experiment
|
|
1126
1135
|
*/
|
|
1127
1136
|
endSfvbExperiment(requestParameters: EndSfvbExperimentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbExperiment>;
|
|
@@ -2233,6 +2242,24 @@ export interface SfvbApiInterface {
|
|
|
2233
2242
|
*/
|
|
2234
2243
|
reserveSfvbWidgetIds(requestParameters: ReserveSfvbWidgetIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbWidgetIdsResponse>;
|
|
2235
2244
|
|
|
2245
|
+
/**
|
|
2246
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
2247
|
+
* @summary Resolve a template name to the file a page renders
|
|
2248
|
+
* @param {number} storefrontOid
|
|
2249
|
+
* @param {string} name The template file name, such as catalog.vm
|
|
2250
|
+
* @param {number} [themeOid] Resolve in this theme instead of the active theme
|
|
2251
|
+
* @param {*} [options] Override http request option.
|
|
2252
|
+
* @throws {RequiredError}
|
|
2253
|
+
* @memberof SfvbApiInterface
|
|
2254
|
+
*/
|
|
2255
|
+
resolveSfvbTemplateRaw(requestParameters: ResolveSfvbTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTemplateResolveResponse>>;
|
|
2256
|
+
|
|
2257
|
+
/**
|
|
2258
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
2259
|
+
* Resolve a template name to the file a page renders
|
|
2260
|
+
*/
|
|
2261
|
+
resolveSfvbTemplate(requestParameters: ResolveSfvbTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTemplateResolveResponse>;
|
|
2262
|
+
|
|
2236
2263
|
/**
|
|
2237
2264
|
* 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.
|
|
2238
2265
|
* @summary Revert a container stored outside the file system
|
|
@@ -3321,7 +3348,7 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
3321
3348
|
}
|
|
3322
3349
|
|
|
3323
3350
|
/**
|
|
3324
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
3351
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
3325
3352
|
* End an experiment
|
|
3326
3353
|
*/
|
|
3327
3354
|
async endSfvbExperimentRaw(requestParameters: EndSfvbExperimentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbExperiment>> {
|
|
@@ -3360,7 +3387,7 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
3360
3387
|
}
|
|
3361
3388
|
|
|
3362
3389
|
/**
|
|
3363
|
-
* Ends a running experiment. With winner_variation_number the winner gets
|
|
3390
|
+
* Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment\'s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment\'s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
3364
3391
|
* End an experiment
|
|
3365
3392
|
*/
|
|
3366
3393
|
async endSfvbExperiment(requestParameters: EndSfvbExperimentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbExperiment> {
|
|
@@ -6493,6 +6520,59 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
6493
6520
|
return await response.value();
|
|
6494
6521
|
}
|
|
6495
6522
|
|
|
6523
|
+
/**
|
|
6524
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
6525
|
+
* Resolve a template name to the file a page renders
|
|
6526
|
+
*/
|
|
6527
|
+
async resolveSfvbTemplateRaw(requestParameters: ResolveSfvbTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTemplateResolveResponse>> {
|
|
6528
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
6529
|
+
throw new runtime.RequiredError('storefrontOid','Required parameter requestParameters.storefrontOid was null or undefined when calling resolveSfvbTemplate.');
|
|
6530
|
+
}
|
|
6531
|
+
|
|
6532
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
6533
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling resolveSfvbTemplate.');
|
|
6534
|
+
}
|
|
6535
|
+
|
|
6536
|
+
const queryParameters: any = {};
|
|
6537
|
+
|
|
6538
|
+
if (requestParameters.name !== undefined) {
|
|
6539
|
+
queryParameters['name'] = requestParameters.name;
|
|
6540
|
+
}
|
|
6541
|
+
|
|
6542
|
+
if (requestParameters.themeOid !== undefined) {
|
|
6543
|
+
queryParameters['theme_oid'] = requestParameters.themeOid;
|
|
6544
|
+
}
|
|
6545
|
+
|
|
6546
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
6547
|
+
|
|
6548
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
6549
|
+
// oauth required
|
|
6550
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
|
|
6551
|
+
}
|
|
6552
|
+
|
|
6553
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
6554
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
6555
|
+
}
|
|
6556
|
+
|
|
6557
|
+
const response = await this.request({
|
|
6558
|
+
path: `/sfvb/storefronts/{storefront_oid}/templates/resolve`.replace(`{${"storefront_oid"}}`, encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
6559
|
+
method: 'GET',
|
|
6560
|
+
headers: headerParameters,
|
|
6561
|
+
query: queryParameters,
|
|
6562
|
+
}, initOverrides);
|
|
6563
|
+
|
|
6564
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SfvbTemplateResolveResponseFromJSON(jsonValue));
|
|
6565
|
+
}
|
|
6566
|
+
|
|
6567
|
+
/**
|
|
6568
|
+
* A page stores only its template\'s file name. This runs the storefront\'s own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme\'s resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
6569
|
+
* Resolve a template name to the file a page renders
|
|
6570
|
+
*/
|
|
6571
|
+
async resolveSfvbTemplate(requestParameters: ResolveSfvbTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTemplateResolveResponse> {
|
|
6572
|
+
const response = await this.resolveSfvbTemplateRaw(requestParameters, initOverrides);
|
|
6573
|
+
return await response.value();
|
|
6574
|
+
}
|
|
6575
|
+
|
|
6496
6576
|
/**
|
|
6497
6577
|
* 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.
|
|
6498
6578
|
* Revert a container stored outside the file system
|
package/src/models/EmailFlow.ts
CHANGED
|
@@ -139,6 +139,18 @@ export interface EmailFlow {
|
|
|
139
139
|
* @memberof EmailFlow
|
|
140
140
|
*/
|
|
141
141
|
open_rate_formatted?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Number of days after the last enrollment before a customer may enter this flow again. Only used when reentry_policy is after_days. Maximum 1095.
|
|
144
|
+
* @type {number}
|
|
145
|
+
* @memberof EmailFlow
|
|
146
|
+
*/
|
|
147
|
+
reentry_delay_days?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Whether a customer may enter this flow again after a previous enrollment. anytime (default), after_days (see reentry_delay_days), or never. Enrollment history is kept for 3 years, so never means not within 3 years of the last enrollment.
|
|
150
|
+
* @type {string}
|
|
151
|
+
* @memberof EmailFlow
|
|
152
|
+
*/
|
|
153
|
+
reentry_policy?: EmailFlowReentryPolicyEnum;
|
|
142
154
|
/**
|
|
143
155
|
* Revenue, formatted
|
|
144
156
|
* @type {string}
|
|
@@ -209,6 +221,17 @@ export interface EmailFlow {
|
|
|
209
221
|
|
|
210
222
|
|
|
211
223
|
|
|
224
|
+
/**
|
|
225
|
+
* @export
|
|
226
|
+
*/
|
|
227
|
+
export const EmailFlowReentryPolicyEnum = {
|
|
228
|
+
Anytime: 'anytime',
|
|
229
|
+
AfterDays: 'after_days',
|
|
230
|
+
Never: 'never'
|
|
231
|
+
} as const;
|
|
232
|
+
export type EmailFlowReentryPolicyEnum = typeof EmailFlowReentryPolicyEnum[keyof typeof EmailFlowReentryPolicyEnum];
|
|
233
|
+
|
|
234
|
+
|
|
212
235
|
/**
|
|
213
236
|
* Check if a given object implements the EmailFlow interface.
|
|
214
237
|
*/
|
|
@@ -248,6 +271,8 @@ export function EmailFlowFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
248
271
|
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
249
272
|
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
250
273
|
'open_rate_formatted': !exists(json, 'open_rate_formatted') ? undefined : json['open_rate_formatted'],
|
|
274
|
+
'reentry_delay_days': !exists(json, 'reentry_delay_days') ? undefined : json['reentry_delay_days'],
|
|
275
|
+
'reentry_policy': !exists(json, 'reentry_policy') ? undefined : json['reentry_policy'],
|
|
251
276
|
'revenue_formatted': !exists(json, 'revenue_formatted') ? undefined : json['revenue_formatted'],
|
|
252
277
|
'revenue_per_customer_formatted': !exists(json, 'revenue_per_customer_formatted') ? undefined : json['revenue_per_customer_formatted'],
|
|
253
278
|
'screenshot_large_full_url': !exists(json, 'screenshot_large_full_url') ? undefined : json['screenshot_large_full_url'],
|
|
@@ -291,6 +316,8 @@ export function EmailFlowToJSON(value?: EmailFlow | null): any {
|
|
|
291
316
|
'merchant_id': value.merchant_id,
|
|
292
317
|
'name': value.name,
|
|
293
318
|
'open_rate_formatted': value.open_rate_formatted,
|
|
319
|
+
'reentry_delay_days': value.reentry_delay_days,
|
|
320
|
+
'reentry_policy': value.reentry_policy,
|
|
294
321
|
'revenue_formatted': value.revenue_formatted,
|
|
295
322
|
'revenue_per_customer_formatted': value.revenue_per_customer_formatted,
|
|
296
323
|
'screenshot_large_full_url': value.screenshot_large_full_url,
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SfvbTemplateResolveCandidate
|
|
20
|
+
*/
|
|
21
|
+
export interface SfvbTemplateResolveCandidate {
|
|
22
|
+
/**
|
|
23
|
+
* Why the storefront never uses this file for a page, or null. snippets means it sits in the resource path's own snippets folder.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SfvbTemplateResolveCandidate
|
|
26
|
+
*/
|
|
27
|
+
skipped?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Where the file sits inside the theme.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SfvbTemplateResolveCandidate
|
|
32
|
+
*/
|
|
33
|
+
theme_relative_path?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the SfvbTemplateResolveCandidate interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfSfvbTemplateResolveCandidate(value: object): boolean {
|
|
42
|
+
let isInstance = true;
|
|
43
|
+
|
|
44
|
+
return isInstance;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function SfvbTemplateResolveCandidateFromJSON(json: any): SfvbTemplateResolveCandidate {
|
|
48
|
+
return SfvbTemplateResolveCandidateFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function SfvbTemplateResolveCandidateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTemplateResolveCandidate {
|
|
52
|
+
if ((json === undefined) || (json === null)) {
|
|
53
|
+
return json;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
'skipped': !exists(json, 'skipped') ? undefined : json['skipped'],
|
|
58
|
+
'theme_relative_path': !exists(json, 'theme_relative_path') ? undefined : json['theme_relative_path'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function SfvbTemplateResolveCandidateToJSON(value?: SfvbTemplateResolveCandidate | null): any {
|
|
63
|
+
if (value === undefined) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
if (value === null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'skipped': value.skipped,
|
|
72
|
+
'theme_relative_path': value.theme_relative_path,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
SfvbTemplateResolveCandidate,
|
|
18
|
+
SfvbTemplateResolveCandidateFromJSON,
|
|
19
|
+
SfvbTemplateResolveCandidateFromJSONTyped,
|
|
20
|
+
SfvbTemplateResolveCandidateToJSON,
|
|
21
|
+
} from './SfvbTemplateResolveCandidate';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface SfvbTemplateResolvePath
|
|
27
|
+
*/
|
|
28
|
+
export interface SfvbTemplateResolvePath {
|
|
29
|
+
/**
|
|
30
|
+
* Every file of that name below this path, in the order the storefront searches.
|
|
31
|
+
* @type {Array<SfvbTemplateResolveCandidate>}
|
|
32
|
+
* @memberof SfvbTemplateResolvePath
|
|
33
|
+
*/
|
|
34
|
+
candidates?: Array<SfvbTemplateResolveCandidate>;
|
|
35
|
+
/**
|
|
36
|
+
* False when the theme has no such directory, so the storefront skips this path.
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
* @memberof SfvbTemplateResolvePath
|
|
39
|
+
*/
|
|
40
|
+
directory_found?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The candidate this path supplies, relative to the theme root, or null. It is the first candidate that is not skipped.
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof SfvbTemplateResolvePath
|
|
45
|
+
*/
|
|
46
|
+
match?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The resource path, relative to the theme root. / is the theme root itself.
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof SfvbTemplateResolvePath
|
|
51
|
+
*/
|
|
52
|
+
resource_path?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the SfvbTemplateResolvePath interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfSfvbTemplateResolvePath(value: object): boolean {
|
|
61
|
+
let isInstance = true;
|
|
62
|
+
|
|
63
|
+
return isInstance;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function SfvbTemplateResolvePathFromJSON(json: any): SfvbTemplateResolvePath {
|
|
67
|
+
return SfvbTemplateResolvePathFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function SfvbTemplateResolvePathFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTemplateResolvePath {
|
|
71
|
+
if ((json === undefined) || (json === null)) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'candidates': !exists(json, 'candidates') ? undefined : ((json['candidates'] as Array<any>).map(SfvbTemplateResolveCandidateFromJSON)),
|
|
77
|
+
'directory_found': !exists(json, 'directory_found') ? undefined : json['directory_found'],
|
|
78
|
+
'match': !exists(json, 'match') ? undefined : json['match'],
|
|
79
|
+
'resource_path': !exists(json, 'resource_path') ? undefined : json['resource_path'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function SfvbTemplateResolvePathToJSON(value?: SfvbTemplateResolvePath | null): any {
|
|
84
|
+
if (value === undefined) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
if (value === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'candidates': value.candidates === undefined ? undefined : ((value.candidates as Array<any>).map(SfvbTemplateResolveCandidateToJSON)),
|
|
93
|
+
'directory_found': value.directory_found,
|
|
94
|
+
'match': value.match,
|
|
95
|
+
'resource_path': value.resource_path,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
SfvbTemplateResolvePath,
|
|
18
|
+
SfvbTemplateResolvePathFromJSON,
|
|
19
|
+
SfvbTemplateResolvePathFromJSONTyped,
|
|
20
|
+
SfvbTemplateResolvePathToJSON,
|
|
21
|
+
} from './SfvbTemplateResolvePath';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface SfvbTemplateResolveResponse
|
|
27
|
+
*/
|
|
28
|
+
export interface SfvbTemplateResolveResponse {
|
|
29
|
+
/**
|
|
30
|
+
* Whether resolved_path is a file. False means a page naming this template cannot render.
|
|
31
|
+
* @type {boolean}
|
|
32
|
+
* @memberof SfvbTemplateResolveResponse
|
|
33
|
+
*/
|
|
34
|
+
_exists?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* True when no resource path held the name, so the storefront fell back to the name at the theme root.
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
* @memberof SfvbTemplateResolveResponse
|
|
39
|
+
*/
|
|
40
|
+
fallback?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The template file name that was resolved, as a page's group_template or item_template holds it.
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof SfvbTemplateResolveResponse
|
|
45
|
+
*/
|
|
46
|
+
name?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The file a page naming this template renders, relative to theme_path. This is the storefront's own answer.
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof SfvbTemplateResolveResponse
|
|
51
|
+
*/
|
|
52
|
+
resolved_path?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The theme's resource paths in search order, each with the files of that name found below it. The first path with a match wins, which is how a theme copy overrides a shared core copy.
|
|
55
|
+
* @type {Array<SfvbTemplateResolvePath>}
|
|
56
|
+
* @memberof SfvbTemplateResolveResponse
|
|
57
|
+
*/
|
|
58
|
+
resource_paths?: Array<SfvbTemplateResolvePath>;
|
|
59
|
+
/**
|
|
60
|
+
* The theme the name was resolved in.
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof SfvbTemplateResolveResponse
|
|
63
|
+
*/
|
|
64
|
+
theme_oid?: number;
|
|
65
|
+
/**
|
|
66
|
+
* The theme's path in the file manager, such as /themes/Elements/.
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof SfvbTemplateResolveResponse
|
|
69
|
+
*/
|
|
70
|
+
theme_path?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Check if a given object implements the SfvbTemplateResolveResponse interface.
|
|
77
|
+
*/
|
|
78
|
+
export function instanceOfSfvbTemplateResolveResponse(value: object): boolean {
|
|
79
|
+
let isInstance = true;
|
|
80
|
+
|
|
81
|
+
return isInstance;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function SfvbTemplateResolveResponseFromJSON(json: any): SfvbTemplateResolveResponse {
|
|
85
|
+
return SfvbTemplateResolveResponseFromJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function SfvbTemplateResolveResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbTemplateResolveResponse {
|
|
89
|
+
if ((json === undefined) || (json === null)) {
|
|
90
|
+
return json;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'_exists': !exists(json, 'exists') ? undefined : json['exists'],
|
|
95
|
+
'fallback': !exists(json, 'fallback') ? undefined : json['fallback'],
|
|
96
|
+
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
97
|
+
'resolved_path': !exists(json, 'resolved_path') ? undefined : json['resolved_path'],
|
|
98
|
+
'resource_paths': !exists(json, 'resource_paths') ? undefined : ((json['resource_paths'] as Array<any>).map(SfvbTemplateResolvePathFromJSON)),
|
|
99
|
+
'theme_oid': !exists(json, 'theme_oid') ? undefined : json['theme_oid'],
|
|
100
|
+
'theme_path': !exists(json, 'theme_path') ? undefined : json['theme_path'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function SfvbTemplateResolveResponseToJSON(value?: SfvbTemplateResolveResponse | null): any {
|
|
105
|
+
if (value === undefined) {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
if (value === null) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
|
|
113
|
+
'exists': value._exists,
|
|
114
|
+
'fallback': value.fallback,
|
|
115
|
+
'name': value.name,
|
|
116
|
+
'resolved_path': value.resolved_path,
|
|
117
|
+
'resource_paths': value.resource_paths === undefined ? undefined : ((value.resource_paths as Array<any>).map(SfvbTemplateResolvePathToJSON)),
|
|
118
|
+
'theme_oid': value.theme_oid,
|
|
119
|
+
'theme_path': value.theme_path,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -1050,6 +1050,9 @@ export * from './SfvbSiteAttributesResponse';
|
|
|
1050
1050
|
export * from './SfvbStorefront';
|
|
1051
1051
|
export * from './SfvbStorefrontsResponse';
|
|
1052
1052
|
export * from './SfvbTemplate';
|
|
1053
|
+
export * from './SfvbTemplateResolveCandidate';
|
|
1054
|
+
export * from './SfvbTemplateResolvePath';
|
|
1055
|
+
export * from './SfvbTemplateResolveResponse';
|
|
1053
1056
|
export * from './SfvbTemplatesResponse';
|
|
1054
1057
|
export * from './SfvbTheme';
|
|
1055
1058
|
export * from './SfvbThemeAttribute';
|