@wix/auto_sdk_stores_catalog-imports-v-3 1.0.0 → 1.0.2
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/build/cjs/index.d.ts +42 -1
- package/build/cjs/index.js +10 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +10 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +41 -0
- package/build/cjs/meta.js +9 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +42 -1
- package/build/es/index.mjs +10 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +10 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +41 -0
- package/build/es/meta.mjs +9 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -4
- package/build/internal/cjs/index.js +10 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +43 -2
- package/build/internal/cjs/index.typings.js +10 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +41 -0
- package/build/internal/cjs/meta.js +9 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +4 -4
- package/build/internal/es/index.mjs +10 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +43 -2
- package/build/internal/es/index.typings.mjs +10 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +41 -0
- package/build/internal/es/meta.mjs +9 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -2997,6 +2997,47 @@ interface ProductCategoryIdsInfo {
|
|
|
2997
2997
|
categoryIds?: string[];
|
|
2998
2998
|
}
|
|
2999
2999
|
interface AddProductsToImportResponse {
|
|
3000
|
+
/**
|
|
3001
|
+
* Action results.
|
|
3002
|
+
* @minSize 1
|
|
3003
|
+
* @maxSize 100
|
|
3004
|
+
*/
|
|
3005
|
+
results?: AddProductResult[];
|
|
3006
|
+
/** Bulk action metadata. */
|
|
3007
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3008
|
+
}
|
|
3009
|
+
interface AddProductResult {
|
|
3010
|
+
/** Item metadata. */
|
|
3011
|
+
itemMetadata?: ItemMetadata;
|
|
3012
|
+
}
|
|
3013
|
+
interface ItemMetadata {
|
|
3014
|
+
/**
|
|
3015
|
+
* The product `handle` as passed in the `AddProductsToImport` request.
|
|
3016
|
+
* @format GUID
|
|
3017
|
+
*/
|
|
3018
|
+
_id?: string | null;
|
|
3019
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
3020
|
+
originalIndex?: number;
|
|
3021
|
+
/** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
|
|
3022
|
+
success?: boolean;
|
|
3023
|
+
/** Details about the error in case of failure. */
|
|
3024
|
+
error?: ApplicationError;
|
|
3025
|
+
}
|
|
3026
|
+
interface ApplicationError {
|
|
3027
|
+
/** Error code. */
|
|
3028
|
+
code?: string;
|
|
3029
|
+
/** Description of the error. */
|
|
3030
|
+
description?: string;
|
|
3031
|
+
/** Data related to the error. */
|
|
3032
|
+
data?: Record<string, any> | null;
|
|
3033
|
+
}
|
|
3034
|
+
interface BulkActionMetadata {
|
|
3035
|
+
/** Number of items that were successfully processed. */
|
|
3036
|
+
totalSuccesses?: number;
|
|
3037
|
+
/** Number of items that couldn't be processed. */
|
|
3038
|
+
totalFailures?: number;
|
|
3039
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
3040
|
+
undetailedFailures?: number;
|
|
3000
3041
|
}
|
|
3001
3042
|
interface SubmitCatalogImportRequest {
|
|
3002
3043
|
/**
|
|
@@ -3165,4 +3206,4 @@ type SubmitCatalogImportApplicationErrors = {
|
|
|
3165
3206
|
data?: CatalogImportAlreadySubmittedErrorData;
|
|
3166
3207
|
};
|
|
3167
3208
|
|
|
3168
|
-
export { type ActionEvent, type AddProductsToImportRequest, type AddProductsToImportResponse, Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, AspectRatio, type AspectRatioWithLiterals, type AudioData, type Background, type BackgroundBackgroundOneOf, BackgroundType, type BackgroundTypeWithLiterals, type BlockquoteData, type BookingData, type Border, type BorderColors, type Brand, type BulletedListData, type ButtonData, ButtonDataType, type ButtonDataTypeWithLiterals, type ButtonStyles, type CaptionData, type CardStyles, type CatalogImport, type CatalogImportAlreadySubmittedErrorData, type CellStyle, ChoiceType, type ChoiceTypeWithLiterals, type ChoicesSettings, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type ConnectedModifier, type ConnectedModifierChoice, type ConnectedModifierChoiceValueOneOf, type ConnectedModifierModifierSettingsOneOf, type ConnectedOption, type ConnectedOptionChoice, type ConnectedOptionChoiceValueOneOf, type ConnectedOptionOptionSettingsOneOf, type CreateCatalogImportRequest, type CreateCatalogImportResponse, Crop, type CropWithLiterals, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type Design, type Dimensions, Direction, type DirectionWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DividerData, DividerDataAlignment, type DividerDataAlignmentWithLiterals, type DocumentStyle, type DomainEvent, type DomainEventBodyOneOf, type EmbedData, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventData, type ExtendedFields, type FileData, type FileSource, type FileSourceDataOneOf, FileType, type FileTypeWithLiterals, type FixedMonetaryAmount, type FontSizeData, FontType, type FontTypeWithLiterals, type FreeTextSettings, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type GalleryOptionsLayout, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ImageData, type ImageDataStyles, type ImageStyles, type InfoSection, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type InventoryItemComposite, type InventoryItemCompositeTrackingMethodOneOf, type Item, type ItemDataOneOf, type ItemStyle, type Keyword, Layout, type LayoutCellData, LayoutType, type LayoutTypeWithLiterals, type LayoutWithLiterals, LineStyle, type LineStyleWithLiterals, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListValue, type MapData, type MapSettings, MapType, type MapTypeWithLiterals, MeasurementUnit, type MeasurementUnitWithLiterals, type Media, type MediaItemsInfo, MediaType, type MediaTypeWithLiterals, type MentionData, type MessageEnvelope, type Metadata, type ModifierChoicesSettings, ModifierRenderType, type ModifierRenderTypeWithLiterals, type MultipleColors, type Node, type NodeDataOneOf, type NodeStyle, NodeType, type NodeTypeWithLiterals, NullValue, type NullValueWithLiterals, type Oembed, type Option, type OptionChoiceIds, type OptionChoiceNames, type OptionChoiceReferences, type OptionDesign, type OptionLayout, type OrderedListData, Orientation, type OrientationWithLiterals, type PDFSettings, type ParagraphData, type Permissions, type PhysicalProperties, Placement, type PlacementWithLiterals, type PlaybackOptions, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataAlignmentWithLiterals, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, type PollLayoutDirectionWithLiterals, PollLayoutType, type PollLayoutTypeWithLiterals, type PollSettings, Position, type PositionWithLiterals, type PreorderInfo, type PriceInfo, type PricePerUnit, type PricePerUnitRange, type PricePerUnitRangePricePerUnit, type PricePerUnitSettings, type PricingData, type ProductCategoryIdsInfo, type ProductItem, type ProductMedia, type ProductMediaMediaOneOf, type ProductMediaSetByOneOf, ProductOptionRenderType, type ProductOptionRenderTypeWithLiterals, ProductType, type ProductTypeWithLiterals, type ProductWithInventory, type ProductWithInventoryTypedPropertiesOneOf, type Rel, Resizing, type ResizingWithLiterals, type RestoreInfo, type RevenueDetails, type Ribbon, type RibbonStyles, type RichContent, type SecuredMedia, type SeoSchema, type Settings, Source, type SourceWithLiterals, type Spoiler, type SpoilerData, type Styles, type StylesBorder, StylesPosition, type StylesPositionWithLiterals, type SubmitCatalogImportApplicationErrors, type SubmitCatalogImportRequest, type SubmitCatalogImportResponse, type Subscription, type SubscriptionCyclesOneOf, type SubscriptionDetails, type SubscriptionDiscount, type SubscriptionDiscountDiscountOneOf, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type TableCellData, type TableData, type Tag, Target, type TargetWithLiterals, TextAlignment, type TextAlignmentWithLiterals, type TextData, type TextNodeStyle, type TextStyle, type Thumbnail, type Thumbnails, ThumbnailsAlignment, type ThumbnailsAlignmentWithLiterals, Type, type TypeWithLiterals, type V1Media, type VariantDigitalProperties, type VariantPhysicalProperties, type VariantWithInventory, type VariantWithInventoryTypedPropertiesOneOf, type VariantsInfo, VerticalAlignment, type VerticalAlignmentWithLiterals, type Video, type VideoData, type VideoResolution, ViewMode, type ViewModeWithLiterals, ViewRole, type ViewRoleWithLiterals, VoteRole, type VoteRoleWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WeightMeasurementUnitInfo, type WeightRange, WeightUnit, type WeightUnitWithLiterals, Width, WidthType, type WidthTypeWithLiterals, type WidthWithLiterals };
|
|
3209
|
+
export { type ActionEvent, type AddProductResult, type AddProductsToImportRequest, type AddProductsToImportResponse, Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, type ApplicationError, AspectRatio, type AspectRatioWithLiterals, type AudioData, type Background, type BackgroundBackgroundOneOf, BackgroundType, type BackgroundTypeWithLiterals, type BlockquoteData, type BookingData, type Border, type BorderColors, type Brand, type BulkActionMetadata, type BulletedListData, type ButtonData, ButtonDataType, type ButtonDataTypeWithLiterals, type ButtonStyles, type CaptionData, type CardStyles, type CatalogImport, type CatalogImportAlreadySubmittedErrorData, type CellStyle, ChoiceType, type ChoiceTypeWithLiterals, type ChoicesSettings, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type ConnectedModifier, type ConnectedModifierChoice, type ConnectedModifierChoiceValueOneOf, type ConnectedModifierModifierSettingsOneOf, type ConnectedOption, type ConnectedOptionChoice, type ConnectedOptionChoiceValueOneOf, type ConnectedOptionOptionSettingsOneOf, type CreateCatalogImportRequest, type CreateCatalogImportResponse, Crop, type CropWithLiterals, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type Design, type Dimensions, Direction, type DirectionWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DividerData, DividerDataAlignment, type DividerDataAlignmentWithLiterals, type DocumentStyle, type DomainEvent, type DomainEventBodyOneOf, type EmbedData, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventData, type ExtendedFields, type FileData, type FileSource, type FileSourceDataOneOf, FileType, type FileTypeWithLiterals, type FixedMonetaryAmount, type FontSizeData, FontType, type FontTypeWithLiterals, type FreeTextSettings, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type GalleryOptionsLayout, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ImageData, type ImageDataStyles, type ImageStyles, type InfoSection, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type InventoryItemComposite, type InventoryItemCompositeTrackingMethodOneOf, type Item, type ItemDataOneOf, type ItemMetadata, type ItemStyle, type Keyword, Layout, type LayoutCellData, LayoutType, type LayoutTypeWithLiterals, type LayoutWithLiterals, LineStyle, type LineStyleWithLiterals, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListValue, type MapData, type MapSettings, MapType, type MapTypeWithLiterals, MeasurementUnit, type MeasurementUnitWithLiterals, type Media, type MediaItemsInfo, MediaType, type MediaTypeWithLiterals, type MentionData, type MessageEnvelope, type Metadata, type ModifierChoicesSettings, ModifierRenderType, type ModifierRenderTypeWithLiterals, type MultipleColors, type Node, type NodeDataOneOf, type NodeStyle, NodeType, type NodeTypeWithLiterals, NullValue, type NullValueWithLiterals, type Oembed, type Option, type OptionChoiceIds, type OptionChoiceNames, type OptionChoiceReferences, type OptionDesign, type OptionLayout, type OrderedListData, Orientation, type OrientationWithLiterals, type PDFSettings, type ParagraphData, type Permissions, type PhysicalProperties, Placement, type PlacementWithLiterals, type PlaybackOptions, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataAlignmentWithLiterals, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, type PollLayoutDirectionWithLiterals, PollLayoutType, type PollLayoutTypeWithLiterals, type PollSettings, Position, type PositionWithLiterals, type PreorderInfo, type PriceInfo, type PricePerUnit, type PricePerUnitRange, type PricePerUnitRangePricePerUnit, type PricePerUnitSettings, type PricingData, type ProductCategoryIdsInfo, type ProductItem, type ProductMedia, type ProductMediaMediaOneOf, type ProductMediaSetByOneOf, ProductOptionRenderType, type ProductOptionRenderTypeWithLiterals, ProductType, type ProductTypeWithLiterals, type ProductWithInventory, type ProductWithInventoryTypedPropertiesOneOf, type Rel, Resizing, type ResizingWithLiterals, type RestoreInfo, type RevenueDetails, type Ribbon, type RibbonStyles, type RichContent, type SecuredMedia, type SeoSchema, type Settings, Source, type SourceWithLiterals, type Spoiler, type SpoilerData, type Styles, type StylesBorder, StylesPosition, type StylesPositionWithLiterals, type SubmitCatalogImportApplicationErrors, type SubmitCatalogImportRequest, type SubmitCatalogImportResponse, type Subscription, type SubscriptionCyclesOneOf, type SubscriptionDetails, type SubscriptionDiscount, type SubscriptionDiscountDiscountOneOf, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type TableCellData, type TableData, type Tag, Target, type TargetWithLiterals, TextAlignment, type TextAlignmentWithLiterals, type TextData, type TextNodeStyle, type TextStyle, type Thumbnail, type Thumbnails, ThumbnailsAlignment, type ThumbnailsAlignmentWithLiterals, Type, type TypeWithLiterals, type V1Media, type VariantDigitalProperties, type VariantPhysicalProperties, type VariantWithInventory, type VariantWithInventoryTypedPropertiesOneOf, type VariantsInfo, VerticalAlignment, type VerticalAlignmentWithLiterals, type Video, type VideoData, type VideoResolution, ViewMode, type ViewModeWithLiterals, ViewRole, type ViewRoleWithLiterals, VoteRole, type VoteRoleWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WeightMeasurementUnitInfo, type WeightRange, WeightUnit, type WeightUnitWithLiterals, Width, WidthType, type WidthTypeWithLiterals, type WidthWithLiterals };
|
package/build/cjs/index.js
CHANGED
|
@@ -110,6 +110,9 @@ function createCatalogImport(payload) {
|
|
|
110
110
|
method: "POST",
|
|
111
111
|
methodFqn: "wix.stores.catalog.catalog_import.v3.CatalogImports.CreateCatalogImport",
|
|
112
112
|
packageName: PACKAGE_NAME,
|
|
113
|
+
migrationOptions: {
|
|
114
|
+
optInTransformResponse: true
|
|
115
|
+
},
|
|
113
116
|
url: resolveWixStoresCatalogCatalogImportV3CatalogImportsUrl({
|
|
114
117
|
protoPath: "/v3/catalog-imports",
|
|
115
118
|
data: serializedData,
|
|
@@ -329,6 +332,9 @@ function addProductsToImport(payload) {
|
|
|
329
332
|
method: "POST",
|
|
330
333
|
methodFqn: "wix.stores.catalog.catalog_import.v3.CatalogImports.AddProductsToImport",
|
|
331
334
|
packageName: PACKAGE_NAME,
|
|
335
|
+
migrationOptions: {
|
|
336
|
+
optInTransformResponse: true
|
|
337
|
+
},
|
|
332
338
|
url: resolveWixStoresCatalogCatalogImportV3CatalogImportsUrl({
|
|
333
339
|
protoPath: "/v3/catalog-imports/{catalogImportId}/add-products",
|
|
334
340
|
data: serializedData,
|
|
@@ -347,6 +353,9 @@ function submitCatalogImport(payload) {
|
|
|
347
353
|
method: "POST",
|
|
348
354
|
methodFqn: "wix.stores.catalog.catalog_import.v3.CatalogImports.SubmitCatalogImport",
|
|
349
355
|
packageName: PACKAGE_NAME,
|
|
356
|
+
migrationOptions: {
|
|
357
|
+
optInTransformResponse: true
|
|
358
|
+
},
|
|
350
359
|
url: resolveWixStoresCatalogCatalogImportV3CatalogImportsUrl({
|
|
351
360
|
protoPath: "/v3/catalog-imports/{catalogImportId}/submit",
|
|
352
361
|
data: payload,
|
|
@@ -787,6 +796,7 @@ async function addProductsToImport2(catalogImportId, products) {
|
|
|
787
796
|
try {
|
|
788
797
|
const result = await httpClient.request(reqOpts);
|
|
789
798
|
sideEffects?.onSuccess?.(result);
|
|
799
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
790
800
|
} catch (err) {
|
|
791
801
|
const transformedError = (0, import_transform_error.transformError)(
|
|
792
802
|
err,
|