@wix/auto_sdk_stores_ribbons-v-3 1.0.24 → 1.0.25
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 +47 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +28 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +10 -25
- package/build/es/index.mjs +47 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +27 -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 +47 -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 +28 -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 +47 -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 +27 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Ribbon, GetRibbonOptions, UpdateRibbon, UpdateRibbonOptions,
|
|
3
|
-
export { ActionEvent, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateRibbonsRequest, BulkDeleteRibbonsRequest, BulkGetOrCreateRibbonsRequest, BulkRibbonResult, BulkUpdateRibbonsRequest, CreateRibbonRequest, CreateRibbonResponse, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { Ribbon, GetRibbonOptions, UpdateRibbon, UpdateRibbonOptions, BulkCreateRibbonsOptions, BulkCreateRibbonsResponse, MaskedRibbon, BulkUpdateRibbonsOptions, BulkUpdateRibbonsResponse, GetOrCreateRibbonOptions, GetOrCreateRibbonResponse, BulkGetOrCreateRibbonsOptions, BulkGetOrCreateRibbonsResponse, BulkDeleteRibbonsResponse, RibbonCreatedEnvelope, RibbonDeletedEnvelope, RibbonUpdatedEnvelope, CursorQuery, typedQueryRibbons, QueryRibbonsOptions, RibbonsQueryBuilder } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateRibbonsRequest, BulkDeleteRibbonsRequest, BulkGetOrCreateRibbonsRequest, BulkRibbonResult, BulkUpdateRibbonsRequest, CreateRibbonRequest, CreateRibbonResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, CustomTag, DeleteRibbonRequest, DeleteRibbonResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, File, GetOrCreateRibbonRequest, GetRibbonRequest, GetRibbonResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ItemMetadata, MessageEnvelope, Page, QueryRibbonsRequest, QueryRibbonsResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, RibbonsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, URI, UpdateRibbonRequest, UpdateRibbonResponse, V3BulkRibbonResult, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createRibbon$1(httpClient: HttpClient): CreateRibbonSignature;
|
|
6
6
|
interface CreateRibbonSignature {
|
|
@@ -47,27 +47,6 @@ interface DeleteRibbonSignature {
|
|
|
47
47
|
*/
|
|
48
48
|
(ribbonId: string): Promise<void>;
|
|
49
49
|
}
|
|
50
|
-
declare function queryRibbons$1(httpClient: HttpClient): QueryRibbonsSignature;
|
|
51
|
-
interface QueryRibbonsSignature {
|
|
52
|
-
/**
|
|
53
|
-
* Retrieves a list of up to 100 ribbons, given the provided filtering, sorting, and cursor paging.
|
|
54
|
-
* Pass supported values to the `fields` array in the request to include those fields in the response.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* Query Brands runs with these defaults, which you can override:
|
|
58
|
-
*
|
|
59
|
-
* - `createdDate` is sorted in `DESC` order
|
|
60
|
-
* - `cursorPaging.limit` is `100`
|
|
61
|
-
*
|
|
62
|
-
* For field support for filters and sorting,
|
|
63
|
-
* see [Ribbons: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/ribbons-v3/supported-filters-and-sorting).
|
|
64
|
-
*
|
|
65
|
-
* To learn about working with _Query_ endpoints, see
|
|
66
|
-
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language),
|
|
67
|
-
* and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
|
|
68
|
-
*/
|
|
69
|
-
(options?: QueryRibbonsOptions): RibbonsQueryBuilder;
|
|
70
|
-
}
|
|
71
50
|
declare function bulkCreateRibbons$1(httpClient: HttpClient): BulkCreateRibbonsSignature;
|
|
72
51
|
interface BulkCreateRibbonsSignature {
|
|
73
52
|
/**
|
|
@@ -116,16 +95,22 @@ declare const onRibbonCreated$1: EventDefinition<RibbonCreatedEnvelope, "wix.sto
|
|
|
116
95
|
declare const onRibbonDeleted$1: EventDefinition<RibbonDeletedEnvelope, "wix.stores.catalog.v3.ribbon_deleted">;
|
|
117
96
|
declare const onRibbonUpdated$1: EventDefinition<RibbonUpdatedEnvelope, "wix.stores.catalog.v3.ribbon_updated">;
|
|
118
97
|
|
|
98
|
+
declare function customQueryRibbons(httpClient: HttpClient): {
|
|
99
|
+
(query: CursorQuery): ReturnType<typeof typedQueryRibbons>;
|
|
100
|
+
(query: CursorQuery, options: QueryRibbonsOptions): ReturnType<typeof typedQueryRibbons>;
|
|
101
|
+
(): RibbonsQueryBuilder;
|
|
102
|
+
(options: QueryRibbonsOptions): RibbonsQueryBuilder;
|
|
103
|
+
};
|
|
119
104
|
declare const createRibbon: MaybeContext<BuildRESTFunction<typeof createRibbon$1> & typeof createRibbon$1>;
|
|
120
105
|
declare const getRibbon: MaybeContext<BuildRESTFunction<typeof getRibbon$1> & typeof getRibbon$1>;
|
|
121
106
|
declare const updateRibbon: MaybeContext<BuildRESTFunction<typeof updateRibbon$1> & typeof updateRibbon$1>;
|
|
122
107
|
declare const deleteRibbon: MaybeContext<BuildRESTFunction<typeof deleteRibbon$1> & typeof deleteRibbon$1>;
|
|
123
|
-
declare const queryRibbons: MaybeContext<BuildRESTFunction<typeof queryRibbons$1> & typeof queryRibbons$1>;
|
|
124
108
|
declare const bulkCreateRibbons: MaybeContext<BuildRESTFunction<typeof bulkCreateRibbons$1> & typeof bulkCreateRibbons$1>;
|
|
125
109
|
declare const bulkUpdateRibbons: MaybeContext<BuildRESTFunction<typeof bulkUpdateRibbons$1> & typeof bulkUpdateRibbons$1>;
|
|
126
110
|
declare const getOrCreateRibbon: MaybeContext<BuildRESTFunction<typeof getOrCreateRibbon$1> & typeof getOrCreateRibbon$1>;
|
|
127
111
|
declare const bulkGetOrCreateRibbons: MaybeContext<BuildRESTFunction<typeof bulkGetOrCreateRibbons$1> & typeof bulkGetOrCreateRibbons$1>;
|
|
128
112
|
declare const bulkDeleteRibbons: MaybeContext<BuildRESTFunction<typeof bulkDeleteRibbons$1> & typeof bulkDeleteRibbons$1>;
|
|
113
|
+
declare const queryRibbons: MaybeContext<BuildRESTFunction<typeof customQueryRibbons> & typeof customQueryRibbons>;
|
|
129
114
|
/** */
|
|
130
115
|
declare const onRibbonCreated: BuildEventDefinition<typeof onRibbonCreated$1> & typeof onRibbonCreated$1;
|
|
131
116
|
/** */
|
|
@@ -133,4 +118,4 @@ declare const onRibbonDeleted: BuildEventDefinition<typeof onRibbonDeleted$1> &
|
|
|
133
118
|
/** */
|
|
134
119
|
declare const onRibbonUpdated: BuildEventDefinition<typeof onRibbonUpdated$1> & typeof onRibbonUpdated$1;
|
|
135
120
|
|
|
136
|
-
export { BulkCreateRibbonsOptions, BulkCreateRibbonsResponse, BulkDeleteRibbonsResponse, BulkGetOrCreateRibbonsOptions, BulkGetOrCreateRibbonsResponse, BulkUpdateRibbonsOptions, BulkUpdateRibbonsResponse, GetOrCreateRibbonOptions, GetOrCreateRibbonResponse, GetRibbonOptions, MaskedRibbon, QueryRibbonsOptions, Ribbon, RibbonCreatedEnvelope, RibbonDeletedEnvelope, RibbonUpdatedEnvelope, RibbonsQueryBuilder, UpdateRibbon, UpdateRibbonOptions, bulkCreateRibbons, bulkDeleteRibbons, bulkGetOrCreateRibbons, bulkUpdateRibbons, createRibbon, deleteRibbon, getOrCreateRibbon, getRibbon, onRibbonCreated, onRibbonDeleted, onRibbonUpdated, queryRibbons, updateRibbon };
|
|
121
|
+
export { BulkCreateRibbonsOptions, BulkCreateRibbonsResponse, BulkDeleteRibbonsResponse, BulkGetOrCreateRibbonsOptions, BulkGetOrCreateRibbonsResponse, BulkUpdateRibbonsOptions, BulkUpdateRibbonsResponse, CursorQuery, GetOrCreateRibbonOptions, GetOrCreateRibbonResponse, GetRibbonOptions, MaskedRibbon, QueryRibbonsOptions, Ribbon, RibbonCreatedEnvelope, RibbonDeletedEnvelope, RibbonUpdatedEnvelope, RibbonsQueryBuilder, UpdateRibbon, UpdateRibbonOptions, bulkCreateRibbons, bulkDeleteRibbons, bulkGetOrCreateRibbons, bulkUpdateRibbons, createRibbon, deleteRibbon, getOrCreateRibbon, getRibbon, onRibbonCreated, onRibbonDeleted, onRibbonUpdated, queryRibbons, updateRibbon };
|
package/build/cjs/index.js
CHANGED
|
@@ -596,6 +596,32 @@ function queryRibbons2(options) {
|
|
|
596
596
|
transformationPaths: {}
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
|
+
async function typedQueryRibbons(query, options) {
|
|
600
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
601
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
602
|
+
query,
|
|
603
|
+
...options
|
|
604
|
+
});
|
|
605
|
+
const reqOpts = queryRibbons(payload);
|
|
606
|
+
sideEffects?.onSiteCall?.();
|
|
607
|
+
try {
|
|
608
|
+
const result = await httpClient.request(reqOpts);
|
|
609
|
+
sideEffects?.onSuccess?.(result);
|
|
610
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
611
|
+
} catch (err) {
|
|
612
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
613
|
+
err,
|
|
614
|
+
{
|
|
615
|
+
spreadPathsToArguments: {},
|
|
616
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
617
|
+
singleArgumentUnchanged: false
|
|
618
|
+
},
|
|
619
|
+
["query", "options"]
|
|
620
|
+
);
|
|
621
|
+
sideEffects?.onError?.(err);
|
|
622
|
+
throw transformedError;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
599
625
|
async function bulkCreateRibbons2(ribbons, options) {
|
|
600
626
|
const { httpClient, sideEffects } = arguments[2];
|
|
601
627
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -776,6 +802,14 @@ function queryRibbons3(httpClient) {
|
|
|
776
802
|
{ httpClient }
|
|
777
803
|
);
|
|
778
804
|
}
|
|
805
|
+
function typedQueryRibbons2(httpClient) {
|
|
806
|
+
return (query, options) => typedQueryRibbons(
|
|
807
|
+
query,
|
|
808
|
+
options,
|
|
809
|
+
// @ts-ignore
|
|
810
|
+
{ httpClient }
|
|
811
|
+
);
|
|
812
|
+
}
|
|
779
813
|
function bulkCreateRibbons3(httpClient) {
|
|
780
814
|
return (ribbons, options) => bulkCreateRibbons2(
|
|
781
815
|
ribbons,
|
|
@@ -867,16 +901,28 @@ var onRibbonUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
867
901
|
// src/stores-catalog-v3-ribbon-ribbons-v-3.context.ts
|
|
868
902
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
869
903
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
904
|
+
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
905
|
+
function customQueryRibbons(httpClient) {
|
|
906
|
+
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
907
|
+
builderQueryFunction: (options) => queryRibbons3(httpClient)(options),
|
|
908
|
+
typedQueryFunction: (query, options) => typedQueryRibbons2(httpClient)(query, options),
|
|
909
|
+
hasOptionsParameter: true
|
|
910
|
+
});
|
|
911
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
912
|
+
return router(...arguments);
|
|
913
|
+
}
|
|
914
|
+
return overloadedQuery;
|
|
915
|
+
}
|
|
870
916
|
var createRibbon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createRibbon3);
|
|
871
917
|
var getRibbon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getRibbon3);
|
|
872
918
|
var updateRibbon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateRibbon3);
|
|
873
919
|
var deleteRibbon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteRibbon3);
|
|
874
|
-
var queryRibbons4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryRibbons3);
|
|
875
920
|
var bulkCreateRibbons4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateRibbons3);
|
|
876
921
|
var bulkUpdateRibbons4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateRibbons3);
|
|
877
922
|
var getOrCreateRibbon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getOrCreateRibbon3);
|
|
878
923
|
var bulkGetOrCreateRibbons4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkGetOrCreateRibbons3);
|
|
879
924
|
var bulkDeleteRibbons4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteRibbons3);
|
|
925
|
+
var queryRibbons4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryRibbons);
|
|
880
926
|
var onRibbonCreated2 = (0, import_event_definition_modules.createEventModule)(onRibbonCreated);
|
|
881
927
|
var onRibbonDeleted2 = (0, import_event_definition_modules.createEventModule)(onRibbonDeleted);
|
|
882
928
|
var onRibbonUpdated2 = (0, import_event_definition_modules.createEventModule)(onRibbonUpdated);
|