ultracart_rest_api_v2_typescript 4.1.198 → 4.1.199

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.
Files changed (36) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +3 -2
  3. package/dist/apis/SfvbApi.d.ts +69 -5
  4. package/dist/apis/SfvbApi.js +139 -2
  5. package/dist/models/SfvbApproval.d.ts +10 -1
  6. package/dist/models/SfvbApproval.js +6 -1
  7. package/dist/models/SfvbApprovalCreateRequest.d.ts +15 -0
  8. package/dist/models/SfvbApprovalCreateRequest.js +8 -1
  9. package/dist/models/SfvbApprovalParams.d.ts +25 -1
  10. package/dist/models/SfvbApprovalParams.js +8 -0
  11. package/dist/models/SfvbApprovalReview.d.ts +96 -0
  12. package/dist/models/SfvbApprovalReview.js +78 -0
  13. package/dist/models/SfvbApprovalReviewFinding.d.ts +49 -0
  14. package/dist/models/SfvbApprovalReviewFinding.js +56 -0
  15. package/dist/models/SfvbRedirectDeleteRequest.d.ts +38 -0
  16. package/dist/models/SfvbRedirectDeleteRequest.js +53 -0
  17. package/dist/models/SfvbRedirectDeleteResponse.d.ts +86 -0
  18. package/dist/models/SfvbRedirectDeleteResponse.js +69 -0
  19. package/dist/models/SfvbRedirectDeleteRow.d.ts +37 -0
  20. package/dist/models/SfvbRedirectDeleteRow.js +52 -0
  21. package/dist/models/SfvbRedirectDeleteRowResult.d.ts +83 -0
  22. package/dist/models/SfvbRedirectDeleteRowResult.js +73 -0
  23. package/dist/models/index.d.ts +6 -0
  24. package/dist/models/index.js +6 -0
  25. package/package.json +1 -1
  26. package/src/apis/SfvbApi.ts +168 -4
  27. package/src/models/SfvbApproval.ts +18 -2
  28. package/src/models/SfvbApprovalCreateRequest.ts +25 -1
  29. package/src/models/SfvbApprovalParams.ts +33 -1
  30. package/src/models/SfvbApprovalReview.ts +158 -0
  31. package/src/models/SfvbApprovalReviewFinding.ts +91 -0
  32. package/src/models/SfvbRedirectDeleteRequest.ts +82 -0
  33. package/src/models/SfvbRedirectDeleteResponse.ts +146 -0
  34. package/src/models/SfvbRedirectDeleteRow.ts +75 -0
  35. package/src/models/SfvbRedirectDeleteRowResult.ts +135 -0
  36. package/src/models/index.ts +6 -0
@@ -998,6 +998,8 @@ src/models/SelfConfig.ts
998
998
  src/models/SfvbApproval.ts
999
999
  src/models/SfvbApprovalCreateRequest.ts
1000
1000
  src/models/SfvbApprovalParams.ts
1001
+ src/models/SfvbApprovalReview.ts
1002
+ src/models/SfvbApprovalReviewFinding.ts
1001
1003
  src/models/SfvbApprovalsResponse.ts
1002
1004
  src/models/SfvbBlogPost.ts
1003
1005
  src/models/SfvbBlogPostDetail.ts
@@ -1132,6 +1134,10 @@ src/models/SfvbRecordingSettingsRequest.ts
1132
1134
  src/models/SfvbRecordingSettingsResponse.ts
1133
1135
  src/models/SfvbRedirect.ts
1134
1136
  src/models/SfvbRedirectCheckResponse.ts
1137
+ src/models/SfvbRedirectDeleteRequest.ts
1138
+ src/models/SfvbRedirectDeleteResponse.ts
1139
+ src/models/SfvbRedirectDeleteRow.ts
1140
+ src/models/SfvbRedirectDeleteRowResult.ts
1135
1141
  src/models/SfvbRedirectImportRequest.ts
1136
1142
  src/models/SfvbRedirectImportResponse.ts
1137
1143
  src/models/SfvbRedirectImportRow.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.198
2
+ ## ultracart_rest_api_v2_typescript@4.1.199
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.198 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.199 --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.199 | 10/08/2026 | sfvb internal testing |
87
88
  | 4.1.198 | 10/08/2026 | sfvb internal testing |
88
89
  | 4.1.197 | 10/08/2026 | sfvb internal testing |
