@wix/auto_sdk_stores_customizations-v-3 1.0.108 → 1.0.109
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 +3 -3
- package/build/cjs/index.js +17 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +40 -10
- package/build/cjs/index.typings.js +15 -7
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +22 -8
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +3 -3
- package/build/es/index.mjs +17 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +40 -10
- package/build/es/index.typings.mjs +15 -7
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +22 -8
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -3
- package/build/internal/cjs/index.typings.d.ts +40 -10
- package/build/internal/cjs/meta.d.ts +22 -8
- package/build/internal/es/index.d.mts +3 -3
- package/build/internal/es/index.typings.d.mts +40 -10
- package/build/internal/es/meta.d.mts +22 -8
- package/package.json +2 -2
|
@@ -456,7 +456,22 @@ interface URIs {
|
|
|
456
456
|
interface CreateCustomizationRequest {
|
|
457
457
|
/** Customization to create. */
|
|
458
458
|
customization: Customization;
|
|
459
|
+
/**
|
|
460
|
+
* Fields to include in the response.
|
|
461
|
+
*
|
|
462
|
+
* Supported values: `ASSIGNED_PRODUCTS_COUNT`
|
|
463
|
+
* @maxSize 100
|
|
464
|
+
*/
|
|
465
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
459
466
|
}
|
|
467
|
+
declare enum RequestedFields {
|
|
468
|
+
/** Assigned products count. */
|
|
469
|
+
ASSIGNED_PRODUCTS_COUNT = "ASSIGNED_PRODUCTS_COUNT",
|
|
470
|
+
/** Returns display images for choices. */
|
|
471
|
+
CHOICE_DISPLAY_IMAGE = "CHOICE_DISPLAY_IMAGE"
|
|
472
|
+
}
|
|
473
|
+
/** @enumType */
|
|
474
|
+
type RequestedFieldsWithLiterals = RequestedFields | 'ASSIGNED_PRODUCTS_COUNT' | 'CHOICE_DISPLAY_IMAGE';
|
|
460
475
|
interface CreateCustomizationResponse {
|
|
461
476
|
/** Created customization. */
|
|
462
477
|
customization?: Customization;
|
|
@@ -475,14 +490,6 @@ interface GetCustomizationRequest {
|
|
|
475
490
|
*/
|
|
476
491
|
fields?: RequestedFieldsWithLiterals[];
|
|
477
492
|
}
|
|
478
|
-
declare enum RequestedFields {
|
|
479
|
-
/** Assigned products count. */
|
|
480
|
-
ASSIGNED_PRODUCTS_COUNT = "ASSIGNED_PRODUCTS_COUNT",
|
|
481
|
-
/** Returns display images for choices. */
|
|
482
|
-
CHOICE_DISPLAY_IMAGE = "CHOICE_DISPLAY_IMAGE"
|
|
483
|
-
}
|
|
484
|
-
/** @enumType */
|
|
485
|
-
type RequestedFieldsWithLiterals = RequestedFields | 'ASSIGNED_PRODUCTS_COUNT' | 'CHOICE_DISPLAY_IMAGE';
|
|
486
493
|
interface GetCustomizationResponse {
|
|
487
494
|
/** Customization. */
|
|
488
495
|
customization?: Customization;
|
|
@@ -634,6 +641,13 @@ interface BulkCreateCustomizationsRequest {
|
|
|
634
641
|
* Default: `false`
|
|
635
642
|
*/
|
|
636
643
|
returnEntity?: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* Fields to include in the response.
|
|
646
|
+
*
|
|
647
|
+
* Supported values: `ASSIGNED_PRODUCTS_COUNT`
|
|
648
|
+
* @maxSize 100
|
|
649
|
+
*/
|
|
650
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
637
651
|
}
|
|
638
652
|
interface BulkCreateCustomizationsResponse {
|
|
639
653
|
/**
|
|
@@ -1555,10 +1569,19 @@ declare function onCustomizationUpdated(handler: (event: CustomizationUpdatedEnv
|
|
|
1555
1569
|
* @returns Created customization.
|
|
1556
1570
|
* @fqn wix.stores.catalog.customization.v3.CustomizationService.CreateCustomization
|
|
1557
1571
|
*/
|
|
1558
|
-
declare function createCustomization(customization: NonNullablePaths<Customization, `choicesSettings.choices` | `customizationRenderType` | `customizationType` | `freeTextInput.title` | `name`, 1
|
|
1572
|
+
declare function createCustomization(customization: NonNullablePaths<Customization, `choicesSettings.choices` | `customizationRenderType` | `customizationType` | `freeTextInput.title` | `name`, 1>, options?: CreateCustomizationOptions): Promise<NonNullablePaths<Customization, `freeTextInput.minCharCount` | `freeTextInput.maxCharCount` | `freeTextInput.title` | `choicesSettings.choices` | `choicesSettings.choices.${number}.colorCode` | `choicesSettings.choices.${number}._id` | `choicesSettings.choices.${number}.choiceType` | `choicesSettings.choices.${number}.name` | `name` | `customizationType` | `customizationRenderType`, 3> & {
|
|
1559
1573
|
__applicationErrorsType?: CreateCustomizationApplicationErrors;
|
|
1560
1574
|
__validationErrorsType?: CreateCustomizationValidationErrors;
|
|
1561
1575
|
}>;
|
|
1576
|
+
interface CreateCustomizationOptions {
|
|
1577
|
+
/**
|
|
1578
|
+
* Fields to include in the response.
|
|
1579
|
+
*
|
|
1580
|
+
* Supported values: `ASSIGNED_PRODUCTS_COUNT`
|
|
1581
|
+
* @maxSize 100
|
|
1582
|
+
*/
|
|
1583
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1584
|
+
}
|
|
1562
1585
|
/**
|
|
1563
1586
|
* Retrieves a customization.
|
|
1564
1587
|
* @param customizationId - Customization ID.
|
|
@@ -1886,6 +1909,13 @@ interface BulkCreateCustomizationsOptions {
|
|
|
1886
1909
|
* Default: `false`
|
|
1887
1910
|
*/
|
|
1888
1911
|
returnEntity?: boolean;
|
|
1912
|
+
/**
|
|
1913
|
+
* Fields to include in the response.
|
|
1914
|
+
*
|
|
1915
|
+
* Supported values: `ASSIGNED_PRODUCTS_COUNT`
|
|
1916
|
+
* @maxSize 100
|
|
1917
|
+
*/
|
|
1918
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1889
1919
|
}
|
|
1890
1920
|
/**
|
|
1891
1921
|
* Adds choices to a customization.
|
|
@@ -2110,4 +2140,4 @@ interface BulkUpdateCustomizationsOptions {
|
|
|
2110
2140
|
fields?: RequestedFieldsWithLiterals[];
|
|
2111
2141
|
}
|
|
2112
2142
|
|
|
2113
|
-
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddCustomizationChoicesApplicationErrors, type AddCustomizationChoicesOptions, type AddCustomizationChoicesRequest, type AddCustomizationChoicesResponse, type AddCustomizationChoicesValidationErrors, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkAddCustomizationChoicesApplicationErrors, type BulkAddCustomizationChoicesOptions, type BulkAddCustomizationChoicesRequest, type BulkAddCustomizationChoicesResponse, type BulkAddCustomizationChoicesValidationErrors, type BulkCreateCustomizationsApplicationErrors, type BulkCreateCustomizationsForMigrationRequest, type BulkCreateCustomizationsForMigrationResponse, type BulkCreateCustomizationsOptions, type BulkCreateCustomizationsRequest, type BulkCreateCustomizationsResponse, type BulkCreateCustomizationsValidationErrors, type BulkCustomizationResult, type BulkUpdateCustomizationsApplicationErrors, type BulkUpdateCustomizationsOptions, type BulkUpdateCustomizationsRequest, type BulkUpdateCustomizationsResponse, type CatalogRollbackRequested, type Choice, type ChoiceIdsMismatchData, ChoiceSortStrategy, type ChoiceSortStrategyWithLiterals, ChoiceType, type ChoiceTypeWithLiterals, type ChoiceValueOneOf, type ChoicesSettings, type CommonQueryWithEntityContext, type CountCustomizationsOptions, type CountCustomizationsRequest, type CountCustomizationsResponse, type CreateCustomizationApplicationErrors, type CreateCustomizationRequest, type CreateCustomizationResponse, type CreateCustomizationValidationErrors, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type Customization, type CustomizationChoices, type CustomizationCreatedEnvelope, type CustomizationCustomizationSettingsOneOf, type CustomizationDeletedEnvelope, type CustomizationIdsWrapper, type CustomizationQuery, type CustomizationQuerySpec, CustomizationRenderType, type CustomizationRenderTypeWithLiterals, CustomizationType, type CustomizationTypeSpecificSettingsOneOf, type CustomizationTypeWithLiterals, type CustomizationUpdatedEnvelope, type CustomizationsQueryBuilder, type CustomizationsQueryResult, type DeleteCustomizationRequest, type DeleteCustomizationResponse, type DeleteCustomizationValidationErrors, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type FocalPoint, type FreeTextSettings, type GetCustomizationOptions, type GetCustomizationRequest, type GetCustomizationResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type MaskedChoice, type MaskedCustomization, type MessageEnvelope, type ModifierSettings, type MultipleColors, type Page, type Pages, type QueryCustomizationsOptions, type QueryCustomizationsRequest, type QueryCustomizationsResponse, type RecloneSiteRequest, type RecloneSiteResponse, type RemoveCustomizationChoicesApplicationErrors, type RemoveCustomizationChoicesOptions, type RemoveCustomizationChoicesRequest, type RemoveCustomizationChoicesResponse, type RemoveCustomizationChoicesValidationErrors, type ReorderCustomizationChoicesApplicationErrors, type ReorderCustomizationChoicesOptions, type ReorderCustomizationChoicesRequest, type ReorderCustomizationChoicesResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type SetCustomizationChoicesApplicationErrors, type SetCustomizationChoicesOptions, type SetCustomizationChoicesRequest, type SetCustomizationChoicesResponse, type SetCustomizationChoicesValidationErrors, SortOrder, type SortOrderWithLiterals, type Sorting, type URI, type URIs, type UpdateCustomization, type UpdateCustomizationApplicationErrors, type UpdateCustomizationChoicesApplicationErrors, type UpdateCustomizationChoicesOptions, type UpdateCustomizationChoicesRequest, type UpdateCustomizationChoicesResponse, type UpdateCustomizationChoicesValidationErrors, type UpdateCustomizationOptions, type UpdateCustomizationRequest, type UpdateCustomizationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, countCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, reorderCustomizationChoices, setCustomizationChoices, typedQueryCustomizations, updateCustomization, updateCustomizationChoices, utils };
|
|
2143
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddCustomizationChoicesApplicationErrors, type AddCustomizationChoicesOptions, type AddCustomizationChoicesRequest, type AddCustomizationChoicesResponse, type AddCustomizationChoicesValidationErrors, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkAddCustomizationChoicesApplicationErrors, type BulkAddCustomizationChoicesOptions, type BulkAddCustomizationChoicesRequest, type BulkAddCustomizationChoicesResponse, type BulkAddCustomizationChoicesValidationErrors, type BulkCreateCustomizationsApplicationErrors, type BulkCreateCustomizationsForMigrationRequest, type BulkCreateCustomizationsForMigrationResponse, type BulkCreateCustomizationsOptions, type BulkCreateCustomizationsRequest, type BulkCreateCustomizationsResponse, type BulkCreateCustomizationsValidationErrors, type BulkCustomizationResult, type BulkUpdateCustomizationsApplicationErrors, type BulkUpdateCustomizationsOptions, type BulkUpdateCustomizationsRequest, type BulkUpdateCustomizationsResponse, type CatalogRollbackRequested, type Choice, type ChoiceIdsMismatchData, ChoiceSortStrategy, type ChoiceSortStrategyWithLiterals, ChoiceType, type ChoiceTypeWithLiterals, type ChoiceValueOneOf, type ChoicesSettings, type CommonQueryWithEntityContext, type CountCustomizationsOptions, type CountCustomizationsRequest, type CountCustomizationsResponse, type CreateCustomizationApplicationErrors, type CreateCustomizationOptions, type CreateCustomizationRequest, type CreateCustomizationResponse, type CreateCustomizationValidationErrors, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type Customization, type CustomizationChoices, type CustomizationCreatedEnvelope, type CustomizationCustomizationSettingsOneOf, type CustomizationDeletedEnvelope, type CustomizationIdsWrapper, type CustomizationQuery, type CustomizationQuerySpec, CustomizationRenderType, type CustomizationRenderTypeWithLiterals, CustomizationType, type CustomizationTypeSpecificSettingsOneOf, type CustomizationTypeWithLiterals, type CustomizationUpdatedEnvelope, type CustomizationsQueryBuilder, type CustomizationsQueryResult, type DeleteCustomizationRequest, type DeleteCustomizationResponse, type DeleteCustomizationValidationErrors, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type FocalPoint, type FreeTextSettings, type GetCustomizationOptions, type GetCustomizationRequest, type GetCustomizationResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type MaskedChoice, type MaskedCustomization, type MessageEnvelope, type ModifierSettings, type MultipleColors, type Page, type Pages, type QueryCustomizationsOptions, type QueryCustomizationsRequest, type QueryCustomizationsResponse, type RecloneSiteRequest, type RecloneSiteResponse, type RemoveCustomizationChoicesApplicationErrors, type RemoveCustomizationChoicesOptions, type RemoveCustomizationChoicesRequest, type RemoveCustomizationChoicesResponse, type RemoveCustomizationChoicesValidationErrors, type ReorderCustomizationChoicesApplicationErrors, type ReorderCustomizationChoicesOptions, type ReorderCustomizationChoicesRequest, type ReorderCustomizationChoicesResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type SetCustomizationChoicesApplicationErrors, type SetCustomizationChoicesOptions, type SetCustomizationChoicesRequest, type SetCustomizationChoicesResponse, type SetCustomizationChoicesValidationErrors, SortOrder, type SortOrderWithLiterals, type Sorting, type URI, type URIs, type UpdateCustomization, type UpdateCustomizationApplicationErrors, type UpdateCustomizationChoicesApplicationErrors, type UpdateCustomizationChoicesOptions, type UpdateCustomizationChoicesRequest, type UpdateCustomizationChoicesResponse, type UpdateCustomizationChoicesValidationErrors, type UpdateCustomizationOptions, type UpdateCustomizationRequest, type UpdateCustomizationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, countCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, reorderCustomizationChoices, setCustomizationChoices, typedQueryCustomizations, updateCustomization, updateCustomizationChoices, utils };
|
|
@@ -789,10 +789,13 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
789
789
|
WebhookIdentityType2["APP"] = "APP";
|
|
790
790
|
return WebhookIdentityType2;
|
|
791
791
|
})(WebhookIdentityType || {});
|
|
792
|
-
async function createCustomization2(customization) {
|
|
793
|
-
const { httpClient, sideEffects } = arguments[
|
|
792
|
+
async function createCustomization2(customization, options) {
|
|
793
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
794
794
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
795
|
-
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
795
|
+
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
796
|
+
customization,
|
|
797
|
+
fields: options?.fields
|
|
798
|
+
}),
|
|
796
799
|
[
|
|
797
800
|
{
|
|
798
801
|
transformFn: import_image.transformSDKImageToRESTImage,
|
|
@@ -818,10 +821,13 @@ async function createCustomization2(customization) {
|
|
|
818
821
|
err,
|
|
819
822
|
{
|
|
820
823
|
spreadPathsToArguments: {},
|
|
821
|
-
explicitPathsToArguments: {
|
|
824
|
+
explicitPathsToArguments: {
|
|
825
|
+
customization: "$[0]",
|
|
826
|
+
fields: "$[1].fields"
|
|
827
|
+
},
|
|
822
828
|
singleArgumentUnchanged: false
|
|
823
829
|
},
|
|
824
|
-
["customization"]
|
|
830
|
+
["customization", "options"]
|
|
825
831
|
);
|
|
826
832
|
sideEffects?.onError?.(err);
|
|
827
833
|
throw transformedError;
|
|
@@ -1051,7 +1057,8 @@ async function bulkCreateCustomizations2(customizations, options) {
|
|
|
1051
1057
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
1052
1058
|
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1053
1059
|
customizations,
|
|
1054
|
-
returnEntity: options?.returnEntity
|
|
1060
|
+
returnEntity: options?.returnEntity,
|
|
1061
|
+
fields: options?.fields
|
|
1055
1062
|
}),
|
|
1056
1063
|
[
|
|
1057
1064
|
{
|
|
@@ -1080,7 +1087,8 @@ async function bulkCreateCustomizations2(customizations, options) {
|
|
|
1080
1087
|
spreadPathsToArguments: {},
|
|
1081
1088
|
explicitPathsToArguments: {
|
|
1082
1089
|
customizations: "$[0]",
|
|
1083
|
-
returnEntity: "$[1].returnEntity"
|
|
1090
|
+
returnEntity: "$[1].returnEntity",
|
|
1091
|
+
fields: "$[1].fields"
|
|
1084
1092
|
},
|
|
1085
1093
|
singleArgumentUnchanged: false
|
|
1086
1094
|
},
|