ultracart_rest_api_v2_typescript 4.1.209 → 4.1.210

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.
@@ -1036,6 +1036,7 @@ src/models/SfvbElementsResponse.ts
1036
1036
  src/models/SfvbEmail.ts
1037
1037
  src/models/SfvbEmailRenderRequest.ts
1038
1038
  src/models/SfvbEmailRenderResponse.ts
1039
+ src/models/SfvbEmailReviewRequest.ts
1039
1040
  src/models/SfvbEmailUpdateRequest.ts
1040
1041
  src/models/SfvbErrorDetail.ts
1041
1042
  src/models/SfvbEvent.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.209
2
+ ## ultracart_rest_api_v2_typescript@4.1.210
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.209 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.210 --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.210 | 10/27/2026 | sfvb internal testing |
87
88
  | 4.1.209 | 10/27/2026 | sfvb internal testing |
88
89
  | 4.1.208 | 10/26/2026 | sfvb internal testing |
89
90
  | 4.1.207 | 10/16/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, SfvbArchiveRequest, SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCampaign, SfvbCampaignWriteRequest, SfvbCampaignsResponse, SfvbCommsListsResponse, SfvbCommsSegmentsResponse, 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, SfvbFlowStatusRequest, SfvbFlowWriteRequest, 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, SfvbArchiveRequest, SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCampaign, SfvbCampaignWriteRequest, SfvbCampaignsResponse, SfvbCommsListsResponse, SfvbCommsSegmentsResponse, SfvbCommsSendingDomain, SfvbCommsSendingDomainsResponse, SfvbCommsTwilioAccount, SfvbCommsTwilioAccountResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbEmail, SfvbEmailRenderRequest, SfvbEmailRenderResponse, SfvbEmailReviewRequest, SfvbEmailUpdateRequest, SfvbEventsAuthRequest, SfvbEventsAuthResponse, SfvbEventsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbFlow, SfvbFlowStatusRequest, SfvbFlowWriteRequest, 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;
@@ -811,6 +811,11 @@ export interface RevertSfvbFileRequest {
811
811
  fileRevertRequest: SfvbFileRevertRequest;
812
812
  approvalId?: string;
813
813
  }
814
+ export interface ReviewSfvbEmailRequest {
815
+ storefrontOid: number;
816
+ emailUuid: string;
817
+ emailReviewRequest: SfvbEmailReviewRequest;
818
+ }
814
819
  export interface RevokeSfvbSecretRequestRequest {
815
820
  requestId: string;
816
821
  }