89
90
  | 4.1.196 | 10/08/2026 | sfvb internal testing |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { SfvbApproval, SfvbApprovalCreateRequest, SfvbApprovalsResponse, SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbI18nGlossary, SfvbI18nGlossaryRequest, SfvbI18nLanguageEnableRequest, SfvbI18nLanguagesResponse, SfvbI18nMachineTranslationsResponse, SfvbI18nMessage, SfvbI18nMessageWriteRequest, SfvbI18nMessagesResponse, SfvbI18nResetResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaRequest, 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, SfvbRedirectImportRequest, SfvbRedirectImportResponse, SfvbRedirectRequest, SfvbRedirectResolveResponse, SfvbRedirectResponse, SfvbRedirectsResponse, SfvbRenderRequest, SfvbRenderResponse, SfvbServerLogDetail, SfvbServerLogsResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplateResolveResponse, SfvbTemplatesResponse, SfvbTestOrdersResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffer, SfvbUpsellOffersResponse, SfvbUpsellPath, SfvbUpsellPathDuplicateRequest, SfvbUpsellPathMoveRequest, SfvbUpsellPathsResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
13
+ import { SfvbApproval, SfvbApprovalCreateRequest, SfvbApprovalsResponse, SfvbBlogPostDetail, SfvbBlogPostImageRequest, SfvbBlogPostRequest, SfvbBlogPostsResponse, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbI18nGlossary, SfvbI18nGlossaryRequest, SfvbI18nLanguageEnableRequest, SfvbI18nLanguagesResponse, SfvbI18nMachineTranslationsResponse, SfvbI18nMessage, SfvbI18nMessageWriteRequest, SfvbI18nMessagesResponse, SfvbI18nResetResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaRequest, 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, SfvbServerLogDetail, SfvbServerLogsResponse, SfvbSiteAttributeUpdateRequest, SfvbSiteAttributesResponse, SfvbStorefrontsResponse, SfvbTemplateResolveResponse, SfvbTemplatesResponse, SfvbTestOrdersResponse, SfvbTheme, SfvbThemeAttributeUpdateRequest, SfvbThemeAttributesResponse, SfvbThemeDuplicateRequest, SfvbThemeJobResponse, SfvbThemesResponse, SfvbUpsellOffer, SfvbUpsellOffersResponse, SfvbUpsellPath, SfvbUpsellPathDuplicateRequest, SfvbUpsellPathMoveRequest, SfvbUpsellPathsResponse, SfvbValidateRequest, SfvbValidationResponse, SfvbVelocityValidateRequest, SfvbVersionResponse, SfvbWhoamiResponse, SfvbWidgetIdsResponse } from '../models';
14
14
  export interface AddSfvbPageBlogPostsRequest {
15
15
  storefrontOid: number;
16
16
  path: string;
@@ -100,6 +100,11 @@ export interface DeleteSfvbRedirectRequest {
100
100
  redirectId: number;
101
101
  ifMatch: string;
102
102
  }
103
+ export interface DeleteSfvbRedirectsRequest {
104
+ storefrontOid: number;
105
+ redirectDeleteRequest: SfvbRedirectDeleteRequest;
106
+ approvalId?: string;
107
+ }
103
108
  export interface DetachSfvbBlogPostImageRequest {
104
109
  storefrontOid: number;
105
110
  blogPostOid: number;
@@ -122,6 +127,10 @@ export interface DownloadSfvbFileRequest {
122
127
  storefrontOid: number;
123
128
  path?: string;
124
129
  }
130
+ export interface DryRunSfvbRedirectDeleteRequest {
131
+ storefrontOid: number;
132
+ redirectDeleteRequest: SfvbRedirectDeleteRequest;
133
+ }
125
134
  export interface DryRunSfvbRedirectImportRequest {
126
135
  storefrontOid: number;
127
136
  redirectImportRequest: SfvbRedirectImportRequest;
@@ -511,6 +520,7 @@ export interface PutSfvbFileContentRequest {
511
520
  ifMatch: string;
512
521
  fileWriteRequest: SfvbFileWriteRequest;
513
522
  path?: string;
523
+ approvalId?: string;
514
524
  }
515
525
  export interface PutSfvbI18nGlossaryRequest {
516
526
  storefrontOid: number;
@@ -643,6 +653,7 @@ export interface RevertSfvbFileRequest {
643
653
  storefrontOid: number;
644
654
  ifMatch: string;
645
655
  fileRevertRequest: SfvbFileRevertRequest;
656
+ approvalId?: string;
646
657
  }
647
658
  export interface SearchSfvbFilesRequest {
648
659
  storefrontOid: number;
@@ -1039,6 +1050,22 @@ export interface SfvbApiInterface {
1039
1050
  * Delete a redirect rule
1040
1051
  */
1041
1052
  deleteSfvbRedirect(requestParameters: DeleteSfvbRedirectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
1053
+ /**
1054
+ * Deletes exactly the rows of a dry run, given its plan_hash, in one transaction. Every row needs its hash_sha256. A rule changed since its hash was read is skipped and reported as stale, and a missing one as not_found; the other rows still go through. Needs the approval of the person who signed in the CLI, as an approved redirect.delete_batch request for exactly these rows in the Approval-Id header, and sfvb_publish. Deleting rules lets add and import work again once the storefront is back under 5,000 rules.
1055
+ * @summary Delete up to 5,000 redirect rules in one call
1056
+ * @param {number} storefrontOid
1057
+ * @param {SfvbRedirectDeleteRequest} redirectDeleteRequest The request
1058
+ * @param {string} [approvalId] The approval_id of an approved redirect.delete_batch request for exactly these rows. Required. See POST /sfvb/approvals.
1059
+ * @param {*} [options] Override http request option.
1060
+ * @throws {RequiredError}
1061
+ * @memberof SfvbApiInterface
1062
+ */
1063
+ deleteSfvbRedirectsRaw(requestParameters: DeleteSfvbRedirectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbRedirectDeleteResponse>>;
1064
+ /**
1065
+ * Deletes exactly the rows of a dry run, given its plan_hash, in one transaction. Every row needs its hash_sha256. A rule changed since its hash was read is skipped and reported as stale, and a missing one as not_found; the other rows still go through. Needs the approval of the person who signed in the CLI, as an approved redirect.delete_batch request for exactly these rows in the Approval-Id header, and sfvb_publish. Deleting rules lets add and import work again once the storefront is back under 5,000 rules.
1066
+ * Delete up to 5,000 redirect rules in one call
1067
+ */
1068
+ deleteSfvbRedirects(requestParameters: DeleteSfvbRedirectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbRedirectDeleteResponse>;
1042
1069
  /**
1043
1070
  * Name exactly one of default_image, code or blog_post_multimedia_oid. Removes the image from the post and deletes its stored copy. Take it out of the body too, or the body keeps a broken image. A post that is not a draft needs sfvb_publish.
1044
1071
  * @summary Detach an image from a blog post
@@ -1116,6 +1143,21 @@ export interface SfvbApiInterface {
1116
1143
  * Read a storefront file\'s raw bytes
1117
1144
  */
1118
1145
  downloadSfvbFile(requestParameters: DownloadSfvbFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
1146
+ /**
1147
+ * Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
1148
+ * @summary Check a batch delete of redirect rules without writing it
1149
+ * @param {number} storefrontOid
1150
+ * @param {SfvbRedirectDeleteRequest} redirectDeleteRequest The request
1151
+ * @param {*} [options] Override http request option.
1152
+ * @throws {RequiredError}
1153
+ * @memberof SfvbApiInterface
1154
+ */
1155
+ dryRunSfvbRedirectDeleteRaw(requestParameters: DryRunSfvbRedirectDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbRedirectDeleteResponse>>;
1156
+ /**
1157
+ * Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
1158
+ * Check a batch delete of redirect rules without writing it
1159
+ */
1160
+ dryRunSfvbRedirectDelete(requestParameters: DryRunSfvbRedirectDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbRedirectDeleteResponse>;
1119
1161
  /**
1120
1162
  * Checks up to 5,000 rows against the existing rules and each other, and returns the findings per row with a plan_hash. Writes nothing. Rows are merged with the existing rules; nothing is ever deleted.
1121
1163
  * @summary Check a redirect import without writing it
@@ -1992,7 +2034,7 @@ export interface SfvbApiInterface {
1992
2034
  */
1993
2035
  importSfvbRedirects(requestParameters: ImportSfvbRedirectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbRedirectImportResponse>;
1994
2036
  /**
1995
- * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow.
2037
+ * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow. For file.put_script send the script as content, or params.version for a revert. The request starts as reviewing while UltraCart\'s scanner and two AI models read it, then becomes pending with the review attached, or refused. Keep polling, and show approval_url only once it is pending. Only the hash is kept, so the write must send the same bytes.
1996
2038
  * @summary Request a human approval
1997
2039
  * @param {SfvbApprovalCreateRequest} approvalRequest The request
1998
2040
  * @param {number} [storefrontOid] The storefront the action runs on. Required for storefront actions, left out for account-wide ones.
@@ -2002,7 +2044,7 @@ export interface SfvbApiInterface {
2002
2044
  */
2003
2045
  insertSfvbApprovalRaw(requestParameters: InsertSfvbApprovalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbApproval>>;
2004
2046
  /**
2005
- * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow.
2047
+ * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow. For file.put_script send the script as content, or params.version for a revert. The request starts as reviewing while UltraCart\'s scanner and two AI models read it, then becomes pending with the review attached, or refused. Keep polling, and show approval_url only once it is pending. Only the hash is kept, so the write must send the same bytes.
2006
2048
  * Request a human approval
2007
2049
  */
2008
2050
  insertSfvbApproval(requestParameters: InsertSfvbApprovalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbApproval>;
@@ -2438,6 +2480,7 @@ export interface SfvbApiInterface {
2438
2480
  * @param {string} ifMatch Content hash from the last read. Required; 428 when absent, 412 when stale.
2439
2481
  * @param {SfvbFileWriteRequest} fileWriteRequest File content to write
2440
2482
  * @param {string} [path]
2483
+ * @param {string} [approvalId] For a .js or .mjs file, the approval_id of an approved file.put_script request for exactly these bytes. Required for scripts. See POST /sfvb/approvals.
2441
2484
  * @param {*} [options] Override http request option.
2442
2485
  * @throws {RequiredError}
2443
2486
  * @memberof SfvbApiInterface
@@ -2845,6 +2888,7 @@ export interface SfvbApiInterface {
2845
2888
  * @param {number} storefrontOid
2846
2889
  * @param {string} ifMatch Content hash of the file being reverted. Required; 428 when absent, 412 when stale.
2847
2890
  * @param {SfvbFileRevertRequest} fileRevertRequest Version to revert the file to
2891
+ * @param {string} [approvalId] For a .js or .mjs file, the approval_id of an approved file.put_script request naming this version. Required for scripts. See POST /sfvb/approvals.
2848
2892
  * @param {*} [options] Override http request option.
2849
2893
  * @throws {RequiredError}
2850
2894
  * @memberof SfvbApiInterface
@@ -3338,6 +3382,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
3338
3382
  * Delete a redirect rule
3339
3383
  */
3340
3384
  deleteSfvbRedirect(requestParameters: DeleteSfvbRedirectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
3385
+ /**
3386
+ * Deletes exactly the rows of a dry run, given its plan_hash, in one transaction. Every row needs its hash_sha256. A rule changed since its hash was read is skipped and reported as stale, and a missing one as not_found; the other rows still go through. Needs the approval of the person who signed in the CLI, as an approved redirect.delete_batch request for exactly these rows in the Approval-Id header, and sfvb_publish. Deleting rules lets add and import work again once the storefront is back under 5,000 rules.
3387
+ * Delete up to 5,000 redirect rules in one call
3388
+ */
3389
+ deleteSfvbRedirectsRaw(requestParameters: DeleteSfvbRedirectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbRedirectDeleteResponse>>;
3390
+ /**
3391
+ * Deletes exactly the rows of a dry run, given its plan_hash, in one transaction. Every row needs its hash_sha256. A rule changed since its hash was read is skipped and reported as stale, and a missing one as not_found; the other rows still go through. Needs the approval of the person who signed in the CLI, as an approved redirect.delete_batch request for exactly these rows in the Approval-Id header, and sfvb_publish. Deleting rules lets add and import work again once the storefront is back under 5,000 rules.
3392
+ * Delete up to 5,000 redirect rules in one call
3393
+ */
3394
+ deleteSfvbRedirects(requestParameters: DeleteSfvbRedirectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbRedirectDeleteResponse>;
3341
3395
  /**
3342
3396
  * Name exactly one of default_image, code or blog_post_multimedia_oid. Removes the image from the post and deletes its stored copy. Take it out of the body too, or the body keeps a broken image. A post that is not a draft needs sfvb_publish.
3343
3397
  * Detach an image from a blog post
@@ -3388,6 +3442,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
3388
3442
  * Read a storefront file\'s raw bytes
3389
3443
  */
3390
3444
  downloadSfvbFile(requestParameters: DownloadSfvbFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
3445
+ /**
3446
+ * Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
3447
+ * Check a batch delete of redirect rules without writing it
3448
+ */
3449
+ dryRunSfvbRedirectDeleteRaw(requestParameters: DryRunSfvbRedirectDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbRedirectDeleteResponse>>;
3450
+ /**
3451
+ * Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
3452
+ * Check a batch delete of redirect rules without writing it
3453
+ */
3454
+ dryRunSfvbRedirectDelete(requestParameters: DryRunSfvbRedirectDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbRedirectDeleteResponse>;
3391
3455
  /**
3392
3456
  * Checks up to 5,000 rows against the existing rules and each other, and returns the findings per row with a plan_hash. Writes nothing. Rows are merged with the existing rules; nothing is ever deleted.
3393
3457
  * Check a redirect import without writing it
@@ -3955,12 +4019,12 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
3955
4019
  */
3956
4020
  importSfvbRedirects(requestParameters: ImportSfvbRedirectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbRedirectImportResponse>;
3957
4021
  /**
3958
- * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow.
4022
+ * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow. For file.put_script send the script as content, or params.version for a revert. The request starts as reviewing while UltraCart\'s scanner and two AI models read it, then becomes pending with the review attached, or refused. Keep polling, and show approval_url only once it is pending. Only the hash is kept, so the write must send the same bytes.
3959
4023
  * Request a human approval
3960
4024
  */
3961
4025
  insertSfvbApprovalRaw(requestParameters: InsertSfvbApprovalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbApproval>>;
3962
4026
  /**
3963
- * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow.
4027
+ * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow. For file.put_script send the script as content, or params.version for a revert. The request starts as reviewing while UltraCart\'s scanner and two AI models read it, then becomes pending with the review attached, or refused. Keep polling, and show approval_url only once it is pending. Only the hash is kept, so the write must send the same bytes.
3964
4028
  * Request a human approval
3965
4029
  */
3966
4030
  insertSfvbApproval(requestParameters: InsertSfvbApprovalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbApproval>;
@@ -1317,6 +1317,73 @@ var SfvbApi = /** @class */ (function (_super) {
1317
1317
  });
1318
1318
  });
1319
1319
  };
1320
+ /**
1321
+ * Deletes exactly the rows of a dry run, given its plan_hash, in one transaction. Every row needs its hash_sha256. A rule changed since its hash was read is skipped and reported as stale, and a missing one as not_found; the other rows still go through. Needs the approval of the person who signed in the CLI, as an approved redirect.delete_batch request for exactly these rows in the Approval-Id header, and sfvb_publish. Deleting rules lets add and import work again once the storefront is back under 5,000 rules.
1322
+ * Delete up to 5,000 redirect rules in one call
1323
+ */
1324
+ SfvbApi.prototype.deleteSfvbRedirectsRaw = function (requestParameters, initOverrides) {
1325
+ return __awaiter(this, void 0, void 0, function () {
1326
+ var queryParameters, headerParameters, _a, _b, response;
1327
+ return __generator(this, function (_c) {
1328
+ switch (_c.label) {
1329
+ case 0:
1330
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
1331
+ throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling deleteSfvbRedirects.');
1332
+ }
1333
+ if (requestParameters.redirectDeleteRequest === null || requestParameters.redirectDeleteRequest === undefined) {
1334
+ throw new runtime.RequiredError('redirectDeleteRequest', 'Required parameter requestParameters.redirectDeleteRequest was null or undefined when calling deleteSfvbRedirects.');
1335
+ }
1336
+ queryParameters = {};
1337
+ headerParameters = {};
1338
+ headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
1339
+ if (requestParameters.approvalId !== undefined && requestParameters.approvalId !== null) {
1340
+ headerParameters['Approval-Id'] = String(requestParameters.approvalId);
1341
+ }
1342
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1343
+ // oauth required
1344
+ _a = headerParameters;
1345
+ _b = "Authorization";
1346
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
1347
+ case 1:
1348
+ // oauth required
1349
+ _a[_b] = _c.sent();
1350
+ _c.label = 2;
1351
+ case 2:
1352
+ if (this.configuration && this.configuration.apiKey) {
1353
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1354
+ }
1355
+ return [4 /*yield*/, this.request({
1356
+ path: "/sfvb/storefronts/{storefront_oid}/redirects/delete".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
1357
+ method: 'POST',
1358
+ headers: headerParameters,
1359
+ query: queryParameters,
1360
+ body: (0, models_1.SfvbRedirectDeleteRequestToJSON)(requestParameters.redirectDeleteRequest),
1361
+ }, initOverrides)];
1362
+ case 3:
1363
+ response = _c.sent();
1364
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbRedirectDeleteResponseFromJSON)(jsonValue); })];
1365
+ }
1366
+ });
1367
+ });
1368
+ };
1369
+ /**
1370
+ * Deletes exactly the rows of a dry run, given its plan_hash, in one transaction. Every row needs its hash_sha256. A rule changed since its hash was read is skipped and reported as stale, and a missing one as not_found; the other rows still go through. Needs the approval of the person who signed in the CLI, as an approved redirect.delete_batch request for exactly these rows in the Approval-Id header, and sfvb_publish. Deleting rules lets add and import work again once the storefront is back under 5,000 rules.
1371
+ * Delete up to 5,000 redirect rules in one call
1372
+ */
1373
+ SfvbApi.prototype.deleteSfvbRedirects = function (requestParameters, initOverrides) {
1374
+ return __awaiter(this, void 0, void 0, function () {
1375
+ var response;
1376
+ return __generator(this, function (_a) {
1377
+ switch (_a.label) {
1378
+ case 0: return [4 /*yield*/, this.deleteSfvbRedirectsRaw(requestParameters, initOverrides)];
1379
+ case 1:
1380
+ response = _a.sent();
1381
+ return [4 /*yield*/, response.value()];
1382
+ case 2: return [2 /*return*/, _a.sent()];
1383
+ }
1384
+ });
1385
+ });
1386
+ };
1320
1387
  /**
1321
1388
  * Name exactly one of default_image, code or blog_post_multimedia_oid. Removes the image from the post and deletes its stored copy. Take it out of the body too, or the body keeps a broken image. A post that is not a draft needs sfvb_publish.
1322
1389
  * Detach an image from a blog post
@@ -1636,6 +1703,70 @@ var SfvbApi = /** @class */ (function (_super) {
1636
1703
  });
1637
1704
  });
1638
1705
  };
1706
+ /**
1707
+ * Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
1708
+ * Check a batch delete of redirect rules without writing it
1709
+ */
1710
+ SfvbApi.prototype.dryRunSfvbRedirectDeleteRaw = function (requestParameters, initOverrides) {
1711
+ return __awaiter(this, void 0, void 0, function () {
1712
+ var queryParameters, headerParameters, _a, _b, response;
1713
+ return __generator(this, function (_c) {
1714
+ switch (_c.label) {
1715
+ case 0:
1716
+ if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
1717
+ throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling dryRunSfvbRedirectDelete.');
1718
+ }
1719
+ if (requestParameters.redirectDeleteRequest === null || requestParameters.redirectDeleteRequest === undefined) {
1720
+ throw new runtime.RequiredError('redirectDeleteRequest', 'Required parameter requestParameters.redirectDeleteRequest was null or undefined when calling dryRunSfvbRedirectDelete.');
1721
+ }
1722
+ queryParameters = {};
1723
+ headerParameters = {};
1724
+ headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
1725
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1726
+ // oauth required
1727
+ _a = headerParameters;
1728
+ _b = "Authorization";
1729
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
1730
+ case 1:
1731
+ // oauth required
1732
+ _a[_b] = _c.sent();
1733
+ _c.label = 2;
1734
+ case 2:
1735
+ if (this.configuration && this.configuration.apiKey) {
1736
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1737
+ }
1738
+ return [4 /*yield*/, this.request({
1739
+ path: "/sfvb/storefronts/{storefront_oid}/redirects/delete/dry_run".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
1740
+ method: 'POST',
1741
+ headers: headerParameters,
1742
+ query: queryParameters,
1743
+ body: (0, models_1.SfvbRedirectDeleteRequestToJSON)(requestParameters.redirectDeleteRequest),
1744
+ }, initOverrides)];
1745
+ case 3:
1746
+ response = _c.sent();
1747
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbRedirectDeleteResponseFromJSON)(jsonValue); })];
1748
+ }
1749
+ });
1750
+ });
1751
+ };
1752
+ /**
1753
+ * Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
1754
+ * Check a batch delete of redirect rules without writing it
1755
+ */
1756
+ SfvbApi.prototype.dryRunSfvbRedirectDelete = function (requestParameters, initOverrides) {
1757
+ return __awaiter(this, void 0, void 0, function () {
1758
+ var response;
1759
+ return __generator(this, function (_a) {
1760
+ switch (_a.label) {
1761
+ case 0: return [4 /*yield*/, this.dryRunSfvbRedirectDeleteRaw(requestParameters, initOverrides)];
1762
+ case 1:
1763
+ response = _a.sent();
1764
+ return [4 /*yield*/, response.value()];
1765
+ case 2: return [2 /*return*/, _a.sent()];
1766
+ }
1767
+ });
1768
+ });
1769
+ };
1639
1770
  /**
1640
1771
  * Checks up to 5,000 rows against the existing rules and each other, and returns the findings per row with a plan_hash. Writes nothing. Rows are merged with the existing rules; nothing is ever deleted.
1641
1772
  * Check a redirect import without writing it
@@ -5256,7 +5387,7 @@ var SfvbApi = /** @class */ (function (_super) {
5256
5387
  });
5257
5388
  };
5258
5389
  /**
5259
- * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow.
5390
+ * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow. For file.put_script send the script as content, or params.version for a revert. The request starts as reviewing while UltraCart\'s scanner and two AI models read it, then becomes pending with the review attached, or refused. Keep polling, and show approval_url only once it is pending. Only the hash is kept, so the write must send the same bytes.
5260
5391
  * Request a human approval
5261
5392
  */
5262
5393
  SfvbApi.prototype.insertSfvbApprovalRaw = function (requestParameters, initOverrides) {
@@ -5302,7 +5433,7 @@ var SfvbApi = /** @class */ (function (_super) {
5302
5433
  });
5303
5434
  };
5304
5435
  /**
5305
- * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow.
5436
+ * Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow. For file.put_script send the script as content, or params.version for a revert. The request starts as reviewing while UltraCart\'s scanner and two AI models read it, then becomes pending with the review attached, or refused. Keep polling, and show approval_url only once it is pending. Only the hash is kept, so the write must send the same bytes.
5306
5437
  * Request a human approval
5307
5438
  */
5308
5439
  SfvbApi.prototype.insertSfvbApproval = function (requestParameters, initOverrides) {
@@ -7088,6 +7219,9 @@ var SfvbApi = /** @class */ (function (_super) {
7088
7219
  if (requestParameters.ifMatch !== undefined && requestParameters.ifMatch !== null) {
7089
7220
  headerParameters['If-Match'] = String(requestParameters.ifMatch);
7090
7221
  }
7222
+ if (requestParameters.approvalId !== undefined && requestParameters.approvalId !== null) {
7223
+ headerParameters['Approval-Id'] = String(requestParameters.approvalId);
7224
+ }
7091
7225
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
7092
7226
  // oauth required
7093
7227
  _a = headerParameters;
@@ -8809,6 +8943,9 @@ var SfvbApi = /** @class */ (function (_super) {
8809
8943
  if (requestParameters.ifMatch !== undefined && requestParameters.ifMatch !== null) {
8810
8944
  headerParameters['If-Match'] = String(requestParameters.ifMatch);
8811
8945
  }
8946
+ if (requestParameters.approvalId !== undefined && requestParameters.approvalId !== null) {
8947
+ headerParameters['Approval-Id'] = String(requestParameters.approvalId);
8948
+ }
8812
8949
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
8813
8950
  // oauth required
8814
8951
  _a = headerParameters;
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { SfvbApprovalParams } from './SfvbApprovalParams';
13
+ import { SfvbApprovalReview } from './SfvbApprovalReview';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -100,6 +101,12 @@ export interface SfvbApproval {
100
101
  * @memberof SfvbApproval
101
102
  */
102
103
  reason?: string;
104
+ /**
105
+ *
106
+ * @type {SfvbApprovalReview}
107
+ * @memberof SfvbApproval
108
+ */
109
+ review?: SfvbApprovalReview;
103
110
  /**
104
111
  * Where the action applies. The storefront host name, or account for account-wide actions.
105
112
  * @type {string}
@@ -107,7 +114,7 @@ export interface SfvbApproval {
107
114
  */
108
115
  scope?: string;
109
116
  /**
110
- * pending, approved, denied, cancelled, expired or used. Only approved may be sent with the gated call.
117
+ * reviewing, pending, approved, denied, cancelled, expired, used or refused. Only approved may be sent with the gated call. A script write starts as reviewing while UltraCart reviews it; keep polling, and show approval_url only once it is pending. refused means the review refused the script; outcome_code and review say why.
111
118
  * @type {string}
112
119
  * @memberof SfvbApproval
113
120
  */
@@ -143,12 +150,14 @@ export type SfvbApprovalOutcomeEnum = typeof SfvbApprovalOutcomeEnum[keyof typeo
143
150
  * @export
144
151
  */
145
152
  export declare const SfvbApprovalStatusEnum: {
153
+ readonly Reviewing: "reviewing";
146
154
  readonly Pending: "pending";
147
155
  readonly Approved: "approved";
148
156
  readonly Denied: "denied";
149
157
  readonly Cancelled: "cancelled";
150
158
  readonly Expired: "expired";
151
159
  readonly Used: "used";
160
+ readonly Refused: "refused";
152
161
  };
153
162
  export type SfvbApprovalStatusEnum = typeof SfvbApprovalStatusEnum[keyof typeof SfvbApprovalStatusEnum];
154
163
  /**
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SfvbApprovalToJSON = exports.SfvbApprovalFromJSONTyped = exports.SfvbApprovalFromJSON = exports.instanceOfSfvbApproval = exports.SfvbApprovalStatusEnum = exports.SfvbApprovalOutcomeEnum = void 0;
17
17
  var runtime_1 = require("../runtime");
18
18
  var SfvbApprovalParams_1 = require("./SfvbApprovalParams");
19
+ var SfvbApprovalReview_1 = require("./SfvbApprovalReview");
19
20
  /**
20
21
  * @export
21
22
  */
@@ -27,12 +28,14 @@ exports.SfvbApprovalOutcomeEnum = {
27
28
  * @export
28
29
  */
29
30
  exports.SfvbApprovalStatusEnum = {
31
+ Reviewing: 'reviewing',
30
32
  Pending: 'pending',
31
33
  Approved: 'approved',
32
34
  Denied: 'denied',
33
35
  Cancelled: 'cancelled',
34
36
  Expired: 'expired',
35
- Used: 'used'
37
+ Used: 'used',
38
+ Refused: 'refused'
36
39
  };
37
40
  /**
38
41
  * Check if a given object implements the SfvbApproval interface.
@@ -65,6 +68,7 @@ function SfvbApprovalFromJSONTyped(json, ignoreDiscriminator) {
65
68
  'outcome_http_status': !(0, runtime_1.exists)(json, 'outcome_http_status') ? undefined : json['outcome_http_status'],
66
69
  'params': !(0, runtime_1.exists)(json, 'params') ? undefined : (0, SfvbApprovalParams_1.SfvbApprovalParamsFromJSON)(json['params']),
67
70
  'reason': !(0, runtime_1.exists)(json, 'reason') ? undefined : json['reason'],
71
+ 'review': !(0, runtime_1.exists)(json, 'review') ? undefined : (0, SfvbApprovalReview_1.SfvbApprovalReviewFromJSON)(json['review']),
68
72
  'scope': !(0, runtime_1.exists)(json, 'scope') ? undefined : json['scope'],
69
73
  'status': !(0, runtime_1.exists)(json, 'status') ? undefined : json['status'],
70
74
  'storefront_oid': !(0, runtime_1.exists)(json, 'storefront_oid') ? undefined : json['storefront_oid'],
@@ -95,6 +99,7 @@ function SfvbApprovalToJSON(value) {
95
99
  'outcome_http_status': value.outcome_http_status,
96
100
  'params': (0, SfvbApprovalParams_1.SfvbApprovalParamsToJSON)(value.params),
97
101
  'reason': value.reason,
102
+ 'review': (0, SfvbApprovalReview_1.SfvbApprovalReviewToJSON)(value.review),
98
103
  'scope': value.scope,
99
104
  'status': value.status,
100
105
  'storefront_oid': value.storefront_oid,
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { SfvbApprovalParams } from './SfvbApprovalParams';
13
+ import { SfvbRedirectDeleteRow } from './SfvbRedirectDeleteRow';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -22,6 +23,12 @@ export interface SfvbApprovalCreateRequest {
22
23
  * @memberof SfvbApprovalCreateRequest
23
24
  */
24
25
  action?: SfvbApprovalCreateRequestActionEnum;
26
+ /**
27
+ * For a file.put_script write, the exact script to be written, at most 256 KB. UltraCart reviews it and keeps only its hash, so send the same bytes again on the write. Leave it out for a revert, which names params.version.
28
+ * @type {string}
29
+ * @memberof SfvbApprovalCreateRequest
30
+ */
31
+ content?: string;
25
32
  /**
26
33
  *
27
34
  * @type {SfvbApprovalParams}
@@ -34,6 +41,12 @@ export interface SfvbApprovalCreateRequest {
34
41
  * @memberof SfvbApprovalCreateRequest
35
42
  */
36
43
  reason?: string;
44
+ /**
45
+ * For redirect.delete_batch, exactly the rows the batch delete will send, up to 5,000, each with its hash_sha256. UltraCart keeps only their hash.
46
+ * @type {Array<SfvbRedirectDeleteRow>}
47
+ * @memberof SfvbApprovalCreateRequest
48
+ */
49
+ redirect_rows?: Array<SfvbRedirectDeleteRow>;
37
50
  }
38
51
  /**
39
52
  * @export
@@ -41,6 +54,8 @@ export interface SfvbApprovalCreateRequest {
41
54
  export declare const SfvbApprovalCreateRequestActionEnum: {
42
55
  readonly FileDelete: "file.delete";
43
56
  readonly BlogPostDelete: "blog_post.delete";
57
+ readonly FilePutScript: "file.put_script";
58
+ readonly RedirectDeleteBatch: "redirect.delete_batch";
44
59
  };
45
60
  export type SfvbApprovalCreateRequestActionEnum = typeof SfvbApprovalCreateRequestActionEnum[keyof typeof SfvbApprovalCreateRequestActionEnum];
46
61
  /**
@@ -16,12 +16,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SfvbApprovalCreateRequestToJSON = exports.SfvbApprovalCreateRequestFromJSONTyped = exports.SfvbApprovalCreateRequestFromJSON = exports.instanceOfSfvbApprovalCreateRequest = exports.SfvbApprovalCreateRequestActionEnum = void 0;
17
17
  var runtime_1 = require("../runtime");
18
18
  var SfvbApprovalParams_1 = require("./SfvbApprovalParams");
19
+ var SfvbRedirectDeleteRow_1 = require("./SfvbRedirectDeleteRow");
19
20
  /**
20
21
  * @export
21
22
  */
22
23
  exports.SfvbApprovalCreateRequestActionEnum = {
23
24
  FileDelete: 'file.delete',
24
- BlogPostDelete: 'blog_post.delete'
25
+ BlogPostDelete: 'blog_post.delete',
26
+ FilePutScript: 'file.put_script',
27
+ RedirectDeleteBatch: 'redirect.delete_batch'
25
28
  };
26
29
  /**
27
30
  * Check if a given object implements the SfvbApprovalCreateRequest interface.
@@ -41,8 +44,10 @@ function SfvbApprovalCreateRequestFromJSONTyped(json, ignoreDiscriminator) {
41
44
  }
42
45
  return {
43
46
  'action': !(0, runtime_1.exists)(json, 'action') ? undefined : json['action'],
47
+ 'content': !(0, runtime_1.exists)(json, 'content') ? undefined : json['content'],
44
48
  'params': !(0, runtime_1.exists)(json, 'params') ? undefined : (0, SfvbApprovalParams_1.SfvbApprovalParamsFromJSON)(json['params']),
45
49
  'reason': !(0, runtime_1.exists)(json, 'reason') ? undefined : json['reason'],
50
+ 'redirect_rows': !(0, runtime_1.exists)(json, 'redirect_rows') ? undefined : (json['redirect_rows'].map(SfvbRedirectDeleteRow_1.SfvbRedirectDeleteRowFromJSON)),
46
51
  };
47
52
  }
48
53
  exports.SfvbApprovalCreateRequestFromJSONTyped = SfvbApprovalCreateRequestFromJSONTyped;
@@ -55,8 +60,10 @@ function SfvbApprovalCreateRequestToJSON(value) {
55
60
  }
56
61
  return {
57
62
  'action': value.action,
63
+ 'content': value.content,
58
64
  'params': (0, SfvbApprovalParams_1.SfvbApprovalParamsToJSON)(value.params),
59
65
  'reason': value.reason,
66
+ 'redirect_rows': value.redirect_rows === undefined ? undefined : (value.redirect_rows.map(SfvbRedirectDeleteRow_1.SfvbRedirectDeleteRowToJSON)),
60
67
  };
61
68
  }
62
69
  exports.SfvbApprovalCreateRequestToJSON = SfvbApprovalCreateRequestToJSON;
@@ -22,11 +22,35 @@ export interface SfvbApprovalParams {
22
22
  */
23
23
  blog_post_oid?: number;
24
24
  /**
25
- * The file path, for file.delete. Exactly as the delete call will send it.
25
+ * For file.put_script, the SHA-256 of the exact bytes approved. Set by the server, never by the caller. The write must send bytes with this hash.
26
+ * @type {string}
27
+ * @memberof SfvbApprovalParams
28
+ */
29
+ content_sha256?: string;
30
+ /**
31
+ * The file path, for file.delete and file.put_script. Exactly as the gated call will send it.
26
32
  * @type {string}
27
33
  * @memberof SfvbApprovalParams
28
34
  */
29
35
  path?: string;
36
+ /**
37
+ * For redirect.delete_batch, the plan_hash of the exact rows approved. Set by the server. The batch delete must send rows with this hash.
38
+ * @type {string}
39
+ * @memberof SfvbApprovalParams
40
+ */
41
+ rows_sha256?: string;
42
+ /**
43
+ * For redirect.delete_batch, how many rules the batch would delete when it was requested. Set by the server.
44
+ * @type {number}
45
+ * @memberof SfvbApprovalParams
46
+ */
47
+ rule_count?: number;
48
+ /**
49
+ * For file.put_script, the history version a revert restores. Leave it out, and send content instead, for a write.
50
+ * @type {number}
51
+ * @memberof SfvbApprovalParams
52
+ */
53
+ version?: number;
30
54
  }
31
55
  /**
32
56
  * Check if a given object implements the SfvbApprovalParams interface.