@wix/auto_sdk_calendar_participations 1.0.24 → 1.0.26

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +8 -27
  2. package/build/cjs/index.js +43 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +7 -1
  5. package/build/cjs/index.typings.js +25 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +160 -1
  8. package/build/cjs/meta.js +19 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +8 -27
  11. package/build/es/index.mjs +43 -1
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +7 -1
  14. package/build/es/index.typings.mjs +24 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +160 -1
  17. package/build/es/meta.mjs +17 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +8 -27
  20. package/build/internal/cjs/index.js +43 -1
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +7 -1
  23. package/build/internal/cjs/index.typings.js +25 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +160 -1
  26. package/build/internal/cjs/meta.js +19 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +8 -27
  29. package/build/internal/es/index.mjs +43 -1
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +7 -1
  32. package/build/internal/es/index.typings.mjs +24 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +160 -1
  35. package/build/internal/es/meta.mjs +17 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { Participation, ParticipationsQueryBuilder, CreateParticipationOptions, UpdateParticipation, ParticipationCreatedEnvelope, ParticipationDeletedEnvelope, ParticipationUpdatedEnvelope } from './index.typings.js';
3
- export { ActionEvent, BaseEventMetadata, CreateParticipationRequest, CreateParticipationResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteParticipationRequest, DeleteParticipationResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetParticipationRequest, GetParticipationResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Participant, ParticipationParticipatedItemOneOf, ParticipationsQueryResult, PartySizeSumByScheduleId, QueryParticipationsRequest, QueryParticipationsResponse, RestoreInfo, Status, StatusWithLiterals, SumParticipationsPartySizeByScheduleIdRequest, SumParticipationsPartySizeByScheduleIdResponse, UpdateParticipationRequest, UpdateParticipationResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
2
+ import { Participation, CreateParticipationOptions, UpdateParticipation, ParticipationCreatedEnvelope, ParticipationDeletedEnvelope, ParticipationUpdatedEnvelope, ParticipationsQueryBuilder, CursorQuery, typedQueryParticipations } from './index.typings.js';
3
+ export { ActionEvent, BaseEventMetadata, CreateParticipationRequest, CreateParticipationResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DeleteParticipationRequest, DeleteParticipationResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetParticipationRequest, GetParticipationResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Participant, ParticipationParticipatedItemOneOf, ParticipationsQueryResult, PartySizeSumByScheduleId, QueryParticipationsRequest, QueryParticipationsResponse, RestoreInfo, Status, StatusWithLiterals, SumParticipationsPartySizeByScheduleIdRequest, SumParticipationsPartySizeByScheduleIdResponse, UpdateParticipationRequest, UpdateParticipationResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function getParticipation$1(httpClient: HttpClient): GetParticipationSignature;
6
6
  interface GetParticipationSignature {
@@ -11,29 +11,6 @@ interface GetParticipationSignature {
11
11
  */
12
12
  (participationId: string): Promise<NonNullablePaths<Participation, `status`, 2>>;
13
13
  }
14
- declare function queryParticipations$1(httpClient: HttpClient): QueryParticipationsSignature;
15
- interface QueryParticipationsSignature {
16
- /**
17
- * Creates a query to retrieve a list of participations.
18
- *
19
- * The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` 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/participations/participations-query-builder/find) function.
22
- *
23
- * You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.
24
- *
25
- * `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:
26
- *
27
- * + `limit` is `50`.
28
- * + Sorted by `createdDate` in ascending order.
29
- *
30
- * The functions that are chained to `queryParticipations()` are applied in the order they are called.
31
- *
32
- * The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.
33
- *
34
- */
35
- (): ParticipationsQueryBuilder;
36
- }
37
14
  declare function createParticipation$1(httpClient: HttpClient): CreateParticipationSignature;
38
15
  interface CreateParticipationSignature {
39
16
  /**
@@ -64,11 +41,15 @@ declare const onParticipationCreated$1: EventDefinition<ParticipationCreatedEnve
64
41
  declare const onParticipationDeleted$1: EventDefinition<ParticipationDeletedEnvelope, "wix.calendar.v3.participation_deleted">;
65
42
  declare const onParticipationUpdated$1: EventDefinition<ParticipationUpdatedEnvelope, "wix.calendar.v3.participation_updated">;
66
43
 
44
+ declare function customQueryParticipations(httpClient: HttpClient): {
45
+ (): ParticipationsQueryBuilder;
46
+ (query: CursorQuery): ReturnType<typeof typedQueryParticipations>;
47
+ };
67
48
  declare const getParticipation: MaybeContext<BuildRESTFunction<typeof getParticipation$1> & typeof getParticipation$1>;
68
- declare const queryParticipations: MaybeContext<BuildRESTFunction<typeof queryParticipations$1> & typeof queryParticipations$1>;
69
49
  declare const createParticipation: MaybeContext<BuildRESTFunction<typeof createParticipation$1> & typeof createParticipation$1>;
70
50
  declare const updateParticipation: MaybeContext<BuildRESTFunction<typeof updateParticipation$1> & typeof updateParticipation$1>;
71
51
  declare const deleteParticipation: MaybeContext<BuildRESTFunction<typeof deleteParticipation$1> & typeof deleteParticipation$1>;
52
+ declare const queryParticipations: MaybeContext<BuildRESTFunction<typeof customQueryParticipations> & typeof customQueryParticipations>;
72
53
  /**
73
54
  * Triggered when a `participation` object is created.
74
55
  */
@@ -82,4 +63,4 @@ declare const onParticipationDeleted: BuildEventDefinition<typeof onParticipatio
82
63
  */
83
64
  declare const onParticipationUpdated: BuildEventDefinition<typeof onParticipationUpdated$1> & typeof onParticipationUpdated$1;
84
65
 
85
- export { CreateParticipationOptions, Participation, ParticipationCreatedEnvelope, ParticipationDeletedEnvelope, ParticipationUpdatedEnvelope, ParticipationsQueryBuilder, UpdateParticipation, createParticipation, deleteParticipation, getParticipation, onParticipationCreated, onParticipationDeleted, onParticipationUpdated, queryParticipations, updateParticipation };
66
+ export { CreateParticipationOptions, CursorQuery, Participation, ParticipationCreatedEnvelope, ParticipationDeletedEnvelope, ParticipationUpdatedEnvelope, ParticipationsQueryBuilder, UpdateParticipation, createParticipation, deleteParticipation, getParticipation, onParticipationCreated, onParticipationDeleted, onParticipationUpdated, queryParticipations, updateParticipation };
@@ -318,6 +318,29 @@ function queryParticipations2() {
318
318
  transformationPaths: {}
319
319
  });
320
320
  }
321
+ async function typedQueryParticipations(query) {
322
+ const { httpClient, sideEffects } = arguments[1];
323
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
324
+ const reqOpts = queryParticipations(payload);
325
+ sideEffects?.onSiteCall?.();
326
+ try {
327
+ const result = await httpClient.request(reqOpts);
328
+ sideEffects?.onSuccess?.(result);
329
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
330
+ } catch (err) {
331
+ const transformedError = (0, import_transform_error.transformError)(
332
+ err,
333
+ {
334
+ spreadPathsToArguments: {},
335
+ explicitPathsToArguments: { query: "$[0]" },
336
+ singleArgumentUnchanged: false
337
+ },
338
+ ["query"]
339
+ );
340
+ sideEffects?.onError?.(err);
341
+ throw transformedError;
342
+ }
343
+ }
321
344
  async function createParticipation2(participation, options) {
322
345
  const { httpClient, sideEffects } = arguments[2];
323
346
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -411,6 +434,13 @@ function queryParticipations3(httpClient) {
411
434
  { httpClient }
412
435
  );
413
436
  }
437
+ function typedQueryParticipations2(httpClient) {
438
+ return (query) => typedQueryParticipations(
439
+ query,
440
+ // @ts-ignore
441
+ { httpClient }
442
+ );
443
+ }
414
444
  function createParticipation3(httpClient) {
415
445
  return (participation, options) => createParticipation2(
416
446
  participation,
@@ -486,11 +516,23 @@ var onParticipationUpdated = (0, import_sdk_types.EventDefinition)(
486
516
  // src/calendar-v3-participation-participations.context.ts
487
517
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
488
518
  var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
519
+ var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
520
+ function customQueryParticipations(httpClient) {
521
+ const router = (0, import_query_method_router.createQueryOverloadRouter)({
522
+ builderQueryFunction: () => queryParticipations3(httpClient)(),
523
+ typedQueryFunction: (query) => typedQueryParticipations2(httpClient)(query),
524
+ hasOptionsParameter: false
525
+ });
526
+ function overloadedQuery(query) {
527
+ return router(...arguments);
528
+ }
529
+ return overloadedQuery;
530
+ }
489
531
  var getParticipation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getParticipation3);
490
- var queryParticipations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryParticipations3);
491
532
  var createParticipation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createParticipation3);
492
533
  var updateParticipation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateParticipation3);
493
534
  var deleteParticipation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteParticipation3);