@@ -3688,6 +3693,22 @@ export interface SfvbApiInterface {
3688
3693
  * Revert a storefront file to an earlier version
3689
3694
  */
3690
3695
  revertSfvbFile(requestParameters: RevertSfvbFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbFileWriteResponse>;
3696
+ /**
3697
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
3698
+ * @summary Request a content review of a flow or campaign email
3699
+ * @param {number} storefrontOid
3700
+ * @param {string} emailUuid
3701
+ * @param {SfvbEmailReviewRequest} emailReviewRequest The test order, for an email in an order-triggered flow
3702
+ * @param {*} [options] Override http request option.
3703
+ * @throws {RequiredError}
3704
+ * @memberof SfvbApiInterface
3705
+ */
3706
+ reviewSfvbEmailRaw(requestParameters: ReviewSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
3707
+ /**
3708
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
3709
+ * Request a content review of a flow or campaign email
3710
+ */
3711
+ reviewSfvbEmail(requestParameters: ReviewSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
3691
3712
  /**
3692
3713
  * Every handle of the request that no write has used up stops working at once, and its value is deleted. A handle a write is using right now is left to that write. Use it when the plan changed, or a handle may have leaked.
3693
3714
  * @summary Revoke a fulfilled request\'s unused handles
@@ -5853,6 +5874,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
5853
5874
  * Revert a storefront file to an earlier version
5854
5875
  */
5855
5876
  revertSfvbFile(requestParameters: RevertSfvbFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbFileWriteResponse>;
5877
+ /**
5878
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
5879
+ * Request a content review of a flow or campaign email
5880
+ */
5881
+ reviewSfvbEmailRaw(requestParameters: ReviewSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
5882
+ /**
5883
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
5884
+ * Request a content review of a flow or campaign email
5885
+ */
5886
+ reviewSfvbEmail(requestParameters: ReviewSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
5856
5887
  /**
5857
5888
  * Every handle of the request that no write has used up stops working at once, and its value is deleted. A handle a write is using right now is left to that write. Use it when the plan changed, or a handle may have leaked.
5858
5889
  * Revoke a fulfilled request\'s unused handles
@@ -11469,6 +11469,73 @@ var SfvbApi = /** @class */ (function (_super) {
11469
11469
  });
11470
11470
  });
11471
11471
  };
11472
+ /**
11473
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
11474
+ * Request a content review of a flow or campaign email
11475
+ */
11476
+ SfvbApi.prototype.reviewSfvbEmailRaw = function (requestParameters, initOverrides) {
11477
+ return __awaiter(this, void 0, void 0, function () {
11478
+ var queryParameters, headerParameters, _a, _b, response;
11479
+ return __generator(this, function (_c) {
11480
+ switch (_c.label) {
11481
+ case 0:
11482
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
11483
+ throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling reviewSfvbEmail.');
11484
+ }
11485
+ if (requestParameters.emailUuid === null || requestParameters.emailUuid === undefined) {
11486
+ throw new runtime.RequiredError('emailUuid', 'Required parameter requestParameters.emailUuid was null or undefined when calling reviewSfvbEmail.');
11487
+ }
11488
+ if (requestParameters.emailReviewRequest === null || requestParameters.emailReviewRequest === undefined) {
11489
+ throw new runtime.RequiredError('emailReviewRequest', 'Required parameter requestParameters.emailReviewRequest was null or undefined when calling reviewSfvbEmail.');
11490
+ }
11491
+ queryParameters = {};
11492
+ headerParameters = {};
11493
+ headerParameters['Content-Type'] = 'application/json';
11494
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
11495
+ // oauth required
11496
+ _a = headerParameters;
11497
+ _b = "Authorization";
11498
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
11499
+ case 1:
11500
+ // oauth required
11501
+ _a[_b] = _c.sent();
11502
+ _c.label = 2;
11503
+ case 2:
11504
+ if (this.configuration && this.configuration.apiKey) {
11505
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
11506
+ }
11507
+ return [4 /*yield*/, this.request({
11508
+ path: "/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}/review".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))).replace("{".concat("email_uuid", "}"), encodeURIComponent(String(requestParameters.emailUuid))),
11509
+ method: 'POST',
11510
+ headers: headerParameters,
11511
+ query: queryParameters,
11512
+ body: (0, models_1.SfvbEmailReviewRequestToJSON)(requestParameters.emailReviewRequest),
11513
+ }, initOverrides)];
11514
+ case 3:
11515
+ response = _c.sent();
11516
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbEmailFromJSON)(jsonValue); })];
11517
+ }
11518
+ });
11519
+ });
11520
+ };
11521
+ /**
11522
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
11523
+ * Request a content review of a flow or campaign email
11524
+ */
11525
+ SfvbApi.prototype.reviewSfvbEmail = function (requestParameters, initOverrides) {
11526
+ return __awaiter(this, void 0, void 0, function () {
11527
+ var response;
11528
+ return __generator(this, function (_a) {
11529
+ switch (_a.label) {
11530
+ case 0: return [4 /*yield*/, this.reviewSfvbEmailRaw(requestParameters, initOverrides)];
11531
+ case 1:
11532
+ response = _a.sent();
11533
+ return [4 /*yield*/, response.value()];
11534
+ case 2: return [2 /*return*/, _a.sent()];
11535
+ }
11536
+ });
11537
+ });
11538
+ };
11472
11539
  /**
11473
11540
  * Every handle of the request that no write has used up stops working at once, and its value is deleted. A handle a write is using right now is left to that write. Use it when the plan changed, or a handle may have leaked.
11474
11541
  * Revoke a fulfilled request\'s unused handles
@@ -39,6 +39,12 @@ export interface SfvbEmail {
39
39
  * @memberof SfvbEmail
40
40
  */
41
41
  live?: boolean;
