@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.
@@ -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>): 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> & {
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 };
@@ -744,10 +744,13 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
744
744
  WebhookIdentityType2["APP"] = "APP";
745
745
  return WebhookIdentityType2;
746
746
  })(WebhookIdentityType || {});
747
- async function createCustomization2(customization) {
748
- const { httpClient, sideEffects } = arguments[1];
747
+ async function createCustomization2(customization, options) {
748
+ const { httpClient, sideEffects } = arguments[2];
749
749
  const payload = transformPaths2(
750
- renameKeysFromSDKRequestToRESTRequest({ customization }),
750
+ renameKeysFromSDKRequestToRESTRequest({
751
+ customization,
752
+ fields: options?.fields
753
+ }),
751
754
  [
752
755
  {
753
756
  transformFn: transformSDKImageToRESTImage,
@@ -773,10 +776,13 @@ async function createCustomization2(customization) {
773
776
  err,
774
777
  {
775
778
  spreadPathsToArguments: {},
776
- explicitPathsToArguments: { customization: "$[0]" },
779
+ explicitPathsToArguments: {
780
+ customization: "$[0]",
781
+ fields: "$[1].fields"
782
+ },
777
783
  singleArgumentUnchanged: false
778
784
  },
779
- ["customization"]
785
+ ["customization", "options"]
780
786
  );
781
787
  sideEffects?.onError?.(err);
782
788
  throw transformedError;
@@ -1006,7 +1012,8 @@ async function bulkCreateCustomizations2(customizations, options) {
1006
1012
  const payload = transformPaths2(
1007
1013
  renameKeysFromSDKRequestToRESTRequest({
1008
1014
  customizations,
1009
- returnEntity: options?.returnEntity
1015
+ returnEntity: options?.returnEntity,
1016
+ fields: options?.fields
1010
1017
  }),
1011
1018
  [
1012
1019
  {
@@ -1035,7 +1042,8 @@ async function bulkCreateCustomizations2(customizations, options) {
1035
1042
  spreadPathsToArguments: {},
1036
1043
  explicitPathsToArguments: {
1037
1044
  customizations: "$[0]",
1038
- returnEntity: "$[1].returnEntity"
1045
+ returnEntity: "$[1].returnEntity",
1046
+ fields: "$[1].fields"
1039
1047
  },
1040
1048
  singleArgumentUnchanged: false
1041
1049
  },