@wix/auto_sdk_ecom_local-delivery-options 1.0.27 → 1.0.29

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.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { LocalDeliveryOption, CreateLocalDeliveryOptionApplicationErrors, GetLocalDeliveryOptionOptions, ListLocalDeliveryOptionsResponse, LocalDeliveryOptionsQueryBuilder, UpdateLocalDeliveryOption, DeleteLocalDeliveryOptionOptions, BulkCreateLocalDeliveryOptionResponse, BulkCreateLocalDeliveryOptionApplicationErrors, BulkUpdateLocalDeliveryOptionResponse, AddDeliveryRegionOptions, AddDeliveryRegionResponse, RemoveDeliveryRegionOptions, RemoveDeliveryRegionResponse } from './index.typings.js';
3
- export { ActionEvent, AddDeliveryRegionRequest, AddressLocation, BulkCreateLocalDeliveryOptionRequest, BulkDeleteLocalDeliveryOptionRequest, BulkDeleteLocalDeliveryOptionResponse, BulkUpdateLocalDeliveryOptionRequest, Condition, ConditionType, ConditionTypeWithLiterals, ConditionalRates, CreateLocalDeliveryOptionRequest, CreateLocalDeliveryOptionResponse, CursorPaging, CursorPagingMetadata, Cursors, CustomAreaConfig, DayOfWeek, DayOfWeekWithLiterals, DaySlot, Days, DeleteLocalDeliveryOptionRequest, DeleteLocalDeliveryOptionResponse, Destination, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetLocalDeliveryOptionRequest, GetLocalDeliveryOptionResponse, IdentificationData, IdentificationDataIdOneOf, LengthUnit, LengthUnitWithLiterals, ListLocalDeliveryOptionsRequest, LocalDeliveryAddress, LocalDeliveryOptionConfigOneOf, LocalDeliveryOptionError, LocalDeliveryOptionsQueryResult, LogicalOperator, LogicalOperatorWithLiterals, MessageEnvelope, Paging, QueryLocalDeliveryOptionsRequest, QueryLocalDeliveryOptionsResponse, QueryV2, QueryV2PagingMethodOneOf, RadiusConfig, RemoveDeliveryRegionRequest, RestoreInfo, ScheduledDelivery, SortOrder, SortOrderWithLiterals, Sorting, TimeOfDay, TimePoint, TimeSlot, TimeWindow, UpdateLocalDeliveryOptionRequest, UpdateLocalDeliveryOptionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, ZipCodeConfig } from './index.typings.js';
2
+ import { LocalDeliveryOption, CreateLocalDeliveryOptionApplicationErrors, GetLocalDeliveryOptionOptions, ListLocalDeliveryOptionsResponse, UpdateLocalDeliveryOption, DeleteLocalDeliveryOptionOptions, BulkCreateLocalDeliveryOptionResponse, BulkCreateLocalDeliveryOptionApplicationErrors, BulkUpdateLocalDeliveryOptionResponse, AddDeliveryRegionOptions, AddDeliveryRegionResponse, RemoveDeliveryRegionOptions, RemoveDeliveryRegionResponse, LocalDeliveryOptionsQueryBuilder, QueryV2, typedQueryLocalDeliveryOptions } from './index.typings.js';
3
+ export { ActionEvent, AddDeliveryRegionRequest, AddressLocation, BulkCreateLocalDeliveryOptionRequest, BulkDeleteLocalDeliveryOptionRequest, BulkDeleteLocalDeliveryOptionResponse, BulkUpdateLocalDeliveryOptionRequest, Condition, ConditionType, ConditionTypeWithLiterals, ConditionalRates, CreateLocalDeliveryOptionRequest, CreateLocalDeliveryOptionResponse, CursorPaging, CursorPagingMetadata, Cursors, CustomAreaConfig, DayOfWeek, DayOfWeekWithLiterals, DaySlot, Days, DeleteLocalDeliveryOptionRequest, DeleteLocalDeliveryOptionResponse, Destination, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetLocalDeliveryOptionRequest, GetLocalDeliveryOptionResponse, IdentificationData, IdentificationDataIdOneOf, LengthUnit, LengthUnitWithLiterals, ListLocalDeliveryOptionsRequest, LocalDeliveryAddress, LocalDeliveryOptionConfigOneOf, LocalDeliveryOptionError, LocalDeliveryOptionsQueryResult, LogicalOperator, LogicalOperatorWithLiterals, MessageEnvelope, Paging, QueryLocalDeliveryOptionsRequest, QueryLocalDeliveryOptionsResponse, QueryV2PagingMethodOneOf, RadiusConfig, RemoveDeliveryRegionRequest, RestoreInfo, ScheduledDelivery, SortOrder, SortOrderWithLiterals, Sorting, TimeOfDay, TimePoint, TimeSlot, TimeWindow, UpdateLocalDeliveryOptionRequest, UpdateLocalDeliveryOptionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, ZipCodeConfig } from './index.typings.js';
4
4
 
