ultracart_rest_api_v2_typescript 4.1.204 → 4.1.206

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.
@@ -1022,6 +1022,8 @@ src/models/SfvbContainerWriteRequest.ts
1022
1022
  src/models/SfvbElement.ts
1023
1023
  src/models/SfvbElementSchemaResponse.ts
1024
1024
  src/models/SfvbElementsResponse.ts
1025
+ src/models/SfvbEmailRenderRequest.ts
1026
+ src/models/SfvbEmailRenderResponse.ts
1025
1027
  src/models/SfvbErrorDetail.ts
1026
1028
  src/models/SfvbEvent.ts
1027
1029
  src/models/SfvbEventsAuthRequest.ts
@@ -1203,6 +1205,8 @@ src/models/SfvbThemeFont.ts
1203
1205
  src/models/SfvbThemeFontFamily.ts
1204
1206
  src/models/SfvbThemeJobResponse.ts
1205
1207
  src/models/SfvbThemesResponse.ts
1208
+ src/models/SfvbTransactionalEmail.ts
1209
+ src/models/SfvbTransactionalEmailsResponse.ts
1206
1210
  src/models/SfvbUpsellItemLogic.ts
1207
1211
  src/models/SfvbUpsellItemLogicItem.ts
1208
1212
  src/models/SfvbUpsellOffer.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.204
2
+ ## ultracart_rest_api_v2_typescript@4.1.206
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.204 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.206 --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.206 | 10/16/2026 | sfvb internal testing |
88
+ | 4.1.205 | 10/15/2026 | sfvb internal testing |
87
89
  | 4.1.204 | 10/15/2026 | sfvb internal testing |
88
90
  | 4.1.203 | 10/15/2026 | sfvb internal testing |
