@wix/auto_sdk_stores_customizations-v-3 1.0.37 → 1.0.38

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.
@@ -1377,6 +1377,12 @@ interface CustomizationsQueryBuilder {
1377
1377
  skipTo: (cursor: string) => CustomizationsQueryBuilder;
1378
1378
  find: () => Promise<CustomizationsQueryResult>;
1379
1379
  }
1380
+ /**
1381
+ * @hidden
1382
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.QueryCustomizations
1383
+ * @requiredField query
1384
+ */
1385
+ declare function typedQueryCustomizations(query: CursorQuery, options?: QueryCustomizationsOptions): Promise<NonNullablePaths<QueryCustomizationsResponse, `customizations` | `customizations.${number}.freeTextInput.minCharCount` | `customizations.${number}.freeTextInput.maxCharCount` | `customizations.${number}.freeTextInput.title` | `customizations.${number}.name` | `customizations.${number}.customizationType` | `customizations.${number}.customizationRenderType`, 5>>;
1380
1386
  /**
1381
1387
  * Creates multiple brands.
1382
1388
  * @param customizations - Customizations to create.
@@ -1539,4 +1545,4 @@ interface BulkUpdateCustomizationsOptions {
1539
1545
  fields?: RequestedFieldsWithLiterals[];
1540
1546
  }
1541
1547
 
1542
- export { 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 BulkCreateCustomizationsOptions, type BulkCreateCustomizationsRequest, type BulkCreateCustomizationsResponse, type BulkCreateCustomizationsValidationErrors, type BulkCustomizationResult, type BulkUpdateCustomizationsOptions, type BulkUpdateCustomizationsRequest, type BulkUpdateCustomizationsResponse, type Choice, ChoiceType, type ChoiceTypeWithLiterals, type ChoiceValueOneOf, type ChoicesSettings, 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, CustomizationRenderType, type CustomizationRenderTypeWithLiterals, CustomizationType, 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 MaskedCustomization, type MessageEnvelope, type MultipleColors, type Page, type QueryCustomizationsOptions, type QueryCustomizationsRequest, type QueryCustomizationsResponse, type RemoveCustomizationChoicesApplicationErrors, type RemoveCustomizationChoicesOptions, type RemoveCustomizationChoicesRequest, type RemoveCustomizationChoicesResponse, type RemoveCustomizationChoicesValidationErrors, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type SetCustomizationChoicesApplicationErrors, type SetCustomizationChoicesOptions, type SetCustomizationChoicesRequest, type SetCustomizationChoicesResponse, type SetCustomizationChoicesValidationErrors, SortOrder, type SortOrderWithLiterals, type Sorting, type URI, type UpdateCustomization, type UpdateCustomizationOptions, type UpdateCustomizationRequest, type UpdateCustomizationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, setCustomizationChoices, updateCustomization };
1548
+ export { 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 BulkCreateCustomizationsOptions, type BulkCreateCustomizationsRequest, type BulkCreateCustomizationsResponse, type BulkCreateCustomizationsValidationErrors, type BulkCustomizationResult, type BulkUpdateCustomizationsOptions, type BulkUpdateCustomizationsRequest, type BulkUpdateCustomizationsResponse, type Choice, ChoiceType, type ChoiceTypeWithLiterals, type ChoiceValueOneOf, type ChoicesSettings, 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, CustomizationRenderType, type CustomizationRenderTypeWithLiterals, CustomizationType, 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 MaskedCustomization, type MessageEnvelope, type MultipleColors, type Page, type QueryCustomizationsOptions, type QueryCustomizationsRequest, type QueryCustomizationsResponse, type RemoveCustomizationChoicesApplicationErrors, type RemoveCustomizationChoicesOptions, type RemoveCustomizationChoicesRequest, type RemoveCustomizationChoicesResponse, type RemoveCustomizationChoicesValidationErrors, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type SetCustomizationChoicesApplicationErrors, type SetCustomizationChoicesOptions, type SetCustomizationChoicesRequest, type SetCustomizationChoicesResponse, type SetCustomizationChoicesValidationErrors, SortOrder, type SortOrderWithLiterals, type Sorting, type URI, type UpdateCustomization, type UpdateCustomizationOptions, type UpdateCustomizationRequest, type UpdateCustomizationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, setCustomizationChoices, typedQueryCustomizations, updateCustomization };
@@ -908,6 +908,39 @@ function queryCustomizations2(options) {
908
908
  transformationPaths: {}
909
909
  });
910
910
  }
911
+ async function typedQueryCustomizations(query, options) {
912
+ const { httpClient, sideEffects } = arguments[2];
913
+ const payload = renameKeysFromSDKRequestToRESTRequest({
914
+ query,
915
+ ...options
916
+ });
917
+ const reqOpts = queryCustomizations(payload);
918
+ sideEffects?.onSiteCall?.();
919
+ try {
920
+ const result = await httpClient.request(reqOpts);
921
+ sideEffects?.onSuccess?.(result);
922
+ return renameKeysFromRESTResponseToSDKResponse(
923
+ transformPaths2(result.data, [
924
+ {
925
+ transformFn: transformRESTImageToSDKImage,
926
+ paths: [{ path: "customizations.choicesSettings.choices.image" }]
927
+ }
928
+ ])
929
+ );
930
+ } catch (err) {
931
+ const transformedError = sdkTransformError(
932
+ err,
933
+ {
934
+ spreadPathsToArguments: {},
935
+ explicitPathsToArguments: { query: "$[0]" },
936
+ singleArgumentUnchanged: false
937
+ },
938
+ ["query", "options"]
939
+ );
940
+ sideEffects?.onError?.(err);
941
+ throw transformedError;
942
+ }
943
+ }
911
944
  async function bulkCreateCustomizations2(customizations, options) {
912
945
  const { httpClient, sideEffects } = arguments[2];
913
946
  const payload = transformPaths2(
@@ -1207,6 +1240,7 @@ export {
1207
1240
  queryCustomizations2 as queryCustomizations,
1208
1241
  removeCustomizationChoices2 as removeCustomizationChoices,
1209
1242
  setCustomizationChoices2 as setCustomizationChoices,
1243
+ typedQueryCustomizations,
1210
1244
  updateCustomization2 as updateCustomization
1211
1245
  };
1212
1246
  //# sourceMappingURL=index.typings.mjs.map