5
5
  declare function createLocalDeliveryOption$1(httpClient: HttpClient): CreateLocalDeliveryOptionSignature;
6
6
  interface CreateLocalDeliveryOptionSignature {
@@ -19,20 +19,6 @@ interface ListLocalDeliveryOptionsSignature {
19
19
  /** @deprecated method is deprecated due to the fact that external_id is deprecated */
20
20
  (externalId: string): Promise<NonNullablePaths<ListLocalDeliveryOptionsResponse, `localDeliveryOptions` | `localDeliveryOptions.${number}.radiusConfig.radius` | `localDeliveryOptions.${number}.radiusConfig.lengthUnit`, 5>>;
21
21
  }
22
- declare function queryLocalDeliveryOptions$1(httpClient: HttpClient): QueryLocalDeliveryOptionsSignature;
23
- interface QueryLocalDeliveryOptionsSignature {
24
- /**
25
- * Retrieves a list of local delivery options, given the provided paging, filtering, and sorting.
26
- *
27
- * For field support for filters and sorting, see [Local Delivery: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-regions/supported-filters-and-sorting).
28
- *
29
- * To learn about working with _Query_ endpoints, see
30
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
31
- * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging),
32
- * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
33
- */
34
- (): LocalDeliveryOptionsQueryBuilder;
35
- }
36
22
  declare function updateLocalDeliveryOption$1(httpClient: HttpClient): UpdateLocalDeliveryOptionSignature;
37
23
  interface UpdateLocalDeliveryOptionSignature {
38
24
  /** @param - LocalDeliveryOptionId - unique identifier of local delivery option */
@@ -71,10 +57,13 @@ interface RemoveDeliveryRegionSignature {
71
57
  (deliveryRegionId: string, options?: NonNullablePaths<RemoveDeliveryRegionOptions, `localDeliveryOptionId`, 2>): Promise<NonNullablePaths<RemoveDeliveryRegionResponse, `localDeliveryOption.zipConfig.zipCodes` | `localDeliveryOption.radiusConfig.radius` | `localDeliveryOption.radiusConfig.lengthUnit` | `localDeliveryOption.customAreaConfig.geocodes` | `localDeliveryOption.destinations` | `localDeliveryOption.destinations.${number}.code` | `localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots` | `localDeliveryOption.scheduledDeliveryConfig.timeWindows` | `localDeliveryOption.scheduledDeliveryConfig.timeWindows.${number}.day` | `localDeliveryOption.scheduledDeliveryConfig.timeWindows.${number}.start.hours` | `localDeliveryOption.scheduledDeliveryConfig.timeWindows.${number}.start.minutes` | `localDeliveryOption.rates` | `localDeliveryOption.rates.${number}.amount` | `localDeliveryOption.rates.${number}.multiplyByQuantity` | `localDeliveryOption.deliveryRegionIds`, 7>>;
72
58
  }
73
59
 
60
+ declare function customQueryLocalDeliveryOptions(httpClient: HttpClient): {
61
+ (): LocalDeliveryOptionsQueryBuilder;
62
+ (query: QueryV2): ReturnType<typeof typedQueryLocalDeliveryOptions>;
63
+ };
74
64
  declare const createLocalDeliveryOption: MaybeContext<BuildRESTFunction<typeof createLocalDeliveryOption$1> & typeof createLocalDeliveryOption$1>;
75
65
  declare const getLocalDeliveryOption: MaybeContext<BuildRESTFunction<typeof getLocalDeliveryOption$1> & typeof getLocalDeliveryOption$1>;
76
66
  declare const listLocalDeliveryOptions: MaybeContext<BuildRESTFunction<typeof listLocalDeliveryOptions$1> & typeof listLocalDeliveryOptions$1>;
77
- declare const queryLocalDeliveryOptions: MaybeContext<BuildRESTFunction<typeof queryLocalDeliveryOptions$1> & typeof queryLocalDeliveryOptions$1>;
78
67
  declare const updateLocalDeliveryOption: MaybeContext<BuildRESTFunction<typeof updateLocalDeliveryOption$1> & typeof updateLocalDeliveryOption$1>;
79
68
  declare const deleteLocalDeliveryOption: MaybeContext<BuildRESTFunction<typeof deleteLocalDeliveryOption$1> & typeof deleteLocalDeliveryOption$1>;
80
69
  declare const bulkCreateLocalDeliveryOption: MaybeContext<BuildRESTFunction<typeof bulkCreateLocalDeliveryOption$1> & typeof bulkCreateLocalDeliveryOption$1>;
@@ -82,5 +71,6 @@ declare const bulkUpdateLocalDeliveryOption: MaybeContext<BuildRESTFunction<type
82
71
  declare const bulkDeleteLocalDeliveryOption: MaybeContext<BuildRESTFunction<typeof bulkDeleteLocalDeliveryOption$1> & typeof bulkDeleteLocalDeliveryOption$1>;
83
72
  declare const addDeliveryRegion: MaybeContext<BuildRESTFunction<typeof addDeliveryRegion$1> & typeof addDeliveryRegion$1>;
84
73
  declare const removeDeliveryRegion: MaybeContext<BuildRESTFunction<typeof removeDeliveryRegion$1> & typeof removeDeliveryRegion$1>;
74
+ declare const queryLocalDeliveryOptions: MaybeContext<BuildRESTFunction<typeof customQueryLocalDeliveryOptions> & typeof customQueryLocalDeliveryOptions>;
85
75
 
86
- export { AddDeliveryRegionOptions, AddDeliveryRegionResponse, BulkCreateLocalDeliveryOptionApplicationErrors, BulkCreateLocalDeliveryOptionResponse, BulkUpdateLocalDeliveryOptionResponse, CreateLocalDeliveryOptionApplicationErrors, DeleteLocalDeliveryOptionOptions, GetLocalDeliveryOptionOptions, ListLocalDeliveryOptionsResponse, LocalDeliveryOption, LocalDeliveryOptionsQueryBuilder, RemoveDeliveryRegionOptions, RemoveDeliveryRegionResponse, UpdateLocalDeliveryOption, addDeliveryRegion, bulkCreateLocalDeliveryOption, bulkDeleteLocalDeliveryOption, bulkUpdateLocalDeliveryOption, createLocalDeliveryOption, deleteLocalDeliveryOption, getLocalDeliveryOption, listLocalDeliveryOptions, queryLocalDeliveryOptions, removeDeliveryRegion, updateLocalDeliveryOption };
76
+ export { AddDeliveryRegionOptions, AddDeliveryRegionResponse, BulkCreateLocalDeliveryOptionApplicationErrors, BulkCreateLocalDeliveryOptionResponse, BulkUpdateLocalDeliveryOptionResponse, CreateLocalDeliveryOptionApplicationErrors, DeleteLocalDeliveryOptionOptions, GetLocalDeliveryOptionOptions, ListLocalDeliveryOptionsResponse, LocalDeliveryOption, LocalDeliveryOptionsQueryBuilder, QueryV2, RemoveDeliveryRegionOptions, RemoveDeliveryRegionResponse, UpdateLocalDeliveryOption, addDeliveryRegion, bulkCreateLocalDeliveryOption, bulkDeleteLocalDeliveryOption, bulkUpdateLocalDeliveryOption, createLocalDeliveryOption, deleteLocalDeliveryOption, getLocalDeliveryOption, listLocalDeliveryOptions, queryLocalDeliveryOptions, removeDeliveryRegion, updateLocalDeliveryOption };
@@ -884,6 +884,36 @@ function queryLocalDeliveryOptions2() {
884
884
  transformationPaths: {}
885
885
  });
886
886
  }
