@wix/auto_sdk_calendar_participations 1.0.33 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +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 ParticipationQuery,\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: ParticipationQuery) =>\n universalTypedQueryParticipations(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryParticipationsSignature {\n /** */\n (query: ParticipationQuery): 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 { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n ],\n },\n ])\n )\n)<ParticipationUpdatedEnvelope>();\n\nexport {\n AccountInfo,\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 ParticipationQuerySpec,\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 {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} 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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\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 /** @hidden */\n modifiedFields: Record<string, any>;\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: ParticipationQuery\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\nexport interface ParticipationQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id'];\n operators: ['$in'];\n sort: 'NONE';\n },\n {\n fields: ['eventId', 'externalId', 'scheduleId'];\n operators: ['$eq', '$in'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Participation,\n ParticipationQuerySpec\n>;\nexport type ParticipationQuery = {\n /** \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 */\n cursorPaging?: {\n /** \n Number of participations to load. \n @min: 1,\n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | 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?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\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?: CommonQueryWithEntityContext['filter'] | null;\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 ParticipationQuery,\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: ParticipationQuery) =>\n publicTypedQueryParticipations(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ParticipationsQueryBuilder;\n function overloadedQuery(\n query: ParticipationQuery\n ): ReturnType<typeof universalTypedQueryParticipations>;\n function overloadedQuery(query?: ParticipationQuery): 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 AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n ParticipationCreatedEnvelope,\n ParticipationDeletedEnvelope,\n ParticipationUpdatedEnvelope,\n ParticipationsQueryResult,\n ParticipationsQueryBuilder,\n ParticipationQuerySpec,\n CreateParticipationOptions,\n UpdateParticipation,\n} from './calendar-v3-participation-participations.universal.js';\nexport {\n StatusWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n ParticipationQuery,\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,uBAA2B;AAI3B,SAAS,2DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAA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UAChC,EAAE,MAAM,wBAAwB;AAAA,UAChC,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAgC;AACzB,IAAM,6BAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,6BAA6B;AAAA,UACrC,EAAE,MAAM,6BAA6B;AAAA,QACvC;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAgC;;;AGlOhC,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAU1C,SAAS,0BAA0B,YAAwB;AACzD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,qBAA0B,UAAU,EAAE;AAAA,IAClE,oBAAoB,CAAC,UACnBC,0BAA+B,UAAU,EAAE,KAAK;AAAA,IAClD,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAAiC;AACxD,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"]}
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 ParticipationQuery,\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: ParticipationQuery) =>\n universalTypedQueryParticipations(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryParticipationsSignature {\n /** */\n (query: ParticipationQuery): 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 { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n ],\n },\n ])\n )\n)<ParticipationUpdatedEnvelope>();\n\nexport {\n AccountInfo,\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 ParticipationQuerySpec,\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 {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} 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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 accountInfo?: AccountInfoMetadata;\n}\n\ninterface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\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 /** @hidden */\n modifiedFields: Record<string, any>;\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: ParticipationQuery\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\nexport interface ParticipationQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id'];\n operators: ['$in'];\n sort: 'NONE';\n },\n {\n fields: ['eventId', 'externalId', 'scheduleId'];\n operators: ['$eq', '$in'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Participation,\n ParticipationQuerySpec\n>;\nexport type ParticipationQuery = {\n /** \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 */\n cursorPaging?: {\n /** \n Number of participations to load. \n @min: 1,\n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | 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?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\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?: CommonQueryWithEntityContext['filter'] | null;\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 ParticipationQuery,\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: ParticipationQuery) =>\n publicTypedQueryParticipations(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ParticipationsQueryBuilder;\n function overloadedQuery(\n query: ParticipationQuery\n ): ReturnType<typeof universalTypedQueryParticipations>;\n function overloadedQuery(query?: ParticipationQuery): 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 AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n ParticipationCreatedEnvelope,\n ParticipationDeletedEnvelope,\n ParticipationUpdatedEnvelope,\n ParticipationsQueryResult,\n ParticipationsQueryBuilder,\n ParticipationQuerySpec,\n CreateParticipationOptions,\n UpdateParticipation,\n} from './calendar-v3-participation-participations.universal.js';\nexport {\n StatusWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n ParticipationQuery,\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,IAA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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"]}
@@ -355,6 +355,8 @@ interface MessageEnvelope {
355
355
  identity?: IdentificationData;
356
356
  /** Stringify payload. */
357
357
  data?: string;
358
+ /** Details related to the account */
359
+ accountInfo?: AccountInfo;
358
360
  }
359
361
  interface IdentificationData extends IdentificationDataIdOneOf {
360
362
  /**
@@ -442,6 +444,8 @@ interface BaseEventMetadata {
442
444
  eventType?: string;
443
445
  /** The identification type and identity data. */
444
446
  identity?: IdentificationData;
447
+ /** Details related to the account */
448
+ accountInfo?: AccountInfo;
445
449
  }
446
450
  interface EventMetadata extends BaseEventMetadata {
447
451
  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
@@ -472,6 +476,15 @@ interface EventMetadata extends BaseEventMetadata {
472
476
  * 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.
473
477
  */
474
478
  entityEventSequence?: string | null;
479
+ accountInfo?: AccountInfoMetadata;
480
+ }
481
+ interface AccountInfoMetadata {
482
+ /** ID of the Wix account associated with the event */
483
+ accountId: string;
484
+ /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
485
+ siteId?: string;
486
+ /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
487
+ parentAccountId?: string;
475
488
  }
476
489
  interface ParticipationCreatedEnvelope {
477
490
  entity: Participation;