@wix/auto_sdk_stores_catalog-imports-v-3 1.0.0 → 1.0.1
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 +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +1 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +41 -0
- package/build/es/index.d.mts +42 -1
- package/build/es/index.mjs +1 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +1 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +41 -0
- package/build/internal/cjs/index.d.ts +4 -4
- package/build/internal/cjs/index.js +1 -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 +1 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +41 -0
- package/build/internal/es/index.d.mts +4 -4
- package/build/internal/es/index.mjs +1 -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 +1 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +41 -0
- package/package.json +2 -2
|
@@ -3012,6 +3012,47 @@ interface ProductCategoryIdsInfo {
|
|
|
3012
3012
|
categoryIds?: string[];
|
|
3013
3013
|
}
|
|
3014
3014
|
interface AddProductsToImportResponse {
|
|
3015
|
+
/**
|
|
3016
|
+
* Action results.
|
|
3017
|
+
* @minSize 1
|
|
3018
|
+
* @maxSize 100
|
|
3019
|
+
*/
|
|
3020
|
+
results?: AddProductResult[];
|
|
3021
|
+
/** Bulk action metadata. */
|
|
3022
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3023
|
+
}
|
|
3024
|
+
interface AddProductResult {
|
|
3025
|
+
/** Item metadata. */
|
|
3026
|
+
itemMetadata?: ItemMetadata;
|
|
3027
|
+
}
|
|
3028
|
+
interface ItemMetadata {
|
|
3029
|
+
/**
|
|
3030
|
+
* The product `handle` as passed in the `AddProductsToImport` request.
|
|
3031
|
+
* @format GUID
|
|
3032
|
+
*/
|
|
3033
|
+
_id?: string | null;
|
|
3034
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
3035
|
+
originalIndex?: number;
|
|
3036
|
+
/** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
|
|
3037
|
+
success?: boolean;
|
|
3038
|
+
/** Details about the error in case of failure. */
|
|
3039
|
+
error?: ApplicationError;
|
|
3040
|
+
}
|
|
3041
|
+
interface ApplicationError {
|
|
3042
|
+
/** Error code. */
|
|
3043
|
+
code?: string;
|
|
3044
|
+
/** Description of the error. */
|
|
3045
|
+
description?: string;
|
|
3046
|
+
/** Data related to the error. */
|
|
3047
|
+
data?: Record<string, any> | null;
|
|
3048
|
+
}
|
|
3049
|
+
interface BulkActionMetadata {
|
|
3050
|
+
/** Number of items that were successfully processed. */
|
|
3051
|
+
totalSuccesses?: number;
|
|
3052
|
+
/** Number of items that couldn't be processed. */
|
|
3053
|
+
totalFailures?: number;
|
|
3054
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
3055
|
+
undetailedFailures?: number;
|
|
3015
3056
|
}
|
|
3016
3057
|
interface SubmitCatalogImportRequest {
|
|
3017
3058
|
/**
|
|
@@ -3214,7 +3255,7 @@ declare function createCatalogImport(catalogImport: CatalogImport): Promise<Cata
|
|
|
3214
3255
|
* @applicableIdentity APP
|
|
3215
3256
|
* @fqn wix.stores.catalog.catalog_import.v3.CatalogImports.AddProductsToImport
|
|
3216
3257
|
*/
|
|
3217
|
-
declare function addProductsToImport(catalogImportId: string, products: NonNullablePaths<ProductItem, `product.handle`, 3>[]): Promise<
|
|
3258
|
+
declare function addProductsToImport(catalogImportId: string, products: NonNullablePaths<ProductItem, `product.handle`, 3>[]): Promise<NonNullablePaths<AddProductsToImportResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
3218
3259
|
/**
|
|
3219
3260
|
* Submits all products in the catalog import for processing.
|
|
3220
3261
|
* Once called, no more items can be added to this import session.
|
|
@@ -3230,4 +3271,4 @@ declare function submitCatalogImport(catalogImportId: string): Promise<NonNullab
|
|
|
3230
3271
|
__applicationErrorsType?: SubmitCatalogImportApplicationErrors;
|
|
3231
3272
|
}>;
|
|
3232
3273
|
|
|
3233
|
-
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, addProductsToImport, createCatalogImport, submitCatalogImport };
|
|
3274
|
+
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, addProductsToImport, createCatalogImport, submitCatalogImport };
|
|
@@ -787,6 +787,7 @@ async function addProductsToImport2(catalogImportId, products) {
|
|
|
787
787
|
try {
|
|
788
788
|
const result = await httpClient.request(reqOpts);
|
|
789
789
|
sideEffects?.onSuccess?.(result);
|
|
790
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
790
791
|
} catch (err) {
|
|
791
792
|
const transformedError = (0, import_transform_error.transformError)(
|
|
792
793
|
err,
|