535
+ var queryParticipations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryParticipations);
494
536
  var onParticipationCreated2 = (0, import_event_definition_modules.createEventModule)(
495
537
  onParticipationCreated
496
538
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/calendar-v3-participation-participations.public.ts","../../src/calendar-v3-participation-participations.universal.ts","../../src/calendar-v3-participation-participations.http.ts","../../src/calendar-v3-participation-participations.context.ts"],"sourcesContent":["export * from './src/calendar-v3-participation-participations.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateParticipationOptions,\n Participation,\n ParticipationCreatedEnvelope,\n ParticipationDeletedEnvelope,\n ParticipationUpdatedEnvelope,\n ParticipationsQueryBuilder,\n UpdateParticipation,\n createParticipation as universalCreateParticipation,\n deleteParticipation as universalDeleteParticipation,\n getParticipation as universalGetParticipation,\n queryParticipations as universalQueryParticipations,\n updateParticipation as universalUpdateParticipation,\n} from './calendar-v3-participation-participations.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/calendar' };\n\nexport function getParticipation(\n httpClient: HttpClient\n): GetParticipationSignature {\n return (participationId: string) =>\n universalGetParticipation(\n participationId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetParticipationSignature {\n /**\n * Retrieves a `participation` object.\n * @param - ID of the `participation` object to retrieve.\n * @returns Retrieved `participation` object.\n */\n (participationId: string): Promise<\n NonNullablePaths<Participation, `status`, 2>\n >;\n}\n\nexport function queryParticipations(\n httpClient: HttpClient\n): QueryParticipationsSignature {\n return () =>\n universalQueryParticipations(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryParticipationsSignature {\n /**\n * Creates a query to retrieve a list of participations.\n *\n * The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.\n *\n * 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/participations/participations-query-builder/find) function.\n *\n * You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.\n *\n * `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryParticipations()` are applied in the order they are called.\n *\n * The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.\n *\n */\n (): ParticipationsQueryBuilder;\n}\n\nexport function createParticipation(\n httpClient: HttpClient\n): CreateParticipationSignature {\n return (\n participation: NonNullablePaths<\n Participation,\n `participant` | `participant.name` | `partySize`,\n 3\n >,\n options?: CreateParticipationOptions\n ) =>\n universalCreateParticipation(\n participation,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateParticipationSignature {\n /**\n * Creates a `participation` object for a schedule or event.\n * @param - `participation` object to create.\n * @returns Created `participation` object.\n */\n (\n participation: NonNullablePaths<\n Participation,\n `participant` | `participant.name` | `partySize`,\n 3\n >,\n options?: CreateParticipationOptions\n ): Promise<NonNullablePaths<Participation, `status`, 2>>;\n}\n\nexport function updateParticipation(\n httpClient: HttpClient\n): UpdateParticipationSignature {\n return (\n _id: string,\n participation: NonNullablePaths<UpdateParticipation, `revision`, 2>\n ) =>\n universalUpdateParticipation(\n _id,\n participation,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateParticipationSignature {\n /**\n * Updates a `participation` object.\n * @param - Participation ID.\n * @returns Updated `participation` object.\n */\n (\n _id: string,\n participation: NonNullablePaths<UpdateParticipation, `revision`, 2>\n ): Promise<NonNullablePaths<Participation, `status`, 2>>;\n}\n\nexport function deleteParticipation(\n httpClient: HttpClient\n): DeleteParticipationSignature {\n return (participationId: string) =>\n universalDeleteParticipation(\n participationId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteParticipationSignature {\n /**\n * Deletes a `participation` object.\n * @param - ID of `participation` object to delete.\n */\n (participationId: string): Promise<void>;\n}\n\nexport const onParticipationCreated = EventDefinition(\n 'wix.calendar.v3.participation_created',\n true,\n (event: ParticipationCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ParticipationCreatedEnvelope>();\nexport const onParticipationDeleted = EventDefinition(\n 'wix.calendar.v3.participation_deleted',\n true,\n (event: ParticipationDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ParticipationDeletedEnvelope>();\nexport const onParticipationUpdated = EventDefinition(\n 'wix.calendar.v3.participation_updated',\n true,\n (event: ParticipationUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ParticipationUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CreateParticipationOptions,\n CreateParticipationRequest,\n CreateParticipationResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteParticipationRequest,\n DeleteParticipationResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetParticipationRequest,\n GetParticipationResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n Participant,\n Participation,\n ParticipationCreatedEnvelope,\n ParticipationDeletedEnvelope,\n ParticipationParticipatedItemOneOf,\n ParticipationUpdatedEnvelope,\n ParticipationsQueryBuilder,\n ParticipationsQueryResult,\n PartySizeSumByScheduleId,\n QueryParticipationsRequest,\n QueryParticipationsResponse,\n RestoreInfo,\n Status,\n SumParticipationsPartySizeByScheduleIdRequest,\n SumParticipationsPartySizeByScheduleIdResponse,\n UpdateParticipation,\n UpdateParticipationRequest,\n UpdateParticipationResponse,\n WebhookIdentityType,\n} from './calendar-v3-participation-participations.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixCalendarV3Participation from './calendar-v3-participation-participations.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * The `participation` object represents the relationship between a participant and\n * an [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * or [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object).\n * It includes details about the participant, whether the participation status is confirmed or\n * pending, which app owns the relevant event or schedule, and allows for custom data extensions.\n */\nexport interface Participation extends ParticipationParticipatedItemOneOf {\n /**\n * ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * associated with the participation.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * associated with the participation.\n * @minLength 36\n * @maxLength 250\n * @immutable\n */\n eventId?: string | null;\n /**\n * Participation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * External ID.\n * @format GUID\n * @immutable\n */\n externalId?: string | null;\n /** Information about the participant. */\n participant?: Participant;\n /**\n * Party size of the group or `1` for individuals.\n *\n * Min: `1`\n * Max: `1000`\n * @min 1\n * @max 1000\n */\n partySize?: number | null;\n /**\n * Status of the party's participation in the event. Depending on your\n * implementation, confirmation may be handled by the business owner or the customer.\n *\n * Supported values:\n * + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n * + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n *\n * Default: `CONFIRMED`\n */\n status?: StatusWithLiterals;\n /**\n * ID of the app that owns the participation `object`. Identical to `appId` of the\n * [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * that the related\n * [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * belongs to.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * Revision number, which increments by 1 each time the participation is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the participation.\n * Ignored when creating a participation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Extensions enabling applications or users to save custom data related to the participation. */\n extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface ParticipationParticipatedItemOneOf {\n /**\n * ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * associated with the participation.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * associated with the participation.\n * @minLength 36\n * @maxLength 250\n * @immutable\n */\n eventId?: string | null;\n}\n\nexport interface Participant {\n /**\n * Participant name.\n *\n * Min: 1 character\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n name?: string | null;\n /**\n * Participant's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Participant's email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * [Contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID of the participant.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport enum Status {\n /** The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings). */\n CONFIRMED = 'CONFIRMED',\n /** The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings). */\n PENDING_CONFIRMATION = 'PENDING_CONFIRMATION',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CONFIRMED' | 'PENDING_CONFIRMATION';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetParticipationRequest {\n /**\n * ID of the `participation` object to retrieve.\n * @format GUID\n */\n participationId: string | null;\n}\n\nexport interface GetParticipationResponse {\n /** Retrieved `participation` object. */\n participation?: Participation;\n}\n\nexport interface QueryParticipationsRequest {\n /** Query containing filters and paging. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of participations to load.\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface QueryParticipationsResponse {\n /** Retrieved `participation` objects matching the provided query. */\n participations?: Participation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface CreateParticipationRequest {\n /** `participation` object to create. */\n participation: Participation;\n /**\n * Idempotency key guaranteeing that you don't create the same `participation`\n * object more than once.\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\nexport interface CreateParticipationResponse {\n /** Created `participation` object. */\n participation?: Participation;\n}\n\nexport interface UpdateParticipationRequest {\n /** `participation` object to update. */\n participation: Participation;\n}\n\nexport interface UpdateParticipationResponse {\n /** Updated `participation` object. */\n participation?: Participation;\n}\n\nexport interface DeleteParticipationRequest {\n /**\n * ID of `participation` object to delete.\n * @format GUID\n */\n participationId: string | null;\n}\n\nexport interface DeleteParticipationResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface SumParticipationsPartySizeByScheduleIdRequest {\n /**\n * The schedule IDs.\n * @format GUID\n * @maxSize 100\n */\n scheduleIds?: string[] | null;\n}\n\nexport interface SumParticipationsPartySizeByScheduleIdResponse {\n /** The sum of party size by schedule ID. */\n partySizeSumByScheduleId?: PartySizeSumByScheduleId[];\n}\n\nexport interface PartySizeSumByScheduleId {\n /**\n * The ID of the schedule.\n * @format GUID\n */\n scheduleId?: string | null;\n /** The sum of the participations party size. */\n partySizeSum?: number | null;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface ParticipationCreatedEnvelope {\n entity: Participation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a `participation` object is created.\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @webhook\n * @eventType wix.calendar.v3.participation_created\n * @slug created\n */\nexport declare function onParticipationCreated(\n handler: (event: ParticipationCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ParticipationDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a `participation` object is deleted.\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @webhook\n * @eventType wix.calendar.v3.participation_deleted\n * @slug deleted\n */\nexport declare function onParticipationDeleted(\n handler: (event: ParticipationDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ParticipationUpdatedEnvelope {\n entity: Participation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a `participation` object is updated.\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @webhook\n * @eventType wix.calendar.v3.participation_updated\n * @slug updated\n */\nexport declare function onParticipationUpdated(\n handler: (event: ParticipationUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a `participation` object.\n * @param participationId - ID of the `participation` object to retrieve.\n * @public\n * @requiredField participationId\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @applicableIdentity APP\n * @returns Retrieved `participation` object.\n * @fqn wix.calendar.participations.v3.ParticipationsService.GetParticipation\n */\nexport async function getParticipation(\n participationId: string\n): Promise<NonNullablePaths<Participation, `status`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n participationId: participationId,\n });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.getParticipation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.participation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { participationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['participationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of participations.\n *\n * The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.\n *\n * 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/participations/participations-query-builder/find) function.\n *\n * You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.\n *\n * `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryParticipations()` are applied in the order they are called.\n *\n * The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.\n *\n * @public\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @applicableIdentity APP\n * @fqn wix.calendar.participations.v3.ParticipationsService.QueryParticipations\n */\nexport function queryParticipations(): ParticipationsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Participation,\n 'CURSOR',\n QueryParticipationsRequest,\n QueryParticipationsResponse\n >({\n func: async (payload: QueryParticipationsRequest) => {\n const reqOpts =\n ambassadorWixCalendarV3Participation.queryParticipations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryParticipationsRequest['query']) => {\n const args = [query, {}] as [QueryParticipationsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryParticipationsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.participations,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ParticipationsQueryResult extends QueryCursorResult {\n items: Participation[];\n query: ParticipationsQueryBuilder;\n next: () => Promise<ParticipationsQueryResult>;\n prev: () => Promise<ParticipationsQueryResult>;\n}\n\nexport interface ParticipationsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName: 'scheduleId' | 'eventId' | 'externalId',\n value: any\n ) => ParticipationsQueryBuilder;\n in: (\n propertyName: 'scheduleId' | 'eventId' | '_id' | 'externalId',\n value: any\n ) => ParticipationsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ParticipationsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => ParticipationsQueryBuilder;\n find: () => Promise<ParticipationsQueryResult>;\n}\n\n/**\n * Creates a `participation` object for a schedule or event.\n * @param participation - `participation` object to create.\n * @public\n * @requiredField participation\n * @requiredField participation.participant\n * @requiredField participation.participant.name\n * @requiredField participation.participatedItem\n * @requiredField participation.partySize\n * @permissionId CALENDAR.PARTICIPATION_CREATE\n * @applicableIdentity APP\n * @returns Created `participation` object.\n * @fqn wix.calendar.participations.v3.ParticipationsService.CreateParticipation\n */\nexport async function createParticipation(\n participation: NonNullablePaths<\n Participation,\n `participant` | `participant.name` | `partySize`,\n 3\n >,\n options?: CreateParticipationOptions\n): Promise<NonNullablePaths<Participation, `status`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n participation: participation,\n idempotencyKey: options?.idempotencyKey,\n });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.createParticipation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.participation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n participation: '$[0]',\n idempotencyKey: '$[1].idempotencyKey',\n },\n singleArgumentUnchanged: false,\n },\n ['participation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateParticipationOptions {\n /**\n * Idempotency key guaranteeing that you don't create the same `participation`\n * object more than once.\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\n/**\n * Updates a `participation` object.\n * @param _id - Participation ID.\n * @public\n * @requiredField _id\n * @requiredField participation\n * @requiredField participation.revision\n * @permissionId CALENDAR.PARTICIPATION_UPDATE\n * @applicableIdentity APP\n * @returns Updated `participation` object.\n * @fqn wix.calendar.participations.v3.ParticipationsService.UpdateParticipation\n */\nexport async function updateParticipation(\n _id: string,\n participation: NonNullablePaths<UpdateParticipation, `revision`, 2>\n): Promise<NonNullablePaths<Participation, `status`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n participation: { ...participation, id: _id },\n });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.updateParticipation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.participation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { participation: '$[1]' },\n explicitPathsToArguments: { 'participation.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'participation']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateParticipation {\n /**\n * ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * associated with the participation.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * associated with the participation.\n * @minLength 36\n * @maxLength 250\n * @immutable\n */\n eventId?: string | null;\n /**\n * Participation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * External ID.\n * @format GUID\n * @immutable\n */\n externalId?: string | null;\n /** Information about the participant. */\n participant?: Participant;\n /**\n * Party size of the group or `1` for individuals.\n *\n * Min: `1`\n * Max: `1000`\n * @min 1\n * @max 1000\n */\n partySize?: number | null;\n /**\n * Status of the party's participation in the event. Depending on your\n * implementation, confirmation may be handled by the business owner or the customer.\n *\n * Supported values:\n * + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n * + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n *\n * Default: `CONFIRMED`\n */\n status?: StatusWithLiterals;\n /**\n * ID of the app that owns the participation `object`. Identical to `appId` of the\n * [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * that the related\n * [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * belongs to.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * Revision number, which increments by 1 each time the participation is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the participation.\n * Ignored when creating a participation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Extensions enabling applications or users to save custom data related to the participation. */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Deletes a `participation` object.\n * @param participationId - ID of `participation` object to delete.\n * @public\n * @requiredField participationId\n * @permissionId CALENDAR.PARTICIPATION_DELETE\n * @applicableIdentity APP\n * @fqn wix.calendar.participations.v3.ParticipationsService.DeleteParticipation\n */\nexport async function deleteParticipation(\n participationId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n participationId: participationId,\n });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.deleteParticipation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { participationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['participationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCalendarParticipationsV3ParticipationsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/calendar/v3/participations',\n destPath: '/v3/participations',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/calendar/v3/participations',\n destPath: '/v3/participations',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_calendar_participations';\n\n/** Retrieves a `participation` object. */\nexport function getParticipation(payload: object): RequestOptionsFactory<any> {\n function __getParticipation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'GET' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.GetParticipation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations/{participationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getParticipation;\n}\n\n/**\n * Creates a query to retrieve a list of participations.\n *\n * The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.\n *\n * 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/participations/participations-query-builder/find) function.\n *\n * You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.\n *\n * `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryParticipations()` are applied in the order they are called.\n *\n * The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.\n *\n */\nexport function queryParticipations(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryParticipations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'POST' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.QueryParticipations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'participations.createdDate' },\n { path: 'participations.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryParticipations;\n}\n\n/** Creates a `participation` object for a schedule or event. */\nexport function createParticipation(\n payload: object\n): RequestOptionsFactory<any> {\n function __createParticipation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'POST' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.CreateParticipation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createParticipation;\n}\n\n/** Updates a `participation` object. */\nexport function updateParticipation(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateParticipation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.UpdateParticipation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations/{participation.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateParticipation;\n}\n\n/** Deletes a `participation` object. */\nexport function deleteParticipation(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteParticipation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.DeleteParticipation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations/{participationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteParticipation;\n}\n","import {\n getParticipation as publicGetParticipation,\n queryParticipations as publicQueryParticipations,\n createParticipation as publicCreateParticipation,\n updateParticipation as publicUpdateParticipation,\n deleteParticipation as publicDeleteParticipation,\n} from './calendar-v3-participation-participations.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onParticipationCreated as publicOnParticipationCreated } from './calendar-v3-participation-participations.public.js';\nimport { onParticipationDeleted as publicOnParticipationDeleted } from './calendar-v3-participation-participations.public.js';\nimport { onParticipationUpdated as publicOnParticipationUpdated } from './calendar-v3-participation-participations.public.js';\n\nexport const getParticipation: MaybeContext<\n BuildRESTFunction<typeof publicGetParticipation> &\n typeof publicGetParticipation\n> = /*#__PURE__*/ createRESTModule(publicGetParticipation);\nexport const queryParticipations: MaybeContext<\n BuildRESTFunction<typeof publicQueryParticipations> &\n typeof publicQueryParticipations\n> = /*#__PURE__*/ createRESTModule(publicQueryParticipations);\nexport const createParticipation: MaybeContext<\n BuildRESTFunction<typeof publicCreateParticipation> &\n typeof publicCreateParticipation\n> = /*#__PURE__*/ createRESTModule(publicCreateParticipation);\nexport const updateParticipation: MaybeContext<\n BuildRESTFunction<typeof publicUpdateParticipation> &\n typeof publicUpdateParticipation\n> = /*#__PURE__*/ createRESTModule(publicUpdateParticipation);\nexport const deleteParticipation: MaybeContext<\n BuildRESTFunction<typeof publicDeleteParticipation> &\n typeof publicDeleteParticipation\n> = /*#__PURE__*/ createRESTModule(publicDeleteParticipation);\n/**\n * Triggered when a `participation` object is created.\n */\nexport const onParticipationCreated: BuildEventDefinition<\n typeof publicOnParticipationCreated\n> &\n typeof publicOnParticipationCreated = createEventModule(\n publicOnParticipationCreated\n);\n/**\n * Triggered when a `participation` object is deleted.\n */\nexport const onParticipationDeleted: BuildEventDefinition<\n typeof publicOnParticipationDeleted\n> &\n typeof publicOnParticipationDeleted = createEventModule(\n publicOnParticipationDeleted\n);\n/**\n * Triggered when a `participation` object is updated.\n */\nexport const onParticipationUpdated: BuildEventDefinition<\n typeof publicOnParticipationUpdated\n> &\n typeof publicOnParticipationUpdated = createEventModule(\n publicOnParticipationUpdated\n);\n\nexport {\n Status,\n WebhookIdentityType,\n} from './calendar-v3-participation-participations.universal.js';\nexport {\n Participation,\n ParticipationParticipatedItemOneOf,\n Participant,\n ExtendedFields,\n GetParticipationRequest,\n GetParticipationResponse,\n QueryParticipationsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n QueryParticipationsResponse,\n CursorPagingMetadata,\n Cursors,\n CreateParticipationRequest,\n CreateParticipationResponse,\n UpdateParticipationRequest,\n UpdateParticipationResponse,\n DeleteParticipationRequest,\n DeleteParticipationResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n SumParticipationsPartySizeByScheduleIdRequest,\n SumParticipationsPartySizeByScheduleIdResponse,\n PartySizeSumByScheduleId,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n ParticipationCreatedEnvelope,\n ParticipationDeletedEnvelope,\n ParticipationUpdatedEnvelope,\n ParticipationsQueryResult,\n ParticipationsQueryBuilder,\n CreateParticipationOptions,\n UpdateParticipation,\n} from './calendar-v3-participation-participations.universal.js';\nexport {\n StatusWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './calendar-v3-participation-participations.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,2BAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,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AAAC,uBAAiC;AACjC,sCAAkC;AAU3B,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AAIrD,IAAMC,8BAG2B;AAAA,EACtC;AACF;AAIO,IAAMC,8BAG2B;AAAA,EACtC;AACF;AAIO,IAAMC,8BAG2B;AAAA,EACtC;AACF;","names":["createParticipation","deleteParticipation","getParticipation","onParticipationCreated","onParticipationDeleted","onParticipationUpdated","queryParticipations","updateParticipation","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","Status","WebhookIdentityType","getParticipation","sdkTransformError","queryParticipations","createParticipation","updateParticipation","deleteParticipation","getParticipation","queryParticipations","createParticipation","updateParticipation","deleteParticipation","import_rest_modules","getParticipation","queryParticipations","createParticipation","updateParticipation","deleteParticipation","onParticipationCreated","onParticipationDeleted","onParticipationUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/calendar-v3-participation-participations.public.ts","../../src/calendar-v3-participation-participations.universal.ts","../../src/calendar-v3-participation-participations.http.ts","../../src/calendar-v3-participation-participations.context.ts"],"sourcesContent":["export * from './src/calendar-v3-participation-participations.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateParticipationOptions,\n CursorQuery,\n Participation,\n ParticipationCreatedEnvelope,\n ParticipationDeletedEnvelope,\n ParticipationUpdatedEnvelope,\n ParticipationsQueryBuilder,\n QueryParticipationsResponse,\n UpdateParticipation,\n createParticipation as universalCreateParticipation,\n deleteParticipation as universalDeleteParticipation,\n getParticipation as universalGetParticipation,\n queryParticipations as universalQueryParticipations,\n typedQueryParticipations as universalTypedQueryParticipations,\n updateParticipation as universalUpdateParticipation,\n} from './calendar-v3-participation-participations.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/calendar' };\n\nexport function getParticipation(\n httpClient: HttpClient\n): GetParticipationSignature {\n return (participationId: string) =>\n universalGetParticipation(\n participationId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetParticipationSignature {\n /**\n * Retrieves a `participation` object.\n * @param - ID of the `participation` object to retrieve.\n * @returns Retrieved `participation` object.\n */\n (participationId: string): Promise<\n NonNullablePaths<Participation, `status`, 2>\n >;\n}\n\nexport function queryParticipations(\n httpClient: HttpClient\n): QueryParticipationsSignature {\n return () =>\n universalQueryParticipations(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryParticipationsSignature {\n /**\n * Creates a query to retrieve a list of participations.\n *\n * The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.\n *\n * 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/participations/participations-query-builder/find) function.\n *\n * You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.\n *\n * `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryParticipations()` are applied in the order they are called.\n *\n * The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.\n *\n */\n (): ParticipationsQueryBuilder;\n}\n\nexport function typedQueryParticipations(\n httpClient: HttpClient\n): TypedQueryParticipationsSignature {\n return (query: CursorQuery) =>\n universalTypedQueryParticipations(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryParticipationsSignature {\n /** */\n (query: CursorQuery): Promise<\n NonNullablePaths<\n QueryParticipationsResponse,\n `participations` | `participations.${number}.status`,\n 4\n >\n >;\n}\n\nexport function createParticipation(\n httpClient: HttpClient\n): CreateParticipationSignature {\n return (\n participation: NonNullablePaths<\n Participation,\n `participant` | `participant.name` | `partySize`,\n 3\n >,\n options?: CreateParticipationOptions\n ) =>\n universalCreateParticipation(\n participation,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateParticipationSignature {\n /**\n * Creates a `participation` object for a schedule or event.\n * @param - `participation` object to create.\n * @returns Created `participation` object.\n */\n (\n participation: NonNullablePaths<\n Participation,\n `participant` | `participant.name` | `partySize`,\n 3\n >,\n options?: CreateParticipationOptions\n ): Promise<NonNullablePaths<Participation, `status`, 2>>;\n}\n\nexport function updateParticipation(\n httpClient: HttpClient\n): UpdateParticipationSignature {\n return (\n _id: string,\n participation: NonNullablePaths<UpdateParticipation, `revision`, 2>\n ) =>\n universalUpdateParticipation(\n _id,\n participation,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateParticipationSignature {\n /**\n * Updates a `participation` object.\n * @param - Participation ID.\n * @returns Updated `participation` object.\n */\n (\n _id: string,\n participation: NonNullablePaths<UpdateParticipation, `revision`, 2>\n ): Promise<NonNullablePaths<Participation, `status`, 2>>;\n}\n\nexport function deleteParticipation(\n httpClient: HttpClient\n): DeleteParticipationSignature {\n return (participationId: string) =>\n universalDeleteParticipation(\n participationId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteParticipationSignature {\n /**\n * Deletes a `participation` object.\n * @param - ID of `participation` object to delete.\n */\n (participationId: string): Promise<void>;\n}\n\nexport const onParticipationCreated = EventDefinition(\n 'wix.calendar.v3.participation_created',\n true,\n (event: ParticipationCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ParticipationCreatedEnvelope>();\nexport const onParticipationDeleted = EventDefinition(\n 'wix.calendar.v3.participation_deleted',\n true,\n (event: ParticipationDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ParticipationDeletedEnvelope>();\nexport const onParticipationUpdated = EventDefinition(\n 'wix.calendar.v3.participation_updated',\n true,\n (event: ParticipationUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ParticipationUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CreateParticipationOptions,\n CreateParticipationRequest,\n CreateParticipationResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteParticipationRequest,\n DeleteParticipationResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetParticipationRequest,\n GetParticipationResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n Participant,\n Participation,\n ParticipationCreatedEnvelope,\n ParticipationDeletedEnvelope,\n ParticipationParticipatedItemOneOf,\n ParticipationUpdatedEnvelope,\n ParticipationsQueryBuilder,\n ParticipationsQueryResult,\n PartySizeSumByScheduleId,\n QueryParticipationsRequest,\n QueryParticipationsResponse,\n RestoreInfo,\n Status,\n SumParticipationsPartySizeByScheduleIdRequest,\n SumParticipationsPartySizeByScheduleIdResponse,\n UpdateParticipation,\n UpdateParticipationRequest,\n UpdateParticipationResponse,\n WebhookIdentityType,\n} from './calendar-v3-participation-participations.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixCalendarV3Participation from './calendar-v3-participation-participations.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * The `participation` object represents the relationship between a participant and\n * an [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * or [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object).\n * It includes details about the participant, whether the participation status is confirmed or\n * pending, which app owns the relevant event or schedule, and allows for custom data extensions.\n */\nexport interface Participation extends ParticipationParticipatedItemOneOf {\n /**\n * ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * associated with the participation.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * associated with the participation.\n * @minLength 36\n * @maxLength 250\n * @immutable\n */\n eventId?: string | null;\n /**\n * Participation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * External ID.\n * @format GUID\n * @immutable\n */\n externalId?: string | null;\n /** Information about the participant. */\n participant?: Participant;\n /**\n * Party size of the group or `1` for individuals.\n *\n * Min: `1`\n * Max: `1000`\n * @min 1\n * @max 1000\n */\n partySize?: number | null;\n /**\n * Status of the party's participation in the event. Depending on your\n * implementation, confirmation may be handled by the business owner or the customer.\n *\n * Supported values:\n * + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n * + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n *\n * Default: `CONFIRMED`\n */\n status?: StatusWithLiterals;\n /**\n * ID of the app that owns the participation `object`. Identical to `appId` of the\n * [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * that the related\n * [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * belongs to.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * Revision number, which increments by 1 each time the participation is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the participation.\n * Ignored when creating a participation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Extensions enabling applications or users to save custom data related to the participation. */\n extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface ParticipationParticipatedItemOneOf {\n /**\n * ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * associated with the participation.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * associated with the participation.\n * @minLength 36\n * @maxLength 250\n * @immutable\n */\n eventId?: string | null;\n}\n\nexport interface Participant {\n /**\n * Participant name.\n *\n * Min: 1 character\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n name?: string | null;\n /**\n * Participant's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Participant's email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * [Contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID of the participant.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport enum Status {\n /** The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings). */\n CONFIRMED = 'CONFIRMED',\n /** The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings). */\n PENDING_CONFIRMATION = 'PENDING_CONFIRMATION',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'CONFIRMED' | 'PENDING_CONFIRMATION';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetParticipationRequest {\n /**\n * ID of the `participation` object to retrieve.\n * @format GUID\n */\n participationId: string | null;\n}\n\nexport interface GetParticipationResponse {\n /** Retrieved `participation` object. */\n participation?: Participation;\n}\n\nexport interface QueryParticipationsRequest {\n /** Query containing filters and paging. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of participations to load.\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface QueryParticipationsResponse {\n /** Retrieved `participation` objects matching the provided query. */\n participations?: Participation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface CreateParticipationRequest {\n /** `participation` object to create. */\n participation: Participation;\n /**\n * Idempotency key guaranteeing that you don't create the same `participation`\n * object more than once.\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\nexport interface CreateParticipationResponse {\n /** Created `participation` object. */\n participation?: Participation;\n}\n\nexport interface UpdateParticipationRequest {\n /** `participation` object to update. */\n participation: Participation;\n}\n\nexport interface UpdateParticipationResponse {\n /** Updated `participation` object. */\n participation?: Participation;\n}\n\nexport interface DeleteParticipationRequest {\n /**\n * ID of `participation` object to delete.\n * @format GUID\n */\n participationId: string | null;\n}\n\nexport interface DeleteParticipationResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface SumParticipationsPartySizeByScheduleIdRequest {\n /**\n * The schedule IDs.\n * @format GUID\n * @maxSize 100\n */\n scheduleIds?: string[] | null;\n}\n\nexport interface SumParticipationsPartySizeByScheduleIdResponse {\n /** The sum of party size by schedule ID. */\n partySizeSumByScheduleId?: PartySizeSumByScheduleId[];\n}\n\nexport interface PartySizeSumByScheduleId {\n /**\n * The ID of the schedule.\n * @format GUID\n */\n scheduleId?: string | null;\n /** The sum of the participations party size. */\n partySizeSum?: number | null;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface ParticipationCreatedEnvelope {\n entity: Participation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a `participation` object is created.\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @webhook\n * @eventType wix.calendar.v3.participation_created\n * @slug created\n */\nexport declare function onParticipationCreated(\n handler: (event: ParticipationCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ParticipationDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a `participation` object is deleted.\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @webhook\n * @eventType wix.calendar.v3.participation_deleted\n * @slug deleted\n */\nexport declare function onParticipationDeleted(\n handler: (event: ParticipationDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ParticipationUpdatedEnvelope {\n entity: Participation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a `participation` object is updated.\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @webhook\n * @eventType wix.calendar.v3.participation_updated\n * @slug updated\n */\nexport declare function onParticipationUpdated(\n handler: (event: ParticipationUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a `participation` object.\n * @param participationId - ID of the `participation` object to retrieve.\n * @public\n * @requiredField participationId\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @applicableIdentity APP\n * @returns Retrieved `participation` object.\n * @fqn wix.calendar.participations.v3.ParticipationsService.GetParticipation\n */\nexport async function getParticipation(\n participationId: string\n): Promise<NonNullablePaths<Participation, `status`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n participationId: participationId,\n });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.getParticipation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.participation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { participationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['participationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of participations.\n *\n * The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.\n *\n * 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/participations/participations-query-builder/find) function.\n *\n * You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.\n *\n * `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryParticipations()` are applied in the order they are called.\n *\n * The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.\n *\n * @public\n * @permissionId CALENDAR.PARTICIPATION_READ\n * @applicableIdentity APP\n * @fqn wix.calendar.participations.v3.ParticipationsService.QueryParticipations\n */\nexport function queryParticipations(): ParticipationsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Participation,\n 'CURSOR',\n QueryParticipationsRequest,\n QueryParticipationsResponse\n >({\n func: async (payload: QueryParticipationsRequest) => {\n const reqOpts =\n ambassadorWixCalendarV3Participation.queryParticipations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryParticipationsRequest['query']) => {\n const args = [query, {}] as [QueryParticipationsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryParticipationsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.participations,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ParticipationsQueryResult extends QueryCursorResult {\n items: Participation[];\n query: ParticipationsQueryBuilder;\n next: () => Promise<ParticipationsQueryResult>;\n prev: () => Promise<ParticipationsQueryResult>;\n}\n\nexport interface ParticipationsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName: 'scheduleId' | 'eventId' | 'externalId',\n value: any\n ) => ParticipationsQueryBuilder;\n in: (\n propertyName: 'scheduleId' | 'eventId' | '_id' | 'externalId',\n value: any\n ) => ParticipationsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ParticipationsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => ParticipationsQueryBuilder;\n find: () => Promise<ParticipationsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.calendar.participations.v3.ParticipationsService.QueryParticipations\n * @requiredField query\n */\nexport async function typedQueryParticipations(\n query: CursorQuery\n): Promise<\n NonNullablePaths<\n QueryParticipationsResponse,\n `participations` | `participations.${number}.status`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.queryParticipations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a `participation` object for a schedule or event.\n * @param participation - `participation` object to create.\n * @public\n * @requiredField participation\n * @requiredField participation.participant\n * @requiredField participation.participant.name\n * @requiredField participation.participatedItem\n * @requiredField participation.partySize\n * @permissionId CALENDAR.PARTICIPATION_CREATE\n * @applicableIdentity APP\n * @returns Created `participation` object.\n * @fqn wix.calendar.participations.v3.ParticipationsService.CreateParticipation\n */\nexport async function createParticipation(\n participation: NonNullablePaths<\n Participation,\n `participant` | `participant.name` | `partySize`,\n 3\n >,\n options?: CreateParticipationOptions\n): Promise<NonNullablePaths<Participation, `status`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n participation: participation,\n idempotencyKey: options?.idempotencyKey,\n });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.createParticipation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.participation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n participation: '$[0]',\n idempotencyKey: '$[1].idempotencyKey',\n },\n singleArgumentUnchanged: false,\n },\n ['participation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateParticipationOptions {\n /**\n * Idempotency key guaranteeing that you don't create the same `participation`\n * object more than once.\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\n/**\n * Updates a `participation` object.\n * @param _id - Participation ID.\n * @public\n * @requiredField _id\n * @requiredField participation\n * @requiredField participation.revision\n * @permissionId CALENDAR.PARTICIPATION_UPDATE\n * @applicableIdentity APP\n * @returns Updated `participation` object.\n * @fqn wix.calendar.participations.v3.ParticipationsService.UpdateParticipation\n */\nexport async function updateParticipation(\n _id: string,\n participation: NonNullablePaths<UpdateParticipation, `revision`, 2>\n): Promise<NonNullablePaths<Participation, `status`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n participation: { ...participation, id: _id },\n });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.updateParticipation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.participation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { participation: '$[1]' },\n explicitPathsToArguments: { 'participation.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'participation']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateParticipation {\n /**\n * ID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * associated with the participation.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * associated with the participation.\n * @minLength 36\n * @maxLength 250\n * @immutable\n */\n eventId?: string | null;\n /**\n * Participation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * External ID.\n * @format GUID\n * @immutable\n */\n externalId?: string | null;\n /** Information about the participant. */\n participant?: Participant;\n /**\n * Party size of the group or `1` for individuals.\n *\n * Min: `1`\n * Max: `1000`\n * @min 1\n * @max 1000\n */\n partySize?: number | null;\n /**\n * Status of the party's participation in the event. Depending on your\n * implementation, confirmation may be handled by the business owner or the customer.\n *\n * Supported values:\n * + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n * + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings).\n *\n * Default: `CONFIRMED`\n */\n status?: StatusWithLiterals;\n /**\n * ID of the app that owns the participation `object`. Identical to `appId` of the\n * [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object)\n * that the related\n * [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object)\n * belongs to.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * Revision number, which increments by 1 each time the participation is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the participation.\n * Ignored when creating a participation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Extensions enabling applications or users to save custom data related to the participation. */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Deletes a `participation` object.\n * @param participationId - ID of `participation` object to delete.\n * @public\n * @requiredField participationId\n * @permissionId CALENDAR.PARTICIPATION_DELETE\n * @applicableIdentity APP\n * @fqn wix.calendar.participations.v3.ParticipationsService.DeleteParticipation\n */\nexport async function deleteParticipation(\n participationId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n participationId: participationId,\n });\n\n const reqOpts =\n ambassadorWixCalendarV3Participation.deleteParticipation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { participationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['participationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCalendarParticipationsV3ParticipationsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/calendar/v3/participations',\n destPath: '/v3/participations',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/calendar/v3/participations',\n destPath: '/v3/participations',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_calendar_participations';\n\n/** Retrieves a `participation` object. */\nexport function getParticipation(payload: object): RequestOptionsFactory<any> {\n function __getParticipation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'GET' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.GetParticipation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations/{participationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getParticipation;\n}\n\n/**\n * Creates a query to retrieve a list of participations.\n *\n * The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.\n *\n * 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/participations/participations-query-builder/find) function.\n *\n * You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.\n *\n * `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `createdDate` in ascending order.\n *\n * The functions that are chained to `queryParticipations()` are applied in the order they are called.\n *\n * The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.\n *\n */\nexport function queryParticipations(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryParticipations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'POST' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.QueryParticipations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'participations.createdDate' },\n { path: 'participations.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryParticipations;\n}\n\n/** Creates a `participation` object for a schedule or event. */\nexport function createParticipation(\n payload: object\n): RequestOptionsFactory<any> {\n function __createParticipation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'POST' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.CreateParticipation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createParticipation;\n}\n\n/** Updates a `participation` object. */\nexport function updateParticipation(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateParticipation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.UpdateParticipation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations/{participation.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'participation.createdDate' },\n { path: 'participation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateParticipation;\n}\n\n/** Deletes a `participation` object. */\nexport function deleteParticipation(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteParticipation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.participation',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.calendar.participations.v3.ParticipationsService.DeleteParticipation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({\n protoPath: '/v3/participations/{participationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteParticipation;\n}\n","import {\n getParticipation as publicGetParticipation,\n queryParticipations as publicQueryParticipations,\n typedQueryParticipations as publicTypedQueryParticipations,\n createParticipation as publicCreateParticipation,\n updateParticipation as publicUpdateParticipation,\n deleteParticipation as publicDeleteParticipation,\n} from './calendar-v3-participation-participations.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n CursorQuery,\n ParticipationsQueryBuilder,\n typedQueryParticipations as universalTypedQueryParticipations,\n} from './calendar-v3-participation-participations.universal.js';\nimport { onParticipationCreated as publicOnParticipationCreated } from './calendar-v3-participation-participations.public.js';\nimport { onParticipationDeleted as publicOnParticipationDeleted } from './calendar-v3-participation-participations.public.js';\nimport { onParticipationUpdated as publicOnParticipationUpdated } from './calendar-v3-participation-participations.public.js';\n\nfunction customQueryParticipations(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryParticipations(httpClient)(),\n typedQueryFunction: (query: CursorQuery) =>\n publicTypedQueryParticipations(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ParticipationsQueryBuilder;\n function overloadedQuery(\n query: CursorQuery\n ): ReturnType<typeof universalTypedQueryParticipations>;\n function overloadedQuery(query?: CursorQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const getParticipation: MaybeContext<\n BuildRESTFunction<typeof publicGetParticipation> &\n typeof publicGetParticipation\n> = /*#__PURE__*/ createRESTModule(publicGetParticipation);\nexport const createParticipation: MaybeContext<\n BuildRESTFunction<typeof publicCreateParticipation> &\n typeof publicCreateParticipation\n> = /*#__PURE__*/ createRESTModule(publicCreateParticipation);\nexport const updateParticipation: MaybeContext<\n BuildRESTFunction<typeof publicUpdateParticipation> &\n typeof publicUpdateParticipation\n> = /*#__PURE__*/ createRESTModule(publicUpdateParticipation);\nexport const deleteParticipation: MaybeContext<\n BuildRESTFunction<typeof publicDeleteParticipation> &\n typeof publicDeleteParticipation\n> = /*#__PURE__*/ createRESTModule(publicDeleteParticipation);\nexport const queryParticipations: MaybeContext<\n BuildRESTFunction<typeof customQueryParticipations> &\n typeof customQueryParticipations\n> = /*#__PURE__*/ createRESTModule(customQueryParticipations);\n/**\n * Triggered when a `participation` object is created.\n */\nexport const onParticipationCreated: BuildEventDefinition<\n typeof publicOnParticipationCreated\n> &\n typeof publicOnParticipationCreated = createEventModule(\n publicOnParticipationCreated\n);\n/**\n * Triggered when a `participation` object is deleted.\n */\nexport const onParticipationDeleted: BuildEventDefinition<\n typeof publicOnParticipationDeleted\n> &\n typeof publicOnParticipationDeleted = createEventModule(\n publicOnParticipationDeleted\n);\n/**\n * Triggered when a `participation` object is updated.\n */\nexport const onParticipationUpdated: BuildEventDefinition<\n typeof publicOnParticipationUpdated\n> &\n typeof publicOnParticipationUpdated = createEventModule(\n publicOnParticipationUpdated\n);\n\nexport {\n Status,\n WebhookIdentityType,\n} from './calendar-v3-participation-participations.universal.js';\nexport {\n Participation,\n ParticipationParticipatedItemOneOf,\n Participant,\n ExtendedFields,\n GetParticipationRequest,\n GetParticipationResponse,\n QueryParticipationsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n QueryParticipationsResponse,\n CursorPagingMetadata,\n Cursors,\n CreateParticipationRequest,\n CreateParticipationResponse,\n UpdateParticipationRequest,\n UpdateParticipationResponse,\n DeleteParticipationRequest,\n DeleteParticipationResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n SumParticipationsPartySizeByScheduleIdRequest,\n SumParticipationsPartySizeByScheduleIdResponse,\n PartySizeSumByScheduleId,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n ParticipationCreatedEnvelope,\n ParticipationDeletedEnvelope,\n ParticipationUpdatedEnvelope,\n ParticipationsQueryResult,\n ParticipationsQueryBuilder,\n CreateParticipationOptions,\n UpdateParticipation,\n} from './calendar-v3-participation-participations.universal.js';\nexport {\n StatusWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './calendar-v3-participation-participations.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,8BAAAC;AAAA,E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gB,OAA0B;AACjD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAML,uBAGK,2DAAiB,yBAAyB;AAIrD,IAAMM,8BAG2B;AAAA,EACtC;AACF;AAIO,IAAMC,8BAG2B;AAAA,EACtC;AACF;AAIO,IAAMC,8BAG2B;AAAA,EACtC;AACF;","names":["createParticipation","deleteParticipation","getParticipation","onParticipationCreated","onParticipationDeleted","onParticipationUpdated","queryParticipations","updateParticipation","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","Status","WebhookIdentityType","getParticipation","sdkTransformError","queryParticipations","createParticipation","updateParticipation","deleteParticipation","getParticipation","queryParticipations","typedQueryParticipations","createParticipation","updateParticipation","deleteParticipation","import_rest_modules","queryParticipations","typedQueryParticipations","getParticipation","createParticipation","updateParticipation","deleteParticipation","onParticipationCreated","onParticipationDeleted","onParticipationUpdated"]}
@@ -569,6 +569,12 @@ interface ParticipationsQueryBuilder {
569
569
  skipTo: (cursor: string) => ParticipationsQueryBuilder;
570
570
  find: () => Promise<ParticipationsQueryResult>;
571
571
  }
572
+ /**
573
+ * @hidden
574
+ * @fqn wix.calendar.participations.v3.ParticipationsService.QueryParticipations
575
+ * @requiredField query
576
+ */
577
+ declare function typedQueryParticipations(query: CursorQuery): Promise<NonNullablePaths<QueryParticipationsResponse, `participations` | `participations.${number}.status`, 4>>;
572
578
  /**
573
579
  * Creates a `participation` object for a schedule or event.
574
580
  * @param participation - `participation` object to create.
@@ -696,4 +702,4 @@ interface UpdateParticipation {
696
702
  */
697
703
  declare function deleteParticipation(participationId: string): Promise<void>;
698
704
 
699
- export { type ActionEvent, type BaseEventMetadata, type CreateParticipationOptions, type CreateParticipationRequest, type CreateParticipationResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteParticipationRequest, type DeleteParticipationResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetParticipationRequest, type GetParticipationResponse, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type Participant, type Participation, type ParticipationCreatedEnvelope, type ParticipationDeletedEnvelope, type ParticipationParticipatedItemOneOf, type ParticipationUpdatedEnvelope, type ParticipationsQueryBuilder, type ParticipationsQueryResult, type PartySizeSumByScheduleId, type QueryParticipationsRequest, type QueryParticipationsResponse, type RestoreInfo, Status, type StatusWithLiterals, type SumParticipationsPartySizeByScheduleIdRequest, type SumParticipationsPartySizeByScheduleIdResponse, type UpdateParticipation, type UpdateParticipationRequest, type UpdateParticipationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createParticipation, deleteParticipation, getParticipation, onParticipationCreated, onParticipationDeleted, onParticipationUpdated, queryParticipations, updateParticipation };
705
+ export { type ActionEvent, type BaseEventMetadata, type CreateParticipationOptions, type CreateParticipationRequest, type CreateParticipationResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteParticipationRequest, type DeleteParticipationResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetParticipationRequest, type GetParticipationResponse, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type Participant, type Participation, type ParticipationCreatedEnvelope, type ParticipationDeletedEnvelope, type ParticipationParticipatedItemOneOf, type ParticipationUpdatedEnvelope, type ParticipationsQueryBuilder, type ParticipationsQueryResult, type PartySizeSumByScheduleId, type QueryParticipationsRequest, type QueryParticipationsResponse, type RestoreInfo, Status, type StatusWithLiterals, type SumParticipationsPartySizeByScheduleIdRequest, type SumParticipationsPartySizeByScheduleIdResponse, type UpdateParticipation, type UpdateParticipationRequest, type UpdateParticipationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createParticipation, deleteParticipation, getParticipation, onParticipationCreated, onParticipationDeleted, onParticipationUpdated, queryParticipations, typedQueryParticipations, updateParticipation };
@@ -26,6 +26,7 @@ __export(index_typings_exports, {
26
26
  deleteParticipation: () => deleteParticipation2,
27
27
  getParticipation: () => getParticipation2,
28
28
  queryParticipations: () => queryParticipations2,
29
+ typedQueryParticipations: () => typedQueryParticipations,
29
30
  updateParticipation: () => updateParticipation2
30
31
  });
31
32
  module.exports = __toCommonJS(index_typings_exports);
@@ -309,6 +310,29 @@ function queryParticipations2() {
309
310
  transformationPaths: {}
310
311
  });
311
312
  }
313
+ async function typedQueryParticipations(query) {
314
+ const { httpClient, sideEffects } = arguments[1];
315
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
316
+ const reqOpts = queryParticipations(payload);
317
+ sideEffects?.onSiteCall?.();
318
+ try {
319
+ const result = await httpClient.request(reqOpts);
320
+ sideEffects?.onSuccess?.(result);
321
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
322
+ } catch (err) {
323
+ const transformedError = (0, import_transform_error.transformError)(
324
+ err,
325
+ {
326
+ spreadPathsToArguments: {},
327
+ explicitPathsToArguments: { query: "$[0]" },
328
+ singleArgumentUnchanged: false
329
+ },
330
+ ["query"]
331
+ );
332
+ sideEffects?.onError?.(err);
333
+ throw transformedError;
334
+ }
335
+ }
312
336
  async function createParticipation2(participation, options) {
313
337
  const { httpClient, sideEffects } = arguments[2];
314
338
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -395,6 +419,7 @@ async function deleteParticipation2(participationId) {
395
419
  deleteParticipation,
396
420
  getParticipation,
397
421
  queryParticipations,
422
+ typedQueryParticipations,
398
423
  updateParticipation
399
424
  });
400
425
  //# sourceMappingURL=index.typings.js.map