@wix/auto_sdk_calendar_events 1.0.41 → 1.0.42
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 -27
- 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 -27
- 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 -27
- 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 -27
- 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 { ListEventsByContactIdOptions, ListEventsByContactIdResponse, ListEventsByMemberIdOptions, ListEventsByMemberIdResponse, GetEventOptions, Event, ListEventsOptions, ListEventsResponse,
|
|
3
|
-
export { ActionEvent, Address, AddressHint, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCancelEventRequest, BulkCreateEventRequest, BulkEventResult, BulkUpdateEventRequest, BusinessSchedule, CancelEventRequest, Categories, ChangeContext, ChangeContextPayloadOneOf, CommonCursorPaging, CommonCursorPagingMetadata, CommonCursors, CommonIdentificationData, CommonIdentificationDataIdOneOf, ConferencingDetails, ConsentPolicy, CreateEventRequest, CreateEventResponse, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { ListEventsByContactIdOptions, ListEventsByContactIdResponse, ListEventsByMemberIdOptions, ListEventsByMemberIdResponse, GetEventOptions, Event, ListEventsOptions, ListEventsResponse, CreateEventOptions, MaskedEvent, BulkCreateEventOptions, BulkCreateEventResponse, UpdateEvent, UpdateEventOptions, BulkUpdateEventRequestMaskedEvent, BulkUpdateEventOptions, BulkUpdateEventResponse, FieldWithLiterals, RestoreEventDefaultsOptions, RestoreEventDefaultsResponse, SplitRecurringEventOptions, SplitRecurringEventResponse, CancelEventOptions, CancelEventResponse, CancelEventApplicationErrors, BulkCancelEventOptions, BulkCancelEventResponse, BulkCancelEventApplicationErrors, EventCancelledEnvelope, EventCreatedEnvelope, EventRecurringSplitEnvelope, EventUpdatedEnvelope, CursorQuery, typedQueryEvents, QueryEventsOptions, EventsQueryBuilder } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, Address, AddressHint, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCancelEventRequest, BulkCreateEventRequest, BulkEventResult, BulkUpdateEventRequest, BusinessSchedule, CancelEventRequest, Categories, ChangeContext, ChangeContextPayloadOneOf, CommonCursorPaging, CommonCursorPagingMetadata, CommonCursors, CommonIdentificationData, CommonIdentificationDataIdOneOf, ConferencingDetails, ConsentPolicy, CreateEventRequest, CreateEventResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, Day, DayOfWeek, DayOfWeekWithLiterals, DayWithLiterals, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventCancelled, EventMetadata, EventUpdatedWithMetadata, EventsQueryResult, ExtendedFields, Field, Frequency, FrequencyWithLiterals, GeoCoordinates, GetEventRequest, GetEventResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, ItemMetadata, ListEventsByContactIdRequest, ListEventsByMemberIdRequest, ListEventsRequest, ListRecurringEventInstancesHistoryRequest, ListRecurringEventInstancesHistoryResponse, Locale, Location, LocationType, LocationTypeWithLiterals, MessageEnvelope, Multilingual, Participant, ParticipantNotification, Participants, ParticipantsStatus, ParticipantsStatusWithLiterals, Permission, PlacementType, PlacementTypeWithLiterals, Properties, PropertiesChange, QueryEventsRequest, QueryEventsResponse, RecurrenceRule, RecurrenceType, RecurrenceTypeWithLiterals, RecurringEventSplit, RequestedFields, RequestedFieldsWithLiterals, ResolutionMethod, ResolutionMethodWithLiterals, Resource, RestoreEventDefaultsRequest, RestoreInfo, Role, RoleWithLiterals, SiteCloned, SiteCreated, SitePropertiesEvent, SitePropertiesNotification, SortOrder, SortOrderWithLiterals, Sorting, SpecialHourPeriod, SplitRecurringEventRequest, Status, StatusWithLiterals, SupportedLanguage, TimePeriod, Translation, Transparency, TransparencyWithLiterals, Type, TypeWithLiterals, UpdateEventParticipantsRequest, UpdateEventParticipantsResponse, UpdateEventRequest, UpdateEventResponse, UpdateEventsWithFixedBusinessResourceIdRequest, UpdateEventsWithFixedBusinessResourceIdResponse, UpdateScheduleWithFixedBusinessResourceIdRequest, UpdateScheduleWithFixedBusinessResourceIdResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, ZonedDate } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function listEventsByContactId$1(httpClient: HttpClient): ListEventsByContactIdSignature;
|
|
6
6
|
interface ListEventsByContactIdSignature {
|
|
@@ -59,29 +59,6 @@ interface ListEventsSignature {
|
|
|
59
59
|
*/
|
|
60
60
|
(eventIds: string[], options?: ListEventsOptions): Promise<NonNullablePaths<ListEventsResponse, `events` | `events.${number}.status` | `events.${number}.recurrenceType` | `events.${number}.recurrenceRule.frequency` | `events.${number}.transparency` | `events.${number}.location.type` | `events.${number}.participants.status` | `events.${number}.conferencingDetails.type`, 5>>;
|
|
61
61
|
}
|
|
62
|
-
declare function queryEvents$1(httpClient: HttpClient): QueryEventsSignature;
|
|
63
|
-
interface QueryEventsSignature {
|
|
64
|
-
/**
|
|
65
|
-
* Creates a query to retrieve a list of events.
|
|
66
|
-
*
|
|
67
|
-
* The `queryEvents()` function builds a query to retrieve a list of events and returns an `EventsQueryBuilder` object.
|
|
68
|
-
*
|
|
69
|
-
* The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-builder/find) function.
|
|
70
|
-
*
|
|
71
|
-
* You can refine the query by chaining `EventsQueryBuilder` functions onto the query. `EventsQueryBuilder` functions enable you to sort, filter, and control the results that `queryEvents()` returns.
|
|
72
|
-
*
|
|
73
|
-
* `queryEvents()` runs with the following `EventsQueryBuilder` default that you can override:
|
|
74
|
-
*
|
|
75
|
-
* + `limit` is `50`.
|
|
76
|
-
* + Sorted by `event.start` in ascending order.
|
|
77
|
-
*
|
|
78
|
-
* The functions that are chained to `queryEvents()` are applied in the order they are called.
|
|
79
|
-
*
|
|
80
|
-
* The following `EventsQueryBuilder` functions are supported for the `queryEvents()` function. For a full description of the events object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-result/items) property in `EventsQueryResult`.
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
(options?: QueryEventsOptions): EventsQueryBuilder;
|
|
84
|
-
}
|
|
85
62
|
declare function createEvent$1(httpClient: HttpClient): CreateEventSignature;
|
|
86
63
|
interface CreateEventSignature {
|
|
87
64
|
/**
|
|
@@ -243,11 +220,16 @@ declare const onEventCreated$1: EventDefinition<EventCreatedEnvelope, "wix.calen
|
|
|
243
220
|
declare const onEventRecurringSplit$1: EventDefinition<EventRecurringSplitEnvelope, "wix.calendar.v3.event_recurring_split">;
|
|
244
221
|
declare const onEventUpdated$1: EventDefinition<EventUpdatedEnvelope, "wix.calendar.v3.event_updated">;
|
|
245
222
|
|
|
223
|
+
declare function customQueryEvents(httpClient: HttpClient): {
|
|
224
|
+
(query: CursorQuery): ReturnType<typeof typedQueryEvents>;
|
|
225
|
+
(query: CursorQuery, options: QueryEventsOptions): ReturnType<typeof typedQueryEvents>;
|
|
226
|
+
(): EventsQueryBuilder;
|
|
227
|
+
(options: QueryEventsOptions): EventsQueryBuilder;
|
|
228
|
+
};
|
|
246
229
|
declare const listEventsByContactId: MaybeContext<BuildRESTFunction<typeof listEventsByContactId$1> & typeof listEventsByContactId$1>;
|
|
247
230
|
declare const listEventsByMemberId: MaybeContext<BuildRESTFunction<typeof listEventsByMemberId$1> & typeof listEventsByMemberId$1>;
|
|
248
231
|
declare const getEvent: MaybeContext<BuildRESTFunction<typeof getEvent$1> & typeof getEvent$1>;
|
|
249
232
|
declare const listEvents: MaybeContext<BuildRESTFunction<typeof listEvents$1> & typeof listEvents$1>;
|
|
250
|
-
declare const queryEvents: MaybeContext<BuildRESTFunction<typeof queryEvents$1> & typeof queryEvents$1>;
|
|
251
233
|
declare const createEvent: MaybeContext<BuildRESTFunction<typeof createEvent$1> & typeof createEvent$1>;
|
|
252
234
|
declare const bulkCreateEvent: MaybeContext<BuildRESTFunction<typeof bulkCreateEvent$1> & typeof bulkCreateEvent$1>;
|
|
253
235
|
declare const updateEvent: MaybeContext<BuildRESTFunction<typeof updateEvent$1> & typeof updateEvent$1>;
|
|
@@ -256,6 +238,7 @@ declare const restoreEventDefaults: MaybeContext<BuildRESTFunction<typeof restor
|
|
|
256
238
|
declare const splitRecurringEvent: MaybeContext<BuildRESTFunction<typeof splitRecurringEvent$1> & typeof splitRecurringEvent$1>;
|
|
257
239
|
declare const cancelEvent: MaybeContext<BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1>;
|
|
258
240
|
declare const bulkCancelEvent: MaybeContext<BuildRESTFunction<typeof bulkCancelEvent$1> & typeof bulkCancelEvent$1>;
|
|
241
|
+
declare const queryEvents: MaybeContext<BuildRESTFunction<typeof customQueryEvents> & typeof customQueryEvents>;
|
|
259
242
|
/**
|
|
260
243
|
* Triggered when an event is canceled.
|
|
261
244
|
*
|
|
@@ -286,4 +269,4 @@ declare const onEventRecurringSplit: BuildEventDefinition<typeof onEventRecurrin
|
|
|
286
269
|
*/
|
|
287
270
|
declare const onEventUpdated: BuildEventDefinition<typeof onEventUpdated$1> & typeof onEventUpdated$1;
|
|
288
271
|
|
|
289
|
-
export { BulkCancelEventApplicationErrors, BulkCancelEventOptions, BulkCancelEventResponse, BulkCreateEventOptions, BulkCreateEventResponse, BulkUpdateEventOptions, BulkUpdateEventRequestMaskedEvent, BulkUpdateEventResponse, CancelEventApplicationErrors, CancelEventOptions, CancelEventResponse, CreateEventOptions, Event, EventCancelledEnvelope, EventCreatedEnvelope, EventRecurringSplitEnvelope, EventUpdatedEnvelope, EventsQueryBuilder, FieldWithLiterals, GetEventOptions, ListEventsByContactIdOptions, ListEventsByContactIdResponse, ListEventsByMemberIdOptions, ListEventsByMemberIdResponse, ListEventsOptions, ListEventsResponse, MaskedEvent, QueryEventsOptions, RestoreEventDefaultsOptions, RestoreEventDefaultsResponse, SplitRecurringEventOptions, SplitRecurringEventResponse, UpdateEvent, UpdateEventOptions, bulkCancelEvent, bulkCreateEvent, bulkUpdateEvent, cancelEvent, createEvent, getEvent, listEvents, listEventsByContactId, listEventsByMemberId, onEventCancelled, onEventCreated, onEventRecurringSplit, onEventUpdated, queryEvents, restoreEventDefaults, splitRecurringEvent, updateEvent };
|
|
272
|
+
export { BulkCancelEventApplicationErrors, BulkCancelEventOptions, BulkCancelEventResponse, BulkCreateEventOptions, BulkCreateEventResponse, BulkUpdateEventOptions, BulkUpdateEventRequestMaskedEvent, BulkUpdateEventResponse, CancelEventApplicationErrors, CancelEventOptions, CancelEventResponse, CreateEventOptions, CursorQuery, Event, EventCancelledEnvelope, EventCreatedEnvelope, EventRecurringSplitEnvelope, EventUpdatedEnvelope, EventsQueryBuilder, FieldWithLiterals, GetEventOptions, ListEventsByContactIdOptions, ListEventsByContactIdResponse, ListEventsByMemberIdOptions, ListEventsByMemberIdResponse, ListEventsOptions, ListEventsResponse, MaskedEvent, QueryEventsOptions, RestoreEventDefaultsOptions, RestoreEventDefaultsResponse, SplitRecurringEventOptions, SplitRecurringEventResponse, UpdateEvent, UpdateEventOptions, bulkCancelEvent, bulkCreateEvent, bulkUpdateEvent, cancelEvent, createEvent, getEvent, listEvents, listEventsByContactId, listEventsByMemberId, onEventCancelled, onEventCreated, onEventRecurringSplit, onEventUpdated, queryEvents, restoreEventDefaults, splitRecurringEvent, updateEvent };
|
package/build/cjs/index.js
CHANGED
|
@@ -1057,6 +1057,32 @@ function queryEvents2(options) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
);
|
|
1059
1059
|
}
|
|
1060
|
+
async function typedQueryEvents(query, options) {
|
|
1061
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1062
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1063
|
+
query,
|
|
1064
|
+
...options
|
|
1065
|
+
});
|
|
1066
|
+
const reqOpts = queryEvents(payload);
|
|
1067
|
+
sideEffects?.onSiteCall?.();
|
|
1068
|
+
try {
|
|
1069
|
+
const result = await httpClient.request(reqOpts);
|
|
1070
|
+
sideEffects?.onSuccess?.(result);
|
|
1071
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1072
|
+
} catch (err) {
|
|
1073
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1074
|
+
err,
|
|
1075
|
+
{
|
|
1076
|
+
spreadPathsToArguments: {},
|
|
1077
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1078
|
+
singleArgumentUnchanged: false
|
|
1079
|
+
},
|
|
1080
|
+
["query", "options"]
|
|
1081
|
+
);
|
|
1082
|
+
sideEffects?.onError?.(err);
|
|
1083
|
+
throw transformedError;
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1060
1086
|
async function createEvent2(event, options) {
|
|
1061
1087
|
const { httpClient, sideEffects } = arguments[2];
|
|
1062
1088
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1352,6 +1378,14 @@ function queryEvents3(httpClient) {
|
|
|
1352
1378
|
{ httpClient }
|
|
1353
1379
|
);
|
|
1354
1380
|
}
|
|
1381
|
+
function typedQueryEvents2(httpClient) {
|
|
1382
|
+
return (query, options) => typedQueryEvents(
|
|
1383
|
+
query,
|
|
1384
|
+
options,
|
|
1385
|
+
// @ts-ignore
|
|
1386
|
+
{ httpClient }
|
|
1387
|
+
);
|
|
1388
|
+
}
|
|
1355
1389
|
function createEvent3(httpClient) {
|
|
1356
1390
|
return (event, options) => createEvent2(
|
|
1357
1391
|
event,
|
|
@@ -1537,11 +1571,22 @@ var onEventUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
1537
1571
|
// src/calendar-v3-event-events.context.ts
|
|
1538
1572
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
1539
1573
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
1574
|
+
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
1575
|
+
function customQueryEvents(httpClient) {
|
|
1576
|
+
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
1577
|
+
builderQueryFunction: (options) => queryEvents3(httpClient)(options),
|
|
1578
|
+
typedQueryFunction: (query, options) => typedQueryEvents2(httpClient)(query, options),
|
|
1579
|
+
hasOptionsParameter: true
|
|
1580
|
+
});
|
|
1581
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
1582
|
+
return router(...arguments);
|
|
1583
|
+
}
|
|
1584
|
+
return overloadedQuery;
|
|
1585
|
+
}
|
|
1540
1586
|
var listEventsByContactId4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listEventsByContactId3);
|
|
1541
1587
|
var listEventsByMemberId4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listEventsByMemberId3);
|
|
1542
1588
|
var getEvent4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getEvent3);
|
|
1543
1589
|
var listEvents4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listEvents3);
|
|
1544
|
-
var queryEvents4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryEvents3);
|
|
1545
1590
|
var createEvent4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createEvent3);
|
|
1546
1591
|
var bulkCreateEvent4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateEvent3);
|
|
1547
1592
|
var updateEvent4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateEvent3);
|
|
@@ -1550,6 +1595,7 @@ var restoreEventDefaults4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTM
|
|
|
1550
1595
|
var splitRecurringEvent4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(splitRecurringEvent3);
|
|
1551
1596
|
var cancelEvent4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cancelEvent3);
|
|
1552
1597
|
var bulkCancelEvent4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCancelEvent3);
|
|
1598
|
+
var queryEvents4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryEvents);
|
|
1553
1599
|
var onEventCancelled2 = (0, import_event_definition_modules.createEventModule)(onEventCancelled);
|
|
1554
1600
|
var onEventCreated2 = (0, import_event_definition_modules.createEventModule)(onEventCreated);
|
|
1555
1601
|
var onEventRecurringSplit2 = (0, import_event_definition_modules.createEventModule)(
|