887
+ async function typedQueryLocalDeliveryOptions(query) {
888
+ const { httpClient, sideEffects } = arguments[1];
889
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
890
+ const reqOpts = queryLocalDeliveryOptions(payload);
891
+ sideEffects?.onSiteCall?.();
892
+ try {
893
+ const result = await httpClient.request(reqOpts);
894
+ sideEffects?.onSuccess?.(result);
895
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
896
+ (0, import_transform_paths2.transformPaths)(result.data, [
897
+ {
898
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
899
+ paths: [{ path: "localDeliveryOptions.radiusConfig.address" }]
900
+ }
901
+ ])
902
+ );
903
+ } catch (err) {
904
+ const transformedError = (0, import_transform_error.transformError)(
905
+ err,
906
+ {
907
+ spreadPathsToArguments: {},
908
+ explicitPathsToArguments: { query: "$[0]" },
909
+ singleArgumentUnchanged: false
910
+ },
911
+ ["query"]
912
+ );
913
+ sideEffects?.onError?.(err);
914
+ throw transformedError;
915
+ }
916
+ }
887
917
  async function updateLocalDeliveryOption2(_id, localDeliveryOption) {
888
918
  const { httpClient, sideEffects } = arguments[2];
889
919
  const payload = (0, import_transform_paths2.transformPaths)(
@@ -1166,6 +1196,13 @@ function queryLocalDeliveryOptions3(httpClient) {
1166
1196
  { httpClient }
1167
1197
  );
1168
1198
  }
1199
+ function typedQueryLocalDeliveryOptions2(httpClient) {
1200
+ return (query) => typedQueryLocalDeliveryOptions(
1201
+ query,
1202
+ // @ts-ignore
1203
+ { httpClient }
1204
+ );
1205
+ }
1169
1206
  function updateLocalDeliveryOption3(httpClient) {
1170
1207
  return (_id, localDeliveryOption) => updateLocalDeliveryOption2(
1171
1208
  _id,
@@ -1222,10 +1259,21 @@ function removeDeliveryRegion3(httpClient) {
1222
1259
 
1223
1260
  // src/ecom-v1-local-delivery-option-local-delivery-options.context.ts
1224
1261
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1262
+ var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
1263
+ function customQueryLocalDeliveryOptions(httpClient) {
1264
+ const router = (0, import_query_method_router.createQueryOverloadRouter)({
1265
+ builderQueryFunction: () => queryLocalDeliveryOptions3(httpClient)(),
1266
+ typedQueryFunction: (query) => typedQueryLocalDeliveryOptions2(httpClient)(query),
1267
+ hasOptionsParameter: false
1268
+ });
1269
+ function overloadedQuery(query) {
1270
+ return router(...arguments);
1271
+ }
1272
+ return overloadedQuery;
1273
+ }
1225
1274
  var createLocalDeliveryOption4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createLocalDeliveryOption3);
1226
1275
  var getLocalDeliveryOption4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getLocalDeliveryOption3);
1227
1276
  var listLocalDeliveryOptions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listLocalDeliveryOptions3);
1228
- var queryLocalDeliveryOptions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryLocalDeliveryOptions3);
1229
1277
  var updateLocalDeliveryOption4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateLocalDeliveryOption3);
1230
1278
  var deleteLocalDeliveryOption4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteLocalDeliveryOption3);
1231
1279
  var bulkCreateLocalDeliveryOption4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateLocalDeliveryOption3);
@@ -1233,6 +1281,7 @@ var bulkUpdateLocalDeliveryOption4 = /* @__PURE__ */ (0, import_rest_modules3.cr
1233
1281
  var bulkDeleteLocalDeliveryOption4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteLocalDeliveryOption3);
1234
1282
  var addDeliveryRegion4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addDeliveryRegion3);
1235
1283
  var removeDeliveryRegion4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeDeliveryRegion3);
1284
+ var queryLocalDeliveryOptions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryLocalDeliveryOptions);
1236
1285
  // Annotate the CommonJS export names for ESM import in node:
1237
1286
  0 && (module.exports = {
1238
1287
  ConditionType,