42
+ /**
43
+ * What a write did beyond the fields asked for, such as a step label it could not refresh. Only on a write.
44
+ * @type {Array<string>}
45
+ * @memberof SfvbEmail
46
+ */
47
+ notes?: Array<string>;
42
48
  /**
43
49
  * True while a change waits for review. An edit puts it back to needing review.
44
50
  * @type {boolean}
@@ -36,6 +36,7 @@ function SfvbEmailFromJSONTyped(json, ignoreDiscriminator) {
36
36
  'email_uuid': !(0, runtime_1.exists)(json, 'email_uuid') ? undefined : json['email_uuid'],
37
37
  'hash_sha256': !(0, runtime_1.exists)(json, 'hash_sha256') ? undefined : json['hash_sha256'],
38
38
  'live': !(0, runtime_1.exists)(json, 'live') ? undefined : json['live'],
39
+ 'notes': !(0, runtime_1.exists)(json, 'notes') ? undefined : json['notes'],
39
40
  'pending_review': !(0, runtime_1.exists)(json, 'pending_review') ? undefined : json['pending_review'],
40
41
  'preview_text': !(0, runtime_1.exists)(json, 'preview_text') ? undefined : json['preview_text'],
41
42
  'rejected': !(0, runtime_1.exists)(json, 'rejected') ? undefined : json['rejected'],
@@ -59,6 +60,7 @@ function SfvbEmailToJSON(value) {
59
60
  'email_uuid': value.email_uuid,
60
61
  'hash_sha256': value.hash_sha256,
61
62
  'live': value.live,
63
+ 'notes': value.notes,
62
64
  'pending_review': value.pending_review,
63
65
  'preview_text': value.preview_text,
64
66
  'rejected': value.rejected,
@@ -0,0 +1,31 @@
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 SfvbEmailReviewRequest
16
+ */
17
+ export interface SfvbEmailReviewRequest {
18
+ /**
19
+ * A test order id. Required for an email in a flow triggered by an order or an auto order, and refused otherwise.
20
+ * @type {string}
21
+ * @memberof SfvbEmailReviewRequest
22
+ */
23
+ order_id?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the SfvbEmailReviewRequest interface.
27
+ */
28
+ export declare function instanceOfSfvbEmailReviewRequest(value: object): boolean;
29
+ export declare function SfvbEmailReviewRequestFromJSON(json: any): SfvbEmailReviewRequest;
30
+ export declare function SfvbEmailReviewRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbEmailReviewRequest;
31
+ export declare function SfvbEmailReviewRequestToJSON(value?: SfvbEmailReviewRequest | null): any;
@@ -0,0 +1,50 @@
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.SfvbEmailReviewRequestToJSON = exports.SfvbEmailReviewRequestFromJSONTyped = exports.SfvbEmailReviewRequestFromJSON = exports.instanceOfSfvbEmailReviewRequest = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the SfvbEmailReviewRequest interface.
20
+ */
21
+ function instanceOfSfvbEmailReviewRequest(value) {
22
+ var isInstance = true;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfSfvbEmailReviewRequest = instanceOfSfvbEmailReviewRequest;
26
+ function SfvbEmailReviewRequestFromJSON(json) {
27
+ return SfvbEmailReviewRequestFromJSONTyped(json, false);
28
+ }
29
+ exports.SfvbEmailReviewRequestFromJSON = SfvbEmailReviewRequestFromJSON;
30
+ function SfvbEmailReviewRequestFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'order_id': !(0, runtime_1.exists)(json, 'order_id') ? undefined : json['order_id'],
36
+ };
37
+ }
38
+ exports.SfvbEmailReviewRequestFromJSONTyped = SfvbEmailReviewRequestFromJSONTyped;
39
+ function SfvbEmailReviewRequestToJSON(value) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ 'order_id': value.order_id,
48
+ };
49
+ }
50
+ exports.SfvbEmailReviewRequestToJSON = SfvbEmailReviewRequestToJSON;
@@ -1006,6 +1006,7 @@ export * from './SfvbElementsResponse';
1006
1006
  export * from './SfvbEmail';
1007
1007
  export * from './SfvbEmailRenderRequest';
1008
1008
  export * from './SfvbEmailRenderResponse';
1009
+ export * from './SfvbEmailReviewRequest';
1009
1010
  export * from './SfvbEmailUpdateRequest';
1010
1011
  export * from './SfvbErrorDetail';
1011
1012
  export * from './SfvbEvent';
@@ -1024,6 +1024,7 @@ __exportStar(require("./SfvbElementsResponse"), exports);
1024
1024
  __exportStar(require("./SfvbEmail"), exports);
1025
1025
  __exportStar(require("./SfvbEmailRenderRequest"), exports);
1026
1026
  __exportStar(require("./SfvbEmailRenderResponse"), exports);
1027
+ __exportStar(require("./SfvbEmailReviewRequest"), exports);
1027
1028
  __exportStar(require("./SfvbEmailUpdateRequest"), exports);
1028
1029
  __exportStar(require("./SfvbErrorDetail"), exports);
