ultracart_rest_api_v2_typescript 4.1.207 → 4.1.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +2 -0
- package/README.md +3 -2
- package/dist/apis/SfvbApi.d.ts +63 -1
- package/dist/apis/SfvbApi.js +135 -0
- package/dist/models/ItemThirdPartyEmailMarketing.d.ts +0 -2
- package/dist/models/ItemThirdPartyEmailMarketing.js +0 -2
- package/dist/models/SfvbEmail.d.ts +97 -0
- package/dist/models/SfvbEmail.js +72 -0
- package/dist/models/SfvbEmailUpdateRequest.d.ts +37 -0
- package/dist/models/SfvbEmailUpdateRequest.js +52 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/apis/SfvbApi.ts +159 -0
- package/src/models/ItemThirdPartyEmailMarketing.ts +0 -2
- package/src/models/SfvbEmail.ts +155 -0
- package/src/models/SfvbEmailUpdateRequest.ts +75 -0
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -1026,8 +1026,10 @@ src/models/SfvbContainerWriteRequest.ts
|
|
|
1026
1026
|
src/models/SfvbElement.ts
|
|
1027
1027
|
src/models/SfvbElementSchemaResponse.ts
|
|
1028
1028
|
src/models/SfvbElementsResponse.ts
|
|
1029
|
+
src/models/SfvbEmail.ts
|
|
1029
1030
|
src/models/SfvbEmailRenderRequest.ts
|
|
1030
1031
|
src/models/SfvbEmailRenderResponse.ts
|
|
1032
|
+
src/models/SfvbEmailUpdateRequest.ts
|
|
1031
1033
|
src/models/SfvbErrorDetail.ts
|
|
1032
1034
|
src/models/SfvbEvent.ts
|
|
1033
1035
|
src/models/SfvbEventsAuthRequest.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.208
|
|
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.208 --save
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
@@ -84,6 +84,7 @@ Not every change is committed to every SDK.
|
|
|
84
84
|
|
|
85
85
|
| Version | Date | Comments |
|
|
86
86
|
| --: | :-: | --- |
|
|
87
|
+
| 4.1.208 | 10/26/2026 | sfvb internal testing |
|
|
87
88
|
| 4.1.207 | 10/16/2026 | sfvb internal testing |
|
|
88
89
|
| 4.1.206 | 10/16/2026 | sfvb internal testing |
|
|
89
90
|
| 4.1.205 | 10/15/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 { SfvbApproval, SfvbApprovalCreateRequest, SfvbApprovalsResponse, SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCampaign, SfvbCampaignsResponse, 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, SfvbFlow, SfvbFlowsResponse, 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';
|
|
13
|
+
import { SfvbApproval, SfvbApprovalCreateRequest, SfvbApprovalsResponse, SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCampaign, SfvbCampaignsResponse, SfvbCommsSendingDomain, SfvbCommsSendingDomainsResponse, SfvbCommsTwilioAccount, SfvbCommsTwilioAccountResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbEmail, SfvbEmailRenderRequest, SfvbEmailRenderResponse, SfvbEmailUpdateRequest, SfvbEventsAuthRequest, SfvbEventsAuthResponse, SfvbEventsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbFlow, SfvbFlowsResponse, 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;
|
|
@@ -231,6 +231,10 @@ export interface GetSfvbContainerVersionRequest {
|
|
|
231
231
|
export interface GetSfvbElementRequest {
|
|
232
232
|
elementType: string;
|
|
233
233
|
}
|
|
234
|
+
export interface GetSfvbEmailRequest {
|
|
235
|
+
storefrontOid: number;
|
|
236
|
+
emailUuid: string;
|
|
237
|
+
}
|
|
234
238
|
export interface GetSfvbEventsRequest {
|
|
235
239
|
after?: string;
|
|
236
240
|
storefrontOid?: number;
|
|
@@ -837,6 +841,12 @@ export interface UpdateSfvbCommsSendingDomainRequest {
|
|
|
837
841
|
export interface UpdateSfvbCommsTwilioAccountRequest {
|
|
838
842
|
twilioAccount: SfvbCommsTwilioAccount;
|
|
839
843
|
}
|
|
844
|
+
export interface UpdateSfvbEmailRequest {
|
|
845
|
+
storefrontOid: number;
|
|
846
|
+
emailUuid: string;
|
|
847
|
+
ifMatch: string;
|
|
848
|
+
emailUpdateRequest: SfvbEmailUpdateRequest;
|
|
849
|
+
}
|
|
840
850
|
export interface UpdateSfvbItemAttributeBatchRequest {
|
|
841
851
|
storefrontOid: number;
|
|
842
852
|
itemAttributeBatchRequest: SfvbItemAttributeBatchRequest;
|
|
@@ -1683,6 +1693,21 @@ export interface SfvbApiInterface {
|
|
|
1683
1693
|
* Configuration schema and field card for one element type
|
|
1684
1694
|
*/
|
|
1685
1695
|
getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse>;
|
|
1696
|
+
/**
|
|
1697
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
1698
|
+
* @summary Get a flow or campaign email\'s subject and preview text
|
|
1699
|
+
* @param {number} storefrontOid
|
|
1700
|
+
* @param {string} emailUuid
|
|
1701
|
+
* @param {*} [options] Override http request option.
|
|
1702
|
+
* @throws {RequiredError}
|
|
1703
|
+
* @memberof SfvbApiInterface
|
|
1704
|
+
*/
|
|
1705
|
+
getSfvbEmailRaw(requestParameters: GetSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
|
|
1706
|
+
/**
|
|
1707
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
1708
|
+
* Get a flow or campaign email\'s subject and preview text
|
|
1709
|
+
*/
|
|
1710
|
+
getSfvbEmail(requestParameters: GetSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
|
|
1686
1711
|
/**
|
|
1687
1712
|
* The signed-in person\'s events after the cursor, oldest first. Events are kept 72 hours; an older cursor returns resync_required, and then the caller re-lists what it was waiting on. Events about one sign-in\'s requests, such as approvals, are only returned to that sign-in. limit is 1 to 500, default 100.
|
|
1688
1713
|
* @summary Replay events
|
|
@@ -3707,6 +3732,23 @@ export interface SfvbApiInterface {
|
|
|
3707
3732
|
* Update the Twilio account
|
|
3708
3733
|
*/
|
|
3709
3734
|
updateSfvbCommsTwilioAccount(requestParameters: UpdateSfvbCommsTwilioAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbCommsTwilioAccountResponse>;
|
|
3735
|
+
/**
|
|
3736
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
3737
|
+
* @summary Change a flow or campaign email\'s subject or preview text
|
|
3738
|
+
* @param {number} storefrontOid
|
|
3739
|
+
* @param {string} emailUuid
|
|
3740
|
+
* @param {string} ifMatch hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
3741
|
+
* @param {SfvbEmailUpdateRequest} emailUpdateRequest The subject or preview text to change
|
|
3742
|
+
* @param {*} [options] Override http request option.
|
|
3743
|
+
* @throws {RequiredError}
|
|
3744
|
+
* @memberof SfvbApiInterface
|
|
3745
|
+
*/
|
|
3746
|
+
updateSfvbEmailRaw(requestParameters: UpdateSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
|
|
3747
|
+
/**
|
|
3748
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
3749
|
+
* Change a flow or campaign email\'s subject or preview text
|
|
3750
|
+
*/
|
|
3751
|
+
updateSfvbEmail(requestParameters: UpdateSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
|
|
3710
3752
|
/**
|
|
3711
3753
|
* Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
|
|
3712
3754
|
* @summary Change attributes across many items in one call
|
|
@@ -4360,6 +4402,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
4360
4402
|
* Configuration schema and field card for one element type
|
|
4361
4403
|
*/
|
|
4362
4404
|
getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse>;
|
|
4405
|
+
/**
|
|
4406
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
4407
|
+
* Get a flow or campaign email\'s subject and preview text
|
|
4408
|
+
*/
|
|
4409
|
+
getSfvbEmailRaw(requestParameters: GetSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
|
|
4410
|
+
/**
|
|
4411
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
4412
|
+
* Get a flow or campaign email\'s subject and preview text
|
|
4413
|
+
*/
|
|
4414
|
+
getSfvbEmail(requestParameters: GetSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
|
|
4363
4415
|
/**
|
|
4364
4416
|
* The signed-in person\'s events after the cursor, oldest first. Events are kept 72 hours; an older cursor returns resync_required, and then the caller re-lists what it was waiting on. Events about one sign-in\'s requests, such as approvals, are only returned to that sign-in. limit is 1 to 500, default 100.
|
|
4365
4417
|
* Replay events
|
|
@@ -5636,6 +5688,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
5636
5688
|
* Update the Twilio account
|
|
5637
5689
|
*/
|
|
5638
5690
|
updateSfvbCommsTwilioAccount(requestParameters: UpdateSfvbCommsTwilioAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbCommsTwilioAccountResponse>;
|
|
5691
|
+
/**
|
|
5692
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
5693
|
+
* Change a flow or campaign email\'s subject or preview text
|
|
5694
|
+
*/
|
|
5695
|
+
updateSfvbEmailRaw(requestParameters: UpdateSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
|
|
5696
|
+
/**
|
|
5697
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
5698
|
+
* Change a flow or campaign email\'s subject or preview text
|
|
5699
|
+
*/
|
|
5700
|
+
updateSfvbEmail(requestParameters: UpdateSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
|
|
5639
5701
|
/**
|
|
5640
5702
|
* Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
|
|
5641
5703
|
* Change attributes across many items in one call
|
package/dist/apis/SfvbApi.js
CHANGED
|
@@ -3391,6 +3391,68 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
3391
3391
|
});
|
|
3392
3392
|
});
|
|
3393
3393
|
};
|
|
3394
|
+
/**
|
|
3395
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
3396
|
+
* Get a flow or campaign email\'s subject and preview text
|
|
3397
|
+
*/
|
|
3398
|
+
SfvbApi.prototype.getSfvbEmailRaw = function (requestParameters, initOverrides) {
|
|
3399
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3400
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
3401
|
+
return __generator(this, function (_c) {
|
|
3402
|
+
switch (_c.label) {
|
|
3403
|
+
case 0:
|
|
3404
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
3405
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling getSfvbEmail.');
|
|
3406
|
+
}
|
|
3407
|
+
if (requestParameters.emailUuid === null || requestParameters.emailUuid === undefined) {
|
|
3408
|
+
throw new runtime.RequiredError('emailUuid', 'Required parameter requestParameters.emailUuid was null or undefined when calling getSfvbEmail.');
|
|
3409
|
+
}
|
|
3410
|
+
queryParameters = {};
|
|
3411
|
+
headerParameters = {};
|
|
3412
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
3413
|
+
// oauth required
|
|
3414
|
+
_a = headerParameters;
|
|
3415
|
+
_b = "Authorization";
|
|
3416
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
3417
|
+
case 1:
|
|
3418
|
+
// oauth required
|
|
3419
|
+
_a[_b] = _c.sent();
|
|
3420
|
+
_c.label = 2;
|
|
3421
|
+
case 2:
|
|
3422
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3423
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
3424
|
+
}
|
|
3425
|
+
return [4 /*yield*/, this.request({
|
|
3426
|
+
path: "/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))).replace("{".concat("email_uuid", "}"), encodeURIComponent(String(requestParameters.emailUuid))),
|
|
3427
|
+
method: 'GET',
|
|
3428
|
+
headers: headerParameters,
|
|
3429
|
+
query: queryParameters,
|
|
3430
|
+
}, initOverrides)];
|
|
3431
|
+
case 3:
|
|
3432
|
+
response = _c.sent();
|
|
3433
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbEmailFromJSON)(jsonValue); })];
|
|
3434
|
+
}
|
|
3435
|
+
});
|
|
3436
|
+
});
|
|
3437
|
+
};
|
|
3438
|
+
/**
|
|
3439
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
3440
|
+
* Get a flow or campaign email\'s subject and preview text
|
|
3441
|
+
*/
|
|
3442
|
+
SfvbApi.prototype.getSfvbEmail = function (requestParameters, initOverrides) {
|
|
3443
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3444
|
+
var response;
|
|
3445
|
+
return __generator(this, function (_a) {
|
|
3446
|
+
switch (_a.label) {
|
|
3447
|
+
case 0: return [4 /*yield*/, this.getSfvbEmailRaw(requestParameters, initOverrides)];
|
|
3448
|
+
case 1:
|
|
3449
|
+
response = _a.sent();
|
|
3450
|
+
return [4 /*yield*/, response.value()];
|
|
3451
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
3452
|
+
}
|
|
3453
|
+
});
|
|
3454
|
+
});
|
|
3455
|
+
};
|
|
3394
3456
|
/**
|
|
3395
3457
|
* The signed-in person\'s events after the cursor, oldest first. Events are kept 72 hours; an older cursor returns resync_required, and then the caller re-lists what it was waiting on. Events about one sign-in\'s requests, such as approvals, are only returned to that sign-in. limit is 1 to 500, default 100.
|
|
3396
3458
|
* Replay events
|
|
@@ -11800,6 +11862,79 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
11800
11862
|
});
|
|
11801
11863
|
});
|
|
11802
11864
|
};
|
|
11865
|
+
/**
|
|
11866
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
11867
|
+
* Change a flow or campaign email\'s subject or preview text
|
|
11868
|
+
*/
|
|
11869
|
+
SfvbApi.prototype.updateSfvbEmailRaw = function (requestParameters, initOverrides) {
|
|
11870
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11871
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
11872
|
+
return __generator(this, function (_c) {
|
|
11873
|
+
switch (_c.label) {
|
|
11874
|
+
case 0:
|
|
11875
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
11876
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling updateSfvbEmail.');
|
|
11877
|
+
}
|
|
11878
|
+
if (requestParameters.emailUuid === null || requestParameters.emailUuid === undefined) {
|
|
11879
|
+
throw new runtime.RequiredError('emailUuid', 'Required parameter requestParameters.emailUuid was null or undefined when calling updateSfvbEmail.');
|
|
11880
|
+
}
|
|
11881
|
+
if (requestParameters.ifMatch === null || requestParameters.ifMatch === undefined) {
|
|
11882
|
+
throw new runtime.RequiredError('ifMatch', 'Required parameter requestParameters.ifMatch was null or undefined when calling updateSfvbEmail.');
|
|
11883
|
+
}
|
|
11884
|
+
if (requestParameters.emailUpdateRequest === null || requestParameters.emailUpdateRequest === undefined) {
|
|
11885
|
+
throw new runtime.RequiredError('emailUpdateRequest', 'Required parameter requestParameters.emailUpdateRequest was null or undefined when calling updateSfvbEmail.');
|
|
11886
|
+
}
|
|
11887
|
+
queryParameters = {};
|
|
11888
|
+
headerParameters = {};
|
|
11889
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
11890
|
+
if (requestParameters.ifMatch !== undefined && requestParameters.ifMatch !== null) {
|
|
11891
|
+
headerParameters['If-Match'] = String(requestParameters.ifMatch);
|
|
11892
|
+
}
|
|
11893
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
11894
|
+
// oauth required
|
|
11895
|
+
_a = headerParameters;
|
|
11896
|
+
_b = "Authorization";
|
|
11897
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
11898
|
+
case 1:
|
|
11899
|
+
// oauth required
|
|
11900
|
+
_a[_b] = _c.sent();
|
|
11901
|
+
_c.label = 2;
|
|
11902
|
+
case 2:
|
|
11903
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
11904
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
11905
|
+
}
|
|
11906
|
+
return [4 /*yield*/, this.request({
|
|
11907
|
+
path: "/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))).replace("{".concat("email_uuid", "}"), encodeURIComponent(String(requestParameters.emailUuid))),
|
|
11908
|
+
method: 'PUT',
|
|
11909
|
+
headers: headerParameters,
|
|
11910
|
+
query: queryParameters,
|
|
11911
|
+
body: (0, models_1.SfvbEmailUpdateRequestToJSON)(requestParameters.emailUpdateRequest),
|
|
11912
|
+
}, initOverrides)];
|
|
11913
|
+
case 3:
|
|
11914
|
+
response = _c.sent();
|
|
11915
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbEmailFromJSON)(jsonValue); })];
|
|
11916
|
+
}
|
|
11917
|
+
});
|
|
11918
|
+
});
|
|
11919
|
+
};
|
|
11920
|
+
/**
|
|
11921
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
11922
|
+
* Change a flow or campaign email\'s subject or preview text
|
|
11923
|
+
*/
|
|
11924
|
+
SfvbApi.prototype.updateSfvbEmail = function (requestParameters, initOverrides) {
|
|
11925
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11926
|
+
var response;
|
|
11927
|
+
return __generator(this, function (_a) {
|
|
11928
|
+
switch (_a.label) {
|
|
11929
|
+
case 0: return [4 /*yield*/, this.updateSfvbEmailRaw(requestParameters, initOverrides)];
|
|
11930
|
+
case 1:
|
|
11931
|
+
response = _a.sent();
|
|
11932
|
+
return [4 /*yield*/, response.value()];
|
|
11933
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
11934
|
+
}
|
|
11935
|
+
});
|
|
11936
|
+
});
|
|
11937
|
+
};
|
|
11803
11938
|
/**
|
|
11804
11939
|
* Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
|
|
11805
11940
|
* Change attributes across many items in one call
|
|
@@ -58,8 +58,6 @@ export declare const ItemThirdPartyEmailMarketingProviderNameEnum: {
|
|
|
58
58
|
readonly GetResponse: "GetResponse";
|
|
59
59
|
readonly IContact: "iContact";
|
|
60
60
|
readonly Klaviyo: "Klaviyo";
|
|
61
|
-
readonly Lyris: "Lyris";
|
|
62
|
-
readonly LyrisHq: "LyrisHQ";
|
|
63
61
|
readonly MailChimp: "MailChimp";
|
|
64
62
|
};
|
|
65
63
|
export type ItemThirdPartyEmailMarketingProviderNameEnum = typeof ItemThirdPartyEmailMarketingProviderNameEnum[keyof typeof ItemThirdPartyEmailMarketingProviderNameEnum];
|
|
@@ -0,0 +1,97 @@
|
|
|
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 SfvbEmail
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbEmail {
|
|
18
|
+
/**
|
|
19
|
+
* When the email container was last changed (ISO 8601, UTC).
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbEmail
|
|
22
|
+
*/
|
|
23
|
+
container_last_modified_dts?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The email uuid. The same uuid the email container (owner type email) and the email render take.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SfvbEmail
|
|
28
|
+
*/
|
|
29
|
+
email_uuid?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Hash of the subject and preview text. Send it as If-Match when updating. A change to the email body does not change it.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SfvbEmail
|
|
34
|
+
*/
|
|
35
|
+
hash_sha256?: string;
|
|
36
|
+
/**
|
|
37
|
+
* True when the email is in a flow or campaign that is sending, so a change reaches customers and needs sfvb_publish. An email in neither is reported live.
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof SfvbEmail
|
|
40
|
+
*/
|
|
41
|
+
live?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* True while a change waits for review. An edit puts it back to needing review.
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof SfvbEmail
|
|
46
|
+
*/
|
|
47
|
+
pending_review?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* The preview text an inbox shows after the subject.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof SfvbEmail
|
|
52
|
+
*/
|
|
53
|
+
preview_text?: string;
|
|
54
|
+
/**
|
|
55
|
+
* True when review rejected the email. An edit puts it back to needing review.
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof SfvbEmail
|
|
58
|
+
*/
|
|
59
|
+
rejected?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* True when a change to this email must be reviewed before it sends.
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof SfvbEmail
|
|
64
|
+
*/
|
|
65
|
+
requires_review?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* The subject line. Merge tokens such as firstName are filled in at send.
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof SfvbEmail
|
|
70
|
+
*/
|
|
71
|
+
subject?: string;
|
|
72
|
+
/**
|
|
73
|
+
* True when UltraCart suspended the email for spam. Edits are refused until the merchant resolves it with UltraCart support.
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof SfvbEmail
|
|
76
|
+
*/
|
|
77
|
+
suspended_for_spam?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* True for a transactional email, which skips the marketing footer rules.
|
|
80
|
+
* @type {boolean}
|
|
81
|
+
* @memberof SfvbEmail
|
|
82
|
+
*/
|
|
83
|
+
transactional?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The email version. Every save adds one.
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @memberof SfvbEmail
|
|
88
|
+
*/
|
|
89
|
+
version?: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Check if a given object implements the SfvbEmail interface.
|
|
93
|
+
*/
|
|
94
|
+
export declare function instanceOfSfvbEmail(value: object): boolean;
|
|
95
|
+
export declare function SfvbEmailFromJSON(json: any): SfvbEmail;
|
|
96
|
+
export declare function SfvbEmailFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbEmail;
|
|
97
|
+
export declare function SfvbEmailToJSON(value?: SfvbEmail | null): any;
|
|
@@ -0,0 +1,72 @@
|
|
|
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.SfvbEmailToJSON = exports.SfvbEmailFromJSONTyped = exports.SfvbEmailFromJSON = exports.instanceOfSfvbEmail = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the SfvbEmail interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfSfvbEmail(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfSfvbEmail = instanceOfSfvbEmail;
|
|
26
|
+
function SfvbEmailFromJSON(json) {
|
|
27
|
+
return SfvbEmailFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.SfvbEmailFromJSON = SfvbEmailFromJSON;
|
|
30
|
+
function SfvbEmailFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'container_last_modified_dts': !(0, runtime_1.exists)(json, 'container_last_modified_dts') ? undefined : json['container_last_modified_dts'],
|
|
36
|
+
'email_uuid': !(0, runtime_1.exists)(json, 'email_uuid') ? undefined : json['email_uuid'],
|
|
37
|
+
'hash_sha256': !(0, runtime_1.exists)(json, 'hash_sha256') ? undefined : json['hash_sha256'],
|
|
38
|
+
'live': !(0, runtime_1.exists)(json, 'live') ? undefined : json['live'],
|
|
39
|
+
'pending_review': !(0, runtime_1.exists)(json, 'pending_review') ? undefined : json['pending_review'],
|
|
40
|
+
'preview_text': !(0, runtime_1.exists)(json, 'preview_text') ? undefined : json['preview_text'],
|
|
41
|
+
'rejected': !(0, runtime_1.exists)(json, 'rejected') ? undefined : json['rejected'],
|
|
42
|
+
'requires_review': !(0, runtime_1.exists)(json, 'requires_review') ? undefined : json['requires_review'],
|
|
43
|
+
'subject': !(0, runtime_1.exists)(json, 'subject') ? undefined : json['subject'],
|
|
44
|
+
'suspended_for_spam': !(0, runtime_1.exists)(json, 'suspended_for_spam') ? undefined : json['suspended_for_spam'],
|
|
45
|
+
'transactional': !(0, runtime_1.exists)(json, 'transactional') ? undefined : json['transactional'],
|
|
46
|
+
'version': !(0, runtime_1.exists)(json, 'version') ? undefined : json['version'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
exports.SfvbEmailFromJSONTyped = SfvbEmailFromJSONTyped;
|
|
50
|
+
function SfvbEmailToJSON(value) {
|
|
51
|
+
if (value === undefined) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (value === null) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'container_last_modified_dts': value.container_last_modified_dts,
|
|
59
|
+
'email_uuid': value.email_uuid,
|
|
60
|
+
'hash_sha256': value.hash_sha256,
|
|
61
|
+
'live': value.live,
|
|
62
|
+
'pending_review': value.pending_review,
|
|
63
|
+
'preview_text': value.preview_text,
|
|
64
|
+
'rejected': value.rejected,
|
|
65
|
+
'requires_review': value.requires_review,
|
|
66
|
+
'subject': value.subject,
|
|
67
|
+
'suspended_for_spam': value.suspended_for_spam,
|
|
68
|
+
'transactional': value.transactional,
|
|
69
|
+
'version': value.version,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
exports.SfvbEmailToJSON = SfvbEmailToJSON;
|
|
@@ -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 SfvbEmailUpdateRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbEmailUpdateRequest {
|
|
18
|
+
/**
|
|
19
|
+
* The new preview text, 5 to 150 characters on one line.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbEmailUpdateRequest
|
|
22
|
+
*/
|
|
23
|
+
preview_text?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The new subject line, 5 to 150 characters on one line. Merge tokens such as firstName are filled in at send.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SfvbEmailUpdateRequest
|
|
28
|
+
*/
|
|
29
|
+
subject?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the SfvbEmailUpdateRequest interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfSfvbEmailUpdateRequest(value: object): boolean;
|
|
35
|
+
export declare function SfvbEmailUpdateRequestFromJSON(json: any): SfvbEmailUpdateRequest;
|
|
36
|
+
export declare function SfvbEmailUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbEmailUpdateRequest;
|
|
37
|
+
export declare function SfvbEmailUpdateRequestToJSON(value?: SfvbEmailUpdateRequest | 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.SfvbEmailUpdateRequestToJSON = exports.SfvbEmailUpdateRequestFromJSONTyped = exports.SfvbEmailUpdateRequestFromJSON = exports.instanceOfSfvbEmailUpdateRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the SfvbEmailUpdateRequest interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfSfvbEmailUpdateRequest(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfSfvbEmailUpdateRequest = instanceOfSfvbEmailUpdateRequest;
|
|
26
|
+
function SfvbEmailUpdateRequestFromJSON(json) {
|
|
27
|
+
return SfvbEmailUpdateRequestFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.SfvbEmailUpdateRequestFromJSON = SfvbEmailUpdateRequestFromJSON;
|
|
30
|
+
function SfvbEmailUpdateRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'preview_text': !(0, runtime_1.exists)(json, 'preview_text') ? undefined : json['preview_text'],
|
|
36
|
+
'subject': !(0, runtime_1.exists)(json, 'subject') ? undefined : json['subject'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.SfvbEmailUpdateRequestFromJSONTyped = SfvbEmailUpdateRequestFromJSONTyped;
|
|
40
|
+
function SfvbEmailUpdateRequestToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'preview_text': value.preview_text,
|
|
49
|
+
'subject': value.subject,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.SfvbEmailUpdateRequestToJSON = SfvbEmailUpdateRequestToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -996,8 +996,10 @@ export * from './SfvbContainerWriteRequest';
|
|
|
996
996
|
export * from './SfvbElement';
|
|
997
997
|
export * from './SfvbElementSchemaResponse';
|
|
998
998
|
export * from './SfvbElementsResponse';
|
|
999
|
+
export * from './SfvbEmail';
|
|
999
1000
|
export * from './SfvbEmailRenderRequest';
|
|
1000
1001
|
export * from './SfvbEmailRenderResponse';
|
|
1002
|
+
export * from './SfvbEmailUpdateRequest';
|
|
1001
1003
|
export * from './SfvbErrorDetail';
|
|
1002
1004
|
export * from './SfvbEvent';
|
|
1003
1005
|
export * from './SfvbEventsAuthRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -1014,8 +1014,10 @@ __exportStar(require("./SfvbContainerWriteRequest"), exports);
|
|
|
1014
1014
|
__exportStar(require("./SfvbElement"), exports);
|
|
1015
1015
|
__exportStar(require("./SfvbElementSchemaResponse"), exports);
|
|
1016
1016
|
__exportStar(require("./SfvbElementsResponse"), exports);
|
|
1017
|
+
__exportStar(require("./SfvbEmail"), exports);
|
|
1017
1018
|
__exportStar(require("./SfvbEmailRenderRequest"), exports);
|
|
1018
1019
|
__exportStar(require("./SfvbEmailRenderResponse"), exports);
|
|
1020
|
+
__exportStar(require("./SfvbEmailUpdateRequest"), exports);
|
|
1019
1021
|
__exportStar(require("./SfvbErrorDetail"), exports);
|
|
1020
1022
|
__exportStar(require("./SfvbEvent"), exports);
|
|
1021
1023
|
__exportStar(require("./SfvbEventsAuthRequest"), exports);
|
package/package.json
CHANGED
package/src/apis/SfvbApi.ts
CHANGED
|
@@ -84,12 +84,18 @@ import {
|
|
|
84
84
|
SfvbElementsResponse,
|
|
85
85
|
SfvbElementsResponseFromJSON,
|
|
86
86
|
SfvbElementsResponseToJSON,
|
|
87
|
+
SfvbEmail,
|
|
88
|
+
SfvbEmailFromJSON,
|
|
89
|
+
SfvbEmailToJSON,
|
|
87
90
|
SfvbEmailRenderRequest,
|
|
88
91
|
SfvbEmailRenderRequestFromJSON,
|
|
89
92
|
SfvbEmailRenderRequestToJSON,
|
|
90
93
|
SfvbEmailRenderResponse,
|
|
91
94
|
SfvbEmailRenderResponseFromJSON,
|
|
92
95
|
SfvbEmailRenderResponseToJSON,
|
|
96
|
+
SfvbEmailUpdateRequest,
|
|
97
|
+
SfvbEmailUpdateRequestFromJSON,
|
|
98
|
+
SfvbEmailUpdateRequestToJSON,
|
|
93
99
|
SfvbEventsAuthRequest,
|
|
94
100
|
SfvbEventsAuthRequestFromJSON,
|
|
95
101
|
SfvbEventsAuthRequestToJSON,
|
|
@@ -754,6 +760,11 @@ export interface GetSfvbElementRequest {
|
|
|
754
760
|
elementType: string;
|
|
755
761
|
}
|
|
756
762
|
|
|
763
|
+
export interface GetSfvbEmailRequest {
|
|
764
|
+
storefrontOid: number;
|
|
765
|
+
emailUuid: string;
|
|
766
|
+
}
|
|
767
|
+
|
|
757
768
|
export interface GetSfvbEventsRequest {
|
|
758
769
|
after?: string;
|
|
759
770
|
storefrontOid?: number;
|
|
@@ -1482,6 +1493,13 @@ export interface UpdateSfvbCommsTwilioAccountRequest {
|
|
|
1482
1493
|
twilioAccount: SfvbCommsTwilioAccount;
|
|
1483
1494
|
}
|
|
1484
1495
|
|
|
1496
|
+
export interface UpdateSfvbEmailRequest {
|
|
1497
|
+
storefrontOid: number;
|
|
1498
|
+
emailUuid: string;
|
|
1499
|
+
ifMatch: string;
|
|
1500
|
+
emailUpdateRequest: SfvbEmailUpdateRequest;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1485
1503
|
export interface UpdateSfvbItemAttributeBatchRequest {
|
|
1486
1504
|
storefrontOid: number;
|
|
1487
1505
|
itemAttributeBatchRequest: SfvbItemAttributeBatchRequest;
|
|
@@ -2440,6 +2458,23 @@ export interface SfvbApiInterface {
|
|
|
2440
2458
|
*/
|
|
2441
2459
|
getSfvbElement(requestParameters: GetSfvbElementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbElementSchemaResponse>;
|
|
2442
2460
|
|
|
2461
|
+
/**
|
|
2462
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
2463
|
+
* @summary Get a flow or campaign email\'s subject and preview text
|
|
2464
|
+
* @param {number} storefrontOid
|
|
2465
|
+
* @param {string} emailUuid
|
|
2466
|
+
* @param {*} [options] Override http request option.
|
|
2467
|
+
* @throws {RequiredError}
|
|
2468
|
+
* @memberof SfvbApiInterface
|
|
2469
|
+
*/
|
|
2470
|
+
getSfvbEmailRaw(requestParameters: GetSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
|
|
2471
|
+
|
|
2472
|
+
/**
|
|
2473
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
2474
|
+
* Get a flow or campaign email\'s subject and preview text
|
|
2475
|
+
*/
|
|
2476
|
+
getSfvbEmail(requestParameters: GetSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
|
|
2477
|
+
|
|
2443
2478
|
/**
|
|
2444
2479
|
* The signed-in person\'s events after the cursor, oldest first. Events are kept 72 hours; an older cursor returns resync_required, and then the caller re-lists what it was waiting on. Events about one sign-in\'s requests, such as approvals, are only returned to that sign-in. limit is 1 to 500, default 100.
|
|
2445
2480
|
* @summary Replay events
|
|
@@ -4720,6 +4755,25 @@ export interface SfvbApiInterface {
|
|
|
4720
4755
|
*/
|
|
4721
4756
|
updateSfvbCommsTwilioAccount(requestParameters: UpdateSfvbCommsTwilioAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbCommsTwilioAccountResponse>;
|
|
4722
4757
|
|
|
4758
|
+
/**
|
|
4759
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
4760
|
+
* @summary Change a flow or campaign email\'s subject or preview text
|
|
4761
|
+
* @param {number} storefrontOid
|
|
4762
|
+
* @param {string} emailUuid
|
|
4763
|
+
* @param {string} ifMatch hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
4764
|
+
* @param {SfvbEmailUpdateRequest} emailUpdateRequest The subject or preview text to change
|
|
4765
|
+
* @param {*} [options] Override http request option.
|
|
4766
|
+
* @throws {RequiredError}
|
|
4767
|
+
* @memberof SfvbApiInterface
|
|
4768
|
+
*/
|
|
4769
|
+
updateSfvbEmailRaw(requestParameters: UpdateSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
|
|
4770
|
+
|
|
4771
|
+
/**
|
|
4772
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
4773
|
+
* Change a flow or campaign email\'s subject or preview text
|
|
4774
|
+
*/
|
|
4775
|
+
updateSfvbEmail(requestParameters: UpdateSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
|
|
4776
|
+
|
|
4723
4777
|
/**
|
|
4724
4778
|
* Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
|
|
4725
4779
|
* @summary Change attributes across many items in one call
|
|
@@ -7356,6 +7410,51 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
7356
7410
|
return await response.value();
|
|
7357
7411
|
}
|
|
7358
7412
|
|
|
7413
|
+
/**
|
|
7414
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
7415
|
+
* Get a flow or campaign email\'s subject and preview text
|
|
7416
|
+
*/
|
|
7417
|
+
async getSfvbEmailRaw(requestParameters: GetSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>> {
|
|
7418
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
7419
|
+
throw new runtime.RequiredError('storefrontOid','Required parameter requestParameters.storefrontOid was null or undefined when calling getSfvbEmail.');
|
|
7420
|
+
}
|
|
7421
|
+
|
|
7422
|
+
if (requestParameters.emailUuid === null || requestParameters.emailUuid === undefined) {
|
|
7423
|
+
throw new runtime.RequiredError('emailUuid','Required parameter requestParameters.emailUuid was null or undefined when calling getSfvbEmail.');
|
|
7424
|
+
}
|
|
7425
|
+
|
|
7426
|
+
const queryParameters: any = {};
|
|
7427
|
+
|
|
7428
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
7429
|
+
|
|
7430
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7431
|
+
// oauth required
|
|
7432
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
|
|
7433
|
+
}
|
|
7434
|
+
|
|
7435
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
7436
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
7437
|
+
}
|
|
7438
|
+
|
|
7439
|
+
const response = await this.request({
|
|
7440
|
+
path: `/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}`.replace(`{${"storefront_oid"}}`, encodeURIComponent(String(requestParameters.storefrontOid))).replace(`{${"email_uuid"}}`, encodeURIComponent(String(requestParameters.emailUuid))),
|
|
7441
|
+
method: 'GET',
|
|
7442
|
+
headers: headerParameters,
|
|
7443
|
+
query: queryParameters,
|
|
7444
|
+
}, initOverrides);
|
|
7445
|
+
|
|
7446
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SfvbEmailFromJSON(jsonValue));
|
|
7447
|
+
}
|
|
7448
|
+
|
|
7449
|
+
/**
|
|
7450
|
+
* The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront\'s campaigns and flows.
|
|
7451
|
+
* Get a flow or campaign email\'s subject and preview text
|
|
7452
|
+
*/
|
|
7453
|
+
async getSfvbEmail(requestParameters: GetSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail> {
|
|
7454
|
+
const response = await this.getSfvbEmailRaw(requestParameters, initOverrides);
|
|
7455
|
+
return await response.value();
|
|
7456
|
+
}
|
|
7457
|
+
|
|
7359
7458
|
/**
|
|
7360
7459
|
* The signed-in person\'s events after the cursor, oldest first. Events are kept 72 hours; an older cursor returns resync_required, and then the caller re-lists what it was waiting on. Events about one sign-in\'s requests, such as approvals, are only returned to that sign-in. limit is 1 to 500, default 100.
|
|
7361
7460
|
* Replay events
|
|
@@ -13764,6 +13863,66 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
13764
13863
|
return await response.value();
|
|
13765
13864
|
}
|
|
13766
13865
|
|
|
13866
|
+
/**
|
|
13867
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
13868
|
+
* Change a flow or campaign email\'s subject or preview text
|
|
13869
|
+
*/
|
|
13870
|
+
async updateSfvbEmailRaw(requestParameters: UpdateSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>> {
|
|
13871
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
13872
|
+
throw new runtime.RequiredError('storefrontOid','Required parameter requestParameters.storefrontOid was null or undefined when calling updateSfvbEmail.');
|
|
13873
|
+
}
|
|
13874
|
+
|
|
13875
|
+
if (requestParameters.emailUuid === null || requestParameters.emailUuid === undefined) {
|
|
13876
|
+
throw new runtime.RequiredError('emailUuid','Required parameter requestParameters.emailUuid was null or undefined when calling updateSfvbEmail.');
|
|
13877
|
+
}
|
|
13878
|
+
|
|
13879
|
+
if (requestParameters.ifMatch === null || requestParameters.ifMatch === undefined) {
|
|
13880
|
+
throw new runtime.RequiredError('ifMatch','Required parameter requestParameters.ifMatch was null or undefined when calling updateSfvbEmail.');
|
|
13881
|
+
}
|
|
13882
|
+
|
|
13883
|
+
if (requestParameters.emailUpdateRequest === null || requestParameters.emailUpdateRequest === undefined) {
|
|
13884
|
+
throw new runtime.RequiredError('emailUpdateRequest','Required parameter requestParameters.emailUpdateRequest was null or undefined when calling updateSfvbEmail.');
|
|
13885
|
+
}
|
|
13886
|
+
|
|
13887
|
+
const queryParameters: any = {};
|
|
13888
|
+
|
|
13889
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
13890
|
+
|
|
13891
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
13892
|
+
|
|
13893
|
+
if (requestParameters.ifMatch !== undefined && requestParameters.ifMatch !== null) {
|
|
13894
|
+
headerParameters['If-Match'] = String(requestParameters.ifMatch);
|
|
13895
|
+
}
|
|
13896
|
+
|
|
13897
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
13898
|
+
// oauth required
|
|
13899
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
|
|
13900
|
+
}
|
|
13901
|
+
|
|
13902
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
13903
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
13904
|
+
}
|
|
13905
|
+
|
|
13906
|
+
const response = await this.request({
|
|
13907
|
+
path: `/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}`.replace(`{${"storefront_oid"}}`, encodeURIComponent(String(requestParameters.storefrontOid))).replace(`{${"email_uuid"}}`, encodeURIComponent(String(requestParameters.emailUuid))),
|
|
13908
|
+
method: 'PUT',
|
|
13909
|
+
headers: headerParameters,
|
|
13910
|
+
query: queryParameters,
|
|
13911
|
+
body: SfvbEmailUpdateRequestToJSON(requestParameters.emailUpdateRequest),
|
|
13912
|
+
}, initOverrides);
|
|
13913
|
+
|
|
13914
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SfvbEmailFromJSON(jsonValue));
|
|
13915
|
+
}
|
|
13916
|
+
|
|
13917
|
+
/**
|
|
13918
|
+
* A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant\'s content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
13919
|
+
* Change a flow or campaign email\'s subject or preview text
|
|
13920
|
+
*/
|
|
13921
|
+
async updateSfvbEmail(requestParameters: UpdateSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail> {
|
|
13922
|
+
const response = await this.updateSfvbEmailRaw(requestParameters, initOverrides);
|
|
13923
|
+
return await response.value();
|
|
13924
|
+
}
|
|
13925
|
+
|
|
13767
13926
|
/**
|
|
13768
13927
|
* Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
|
|
13769
13928
|
* Change attributes across many items in one call
|
|
@@ -65,8 +65,6 @@ export const ItemThirdPartyEmailMarketingProviderNameEnum = {
|
|
|
65
65
|
GetResponse: 'GetResponse',
|
|
66
66
|
IContact: 'iContact',
|
|
67
67
|
Klaviyo: 'Klaviyo',
|
|
68
|
-
Lyris: 'Lyris',
|
|
69
|
-
LyrisHq: 'LyrisHQ',
|
|
70
68
|
MailChimp: 'MailChimp'
|
|
71
69
|
} as const;
|
|
72
70
|
export type ItemThirdPartyEmailMarketingProviderNameEnum = typeof ItemThirdPartyEmailMarketingProviderNameEnum[keyof typeof ItemThirdPartyEmailMarketingProviderNameEnum];
|
|
@@ -0,0 +1,155 @@
|
|
|
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 SfvbEmail
|
|
20
|
+
*/
|
|
21
|
+
export interface SfvbEmail {
|
|
22
|
+
/**
|
|
23
|
+
* When the email container was last changed (ISO 8601, UTC).
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SfvbEmail
|
|
26
|
+
*/
|
|
27
|
+
container_last_modified_dts?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The email uuid. The same uuid the email container (owner type email) and the email render take.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SfvbEmail
|
|
32
|
+
*/
|
|
33
|
+
email_uuid?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Hash of the subject and preview text. Send it as If-Match when updating. A change to the email body does not change it.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SfvbEmail
|
|
38
|
+
*/
|
|
39
|
+
hash_sha256?: string;
|
|
40
|
+
/**
|
|
41
|
+
* True when the email is in a flow or campaign that is sending, so a change reaches customers and needs sfvb_publish. An email in neither is reported live.
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof SfvbEmail
|
|
44
|
+
*/
|
|
45
|
+
live?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* True while a change waits for review. An edit puts it back to needing review.
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof SfvbEmail
|
|
50
|
+
*/
|
|
51
|
+
pending_review?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The preview text an inbox shows after the subject.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof SfvbEmail
|
|
56
|
+
*/
|
|
57
|
+
preview_text?: string;
|
|
58
|
+
/**
|
|
59
|
+
* True when review rejected the email. An edit puts it back to needing review.
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof SfvbEmail
|
|
62
|
+
*/
|
|
63
|
+
rejected?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* True when a change to this email must be reviewed before it sends.
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
* @memberof SfvbEmail
|
|
68
|
+
*/
|
|
69
|
+
requires_review?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The subject line. Merge tokens such as firstName are filled in at send.
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof SfvbEmail
|
|
74
|
+
*/
|
|
75
|
+
subject?: string;
|
|
76
|
+
/**
|
|
77
|
+
* True when UltraCart suspended the email for spam. Edits are refused until the merchant resolves it with UltraCart support.
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof SfvbEmail
|
|
80
|
+
*/
|
|
81
|
+
suspended_for_spam?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* True for a transactional email, which skips the marketing footer rules.
|
|
84
|
+
* @type {boolean}
|
|
85
|
+
* @memberof SfvbEmail
|
|
86
|
+
*/
|
|
87
|
+
transactional?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The email version. Every save adds one.
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof SfvbEmail
|
|
92
|
+
*/
|
|
93
|
+
version?: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Check if a given object implements the SfvbEmail interface.
|
|
100
|
+
*/
|
|
101
|
+
export function instanceOfSfvbEmail(value: object): boolean {
|
|
102
|
+
let isInstance = true;
|
|
103
|
+
|
|
104
|
+
return isInstance;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function SfvbEmailFromJSON(json: any): SfvbEmail {
|
|
108
|
+
return SfvbEmailFromJSONTyped(json, false);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function SfvbEmailFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbEmail {
|
|
112
|
+
if ((json === undefined) || (json === null)) {
|
|
113
|
+
return json;
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'container_last_modified_dts': !exists(json, 'container_last_modified_dts') ? undefined : json['container_last_modified_dts'],
|
|
118
|
+
'email_uuid': !exists(json, 'email_uuid') ? undefined : json['email_uuid'],
|
|
119
|
+
'hash_sha256': !exists(json, 'hash_sha256') ? undefined : json['hash_sha256'],
|
|
120
|
+
'live': !exists(json, 'live') ? undefined : json['live'],
|
|
121
|
+
'pending_review': !exists(json, 'pending_review') ? undefined : json['pending_review'],
|
|
122
|
+
'preview_text': !exists(json, 'preview_text') ? undefined : json['preview_text'],
|
|
123
|
+
'rejected': !exists(json, 'rejected') ? undefined : json['rejected'],
|
|
124
|
+
'requires_review': !exists(json, 'requires_review') ? undefined : json['requires_review'],
|
|
125
|
+
'subject': !exists(json, 'subject') ? undefined : json['subject'],
|
|
126
|
+
'suspended_for_spam': !exists(json, 'suspended_for_spam') ? undefined : json['suspended_for_spam'],
|
|
127
|
+
'transactional': !exists(json, 'transactional') ? undefined : json['transactional'],
|
|
128
|
+
'version': !exists(json, 'version') ? undefined : json['version'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function SfvbEmailToJSON(value?: SfvbEmail | null): any {
|
|
133
|
+
if (value === undefined) {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
if (value === null) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
|
|
141
|
+
'container_last_modified_dts': value.container_last_modified_dts,
|
|
142
|
+
'email_uuid': value.email_uuid,
|
|
143
|
+
'hash_sha256': value.hash_sha256,
|
|
144
|
+
'live': value.live,
|
|
145
|
+
'pending_review': value.pending_review,
|
|
146
|
+
'preview_text': value.preview_text,
|
|
147
|
+
'rejected': value.rejected,
|
|
148
|
+
'requires_review': value.requires_review,
|
|
149
|
+
'subject': value.subject,
|
|
150
|
+
'suspended_for_spam': value.suspended_for_spam,
|
|
151
|
+
'transactional': value.transactional,
|
|
152
|
+
'version': value.version,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
@@ -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 SfvbEmailUpdateRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SfvbEmailUpdateRequest {
|
|
22
|
+
/**
|
|
23
|
+
* The new preview text, 5 to 150 characters on one line.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SfvbEmailUpdateRequest
|
|
26
|
+
*/
|
|
27
|
+
preview_text?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The new subject line, 5 to 150 characters on one line. Merge tokens such as firstName are filled in at send.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SfvbEmailUpdateRequest
|
|
32
|
+
*/
|
|
33
|
+
subject?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the SfvbEmailUpdateRequest interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfSfvbEmailUpdateRequest(value: object): boolean {
|
|
42
|
+
let isInstance = true;
|
|
43
|
+
|
|
44
|
+
return isInstance;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function SfvbEmailUpdateRequestFromJSON(json: any): SfvbEmailUpdateRequest {
|
|
48
|
+
return SfvbEmailUpdateRequestFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function SfvbEmailUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbEmailUpdateRequest {
|
|
52
|
+
if ((json === undefined) || (json === null)) {
|
|
53
|
+
return json;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
'preview_text': !exists(json, 'preview_text') ? undefined : json['preview_text'],
|
|
58
|
+
'subject': !exists(json, 'subject') ? undefined : json['subject'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function SfvbEmailUpdateRequestToJSON(value?: SfvbEmailUpdateRequest | null): any {
|
|
63
|
+
if (value === undefined) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
if (value === null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'preview_text': value.preview_text,
|
|
72
|
+
'subject': value.subject,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -998,8 +998,10 @@ export * from './SfvbContainerWriteRequest';
|
|
|
998
998
|
export * from './SfvbElement';
|
|
999
999
|
export * from './SfvbElementSchemaResponse';
|
|
1000
1000
|
export * from './SfvbElementsResponse';
|
|
1001
|
+
export * from './SfvbEmail';
|
|
1001
1002
|
export * from './SfvbEmailRenderRequest';
|
|
1002
1003
|
export * from './SfvbEmailRenderResponse';
|
|
1004
|
+
export * from './SfvbEmailUpdateRequest';
|
|
1003
1005
|
export * from './SfvbErrorDetail';
|
|
1004
1006
|
export * from './SfvbEvent';
|
|
1005
1007
|
export * from './SfvbEventsAuthRequest';
|