ultracart_rest_api_v2_typescript 4.1.201 → 4.1.202
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 +1 -0
- package/README.md +3 -2
- package/dist/apis/OauthApi.d.ts +1 -1
- package/dist/apis/SfvbApi.d.ts +34 -1
- package/dist/apis/SfvbApi.js +70 -0
- package/dist/models/SfvbItemMultimedia.d.ts +34 -1
- package/dist/models/SfvbItemMultimedia.js +17 -1
- package/dist/models/SfvbItemMultimediaDescriptionRequest.d.ts +55 -0
- package/dist/models/SfvbItemMultimediaDescriptionRequest.js +58 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/OauthApi.ts +1 -1
- package/src/apis/SfvbApi.ts +85 -0
- package/src/models/SfvbItemMultimedia.ts +43 -1
- package/src/models/SfvbItemMultimediaDescriptionRequest.ts +99 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -1065,6 +1065,7 @@ src/models/SfvbItemContainer.ts
|
|
|
1065
1065
|
src/models/SfvbItemContainersResponse.ts
|
|
1066
1066
|
src/models/SfvbItemContentRequest.ts
|
|
1067
1067
|
src/models/SfvbItemMultimedia.ts
|
|
1068
|
+
src/models/SfvbItemMultimediaDescriptionRequest.ts
|
|
1068
1069
|
src/models/SfvbItemMultimediaRequest.ts
|
|
1069
1070
|
src/models/SfvbItemPricing.ts
|
|
1070
1071
|
src/models/SfvbItemPricingRequest.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.202
|
|
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.202 --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.202 | 10/13/2026 | sfvb internal testing |
|
|
87
88
|
| 4.1.201 | 10/12/2026 | sfvb internal testing |
|
|
88
89
|
| 4.1.200 | 10/09/2026 | sfvb internal testing |
|
|
89
90
|
| 4.1.199 | 10/08/2026 | sfvb internal testing |
|
package/dist/apis/OauthApi.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export interface OauthApiInterface {
|
|
|
85
85
|
* Revokes the OAuth application associated with the specified client_id and token.
|
|
86
86
|
* @summary Revoke this OAuth application.
|
|
87
87
|
* @param {string} clientId The OAuth application client_id.
|
|
88
|
-
* @param {string} token The OAuth access token that is to be revoked
|
|
88
|
+
* @param {string} token The OAuth access token or refresh token that is to be revoked.
|
|
89
89
|
* @param {*} [options] Override http request option.
|
|
90
90
|
* @throws {RequiredError}
|
|
91
91
|
* @memberof OauthApiInterface
|
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, SfvbCompileRequest, SfvbCompileResponse, SfvbContainerResponse, SfvbContainerRevertRequest, SfvbContainerVersion, SfvbContainerVersionsResponse, SfvbContainerWriteRequest, SfvbElementSchemaResponse, SfvbElementsResponse, SfvbEventsAuthRequest, SfvbEventsAuthResponse, SfvbEventsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbI18nGlossary, SfvbI18nGlossaryRequest, SfvbI18nLanguageEnableRequest, SfvbI18nLanguagesResponse, SfvbI18nMachineTranslationsResponse, SfvbI18nMessage, SfvbI18nMessageWriteRequest, SfvbI18nMessagesResponse, SfvbI18nResetResponse, SfvbItemAttributeBatchRequest, SfvbItemAttributeBatchResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, 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, 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, SfvbEventsAuthRequest, SfvbEventsAuthResponse, SfvbEventsResponse, SfvbExperiment, SfvbExperimentEndRequest, SfvbExperimentObjectivesResponse, SfvbExperimentStartRequest, SfvbExperimentVariationUpdateRequest, SfvbExperimentsResponse, SfvbFileContentResponse, SfvbFileRevertRequest, SfvbFileSearchRequest, SfvbFileSearchResponse, SfvbFileUploadRequest, SfvbFileUploadUrlResponse, SfvbFileVersionsResponse, SfvbFileWriteRequest, SfvbFileWriteResponse, SfvbFilesResponse, SfvbI18nGlossary, SfvbI18nGlossaryRequest, SfvbI18nLanguageEnableRequest, SfvbI18nLanguagesResponse, SfvbI18nMachineTranslationsResponse, SfvbI18nMessage, SfvbI18nMessageWriteRequest, SfvbI18nMessagesResponse, SfvbI18nResetResponse, SfvbItemAttributeBatchRequest, SfvbItemAttributeBatchResponse, SfvbItemAttributeUpdateRequest, SfvbItemContainersResponse, SfvbItemContentRequest, SfvbItemMultimediaDescriptionRequest, SfvbItemMultimediaRequest, SfvbItemPricing, SfvbItemPricingRequest, SfvbItemRelated, SfvbItemRelatedRequest, SfvbItemResponse, SfvbItemSeoRequest, SfvbLibraryDeleteResult, SfvbLibraryEntry, SfvbLibraryEntryRequest, SfvbLibraryHistoryResponse, SfvbLibraryInstallReceipt, SfvbLibraryInstallRequest, SfvbLibraryInstallsResponse, SfvbLibraryPublishRequest, SfvbLibraryResponse, SfvbLibraryScreenshotRequest, SfvbLibraryShareRequest, SfvbLibraryShareTargetsResponse, SfvbLibraryTaxonomyCatalog, SfvbLibraryUnshareResult, SfvbMenu, SfvbMenuWriteRequest, SfvbMenusResponse, SfvbNotFoundEntry, SfvbNotFoundEntryResponse, SfvbNotFoundPage, SfvbNotFoundResponse, SfvbPageAttributeUpdateRequest, SfvbPageBlogPostsRequest, SfvbPageBlogPostsResponse, SfvbPageCreateRequest, SfvbPageDuplicateRequest, SfvbPageItemsAddRequest, SfvbPageItemsRemoveRequest, SfvbPageItemsResponse, SfvbPageListResponse, SfvbPageMultimediaRequest, SfvbPageRefreshRequest, SfvbPageRefreshResponse, SfvbPageResponse, SfvbPageSelectors, SfvbPageSettingsRequest, SfvbPreviewAccessRequest, SfvbPreviewAccessResponse, SfvbPreviewSessionRequest, SfvbPreviewSessionResponse, SfvbPreviewUrlResponse, SfvbRecordingEventsResponse, SfvbRecordingResponse, SfvbRecordingSettingsRequest, SfvbRecordingSettingsResponse, SfvbRedirect, SfvbRedirectCheckResponse, SfvbRedirectDeleteRequest, SfvbRedirectDeleteResponse, SfvbRedirectImportRequest, SfvbRedirectImportResponse, SfvbRedirectRequest, SfvbRedirectResolveResponse, SfvbRedirectResponse, SfvbRedirectsResponse, SfvbRenderRequest, SfvbRenderResponse, 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;
|
|
@@ -586,6 +586,12 @@ export interface PutSfvbItemMultimediaRequest {
|
|
|
586
586
|
merchantItemId?: string;
|
|
587
587
|
merchantItemOid?: number;
|
|
588
588
|
}
|
|
589
|
+
export interface PutSfvbItemMultimediaDescriptionRequest {
|
|
590
|
+
storefrontOid: number;
|
|
591
|
+
itemMultimediaDescriptionRequest: SfvbItemMultimediaDescriptionRequest;
|
|
592
|
+
merchantItemId?: string;
|
|
593
|
+
merchantItemOid?: number;
|
|
594
|
+
}
|
|
589
595
|
export interface PutSfvbItemPricingRequest {
|
|
590
596
|
storefrontOid: number;
|
|
591
597
|
ifMatch: string;
|
|
@@ -2742,6 +2748,23 @@ export interface SfvbApiInterface {
|
|
|
2742
2748
|
* Attach an image to an item
|
|
2743
2749
|
*/
|
|
2744
2750
|
putSfvbItemMultimedia(requestParameters: PutSfvbItemMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemResponse>;
|
|
2751
|
+
/**
|
|
2752
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
2753
|
+
* @summary Change an item image\'s description
|
|
2754
|
+
* @param {number} storefrontOid
|
|
2755
|
+
* @param {SfvbItemMultimediaDescriptionRequest} itemMultimediaDescriptionRequest The image and its new description
|
|
2756
|
+
* @param {string} [merchantItemId]
|
|
2757
|
+
* @param {number} [merchantItemOid]
|
|
2758
|
+
* @param {*} [options] Override http request option.
|
|
2759
|
+
* @throws {RequiredError}
|
|
2760
|
+
* @memberof SfvbApiInterface
|
|
2761
|
+
*/
|
|
2762
|
+
putSfvbItemMultimediaDescriptionRaw(requestParameters: PutSfvbItemMultimediaDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbItemResponse>>;
|
|
2763
|
+
/**
|
|
2764
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
2765
|
+
* Change an item image\'s description
|
|
2766
|
+
*/
|
|
2767
|
+
putSfvbItemMultimediaDescription(requestParameters: PutSfvbItemMultimediaDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemResponse>;
|
|
2745
2768
|
/**
|
|
2746
2769
|
* Partial - a field left out is untouched. A sale needs sale_cost, sale_start and sale_end together, the end after the start; clear_sale removes it. msrp must be more than 0 (0 only when the price is 0); clear_msrp removes it. volume_discounts replaces the retail quantity breaks. Shoppers pay the new price at once, so this needs sfvb_publish, If-Match with the pricing hash_sha256, and the approval of the person who signed in the CLI - an approved item.pricing request for this item and exactly this change. A change that sets every field to what it already is returns the pricing unchanged and uses no approval.
|
|
2747
2770
|
* @summary Change what an item charges
|
|
@@ -4636,6 +4659,16 @@ export declare class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface
|
|
|
4636
4659
|
* Attach an image to an item
|
|
4637
4660
|
*/
|
|
4638
4661
|
putSfvbItemMultimedia(requestParameters: PutSfvbItemMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemResponse>;
|
|
4662
|
+
/**
|
|
4663
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
4664
|
+
* Change an item image\'s description
|
|
4665
|
+
*/
|
|
4666
|
+
putSfvbItemMultimediaDescriptionRaw(requestParameters: PutSfvbItemMultimediaDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbItemResponse>>;
|
|
4667
|
+
/**
|
|
4668
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
4669
|
+
* Change an item image\'s description
|
|
4670
|
+
*/
|
|
4671
|
+
putSfvbItemMultimediaDescription(requestParameters: PutSfvbItemMultimediaDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemResponse>;
|
|
4639
4672
|
/**
|
|
4640
4673
|
* Partial - a field left out is untouched. A sale needs sale_cost, sale_start and sale_end together, the end after the start; clear_sale removes it. msrp must be more than 0 (0 only when the price is 0); clear_msrp removes it. volume_discounts replaces the retail quantity breaks. Shoppers pay the new price at once, so this needs sfvb_publish, If-Match with the pricing hash_sha256, and the approval of the person who signed in the CLI - an approved item.pricing request for this item and exactly this change. A change that sets every field to what it already is returns the pricing unchanged and uses no approval.
|
|
4641
4674
|
* Change what an item charges
|
package/dist/apis/SfvbApi.js
CHANGED
|
@@ -8075,6 +8075,76 @@ var SfvbApi = /** @class */ (function (_super) {
|
|
|
8075
8075
|
});
|
|
8076
8076
|
});
|
|
8077
8077
|
};
|
|
8078
|
+
/**
|
|
8079
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
8080
|
+
* Change an item image\'s description
|
|
8081
|
+
*/
|
|
8082
|
+
SfvbApi.prototype.putSfvbItemMultimediaDescriptionRaw = function (requestParameters, initOverrides) {
|
|
8083
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8084
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
8085
|
+
return __generator(this, function (_c) {
|
|
8086
|
+
switch (_c.label) {
|
|
8087
|
+
case 0:
|
|
8088
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
8089
|
+
throw new runtime.RequiredError('storefrontOid', 'Required parameter requestParameters.storefrontOid was null or undefined when calling putSfvbItemMultimediaDescription.');
|
|
8090
|
+
}
|
|
8091
|
+
if (requestParameters.itemMultimediaDescriptionRequest === null || requestParameters.itemMultimediaDescriptionRequest === undefined) {
|
|
8092
|
+
throw new runtime.RequiredError('itemMultimediaDescriptionRequest', 'Required parameter requestParameters.itemMultimediaDescriptionRequest was null or undefined when calling putSfvbItemMultimediaDescription.');
|
|
8093
|
+
}
|
|
8094
|
+
queryParameters = {};
|
|
8095
|
+
if (requestParameters.merchantItemId !== undefined) {
|
|
8096
|
+
queryParameters['merchant_item_id'] = requestParameters.merchantItemId;
|
|
8097
|
+
}
|
|
8098
|
+
if (requestParameters.merchantItemOid !== undefined) {
|
|
8099
|
+
queryParameters['merchant_item_oid'] = requestParameters.merchantItemOid;
|
|
8100
|
+
}
|
|
8101
|
+
headerParameters = {};
|
|
8102
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
8103
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
8104
|
+
// oauth required
|
|
8105
|
+
_a = headerParameters;
|
|
8106
|
+
_b = "Authorization";
|
|
8107
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", [])];
|
|
8108
|
+
case 1:
|
|
8109
|
+
// oauth required
|
|
8110
|
+
_a[_b] = _c.sent();
|
|
8111
|
+
_c.label = 2;
|
|
8112
|
+
case 2:
|
|
8113
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
8114
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
8115
|
+
}
|
|
8116
|
+
return [4 /*yield*/, this.request({
|
|
8117
|
+
path: "/sfvb/storefronts/{storefront_oid}/items/multimedia/description".replace("{".concat("storefront_oid", "}"), encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
8118
|
+
method: 'PUT',
|
|
8119
|
+
headers: headerParameters,
|
|
8120
|
+
query: queryParameters,
|
|
8121
|
+
body: (0, models_1.SfvbItemMultimediaDescriptionRequestToJSON)(requestParameters.itemMultimediaDescriptionRequest),
|
|
8122
|
+
}, initOverrides)];
|
|
8123
|
+
case 3:
|
|
8124
|
+
response = _c.sent();
|
|
8125
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SfvbItemResponseFromJSON)(jsonValue); })];
|
|
8126
|
+
}
|
|
8127
|
+
});
|
|
8128
|
+
});
|
|
8129
|
+
};
|
|
8130
|
+
/**
|
|
8131
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
8132
|
+
* Change an item image\'s description
|
|
8133
|
+
*/
|
|
8134
|
+
SfvbApi.prototype.putSfvbItemMultimediaDescription = function (requestParameters, initOverrides) {
|
|
8135
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
8136
|
+
var response;
|
|
8137
|
+
return __generator(this, function (_a) {
|
|
8138
|
+
switch (_a.label) {
|
|
8139
|
+
case 0: return [4 /*yield*/, this.putSfvbItemMultimediaDescriptionRaw(requestParameters, initOverrides)];
|
|
8140
|
+
case 1:
|
|
8141
|
+
response = _a.sent();
|
|
8142
|
+
return [4 /*yield*/, response.value()];
|
|
8143
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
8144
|
+
}
|
|
8145
|
+
});
|
|
8146
|
+
});
|
|
8147
|
+
};
|
|
8078
8148
|
/**
|
|
8079
8149
|
* Partial - a field left out is untouched. A sale needs sale_cost, sale_start and sale_end together, the end after the start; clear_sale removes it. msrp must be more than 0 (0 only when the price is 0); clear_msrp removes it. volume_discounts replaces the retail quantity breaks. Shoppers pay the new price at once, so this needs sfvb_publish, If-Match with the pricing hash_sha256, and the approval of the person who signed in the CLI - an approved item.pricing request for this item and exactly this change. A change that sets every field to what it already is returns the pricing unchanged and uses no approval.
|
|
8080
8150
|
* Change what an item charges
|
|
@@ -34,11 +34,23 @@ export interface SfvbItemMultimedia {
|
|
|
34
34
|
*/
|
|
35
35
|
_default?: boolean;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* The merchant's description, stored with the image and rendered as its alt text. When it is empty the render falls back to rekognition_description or to text built from the item's title, depending on the element, so an empty value here is not an empty alt attribute.
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof SfvbItemMultimedia
|
|
40
40
|
*/
|
|
41
41
|
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* SHA-256 of description (empty when there is none). Send it as current_sha256 when changing the description so a change made since you read it is not overwritten.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof SfvbItemMultimedia
|
|
46
|
+
*/
|
|
47
|
+
description_sha256?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Where the alt text comes from now. merchant when description is set, rekognition when only rekognition_description is, none otherwise.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof SfvbItemMultimedia
|
|
52
|
+
*/
|
|
53
|
+
description_source?: SfvbItemMultimediaDescriptionSourceEnum;
|
|
42
54
|
/**
|
|
43
55
|
* Width x height in pixels, when the storage measured the file.
|
|
44
56
|
* @type {string}
|
|
@@ -57,6 +69,18 @@ export interface SfvbItemMultimedia {
|
|
|
57
69
|
* @memberof SfvbItemMultimedia
|
|
58
70
|
*/
|
|
59
71
|
filename?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The stored image's id. Name it to change this image's description when it has no code.
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof SfvbItemMultimedia
|
|
76
|
+
*/
|
|
77
|
+
merchant_item_multimedia_oid?: number;
|
|
78
|
+
/**
|
|
79
|
+
* The machine description image recognition produced for the stored image, if any. It is used only while description is empty, and a description written here or in the admin always takes its place.
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof SfvbItemMultimedia
|
|
82
|
+
*/
|
|
83
|
+
rekognition_description?: string;
|
|
60
84
|
/**
|
|
61
85
|
* The media type the storage recorded.
|
|
62
86
|
* @type {string}
|
|
@@ -70,6 +94,15 @@ export interface SfvbItemMultimedia {
|
|
|
70
94
|
*/
|
|
71
95
|
view_url?: string;
|
|
72
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* @export
|
|
99
|
+
*/
|
|
100
|
+
export declare const SfvbItemMultimediaDescriptionSourceEnum: {
|
|
101
|
+
readonly Merchant: "merchant";
|
|
102
|
+
readonly Rekognition: "rekognition";
|
|
103
|
+
readonly None: "none";
|
|
104
|
+
};
|
|
105
|
+
export type SfvbItemMultimediaDescriptionSourceEnum = typeof SfvbItemMultimediaDescriptionSourceEnum[keyof typeof SfvbItemMultimediaDescriptionSourceEnum];
|
|
73
106
|
/**
|
|
74
107
|
* @export
|
|
75
108
|
*/
|
|
@@ -13,8 +13,16 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.SfvbItemMultimediaToJSON = exports.SfvbItemMultimediaFromJSONTyped = exports.SfvbItemMultimediaFromJSON = exports.instanceOfSfvbItemMultimedia = exports.SfvbItemMultimediaTypeEnum = void 0;
|
|
16
|
+
exports.SfvbItemMultimediaToJSON = exports.SfvbItemMultimediaFromJSONTyped = exports.SfvbItemMultimediaFromJSON = exports.instanceOfSfvbItemMultimedia = exports.SfvbItemMultimediaTypeEnum = exports.SfvbItemMultimediaDescriptionSourceEnum = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.SfvbItemMultimediaDescriptionSourceEnum = {
|
|
22
|
+
Merchant: 'merchant',
|
|
23
|
+
Rekognition: 'rekognition',
|
|
24
|
+
None: 'none'
|
|
25
|
+
};
|
|
18
26
|
/**
|
|
19
27
|
* @export
|
|
20
28
|
*/
|
|
@@ -46,9 +54,13 @@ function SfvbItemMultimediaFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
54
|
'declared': !(0, runtime_1.exists)(json, 'declared') ? undefined : json['declared'],
|
|
47
55
|
'_default': !(0, runtime_1.exists)(json, 'default') ? undefined : json['default'],
|
|
48
56
|
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
57
|
+
'description_sha256': !(0, runtime_1.exists)(json, 'description_sha256') ? undefined : json['description_sha256'],
|
|
58
|
+
'description_source': !(0, runtime_1.exists)(json, 'description_source') ? undefined : json['description_source'],
|
|
49
59
|
'dimensions': !(0, runtime_1.exists)(json, 'dimensions') ? undefined : json['dimensions'],
|
|
50
60
|
'exclude_from_gallery': !(0, runtime_1.exists)(json, 'exclude_from_gallery') ? undefined : json['exclude_from_gallery'],
|
|
51
61
|
'filename': !(0, runtime_1.exists)(json, 'filename') ? undefined : json['filename'],
|
|
62
|
+
'merchant_item_multimedia_oid': !(0, runtime_1.exists)(json, 'merchant_item_multimedia_oid') ? undefined : json['merchant_item_multimedia_oid'],
|
|
63
|
+
'rekognition_description': !(0, runtime_1.exists)(json, 'rekognition_description') ? undefined : json['rekognition_description'],
|
|
52
64
|
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
|
|
53
65
|
'view_url': !(0, runtime_1.exists)(json, 'view_url') ? undefined : json['view_url'],
|
|
54
66
|
};
|
|
@@ -66,9 +78,13 @@ function SfvbItemMultimediaToJSON(value) {
|
|
|
66
78
|
'declared': value.declared,
|
|
67
79
|
'default': value._default,
|
|
68
80
|
'description': value.description,
|
|
81
|
+
'description_sha256': value.description_sha256,
|
|
82
|
+
'description_source': value.description_source,
|
|
69
83
|
'dimensions': value.dimensions,
|
|
70
84
|
'exclude_from_gallery': value.exclude_from_gallery,
|
|
71
85
|
'filename': value.filename,
|
|
86
|
+
'merchant_item_multimedia_oid': value.merchant_item_multimedia_oid,
|
|
87
|
+
'rekognition_description': value.rekognition_description,
|
|
72
88
|
'type': value.type,
|
|
73
89
|
'view_url': value.view_url,
|
|
74
90
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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 SfvbItemMultimediaDescriptionRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface SfvbItemMultimediaDescriptionRequest {
|
|
18
|
+
/**
|
|
19
|
+
* The image code, the value an itemimage element's itemImageCode names.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
22
|
+
*/
|
|
23
|
+
code?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The description_sha256 you read. When it is sent and the description has changed since, nothing is written and the call fails with a version conflict.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
28
|
+
*/
|
|
29
|
+
current_sha256?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The item's default image, which an itemimage element with no code renders.
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
34
|
+
*/
|
|
35
|
+
_default?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The new description, rendered as the image's alt text. An empty string clears it, so the image falls back to the machine description or the element's own fallback. Longer text is cut to 500 characters.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
40
|
+
*/
|
|
41
|
+
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The stored image's id, as an item read reports it. Name this, or one of code or default.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
46
|
+
*/
|
|
47
|
+
merchant_item_multimedia_oid?: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the SfvbItemMultimediaDescriptionRequest interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfSfvbItemMultimediaDescriptionRequest(value: object): boolean;
|
|
53
|
+
export declare function SfvbItemMultimediaDescriptionRequestFromJSON(json: any): SfvbItemMultimediaDescriptionRequest;
|
|
54
|
+
export declare function SfvbItemMultimediaDescriptionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbItemMultimediaDescriptionRequest;
|
|
55
|
+
export declare function SfvbItemMultimediaDescriptionRequestToJSON(value?: SfvbItemMultimediaDescriptionRequest | null): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.SfvbItemMultimediaDescriptionRequestToJSON = exports.SfvbItemMultimediaDescriptionRequestFromJSONTyped = exports.SfvbItemMultimediaDescriptionRequestFromJSON = exports.instanceOfSfvbItemMultimediaDescriptionRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the SfvbItemMultimediaDescriptionRequest interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfSfvbItemMultimediaDescriptionRequest(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfSfvbItemMultimediaDescriptionRequest = instanceOfSfvbItemMultimediaDescriptionRequest;
|
|
26
|
+
function SfvbItemMultimediaDescriptionRequestFromJSON(json) {
|
|
27
|
+
return SfvbItemMultimediaDescriptionRequestFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.SfvbItemMultimediaDescriptionRequestFromJSON = SfvbItemMultimediaDescriptionRequestFromJSON;
|
|
30
|
+
function SfvbItemMultimediaDescriptionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
|
|
36
|
+
'current_sha256': !(0, runtime_1.exists)(json, 'current_sha256') ? undefined : json['current_sha256'],
|
|
37
|
+
'_default': !(0, runtime_1.exists)(json, 'default') ? undefined : json['default'],
|
|
38
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
39
|
+
'merchant_item_multimedia_oid': !(0, runtime_1.exists)(json, 'merchant_item_multimedia_oid') ? undefined : json['merchant_item_multimedia_oid'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
exports.SfvbItemMultimediaDescriptionRequestFromJSONTyped = SfvbItemMultimediaDescriptionRequestFromJSONTyped;
|
|
43
|
+
function SfvbItemMultimediaDescriptionRequestToJSON(value) {
|
|
44
|
+
if (value === undefined) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
if (value === null) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'code': value.code,
|
|
52
|
+
'current_sha256': value.current_sha256,
|
|
53
|
+
'default': value._default,
|
|
54
|
+
'description': value.description,
|
|
55
|
+
'merchant_item_multimedia_oid': value.merchant_item_multimedia_oid,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
exports.SfvbItemMultimediaDescriptionRequestToJSON = SfvbItemMultimediaDescriptionRequestToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1035,6 +1035,7 @@ export * from './SfvbItemContainer';
|
|
|
1035
1035
|
export * from './SfvbItemContainersResponse';
|
|
1036
1036
|
export * from './SfvbItemContentRequest';
|
|
1037
1037
|
export * from './SfvbItemMultimedia';
|
|
1038
|
+
export * from './SfvbItemMultimediaDescriptionRequest';
|
|
1038
1039
|
export * from './SfvbItemMultimediaRequest';
|
|
1039
1040
|
export * from './SfvbItemPricing';
|
|
1040
1041
|
export * from './SfvbItemPricingRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -1053,6 +1053,7 @@ __exportStar(require("./SfvbItemContainer"), exports);
|
|
|
1053
1053
|
__exportStar(require("./SfvbItemContainersResponse"), exports);
|
|
1054
1054
|
__exportStar(require("./SfvbItemContentRequest"), exports);
|
|
1055
1055
|
__exportStar(require("./SfvbItemMultimedia"), exports);
|
|
1056
|
+
__exportStar(require("./SfvbItemMultimediaDescriptionRequest"), exports);
|
|
1056
1057
|
__exportStar(require("./SfvbItemMultimediaRequest"), exports);
|
|
1057
1058
|
__exportStar(require("./SfvbItemPricing"), exports);
|
|
1058
1059
|
__exportStar(require("./SfvbItemPricingRequest"), exports);
|
package/package.json
CHANGED
package/src/apis/OauthApi.ts
CHANGED
|
@@ -112,7 +112,7 @@ export interface OauthApiInterface {
|
|
|
112
112
|
* Revokes the OAuth application associated with the specified client_id and token.
|
|
113
113
|
* @summary Revoke this OAuth application.
|
|
114
114
|
* @param {string} clientId The OAuth application client_id.
|
|
115
|
-
* @param {string} token The OAuth access token that is to be revoked
|
|
115
|
+
* @param {string} token The OAuth access token or refresh token that is to be revoked.
|
|
116
116
|
* @param {*} [options] Override http request option.
|
|
117
117
|
* @throws {RequiredError}
|
|
118
118
|
* @memberof OauthApiInterface
|
package/src/apis/SfvbApi.ts
CHANGED
|
@@ -165,6 +165,9 @@ import {
|
|
|
165
165
|
SfvbItemContentRequest,
|
|
166
166
|
SfvbItemContentRequestFromJSON,
|
|
167
167
|
SfvbItemContentRequestToJSON,
|
|
168
|
+
SfvbItemMultimediaDescriptionRequest,
|
|
169
|
+
SfvbItemMultimediaDescriptionRequestFromJSON,
|
|
170
|
+
SfvbItemMultimediaDescriptionRequestToJSON,
|
|
168
171
|
SfvbItemMultimediaRequest,
|
|
169
172
|
SfvbItemMultimediaRequestFromJSON,
|
|
170
173
|
SfvbItemMultimediaRequestToJSON,
|
|
@@ -1130,6 +1133,13 @@ export interface PutSfvbItemMultimediaRequest {
|
|
|
1130
1133
|
merchantItemOid?: number;
|
|
1131
1134
|
}
|
|
1132
1135
|
|
|
1136
|
+
export interface PutSfvbItemMultimediaDescriptionRequest {
|
|
1137
|
+
storefrontOid: number;
|
|
1138
|
+
itemMultimediaDescriptionRequest: SfvbItemMultimediaDescriptionRequest;
|
|
1139
|
+
merchantItemId?: string;
|
|
1140
|
+
merchantItemOid?: number;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1133
1143
|
export interface PutSfvbItemPricingRequest {
|
|
1134
1144
|
storefrontOid: number;
|
|
1135
1145
|
ifMatch: string;
|
|
@@ -3573,6 +3583,25 @@ export interface SfvbApiInterface {
|
|
|
3573
3583
|
*/
|
|
3574
3584
|
putSfvbItemMultimedia(requestParameters: PutSfvbItemMultimediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemResponse>;
|
|
3575
3585
|
|
|
3586
|
+
/**
|
|
3587
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
3588
|
+
* @summary Change an item image\'s description
|
|
3589
|
+
* @param {number} storefrontOid
|
|
3590
|
+
* @param {SfvbItemMultimediaDescriptionRequest} itemMultimediaDescriptionRequest The image and its new description
|
|
3591
|
+
* @param {string} [merchantItemId]
|
|
3592
|
+
* @param {number} [merchantItemOid]
|
|
3593
|
+
* @param {*} [options] Override http request option.
|
|
3594
|
+
* @throws {RequiredError}
|
|
3595
|
+
* @memberof SfvbApiInterface
|
|
3596
|
+
*/
|
|
3597
|
+
putSfvbItemMultimediaDescriptionRaw(requestParameters: PutSfvbItemMultimediaDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbItemResponse>>;
|
|
3598
|
+
|
|
3599
|
+
/**
|
|
3600
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
3601
|
+
* Change an item image\'s description
|
|
3602
|
+
*/
|
|
3603
|
+
putSfvbItemMultimediaDescription(requestParameters: PutSfvbItemMultimediaDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemResponse>;
|
|
3604
|
+
|
|
3576
3605
|
/**
|
|
3577
3606
|
* Partial - a field left out is untouched. A sale needs sale_cost, sale_start and sale_end together, the end after the start; clear_sale removes it. msrp must be more than 0 (0 only when the price is 0); clear_msrp removes it. volume_discounts replaces the retail quantity breaks. Shoppers pay the new price at once, so this needs sfvb_publish, If-Match with the pricing hash_sha256, and the approval of the person who signed in the CLI - an approved item.pricing request for this item and exactly this change. A change that sets every field to what it already is returns the pricing unchanged and uses no approval.
|
|
3578
3607
|
* @summary Change what an item charges
|
|
@@ -10384,6 +10413,62 @@ export class SfvbApi extends runtime.BaseAPI implements SfvbApiInterface {
|
|
|
10384
10413
|
return await response.value();
|
|
10385
10414
|
}
|
|
10386
10415
|
|
|
10416
|
+
/**
|
|
10417
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
10418
|
+
* Change an item image\'s description
|
|
10419
|
+
*/
|
|
10420
|
+
async putSfvbItemMultimediaDescriptionRaw(requestParameters: PutSfvbItemMultimediaDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SfvbItemResponse>> {
|
|
10421
|
+
if (requestParameters.storefrontOid === null || requestParameters.storefrontOid === undefined) {
|
|
10422
|
+
throw new runtime.RequiredError('storefrontOid','Required parameter requestParameters.storefrontOid was null or undefined when calling putSfvbItemMultimediaDescription.');
|
|
10423
|
+
}
|
|
10424
|
+
|
|
10425
|
+
if (requestParameters.itemMultimediaDescriptionRequest === null || requestParameters.itemMultimediaDescriptionRequest === undefined) {
|
|
10426
|
+
throw new runtime.RequiredError('itemMultimediaDescriptionRequest','Required parameter requestParameters.itemMultimediaDescriptionRequest was null or undefined when calling putSfvbItemMultimediaDescription.');
|
|
10427
|
+
}
|
|
10428
|
+
|
|
10429
|
+
const queryParameters: any = {};
|
|
10430
|
+
|
|
10431
|
+
if (requestParameters.merchantItemId !== undefined) {
|
|
10432
|
+
queryParameters['merchant_item_id'] = requestParameters.merchantItemId;
|
|
10433
|
+
}
|
|
10434
|
+
|
|
10435
|
+
if (requestParameters.merchantItemOid !== undefined) {
|
|
10436
|
+
queryParameters['merchant_item_oid'] = requestParameters.merchantItemOid;
|
|
10437
|
+
}
|
|
10438
|
+
|
|
10439
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
10440
|
+
|
|
10441
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
10442
|
+
|
|
10443
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10444
|
+
// oauth required
|
|
10445
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", []);
|
|
10446
|
+
}
|
|
10447
|
+
|
|
10448
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
10449
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
10450
|
+
}
|
|
10451
|
+
|
|
10452
|
+
const response = await this.request({
|
|
10453
|
+
path: `/sfvb/storefronts/{storefront_oid}/items/multimedia/description`.replace(`{${"storefront_oid"}}`, encodeURIComponent(String(requestParameters.storefrontOid))),
|
|
10454
|
+
method: 'PUT',
|
|
10455
|
+
headers: headerParameters,
|
|
10456
|
+
query: queryParameters,
|
|
10457
|
+
body: SfvbItemMultimediaDescriptionRequestToJSON(requestParameters.itemMultimediaDescriptionRequest),
|
|
10458
|
+
}, initOverrides);
|
|
10459
|
+
|
|
10460
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SfvbItemResponseFromJSON(jsonValue));
|
|
10461
|
+
}
|
|
10462
|
+
|
|
10463
|
+
/**
|
|
10464
|
+
* Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
10465
|
+
* Change an item image\'s description
|
|
10466
|
+
*/
|
|
10467
|
+
async putSfvbItemMultimediaDescription(requestParameters: PutSfvbItemMultimediaDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SfvbItemResponse> {
|
|
10468
|
+
const response = await this.putSfvbItemMultimediaDescriptionRaw(requestParameters, initOverrides);
|
|
10469
|
+
return await response.value();
|
|
10470
|
+
}
|
|
10471
|
+
|
|
10387
10472
|
/**
|
|
10388
10473
|
* Partial - a field left out is untouched. A sale needs sale_cost, sale_start and sale_end together, the end after the start; clear_sale removes it. msrp must be more than 0 (0 only when the price is 0); clear_msrp removes it. volume_discounts replaces the retail quantity breaks. Shoppers pay the new price at once, so this needs sfvb_publish, If-Match with the pricing hash_sha256, and the approval of the person who signed in the CLI - an approved item.pricing request for this item and exactly this change. A change that sets every field to what it already is returns the pricing unchanged and uses no approval.
|
|
10389
10474
|
* Change what an item charges
|
|
@@ -38,11 +38,23 @@ export interface SfvbItemMultimedia {
|
|
|
38
38
|
*/
|
|
39
39
|
_default?: boolean;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* The merchant's description, stored with the image and rendered as its alt text. When it is empty the render falls back to rekognition_description or to text built from the item's title, depending on the element, so an empty value here is not an empty alt attribute.
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof SfvbItemMultimedia
|
|
44
44
|
*/
|
|
45
45
|
description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* SHA-256 of description (empty when there is none). Send it as current_sha256 when changing the description so a change made since you read it is not overwritten.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SfvbItemMultimedia
|
|
50
|
+
*/
|
|
51
|
+
description_sha256?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Where the alt text comes from now. merchant when description is set, rekognition when only rekognition_description is, none otherwise.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof SfvbItemMultimedia
|
|
56
|
+
*/
|
|
57
|
+
description_source?: SfvbItemMultimediaDescriptionSourceEnum;
|
|
46
58
|
/**
|
|
47
59
|
* Width x height in pixels, when the storage measured the file.
|
|
48
60
|
* @type {string}
|
|
@@ -61,6 +73,18 @@ export interface SfvbItemMultimedia {
|
|
|
61
73
|
* @memberof SfvbItemMultimedia
|
|
62
74
|
*/
|
|
63
75
|
filename?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The stored image's id. Name it to change this image's description when it has no code.
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof SfvbItemMultimedia
|
|
80
|
+
*/
|
|
81
|
+
merchant_item_multimedia_oid?: number;
|
|
82
|
+
/**
|
|
83
|
+
* The machine description image recognition produced for the stored image, if any. It is used only while description is empty, and a description written here or in the admin always takes its place.
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof SfvbItemMultimedia
|
|
86
|
+
*/
|
|
87
|
+
rekognition_description?: string;
|
|
64
88
|
/**
|
|
65
89
|
* The media type the storage recorded.
|
|
66
90
|
* @type {string}
|
|
@@ -77,6 +101,16 @@ export interface SfvbItemMultimedia {
|
|
|
77
101
|
|
|
78
102
|
|
|
79
103
|
|
|
104
|
+
/**
|
|
105
|
+
* @export
|
|
106
|
+
*/
|
|
107
|
+
export const SfvbItemMultimediaDescriptionSourceEnum = {
|
|
108
|
+
Merchant: 'merchant',
|
|
109
|
+
Rekognition: 'rekognition',
|
|
110
|
+
None: 'none'
|
|
111
|
+
} as const;
|
|
112
|
+
export type SfvbItemMultimediaDescriptionSourceEnum = typeof SfvbItemMultimediaDescriptionSourceEnum[keyof typeof SfvbItemMultimediaDescriptionSourceEnum];
|
|
113
|
+
|
|
80
114
|
/**
|
|
81
115
|
* @export
|
|
82
116
|
*/
|
|
@@ -113,9 +147,13 @@ export function SfvbItemMultimediaFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
113
147
|
'declared': !exists(json, 'declared') ? undefined : json['declared'],
|
|
114
148
|
'_default': !exists(json, 'default') ? undefined : json['default'],
|
|
115
149
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
150
|
+
'description_sha256': !exists(json, 'description_sha256') ? undefined : json['description_sha256'],
|
|
151
|
+
'description_source': !exists(json, 'description_source') ? undefined : json['description_source'],
|
|
116
152
|
'dimensions': !exists(json, 'dimensions') ? undefined : json['dimensions'],
|
|
117
153
|
'exclude_from_gallery': !exists(json, 'exclude_from_gallery') ? undefined : json['exclude_from_gallery'],
|
|
118
154
|
'filename': !exists(json, 'filename') ? undefined : json['filename'],
|
|
155
|
+
'merchant_item_multimedia_oid': !exists(json, 'merchant_item_multimedia_oid') ? undefined : json['merchant_item_multimedia_oid'],
|
|
156
|
+
'rekognition_description': !exists(json, 'rekognition_description') ? undefined : json['rekognition_description'],
|
|
119
157
|
'type': !exists(json, 'type') ? undefined : json['type'],
|
|
120
158
|
'view_url': !exists(json, 'view_url') ? undefined : json['view_url'],
|
|
121
159
|
};
|
|
@@ -134,9 +172,13 @@ export function SfvbItemMultimediaToJSON(value?: SfvbItemMultimedia | null): any
|
|
|
134
172
|
'declared': value.declared,
|
|
135
173
|
'default': value._default,
|
|
136
174
|
'description': value.description,
|
|
175
|
+
'description_sha256': value.description_sha256,
|
|
176
|
+
'description_source': value.description_source,
|
|
137
177
|
'dimensions': value.dimensions,
|
|
138
178
|
'exclude_from_gallery': value.exclude_from_gallery,
|
|
139
179
|
'filename': value.filename,
|
|
180
|
+
'merchant_item_multimedia_oid': value.merchant_item_multimedia_oid,
|
|
181
|
+
'rekognition_description': value.rekognition_description,
|
|
140
182
|
'type': value.type,
|
|
141
183
|
'view_url': value.view_url,
|
|
142
184
|
};
|
|
@@ -0,0 +1,99 @@
|
|
|
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 SfvbItemMultimediaDescriptionRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SfvbItemMultimediaDescriptionRequest {
|
|
22
|
+
/**
|
|
23
|
+
* The image code, the value an itemimage element's itemImageCode names.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
26
|
+
*/
|
|
27
|
+
code?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The description_sha256 you read. When it is sent and the description has changed since, nothing is written and the call fails with a version conflict.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
32
|
+
*/
|
|
33
|
+
current_sha256?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The item's default image, which an itemimage element with no code renders.
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
38
|
+
*/
|
|
39
|
+
_default?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The new description, rendered as the image's alt text. An empty string clears it, so the image falls back to the machine description or the element's own fallback. Longer text is cut to 500 characters.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
44
|
+
*/
|
|
45
|
+
description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The stored image's id, as an item read reports it. Name this, or one of code or default.
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof SfvbItemMultimediaDescriptionRequest
|
|
50
|
+
*/
|
|
51
|
+
merchant_item_multimedia_oid?: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the SfvbItemMultimediaDescriptionRequest interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfSfvbItemMultimediaDescriptionRequest(value: object): boolean {
|
|
60
|
+
let isInstance = true;
|
|
61
|
+
|
|
62
|
+
return isInstance;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function SfvbItemMultimediaDescriptionRequestFromJSON(json: any): SfvbItemMultimediaDescriptionRequest {
|
|
66
|
+
return SfvbItemMultimediaDescriptionRequestFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function SfvbItemMultimediaDescriptionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SfvbItemMultimediaDescriptionRequest {
|
|
70
|
+
if ((json === undefined) || (json === null)) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'code': !exists(json, 'code') ? undefined : json['code'],
|
|
76
|
+
'current_sha256': !exists(json, 'current_sha256') ? undefined : json['current_sha256'],
|
|
77
|
+
'_default': !exists(json, 'default') ? undefined : json['default'],
|
|
78
|
+
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
79
|
+
'merchant_item_multimedia_oid': !exists(json, 'merchant_item_multimedia_oid') ? undefined : json['merchant_item_multimedia_oid'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function SfvbItemMultimediaDescriptionRequestToJSON(value?: SfvbItemMultimediaDescriptionRequest | null): any {
|
|
84
|
+
if (value === undefined) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
if (value === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'code': value.code,
|
|
93
|
+
'current_sha256': value.current_sha256,
|
|
94
|
+
'default': value._default,
|
|
95
|
+
'description': value.description,
|
|
96
|
+
'merchant_item_multimedia_oid': value.merchant_item_multimedia_oid,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -1037,6 +1037,7 @@ export * from './SfvbItemContainer';
|
|
|
1037
1037
|
export * from './SfvbItemContainersResponse';
|
|
1038
1038
|
export * from './SfvbItemContentRequest';
|
|
1039
1039
|
export * from './SfvbItemMultimedia';
|
|
1040
|
+
export * from './SfvbItemMultimediaDescriptionRequest';
|
|
1040
1041
|
export * from './SfvbItemMultimediaRequest';
|
|
1041
1042
|
export * from './SfvbItemPricing';
|
|
1042
1043
|
export * from './SfvbItemPricingRequest';
|