89
91
  | 4.1.202 | 10/13/2026 | sfvb internal testing |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { SfvbApproval, SfvbApprovalCreateRequest, SfvbApprovalsResponse, SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCommsSendingDomain, SfvbCommsSendingDomainsResponse, SfvbCommsTwilioAccount, SfvbCommsTwilioAccountResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbEventsAuthRequest, SfvbEventsAuthResponse, SfvbEventsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbI18nGlossary, SfvbI18nGlossaryRequest, SfvbI18nLanguageEnableRequest, SfvbI18nLanguagesResponse, SfvbI18nMachineTranslationsResponse, SfvbI18nMessage, SfvbI18nMessageWriteRequest, SfvbI18nMessagesResponse, SfvbI18nResetResponse, SfvbItemAttributeBatchRequest, SfvbItemAttributeBatchResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaDescriptionRequest, SfvbItemMultimediaRequest, SfvbItemPricing, SfvbItemPricingRequest, SfvbItemRelated, SfvbItemRelatedRequest, SfvbItemResponse, SfvbItemSeoRequest, SfvbLibraryDeleteResult, SfvbLibraryEntry, SfvbLibraryEntryRequest, SfvbLibraryHistoryResponse, SfvbLibraryInstallReceipt, SfvbLibraryInstallRequest, SfvbLibraryInstallsResponse, SfvbLibraryPublishRequest, SfvbLibraryResponse, SfvbLibraryScreenshotRequest, SfvbLibraryShareRequest, SfvbLibraryShareTargetsResponse, SfvbLibraryTaxonomyCatalog, SfvbLibraryUnshareResult, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbNotFoundEntry, SfvbNotFoundEntryResponse, SfvbNotFoundPage, SfvbNotFoundResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageRefreshRequest, SfvbPageRefreshResponse, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRecordingEventsResponse, SfvbRecordingResponse, SfvbRecordingSettingsRequest, SfvbRecordingSettingsResponse, SfvbRedirect, SfvbRedirectCheckResponse, SfvbRedirectDeleteRequest, SfvbRedirectDeleteResponse, SfvbRedirectImportRequest, SfvbRedirectImportResponse, SfvbRedirectRequest, SfvbRedirectResolveResponse, SfvbRedirectResponse, SfvbRedirectsResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbSecretKindsResponse, SfvbSecretRequest, SfvbSecretRequestCreate, SfvbSecretRequestsResponse, SfvbServerLogDetail, SfvbServerLogsResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplateResolveResponse, SfvbTemplatesResponse, SfvbTestOrdersResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffer, SfvbUpsellOffersResponse, SfvbUpsellPath, SfvbUpsellPathDuplicateRequest, SfvbUpsellPathMoveRequest, SfvbUpsellPathsResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
13
+ import { SfvbApproval, SfvbApprovalCreateRequest, SfvbApprovalsResponse, SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCommsSendingDomain, SfvbCommsSendingDomainsResponse, SfvbCommsTwilioAccount, SfvbCommsTwilioAccountResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbEmailRenderRequest, SfvbEmailRenderResponse, SfvbEventsAuthRequest, SfvbEventsAuthResponse, SfvbEventsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbI18nGlossary, SfvbI18nGlossaryRequest, SfvbI18nLanguageEnableRequest, SfvbI18nLanguagesResponse, SfvbI18nMachineTranslationsResponse, SfvbI18nMessage, SfvbI18nMessageWriteRequest, SfvbI18nMessagesResponse, SfvbI18nResetResponse, SfvbItemAttributeBatchRequest, SfvbItemAttributeBatchResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaDescriptionRequest, SfvbItemMultimediaRequest, SfvbItemPricing, SfvbItemPricingRequest, SfvbItemRelated, SfvbItemRelatedRequest, SfvbItemResponse, SfvbItemSeoRequest, SfvbLibraryDeleteResult, SfvbLibraryEntry, SfvbLibraryEntryRequest, SfvbLibraryHistoryResponse, SfvbLibraryInstallReceipt, SfvbLibraryInstallRequest, SfvbLibraryInstallsResponse, SfvbLibraryPublishRequest, SfvbLibraryResponse, SfvbLibraryScreenshotRequest, SfvbLibraryShareRequest, SfvbLibraryShareTargetsResponse, SfvbLibraryTaxonomyCatalog, SfvbLibraryUnshareResult, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbNotFoundEntry, SfvbNotFoundEntryResponse, SfvbNotFoundPage, SfvbNotFoundResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageRefreshRequest, SfvbPageRefreshResponse, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRecordingEventsResponse, SfvbRecordingResponse, SfvbRecordingSettingsRequest, SfvbRecordingSettingsResponse, SfvbRedirect, SfvbRedirectCheckResponse, SfvbRedirectDeleteRequest, SfvbRedirectDeleteResponse, SfvbRedirectImportRequest, SfvbRedirectImportResponse, SfvbRedirectRequest, SfvbRedirectResolveResponse, SfvbRedirectResponse, SfvbRedirectsResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbSecretKindsResponse, SfvbSecretRequest, SfvbSecretRequestCreate, SfvbSecretRequestsResponse, SfvbServerLogDetail, SfvbServerLogsResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplateResolveResponse, SfvbTemplatesResponse, SfvbTestOrdersResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbTransactionalEmailsResponse, 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;
@@ -401,6 +401,9 @@ export interface GetSfvbThemeJobRequest {
401
401
  storefrontOid: number;
402
402
  jobId: number;
403
403
  }
404
+ export interface GetSfvbTransactionalEmailsRequest {
405
+ storefrontOid: number;
406
+ }
404
407
  export interface GetSfvbUpsellOfferRequest {
405
408
  storefrontOid: number;
406
409
  upsellOfferOid: number;
@@ -700,6 +703,16 @@ export interface RemoveSfvbPageItemsRequest {
700
703
  path: string;
701
704
  pageItemsRemoveRequest: SfvbPageItemsRemoveRequest;
702
705
  }
706
+ export interface RenderSfvbEmailRequest {
707
+ storefrontOid: number;
708
+ emailUuid: string;
709
+ emailRenderRequest: SfvbEmailRenderRequest;
710
+ }
711
+ export interface RenderSfvbTransactionalEmailRequest {
712
+ storefrontOid: number;
713
+ fileName: string;
714
+ emailRenderRequest: SfvbEmailRenderRequest;
715
+ }
703
716
  export interface RenderSfvbWidgetsRequest {
704
717
  storefrontOid: number;
705
718
  themeOid: number;
@@ -2272,6 +2285,20 @@ export interface SfvbApiInterface {
2272
2285
  * Status of an asynchronous theme job
2273
2286
  */
2274
2287
  getSfvbThemeJob(requestParameters: GetSfvbThemeJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbThemeJobResponse>;
2288
+ /**
2289
+ * The order, shipment, auto order and other transactional emails this storefront sends, with their template files and the body container a draft replaces. Forgot password and chat verification are not listed, because they have no preview.
2290
+ * @summary List the transactional emails a storefront sends
2291
+ * @param {number} storefrontOid
2292
+ * @param {*} [options] Override http request option.
2293
+ * @throws {RequiredError}
2294
+ * @memberof SfvbApiInterface
2295
+ */
2296
+ getSfvbTransactionalEmailsRaw(requestParameters: GetSfvbTransactionalEmailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTransactionalEmailsResponse>>;
2297
+ /**
2298
+ * The order, shipment, auto order and other transactional emails this storefront sends, with their template files and the body container a draft replaces. Forgot password and chat verification are not listed, because they have no preview.
2299
+ * List the transactional emails a storefront sends
2300
+ */
2301
+ getSfvbTransactionalEmails(requestParameters: GetSfvbTransactionalEmailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTransactionalEmailsResponse>;
2275
2302
  /**
2276
2303
  * The whole offer, with the hash an update sends back in If-Match, which upsell items are out of stock now, and whether loyalty, TowerData and Everflow are set up. Stats as on the path list.
2277
2304
  * @summary Get an upsell offer
@@ -3227,6 +3254,38 @@ export interface SfvbApiInterface {
3227
3254
  * Take items off a page
3228
3255
  */
3229
3256
  removeSfvbPageItems(requestParameters: RemoveSfvbPageItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageItemsResponse>;
3257
+ /**
3258
+ * Renders a flow or campaign email exactly as its send would, and returns the subject, preview text, HTML and text. Nothing is sent, saved or created. A unique coupon code, click id and magic link token are placeholders. A missing footer token, which a send skips the email for, is a warning. Give cjson to render an unsaved draft of the email container in place of the saved one. An order must be a test order. cart_item_ids fills the cart a cart flow email shows.
3259
+ * @summary Render a flow or campaign email without sending it
3260
+ * @param {number} storefrontOid
3261
+ * @param {string} emailUuid
3262
+ * @param {SfvbEmailRenderRequest} emailRenderRequest What to render the email with
3263
+ * @param {*} [options] Override http request option.
3264
+ * @throws {RequiredError}
3265
+ * @memberof SfvbApiInterface
3266
+ */
3267
+ renderSfvbEmailRaw(requestParameters: RenderSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmailRenderResponse>>;
3268
+ /**
3269
+ * Renders a flow or campaign email exactly as its send would, and returns the subject, preview text, HTML and text. Nothing is sent, saved or created. A unique coupon code, click id and magic link token are placeholders. A missing footer token, which a send skips the email for, is a warning. Give cjson to render an unsaved draft of the email container in place of the saved one. An order must be a test order. cart_item_ids fills the cart a cart flow email shows.
3270
+ * Render a flow or campaign email without sending it
3271
+ */
3272
+ renderSfvbEmail(requestParameters: RenderSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmailRenderResponse>;
3273
+ /**
3274
+ * Renders a transactional email, such as the order receipt, exactly as it is sent, and returns the subject, HTML and text. Nothing is sent or saved. file_name is the template file, such as receipt_html.vm, or the display name. Give cjson to render an unsaved draft of the email\'s body container in place of the saved one. The order must be a test order. Without one the email renders with a made up order.
3275
+ * @summary Render a transactional email without sending it
3276
+ * @param {number} storefrontOid
3277
+ * @param {string} fileName
3278
+ * @param {SfvbEmailRenderRequest} emailRenderRequest What to render the email with
3279
+ * @param {*} [options] Override http request option.
3280
+ * @throws {RequiredError}
3281
+ * @memberof SfvbApiInterface
3282
+ */
3283
+ renderSfvbTransactionalEmailRaw(requestParameters: RenderSfvbTransactionalEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmailRenderResponse>>;
3284
+ /**
3285
+ * Renders a transactional email, such as the order receipt, exactly as it is sent, and returns the subject, HTML and text. Nothing is sent or saved. file_name is the template file, such as receipt_html.vm, or the display name. Give cjson to render an unsaved draft of the email\'s body container in place of the saved one. The order must be a test order. Without one the email renders with a made up order.
3286
+ * Render a transactional email without sending it
3287
+ */
3288
+ renderSfvbTransactionalEmail(requestParameters: RenderSfvbTransactionalEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmailRenderResponse>;
3230
3289
  /**
3231
3290
  * Renders one node in the context of a theme and a page. Unlike compile this is stateful. Rendering resolves merchant data, so an element bound to an item renders wrongly, and silently, without a context item id. One node per call, so a node that fails to render fails on its own rather than taking a batch with it, and a failure says why. By default the node renders as a shopper sees it, with conditions, prices and sale state evaluated against the context item. Set edit_mode to render every branch the way the builder shows it, for styling content a shopper only sometimes sees.
3232
3291
  * @summary Render a CJSON node to HTML
@@ -4621,6 +4680,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
4621
4680
  * Status of an asynchronous theme job
4622
4681
  */
4623
4682
  getSfvbThemeJob(requestParameters: GetSfvbThemeJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbThemeJobResponse>;
4683
+ /**
4684
+ * The order, shipment, auto order and other transactional emails this storefront sends, with their template files and the body container a draft replaces. Forgot password and chat verification are not listed, because they have no preview.
4685
+ * List the transactional emails a storefront sends
4686
+ */
4687
+ getSfvbTransactionalEmailsRaw(requestParameters: GetSfvbTransactionalEmailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbTransactionalEmailsResponse>>;
4688
+ /**
4689
+ * The order, shipment, auto order and other transactional emails this storefront sends, with their template files and the body container a draft replaces. Forgot password and chat verification are not listed, because they have no preview.
4690
+ * List the transactional emails a storefront sends
4691
+ */
4692
+ getSfvbTransactionalEmails(requestParameters: GetSfvbTransactionalEmailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbTransactionalEmailsResponse>;
4624
4693
  /**
4625
4694
  * The whole offer, with the hash an update sends back in If-Match, which upsell items are out of stock now, and whether loyalty, TowerData and Everflow are set up. Stats as on the path list.
4626
4695
  * Get an upsell offer
@@ -5209,6 +5278,26 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
5209
5278
  * Take items off a page
5210
5279
  */
5211
5280
  removeSfvbPageItems(requestParameters: RemoveSfvbPageItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbPageItemsResponse>;
5281
+ /**
5282
+ * Renders a flow or campaign email exactly as its send would, and returns the subject, preview text, HTML and text. Nothing is sent, saved or created. A unique coupon code, click id and magic link token are placeholders. A missing footer token, which a send skips the email for, is a warning. Give cjson to render an unsaved draft of the email container in place of the saved one. An order must be a test order. cart_item_ids fills the cart a cart flow email shows.
5283
+ * Render a flow or campaign email without sending it
5284
+ */
5285
+ renderSfvbEmailRaw(requestParameters: RenderSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmailRenderResponse>>;
5286
+ /**
5287
+ * Renders a flow or campaign email exactly as its send would, and returns the subject, preview text, HTML and text. Nothing is sent, saved or created. A unique coupon code, click id and magic link token are placeholders. A missing footer token, which a send skips the email for, is a warning. Give cjson to render an unsaved draft of the email container in place of the saved one. An order must be a test order. cart_item_ids fills the cart a cart flow email shows.
5288
+ * Render a flow or campaign email without sending it
5289
+ */
5290
+ renderSfvbEmail(requestParameters: RenderSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmailRenderResponse>;
5291
+ /**
5292
+ * Renders a transactional email, such as the order receipt, exactly as it is sent, and returns the subject, HTML and text. Nothing is sent or saved. file_name is the template file, such as receipt_html.vm, or the display name. Give cjson to render an unsaved draft of the email\'s body container in place of the saved one. The order must be a test order. Without one the email renders with a made up order.
5293
+ * Render a transactional email without sending it
5294
+ */
5295
+ renderSfvbTransactionalEmailRaw(requestParameters: RenderSfvbTransactionalEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmailRenderResponse>>;
5296
+ /**
5297
+ * Renders a transactional email, such as the order receipt, exactly as it is sent, and returns the subject, HTML and text. Nothing is sent or saved. file_name is the template file, such as receipt_html.vm, or the display name. Give cjson to render an unsaved draft of the email\'s body container in place of the saved one. The order must be a test order. Without one the email renders with a made up order.
5298
+ * Render a transactional email without sending it
5299
+ */
5300
+ renderSfvbTransactionalEmail(requestParameters: RenderSfvbTransactionalEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmailRenderResponse>;
5212
5301
  /**
5213
5302
  * Renders one node in the context of a theme and a page. Unlike compile this is stateful. Rendering resolves merchant data, so an element bound to an item renders wrongly, and silently, without a context item id. One node per call, so a node that fails to render fails on its own rather than taking a batch with it, and a failure says why. By default the node renders as a shopper sees it, with conditions, prices and sale state evaluated against the context item. Set edit_mode to render every branch the way the builder shows it, for styling content a shopper only sometimes sees.
5214
5303
  * Render a CJSON node to HTML
@@ -5974,6 +5974,65 @@ var SfvbApi = /** @class */ (function (_super) {
5974
5974
  });
5975
5975
  });
5976
5976
  };
5977
+ /**
5978
+ * The order, shipment, auto order and other transactional emails this storefront sends, with their template files and the body container a draft replaces. Forgot password and chat verification are not listed, because they have no preview.
5979
+ * List the transactional emails a storefront sends
5980
+ */
5981
+ SfvbApi.prototype.getSfvbTransactionalEmailsRaw = function (requestParameters, initOverrides) {
5982
+ return __awaiter(this, void 0, void 0, function () {
5983
+ var queryParameters, headerParameters, _a, _b, response;
5984
+ return __generator(this, function (_c) {
5985
+ switch (_c.label) {
5986
+ case 0:
5987
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
5988
+ throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling getSfvbTransactionalEmails.');
5989
+ }
5990
+ queryParameters = {};
5991
+ headerParameters = {};
5992
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
5993
+ // oauth required
5994
+ _a = headerParameters;
5995
+ _b = "Authorization";
5996
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
5997
+ case 1:
5998
+ // oauth required
5999
+ _a[_b] = _c.sent();
6000
+ _c.label = 2;
6001
+ case 2:
6002
+ if (this.configuration && this.configuration.apiKey) {
6003
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
6004
+ }
6005
+ return [4 /*yield*/, this.request({
6006
+ path: "/sfvb/storefronts/{storefront_oid}/transactional_emails".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
6007
+ method: 'GET',
6008
+ headers: headerParameters,
6009
+ query: queryParameters,
6010
+ }, initOverrides)];
6011
+ case 3:
6012
+ response = _c.sent();
6013
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbTransactionalEmailsResponseFromJSON)(jsonValue); })];
6014
+ }
6015
+ });
6016
+ });
6017
+ };
6018
+ /**
6019
+ * The order, shipment, auto order and other transactional emails this storefront sends, with their template files and the body container a draft replaces. Forgot password and chat verification are not listed, because they have no preview.
6020
+ * List the transactional emails a storefront sends
6021
+ */
6022
+ SfvbApi.prototype.getSfvbTransactionalEmails = function (requestParameters, initOverrides) {
6023
+ return __awaiter(this, void 0, void 0, function () {
6024
+ var response;
6025
+ return __generator(this, function (_a) {
6026
+ switch (_a.label) {
6027
+ case 0: return [4 /*yield*/, this.getSfvbTransactionalEmailsRaw(requestParameters, initOverrides)];
6028
+ case 1:
6029
+ response = _a.sent();
6030
+ return [4 /*yield*/, response.value()];
6031
+ case 2: return [2 /*return*/, _a.sent()];
6032
+ }
6033
+ });
6034
+ });
6035
+ };
5977
6036
  /**
5978
6037
  * The whole offer, with the hash an update sends back in If-Match, which upsell items are out of stock now, and whether loyalty, TowerData and Everflow are set up. Stats as on the path list.
5979
6038
  * Get an upsell offer
@@ -9950,6 +10009,140 @@ var SfvbApi = /** @class */ (function (_super) {
9950
10009
  });
9951
10010
  });
9952
10011
  };
10012
+ /**
10013
+ * Renders a flow or campaign email exactly as its send would, and returns the subject, preview text, HTML and text. Nothing is sent, saved or created. A unique coupon code, click id and magic link token are placeholders. A missing footer token, which a send skips the email for, is a warning. Give cjson to render an unsaved draft of the email container in place of the saved one. An order must be a test order. cart_item_ids fills the cart a cart flow email shows.
10014
+ * Render a flow or campaign email without sending it
10015
+ */
10016
+ SfvbApi.prototype.renderSfvbEmailRaw = function (requestParameters, initOverrides) {
10017
+ return __awaiter(this, void 0, void 0, function () {
10018
+ var queryParameters, headerParameters, _a, _b, response;
10019
+ return __generator(this, function (_c) {
10020
+ switch (_c.label) {
10021
+ case 0:
10022
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
10023
+ throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling renderSfvbEmail.');
10024
+ }
10025
+ if (requestParameters.emailUuid === null || requestParameters.emailUuid === undefined) {
10026
+ throw new runtime.RequiredError('emailUuid', 'Required parameter requestParameters.emailUuid was null or undefined when calling renderSfvbEmail.');
10027
+ }
10028
+ if (requestParameters.emailRenderRequest === null || requestParameters.emailRenderRequest === undefined) {
10029
+ throw new runtime.RequiredError('emailRenderRequest', 'Required parameter requestParameters.emailRenderRequest was null or undefined when calling renderSfvbEmail.');
10030
+ }
10031
+ queryParameters = {};
10032
+ headerParameters = {};
10033
+ headerParameters['Content-Type'] = 'application/json';
10034
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
10035
+ // oauth required
10036
+ _a = headerParameters;
10037
+ _b = "Authorization";
10038
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
10039
+ case 1:
10040
+ // oauth required
10041
+ _a[_b] = _c.sent();
10042
+ _c.label = 2;
10043
+ case 2:
10044
+ if (this.configuration && this.configuration.apiKey) {
10045
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
10046
+ }
10047
+ return [4 /*yield*/, this.request({
10048
+ path: "/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}/render".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))).replace("{".concat("email_uuid", "}"), encodeURIComponent(String(requestParameters.emailUuid))),
10049
+ method: 'POST',
10050
+ headers: headerParameters,
10051
+ query: queryParameters,
10052
+ body: (0, models_1.SfvbEmailRenderRequestToJSON)(requestParameters.emailRenderRequest),
10053
+ }, initOverrides)];
10054
+ case 3:
10055
+ response = _c.sent();
10056
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbEmailRenderResponseFromJSON)(jsonValue); })];
10057
+ }
10058
+ });
10059
+ });
10060
+ };
10061
+ /**
10062
+ * Renders a flow or campaign email exactly as its send would, and returns the subject, preview text, HTML and text. Nothing is sent, saved or created. A unique coupon code, click id and magic link token are placeholders. A missing footer token, which a send skips the email for, is a warning. Give cjson to render an unsaved draft of the email container in place of the saved one. An order must be a test order. cart_item_ids fills the cart a cart flow email shows.
10063
+ * Render a flow or campaign email without sending it
10064
+ */
10065
+ SfvbApi.prototype.renderSfvbEmail = function (requestParameters, initOverrides) {
10066
+ return __awaiter(this, void 0, void 0, function () {
10067
+ var response;
10068
+ return __generator(this, function (_a) {
10069
+ switch (_a.label) {
10070
+ case 0: return [4 /*yield*/, this.renderSfvbEmailRaw(requestParameters, initOverrides)];
10071
+ case 1:
10072
+ response = _a.sent();
10073
+ return [4 /*yield*/, response.value()];
10074
+ case 2: return [2 /*return*/, _a.sent()];
10075
+ }
10076
+ });
10077
+ });
10078
+ };
10079
+ /**
10080
+ * Renders a transactional email, such as the order receipt, exactly as it is sent, and returns the subject, HTML and text. Nothing is sent or saved. file_name is the template file, such as receipt_html.vm, or the display name. Give cjson to render an unsaved draft of the email\'s body container in place of the saved one. The order must be a test order. Without one the email renders with a made up order.
10081
+ * Render a transactional email without sending it
10082
+ */
10083
+ SfvbApi.prototype.renderSfvbTransactionalEmailRaw = function (requestParameters, initOverrides) {
10084
+ return __awaiter(this, void 0, void 0, function () {
10085
+ var queryParameters, headerParameters, _a, _b, response;
10086
+ return __generator(this, function (_c) {
10087
+ switch (_c.label) {
10088
+ case 0:
10089
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
10090
+ throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling renderSfvbTransactionalEmail.');
10091
+ }
10092
+ if (requestParameters.fileName === null || requestParameters.fileName === undefined) {
10093
+ throw new runtime.RequiredError('fileName', 'Required parameter requestParameters.fileName was null or undefined when calling renderSfvbTransactionalEmail.');
10094
+ }
10095
+ if (requestParameters.emailRenderRequest === null || requestParameters.emailRenderRequest === undefined) {
10096
+ throw new runtime.RequiredError('emailRenderRequest', 'Required parameter requestParameters.emailRenderRequest was null or undefined when calling renderSfvbTransactionalEmail.');
10097
+ }
10098
+ queryParameters = {};
10099
+ headerParameters = {};
10100
+ headerParameters['Content-Type'] = 'application/json';
10101
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
10102
+ // oauth required
10103
+ _a = headerParameters;
10104
+ _b = "Authorization";
10105
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
10106
+ case 1:
10107
+ // oauth required
10108
+ _a[_b] = _c.sent();
10109
+ _c.label = 2;
10110
+ case 2:
10111
+ if (this.configuration && this.configuration.apiKey) {
10112
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
10113
+ }
10114
+ return [4 /*yield*/, this.request({
10115
+ path: "/sfvb/storefronts/{storefront_oid}/transactional_emails/{file_name}/render".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))).replace("{".concat("file_name", "}"), encodeURIComponent(String(requestParameters.fileName))),
10116
+ method: 'POST',
10117
+ headers: headerParameters,
10118
+ query: queryParameters,
10119
+ body: (0, models_1.SfvbEmailRenderRequestToJSON)(requestParameters.emailRenderRequest),
10120
+ }, initOverrides)];
10121
+ case 3:
10122
+ response = _c.sent();
10123
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbEmailRenderResponseFromJSON)(jsonValue); })];
10124
+ }
10125
+ });
10126
+ });
10127
+ };
10128
+ /**
10129
+ * Renders a transactional email, such as the order receipt, exactly as it is sent, and returns the subject, HTML and text. Nothing is sent or saved. file_name is the template file, such as receipt_html.vm, or the display name. Give cjson to render an unsaved draft of the email\'s body container in place of the saved one. The order must be a test order. Without one the email renders with a made up order.
10130
+ * Render a transactional email without sending it
10131
+ */
10132
+ SfvbApi.prototype.renderSfvbTransactionalEmail = function (requestParameters, initOverrides) {
10133
+ return __awaiter(this, void 0, void 0, function () {
10134
+ var response;
10135
+ return __generator(this, function (_a) {
10136
+ switch (_a.label) {
10137
+ case 0: return [4 /*yield*/, this.renderSfvbTransactionalEmailRaw(requestParameters, initOverrides)];
10138
+ case 1:
10139
+ response = _a.sent();
10140
+ return [4 /*yield*/, response.value()];
10141
+ case 2: return [2 /*return*/, _a.sent()];
10142
+ }
10143
+ });
10144
+ });
10145
+ };
9953
10146
  /**
9954
10147
  * Renders one node in the context of a theme and a page. Unlike compile this is stateful. Rendering resolves merchant data, so an element bound to an item renders wrongly, and silently, without a context item id. One node per call, so a node that fails to render fails on its own rather than taking a batch with it, and a failure says why. By default the node renders as a shopper sees it, with conditions, prices and sale state evaluated against the context item. Set edit_mode to render every branch the way the builder shows it, for styling content a shopper only sometimes sees.
9955
10148
  * Render a CJSON node to HTML
@@ -0,0 +1,49 @@
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 SfvbEmailRenderRequest
16
+ */
17
+ export interface SfvbEmailRenderRequest {
18
+ /**
19
+ * Item ids for the cart the email renders with. For a cart flow email, or the transactional email this cart and email this item templates.
20
+ * @type {Array<string>}
21
+ * @memberof SfvbEmailRenderRequest
22
+ */
23
+ cart_item_ids?: Array<string>;
24
+ /**
25
+ * An unsaved draft to render in place of the saved content. For a flow or campaign email, the email container. For a transactional email, the body container (the theme file core/emails/<name>_body.cjson).
26
+ * @type {string}
27
+ * @memberof SfvbEmailRenderRequest
28
+ */
29
+ cjson?: string;
30
+ /**
31
+ * The customer name a flow or campaign email greets. Defaults to the signed in user.
32
+ * @type {string}
33
+ * @memberof SfvbEmailRenderRequest
34
+ */
35
+ customer_name?: string;
36
+ /**
37
+ * A test order to render the email with. Real orders are refused. Without one, an order email renders with a made up order.
38
+ * @type {string}
39
+ * @memberof SfvbEmailRenderRequest
40
+ */
41
+ order_id?: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the SfvbEmailRenderRequest interface.
45
+ */
46
+ export declare function instanceOfSfvbEmailRenderRequest(value: object): boolean;
47
+ export declare function SfvbEmailRenderRequestFromJSON(json: any): SfvbEmailRenderRequest;
48
+ export declare function SfvbEmailRenderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbEmailRenderRequest;
49
+ export declare function SfvbEmailRenderRequestToJSON(value?: SfvbEmailRenderRequest | null): any;
@@ -0,0 +1,56 @@
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.SfvbEmailRenderRequestToJSON = exports.SfvbEmailRenderRequestFromJSONTyped = exports.SfvbEmailRenderRequestFromJSON = exports.instanceOfSfvbEmailRenderRequest = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the SfvbEmailRenderRequest interface.
20
+ */
21
+ function instanceOfSfvbEmailRenderRequest(value) {
22
+ var isInstance = true;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfSfvbEmailRenderRequest = instanceOfSfvbEmailRenderRequest;
26
+ function SfvbEmailRenderRequestFromJSON(json) {
27
+ return SfvbEmailRenderRequestFromJSONTyped(json, false);
28
+ }
29
+ exports.SfvbEmailRenderRequestFromJSON = SfvbEmailRenderRequestFromJSON;
30
+ function SfvbEmailRenderRequestFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'cart_item_ids': !(0, runtime_1.exists)(json, 'cart_item_ids') ? undefined : json['cart_item_ids'],
36
+ 'cjson': !(0, runtime_1.exists)(json, 'cjson') ? undefined : json['cjson'],
37
+ 'customer_name': !(0, runtime_1.exists)(json, 'customer_name') ? undefined : json['customer_name'],
38
+ 'order_id': !(0, runtime_1.exists)(json, 'order_id') ? undefined : json['order_id'],
39
+ };
40
+ }
41
+ exports.SfvbEmailRenderRequestFromJSONTyped = SfvbEmailRenderRequestFromJSONTyped;
42
+ function SfvbEmailRenderRequestToJSON(value) {
43
+ if (value === undefined) {
44
+ return undefined;
45
+ }
46
+ if (value === null) {
47
+ return null;
48
+ }
49
+ return {
50
+ 'cart_item_ids': value.cart_item_ids,
51
+ 'cjson': value.cjson,
52
+ 'customer_name': value.customer_name,
53
+ 'order_id': value.order_id,
54
+ };
55
+ }
56
+ exports.SfvbEmailRenderRequestToJSON = SfvbEmailRenderRequestToJSON;
@@ -0,0 +1,81 @@
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 { SfvbErrorDetail } from './SfvbErrorDetail';
13
+ import { SfvbValidationResponse } from './SfvbValidationResponse';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface SfvbEmailRenderResponse
18
+ */
19
+ export interface SfvbEmailRenderResponse {
20
+ /**
21
+ * True when an unsaved draft was rendered.
22
+ * @type {boolean}
23
+ * @memberof SfvbEmailRenderResponse
24
+ */
25
+ draft?: boolean;
26
+ /**
27
+ * The HTML body.
28
+ * @type {string}
29
+ * @memberof SfvbEmailRenderResponse
30
+ */
31
+ html?: string;
32
+ /**
33
+ * The order the email rendered with, when it used one.
34
+ * @type {string}
35
+ * @memberof SfvbEmailRenderResponse
36
+ */
37
+ order_id?: string;
38
+ /**
39
+ * Where that order came from. test (the order given), dummy (made up) or none.
40
+ * @type {string}
41
+ * @memberof SfvbEmailRenderResponse
42
+ */
43
+ order_source?: string;
44
+ /**
45
+ * The preview text an inbox shows after the subject, when the email has one.
46
+ * @type {string}
47
+ * @memberof SfvbEmailRenderResponse
48
+ */
49
+ preview_text?: string;
50
+ /**
51
+ * The subject line.
52
+ * @type {string}
53
+ * @memberof SfvbEmailRenderResponse
54
+ */
55
+ subject?: string;
56
+ /**
57
+ * The plain text body.
58
+ * @type {string}
59
+ * @memberof SfvbEmailRenderResponse
60
+ */
61
+ text?: string;
62
+ /**
63
+ *
64
+ * @type {SfvbValidationResponse}
65
+ * @memberof SfvbEmailRenderResponse
66
+ */
67
+ validation?: SfvbValidationResponse;
68
+ /**
69
+ * Problems a real send would hit, such as a missing required footer token, and placeholders used in place of values a send creates.
70
+ * @type {Array<SfvbErrorDetail>}
71
+ * @memberof SfvbEmailRenderResponse
72
+ */
73
+ warnings?: Array<SfvbErrorDetail>;
74
+ }
75
+ /**
76
+ * Check if a given object implements the SfvbEmailRenderResponse interface.
77
+ */
78
+ export declare function instanceOfSfvbEmailRenderResponse(value: object): boolean;
79
+ export declare function SfvbEmailRenderResponseFromJSON(json: any): SfvbEmailRenderResponse;
80
+ export declare function SfvbEmailRenderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbEmailRenderResponse;
81
+ export declare function SfvbEmailRenderResponseToJSON(value?: SfvbEmailRenderResponse | null): any;