@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
package/build/es/meta.d.mts
CHANGED
|
@@ -3020,6 +3020,47 @@ interface ProductCategoryIdsInfo {
|
|
|
3020
3020
|
categoryIds?: string[];
|
|
3021
3021
|
}
|
|
3022
3022
|
interface AddProductsToImportResponse {
|
|
3023
|
+
/**
|
|
3024
|
+
* Action results.
|
|
3025
|
+
* @minSize 1
|
|
3026
|
+
* @maxSize 100
|
|
3027
|
+
*/
|
|
3028
|
+
results?: AddProductResult[];
|
|
3029
|
+
/** Bulk action metadata. */
|
|
3030
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3031
|
+
}
|
|
3032
|
+
interface AddProductResult {
|
|
3033
|
+
/** Item metadata. */
|
|
3034
|
+
itemMetadata?: ItemMetadata;
|
|
3035
|
+
}
|
|
3036
|
+
interface ItemMetadata {
|
|
3037
|
+
/**
|
|
3038
|
+
* The product `handle` as passed in the `AddProductsToImport` request.
|
|
3039
|
+
* @format GUID
|
|
3040
|
+
*/
|
|
3041
|
+
id?: string | null;
|
|
3042
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
3043
|
+
originalIndex?: number;
|
|
3044
|
+
/** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
|
|
3045
|
+
success?: boolean;
|
|
3046
|
+
/** Details about the error in case of failure. */
|
|
3047
|
+
error?: ApplicationError;
|
|
3048
|
+
}
|
|
3049
|
+
interface ApplicationError {
|
|
3050
|
+
/** Error code. */
|
|
3051
|
+
code?: string;
|
|
3052
|
+
/** Description of the error. */
|
|
3053
|
+
description?: string;
|
|
3054
|
+
/** Data related to the error. */
|
|
3055
|
+
data?: Record<string, any> | null;
|
|
3056
|
+
}
|
|
3057
|
+
interface BulkActionMetadata {
|
|
3058
|
+
/** Number of items that were successfully processed. */
|
|
3059
|
+
totalSuccesses?: number;
|
|
3060
|
+
/** Number of items that couldn't be processed. */
|
|
3061
|
+
totalFailures?: number;
|
|
3062
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
3063
|
+
undetailedFailures?: number;
|
|
3023
3064
|
}
|
|
3024
3065
|
interface SubmitCatalogImportRequest {
|
|
3025
3066
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { CatalogImport, ProductItem, SubmitCatalogImportResponse, SubmitCatalogImportApplicationErrors } from './index.typings.js';
|
|
3
|
-
export { ActionEvent,
|
|
2
|
+
import { CatalogImport, ProductItem, AddProductsToImportResponse, SubmitCatalogImportResponse, SubmitCatalogImportApplicationErrors } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, AddProductResult, AddProductsToImportRequest, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundType, BackgroundTypeWithLiterals, BlockquoteData, BookingData, Border, BorderColors, Brand, BulkActionMetadata, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CatalogImportAlreadySubmittedErrorData, CellStyle, ChoiceType, ChoiceTypeWithLiterals, ChoicesSettings, CodeBlockData, CollapsibleListData, ColorData, Colors, ConnectedModifier, ConnectedModifierChoice, ConnectedModifierChoiceValueOneOf, ConnectedModifierModifierSettingsOneOf, ConnectedOption, ConnectedOptionChoice, ConnectedOptionChoiceValueOneOf, ConnectedOptionOptionSettingsOneOf, CreateCatalogImportRequest, CreateCatalogImportResponse, Crop, CropWithLiterals, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, Design, Dimensions, Direction, DirectionWithLiterals, DiscountType, DiscountTypeWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, ExtendedFields, FileData, FileSource, FileSourceDataOneOf, FileType, FileTypeWithLiterals, FixedMonetaryAmount, FontSizeData, FontType, FontTypeWithLiterals, FreeTextSettings, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImageStyles, InfoSection, InitialExpandedItems, InitialExpandedItemsWithLiterals, InventoryItemComposite, InventoryItemCompositeTrackingMethodOneOf, Item, ItemDataOneOf, ItemMetadata, ItemStyle, Keyword, Layout, LayoutCellData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, MeasurementUnit, MeasurementUnitWithLiterals, Media, MediaItemsInfo, MediaType, MediaTypeWithLiterals, MentionData, MessageEnvelope, Metadata, ModifierChoicesSettings, ModifierRenderType, ModifierRenderTypeWithLiterals, MultipleColors, Node, NodeDataOneOf, NodeStyle, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionChoiceIds, OptionChoiceNames, OptionChoiceReferences, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, PDFSettings, ParagraphData, Permissions, PhysicalProperties, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, PollSettings, Position, PositionWithLiterals, PreorderInfo, PriceInfo, PricePerUnit, PricePerUnitRange, PricePerUnitRangePricePerUnit, PricePerUnitSettings, PricingData, ProductCategoryIdsInfo, ProductMedia, ProductMediaMediaOneOf, ProductMediaSetByOneOf, ProductOptionRenderType, ProductOptionRenderTypeWithLiterals, ProductType, ProductTypeWithLiterals, ProductWithInventory, ProductWithInventoryTypedPropertiesOneOf, Rel, Resizing, ResizingWithLiterals, RestoreInfo, RevenueDetails, Ribbon, RibbonStyles, RichContent, SecuredMedia, SeoSchema, Settings, Source, SourceWithLiterals, Spoiler, SpoilerData, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, SubmitCatalogImportRequest, Subscription, SubscriptionCyclesOneOf, SubscriptionDetails, SubscriptionDiscount, SubscriptionDiscountDiscountOneOf, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, TableCellData, TableData, Tag, Target, TargetWithLiterals, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Thumbnail, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, Type, TypeWithLiterals, V1Media, VariantDigitalProperties, VariantPhysicalProperties, VariantWithInventory, VariantWithInventoryTypedPropertiesOneOf, VariantsInfo, VerticalAlignment, VerticalAlignmentWithLiterals, Video, VideoData, VideoResolution, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightMeasurementUnitInfo, WeightRange, WeightUnit, WeightUnitWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
declare function createCatalogImport$1(httpClient: HttpClient): CreateCatalogImportSignature;
|
|
@@ -30,7 +30,7 @@ interface AddProductsToImportSignature {
|
|
|
30
30
|
* @param - Catalog Import ID.
|
|
31
31
|
* @param - List of product items to add to the import session.
|
|
32
32
|
*/
|
|
33
|
-
(catalogImportId: string, products: NonNullablePaths<ProductItem, `product.handle`, 3>[]): Promise<
|
|
33
|
+
(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>>;
|
|
34
34
|
}
|
|
35
35
|
/** @internal */
|
|
36
36
|
declare function submitCatalogImport$1(httpClient: HttpClient): SubmitCatalogImportSignature;
|
|
@@ -52,4 +52,4 @@ declare const addProductsToImport: MaybeContext<BuildRESTFunction<typeof addProd
|
|
|
52
52
|
/** @internal */
|
|
53
53
|
declare const submitCatalogImport: MaybeContext<BuildRESTFunction<typeof submitCatalogImport$1> & typeof submitCatalogImport$1>;
|
|
54
54
|
|
|
55
|
-
export { CatalogImport, ProductItem, SubmitCatalogImportApplicationErrors, SubmitCatalogImportResponse, addProductsToImport, createCatalogImport, submitCatalogImport };
|
|
55
|
+
export { AddProductsToImportResponse, CatalogImport, ProductItem, SubmitCatalogImportApplicationErrors, SubmitCatalogImportResponse, 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,
|