@wix/auto_sdk_calendar_schedules 1.0.84 → 1.0.86
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 -26
- 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 -26
- 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 -26
- 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 -26
- 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/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { GetScheduleOptions, Schedule,
|
|
3
|
-
export { ActionEvent, Address, AddressHint, Asset, BaseEventMetadata, BusinessSchedule, CancelScheduleRequest, Categories, ChangeContext, ChangeContextPayloadOneOf, CloneScheduleRequest, CloneScheduleResponse, CommonIdentificationData, CommonIdentificationDataIdOneOf, ConferencingDetails, ConsentPolicy, CreateScheduleRequest, CreateScheduleResponse, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { GetScheduleOptions, Schedule, CreateScheduleOptions, UpdateSchedule, UpdateScheduleOptions, UpdateScheduleApplicationErrors, CancelScheduleOptions, CancelScheduleResponse, CancelScheduleApplicationErrors, ScheduleCancelledEnvelope, ScheduleClonedEnvelope, ScheduleCreatedEnvelope, ScheduleUpdatedEnvelope, CursorQuery, typedQuerySchedules, QuerySchedulesOptions, SchedulesQueryBuilder } from './index.typings.mjs';
|
|
3
|
+
export { ActionEvent, Address, AddressHint, Asset, BaseEventMetadata, BusinessSchedule, CancelScheduleRequest, Categories, ChangeContext, ChangeContextPayloadOneOf, CloneScheduleRequest, CloneScheduleResponse, CommonIdentificationData, CommonIdentificationDataIdOneOf, ConferencingDetails, ConsentPolicy, CreateScheduleRequest, CreateScheduleResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DayOfWeek, DayOfWeekWithLiterals, DeleteContext, DeleteStatus, DeleteStatusWithLiterals, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GeoCoordinates, GetScheduleRequest, GetScheduleResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, Locale, Location, LocationType, LocationTypeWithLiterals, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, Multilingual, Namespace, NamespaceChanged, NamespaceWithLiterals, OdeditorAssigned, OdeditorUnassigned, ParticipantNotification, Permission, PicassoAssigned, PicassoUnassigned, PlacementType, PlacementTypeWithLiterals, Properties, PropertiesChange, QuerySchedulesRequest, QuerySchedulesResponse, RequestedFields, RequestedFieldsWithLiterals, ResolutionMethod, ResolutionMethodWithLiterals, RestoreInfo, Role, RoleWithLiterals, ScheduleCancelled, ScheduleCloned, ScheduleUpdatedWithMetadata, SchedulesQueryResult, ServiceProvisioned, ServiceRemoved, SiteCloned, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePropertiesEvent, SitePropertiesNotification, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SpecialHourPeriod, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, SupportedLanguage, TimePeriod, Translation, Trigger, TriggerWithLiterals, Type, TypeWithLiterals, UpdateScheduleRequest, UpdateScheduleResponse, V4SiteCreated, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function getSchedule$1(httpClient: HttpClient): GetScheduleSignature;
|
|
6
6
|
interface GetScheduleSignature {
|
|
@@ -11,28 +11,6 @@ interface GetScheduleSignature {
|
|
|
11
11
|
*/
|
|
12
12
|
(scheduleId: string, options?: GetScheduleOptions): Promise<NonNullablePaths<Schedule, `status` | `defaultLocation.type` | `defaultConferencingDetails.type` | `permissions` | `permissions.${number}.identity.wixUserId` | `permissions.${number}.role`, 5>>;
|
|
13
13
|
}
|
|
14
|
-
declare function querySchedules$1(httpClient: HttpClient): QuerySchedulesSignature;
|
|
15
|
-
interface QuerySchedulesSignature {
|
|
16
|
-
/**
|
|
17
|
-
* Creates a query to retrieve a list of schedules.
|
|
18
|
-
*
|
|
19
|
-
* The `querySchedules()` function builds a query to retrieve a list of tip settings and returns a `SchedulesQueryBuilder` object.
|
|
20
|
-
*
|
|
21
|
-
* 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/schedules/schedules-query-builder/find) function.
|
|
22
|
-
*
|
|
23
|
-
* You can refine the query by chaining `SchedulesQueryBuilder` functions onto the query. `SchedulesQueryBuilder` functions enable you to sort, filter, and control the results that `querySchedules()` returns.
|
|
24
|
-
*
|
|
25
|
-
* `querySchedules()` runs with the following `SchedulesQueryBuilder` default that you can override:
|
|
26
|
-
*
|
|
27
|
-
* + `limit` is `50`.
|
|
28
|
-
* + Sorted by `id` in ascending order.
|
|
29
|
-
*
|
|
30
|
-
* The functions that are chained to `querySchedules()` are applied in the order they are called. For example, if you apply `ascending("status")` and then `ascending("externalId")`, the results are sorted first by the `"status"`, and then, if there are multiple results with the same `"status"`, the items are sorted by `"externalId"`.
|
|
31
|
-
*
|
|
32
|
-
* The following `SchedulesQueryBuilder` functions are supported for the `querySchedules()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/schedules-query-result/items) property in `SchedulesQueryResult`.
|
|
33
|
-
*/
|
|
34
|
-
(options?: QuerySchedulesOptions): SchedulesQueryBuilder;
|
|
35
|
-
}
|
|
36
14
|
declare function createSchedule$1(httpClient: HttpClient): CreateScheduleSignature;
|
|
37
15
|
interface CreateScheduleSignature {
|
|
38
16
|
/**
|
|
@@ -87,11 +65,17 @@ declare const onScheduleCloned$1: EventDefinition<ScheduleClonedEnvelope, "wix.c
|
|
|
87
65
|
declare const onScheduleCreated$1: EventDefinition<ScheduleCreatedEnvelope, "wix.calendar.v3.schedule_created">;
|
|
88
66
|
declare const onScheduleUpdated$1: EventDefinition<ScheduleUpdatedEnvelope, "wix.calendar.v3.schedule_updated">;
|
|
89
67
|
|
|
68
|
+
declare function customQuerySchedules(httpClient: HttpClient): {
|
|
69
|
+
(query: CursorQuery): ReturnType<typeof typedQuerySchedules>;
|
|
70
|
+
(query: CursorQuery, options: QuerySchedulesOptions): ReturnType<typeof typedQuerySchedules>;
|
|
71
|
+
(): SchedulesQueryBuilder;
|
|
72
|
+
(options: QuerySchedulesOptions): SchedulesQueryBuilder;
|
|
73
|
+
};
|
|
90
74
|
declare const getSchedule: MaybeContext<BuildRESTFunction<typeof getSchedule$1> & typeof getSchedule$1>;
|
|
91
|
-
declare const querySchedules: MaybeContext<BuildRESTFunction<typeof querySchedules$1> & typeof querySchedules$1>;
|
|
92
75
|
declare const createSchedule: MaybeContext<BuildRESTFunction<typeof createSchedule$1> & typeof createSchedule$1>;
|
|
93
76
|
declare const updateSchedule: MaybeContext<BuildRESTFunction<typeof updateSchedule$1> & typeof updateSchedule$1>;
|
|
94
77
|
declare const cancelSchedule: MaybeContext<BuildRESTFunction<typeof cancelSchedule$1> & typeof cancelSchedule$1>;
|
|
78
|
+
declare const querySchedules: MaybeContext<BuildRESTFunction<typeof customQuerySchedules> & typeof customQuerySchedules>;
|
|
95
79
|
/**
|
|
96
80
|
* Triggered when a schedule is canceled.
|
|
97
81
|
*/
|
|
@@ -109,4 +93,4 @@ declare const onScheduleCreated: BuildEventDefinition<typeof onScheduleCreated$1
|
|
|
109
93
|
*/
|
|
110
94
|
declare const onScheduleUpdated: BuildEventDefinition<typeof onScheduleUpdated$1> & typeof onScheduleUpdated$1;
|
|
111
95
|
|
|
112
|
-
export { CancelScheduleApplicationErrors, CancelScheduleOptions, CancelScheduleResponse, CreateScheduleOptions, GetScheduleOptions, QuerySchedulesOptions, Schedule, ScheduleCancelledEnvelope, ScheduleClonedEnvelope, ScheduleCreatedEnvelope, ScheduleUpdatedEnvelope, SchedulesQueryBuilder, UpdateSchedule, UpdateScheduleApplicationErrors, UpdateScheduleOptions, cancelSchedule, createSchedule, getSchedule, onScheduleCancelled, onScheduleCloned, onScheduleCreated, onScheduleUpdated, querySchedules, updateSchedule };
|
|
96
|
+
export { CancelScheduleApplicationErrors, CancelScheduleOptions, CancelScheduleResponse, CreateScheduleOptions, CursorQuery, GetScheduleOptions, QuerySchedulesOptions, Schedule, ScheduleCancelledEnvelope, ScheduleClonedEnvelope, ScheduleCreatedEnvelope, ScheduleUpdatedEnvelope, SchedulesQueryBuilder, UpdateSchedule, UpdateScheduleApplicationErrors, UpdateScheduleOptions, cancelSchedule, createSchedule, getSchedule, onScheduleCancelled, onScheduleCloned, onScheduleCreated, onScheduleUpdated, querySchedules, updateSchedule };
|
package/build/es/index.mjs
CHANGED
|
@@ -436,6 +436,32 @@ function querySchedules2(options) {
|
|
|
436
436
|
transformationPaths: {}
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
+
async function typedQuerySchedules(query, options) {
|
|
440
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
441
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
442
|
+
query,
|
|
443
|
+
...options
|
|
444
|
+
});
|
|
445
|
+
const reqOpts = querySchedules(payload);
|
|
446
|
+
sideEffects?.onSiteCall?.();
|
|
447
|
+
try {
|
|
448
|
+
const result = await httpClient.request(reqOpts);
|
|
449
|
+
sideEffects?.onSuccess?.(result);
|
|
450
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
451
|
+
} catch (err) {
|
|
452
|
+
const transformedError = sdkTransformError(
|
|
453
|
+
err,
|
|
454
|
+
{
|
|
455
|
+
spreadPathsToArguments: {},
|
|
456
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
457
|
+
singleArgumentUnchanged: false
|
|
458
|
+
},
|
|
459
|
+
["query", "options"]
|
|
460
|
+
);
|
|
461
|
+
sideEffects?.onError?.(err);
|
|
462
|
+
throw transformedError;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
439
465
|
async function createSchedule2(schedule, options) {
|
|
440
466
|
const { httpClient, sideEffects } = arguments[2];
|
|
441
467
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -542,6 +568,14 @@ function querySchedules3(httpClient) {
|
|
|
542
568
|
{ httpClient }
|
|
543
569
|
);
|
|
544
570
|
}
|
|
571
|
+
function typedQuerySchedules2(httpClient) {
|
|
572
|
+
return (query, options) => typedQuerySchedules(
|
|
573
|
+
query,
|
|
574
|
+
options,
|
|
575
|
+
// @ts-ignore
|
|
576
|
+
{ httpClient }
|
|
577
|
+
);
|
|
578
|
+
}
|
|
545
579
|
function createSchedule3(httpClient) {
|
|
546
580
|
return (schedule, options) => createSchedule2(
|
|
547
581
|
schedule,
|
|
@@ -635,11 +669,23 @@ var onScheduleUpdated = EventDefinition(
|
|
|
635
669
|
// src/calendar-v3-schedule-schedules.context.ts
|
|
636
670
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
637
671
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
672
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
673
|
+
function customQuerySchedules(httpClient) {
|
|
674
|
+
const router = createQueryOverloadRouter({
|
|
675
|
+
builderQueryFunction: (options) => querySchedules3(httpClient)(options),
|
|
676
|
+
typedQueryFunction: (query, options) => typedQuerySchedules2(httpClient)(query, options),
|
|
677
|
+
hasOptionsParameter: true
|
|
678
|
+
});
|
|
679
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
680
|
+
return router(...arguments);
|
|
681
|
+
}
|
|
682
|
+
return overloadedQuery;
|
|
683
|
+
}
|
|
638
684
|
var getSchedule4 = /* @__PURE__ */ createRESTModule(getSchedule3);
|
|
639
|
-
var querySchedules4 = /* @__PURE__ */ createRESTModule(querySchedules3);
|
|
640
685
|
var createSchedule4 = /* @__PURE__ */ createRESTModule(createSchedule3);
|
|
641
686
|
var updateSchedule4 = /* @__PURE__ */ createRESTModule(updateSchedule3);
|
|
642
687
|
var cancelSchedule4 = /* @__PURE__ */ createRESTModule(cancelSchedule3);
|
|
688
|
+
var querySchedules4 = /* @__PURE__ */ createRESTModule(customQuerySchedules);
|
|
643
689
|
var onScheduleCancelled2 = createEventModule(
|
|
644
690
|
onScheduleCancelled
|
|
645
691
|
);
|