1029
1030
  __exportStar(require("./SfvbEvent"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.1.209",
3
+ "version": "4.1.210",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -105,6 +105,9 @@ import {
105
105
  SfvbEmailRenderResponse,
106
106
  SfvbEmailRenderResponseFromJSON,
107
107
  SfvbEmailRenderResponseToJSON,
108
+ SfvbEmailReviewRequest,
109
+ SfvbEmailReviewRequestFromJSON,
110
+ SfvbEmailReviewRequestToJSON,
108
111
  SfvbEmailUpdateRequest,
109
112
  SfvbEmailUpdateRequestFromJSON,
110
113
  SfvbEmailUpdateRequestToJSON,
@@ -1475,6 +1478,12 @@ export interface RevertSfvbFileRequest {
1475
1478
  approvalId?: string;
1476
1479
  }
1477
1480
 
1481
+ export interface ReviewSfvbEmailRequest {
1482
+ storefrontOid: number;
1483
+ emailUuid: string;
1484
+ emailReviewRequest: SfvbEmailReviewRequest;
1485
+ }
1486
+
1478
1487
  export interface RevokeSfvbSecretRequestRequest {
1479
1488
  requestId: string;
1480
1489
  }
@@ -4728,6 +4737,24 @@ export interface SfvbApiInterface {
4728
4737
  */
4729
4738
  revertSfvbFile(requestParameters: RevertSfvbFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbFileWriteResponse>;
4730
4739
 
4740
+ /**
4741
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
4742
+ * @summary Request a content review of a flow or campaign email
4743
+ * @param {number} storefrontOid
4744
+ * @param {string} emailUuid
4745
+ * @param {SfvbEmailReviewRequest} emailReviewRequest The test order, for an email in an order-triggered flow
4746
+ * @param {*} [options] Override http request option.
4747
+ * @throws {RequiredError}
4748
+ * @memberof SfvbApiInterface
4749
+ */
4750
+ reviewSfvbEmailRaw(requestParameters: ReviewSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>>;
4751
+
4752
+ /**
4753
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
4754
+ * Request a content review of a flow or campaign email
4755
+ */
4756
+ reviewSfvbEmail(requestParameters: ReviewSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail>;
4757
+
4731
4758
  /**
4732
4759
  * Every handle of the request that no write has used up stops working at once, and its value is deleted. A handle a write is using right now is left to that write. Use it when the plan changed, or a handle may have leaked.
4733
4760
  * @summary Revoke a fulfilled request\'s unused handles
@@ -13838,6 +13865,58 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
13838
13865
  return await response.value();
13839
13866
  }
13840
13867
 
13868
+ /**
13869
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
13870
+ * Request a content review of a flow or campaign email
13871
+ */
13872
+ async reviewSfvbEmailRaw(requestParameters: ReviewSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbEmail>> {
13873
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
13874
+ throw new runtime.RequiredError('storefrontOid','Required parameter requestParameters.storefrontOid was null or undefined when calling reviewSfvbEmail.');
13875
+ }
13876
+
13877
+ if (requestParameters.emailUuid === null || requestParameters.emailUuid === undefined) {
13878
+ throw new runtime.RequiredError('emailUuid','Required parameter requestParameters.emailUuid was null or undefined when calling reviewSfvbEmail.');
13879
+ }
13880
+
13881
+ if (requestParameters.emailReviewRequest === null || requestParameters.emailReviewRequest === undefined) {
13882
+ throw new runtime.RequiredError('emailReviewRequest','Required parameter requestParameters.emailReviewRequest was null or undefined when calling reviewSfvbEmail.');
13883
+ }
13884
+
13885
+ const queryParameters: any = {};
13886
+
13887
+ const headerParameters: runtime.HTTPHeaders = {};
13888
+
13889
+ headerParameters['Content-Type'] = 'application/json';
13890
+
13891
+ if (this.configuration && this.configuration.accessToken) {
13892
+ // oauth required
13893
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
13894
+ }
13895
+
13896
+ if (this.configuration && this.configuration.apiKey) {
13897
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
13898
+ }
13899
+
13900
+ const response = await this.request({
13901
+ path: `/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}/review`.replace(`{${"storefront_oid"}}`, encodeURIComponent(String(requestParameters.storefrontOid))).replace(`{${"email_uuid"}}`, encodeURIComponent(String(requestParameters.emailUuid))),
13902
+ method: 'POST',
13903
+ headers: headerParameters,
13904
+ query: queryParameters,
13905
+ body: SfvbEmailReviewRequestToJSON(requestParameters.emailReviewRequest),
13906
+ }, initOverrides);
13907
+
13908
+ return new runtime.JSONApiResponse(response, (jsonValue) => SfvbEmailFromJSON(jsonValue));
13909
+ }
13910
+
13911
+ /**
13912
+ * Starts a review the way the admin\'s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn\'t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
13913
+ * Request a content review of a flow or campaign email
13914
+ */
13915
+ async reviewSfvbEmail(requestParameters: ReviewSfvbEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbEmail> {
13916
+ const response = await this.reviewSfvbEmailRaw(requestParameters, initOverrides);
13917
+ return await response.value();
13918
+ }
13919
+
13841
13920
  /**
13842
13921
  * Every handle of the request that no write has used up stops working at once, and its value is deleted. A handle a write is using right now is left to that write. Use it when the plan changed, or a handle may have leaked.
13843
13922
  * Revoke a fulfilled request\'s unused handles
@@ -43,6 +43,12 @@ export interface SfvbEmail {
43
43
  * @memberof SfvbEmail
44
44
  */
45
45
  live?: boolean;
46
+ /**
47
+ * What a write did beyond the fields asked for, such as a step label it could not refresh. Only on a write.
48
+ * @type {Array<string>}
49
+ * @memberof SfvbEmail
50
+ */
51
+ notes?: Array<string>;
46
52
  /**
47
53
  * True while a change waits for review. An edit puts it back to needing review.
48
54
  * @type {boolean}
@@ -118,6 +124,7 @@ export function SfvbEmailFromJSONTyped(json: any, ignoreDiscriminator: boolean):
118
124
  'email_uuid': !exists(json, 'email_uuid') ? undefined : json['email_uuid'],
119
125
  'hash_sha256': !exists(json, 'hash_sha256') ? undefined : json['hash_sha256'],
120
126
  'live': !exists(json, 'live') ? undefined : json['live'],
127
+ 'notes': !exists(json, 'notes') ? undefined : json['notes'],
121
128
  'pending_review': !exists(json, 'pending_review') ? undefined : json['pending_review'],
122
129
  'preview_text': !exists(json, 'preview_text') ? undefined : json['preview_text'],
123
130
  'rejected': !exists(json, 'rejected') ? undefined : json['rejected'],
@@ -142,6 +149,7 @@ export function SfvbEmailToJSON(value?: SfvbEmail | null): any {
142
149
  'email_uuid': value.email_uuid,
143
150
  'hash_sha256': value.hash_sha256,
144
151
  'live': value.live,
152
+ 'notes': value.notes,
145
153
  'pending_review': value.pending_review,
146
154
  'preview_text': value.preview_text,
147
155
  'rejected': value.rejected,
@@ -0,0 +1,67 @@
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 SfvbEmailReviewRequest
20
+ */
21
+ export interface SfvbEmailReviewRequest {
22
+ /**
23
+ * A test order id. Required for an email in a flow triggered by an order or an auto order, and refused otherwise.
24
+ * @type {string}
25
+ * @memberof SfvbEmailReviewRequest
26
+ */
27
+ order_id?: string;
28
+ }
29
+
30
+
31
+
32
+ /**
33
+ * Check if a given object implements the SfvbEmailReviewRequest interface.
34
+ */
35
+ export function instanceOfSfvbEmailReviewRequest(value: object): boolean {
36
+ let isInstance = true;
37
+
38
+ return isInstance;
39
+ }
40
+
41
+ export function SfvbEmailReviewRequestFromJSON(json: any): SfvbEmailReviewRequest {
42
+ return SfvbEmailReviewRequestFromJSONTyped(json, false);
43
+ }
44
+
45
+ export function SfvbEmailReviewRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbEmailReviewRequest {
46
+ if ((json === undefined) || (json === null)) {
47
+ return json;
48
+ }
49
+ return {
50
+
51
+ 'order_id': !exists(json, 'order_id') ? undefined : json['order_id'],
52
+ };
53
+ }
54
+
55
+ export function SfvbEmailReviewRequestToJSON(value?: SfvbEmailReviewRequest | null): any {
56
+ if (value === undefined) {
57
+ return undefined;
58
+ }
59
+ if (value === null) {
60
+ return null;
61
+ }
62
+ return {
63
+
64
+ 'order_id': value.order_id,
65
+ };
66
+ }
67
+
@@ -1008,6 +1008,7 @@ export * from './SfvbElementsResponse';
1008
1008
  export * from './SfvbEmail';
1009
1009
  export * from './SfvbEmailRenderRequest';
1010
1010
  export * from './SfvbEmailRenderResponse';
1011
+ export * from './SfvbEmailReviewRequest';
1011
1012
  export * from './SfvbEmailUpdateRequest';
1012
1013
  export * from './SfvbErrorDetail';
1013
1014
  export * from './SfvbEvent';