@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Customization, CreateCustomizationApplicationErrors, CreateCustomizationValidationErrors, GetCustomizationOptions, UpdateCustomization, UpdateCustomizationOptions, DeleteCustomizationValidationErrors,
|
|
3
|
-
export { ActionEvent, AddCustomizationChoicesRequest, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkAddCustomizationChoicesRequest, BulkCreateCustomizationsRequest, BulkCustomizationResult, BulkUpdateCustomizationsRequest, ChoiceType, ChoiceTypeWithLiterals, ChoiceValueOneOf, ChoicesSettings, CreateCustomizationRequest, CreateCustomizationResponse, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { Customization, CreateCustomizationApplicationErrors, CreateCustomizationValidationErrors, GetCustomizationOptions, UpdateCustomization, UpdateCustomizationOptions, DeleteCustomizationValidationErrors, BulkCreateCustomizationsOptions, BulkCreateCustomizationsResponse, BulkCreateCustomizationsApplicationErrors, BulkCreateCustomizationsValidationErrors, Choice, AddCustomizationChoicesOptions, AddCustomizationChoicesResponse, AddCustomizationChoicesApplicationErrors, AddCustomizationChoicesValidationErrors, SetCustomizationChoicesOptions, SetCustomizationChoicesResponse, SetCustomizationChoicesApplicationErrors, SetCustomizationChoicesValidationErrors, RemoveCustomizationChoicesOptions, RemoveCustomizationChoicesResponse, RemoveCustomizationChoicesApplicationErrors, RemoveCustomizationChoicesValidationErrors, CustomizationChoices, BulkAddCustomizationChoicesOptions, BulkAddCustomizationChoicesResponse, BulkAddCustomizationChoicesApplicationErrors, BulkAddCustomizationChoicesValidationErrors, MaskedCustomization, BulkUpdateCustomizationsOptions, BulkUpdateCustomizationsResponse, CustomizationCreatedEnvelope, CustomizationDeletedEnvelope, CustomizationUpdatedEnvelope, CursorQuery, typedQueryCustomizations, QueryCustomizationsOptions, CustomizationsQueryBuilder } from './index.typings.mjs';
|
|
3
|
+
export { ActionEvent, AddCustomizationChoicesRequest, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkAddCustomizationChoicesRequest, BulkCreateCustomizationsRequest, BulkCustomizationResult, BulkUpdateCustomizationsRequest, ChoiceType, ChoiceTypeWithLiterals, ChoiceValueOneOf, ChoicesSettings, CreateCustomizationRequest, CreateCustomizationResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, CustomTag, CustomizationCustomizationSettingsOneOf, CustomizationIdsWrapper, CustomizationRenderType, CustomizationRenderTypeWithLiterals, CustomizationType, CustomizationTypeWithLiterals, CustomizationsQueryResult, DeleteCustomizationRequest, DeleteCustomizationResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, File, FocalPoint, FreeTextSettings, GetCustomizationRequest, GetCustomizationResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ItemMetadata, MessageEnvelope, MultipleColors, Page, QueryCustomizationsRequest, QueryCustomizationsResponse, RemoveCustomizationChoicesRequest, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SetCustomizationChoicesRequest, SortOrder, SortOrderWithLiterals, Sorting, URI, UpdateCustomizationRequest, UpdateCustomizationResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createCustomization$1(httpClient: HttpClient): CreateCustomizationSignature;
|
|
6
6
|
interface CreateCustomizationSignature {
|
|
@@ -48,27 +48,6 @@ interface DeleteCustomizationSignature {
|
|
|
48
48
|
__validationErrorsType?: DeleteCustomizationValidationErrors;
|
|
49
49
|
}>;
|
|
50
50
|
}
|
|
51
|
-
declare function queryCustomizations$1(httpClient: HttpClient): QueryCustomizationsSignature;
|
|
52
|
-
interface QueryCustomizationsSignature {
|
|
53
|
-
/**
|
|
54
|
-
* Retrieves a list of up to 100 customizations, given the provided filtering, sorting, and cursor paging.
|
|
55
|
-
* Pass supported values to the `fields` array in the request to include those fields in the response.
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* Query Customizations runs with these defaults, which you can override:
|
|
59
|
-
*
|
|
60
|
-
* - `createdDate` is sorted in `DESC` order
|
|
61
|
-
* - `cursorPaging.limit` is `100`
|
|
62
|
-
*
|
|
63
|
-
* For field support for filters and sorting,
|
|
64
|
-
* see [Customizations: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/customizations-v3/supported-filters-and-sorting).
|
|
65
|
-
*
|
|
66
|
-
* To learn about working with _Query_ endpoints, see
|
|
67
|
-
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language),
|
|
68
|
-
* and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
|
|
69
|
-
*/
|
|
70
|
-
(options?: QueryCustomizationsOptions): CustomizationsQueryBuilder;
|
|
71
|
-
}
|
|
72
51
|
declare function bulkCreateCustomizations$1(httpClient: HttpClient): BulkCreateCustomizationsSignature;
|
|
73
52
|
interface BulkCreateCustomizationsSignature {
|
|
74
53
|
/**
|
|
@@ -147,17 +126,23 @@ declare const onCustomizationCreated$1: EventDefinition<CustomizationCreatedEnve
|
|
|
147
126
|
declare const onCustomizationDeleted$1: EventDefinition<CustomizationDeletedEnvelope, "wix.stores.catalog.v3.customization_deleted">;
|
|
148
127
|
declare const onCustomizationUpdated$1: EventDefinition<CustomizationUpdatedEnvelope, "wix.stores.catalog.v3.customization_updated">;
|
|
149
128
|
|
|
129
|
+
declare function customQueryCustomizations(httpClient: HttpClient): {
|
|
130
|
+
(query: CursorQuery): ReturnType<typeof typedQueryCustomizations>;
|
|
131
|
+
(query: CursorQuery, options: QueryCustomizationsOptions): ReturnType<typeof typedQueryCustomizations>;
|
|
132
|
+
(): CustomizationsQueryBuilder;
|
|
133
|
+
(options: QueryCustomizationsOptions): CustomizationsQueryBuilder;
|
|
134
|
+
};
|
|
150
135
|
declare const createCustomization: MaybeContext<BuildRESTFunction<typeof createCustomization$1> & typeof createCustomization$1>;
|
|
151
136
|
declare const getCustomization: MaybeContext<BuildRESTFunction<typeof getCustomization$1> & typeof getCustomization$1>;
|
|
152
137
|
declare const updateCustomization: MaybeContext<BuildRESTFunction<typeof updateCustomization$1> & typeof updateCustomization$1>;
|
|
153
138
|
declare const deleteCustomization: MaybeContext<BuildRESTFunction<typeof deleteCustomization$1> & typeof deleteCustomization$1>;
|
|
154
|
-
declare const queryCustomizations: MaybeContext<BuildRESTFunction<typeof queryCustomizations$1> & typeof queryCustomizations$1>;
|
|
155
139
|
declare const bulkCreateCustomizations: MaybeContext<BuildRESTFunction<typeof bulkCreateCustomizations$1> & typeof bulkCreateCustomizations$1>;
|
|
156
140
|
declare const addCustomizationChoices: MaybeContext<BuildRESTFunction<typeof addCustomizationChoices$1> & typeof addCustomizationChoices$1>;
|
|
157
141
|
declare const setCustomizationChoices: MaybeContext<BuildRESTFunction<typeof setCustomizationChoices$1> & typeof setCustomizationChoices$1>;
|
|
158
142
|
declare const removeCustomizationChoices: MaybeContext<BuildRESTFunction<typeof removeCustomizationChoices$1> & typeof removeCustomizationChoices$1>;
|
|
159
143
|
declare const bulkAddCustomizationChoices: MaybeContext<BuildRESTFunction<typeof bulkAddCustomizationChoices$1> & typeof bulkAddCustomizationChoices$1>;
|
|
160
144
|
declare const bulkUpdateCustomizations: MaybeContext<BuildRESTFunction<typeof bulkUpdateCustomizations$1> & typeof bulkUpdateCustomizations$1>;
|
|
145
|
+
declare const queryCustomizations: MaybeContext<BuildRESTFunction<typeof customQueryCustomizations> & typeof customQueryCustomizations>;
|
|
161
146
|
/**
|
|
162
147
|
* Triggered when a customization is created.
|
|
163
148
|
*/
|
|
@@ -171,4 +156,4 @@ declare const onCustomizationDeleted: BuildEventDefinition<typeof onCustomizatio
|
|
|
171
156
|
*/
|
|
172
157
|
declare const onCustomizationUpdated: BuildEventDefinition<typeof onCustomizationUpdated$1> & typeof onCustomizationUpdated$1;
|
|
173
158
|
|
|
174
|
-
export { AddCustomizationChoicesApplicationErrors, AddCustomizationChoicesOptions, AddCustomizationChoicesResponse, AddCustomizationChoicesValidationErrors, BulkAddCustomizationChoicesApplicationErrors, BulkAddCustomizationChoicesOptions, BulkAddCustomizationChoicesResponse, BulkAddCustomizationChoicesValidationErrors, BulkCreateCustomizationsApplicationErrors, BulkCreateCustomizationsOptions, BulkCreateCustomizationsResponse, BulkCreateCustomizationsValidationErrors, BulkUpdateCustomizationsOptions, BulkUpdateCustomizationsResponse, Choice, CreateCustomizationApplicationErrors, CreateCustomizationValidationErrors, Customization, CustomizationChoices, CustomizationCreatedEnvelope, CustomizationDeletedEnvelope, CustomizationUpdatedEnvelope, CustomizationsQueryBuilder, DeleteCustomizationValidationErrors, GetCustomizationOptions, MaskedCustomization, QueryCustomizationsOptions, RemoveCustomizationChoicesApplicationErrors, RemoveCustomizationChoicesOptions, RemoveCustomizationChoicesResponse, RemoveCustomizationChoicesValidationErrors, SetCustomizationChoicesApplicationErrors, SetCustomizationChoicesOptions, SetCustomizationChoicesResponse, SetCustomizationChoicesValidationErrors, UpdateCustomization, UpdateCustomizationOptions, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, setCustomizationChoices, updateCustomization };
|
|
159
|
+
export { AddCustomizationChoicesApplicationErrors, AddCustomizationChoicesOptions, AddCustomizationChoicesResponse, AddCustomizationChoicesValidationErrors, BulkAddCustomizationChoicesApplicationErrors, BulkAddCustomizationChoicesOptions, BulkAddCustomizationChoicesResponse, BulkAddCustomizationChoicesValidationErrors, BulkCreateCustomizationsApplicationErrors, BulkCreateCustomizationsOptions, BulkCreateCustomizationsResponse, BulkCreateCustomizationsValidationErrors, BulkUpdateCustomizationsOptions, BulkUpdateCustomizationsResponse, Choice, CreateCustomizationApplicationErrors, CreateCustomizationValidationErrors, CursorQuery, Customization, CustomizationChoices, CustomizationCreatedEnvelope, CustomizationDeletedEnvelope, CustomizationUpdatedEnvelope, CustomizationsQueryBuilder, DeleteCustomizationValidationErrors, GetCustomizationOptions, MaskedCustomization, QueryCustomizationsOptions, RemoveCustomizationChoicesApplicationErrors, RemoveCustomizationChoicesOptions, RemoveCustomizationChoicesResponse, RemoveCustomizationChoicesValidationErrors, SetCustomizationChoicesApplicationErrors, SetCustomizationChoicesOptions, SetCustomizationChoicesResponse, SetCustomizationChoicesValidationErrors, UpdateCustomization, UpdateCustomizationOptions, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, setCustomizationChoices, updateCustomization };
|
|
@@ -915,6 +915,39 @@ function queryCustomizations2(options) {
|
|
|
915
915
|
transformationPaths: {}
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
|
+
async function typedQueryCustomizations(query, options) {
|
|
919
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
920
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
921
|
+
query,
|
|
922
|
+
...options
|
|
923
|
+
});
|
|
924
|
+
const reqOpts = queryCustomizations(payload);
|
|
925
|
+
sideEffects?.onSiteCall?.();
|
|
926
|
+
try {
|
|
927
|
+
const result = await httpClient.request(reqOpts);
|
|
928
|
+
sideEffects?.onSuccess?.(result);
|
|
929
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
930
|
+
transformPaths2(result.data, [
|
|
931
|
+
{
|
|
932
|
+
transformFn: transformRESTImageToSDKImage,
|
|
933
|
+
paths: [{ path: "customizations.choicesSettings.choices.image" }]
|
|
934
|
+
}
|
|
935
|
+
])
|
|
936
|
+
);
|
|
937
|
+
} catch (err) {
|
|
938
|
+
const transformedError = sdkTransformError(
|
|
939
|
+
err,
|
|
940
|
+
{
|
|
941
|
+
spreadPathsToArguments: {},
|
|
942
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
943
|
+
singleArgumentUnchanged: false
|
|
944
|
+
},
|
|
945
|
+
["query", "options"]
|
|
946
|
+
);
|
|
947
|
+
sideEffects?.onError?.(err);
|
|
948
|
+
throw transformedError;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
918
951
|
async function bulkCreateCustomizations2(customizations, options) {
|
|
919
952
|
const { httpClient, sideEffects } = arguments[2];
|
|
920
953
|
const payload = transformPaths2(
|
|
@@ -1237,6 +1270,14 @@ function queryCustomizations3(httpClient) {
|
|
|
1237
1270
|
{ httpClient }
|
|
1238
1271
|
);
|
|
1239
1272
|
}
|
|
1273
|
+
function typedQueryCustomizations2(httpClient) {
|
|
1274
|
+
return (query, options) => typedQueryCustomizations(
|
|
1275
|
+
query,
|
|
1276
|
+
options,
|
|
1277
|
+
// @ts-ignore
|
|
1278
|
+
{ httpClient }
|
|
1279
|
+
);
|
|
1280
|
+
}
|
|
1240
1281
|
function bulkCreateCustomizations3(httpClient) {
|
|
1241
1282
|
return (customizations, options) => bulkCreateCustomizations2(
|
|
1242
1283
|
customizations,
|
|
@@ -1352,17 +1393,29 @@ var onCustomizationUpdated = EventDefinition(
|
|
|
1352
1393
|
// src/stores-catalog-v3-customization-customizations-v-3.context.ts
|
|
1353
1394
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
1354
1395
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
1396
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
1397
|
+
function customQueryCustomizations(httpClient) {
|
|
1398
|
+
const router = createQueryOverloadRouter({
|
|
1399
|
+
builderQueryFunction: (options) => queryCustomizations3(httpClient)(options),
|
|
1400
|
+
typedQueryFunction: (query, options) => typedQueryCustomizations2(httpClient)(query, options),
|
|
1401
|
+
hasOptionsParameter: true
|
|
1402
|
+
});
|
|
1403
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
1404
|
+
return router(...arguments);
|
|
1405
|
+
}
|
|
1406
|
+
return overloadedQuery;
|
|
1407
|
+
}
|
|
1355
1408
|
var createCustomization4 = /* @__PURE__ */ createRESTModule(createCustomization3);
|
|
1356
1409
|
var getCustomization4 = /* @__PURE__ */ createRESTModule(getCustomization3);
|
|
1357
1410
|
var updateCustomization4 = /* @__PURE__ */ createRESTModule(updateCustomization3);
|
|
1358
1411
|
var deleteCustomization4 = /* @__PURE__ */ createRESTModule(deleteCustomization3);
|
|
1359
|
-
var queryCustomizations4 = /* @__PURE__ */ createRESTModule(queryCustomizations3);
|
|
1360
1412
|
var bulkCreateCustomizations4 = /* @__PURE__ */ createRESTModule(bulkCreateCustomizations3);
|
|
1361
1413
|
var addCustomizationChoices4 = /* @__PURE__ */ createRESTModule(addCustomizationChoices3);
|
|
1362
1414
|
var setCustomizationChoices4 = /* @__PURE__ */ createRESTModule(setCustomizationChoices3);
|
|
1363
1415
|
var removeCustomizationChoices4 = /* @__PURE__ */ createRESTModule(removeCustomizationChoices3);
|
|
1364
1416
|
var bulkAddCustomizationChoices4 = /* @__PURE__ */ createRESTModule(bulkAddCustomizationChoices3);
|
|
1365
1417
|
var bulkUpdateCustomizations4 = /* @__PURE__ */ createRESTModule(bulkUpdateCustomizations3);
|
|
1418
|
+
var queryCustomizations4 = /* @__PURE__ */ createRESTModule(customQueryCustomizations);
|
|
1366
1419
|
var onCustomizationCreated2 = createEventModule(
|
|
1367
1420
|
onCustomizationCreated
|
|
1368
1421
|
);
|