@wix/auto_sdk_stores_customizations-v-3 1.0.37 → 1.0.39
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 +10 -25
- package/build/cjs/index.js +54 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +35 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +10 -25
- package/build/es/index.mjs +54 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +34 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -25
- package/build/internal/cjs/index.js +54 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +35 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -25
- package/build/internal/es/index.mjs +54 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +34 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -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 };
|
|
@@ -36,6 +36,7 @@ __export(index_typings_exports, {
|
|
|
36
36
|
queryCustomizations: () => queryCustomizations2,
|
|
37
37
|
removeCustomizationChoices: () => removeCustomizationChoices2,
|
|
38
38
|
setCustomizationChoices: () => setCustomizationChoices2,
|
|
39
|
+
typedQueryCustomizations: () => typedQueryCustomizations,
|
|
39
40
|
updateCustomization: () => updateCustomization2
|
|
40
41
|
});
|
|
41
42
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -947,6 +948,39 @@ function queryCustomizations2(options) {
|
|
|
947
948
|
transformationPaths: {}
|
|
948
949
|
});
|
|
949
950
|
}
|
|
951
|
+
async function typedQueryCustomizations(query, options) {
|
|
952
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
953
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
954
|
+
query,
|
|
955
|
+
...options
|
|
956
|
+
});
|
|
957
|
+
const reqOpts = queryCustomizations(payload);
|
|
958
|
+
sideEffects?.onSiteCall?.();
|
|
959
|
+
try {
|
|
960
|
+
const result = await httpClient.request(reqOpts);
|
|
961
|
+
sideEffects?.onSuccess?.(result);
|
|
962
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
963
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
964
|
+
{
|
|
965
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
966
|
+
paths: [{ path: "customizations.choicesSettings.choices.image" }]
|
|
967
|
+
}
|
|
968
|
+
])
|
|
969
|
+
);
|
|
970
|
+
} catch (err) {
|
|
971
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
972
|
+
err,
|
|
973
|
+
{
|
|
974
|
+
spreadPathsToArguments: {},
|
|
975
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
976
|
+
singleArgumentUnchanged: false
|
|
977
|
+
},
|
|
978
|
+
["query", "options"]
|
|
979
|
+
);
|
|
980
|
+
sideEffects?.onError?.(err);
|
|
981
|
+
throw transformedError;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
950
984
|
async function bulkCreateCustomizations2(customizations, options) {
|
|
951
985
|
const { httpClient, sideEffects } = arguments[2];
|
|
952
986
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -1247,6 +1281,7 @@ async function bulkUpdateCustomizations2(customizations, options) {
|
|
|
1247
1281
|
queryCustomizations,
|
|
1248
1282
|
removeCustomizationChoices,
|
|
1249
1283
|
setCustomizationChoices,
|
|
1284
|
+
typedQueryCustomizations,
|
|
1250
1285
|
updateCustomization
|
|
1251
1286
|
});
|
|
1252
1287
|
//# sourceMappingURL=index.typings.js.map
|