@wix/auto_sdk_arrivals_arrivals 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +37 -37
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +36 -36
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +37 -37
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +36 -36
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +15 -15
- package/build/internal/cjs/index.typings.d.ts +59 -57
- package/build/internal/cjs/meta.d.ts +36 -36
- package/build/internal/es/index.d.mts +15 -15
- package/build/internal/es/index.typings.d.mts +59 -57
- package/build/internal/es/meta.d.mts +36 -36
- package/package.json +2 -2
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/arrivals-v1-arrival-arrivals.universal.ts","../../src/arrivals-v1-arrival-arrivals.http.ts","../../src/arrivals-v1-arrival-arrivals.public.ts","../../src/arrivals-v1-arrival-arrivals.context.ts"],"sourcesContent":["export * from './src/arrivals-v1-arrival-arrivals.context.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 ambassadorWixArrivalsV1Arrival from './arrivals-v1-arrival-arrivals.http.js';\n// @ts-ignore\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'arrival.contactDetails.picture' }];\nconst TRANSFORM_PATHS_1 = [{ path: 'contactDetails.picture' }];\nconst TRANSFORM_PATHS_2 = [{ path: 'arrivals.contactDetails.picture' }];\n\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * An arrival is the record of one entry into an area, at one of its entrances: who arrived, where, what the\n * eligibility engine found (`eligibilityDetails`), and whether access was given (`status`). Arrivals are written\n * only by Create Arrival, directly or through Create Arrival By Credential. An arrival changes only when a site user overrides it, which\n * moves a denial to `GRANTED` (Override Arrival as Granted, or a repeat of Create Arrival within 5 seconds that carries\n * `denialOverride`), and when two contacts are merged in CRM, which moves\n * `contactDetails.contactId` to the surviving contact; the snapshot stays as it was; and when the contact's personal data is\n * deleted for privacy, which replaces `contactDetails.firstName`, `contactDetails.lastName` and `overrideReason` with `****`\n * and removes the picture. Otherwise, the person's name and picture are kept as they were when the arrival was written, and a granted arrival keeps what granted the entry. `eligibilityDetails` and\n * `overrideReason` say why a person was not eligible, so they are returned only to callers with the\n * `arrivals:v1:arrival:read_eligibility_details` permission.\n */\nexport interface Arrival extends ArrivalGrantedByOneOf {\n /**\n * The Pricing Plans benefit the entry was taken from: a credit pack or an unlimited plan (`type`). Redeemed in Pricing Plans after the arrival is written — after an override too.\n * @readonly\n */\n planBenefit?: PlanBenefit;\n /**\n * The scheduled event the person was booked into. Nothing is redeemed for one; its attendance is marked in its own product after the arrival is written.\n * @readonly\n */\n scheduledEvent?: ScheduledEvent;\n /**\n * Arrival ID. Returned by Create Arrival; Override Arrival as Granted names it.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number. Moves when a site user overrides a denied arrival — with Override Arrival as Granted, or with a repeat of\n * Create Arrival within 5 seconds that carries `denialOverride` — and when a CRM contact merge\n * moves the arrival to the surviving contact; nothing else changes an arrival.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the arrival was written, right after the person was evaluated at the entrance. For a granted arrival that was not overridden, it is the time the person was let in; for one that a site user overrode afterwards, it is the denial's time, and the override's time is `overriddenDate`; for one let in with `denialOverride` on the Create Arrival call that wrote it, it is the time the arrival was written, a moment after its `overriddenDate`.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the arrival was last updated. Equal to `createdDate` until a site user overrides the arrival or a contact merge moves it. For the time of the override itself, read `overriddenDate`, which a later merge does not move.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Who arrived: the contact, with their name and picture as Contacts held them when the arrival was written. Always present. On Create Arrival only `contactDetails.contactId` is sent; the server fills in the rest. */\n contactDetails?: ContactDetails;\n /**\n * How the arrival came to be, and who created it. Set by the server.\n * @readonly\n */\n source?: ArrivalSource;\n /**\n * The area the person entered and the entrance they came in through, with the area's name and location and the\n * entrance's name as they were at the time of the arrival. On Create Arrival only `area.entranceId` is sent; the\n * server finds the area the entrance belongs to and fills in the rest.\n */\n area?: AreaInfo;\n /**\n * What the engine found, from which `status` was derived: the issues of the entry as a whole, the intake forms the\n * person is missing, and every plan benefit and scheduled event it found for the area, each with its own issue. Set\n * by the server at creation and never changed afterwards: an override keeps it, so its `issues` hold what was overridden. Returned\n * only to callers with the `arrivals:v1:arrival:read_eligibility_details` permission, since it says why a person was\n * not eligible; filtering on `eligibilityDetails.issues` requires the same permission. Every response that carries an\n * arrival leaves it out for other callers, Create Arrival and Create Arrival By Credential included: an app without\n * the permission, such as a reader at an entrance, gets `status` and not the reason.\n * @readonly\n */\n eligibilityDetails?: EligibilityDetails;\n /**\n * Whether access was given. Set by the server: by Create Arrival, from the issues — `GRANTED` despite them when the call carries `denialOverride` — and moved from `DENIED` to `GRANTED` by Override Arrival as Granted. Never sent by a caller.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Why a site user let the person in against the issues, in their own words. Optional; written by Override Arrival as Granted, or from `denialOverride.reason` when Create Arrival let the person in despite a denial, so it can be present only on a `GRANTED` arrival with issues; either way the actor is `overriddenBy`. Free text that may describe the person, so it is personal data: `****` after the contact's personal data is deleted for privacy. It is returned only to callers with the `arrivals:v1:arrival:read_eligibility_details` permission.\n * @maxLength 500\n * @readonly\n */\n overrideReason?: string | null;\n /**\n * Who let the person in against a denial: the caller of Override Arrival as Granted, or of Create Arrival with `denialOverride`. Set by the server; present only on an arrival a site user let in against a denial, absent on every other arrival. Always a Wix user (`wixUserId`), since only site users may override. Who wrote the arrival is `source.createdBy`; the two can differ.\n * @readonly\n */\n overriddenBy?: CommonIdentificationData;\n /**\n * Date and time a site user let the person in against a denial, set once with `overriddenBy`: when Override Arrival as Granted granted the arrival, or the time Create Arrival evaluated the person when it let them in with `denialOverride` on the call that wrote it: a moment before that arrival's `createdDate`, which is stamped when the arrival is written. Set by the server; absent on every arrival no site user overrode. A later contact merge moves `updatedDate` but never this.\n * @readonly\n */\n overriddenDate?: Date | null;\n}\n\n/** @oneof */\nexport interface ArrivalGrantedByOneOf {\n /**\n * The Pricing Plans benefit the entry was taken from: a credit pack or an unlimited plan (`type`). Redeemed in Pricing Plans after the arrival is written — after an override too.\n * @readonly\n */\n planBenefit?: PlanBenefit;\n /**\n * The scheduled event the person was booked into. Nothing is redeemed for one; its attendance is marked in its own product after the arrival is written.\n * @readonly\n */\n scheduledEvent?: ScheduledEvent;\n}\n\n/**\n * The person who arrived: their contact ID, and their name and picture as the Contacts API held them when the\n * arrival was written. The name and picture are a snapshot — for history and live lists without a Contacts\n * read; a later change in Contacts does not update them. A contact merge moves `contactId` to the surviving\n * contact and leaves the snapshot as it was. When the contact's personal data is deleted for privacy, the names that\n * were set become `****` and the picture is removed. Named as Bookings names the same thing on a booking. The name and\n * picture are absent when the contact has none, or when Contacts did not answer (`CONTACTS_UNAVAILABLE` in\n * `eligibilityDetails.issues`).\n */\nexport interface ContactDetails {\n /**\n * ID of the contact who arrived. The only field of `contactDetails` sent when creating an arrival.\n * @format GUID\n */\n contactId?: string;\n /**\n * The contact's first name at the time of the arrival. Set by the server; personal data. `****` after the contact's personal data is deleted for privacy.\n * @maxLength 1000\n * @readonly\n */\n firstName?: string | null;\n /**\n * The contact's last name at the time of the arrival. Set by the server; personal data. `****` after the contact's personal data is deleted for privacy.\n * @maxLength 1000\n * @readonly\n */\n lastName?: string | null;\n /**\n * The contact's profile picture at the time of the arrival, as Contacts held it. Set by the server; personal data. Absent when the contact has none, and absent after the contact's personal data is deleted for privacy.\n * @readonly\n */\n picture?: string;\n}\n\n/** How an arrival came to be, and who created it. Set by the server. */\nexport interface ArrivalSource {\n /** How the person was identified: `BY_TOKEN` when the interaction began with a presented token, `BY_NFC_CARD` when it began with a presented NFC card (both through Create Arrival By Credential), `BY_CONTACT` when the arrival was written by contact ID with nothing presented. Who wrote the arrival — a Wix user, or an app such as a reader at an entrance — is `createdBy`. */\n identifiedBy?: IdentificationMethodWithLiterals;\n /**\n * Who created the arrival, from the call identity: a Wix user (`wixUserId`) — a site collaborator in a scanner app, or an owner on\n * the contact card — or an app (`appId`) — a reader at an entrance, or a partner app. This, not `identifiedBy`, is what tells a Wix user\n * from an app, such as a reader or a partner app. Only `wixUserId` or `appId` is ever set; `anonymousVisitorId` and `memberId` never appear on an arrival,\n * since members and visitors cannot create arrivals. Who let the person in against a denial is `overriddenBy`, not this field.\n */\n createdBy?: CommonIdentificationData;\n}\n\n/** How the person was identified when the arrival was written. */\nexport enum IdentificationMethod {\n /** A token was presented at the entrance — a QR code scanned by a site collaborator in a scanner app, or by a reader; `createdBy` says which. The interaction began with Create Arrival By Credential with `token`. */\n BY_TOKEN = 'BY_TOKEN',\n /** Written by contact ID with nothing presented — from the contact card in the dashboard, or by an app — even when the contact holds a credential. */\n BY_CONTACT = 'BY_CONTACT',\n /** An NFC card, fob or wristband was presented at the entrance, read by a reader paired to it. The interaction began with Create Arrival By Credential with an `identifier` of type `NFC_CARD`. */\n BY_NFC_CARD = 'BY_NFC_CARD',\n}\n\n/** @enumType */\nexport type IdentificationMethodWithLiterals =\n | IdentificationMethod\n | 'BY_TOKEN'\n | 'BY_CONTACT'\n | 'BY_NFC_CARD';\n\n/** Decomposed copy of `wix.common.IdentificationData` (protodep): the identity behind a call, as one of four IDs. */\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor who hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor who has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /**\n * @internal\n * @readonly\n */\n identityType?: IdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor who hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor who has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum IdentityType {\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 IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\n/** The area an arrival was recorded in and the entrance it was recorded at, as they were at that moment. */\nexport interface AreaInfo {\n /**\n * ID of the area. Set by the server: the area the entrance belongs to.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the business location the area belonged to at the time of the arrival, from the Locations API.\n * Kept on the record so history survives an area moving to another location.\n * @format GUID\n * @readonly\n */\n locationId?: string;\n /**\n * Name of the area at the time of the arrival, kept on the record so history still reads right after the area is renamed.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n name?: string;\n /**\n * ID of the entrance the person came in through, one of an area's `entrances[].id`. The one field of `area` sent when creating an arrival.\n * @format GUID\n */\n entranceId?: string;\n /**\n * Name of the entrance at the time of the arrival, kept on the record so history still reads right after the entrance is renamed or removed.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n entranceName?: string;\n}\n\n/**\n * What the eligibility engine found for a person in an area, from which the status is derived: the issues of the\n * entry as a whole, the intake forms the person is missing, and every plan benefit and scheduled event it found, each\n * with its own issue. Each issue is in one place: an issue of the entry is in `issues`, an issue of a benefit or an\n * event is on that item. Check Eligibility returns it in its response, and Create Arrival records it on the\n * arrival, so the arrival keeps exactly what the check found. On the arrival it is kept behind the\n * `arrivals:v1:arrival:read_eligibility_details` permission, since it says why a person was not eligible.\n */\nexport interface EligibilityDetails {\n /**\n * The issues of the entry as a whole. The issues decide the status the evaluation gives: `GRANTED` when there are none, or only\n * `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. When a site user lets the person in —\n * afterwards with Override Arrival as Granted, or beforehand with `denialOverride` on Create Arrival — the status is\n * `GRANTED` whatever the issues, and the issues show what was overridden. On an arrival, `PRICING_PLANS_UNAVAILABLE`\n * and `CONTACTS_UNAVAILABLE` are found only that way, with `denialOverride`, since otherwise Create Arrival fails with\n * `UNAVAILABLE`; Check Eligibility reports them without failing. A `DENIED` arrival always has at\n * least one. Empty when nothing stood in the way.\n * @maxSize 3\n */\n issues?: EntryIssueWithLiterals[];\n /**\n * Every intake form the area's policy requires and the person has no valid submission for, with its `blocksEntry`, so an app can point site collaborators to the right form. Empty unless `issues` contains `INTAKE_FORM_MISSING`.\n * @maxSize 20\n */\n missingIntakeForms?: MissingIntakeForm[];\n /**\n * The person's Pricing Plans benefits allowed into this area, each a `planBenefit` with its own `issues`: empty\n * means the benefit admits. Listed on a `DENIED` arrival too, admitting ones included, so an override can take one\n * later. The grant picks one by the rule on the arrival's `planBenefit` and records it there. Listed in the order of\n * that rule, so the first is the one a grant takes; at most 20 are listed, the first 20 in that order. Empty when the\n * person holds no benefit for this area, and when the status of the contact's site member (`memberInfo.status` in\n * Contacts) is `BLOCKED`, `DELETED` or `OFFLINE`, since such a member holds no plans here.\n * @maxSize 20\n */\n planBenefits?: PlanBenefitEligibility[];\n /**\n * The scheduled events the person is booked on at this area's location inside the area's entry window, each with\n * its own `issues`: empty means the event admits. Listed on a `DENIED` arrival too, admitting ones included, so an\n * override can take one later. Check Eligibility with a `scheduledEventSearchWindow` also lists\n * the events that start inside that window, with `OUTSIDE_ENTRY_WINDOW`; Create Arrival never does. At most 20 are\n * listed: the events inside the area's window first, then the others by start time, earliest first. Always empty\n * while the area's `scheduledEventsPolicy.entryGrantingAppIds` is empty.\n * @maxSize 20\n */\n scheduledEvents?: ScheduledEventEligibility[];\n}\n\n/**\n * An issue of the entry as a whole. The issues decide the status the evaluation gives: `GRANTED` when there are none, or only\n * `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. When a site user lets the person in —\n * afterwards with Override Arrival as Granted, or beforehand with `denialOverride` on Create Arrival — the status is\n * `GRANTED` whatever the issues, and the issues show what was overridden. On an arrival, `PRICING_PLANS_UNAVAILABLE`\n * and `CONTACTS_UNAVAILABLE` are found only that way, with `denialOverride`, since otherwise Create Arrival fails with\n * `UNAVAILABLE`; Check Eligibility reports them without failing. Why a single benefit or event does not admit is on\n * that item (`PlanBenefitIssue`, `ScheduledEventIssue`), not here.\n */\nexport enum EntryIssue {\n /**\n * No grant the person holds admits them into this area now. A grant is what can grant entry — a plan benefit\n * (`planBenefits`) or a scheduled event they are booked on (`scheduledEvents`) — the same two kinds an arrival\n * records in `planBenefit` or `scheduledEvent` once granted. Either nothing was found — `planBenefits` and\n * `scheduledEvents` are empty — or everything found has an issue of its own, which says why. A contact whose site\n * member's status (`memberInfo.status` in Contacts) is `BLOCKED`, `DELETED` or `OFFLINE` holds no plans here, so it\n * finds none. Also reported when a\n * credit pack would admit but the person is booked on an event here and now that still waits for approval: no\n * credit is spent while the booking may be approved moments later (the event carries `PENDING_CONFIRMATION`).\n * Declines at creation; site collaborators override, or sell a plan, approve the booking or renew the plan and create a new\n * arrival. Not reported when Pricing Plans or Contacts did not answer: `PRICING_PLANS_UNAVAILABLE` or\n * `CONTACTS_UNAVAILABLE` takes its place.\n */\n NO_ELIGIBLE_GRANT = 'NO_ELIGIBLE_GRANT',\n /** The person has no valid submission for at least one intake form the area's policy requires: never submitted, expired, canceled or pending approval. The forms are listed in `missingIntakeForms`. Declines at creation when a missing form has `blocksEntry`; otherwise grants, with the issue kept on the arrival so site collaborators can chase the paperwork. */\n INTAKE_FORM_MISSING = 'INTAKE_FORM_MISSING',\n /** The person was already granted entry into this area within the last 15 minutes and a credit would be spent again: a retried scan, a re-entry, or a guest on the same credential. The earlier entry counts whatever granted it: a credit, an unlimited plan, a scheduled event or an override, and the 15 minutes count from that arrival's `createdDate`, or for an overridden arrival from its `overriddenDate`, when a site user let the person in. Declines at creation; the override spends a credit. Reported only when this entry would spend a credit: not when an unlimited plan or a scheduled event admits now. */\n RECENT_ENTRY = 'RECENT_ENTRY',\n /** Pricing Plans did not answer — it could not be reached, did not answer in time, or failed on its side; any of these is an outage — so plan benefits were not checked. On an arrival, only on one let in by Create Arrival with `denialOverride`, since without a site user's decision the call fails with `UNAVAILABLE` instead and no denied arrival is written; Check Eligibility reports it without failing; Override Arrival as Granted does not call Pricing Plans. `planBenefits` is empty, no `planBenefit` is recorded and nothing is redeemed; scheduled events and intake forms are still evaluated. Reported instead of `NO_ELIGIBLE_GRANT`, never with it: plan benefits were not checked, so the person may hold one that admits. An issue a scheduled event has of its own stays on that event in `eligibilityDetails`. */\n PRICING_PLANS_UNAVAILABLE = 'PRICING_PLANS_UNAVAILABLE',\n /** Contacts did not answer — it could not be reached, did not answer in time, or failed on its side; any of these is an outage — so the person's member is unknown and plan benefits were not checked. On an arrival, only on one let in by Create Arrival with `denialOverride`, since without a site user's decision the call fails with `UNAVAILABLE` instead and no denied arrival is written; Check Eligibility reports it without failing. `planBenefits` is empty, no `planBenefit` is recorded, nothing is redeemed, and `contactDetails` has the contact ID alone, with no name or picture; scheduled events, read by contact, are still evaluated. Reported instead of `NO_ELIGIBLE_GRANT` and `PRICING_PLANS_UNAVAILABLE`, never with them: Pricing Plans is not read without the member. */\n CONTACTS_UNAVAILABLE = 'CONTACTS_UNAVAILABLE',\n}\n\n/** @enumType */\nexport type EntryIssueWithLiterals =\n | EntryIssue\n | 'NO_ELIGIBLE_GRANT'\n | 'INTAKE_FORM_MISSING'\n | 'RECENT_ENTRY'\n | 'PRICING_PLANS_UNAVAILABLE'\n | 'CONTACTS_UNAVAILABLE';\n\n/** An intake form the area's policy requires that the person has no valid submission for. */\nexport interface MissingIntakeForm {\n /**\n * ID of the intake form, from the Intake Forms API, as listed in the area's policy.\n * @format GUID\n */\n formId?: string;\n /** Whether this missing form blocks entry, as configured on the area's policy (`policy.intakeForms[].blocksEntry` in the Areas API). `false`: the arrival is granted and site collaborators are warned. `true`: the arrival is denied until the form is submitted; site collaborators can still override. */\n blocksEntry?: boolean;\n}\n\n/**\n * A Pricing Plans benefit the engine found for the person in this area, with whether it admits: the benefit itself,\n * of the same type as the arrival's `planBenefit`, and its `issues`.\n */\nexport interface PlanBenefitEligibility {\n /**\n * The benefit found, as `planBenefit` records it on an arrival.\n * @readonly\n */\n planBenefit?: PlanBenefit;\n /**\n * Why the benefit does not admit, in Pricing Plans' own words where it has one. Empty: the benefit admits. At most one is reported, since Pricing Plans gives one reason.\n * @maxSize 1\n * @readonly\n */\n issues?: PlanBenefitIssueWithLiterals[];\n}\n\n/**\n * A Pricing Plans benefit: the plan or credit pack an entry is taken from, identified as Pricing Plans identifies\n * it — by the pool the member holds (`poolId`) and the benefit's key inside that pool (`benefitKey`). Arrivals\n * never interprets either: it passes the pair back to Pricing Plans to redeem. No balance is reported here:\n * credits left are read from Pricing Plans, by the member in their app and by the owner in the Pricing Plans\n * dashboard.\n */\nexport interface PlanBenefit {\n /**\n * ID of the Pricing Plans benefit pool the member holds: the plan or pack they bought. Read-only to Arrivals.\n * @format GUID\n * @readonly\n */\n poolId?: string;\n /**\n * Key of the benefit inside the pool, as Pricing Plans defines it; a pool can hold several benefits. Read-only to Arrivals.\n * @minLength 1\n * @maxLength 64\n * @readonly\n */\n benefitKey?: string;\n /**\n * Name to display, in the site's language (\"10-Class Pack\", \"Monthly Unlimited\"). The owner's own wording; not translated.\n * @maxLength 200\n * @readonly\n */\n displayName?: string;\n /**\n * Whether the benefit counts entries: a credit pack spends a credit per entry, an unlimited plan counts nothing. Set by the server from the benefit's configuration in Pricing Plans.\n * @readonly\n */\n type?: PlanBenefitTypeWithLiterals;\n}\n\n/** Kind of Pricing Plans benefit, by whether entries are counted — the one axis Pricing Plans itself splits on. */\nexport enum PlanBenefitType {\n /** A credit pack: the benefit carries a credit configuration in Pricing Plans, and redeeming an entry spends one credit from its balance (\"10-Class Pack\"). */\n CREDIT = 'CREDIT',\n /** An unlimited plan: no credit configuration, nothing is counted (\"Monthly Unlimited\"). The plan's own usage policy — a fixed interval, a rate limit such as three entries a week — may still apply, and Pricing Plans enforces it. Whether the plan is paid once or by subscription is not what this says. */\n UNLIMITED = 'UNLIMITED',\n}\n\n/** @enumType */\nexport type PlanBenefitTypeWithLiterals =\n | PlanBenefitType\n | 'CREDIT'\n | 'UNLIMITED';\n\n/** Why a Pricing Plans benefit does not admit. Where Pricing Plans has a word for a finding, the value uses it. */\nexport enum PlanBenefitIssue {\n /** The benefit's plan is not active at the time of the entry — ended, cancelled, paused, not started yet, or for a moment while it is being renewed — as Pricing Plans reports. Site collaborators override, or renew the plan and create a new arrival. */\n PLAN_NOT_ACTIVE = 'PLAN_NOT_ACTIVE',\n /** A credit pack with no credits left, as Pricing Plans reports. Site collaborators override, or sell credits and create a new arrival. */\n NOT_ENOUGH_BALANCE = 'NOT_ENOUGH_BALANCE',\n /** The plan's usage policy does not allow entry at this hour or on this day, or another rule of the plan refuses entry, as Pricing Plans reports. A used-up limit on its own is `USAGE_LIMIT_REACHED`. */\n OUTSIDE_ACCESS_HOURS = 'OUTSIDE_ACCESS_HOURS',\n /** The plan's usage policy limits how often it can be used, such as three entries a week, and that limit is used up for the current period, as Pricing Plans reports. Site collaborators override, or the client comes back in the next period. */\n USAGE_LIMIT_REACHED = 'USAGE_LIMIT_REACHED',\n}\n\n/** @enumType */\nexport type PlanBenefitIssueWithLiterals =\n | PlanBenefitIssue\n | 'PLAN_NOT_ACTIVE'\n | 'NOT_ENOUGH_BALANCE'\n | 'OUTSIDE_ACCESS_HOURS'\n | 'USAGE_LIMIT_REACHED';\n\n/**\n * A scheduled event the engine found for the person at this area, with whether it admits: the event itself, of\n * the same type as the arrival's `scheduledEvent`, and its `issues`.\n */\nexport interface ScheduledEventEligibility {\n /**\n * The event found, as `scheduledEvent` records it on an arrival.\n * @readonly\n */\n scheduledEvent?: ScheduledEvent;\n /**\n * Why the event does not admit. Empty: the event admits. At most one is reported: when both apply, `OUTSIDE_ENTRY_WINDOW` wins over `PENDING_CONFIRMATION`, since approving the booking would not help outside the window.\n * @maxSize 1\n * @readonly\n */\n issues?: ScheduledEventIssueWithLiterals[];\n}\n\n/** A scheduled event an entry is taken on: the session the person was booked into. Nothing is redeemed for one. */\nexport interface ScheduledEvent {\n /**\n * ID of the scheduled event, as the provider in `appId` knows it. For an event from the Wix Calendar, the ID in the Wix Calendar Events API.\n * @minLength 1\n * @maxLength 250\n * @readonly\n */\n eventId?: string;\n /**\n * Name to display, in the site's language (\"Tue 18:00 Reformer\"). Not translated.\n * @maxLength 200\n * @readonly\n */\n displayName?: string;\n /**\n * App ID of the provider the event came from: the app that owns it on the Wix Calendar, such as Wix Bookings.\n * Scheduled events are read from the Wix Calendar today; a provider of scheduled events of its own may later\n * supply them, and is then identified here.\n * @format GUID\n * @readonly\n */\n appId?: string;\n}\n\n/** Why a scheduled event does not admit. At most one per event; `OUTSIDE_ENTRY_WINDOW` wins over `PENDING_CONFIRMATION`. */\nexport enum ScheduledEventIssue {\n /** The person is booked on the event here and now, but the booking still waits for the business's approval. Only an appointment can be pending. A credit pack is not spent instead (`NO_ELIGIBLE_GRANT`), since the booking may be approved moments later; an unlimited plan allowed into the area still admits. Site collaborators approve the booking and create a new arrival, or override. */\n PENDING_CONFIRMATION = 'PENDING_CONFIRMATION',\n /** The person is booked on the event, but now is outside the area's entry window for it (`policy.scheduledEventsPolicy.entryWindow` in the Areas API). Only on an event listed by a Check Eligibility with `scheduledEventSearchWindow`; never on an arrival, since Create Arrival does not find events outside the area's window. */\n OUTSIDE_ENTRY_WINDOW = 'OUTSIDE_ENTRY_WINDOW',\n}\n\n/** @enumType */\nexport type ScheduledEventIssueWithLiterals =\n | ScheduledEventIssue\n | 'PENDING_CONFIRMATION'\n | 'OUTSIDE_ENTRY_WINDOW';\n\n/** Whether access was given. */\nexport enum Status {\n /** Access was given: the person entered. Either the engine found no issue that blocks entry, or a site user overrode a denial — afterwards with Override Arrival as Granted, or on Create Arrival with `denialOverride`; `eligibilityDetails.issues` then holds what was overridden. */\n GRANTED = 'GRANTED',\n /** Access was not given: the engine found an issue that declines (see `EntryIssue`), and no site user has overridden it. A site user may still override with Override Arrival as Granted, which moves the status to `GRANTED`. */\n DENIED = 'DENIED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'GRANTED' | 'DENIED';\n\nexport interface CreateArrivalRequest {\n /**\n * Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field —\n * the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, what granted the entry — is set by the server.\n */\n arrival: Arrival;\n /**\n * A site user's decision to let the person in even if the evaluation denies them, made before the call. Its presence is the decision: send it, even empty (`{}`), to let the person in on a denial; omit it for no override. When the\n * evaluation grants, it is ignored; when it denies, the arrival is written `GRANTED` with `overrideReason` set to\n * `reason`. Only a site user may send it (`OVERRIDE_NOT_ALLOWED` otherwise). On a\n * repeat within 5 seconds onto an existing `DENIED` arrival, it grants that arrival as Override Arrival as Granted\n * does; on an existing `GRANTED` one it is ignored.\n */\n denialOverride?: DenialOverride;\n}\n\n/** A site user's decision, made before the call, to let the person in even if the evaluation denies them. Its presence is the decision: send it, even empty (`{}`), to let the person in on a denial; omit it for no override. */\nexport interface DenialOverride {\n /**\n * Why a site user let the person in, in their own words. Optional; stored as the arrival's `overrideReason` when the evaluation denies. Free text that may describe the person, so it is personal data.\n * @maxLength 500\n */\n reason?: string | null;\n}\n\nexport interface CreateArrivalResponse {\n /** The arrival as written, with the status its issues imply — `GRANTED` despite them when `denialOverride` let the person in. On a repeat within 5 seconds, the existing arrival: unchanged, or now `GRANTED` when the repeat carried `denialOverride` onto a `DENIED` one. */\n arrival?: Arrival;\n}\n\nexport interface OverrideArrivalAsGrantedRequest {\n /**\n * ID of the denied arrival to let the person in on.\n * @format GUID\n */\n arrivalId: string;\n /**\n * Why a site user let the person in, in their own words. Optional; stored as the arrival's `overrideReason`. Free text that may describe the person, so it is personal data.\n * @maxLength 500\n */\n overrideReason?: string | null;\n}\n\nexport interface OverrideArrivalAsGrantedResponse {\n /** The arrival, now `GRANTED` — unchanged when it already was. */\n arrival?: Arrival;\n}\n\nexport interface CheckEligibilityRequest {\n /**\n * ID of the contact whose eligibility to check.\n * @format GUID\n */\n contactId: string;\n /**\n * ID of the entrance to check eligibility at, one of an area's entrances. Eligibility is checked for the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n /**\n * A range of time to look for the person's scheduled events in, besides the area's\n * `policy.scheduledEventsPolicy.entryWindow`, for a what-if such as \"which of this client's classes this evening could\n * they get in on?\". Both dates are required when it is set. It changes only which scheduled events are listed:\n * those inside the area's window now, and those that start within this range. An event found only in this range\n * does not admit — entry into the area follows the area's window — and is listed with `OUTSIDE_ENTRY_WINDOW`.\n * Everything else is evaluated with the area's window, so `status` and `eligibilityDetails.issues`\n * still say what Create Arrival would find. Not set: only the\n * area's window is used. Always validated (`SEARCH_WINDOW_INVALID`), but finds no events while the area's\n * `scheduledEventsPolicy.entryGrantingAppIds` is empty.\n */\n scheduledEventSearchWindow?: ScheduledEventSearchWindow;\n}\n\n/**\n * A range of time in which Check Eligibility looks for scheduled events: an event is found when it starts at or\n * after `startDate` and before `endDate`. It decides only which events are found, not when entry opens — entry\n * follows the area's `policy.scheduledEventsPolicy.entryWindow`. At most a year is searched: an event that starts\n * 365 days or more after `startDate` is not found, even when it starts before `endDate`. `endDate` must be after\n * `startDate`, otherwise the call fails with `SEARCH_WINDOW_INVALID`. At most 20 scheduled events are returned (see\n * `eligibilityDetails.scheduledEvents` in the response).\n */\nexport interface ScheduledEventSearchWindow {\n /** Start of the range: events that start at or after it are found. */\n startDate?: Date | null;\n /** End of the range: events that start before it are found, if they start less than 365 days after `startDate`. Must be after `startDate`. */\n endDate?: Date | null;\n}\n\n/**\n * What the engine would find for the contact in this area, and the status Create Arrival would\n * derive from it. Nothing was recorded. It is the finding, not the outcome; what happened is on the arrival, once one\n * is written. No balance is reported: credits left are read from Pricing Plans. Check Eligibility By Credential\n * returns the same fields.\n */\nexport interface CheckEligibilityResponse {\n /** The contact given: their contact ID, name and picture as Contacts holds them now. When Contacts did not answer (`CONTACTS_UNAVAILABLE` in `eligibilityDetails.issues`), only `contactId` is set. When creating an arrival, send `arrival.contactDetails.contactId`; the server fills in the rest. */\n contactDetails?: ContactDetails;\n /** The status Create Arrival would write now, derived from `eligibilityDetails.issues`: `GRANTED` when there are none, or only `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. Also `DENIED` when Pricing Plans or Contacts did not answer and nothing else admits the contact (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE` in `eligibilityDetails.issues`): the engine could not decide, so show that the check could not be completed, with an option to try again; a site user who decides to let the person in anyway calls Create Arrival with `denialOverride`. */\n status?: StatusWithLiterals;\n /**\n * What the engine found — the same message Create Arrival records on the arrival: the entry's `issues`, the\n * `missingIntakeForms`, and every plan benefit and scheduled event found, each with its own `issues`. Each issue is\n * in one place. Rendered by your app in its own language. With `scheduledEventSearchWindow`, `scheduledEvents`\n * also lists the events found only in that window, with `OUTSIDE_ENTRY_WINDOW`; Create Arrival never records those.\n */\n eligibilityDetails?: EligibilityDetails;\n /**\n * Present when `eligibilityDetails.issues` contains `RECENT_ENTRY`: the earlier arrival that granted this person this\n * area within the last 15 minutes, for an app to tell site collaborators \"let in 4 minutes ago\".\n */\n recentArrival?: RecentArrival;\n}\n\n/** An earlier granted arrival of the same person into the same area, created or overridden within the last 15 minutes. */\nexport interface RecentArrival {\n /**\n * ID of that arrival.\n * @format GUID\n */\n arrivalId?: string;\n /** That arrival's `createdDate`, for an app to tell site collaborators \"let in 4 minutes ago\". For an arrival overridden after it was written, it is the time of the denial; for every overridden arrival the 15 minutes count from its `overriddenDate`: call Get Arrival to show when the person was let in. What granted it is on that arrival: call Get Arrival with `arrivalId` and read its `planBenefit` or `scheduledEvent`. */\n _createdDate?: Date | null;\n}\n\nexport interface GetArrivalRequest {\n /**\n * ID of the arrival to retrieve.\n * @format GUID\n */\n arrivalId: string;\n}\n\nexport interface GetArrivalResponse {\n /** Requested arrival. */\n arrival?: Arrival;\n}\n\nexport interface QueryArrivalsRequest {\n /** WQL expression. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryArrivalsResponse {\n /** List of arrivals. */\n arrivals?: Arrival[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountArrivalsRequest {\n /** Filter, in the same form as the `filter` of a Query Arrivals request. Empty counts all arrivals. */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountArrivalsResponse {\n /** Number of arrivals matching the filter. */\n count?: number;\n}\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 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 CheckEligibilityByCredentialRequest\n extends CheckEligibilityByCredentialRequestCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n /**\n * ID of the entrance the credential is presented at, one of an area's entrances. Eligibility is checked for the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n}\n\n/** @oneof */\nexport interface CheckEligibilityByCredentialRequestCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n}\n\n/**\n * An identifier presented at an entrance, as a reader reports it: the same `type` and `value` as a credential\n * identifier in the Contact Credentials API (`contactCredential.identifiers`).\n */\nexport interface PresentedIdentifier {\n /** Kind of identifier. Further kinds, such as a fingerprint, may be added later. */\n type?: TypeWithLiterals;\n /**\n * The value the reader reports: for `NFC_CARD`, the chip's serial number. Case-sensitive; compared as sent.\n * @maxLength 64\n */\n value?: string;\n}\n\n/** Kind of identifier. */\nexport enum Type {\n /** An NFC card, fob or wristband. `value` is the serial number of its chip, exactly as the reader reports it. */\n NFC_CARD = 'NFC_CARD',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'NFC_CARD';\n\n/**\n * What the engine would find for the credential's holder in this area, and the status Create\n * Arrival would derive from it. Nothing was recorded. The same fields Check Eligibility returns, always against the\n * area's own entry window.\n */\nexport interface CheckEligibilityByCredentialResponse {\n /** The holder of the presented credential: their contact ID, name and picture as Contacts holds them now. When Contacts did not answer (`CONTACTS_UNAVAILABLE` in `eligibilityDetails.issues`), only `contactId` is set. */\n contactDetails?: ContactDetails;\n /** The status Create Arrival would write now, derived from `eligibilityDetails.issues`: `GRANTED` when there are none, or only `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. Also `DENIED` when Pricing Plans or Contacts did not answer and nothing else admits the contact (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE` in `eligibilityDetails.issues`): the engine could not decide, so show that the check could not be completed, with an option to try again; a site user who decides to let the person in anyway calls Create Arrival by contact ID with `denialOverride`, since Create Arrival By Credential carries no override. */\n status?: StatusWithLiterals;\n /**\n * What the engine found — the same message Create Arrival records on the arrival: the entry's `issues`, the\n * `missingIntakeForms`, and every plan benefit and scheduled event found, each with its own `issues`. Each issue is\n * in one place. Rendered by your app in its own language. `scheduledEvents` lists only the events inside the\n * area's entry window, so `OUTSIDE_ENTRY_WINDOW` never appears here.\n */\n eligibilityDetails?: EligibilityDetails;\n /**\n * Present when `eligibilityDetails.issues` contains `RECENT_ENTRY`: the earlier arrival that granted this person this\n * area within the last 15 minutes, for an app to tell site collaborators \"let in 4 minutes ago\".\n */\n recentArrival?: RecentArrival;\n}\n\nexport interface CreateArrivalByCredentialRequest\n extends CreateArrivalByCredentialRequestCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n /**\n * ID of the entrance the credential is presented at, one of an area's entrances. The arrival is recorded in the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n}\n\n/** @oneof */\nexport interface CreateArrivalByCredentialRequestCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n}\n\nexport interface CreateArrivalByCredentialResponse {\n /**\n * The created arrival, with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD`. `GRANTED`: the person is in. `DENIED`: show site collaborators why from its `eligibilityDetails`; letting\n * the person in anyway is Override Arrival as Granted with this arrival's ID.\n */\n arrival?: Arrival;\n}\n\n/** @docsIgnore */\nexport type CreateArrivalApplicationErrors =\n | {\n code?: 'AREA_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ENTRANCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'OVERRIDE_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRICING_PLANS_UNAVAILABLE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACTS_UNAVAILABLE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type OverrideArrivalAsGrantedApplicationErrors =\n | {\n code?: 'ARRIVAL_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'OVERRIDE_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CheckEligibilityApplicationErrors =\n | {\n code?: 'ENTRANCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SEARCH_WINDOW_INVALID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'AREA_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type QueryArrivalsApplicationErrors = {\n code?: 'CREATED_DATE_LOWER_BOUND_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CountArrivalsApplicationErrors =\n | {\n code?: 'CREATED_DATE_LOWER_BOUND_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TOO_MANY_TO_COUNT';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CheckEligibilityByCredentialApplicationErrors =\n | {\n code?: 'BAD_SIGNATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TOKEN_REVOKED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'IDENTIFIER_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'AREA_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ENTRANCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateArrivalByCredentialApplicationErrors =\n | {\n code?: 'BAD_SIGNATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TOKEN_REVOKED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'IDENTIFIER_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'AREA_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ENTRANCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRICING_PLANS_UNAVAILABLE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACTS_UNAVAILABLE';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Evaluates a person for an area and writes one arrival, whatever it finds about them. For the flows that call\n * it — scans, the dashboard, readers — see About Arrivals.\n *\n * Only `arrival.contactDetails.contactId`, `arrival.area.entranceId` and `denialOverride` are read; the\n * area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture,\n * `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, and what granted the entry. `status` follows from the entry's issues:\n * - none, or only `INTAKE_FORM_MISSING` for forms that do not block entry: **`GRANTED`**, with `planBenefit` or\n * `scheduledEvent` naming what admitted the person; the server picks it by the rule on `planBenefit`: an admitting item, free before finite.\n * - `NO_ELIGIBLE_GRANT`, `RECENT_ENTRY`, or `INTAKE_FORM_MISSING` for a form that blocks entry: **`DENIED`**.\n * Nothing is redeemed; a site user may let the person in with Override Arrival as Granted.\n *\n * *Override at creation.** With `denialOverride`, a denial is written `GRANTED` at once, with its issues and\n * `overrideReason`; Arrival Created fires with that `GRANTED` arrival. Only a site user may send it,\n * a Wix user acting through an app (a call that carries the user's identity beside the app's) included; any other\n * caller fails with `OVERRIDE_NOT_ALLOWED` and nothing is recorded.\n *\n * *Redemption.** A granted benefit is redeemed asynchronously after the response, with the arrival ID as the\n * idempotency key: usually within seconds, and retried for several minutes while Pricing Plans is unavailable. If\n * Pricing Plans refuses the redemption, for example a credit pack with no credits left after an override, the\n * arrival stays `GRANTED` and nothing is recorded on it; the balance is read from Pricing Plans.\n *\n * *Repeats within 5 seconds.** A call for the same contact and entrance by the same caller within 5 seconds of an\n * arrival returns that arrival unchanged. The caller is the Wix user when the call carries one, through an app\n * included, so two site collaborators on one scanner app are two callers; otherwise it is the app. A repeat that\n * carries `denialOverride` onto a `DENIED` arrival is the exception: the override is applied to that arrival exactly\n * as Override Arrival as Granted applies it, from its stored evaluation, and Arrival Updated fires instead of\n * Arrival Created. On a `GRANTED` arrival `denialOverride` is ignored. See About Arrivals for\n * retries.\n *\n * *Errors and outages.** `CONTACT_NOT_FOUND` and `ENTRANCE_NOT_FOUND` record nothing. When Pricing Plans or\n * Contacts cannot be reached and nothing else admits the person, the call fails with `UNAVAILABLE`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`) and records nothing — unless it carries `denialOverride`:\n * a site user has decided, so the arrival is written `GRANTED` with that outage in its issues, no plan benefit, and\n * nothing redeemed. Without Contacts the arrival also has no name or picture.\n * @param arrival - Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field —\n * the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, what granted the entry — is set by the server.\n * @internal\n * @documentationMaturity preview\n * @requiredField arrival\n * @requiredField arrival.area\n * @requiredField arrival.area.entranceId\n * @requiredField arrival.contactDetails\n * @requiredField arrival.contactDetails.contactId\n * @permissionId arrivals:v1:arrival:create_arrival\n * @returns The arrival as written, with the status its issues imply — `GRANTED` despite them when `denialOverride` let the person in. On a repeat within 5 seconds, the existing arrival: unchanged, or now `GRANTED` when the repeat carried `denialOverride` onto a `DENIED` one.\n * @fqn wix.arrivals.v1.ArrivalsService.CreateArrival\n */\nexport async function createArrival(\n arrival: NonNullablePaths<\n Arrival,\n `area` | `area.entranceId` | `contactDetails` | `contactDetails.contactId`,\n 1\n >,\n options?: CreateArrivalOptions\n): Promise<\n NonNullablePaths<\n Arrival,\n | `planBenefit.poolId`\n | `planBenefit.benefitKey`\n | `planBenefit.displayName`\n | `planBenefit.type`\n | `scheduledEvent.eventId`\n | `scheduledEvent.displayName`\n | `scheduledEvent.appId`\n | `contactDetails.contactId`\n | `source.identifiedBy`\n | `source.createdBy.anonymousVisitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.wixUserId`\n | `source.createdBy.appId`\n | `area._id`\n | `area.locationId`\n | `area.name`\n | `area.entranceId`\n | `area.entranceName`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.scheduledEvents`\n | `status`,\n 3\n > & {\n __applicationErrorsType?: CreateArrivalApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n arrival: arrival,\n denialOverride: options?.denialOverride,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_0,\n },\n ]\n );\n\n const reqOpts = ambassadorWixArrivalsV1Arrival.createArrival(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )?.arrival!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arrival: '$[0]',\n denialOverride: '$[1].denialOverride',\n },\n singleArgumentUnchanged: false,\n },\n ['arrival', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateArrivalOptions {\n /**\n * A site user's decision to let the person in even if the evaluation denies them, made before the call. Its presence is the decision: send it, even empty (`{}`), to let the person in on a denial; omit it for no override. When the\n * evaluation grants, it is ignored; when it denies, the arrival is written `GRANTED` with `overrideReason` set to\n * `reason`. Only a site user may send it (`OVERRIDE_NOT_ALLOWED` otherwise). On a\n * repeat within 5 seconds onto an existing `DENIED` arrival, it grants that arrival as Override Arrival as Granted\n * does; on an existing `GRANTED` one it is ignored.\n */\n denialOverride?: DenialOverride;\n}\n\n/**\n * Grants a `DENIED` arrival as a site user's override, from the evaluation it was denied with, and redeems the plan\n * benefit that evaluation found, once, after the response. Not a record correction: calling it can spend a\n * Pricing Plans credit. It is a site user's decision and does not check `RECENT_ENTRY`: it spends the picked credit even when\n * the person was let in a moment ago, for example by a new arrival written at the desk after this denial. Before\n * offering \"Let in\", show the person's recent entry (Check Eligibility's `recentArrival`) and ask the site user to confirm. `overrideReason` holds the site user's own words when they give one. This is the one\n * change an arrival receives through this API.\n *\n * Only a site user may call it, a Wix user acting through an app (a call that carries the user's identity beside the\n * app's) included: a caller that is not a site user — a reader at an entrance, or an app with no Wix user on the\n * call — fails with `OVERRIDE_NOT_ALLOWED`, checked before the arrival is read, and nothing changes. Any `DENIED`\n * arrival may be overridden, whoever wrote it: a site user may let in a person a reader denied instead of writing a new\n * arrival at the desk — not as well, since each of the two would admit the person. The caller is recorded in\n * `overriddenBy`; who wrote the arrival stays in `source.createdBy`. The person is not evaluated again: `eligibilityDetails` stays as it\n * was written at the denial, so its `issues` hold what was overridden, and the benefit or scheduled event that\n * evaluation found, if any, is recorded in `planBenefit` or `scheduledEvent`, picked by the rule on `planBenefit`: one that\n * admitted on its own first (the person was denied only for a blocking intake form or `RECENT_ENTRY`), free before\n * finite — the same record `denialOverride`\n * on Create Arrival leaves. Idempotent: on a `DENIED` arrival the status turns `GRANTED`, `revision` moves, and\n * Arrival Updated fires; an arrival that is already `GRANTED` is returned as it is (its\n * `overrideReason` is not changed) and nothing is redeemed twice. An `arrivalId` that names no arrival fails with `ARRIVAL_NOT_FOUND`. To decide before the\n * evaluation, send `denialOverride` on Create Arrival instead; a repeat of that Create Arrival within 5 seconds\n * with `denialOverride` applies this same override to the denied arrival.\n * @param arrivalId - ID of the denied arrival to let the person in on.\n * @internal\n * @documentationMaturity preview\n * @requiredField arrivalId\n * @permissionId arrivals:v1:arrival:override_arrival_as_granted\n * @fqn wix.arrivals.v1.ArrivalsService.OverrideArrivalAsGranted\n */\nexport async function overrideArrivalAsGranted(\n arrivalId: string,\n options?: OverrideArrivalAsGrantedOptions\n): Promise<\n NonNullablePaths<\n OverrideArrivalAsGrantedResponse,\n | `arrival.planBenefit.poolId`\n | `arrival.planBenefit.benefitKey`\n | `arrival.planBenefit.displayName`\n | `arrival.planBenefit.type`\n | `arrival.scheduledEvent.eventId`\n | `arrival.scheduledEvent.displayName`\n | `arrival.scheduledEvent.appId`\n | `arrival.contactDetails.contactId`\n | `arrival.source.identifiedBy`\n | `arrival.source.createdBy.anonymousVisitorId`\n | `arrival.source.createdBy.memberId`\n | `arrival.source.createdBy.wixUserId`\n | `arrival.source.createdBy.appId`\n | `arrival.area._id`\n | `arrival.area.locationId`\n | `arrival.area.name`\n | `arrival.area.entranceId`\n | `arrival.area.entranceName`\n | `arrival.eligibilityDetails.issues`\n | `arrival.eligibilityDetails.missingIntakeForms`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `arrival.eligibilityDetails.planBenefits`\n | `arrival.eligibilityDetails.scheduledEvents`\n | `arrival.status`,\n 4\n > & {\n __applicationErrorsType?: OverrideArrivalAsGrantedApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arrivalId: arrivalId,\n overrideReason: options?.overrideReason,\n });\n\n const reqOpts =\n ambassadorWixArrivalsV1Arrival.overrideArrivalAsGranted(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arrivalId: '$[0]',\n overrideReason: '$[1].overrideReason',\n },\n singleArgumentUnchanged: false,\n },\n ['arrivalId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface OverrideArrivalAsGrantedOptions {\n /**\n * Why a site user let the person in, in their own words. Optional; stored as the arrival's `overrideReason`. Free text that may describe the person, so it is personal data.\n * @maxLength 500\n */\n overrideReason?: string | null;\n}\n\n/**\n * Checks whether a contact would be granted entry at an entrance, into the area it belongs to, without recording\n * or redeeming anything. It takes the same `entranceId` as Create Arrival.\n *\n * The response is `eligibilityDetails` as Create Arrival would record it, with the `status` Create Arrival would\n * derive from it, and the contact's `contactDetails` (name and picture) as Contacts holds them now. With\n * `scheduledEventSearchWindow`, events found only in that window are also listed, with `OUTSIDE_ENTRY_WINDOW`.\n * Scheduled events are read only while the area's `policy.scheduledEventsPolicy.entryGrantingAppIds` is not\n * empty. The person is checked for now, the time of the call. When they were let into this area within the last\n * 15 minutes and this entry would spend a credit, the status is `DENIED` with `RECENT_ENTRY`, and `recentArrival`\n * names that arrival. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, including a contact that was\n * merged into another, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; an entrance of an archived\n * area fails with `AREA_ARCHIVED`, and a `scheduledEventSearchWindow` whose `endDate` is not after its `startDate` with\n * `SEARCH_WINDOW_INVALID`, checked before anything is read. When Pricing Plans or\n * Contacts cannot be reached the call does not fail: the outage is reported in `eligibilityDetails.issues`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`). The status is then `DENIED`, unless something else admits\n * the person. Create Arrival, in the same case, fails with `UNAVAILABLE` unless it carries `denialOverride`. Without Contacts,\n * `contactDetails` has the contact ID alone.\n * Nothing is stored. This method reveals plan state, so it has its own permission rather than the read\n * permission of arrivals.\n * @param contactId - ID of the contact whose eligibility to check.\n * @internal\n * @documentationMaturity preview\n * @requiredField contactId\n * @requiredField options.entranceId\n * @requiredField options.scheduledEventSearchWindow.endDate\n * @requiredField options.scheduledEventSearchWindow.startDate\n * @permissionId arrivals:v1:arrival:check_eligibility\n * @returns What the engine would find for the contact in this area, and the status Create Arrival would\n * derive from it. Nothing was recorded. It is the finding, not the outcome; what happened is on the arrival, once one\n * is written. No balance is reported: credits left are read from Pricing Plans. Check Eligibility By Credential\n * returns the same fields.\n * @fqn wix.arrivals.v1.ArrivalsService.CheckEligibility\n */\nexport async function checkEligibility(\n contactId: string,\n options?: NonNullablePaths<\n CheckEligibilityOptions,\n | `entranceId`\n | `scheduledEventSearchWindow.endDate`\n | `scheduledEventSearchWindow.startDate`,\n 1\n >\n): Promise<\n NonNullablePaths<\n CheckEligibilityResponse,\n | `contactDetails.contactId`\n | `status`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.type`\n | `eligibilityDetails.scheduledEvents`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId`\n | `recentArrival.arrivalId`,\n 4\n > & {\n __applicationErrorsType?: CheckEligibilityApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n entranceId: options?.entranceId,\n scheduledEventSearchWindow: options?.scheduledEventSearchWindow,\n });\n\n const reqOpts = ambassadorWixArrivalsV1Arrival.checkEligibility(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n entranceId: '$[1].entranceId',\n scheduledEventSearchWindow: '$[1].scheduledEventSearchWindow',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CheckEligibilityOptions {\n /**\n * ID of the entrance to check eligibility at, one of an area's entrances. Eligibility is checked for the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n /**\n * A range of time to look for the person's scheduled events in, besides the area's\n * `policy.scheduledEventsPolicy.entryWindow`, for a what-if such as \"which of this client's classes this evening could\n * they get in on?\". Both dates are required when it is set. It changes only which scheduled events are listed:\n * those inside the area's window now, and those that start within this range. An event found only in this range\n * does not admit — entry into the area follows the area's window — and is listed with `OUTSIDE_ENTRY_WINDOW`.\n * Everything else is evaluated with the area's window, so `status` and `eligibilityDetails.issues`\n * still say what Create Arrival would find. Not set: only the\n * area's window is used. Always validated (`SEARCH_WINDOW_INVALID`), but finds no events while the area's\n * `scheduledEventsPolicy.entryGrantingAppIds` is empty.\n */\n scheduledEventSearchWindow?: ScheduledEventSearchWindow;\n}\n\n/**\n * Retrieves an arrival.\n * @param arrivalId - ID of the arrival to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField arrivalId\n * @permissionId arrivals:v1:arrival:get_arrival\n * @returns Requested arrival.\n * @fqn wix.arrivals.v1.ArrivalsService.GetArrival\n */\nexport async function getArrival(\n arrivalId: string\n): Promise<\n NonNullablePaths<\n Arrival,\n | `planBenefit.poolId`\n | `planBenefit.benefitKey`\n | `planBenefit.displayName`\n | `planBenefit.type`\n | `scheduledEvent.eventId`\n | `scheduledEvent.displayName`\n | `scheduledEvent.appId`\n | `contactDetails.contactId`\n | `source.identifiedBy`\n | `source.createdBy.anonymousVisitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.wixUserId`\n | `source.createdBy.appId`\n | `area._id`\n | `area.locationId`\n | `area.name`\n | `area.entranceId`\n | `area.entranceName`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.scheduledEvents`\n | `status`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arrivalId: arrivalId,\n });\n\n const reqOpts = ambassadorWixArrivalsV1Arrival.getArrival(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )?.arrival!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { arrivalId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['arrivalId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of arrivals, given the provided [paging, filtering, and sorting][1].\n *\n * Supported filter and sort fields: `id`, `contactDetails.contactId`,\n * `source.identifiedBy`, `area.id`, `area.locationId`, `area.entranceId`, `eligibilityDetails.issues`, `planBenefit.poolId`,\n * `planBenefit.benefitKey`, `planBenefit.type`, `status`, `createdDate`. Filter only, not sort: `overriddenBy.wixUserId`.\n * `eligibilityDetails.issues` is a list: filter it with `$hasSome` or `$hasAll`, for example\n * `{ \"eligibilityDetails.issues\": { \"$hasSome\": [\"INTAKE_FORM_MISSING\"] } }` for the arrivals where a\n * form was missing; filtering on it requires the `arrivals:v1:arrival:read_eligibility_details` permission, like reading it.\n * An arrival a site user overrode has `status` `GRANTED` and `overriddenBy`, and an `overrideReason` only when a site user gave\n * one. To find overrides, filter `overriddenBy.wixUserId` with a `createdDate` lower bound:\n * `{ \"overriddenBy.wixUserId\": { \"$exists\": true }, \"createdDate\": { \"$gte\": \"2026-11-09T00:00:00Z\" } }` finds\n * every override since that time, and a user ID in place of `$exists` finds those of one site user.\n *\n * `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` and `overriddenBy.wixUserId` have no index. A filter on any of them, or a sort on any but `overriddenBy.wixUserId` (filter only), must also have a lower\n * bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago, at the top level or in an `$and`; otherwise the\n * request fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`. A bound inside an `$or` counts only when every branch has one. A next page,\n * requested with its cursor, is not checked again.\n *\n * To learn how to query arrivals, see [API Query Language][2].\n *\n * [1]: https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging\n * [2]: https://dev.wix.com/docs/rest/articles/getting-started/api-query-language\n * @internal\n * @documentationMaturity preview\n * @permissionId arrivals:v1:arrival:query_arrivals\n * @fqn wix.arrivals.v1.ArrivalsService.QueryArrivals\n */\nexport function queryArrivals(): ArrivalsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Arrival,\n 'CURSOR',\n QueryArrivalsRequest,\n QueryArrivalsResponse\n >({\n func: async (payload: QueryArrivalsRequest) => {\n const reqOpts = ambassadorWixArrivalsV1Arrival.queryArrivals(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: QueryArrivalsRequest['query']) => {\n const args = [query, {}] as [QueryArrivalsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryArrivalsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_2,\n },\n ])\n );\n\n return {\n items: transformedData?.arrivals,\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 ArrivalsQueryResult extends QueryCursorResult {\n items: Arrival[];\n query: ArrivalsQueryBuilder;\n next: () => Promise<ArrivalsQueryResult>;\n prev: () => Promise<ArrivalsQueryResult>;\n}\n\nexport interface ArrivalsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'status'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'status'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: string\n ) => ArrivalsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'status'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'status'\n | 'overriddenBy.wixUserId',\n value: boolean\n ) => ArrivalsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'eligibilityDetails.issues'\n | 'status'\n >\n ) => ArrivalsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'eligibilityDetails.issues'\n | 'status'\n >\n ) => ArrivalsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => ArrivalsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ArrivalsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ArrivalsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.arrivals.v1.ArrivalsService.QueryArrivals\n * @requiredField query\n */\nexport async function typedQueryArrivals(query: ArrivalQuery): Promise<\n NonNullablePaths<\n QueryArrivalsResponse,\n | `arrivals`\n | `arrivals.${number}.planBenefit.poolId`\n | `arrivals.${number}.planBenefit.benefitKey`\n | `arrivals.${number}.planBenefit.displayName`\n | `arrivals.${number}.planBenefit.type`\n | `arrivals.${number}.scheduledEvent.eventId`\n | `arrivals.${number}.scheduledEvent.displayName`\n | `arrivals.${number}.scheduledEvent.appId`\n | `arrivals.${number}.contactDetails.contactId`\n | `arrivals.${number}.source.identifiedBy`\n | `arrivals.${number}.source.createdBy.anonymousVisitorId`\n | `arrivals.${number}.source.createdBy.memberId`\n | `arrivals.${number}.source.createdBy.wixUserId`\n | `arrivals.${number}.source.createdBy.appId`\n | `arrivals.${number}.area._id`\n | `arrivals.${number}.area.locationId`\n | `arrivals.${number}.area.name`\n | `arrivals.${number}.area.entranceId`\n | `arrivals.${number}.area.entranceName`\n | `arrivals.${number}.status`,\n 4\n > & {\n __applicationErrorsType?: QueryArrivalsApplicationErrors;\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 = ambassadorWixArrivalsV1Arrival.queryArrivals(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_2,\n },\n ])\n )!;\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 ArrivalQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['eligibilityDetails.issues'];\n operators: ['$hasAll', '$hasSome'];\n sort: 'BOTH';\n },\n {\n fields: [\n '_createdDate',\n '_id',\n 'area._id',\n 'area.entranceId',\n 'area.locationId',\n 'contactDetails.contactId',\n 'planBenefit.benefitKey',\n 'planBenefit.poolId',\n 'planBenefit.type',\n 'source.identifiedBy',\n 'status'\n ];\n operators: '*';\n sort: 'BOTH';\n },\n {\n fields: ['overriddenBy.wixUserId'];\n operators: '*';\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Arrival,\n ArrivalQuerySpec\n>;\nexport type ArrivalQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \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 Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n Arrival,\n ArrivalQuerySpec,\n ArrivalQuery\n >(),\n};\n\n/**\n * Counts arrivals matching a filter, for dashboard tiles such as \"granted today\" and \"denied today\".\n *\n * The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an\n * arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count\n * overrides, filter `{ \"overriddenBy.wixUserId\": { \"$exists\": true } }` with a `createdDate` lower bound.\n * A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate`\n * (`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`.\n * Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by\n * `createdDate`.\n * @internal\n * @documentationMaturity preview\n * @permissionId arrivals:v1:arrival:count_arrivals\n * @fqn wix.arrivals.v1.ArrivalsService.CountArrivals\n */\nexport async function countArrivals(options?: CountArrivalsOptions): Promise<\n NonNullablePaths<CountArrivalsResponse, `count`, 0> & {\n __applicationErrorsType?: CountArrivalsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixArrivalsV1Arrival.countArrivals(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountArrivalsOptions {\n /** Filter, in the same form as the `filter` of a Query Arrivals request. Empty counts all arrivals. */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Checks whether the holder of a presented credential would be granted entry at an entrance, into the area it\n * belongs to, without recording anything or redeeming anything.\n *\n * This is Check Eligibility in the Arrivals Service with the person identified by what they present instead\n * of by `contactId`: the token or identifier is resolved to its credential and holder, then the same\n * evaluation runs. A scanner app uses it to show a client their standing without admitting them: their benefits\n * for this area and their scheduled events, each with its own issue, the forms they are missing, and the\n * status a scan would get. It takes the same `entranceId` as Create Arrival By Credential, so a scanner checks\n * and records at the one position it holds. The response has the same fields Check Eligibility returns, always\n * against the area's own entry window, so that it predicts the Create Arrival that follows the scan. A token that does not\n * resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`; an identifier that belongs to no\n * credential fails with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; when\n * Pricing Plans or Contacts cannot be reached the call does not fail and reports the outage in\n * `eligibilityDetails.issues`, as Check Eligibility does. This method\n * reveals plan state, so it has its own permission rather\n * than the read permission of arrivals.\n * @internal\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.credential\n * @requiredField options.entranceId\n * @permissionId arrivals:v1:arrival:check_eligibility_by_credential\n * @returns What the engine would find for the credential's holder in this area, and the status Create\n * Arrival would derive from it. Nothing was recorded. The same fields Check Eligibility returns, always against the\n * area's own entry window.\n * @fqn wix.arrivals.v1.CredentialArrivalsService.CheckEligibilityByCredential\n */\nexport async function checkEligibilityByCredential(\n options: NonNullablePaths<\n CheckEligibilityByCredentialOptions,\n `entranceId`,\n 0\n >\n): Promise<\n NonNullablePaths<\n CheckEligibilityByCredentialResponse,\n | `contactDetails.contactId`\n | `status`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.type`\n | `eligibilityDetails.scheduledEvents`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId`\n | `recentArrival.arrivalId`,\n 4\n > & {\n __applicationErrorsType?: CheckEligibilityByCredentialApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n token: options?.token,\n identifier: options?.identifier,\n entranceId: options?.entranceId,\n });\n\n const reqOpts =\n ambassadorWixArrivalsV1Arrival.checkEligibilityByCredential(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n token: '$[0].token',\n identifier: '$[0].identifier',\n entranceId: '$[0].entranceId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CheckEligibilityByCredentialOptions\n extends CheckEligibilityByCredentialOptionsCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n /**\n * ID of the entrance the credential is presented at, one of an area's entrances. Eligibility is checked for the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n}\n\n/** @oneof */\nexport interface CheckEligibilityByCredentialOptionsCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n}\n\n/**\n * Writes an arrival for the holder of a presented credential: resolves the token or identifier to its credential\n * and holder and calls Create Arrival for them. The outcome is Create Arrival's contract. It carries no override:\n * letting the person in after a denial is Override Arrival as Granted with the denied arrival's ID.\n *\n * A token that does not resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`, an identifier\n * that belongs to none with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with\n * `ENTRANCE_NOT_FOUND`; nothing is recorded. The arrival is recorded at the entrance, in the area it belongs to,\n * with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD` and\n * `source.createdBy` naming the Wix user, or the app that called (a reader or a partner app). When Pricing Plans or Contacts cannot be reached and\n * nothing else admits the person, the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE` or\n * `CONTACTS_UNAVAILABLE`) and records nothing. A repeat within 5 seconds by the same caller, for the same holder and\n * entrance, returns the arrival already written, whether it came from a scan or from Create Arrival.\n * @internal\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.credential\n * @requiredField options.entranceId\n * @permissionId arrivals:v1:arrival:create_arrival_by_credential\n * @fqn wix.arrivals.v1.CredentialArrivalsService.CreateArrivalByCredential\n */\nexport async function createArrivalByCredential(\n options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>\n): Promise<\n NonNullablePaths<\n CreateArrivalByCredentialResponse,\n | `arrival.planBenefit.poolId`\n | `arrival.planBenefit.benefitKey`\n | `arrival.planBenefit.displayName`\n | `arrival.planBenefit.type`\n | `arrival.scheduledEvent.eventId`\n | `arrival.scheduledEvent.displayName`\n | `arrival.scheduledEvent.appId`\n | `arrival.contactDetails.contactId`\n | `arrival.source.identifiedBy`\n | `arrival.source.createdBy.anonymousVisitorId`\n | `arrival.source.createdBy.memberId`\n | `arrival.source.createdBy.wixUserId`\n | `arrival.source.createdBy.appId`\n | `arrival.area._id`\n | `arrival.area.locationId`\n | `arrival.area.name`\n | `arrival.area.entranceId`\n | `arrival.area.entranceName`\n | `arrival.eligibilityDetails.issues`\n | `arrival.eligibilityDetails.missingIntakeForms`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `arrival.eligibilityDetails.planBenefits`\n | `arrival.eligibilityDetails.scheduledEvents`\n | `arrival.status`,\n 4\n > & {\n __applicationErrorsType?: CreateArrivalByCredentialApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n token: options?.token,\n identifier: options?.identifier,\n entranceId: options?.entranceId,\n });\n\n const reqOpts =\n ambassadorWixArrivalsV1Arrival.createArrivalByCredential(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n token: '$[0].token',\n identifier: '$[0].identifier',\n entranceId: '$[0].entranceId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateArrivalByCredentialOptions\n extends CreateArrivalByCredentialOptionsCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n /**\n * ID of the entrance the credential is presented at, one of an area's entrances. The arrival is recorded in the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n}\n\n/** @oneof */\nexport interface CreateArrivalByCredentialOptionsCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\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 { 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\nconst TRANSFORM_PATHS_0 = [\n { path: 'arrival.createdDate' },\n { path: 'arrival.updatedDate' },\n { path: 'arrival.overriddenDate' },\n];\nconst TRANSFORM_PATHS_1 = [\n { path: 'scheduledEventSearchWindow.startDate' },\n { path: 'scheduledEventSearchWindow.endDate' },\n];\nconst TRANSFORM_PATHS_2 = [{ path: 'recentArrival.createdDate' }];\nconst TRANSFORM_PATHS_3 = [\n { path: 'arrivals.createdDate' },\n { path: 'arrivals.updatedDate' },\n { path: 'arrivals.overriddenDate' },\n];\n\nfunction resolveWixArrivalsV1CredentialArrivalsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/arrivals-arrivals',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/arrivals-arrivals',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/arrivals/v1/arrivals',\n destPath: '/v1/arrivals',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixArrivalsV1ArrivalsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/arrivals-arrivals',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/arrivals-arrivals',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/arrivals/v1/arrivals',\n destPath: '/v1/arrivals',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_arrivals_arrivals';\n\n/**\n * Evaluates a person for an area and writes one arrival, whatever it finds about them. For the flows that call\n * it — scans, the dashboard, readers — see About Arrivals.\n *\n * Only `arrival.contactDetails.contactId`, `arrival.area.entranceId` and `denialOverride` are read; the\n * area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture,\n * `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, and what granted the entry. `status` follows from the entry's issues:\n * - none, or only `INTAKE_FORM_MISSING` for forms that do not block entry: **`GRANTED`**, with `planBenefit` or\n * `scheduledEvent` naming what admitted the person; the server picks it by the rule on `planBenefit`: an admitting item, free before finite.\n * - `NO_ELIGIBLE_GRANT`, `RECENT_ENTRY`, or `INTAKE_FORM_MISSING` for a form that blocks entry: **`DENIED`**.\n * Nothing is redeemed; a site user may let the person in with Override Arrival as Granted.\n *\n * *Override at creation.** With `denialOverride`, a denial is written `GRANTED` at once, with its issues and\n * `overrideReason`; Arrival Created fires with that `GRANTED` arrival. Only a site user may send it,\n * a Wix user acting through an app (a call that carries the user's identity beside the app's) included; any other\n * caller fails with `OVERRIDE_NOT_ALLOWED` and nothing is recorded.\n *\n * *Redemption.** A granted benefit is redeemed asynchronously after the response, with the arrival ID as the\n * idempotency key: usually within seconds, and retried for several minutes while Pricing Plans is unavailable. If\n * Pricing Plans refuses the redemption, for example a credit pack with no credits left after an override, the\n * arrival stays `GRANTED` and nothing is recorded on it; the balance is read from Pricing Plans.\n *\n * *Repeats within 5 seconds.** A call for the same contact and entrance by the same caller within 5 seconds of an\n * arrival returns that arrival unchanged. The caller is the Wix user when the call carries one, through an app\n * included, so two site collaborators on one scanner app are two callers; otherwise it is the app. A repeat that\n * carries `denialOverride` onto a `DENIED` arrival is the exception: the override is applied to that arrival exactly\n * as Override Arrival as Granted applies it, from its stored evaluation, and Arrival Updated fires instead of\n * Arrival Created. On a `GRANTED` arrival `denialOverride` is ignored. See About Arrivals for\n * retries.\n *\n * *Errors and outages.** `CONTACT_NOT_FOUND` and `ENTRANCE_NOT_FOUND` record nothing. When Pricing Plans or\n * Contacts cannot be reached and nothing else admits the person, the call fails with `UNAVAILABLE`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`) and records nothing — unless it carries `denialOverride`:\n * a site user has decided, so the arrival is written `GRANTED` with that outage in its issues, no plan benefit, and\n * nothing redeemed. Without Contacts the arrival also has no name or picture.\n */\nexport function createArrival(payload: object): RequestOptionsFactory<any> {\n function __createArrival({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.CreateArrival',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createArrival;\n}\n\n/**\n * Grants a `DENIED` arrival as a site user's override, from the evaluation it was denied with, and redeems the plan\n * benefit that evaluation found, once, after the response. Not a record correction: calling it can spend a\n * Pricing Plans credit. It is a site user's decision and does not check `RECENT_ENTRY`: it spends the picked credit even when\n * the person was let in a moment ago, for example by a new arrival written at the desk after this denial. Before\n * offering \"Let in\", show the person's recent entry (Check Eligibility's `recentArrival`) and ask the site user to confirm. `overrideReason` holds the site user's own words when they give one. This is the one\n * change an arrival receives through this API.\n *\n * Only a site user may call it, a Wix user acting through an app (a call that carries the user's identity beside the\n * app's) included: a caller that is not a site user — a reader at an entrance, or an app with no Wix user on the\n * call — fails with `OVERRIDE_NOT_ALLOWED`, checked before the arrival is read, and nothing changes. Any `DENIED`\n * arrival may be overridden, whoever wrote it: a site user may let in a person a reader denied instead of writing a new\n * arrival at the desk — not as well, since each of the two would admit the person. The caller is recorded in\n * `overriddenBy`; who wrote the arrival stays in `source.createdBy`. The person is not evaluated again: `eligibilityDetails` stays as it\n * was written at the denial, so its `issues` hold what was overridden, and the benefit or scheduled event that\n * evaluation found, if any, is recorded in `planBenefit` or `scheduledEvent`, picked by the rule on `planBenefit`: one that\n * admitted on its own first (the person was denied only for a blocking intake form or `RECENT_ENTRY`), free before\n * finite — the same record `denialOverride`\n * on Create Arrival leaves. Idempotent: on a `DENIED` arrival the status turns `GRANTED`, `revision` moves, and\n * Arrival Updated fires; an arrival that is already `GRANTED` is returned as it is (its\n * `overrideReason` is not changed) and nothing is redeemed twice. An `arrivalId` that names no arrival fails with `ARRIVAL_NOT_FOUND`. To decide before the\n * evaluation, send `denialOverride` on Create Arrival instead; a repeat of that Create Arrival within 5 seconds\n * with `denialOverride` applies this same override to the denied arrival.\n */\nexport function overrideArrivalAsGranted(\n payload: object\n): RequestOptionsFactory<any> {\n function __overrideArrivalAsGranted({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.OverrideArrivalAsGranted',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/{arrivalId}/override-as-granted',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __overrideArrivalAsGranted;\n}\n\n/**\n * Checks whether a contact would be granted entry at an entrance, into the area it belongs to, without recording\n * or redeeming anything. It takes the same `entranceId` as Create Arrival.\n *\n * The response is `eligibilityDetails` as Create Arrival would record it, with the `status` Create Arrival would\n * derive from it, and the contact's `contactDetails` (name and picture) as Contacts holds them now. With\n * `scheduledEventSearchWindow`, events found only in that window are also listed, with `OUTSIDE_ENTRY_WINDOW`.\n * Scheduled events are read only while the area's `policy.scheduledEventsPolicy.entryGrantingAppIds` is not\n * empty. The person is checked for now, the time of the call. When they were let into this area within the last\n * 15 minutes and this entry would spend a credit, the status is `DENIED` with `RECENT_ENTRY`, and `recentArrival`\n * names that arrival. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, including a contact that was\n * merged into another, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; an entrance of an archived\n * area fails with `AREA_ARCHIVED`, and a `scheduledEventSearchWindow` whose `endDate` is not after its `startDate` with\n * `SEARCH_WINDOW_INVALID`, checked before anything is read. When Pricing Plans or\n * Contacts cannot be reached the call does not fail: the outage is reported in `eligibilityDetails.issues`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`). The status is then `DENIED`, unless something else admits\n * the person. Create Arrival, in the same case, fails with `UNAVAILABLE` unless it carries `denialOverride`. Without Contacts,\n * `contactDetails` has the contact ID alone.\n * Nothing is stored. This method reveals plan state, so it has its own permission rather than the read\n * permission of arrivals.\n */\nexport function checkEligibility(payload: object): RequestOptionsFactory<any> {\n function __checkEligibility({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.CheckEligibility',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/check-eligibility',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __checkEligibility;\n}\n\n/** Retrieves an arrival. */\nexport function getArrival(payload: object): RequestOptionsFactory<any> {\n function __getArrival({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'GET' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.GetArrival',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/{arrivalId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getArrival;\n}\n\n/**\n * Retrieves a list of arrivals, given the provided [paging, filtering, and sorting][1].\n *\n * Supported filter and sort fields: `id`, `contactDetails.contactId`,\n * `source.identifiedBy`, `area.id`, `area.locationId`, `area.entranceId`, `eligibilityDetails.issues`, `planBenefit.poolId`,\n * `planBenefit.benefitKey`, `planBenefit.type`, `status`, `createdDate`. Filter only, not sort: `overriddenBy.wixUserId`.\n * `eligibilityDetails.issues` is a list: filter it with `$hasSome` or `$hasAll`, for example\n * `{ \"eligibilityDetails.issues\": { \"$hasSome\": [\"INTAKE_FORM_MISSING\"] } }` for the arrivals where a\n * form was missing; filtering on it requires the `arrivals:v1:arrival:read_eligibility_details` permission, like reading it.\n * An arrival a site user overrode has `status` `GRANTED` and `overriddenBy`, and an `overrideReason` only when a site user gave\n * one. To find overrides, filter `overriddenBy.wixUserId` with a `createdDate` lower bound:\n * `{ \"overriddenBy.wixUserId\": { \"$exists\": true }, \"createdDate\": { \"$gte\": \"2026-11-09T00:00:00Z\" } }` finds\n * every override since that time, and a user ID in place of `$exists` finds those of one site user.\n *\n * `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` and `overriddenBy.wixUserId` have no index. A filter on any of them, or a sort on any but `overriddenBy.wixUserId` (filter only), must also have a lower\n * bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago, at the top level or in an `$and`; otherwise the\n * request fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`. A bound inside an `$or` counts only when every branch has one. A next page,\n * requested with its cursor, is not checked again.\n *\n * To learn how to query arrivals, see [API Query Language][2].\n *\n * [1]: https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging\n * [2]: https://dev.wix.com/docs/rest/articles/getting-started/api-query-language\n */\nexport function queryArrivals(payload: object): RequestOptionsFactory<any> {\n function __queryArrivals({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'GET' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.QueryArrivals',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_3,\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryArrivals;\n}\n\n/**\n * Counts arrivals matching a filter, for dashboard tiles such as \"granted today\" and \"denied today\".\n *\n * The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an\n * arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count\n * overrides, filter `{ \"overriddenBy.wixUserId\": { \"$exists\": true } }` with a `createdDate` lower bound.\n * A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate`\n * (`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`.\n * Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by\n * `createdDate`.\n */\nexport function countArrivals(payload: object): RequestOptionsFactory<any> {\n function __countArrivals({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.CountArrivals',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countArrivals;\n}\n\n/**\n * Checks whether the holder of a presented credential would be granted entry at an entrance, into the area it\n * belongs to, without recording anything or redeeming anything.\n *\n * This is Check Eligibility in the Arrivals Service with the person identified by what they present instead\n * of by `contactId`: the token or identifier is resolved to its credential and holder, then the same\n * evaluation runs. A scanner app uses it to show a client their standing without admitting them: their benefits\n * for this area and their scheduled events, each with its own issue, the forms they are missing, and the\n * status a scan would get. It takes the same `entranceId` as Create Arrival By Credential, so a scanner checks\n * and records at the one position it holds. The response has the same fields Check Eligibility returns, always\n * against the area's own entry window, so that it predicts the Create Arrival that follows the scan. A token that does not\n * resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`; an identifier that belongs to no\n * credential fails with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; when\n * Pricing Plans or Contacts cannot be reached the call does not fail and reports the outage in\n * `eligibilityDetails.issues`, as Check Eligibility does. This method\n * reveals plan state, so it has its own permission rather\n * than the read permission of arrivals.\n */\nexport function checkEligibilityByCredential(\n payload: object\n): RequestOptionsFactory<any> {\n function __checkEligibilityByCredential({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn:\n 'wix.arrivals.v1.CredentialArrivalsService.CheckEligibilityByCredential',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1CredentialArrivalsServiceUrl({\n protoPath: '/v1/arrivals/check-eligibility-by-credential',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __checkEligibilityByCredential;\n}\n\n/**\n * Writes an arrival for the holder of a presented credential: resolves the token or identifier to its credential\n * and holder and calls Create Arrival for them. The outcome is Create Arrival's contract. It carries no override:\n * letting the person in after a denial is Override Arrival as Granted with the denied arrival's ID.\n *\n * A token that does not resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`, an identifier\n * that belongs to none with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with\n * `ENTRANCE_NOT_FOUND`; nothing is recorded. The arrival is recorded at the entrance, in the area it belongs to,\n * with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD` and\n * `source.createdBy` naming the Wix user, or the app that called (a reader or a partner app). When Pricing Plans or Contacts cannot be reached and\n * nothing else admits the person, the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE` or\n * `CONTACTS_UNAVAILABLE`) and records nothing. A repeat within 5 seconds by the same caller, for the same holder and\n * entrance, returns the arrival already written, whether it came from a scan or from Create Arrival.\n */\nexport function createArrivalByCredential(\n payload: object\n): RequestOptionsFactory<any> {\n function __createArrivalByCredential({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn:\n 'wix.arrivals.v1.CredentialArrivalsService.CreateArrivalByCredential',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1CredentialArrivalsServiceUrl({\n protoPath: '/v1/arrivals/create-by-credential',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createArrivalByCredential;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Arrival,\n ArrivalQuery,\n ArrivalsQueryBuilder,\n CheckEligibilityApplicationErrors,\n CheckEligibilityByCredentialApplicationErrors,\n CheckEligibilityByCredentialOptions,\n CheckEligibilityByCredentialResponse,\n CheckEligibilityOptions,\n CheckEligibilityResponse,\n CountArrivalsApplicationErrors,\n CountArrivalsOptions,\n CountArrivalsResponse,\n CreateArrivalApplicationErrors,\n CreateArrivalByCredentialApplicationErrors,\n CreateArrivalByCredentialOptions,\n CreateArrivalByCredentialResponse,\n CreateArrivalOptions,\n OverrideArrivalAsGrantedApplicationErrors,\n OverrideArrivalAsGrantedOptions,\n OverrideArrivalAsGrantedResponse,\n QueryArrivalsApplicationErrors,\n QueryArrivalsResponse,\n checkEligibility as universalCheckEligibility,\n checkEligibilityByCredential as universalCheckEligibilityByCredential,\n countArrivals as universalCountArrivals,\n createArrival as universalCreateArrival,\n createArrivalByCredential as universalCreateArrivalByCredential,\n getArrival as universalGetArrival,\n overrideArrivalAsGranted as universalOverrideArrivalAsGranted,\n queryArrivals as universalQueryArrivals,\n typedQueryArrivals as universalTypedQueryArrivals,\n} from './arrivals-v1-arrival-arrivals.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/arrivals' };\n\n/** @internal */\nexport function createArrival(httpClient: HttpClient): CreateArrivalSignature {\n return (\n arrival: NonNullablePaths<\n Arrival,\n | `area`\n | `area.entranceId`\n | `contactDetails`\n | `contactDetails.contactId`,\n 1\n >,\n options?: CreateArrivalOptions\n ) =>\n universalCreateArrival(\n arrival,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateArrivalSignature {\n /**\n * Evaluates a person for an area and writes one arrival, whatever it finds about them. For the flows that call\n * it — scans, the dashboard, readers — see About Arrivals.\n *\n * Only `arrival.contactDetails.contactId`, `arrival.area.entranceId` and `denialOverride` are read; the\n * area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture,\n * `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, and what granted the entry. `status` follows from the entry's issues:\n * - none, or only `INTAKE_FORM_MISSING` for forms that do not block entry: **`GRANTED`**, with `planBenefit` or\n * `scheduledEvent` naming what admitted the person; the server picks it by the rule on `planBenefit`: an admitting item, free before finite.\n * - `NO_ELIGIBLE_GRANT`, `RECENT_ENTRY`, or `INTAKE_FORM_MISSING` for a form that blocks entry: **`DENIED`**.\n * Nothing is redeemed; a site user may let the person in with Override Arrival as Granted.\n *\n * *Override at creation.** With `denialOverride`, a denial is written `GRANTED` at once, with its issues and\n * `overrideReason`; Arrival Created fires with that `GRANTED` arrival. Only a site user may send it,\n * a Wix user acting through an app (a call that carries the user's identity beside the app's) included; any other\n * caller fails with `OVERRIDE_NOT_ALLOWED` and nothing is recorded.\n *\n * *Redemption.** A granted benefit is redeemed asynchronously after the response, with the arrival ID as the\n * idempotency key: usually within seconds, and retried for several minutes while Pricing Plans is unavailable. If\n * Pricing Plans refuses the redemption, for example a credit pack with no credits left after an override, the\n * arrival stays `GRANTED` and nothing is recorded on it; the balance is read from Pricing Plans.\n *\n * *Repeats within 5 seconds.** A call for the same contact and entrance by the same caller within 5 seconds of an\n * arrival returns that arrival unchanged. The caller is the Wix user when the call carries one, through an app\n * included, so two site collaborators on one scanner app are two callers; otherwise it is the app. A repeat that\n * carries `denialOverride` onto a `DENIED` arrival is the exception: the override is applied to that arrival exactly\n * as Override Arrival as Granted applies it, from its stored evaluation, and Arrival Updated fires instead of\n * Arrival Created. On a `GRANTED` arrival `denialOverride` is ignored. See About Arrivals for\n * retries.\n *\n * *Errors and outages.** `CONTACT_NOT_FOUND` and `ENTRANCE_NOT_FOUND` record nothing. When Pricing Plans or\n * Contacts cannot be reached and nothing else admits the person, the call fails with `UNAVAILABLE`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`) and records nothing — unless it carries `denialOverride`:\n * a site user has decided, so the arrival is written `GRANTED` with that outage in its issues, no plan benefit, and\n * nothing redeemed. Without Contacts the arrival also has no name or picture.\n * @param - Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field —\n * the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, what granted the entry — is set by the server.\n * @returns The arrival as written, with the status its issues imply — `GRANTED` despite them when `denialOverride` let the person in. On a repeat within 5 seconds, the existing arrival: unchanged, or now `GRANTED` when the repeat carried `denialOverride` onto a `DENIED` one.\n */\n (\n arrival: NonNullablePaths<\n Arrival,\n | `area`\n | `area.entranceId`\n | `contactDetails`\n | `contactDetails.contactId`,\n 1\n >,\n options?: CreateArrivalOptions\n ): Promise<\n NonNullablePaths<\n Arrival,\n | `planBenefit.poolId`\n | `planBenefit.benefitKey`\n | `planBenefit.displayName`\n | `planBenefit.type`\n | `scheduledEvent.eventId`\n | `scheduledEvent.displayName`\n | `scheduledEvent.appId`\n | `contactDetails.contactId`\n | `source.identifiedBy`\n | `source.createdBy.anonymousVisitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.wixUserId`\n | `source.createdBy.appId`\n | `area._id`\n | `area.locationId`\n | `area.name`\n | `area.entranceId`\n | `area.entranceName`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.scheduledEvents`\n | `status`,\n 3\n > & {\n __applicationErrorsType?: CreateArrivalApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function overrideArrivalAsGranted(\n httpClient: HttpClient\n): OverrideArrivalAsGrantedSignature {\n return (arrivalId: string, options?: OverrideArrivalAsGrantedOptions) =>\n universalOverrideArrivalAsGranted(\n arrivalId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface OverrideArrivalAsGrantedSignature {\n /**\n * Grants a `DENIED` arrival as a site user's override, from the evaluation it was denied with, and redeems the plan\n * benefit that evaluation found, once, after the response. Not a record correction: calling it can spend a\n * Pricing Plans credit. It is a site user's decision and does not check `RECENT_ENTRY`: it spends the picked credit even when\n * the person was let in a moment ago, for example by a new arrival written at the desk after this denial. Before\n * offering \"Let in\", show the person's recent entry (Check Eligibility's `recentArrival`) and ask the site user to confirm. `overrideReason` holds the site user's own words when they give one. This is the one\n * change an arrival receives through this API.\n *\n * Only a site user may call it, a Wix user acting through an app (a call that carries the user's identity beside the\n * app's) included: a caller that is not a site user — a reader at an entrance, or an app with no Wix user on the\n * call — fails with `OVERRIDE_NOT_ALLOWED`, checked before the arrival is read, and nothing changes. Any `DENIED`\n * arrival may be overridden, whoever wrote it: a site user may let in a person a reader denied instead of writing a new\n * arrival at the desk — not as well, since each of the two would admit the person. The caller is recorded in\n * `overriddenBy`; who wrote the arrival stays in `source.createdBy`. The person is not evaluated again: `eligibilityDetails` stays as it\n * was written at the denial, so its `issues` hold what was overridden, and the benefit or scheduled event that\n * evaluation found, if any, is recorded in `planBenefit` or `scheduledEvent`, picked by the rule on `planBenefit`: one that\n * admitted on its own first (the person was denied only for a blocking intake form or `RECENT_ENTRY`), free before\n * finite — the same record `denialOverride`\n * on Create Arrival leaves. Idempotent: on a `DENIED` arrival the status turns `GRANTED`, `revision` moves, and\n * Arrival Updated fires; an arrival that is already `GRANTED` is returned as it is (its\n * `overrideReason` is not changed) and nothing is redeemed twice. An `arrivalId` that names no arrival fails with `ARRIVAL_NOT_FOUND`. To decide before the\n * evaluation, send `denialOverride` on Create Arrival instead; a repeat of that Create Arrival within 5 seconds\n * with `denialOverride` applies this same override to the denied arrival.\n * @param - ID of the denied arrival to let the person in on.\n */\n (arrivalId: string, options?: OverrideArrivalAsGrantedOptions): Promise<\n NonNullablePaths<\n OverrideArrivalAsGrantedResponse,\n | `arrival.planBenefit.poolId`\n | `arrival.planBenefit.benefitKey`\n | `arrival.planBenefit.displayName`\n | `arrival.planBenefit.type`\n | `arrival.scheduledEvent.eventId`\n | `arrival.scheduledEvent.displayName`\n | `arrival.scheduledEvent.appId`\n | `arrival.contactDetails.contactId`\n | `arrival.source.identifiedBy`\n | `arrival.source.createdBy.anonymousVisitorId`\n | `arrival.source.createdBy.memberId`\n | `arrival.source.createdBy.wixUserId`\n | `arrival.source.createdBy.appId`\n | `arrival.area._id`\n | `arrival.area.locationId`\n | `arrival.area.name`\n | `arrival.area.entranceId`\n | `arrival.area.entranceName`\n | `arrival.eligibilityDetails.issues`\n | `arrival.eligibilityDetails.missingIntakeForms`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `arrival.eligibilityDetails.planBenefits`\n | `arrival.eligibilityDetails.scheduledEvents`\n | `arrival.status`,\n 4\n > & {\n __applicationErrorsType?: OverrideArrivalAsGrantedApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function checkEligibility(\n httpClient: HttpClient\n): CheckEligibilitySignature {\n return (\n contactId: string,\n options?: NonNullablePaths<\n CheckEligibilityOptions,\n | `entranceId`\n | `scheduledEventSearchWindow.endDate`\n | `scheduledEventSearchWindow.startDate`,\n 1\n >\n ) =>\n universalCheckEligibility(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CheckEligibilitySignature {\n /**\n * Checks whether a contact would be granted entry at an entrance, into the area it belongs to, without recording\n * or redeeming anything. It takes the same `entranceId` as Create Arrival.\n *\n * The response is `eligibilityDetails` as Create Arrival would record it, with the `status` Create Arrival would\n * derive from it, and the contact's `contactDetails` (name and picture) as Contacts holds them now. With\n * `scheduledEventSearchWindow`, events found only in that window are also listed, with `OUTSIDE_ENTRY_WINDOW`.\n * Scheduled events are read only while the area's `policy.scheduledEventsPolicy.entryGrantingAppIds` is not\n * empty. The person is checked for now, the time of the call. When they were let into this area within the last\n * 15 minutes and this entry would spend a credit, the status is `DENIED` with `RECENT_ENTRY`, and `recentArrival`\n * names that arrival. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, including a contact that was\n * merged into another, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; an entrance of an archived\n * area fails with `AREA_ARCHIVED`, and a `scheduledEventSearchWindow` whose `endDate` is not after its `startDate` with\n * `SEARCH_WINDOW_INVALID`, checked before anything is read. When Pricing Plans or\n * Contacts cannot be reached the call does not fail: the outage is reported in `eligibilityDetails.issues`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`). The status is then `DENIED`, unless something else admits\n * the person. Create Arrival, in the same case, fails with `UNAVAILABLE` unless it carries `denialOverride`. Without Contacts,\n * `contactDetails` has the contact ID alone.\n * Nothing is stored. This method reveals plan state, so it has its own permission rather than the read\n * permission of arrivals.\n * @param - ID of the contact whose eligibility to check.\n * @returns What the engine would find for the contact in this area, and the status Create Arrival would\n * derive from it. Nothing was recorded. It is the finding, not the outcome; what happened is on the arrival, once one\n * is written. No balance is reported: credits left are read from Pricing Plans. Check Eligibility By Credential\n * returns the same fields.\n */\n (\n contactId: string,\n options?: NonNullablePaths<\n CheckEligibilityOptions,\n | `entranceId`\n | `scheduledEventSearchWindow.endDate`\n | `scheduledEventSearchWindow.startDate`,\n 1\n >\n ): Promise<\n NonNullablePaths<\n CheckEligibilityResponse,\n | `contactDetails.contactId`\n | `status`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.type`\n | `eligibilityDetails.scheduledEvents`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId`\n | `recentArrival.arrivalId`,\n 4\n > & {\n __applicationErrorsType?: CheckEligibilityApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function getArrival(httpClient: HttpClient): GetArrivalSignature {\n return (arrivalId: string) =>\n universalGetArrival(\n arrivalId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetArrivalSignature {\n /**\n * Retrieves an arrival.\n * @param - ID of the arrival to retrieve.\n * @returns Requested arrival.\n */\n (arrivalId: string): Promise<\n NonNullablePaths<\n Arrival,\n | `planBenefit.poolId`\n | `planBenefit.benefitKey`\n | `planBenefit.displayName`\n | `planBenefit.type`\n | `scheduledEvent.eventId`\n | `scheduledEvent.displayName`\n | `scheduledEvent.appId`\n | `contactDetails.contactId`\n | `source.identifiedBy`\n | `source.createdBy.anonymousVisitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.wixUserId`\n | `source.createdBy.appId`\n | `area._id`\n | `area.locationId`\n | `area.name`\n | `area.entranceId`\n | `area.entranceName`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.scheduledEvents`\n | `status`,\n 3\n >\n >;\n}\n\n/** @internal */\nexport function queryArrivals(httpClient: HttpClient): QueryArrivalsSignature {\n return () =>\n universalQueryArrivals(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryArrivalsSignature {\n /**\n * Retrieves a list of arrivals, given the provided [paging, filtering, and sorting][1].\n *\n * Supported filter and sort fields: `id`, `contactDetails.contactId`,\n * `source.identifiedBy`, `area.id`, `area.locationId`, `area.entranceId`, `eligibilityDetails.issues`, `planBenefit.poolId`,\n * `planBenefit.benefitKey`, `planBenefit.type`, `status`, `createdDate`. Filter only, not sort: `overriddenBy.wixUserId`.\n * `eligibilityDetails.issues` is a list: filter it with `$hasSome` or `$hasAll`, for example\n * `{ \"eligibilityDetails.issues\": { \"$hasSome\": [\"INTAKE_FORM_MISSING\"] } }` for the arrivals where a\n * form was missing; filtering on it requires the `arrivals:v1:arrival:read_eligibility_details` permission, like reading it.\n * An arrival a site user overrode has `status` `GRANTED` and `overriddenBy`, and an `overrideReason` only when a site user gave\n * one. To find overrides, filter `overriddenBy.wixUserId` with a `createdDate` lower bound:\n * `{ \"overriddenBy.wixUserId\": { \"$exists\": true }, \"createdDate\": { \"$gte\": \"2026-11-09T00:00:00Z\" } }` finds\n * every override since that time, and a user ID in place of `$exists` finds those of one site user.\n *\n * `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` and `overriddenBy.wixUserId` have no index. A filter on any of them, or a sort on any but `overriddenBy.wixUserId` (filter only), must also have a lower\n * bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago, at the top level or in an `$and`; otherwise the\n * request fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`. A bound inside an `$or` counts only when every branch has one. A next page,\n * requested with its cursor, is not checked again.\n *\n * To learn how to query arrivals, see [API Query Language][2].\n *\n * [1]: https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging\n * [2]: https://dev.wix.com/docs/rest/articles/getting-started/api-query-language\n */\n (): ArrivalsQueryBuilder;\n}\n\nexport function typedQueryArrivals(\n httpClient: HttpClient\n): TypedQueryArrivalsSignature {\n return (query: ArrivalQuery) =>\n universalTypedQueryArrivals(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryArrivalsSignature {\n /** */\n (query: ArrivalQuery): Promise<\n NonNullablePaths<\n QueryArrivalsResponse,\n | `arrivals`\n | `arrivals.${number}.planBenefit.poolId`\n | `arrivals.${number}.planBenefit.benefitKey`\n | `arrivals.${number}.planBenefit.displayName`\n | `arrivals.${number}.planBenefit.type`\n | `arrivals.${number}.scheduledEvent.eventId`\n | `arrivals.${number}.scheduledEvent.displayName`\n | `arrivals.${number}.scheduledEvent.appId`\n | `arrivals.${number}.contactDetails.contactId`\n | `arrivals.${number}.source.identifiedBy`\n | `arrivals.${number}.source.createdBy.anonymousVisitorId`\n | `arrivals.${number}.source.createdBy.memberId`\n | `arrivals.${number}.source.createdBy.wixUserId`\n | `arrivals.${number}.source.createdBy.appId`\n | `arrivals.${number}.area._id`\n | `arrivals.${number}.area.locationId`\n | `arrivals.${number}.area.name`\n | `arrivals.${number}.area.entranceId`\n | `arrivals.${number}.area.entranceName`\n | `arrivals.${number}.status`,\n 4\n > & {\n __applicationErrorsType?: QueryArrivalsApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function countArrivals(httpClient: HttpClient): CountArrivalsSignature {\n return (options?: CountArrivalsOptions) =>\n universalCountArrivals(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountArrivalsSignature {\n /**\n * Counts arrivals matching a filter, for dashboard tiles such as \"granted today\" and \"denied today\".\n *\n * The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an\n * arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count\n * overrides, filter `{ \"overriddenBy.wixUserId\": { \"$exists\": true } }` with a `createdDate` lower bound.\n * A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate`\n * (`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`.\n * Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by\n * `createdDate`.\n */\n (options?: CountArrivalsOptions): Promise<\n NonNullablePaths<CountArrivalsResponse, `count`, 0> & {\n __applicationErrorsType?: CountArrivalsApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function checkEligibilityByCredential(\n httpClient: HttpClient\n): CheckEligibilityByCredentialSignature {\n return (\n options: NonNullablePaths<\n CheckEligibilityByCredentialOptions,\n `entranceId`,\n 0\n >\n ) =>\n universalCheckEligibilityByCredential(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CheckEligibilityByCredentialSignature {\n /**\n * Checks whether the holder of a presented credential would be granted entry at an entrance, into the area it\n * belongs to, without recording anything or redeeming anything.\n *\n * This is Check Eligibility in the Arrivals Service with the person identified by what they present instead\n * of by `contactId`: the token or identifier is resolved to its credential and holder, then the same\n * evaluation runs. A scanner app uses it to show a client their standing without admitting them: their benefits\n * for this area and their scheduled events, each with its own issue, the forms they are missing, and the\n * status a scan would get. It takes the same `entranceId` as Create Arrival By Credential, so a scanner checks\n * and records at the one position it holds. The response has the same fields Check Eligibility returns, always\n * against the area's own entry window, so that it predicts the Create Arrival that follows the scan. A token that does not\n * resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`; an identifier that belongs to no\n * credential fails with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; when\n * Pricing Plans or Contacts cannot be reached the call does not fail and reports the outage in\n * `eligibilityDetails.issues`, as Check Eligibility does. This method\n * reveals plan state, so it has its own permission rather\n * than the read permission of arrivals.\n * @returns What the engine would find for the credential's holder in this area, and the status Create\n * Arrival would derive from it. Nothing was recorded. The same fields Check Eligibility returns, always against the\n * area's own entry window.\n */\n (\n options: NonNullablePaths<\n CheckEligibilityByCredentialOptions,\n `entranceId`,\n 0\n >\n ): Promise<\n NonNullablePaths<\n CheckEligibilityByCredentialResponse,\n | `contactDetails.contactId`\n | `status`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.type`\n | `eligibilityDetails.scheduledEvents`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId`\n | `recentArrival.arrivalId`,\n 4\n > & {\n __applicationErrorsType?: CheckEligibilityByCredentialApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function createArrivalByCredential(\n httpClient: HttpClient\n): CreateArrivalByCredentialSignature {\n return (\n options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>\n ) =>\n universalCreateArrivalByCredential(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateArrivalByCredentialSignature {\n /**\n * Writes an arrival for the holder of a presented credential: resolves the token or identifier to its credential\n * and holder and calls Create Arrival for them. The outcome is Create Arrival's contract. It carries no override:\n * letting the person in after a denial is Override Arrival as Granted with the denied arrival's ID.\n *\n * A token that does not resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`, an identifier\n * that belongs to none with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with\n * `ENTRANCE_NOT_FOUND`; nothing is recorded. The arrival is recorded at the entrance, in the area it belongs to,\n * with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD` and\n * `source.createdBy` naming the Wix user, or the app that called (a reader or a partner app). When Pricing Plans or Contacts cannot be reached and\n * nothing else admits the person, the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE` or\n * `CONTACTS_UNAVAILABLE`) and records nothing. A repeat within 5 seconds by the same caller, for the same holder and\n * entrance, returns the arrival already written, whether it came from a scan or from Create Arrival.\n */\n (\n options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>\n ): Promise<\n NonNullablePaths<\n CreateArrivalByCredentialResponse,\n | `arrival.planBenefit.poolId`\n | `arrival.planBenefit.benefitKey`\n | `arrival.planBenefit.displayName`\n | `arrival.planBenefit.type`\n | `arrival.scheduledEvent.eventId`\n | `arrival.scheduledEvent.displayName`\n | `arrival.scheduledEvent.appId`\n | `arrival.contactDetails.contactId`\n | `arrival.source.identifiedBy`\n | `arrival.source.createdBy.anonymousVisitorId`\n | `arrival.source.createdBy.memberId`\n | `arrival.source.createdBy.wixUserId`\n | `arrival.source.createdBy.appId`\n | `arrival.area._id`\n | `arrival.area.locationId`\n | `arrival.area.name`\n | `arrival.area.entranceId`\n | `arrival.area.entranceName`\n | `arrival.eligibilityDetails.issues`\n | `arrival.eligibilityDetails.missingIntakeForms`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `arrival.eligibilityDetails.planBenefits`\n | `arrival.eligibilityDetails.scheduledEvents`\n | `arrival.status`,\n 4\n > & {\n __applicationErrorsType?: CreateArrivalByCredentialApplicationErrors;\n }\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n AreaInfo,\n Arrival,\n ArrivalGrantedByOneOf,\n ArrivalQuerySpec,\n ArrivalSource,\n ArrivalsQueryBuilder,\n ArrivalsQueryResult,\n CheckEligibilityByCredentialOptions,\n CheckEligibilityByCredentialOptionsCredentialOneOf,\n CheckEligibilityByCredentialRequest,\n CheckEligibilityByCredentialRequestCredentialOneOf,\n CheckEligibilityByCredentialResponse,\n CheckEligibilityOptions,\n CheckEligibilityRequest,\n CheckEligibilityResponse,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n ContactDetails,\n CountArrivalsOptions,\n CountArrivalsRequest,\n CountArrivalsResponse,\n CreateArrivalByCredentialOptions,\n CreateArrivalByCredentialOptionsCredentialOneOf,\n CreateArrivalByCredentialRequest,\n CreateArrivalByCredentialRequestCredentialOneOf,\n CreateArrivalByCredentialResponse,\n CreateArrivalOptions,\n CreateArrivalRequest,\n CreateArrivalResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DenialOverride,\n DomainEvent,\n DomainEventBodyOneOf,\n EligibilityDetails,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EntryIssue,\n GetArrivalRequest,\n GetArrivalResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentificationMethod,\n IdentityType,\n MessageEnvelope,\n MissingIntakeForm,\n OverrideArrivalAsGrantedOptions,\n OverrideArrivalAsGrantedRequest,\n OverrideArrivalAsGrantedResponse,\n PlanBenefit,\n PlanBenefitEligibility,\n PlanBenefitIssue,\n PlanBenefitType,\n PresentedIdentifier,\n QueryArrivalsRequest,\n QueryArrivalsResponse,\n RecentArrival,\n RestoreInfo,\n ScheduledEvent,\n ScheduledEventEligibility,\n ScheduledEventIssue,\n ScheduledEventSearchWindow,\n SortOrder,\n Sorting,\n Status,\n Type,\n WebhookIdentityType,\n utils,\n} from './arrivals-v1-arrival-arrivals.universal.js';\n","import {\n createArrival as publicCreateArrival,\n overrideArrivalAsGranted as publicOverrideArrivalAsGranted,\n checkEligibility as publicCheckEligibility,\n getArrival as publicGetArrival,\n queryArrivals as publicQueryArrivals,\n typedQueryArrivals as publicTypedQueryArrivals,\n countArrivals as publicCountArrivals,\n checkEligibilityByCredential as publicCheckEligibilityByCredential,\n createArrivalByCredential as publicCreateArrivalByCredential,\n} from './arrivals-v1-arrival-arrivals.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ArrivalQuery,\n ArrivalsQueryBuilder,\n typedQueryArrivals as universalTypedQueryArrivals,\n} from './arrivals-v1-arrival-arrivals.universal.js';\n\nfunction customQueryArrivals(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryArrivals(httpClient)(),\n typedQueryFunction: (query: ArrivalQuery) =>\n publicTypedQueryArrivals(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ArrivalsQueryBuilder;\n function overloadedQuery(\n query: ArrivalQuery\n ): ReturnType<typeof universalTypedQueryArrivals>;\n function overloadedQuery(query?: ArrivalQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\n/** @internal */\nexport const createArrival: MaybeContext<\n BuildRESTFunction<typeof publicCreateArrival> & typeof publicCreateArrival\n> = /*#__PURE__*/ createRESTModule(publicCreateArrival);\n/** @internal */\nexport const overrideArrivalAsGranted: MaybeContext<\n BuildRESTFunction<typeof publicOverrideArrivalAsGranted> &\n typeof publicOverrideArrivalAsGranted\n> = /*#__PURE__*/ createRESTModule(publicOverrideArrivalAsGranted);\n/** @internal */\nexport const checkEligibility: MaybeContext<\n BuildRESTFunction<typeof publicCheckEligibility> &\n typeof publicCheckEligibility\n> = /*#__PURE__*/ createRESTModule(publicCheckEligibility);\n/** @internal */\nexport const getArrival: MaybeContext<\n BuildRESTFunction<typeof publicGetArrival> & typeof publicGetArrival\n> = /*#__PURE__*/ createRESTModule(publicGetArrival);\n/** @internal */\nexport const countArrivals: MaybeContext<\n BuildRESTFunction<typeof publicCountArrivals> & typeof publicCountArrivals\n> = /*#__PURE__*/ createRESTModule(publicCountArrivals);\n/** @internal */\nexport const checkEligibilityByCredential: MaybeContext<\n BuildRESTFunction<typeof publicCheckEligibilityByCredential> &\n typeof publicCheckEligibilityByCredential\n> = /*#__PURE__*/ createRESTModule(publicCheckEligibilityByCredential);\n/** @internal */\nexport const createArrivalByCredential: MaybeContext<\n BuildRESTFunction<typeof publicCreateArrivalByCredential> &\n typeof publicCreateArrivalByCredential\n> = /*#__PURE__*/ createRESTModule(publicCreateArrivalByCredential);\nexport const queryArrivals: MaybeContext<\n BuildRESTFunction<typeof customQueryArrivals> & typeof customQueryArrivals\n> = /*#__PURE__*/ createRESTModule(customQueryArrivals);\n\nexport {\n IdentificationMethod,\n IdentityType,\n EntryIssue,\n PlanBenefitType,\n PlanBenefitIssue,\n ScheduledEventIssue,\n Status,\n SortOrder,\n WebhookIdentityType,\n Type,\n} from './arrivals-v1-arrival-arrivals.universal.js';\nexport {\n Arrival,\n ArrivalGrantedByOneOf,\n ContactDetails,\n ArrivalSource,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n AreaInfo,\n EligibilityDetails,\n MissingIntakeForm,\n PlanBenefitEligibility,\n PlanBenefit,\n ScheduledEventEligibility,\n ScheduledEvent,\n CreateArrivalRequest,\n DenialOverride,\n CreateArrivalResponse,\n OverrideArrivalAsGrantedRequest,\n OverrideArrivalAsGrantedResponse,\n CheckEligibilityRequest,\n ScheduledEventSearchWindow,\n CheckEligibilityResponse,\n RecentArrival,\n GetArrivalRequest,\n GetArrivalResponse,\n QueryArrivalsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryArrivalsResponse,\n CursorPagingMetadata,\n Cursors,\n CountArrivalsRequest,\n CountArrivalsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n CheckEligibilityByCredentialRequest,\n CheckEligibilityByCredentialRequestCredentialOneOf,\n PresentedIdentifier,\n CheckEligibilityByCredentialResponse,\n CreateArrivalByCredentialRequest,\n CreateArrivalByCredentialRequestCredentialOneOf,\n CreateArrivalByCredentialResponse,\n CreateArrivalOptions,\n OverrideArrivalAsGrantedOptions,\n CheckEligibilityOptions,\n ArrivalsQueryResult,\n ArrivalsQueryBuilder,\n ArrivalQuerySpec,\n CountArrivalsOptions,\n CheckEligibilityByCredentialOptions,\n CheckEligibilityByCredentialOptionsCredentialOneOf,\n CreateArrivalByCredentialOptions,\n CreateArrivalByCredentialOptionsCredentialOneOf,\n} from './arrivals-v1-arrival-arrivals.universal.js';\nexport { utils } from './arrivals-v1-arrival-arrivals.universal.js';\nexport {\n IdentificationMethodWithLiterals,\n IdentityTypeWithLiterals,\n EntryIssueWithLiterals,\n PlanBenefitTypeWithLiterals,\n PlanBenefitIssueWithLiterals,\n ScheduledEventIssueWithLiterals,\n StatusWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n TypeWithLiterals,\n CreateArrivalApplicationErrors,\n OverrideArrivalAsGrantedApplicationErrors,\n CheckEligibilityApplicationErrors,\n QueryArrivalsApplicationErrors,\n CountArrivalsApplicationErrors,\n CheckEligibilityByCredentialApplicationErrors,\n CreateArrivalByCredentialApplicationErrors,\n CommonQueryWithEntityContext,\n ArrivalQuery,\n} from './arrivals-v1-arrival-arrivals.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,oCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,sBAAsB;AAAA,EAC9B,EAAE,MAAM,sBAAsB;AAAA,EAC9B,EAAE,MAAM,yBAAyB;AACnC;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uCAAuC;AAAA,EAC/C,EAAE,MAAM,qCAAqC;AAC/C;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,4BAA4B,CAAC;AAChE,IAAM,oB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AAA,IAC5D,oBAAoB,CAAC,UACnBC,oBAAyB,UAAU,EAAE,KAAK;AAAA,IAC5C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA2B;AAClD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAGO,IAAMC,iBAEK,2DAAiBA,cAAmB;AAE/C,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAE1D,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAElD,IAAMC,cAEK,2DAAiBA,WAAgB;AAE5C,IAAMC,iBAEK,2DAAiBA,cAAmB;AAE/C,IAAMC,gCAGK,2DAAiBA,6BAAkC;AAE9D,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMR,iBAEK,2DAAiB,mBAAmB;","names":["checkEligibility","checkEligibilityByCredential","countArrivals","createArrival","createArrivalByCredential","getArrival","overrideArrivalAsGranted","queryArrivals","import_timestamp","import_rest_modules","payload","import_image","import_transform_paths","TRANSFORM_PATHS_0","TRANSFORM_PATHS_1","TRANSFORM_PATHS_2","IdentificationMethod","IdentityType","EntryIssue","PlanBenefitType","PlanBenefitIssue","ScheduledEventIssue","Status","SortOrder","WebhookIdentityType","Type","createArrival","sdkTransformError","overrideArrivalAsGranted","checkEligibility","getArrival","queryArrivals","countArrivals","checkEligibilityByCredential","createArrivalByCredential","createArrival","overrideArrivalAsGranted","checkEligibility","getArrival","queryArrivals","typedQueryArrivals","countArrivals","checkEligibilityByCredential","createArrivalByCredential","import_rest_modules","queryArrivals","typedQueryArrivals","createArrival","overrideArrivalAsGranted","checkEligibility","getArrival","countArrivals","checkEligibilityByCredential","createArrivalByCredential"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/arrivals-v1-arrival-arrivals.universal.ts","../../src/arrivals-v1-arrival-arrivals.http.ts","../../src/arrivals-v1-arrival-arrivals.public.ts","../../src/arrivals-v1-arrival-arrivals.context.ts"],"sourcesContent":["export * from './src/arrivals-v1-arrival-arrivals.context.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 ambassadorWixArrivalsV1Arrival from './arrivals-v1-arrival-arrivals.http.js';\n// @ts-ignore\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'arrival.contactDetails.picture' }];\nconst TRANSFORM_PATHS_1 = [{ path: 'contactDetails.picture' }];\nconst TRANSFORM_PATHS_2 = [{ path: 'arrivals.contactDetails.picture' }];\n\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * An arrival is the record of one entry into an area, at one of its entrances: who arrived, where, what the\n * eligibility engine found (`eligibilityDetails`), and whether access was given (`status`). Arrivals are written\n * only by Create Arrival, directly or through Create Arrival By Credential. An arrival changes only when a site user overrides it, which\n * moves a denial to `GRANTED` (Override Arrival as Granted, or a repeat of Create Arrival within 5 seconds that carries\n * `denialOverride`), and when two contacts are merged in CRM, which moves\n * `contactDetails.contactId` to the surviving contact; the snapshot stays as it was; and when the contact's personal data is\n * deleted for privacy, which replaces `contactDetails.firstName`, `contactDetails.lastName` and `overrideReason` with `****`\n * and removes the picture. Otherwise, the person's name and picture are kept as they were when the arrival was written, and a granted arrival keeps what granted the entry. `eligibilityDetails` and\n * `overrideReason` say why a person was not eligible, so they are returned only to callers with the\n * `arrivals:v1:arrival:read_eligibility_details` permission.\n */\nexport interface Arrival extends ArrivalGrantedByOneOf {\n /**\n * The Pricing Plans benefit the entry was taken from: a credit pack or an unlimited plan (`type`). Redeemed in Pricing Plans after the arrival is written, after an override too.\n * @readonly\n */\n planBenefit?: PlanBenefit;\n /**\n * The scheduled event the person was booked into. Nothing is redeemed for one; its attendance is marked in its own product after the arrival is written.\n * @readonly\n */\n scheduledEvent?: ScheduledEvent;\n /**\n * Arrival ID. Returned by Create Arrival; Override Arrival as Granted names it.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number. Moves when a site user overrides a denied arrival (with Override Arrival as Granted, or with a repeat of\n * Create Arrival within 5 seconds that carries `denialOverride`), and when a CRM contact merge\n * moves the arrival to the surviving contact; nothing else changes an arrival.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the arrival was written, right after the person was evaluated at the entrance. For a granted arrival that was not overridden, it is the time the person was let in; for one that a site user overrode afterwards, it is the denial's time, and the override's time is `overriddenDate`; for one let in with `denialOverride` on the Create Arrival call that wrote it, it is the time the arrival was written, a moment after its `overriddenDate`.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the arrival was last updated. Equal to `createdDate` until a site user overrides the arrival or a contact merge moves it. For the time of the override itself, read `overriddenDate`, which a later merge does not move.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Who arrived: the contact, with their name and picture as Contacts held them when the arrival was written. Always present. On Create Arrival only `contactDetails.contactId` is sent; the server fills in the rest. */\n contactDetails?: ContactDetails;\n /**\n * How the arrival came to be, and who created it. Set by the server.\n * @readonly\n */\n source?: ArrivalSource;\n /**\n * The area the person entered and the entrance they came in through, with the area's name and location and the\n * entrance's name as they were at the time of the arrival. On Create Arrival only `area.entranceId` is sent; the\n * server finds the area the entrance belongs to and fills in the rest.\n */\n area?: AreaInfo;\n /**\n * What the engine found, from which `status` was derived: the issues of the entry as a whole, the intake forms the\n * person is missing, and every plan benefit and scheduled event it found for the area, each with its own issue. Set\n * by the server at creation and never changed afterwards: an override keeps it, so its `issues` hold what was overridden. Returned\n * only to callers with the `arrivals:v1:arrival:read_eligibility_details` permission, since it says why a person was\n * not eligible; filtering on `eligibilityDetails.issues` requires the same permission. Every response that carries an\n * arrival leaves it out for other callers, Create Arrival and Create Arrival By Credential included: an app without\n * the permission, such as a reader at an entrance, gets `status` and not the reason.\n * @readonly\n */\n eligibilityDetails?: EligibilityDetails;\n /**\n * Whether access was given. Set by the server: by Create Arrival, from the issues (`GRANTED` despite them when the call carries `denialOverride`), and moved from `DENIED` to `GRANTED` by Override Arrival as Granted. Never sent by a caller.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Why a site user let the person in against the issues, in their own words. Optional; written by Override Arrival as Granted, or from `denialOverride.reason` when Create Arrival let the person in despite a denial, so it can be present only on a `GRANTED` arrival with issues; either way the actor is `overriddenBy`. Free text that may describe the person, so it is personal data: `****` after the contact's personal data is deleted for privacy. It is returned only to callers with the `arrivals:v1:arrival:read_eligibility_details` permission.\n * @maxLength 500\n * @readonly\n */\n overrideReason?: string | null;\n /**\n * Who let the person in against a denial: the caller of Override Arrival as Granted, or of Create Arrival with `denialOverride`. Set by the server; present only on an arrival a site user let in against a denial, absent on every other arrival. Always a Wix user (`wixUserId`), since only site users may override. Who wrote the arrival is `source.createdBy`; the two can differ.\n * @readonly\n */\n overriddenBy?: CommonIdentificationData;\n /**\n * Date and time a site user let the person in against a denial, set once with `overriddenBy`: when Override Arrival as Granted granted the arrival, or the time Create Arrival evaluated the person when it let them in with `denialOverride` on the call that wrote it: a moment before that arrival's `createdDate`, which is stamped when the arrival is written. Set by the server; absent on every arrival no site user overrode. A later contact merge moves `updatedDate` but never this.\n * @readonly\n */\n overriddenDate?: Date | null;\n}\n\n/** @oneof */\nexport interface ArrivalGrantedByOneOf {\n /**\n * The Pricing Plans benefit the entry was taken from: a credit pack or an unlimited plan (`type`). Redeemed in Pricing Plans after the arrival is written, after an override too.\n * @readonly\n */\n planBenefit?: PlanBenefit;\n /**\n * The scheduled event the person was booked into. Nothing is redeemed for one; its attendance is marked in its own product after the arrival is written.\n * @readonly\n */\n scheduledEvent?: ScheduledEvent;\n}\n\n/**\n * The person who arrived: their contact ID, and their name and picture as the Contacts API held them when the\n * arrival was written. The name and picture are a snapshot, for history and live lists without a Contacts\n * read; a later change in Contacts does not update them. A contact merge moves `contactId` to the surviving\n * contact and leaves the snapshot as it was. When the contact's personal data is deleted for privacy, the names that\n * were set become `****` and the picture is removed. Named as Bookings names the same thing on a booking. The name and\n * picture are absent when the contact has none, or when Contacts did not answer (`CONTACTS_UNAVAILABLE` in\n * `eligibilityDetails.issues`).\n */\nexport interface ContactDetails {\n /**\n * ID of the contact who arrived. The only field of `contactDetails` sent when creating an arrival.\n * @format GUID\n */\n contactId?: string;\n /**\n * The contact's first name at the time of the arrival. Set by the server; personal data. `****` after the contact's personal data is deleted for privacy.\n * @maxLength 1000\n * @readonly\n */\n firstName?: string | null;\n /**\n * The contact's last name at the time of the arrival. Set by the server; personal data. `****` after the contact's personal data is deleted for privacy.\n * @maxLength 1000\n * @readonly\n */\n lastName?: string | null;\n /**\n * The contact's profile picture at the time of the arrival, as Contacts held it. Set by the server; personal data. Absent when the contact has none, and absent after the contact's personal data is deleted for privacy.\n * @readonly\n */\n picture?: string;\n}\n\n/** How an arrival came to be, and who created it. Set by the server. */\nexport interface ArrivalSource {\n /** How the person was identified: `BY_TOKEN` when the interaction began with a presented token, `BY_NFC_CARD` when it began with a presented NFC card (both through Create Arrival By Credential), `BY_CONTACT` when the arrival was written by contact ID with nothing presented. Who wrote the arrival (a Wix user, or an app such as a reader at an entrance) is `createdBy`. */\n identifiedBy?: IdentificationMethodWithLiterals;\n /**\n * Who created the arrival, from the call identity: a Wix user (`wixUserId`), such as a site collaborator in a scanner app or an owner on\n * the contact card, or an app (`appId`), such as a reader at an entrance or a partner app. This, not `identifiedBy`, is what tells a Wix user\n * from an app, such as a reader or a partner app. Only `wixUserId` or `appId` is ever set; `anonymousVisitorId` and `memberId` never appear on an arrival,\n * since members and visitors can't create arrivals. Who let the person in against a denial is `overriddenBy`, not this field.\n */\n createdBy?: CommonIdentificationData;\n}\n\n/** How the person was identified when the arrival was written. */\nexport enum IdentificationMethod {\n /** A token was presented at the entrance: a QR code scanned by a site collaborator in a scanner app, or by a reader; `createdBy` says which. The interaction began with Create Arrival By Credential with `token`. */\n BY_TOKEN = 'BY_TOKEN',\n /** Written by contact ID with nothing presented (from the contact card in the dashboard, or by an app), even when the contact holds a credential. */\n BY_CONTACT = 'BY_CONTACT',\n /** An NFC card, fob or wristband was presented at the entrance, read by a reader paired to it. The interaction began with Create Arrival By Credential with an `identifier` of type `NFC_CARD`. */\n BY_NFC_CARD = 'BY_NFC_CARD',\n}\n\n/** @enumType */\nexport type IdentificationMethodWithLiterals =\n | IdentificationMethod\n | 'BY_TOKEN'\n | 'BY_CONTACT'\n | 'BY_NFC_CARD';\n\n/** Decomposed copy of `wix.common.IdentificationData` (protodep): the identity behind a call, as one of four IDs. */\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor who hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor who has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /**\n * @internal\n * @readonly\n */\n identityType?: IdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor who hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor who has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum IdentityType {\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 IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\n/** The area an arrival was recorded in and the entrance it was recorded at, as they were at that moment. */\nexport interface AreaInfo {\n /**\n * ID of the area. Set by the server: the area the entrance belongs to.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the business location the area belonged to at the time of the arrival, from the Locations API.\n * Kept on the record so history survives an area moving to another location.\n * @format GUID\n * @readonly\n */\n locationId?: string;\n /**\n * Name of the area at the time of the arrival, kept on the record so history still reads right after the area is renamed.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n name?: string;\n /**\n * ID of the entrance the person came in through, one of an area's `entrances[].id`. The one field of `area` sent when creating an arrival.\n * @format GUID\n */\n entranceId?: string;\n /**\n * Name of the entrance at the time of the arrival, kept on the record so history still reads right after the entrance is renamed or removed.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n entranceName?: string;\n}\n\n/**\n * What the eligibility engine found for a person in an area, from which the status is derived: the issues of the\n * entry as a whole, the intake forms the person is missing, and every plan benefit and scheduled event it found, each\n * with its own issue. Each issue is in one place: an issue of the entry is in `issues`, an issue of a benefit or an\n * event is on that item. Check Eligibility returns it in its response, and Create Arrival records it on the\n * arrival, so the arrival keeps exactly what the check found. On the arrival it is kept behind the\n * `arrivals:v1:arrival:read_eligibility_details` permission, since it says why a person was not eligible.\n */\nexport interface EligibilityDetails {\n /**\n * The issues of the entry as a whole. The issues decide the status the evaluation gives: `GRANTED` when there are none, or only\n * `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. When a site user lets the person in\n * (afterwards with Override Arrival as Granted, or beforehand with `denialOverride` on Create Arrival), the status is\n * `GRANTED` whatever the issues, and the issues show what was overridden. On an arrival, `PRICING_PLANS_UNAVAILABLE`\n * and `CONTACTS_UNAVAILABLE` are found only that way, with `denialOverride`, since otherwise Create Arrival fails with\n * `UNAVAILABLE`; Check Eligibility reports them without failing. A `DENIED` arrival always has at\n * least one. Empty when nothing stood in the way.\n * @maxSize 3\n */\n issues?: EntryIssueWithLiterals[];\n /**\n * Every intake form the area's policy requires and the person has no valid submission for, with its `blocksEntry`, so an app can point site collaborators to the right form. Empty unless `issues` contains `INTAKE_FORM_MISSING`.\n * @maxSize 20\n */\n missingIntakeForms?: MissingIntakeForm[];\n /**\n * The person's Pricing Plans benefits allowed into this area, each a `planBenefit` with its own `issues`: empty\n * means the benefit admits. Listed on a `DENIED` arrival too, admitting ones included, so an override can take one\n * later. The grant picks one by the rule on the arrival's `planBenefit` and records it there. Listed in the order of\n * that rule, so the first is the one a grant takes; at most 20 are listed, the first 20 in that order. Empty when the\n * person holds no benefit for this area, and when the status of the contact's site member (`memberInfo.status` in\n * Contacts) is `BLOCKED`, `DELETED` or `OFFLINE`, since such a member holds no plans here.\n * @maxSize 20\n */\n planBenefits?: PlanBenefitEligibility[];\n /**\n * The scheduled events the person is booked on at this area's location inside the area's entry window, each with\n * its own `issues`: empty means the event admits. Listed on a `DENIED` arrival too, admitting ones included, so an\n * override can take one later. Check Eligibility with a `scheduledEventSearchWindow` also lists\n * the events that start inside that window, with `OUTSIDE_ENTRY_WINDOW`; Create Arrival never does. At most 20 are\n * listed: the events inside the area's window first, then the others by start time, earliest first. Always empty\n * while the area's `scheduledEventsPolicy.entryGrantingAppIds` is empty.\n * @maxSize 20\n */\n scheduledEvents?: ScheduledEventEligibility[];\n}\n\n/**\n * An issue of the entry as a whole. The issues decide the status the evaluation gives: `GRANTED` when there are none, or only\n * `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. When a site user lets the person in\n * (afterwards with Override Arrival as Granted, or beforehand with `denialOverride` on Create Arrival), the status is\n * `GRANTED` whatever the issues, and the issues show what was overridden. On an arrival, `PRICING_PLANS_UNAVAILABLE`\n * and `CONTACTS_UNAVAILABLE` are found only that way, with `denialOverride`, since otherwise Create Arrival fails with\n * `UNAVAILABLE`; Check Eligibility reports them without failing. Why a single benefit or event does not admit is on\n * that item (`PlanBenefitIssue`, `ScheduledEventIssue`), not here.\n */\nexport enum EntryIssue {\n /**\n * No grant the person holds admits them into this area now. A grant is what can grant entry: a plan benefit\n * (`planBenefits`) or a scheduled event they are booked on (`scheduledEvents`), the same two kinds an arrival\n * records in `planBenefit` or `scheduledEvent` once granted. Either nothing was found (`planBenefits` and\n * `scheduledEvents` are empty), or everything found has an issue of its own, which says why. A contact whose site\n * member's status (`memberInfo.status` in Contacts) is `BLOCKED`, `DELETED` or `OFFLINE` holds no plans here, so it\n * finds none. Also reported when a\n * credit pack would admit but the person is booked on an event here and now that still waits for approval: no\n * credit is spent while the booking may be approved moments later (the event carries `PENDING_CONFIRMATION`).\n * Declines at creation; site collaborators override, or sell a plan, approve the booking or renew the plan and create a new\n * arrival. Not reported when Pricing Plans or Contacts did not answer: `PRICING_PLANS_UNAVAILABLE` or\n * `CONTACTS_UNAVAILABLE` takes its place.\n */\n NO_ELIGIBLE_GRANT = 'NO_ELIGIBLE_GRANT',\n /** The person has no valid submission for at least one intake form the area's policy requires: never submitted, expired, canceled or pending approval. The forms are listed in `missingIntakeForms`. Declines at creation when a missing form has `blocksEntry`; otherwise grants, with the issue kept on the arrival so site collaborators can chase the paperwork. */\n INTAKE_FORM_MISSING = 'INTAKE_FORM_MISSING',\n /** The person was already granted entry into this area within the last 15 minutes and a credit would be spent again: a retried scan, a re-entry, or a guest on the same credential. The earlier entry counts whatever granted it: a credit, an unlimited plan, a scheduled event or an override, and the 15 minutes count from that arrival's `createdDate`, or for an overridden arrival from its `overriddenDate`, when a site user let the person in. Declines at creation; the override spends a credit. Reported only when this entry would spend a credit: not when an unlimited plan or a scheduled event admits now. */\n RECENT_ENTRY = 'RECENT_ENTRY',\n /** Pricing Plans didn't answer (it couldn't be reached, didn't answer in time, or failed on its side; any of these is an outage), so plan benefits were not checked. On an arrival, only on one let in by Create Arrival with `denialOverride`, since without a site user's decision the call fails with `UNAVAILABLE` instead and no denied arrival is written; Check Eligibility reports it without failing; Override Arrival as Granted does not call Pricing Plans. `planBenefits` is empty, no `planBenefit` is recorded and nothing is redeemed; scheduled events and intake forms are still evaluated. Reported instead of `NO_ELIGIBLE_GRANT`, never with it: plan benefits were not checked, so the person may hold one that admits. An issue a scheduled event has of its own stays on that event in `eligibilityDetails`. */\n PRICING_PLANS_UNAVAILABLE = 'PRICING_PLANS_UNAVAILABLE',\n /** Contacts didn't answer (it couldn't be reached, didn't answer in time, or failed on its side; any of these is an outage), so the person's member is unknown and plan benefits were not checked. On an arrival, only on one let in by Create Arrival with `denialOverride`, since without a site user's decision the call fails with `UNAVAILABLE` instead and no denied arrival is written; Check Eligibility reports it without failing. `planBenefits` is empty, no `planBenefit` is recorded, nothing is redeemed, and `contactDetails` has the contact ID alone, with no name or picture; scheduled events, read by contact, are still evaluated. Reported instead of `NO_ELIGIBLE_GRANT` and `PRICING_PLANS_UNAVAILABLE`, never with them: Pricing Plans is not read without the member. */\n CONTACTS_UNAVAILABLE = 'CONTACTS_UNAVAILABLE',\n}\n\n/** @enumType */\nexport type EntryIssueWithLiterals =\n | EntryIssue\n | 'NO_ELIGIBLE_GRANT'\n | 'INTAKE_FORM_MISSING'\n | 'RECENT_ENTRY'\n | 'PRICING_PLANS_UNAVAILABLE'\n | 'CONTACTS_UNAVAILABLE';\n\n/** An intake form the area's policy requires that the person has no valid submission for. */\nexport interface MissingIntakeForm {\n /**\n * ID of the intake form, from the Intake Forms API, as listed in the area's policy.\n * @format GUID\n */\n formId?: string;\n /** Whether this missing form blocks entry, as configured on the area's policy (`policy.intakeForms[].blocksEntry` in the Areas API). `false`: the arrival is granted and site collaborators are warned. `true`: the arrival is denied until the form is submitted; site collaborators can still override. */\n blocksEntry?: boolean;\n}\n\n/**\n * A Pricing Plans benefit the engine found for the person in this area, with whether it admits: the benefit itself,\n * of the same type as the arrival's `planBenefit`, and its `issues`.\n */\nexport interface PlanBenefitEligibility {\n /**\n * The benefit found, as `planBenefit` records it on an arrival.\n * @readonly\n */\n planBenefit?: PlanBenefit;\n /**\n * Why the benefit does not admit, in Pricing Plans' own words where it has one. Empty: the benefit admits. At most one is reported, since Pricing Plans gives one reason.\n * @maxSize 1\n * @readonly\n */\n issues?: PlanBenefitIssueWithLiterals[];\n}\n\n/**\n * A Pricing Plans benefit: the plan or credit pack an entry is taken from, identified as Pricing Plans identifies\n * it: by the pool the member holds (`poolId`) and the benefit's key inside that pool (`benefitKey`). Arrivals\n * never interprets either: it passes the pair back to Pricing Plans to redeem. No balance is reported here:\n * credits left are read from Pricing Plans, by the member in their app and by the owner in the Pricing Plans\n * dashboard.\n */\nexport interface PlanBenefit {\n /**\n * ID of the Pricing Plans benefit pool the member holds: the plan or pack they bought. Read-only to Arrivals.\n * @format GUID\n * @readonly\n */\n poolId?: string;\n /**\n * Key of the benefit inside the pool, as Pricing Plans defines it; a pool can hold several benefits. Read-only to Arrivals.\n * @minLength 1\n * @maxLength 64\n * @readonly\n */\n benefitKey?: string;\n /**\n * Name to display, in the site's language (\"10-Class Pack\", \"Monthly Unlimited\"). The owner's own wording; not translated.\n * @maxLength 200\n * @readonly\n */\n displayName?: string;\n /**\n * Whether the benefit counts entries: a credit pack spends a credit per entry, an unlimited plan counts nothing. Set by the server from the benefit's configuration in Pricing Plans.\n * @readonly\n */\n type?: PlanBenefitTypeWithLiterals;\n}\n\n/** Kind of Pricing Plans benefit, by whether entries are counted: the one axis Pricing Plans itself splits on. */\nexport enum PlanBenefitType {\n /** A credit pack: the benefit carries a credit configuration in Pricing Plans, and redeeming an entry spends one credit from its balance (\"10-Class Pack\"). */\n CREDIT = 'CREDIT',\n /** An unlimited plan: no credit configuration, nothing is counted (\"Monthly Unlimited\"). The plan's own usage policy (a fixed interval, a rate limit such as three entries a week) may still apply, and Pricing Plans enforces it. Whether the plan is paid once or by subscription is not what this says. */\n UNLIMITED = 'UNLIMITED',\n}\n\n/** @enumType */\nexport type PlanBenefitTypeWithLiterals =\n | PlanBenefitType\n | 'CREDIT'\n | 'UNLIMITED';\n\n/** Why a Pricing Plans benefit does not admit. Where Pricing Plans has a word for a finding, the value uses it. */\nexport enum PlanBenefitIssue {\n /** The benefit's plan isn't active at the time of the entry (ended, canceled, paused, not started yet, or for a moment while it's being renewed), as Pricing Plans reports. Site collaborators override, or renew the plan and create a new arrival. */\n PLAN_NOT_ACTIVE = 'PLAN_NOT_ACTIVE',\n /** A credit pack with no credits left, as Pricing Plans reports. Site collaborators override, or sell credits and create a new arrival. */\n NOT_ENOUGH_BALANCE = 'NOT_ENOUGH_BALANCE',\n /** The plan's usage policy does not allow entry at this hour or on this day, or another rule of the plan refuses entry, as Pricing Plans reports. A used-up limit on its own is `USAGE_LIMIT_REACHED`. */\n OUTSIDE_ACCESS_HOURS = 'OUTSIDE_ACCESS_HOURS',\n /** The plan's usage policy limits how often it can be used, such as three entries a week, and that limit is used up for the current period, as Pricing Plans reports. Site collaborators override, or the client comes back in the next period. */\n USAGE_LIMIT_REACHED = 'USAGE_LIMIT_REACHED',\n}\n\n/** @enumType */\nexport type PlanBenefitIssueWithLiterals =\n | PlanBenefitIssue\n | 'PLAN_NOT_ACTIVE'\n | 'NOT_ENOUGH_BALANCE'\n | 'OUTSIDE_ACCESS_HOURS'\n | 'USAGE_LIMIT_REACHED';\n\n/**\n * A scheduled event the engine found for the person at this area, with whether it admits: the event itself, of\n * the same type as the arrival's `scheduledEvent`, and its `issues`.\n */\nexport interface ScheduledEventEligibility {\n /**\n * The event found, as `scheduledEvent` records it on an arrival.\n * @readonly\n */\n scheduledEvent?: ScheduledEvent;\n /**\n * Why the event does not admit. Empty: the event admits. At most one is reported: when both apply, `OUTSIDE_ENTRY_WINDOW` wins over `PENDING_CONFIRMATION`, since approving the booking would not help outside the window.\n * @maxSize 1\n * @readonly\n */\n issues?: ScheduledEventIssueWithLiterals[];\n}\n\n/** A scheduled event an entry is taken on: the session the person was booked into. Nothing is redeemed for one. */\nexport interface ScheduledEvent {\n /**\n * ID of the scheduled event, as the provider in `appId` knows it. For an event from the Wix Calendar, the ID in the Wix Calendar Events API.\n * @minLength 1\n * @maxLength 250\n * @readonly\n */\n eventId?: string;\n /**\n * Name to display, in the site's language (\"Tue 18:00 Reformer\"). Not translated.\n * @maxLength 200\n * @readonly\n */\n displayName?: string;\n /**\n * App ID of the provider the event came from: the app that owns it on the Wix Calendar, such as Wix Bookings.\n * Scheduled events are read from the Wix Calendar today; a provider of scheduled events of its own may later\n * supply them, and is then identified here.\n * @format GUID\n * @readonly\n */\n appId?: string;\n}\n\n/** Why a scheduled event does not admit. At most one per event; `OUTSIDE_ENTRY_WINDOW` wins over `PENDING_CONFIRMATION`. */\nexport enum ScheduledEventIssue {\n /** The person is booked on the event here and now, but the booking still waits for the business's approval. Only an appointment can be pending. A credit pack is not spent instead (`NO_ELIGIBLE_GRANT`), since the booking may be approved moments later; an unlimited plan allowed into the area still admits. Site collaborators approve the booking and create a new arrival, or override. */\n PENDING_CONFIRMATION = 'PENDING_CONFIRMATION',\n /** The person is booked on the event, but now is outside the area's entry window for it (`policy.scheduledEventsPolicy.entryWindow` in the Areas API). Only on an event listed by a Check Eligibility with `scheduledEventSearchWindow`; never on an arrival, since Create Arrival does not find events outside the area's window. */\n OUTSIDE_ENTRY_WINDOW = 'OUTSIDE_ENTRY_WINDOW',\n}\n\n/** @enumType */\nexport type ScheduledEventIssueWithLiterals =\n | ScheduledEventIssue\n | 'PENDING_CONFIRMATION'\n | 'OUTSIDE_ENTRY_WINDOW';\n\n/** Whether access was given. */\nexport enum Status {\n /** Access was given: the person entered. Either the engine found no issue that blocks entry, or a site user overrode a denial, afterwards with Override Arrival as Granted or on Create Arrival with `denialOverride`; `eligibilityDetails.issues` then holds what was overridden. */\n GRANTED = 'GRANTED',\n /** Access was not given: the engine found an issue that declines (see `EntryIssue`), and no site user has overridden it. A site user may still override with Override Arrival as Granted, which moves the status to `GRANTED`. */\n DENIED = 'DENIED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'GRANTED' | 'DENIED';\n\nexport interface CreateArrivalRequest {\n /**\n * Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field\n * (the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, what granted the entry) is set by the server.\n */\n arrival: Arrival;\n /**\n * A site user's decision to let the person in even if the evaluation denies them, made before the call. Its presence is the decision: send it, even empty (`{}`), to let the person in on a denial; omit it for no override. When the\n * evaluation grants, it is ignored; when it denies, the arrival is written `GRANTED` with `overrideReason` set to\n * `reason`. Only a site user may send it (`OVERRIDE_NOT_ALLOWED` otherwise). On a\n * repeat within 5 seconds onto an existing `DENIED` arrival, it grants that arrival as Override Arrival as Granted\n * does; on an existing `GRANTED` one it is ignored.\n */\n denialOverride?: DenialOverride;\n}\n\n/** A site user's decision, made before the call, to let the person in even if the evaluation denies them. Its presence is the decision: send it, even empty (`{}`), to let the person in on a denial; omit it for no override. */\nexport interface DenialOverride {\n /**\n * Why a site user let the person in, in their own words. Optional; stored as the arrival's `overrideReason` when the evaluation denies. Free text that may describe the person, so it is personal data.\n * @maxLength 500\n */\n reason?: string | null;\n}\n\nexport interface CreateArrivalResponse {\n /** The arrival as written, with the status its issues imply, or `GRANTED` despite them when `denialOverride` let the person in. On a repeat within 5 seconds, the existing arrival: unchanged, or now `GRANTED` when the repeat carried `denialOverride` onto a `DENIED` one. */\n arrival?: Arrival;\n}\n\nexport interface OverrideArrivalAsGrantedRequest {\n /**\n * ID of the denied arrival to let the person in on.\n * @format GUID\n */\n arrivalId: string;\n /**\n * Why a site user let the person in, in their own words. Optional; stored as the arrival's `overrideReason`. Free text that may describe the person, so it is personal data.\n * @maxLength 500\n */\n overrideReason?: string | null;\n}\n\nexport interface OverrideArrivalAsGrantedResponse {\n /** The arrival, now `GRANTED`. Unchanged when it already was. */\n arrival?: Arrival;\n}\n\nexport interface CheckEligibilityRequest {\n /**\n * ID of the contact whose eligibility to check.\n * @format GUID\n */\n contactId: string;\n /**\n * ID of the entrance to check eligibility at, one of an area's entrances. Eligibility is checked for the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n /**\n * A range of time to look for the person's scheduled events in, besides the area's\n * `policy.scheduledEventsPolicy.entryWindow`, for a what-if such as \"which of this client's classes this evening could\n * they get in on?\". Both dates are required when it is set. It changes only which scheduled events are listed:\n * those inside the area's window now, and those that start within this range. An event found only in this range\n * doesn't admit (entry into the area follows the area's window) and is listed with `OUTSIDE_ENTRY_WINDOW`.\n * Everything else is evaluated with the area's window, so `status` and `eligibilityDetails.issues`\n * still say what Create Arrival would find. Not set: only the\n * area's window is used. Always validated (`SEARCH_WINDOW_INVALID`), but finds no events while the area's\n * `scheduledEventsPolicy.entryGrantingAppIds` is empty.\n */\n scheduledEventSearchWindow?: ScheduledEventSearchWindow;\n}\n\n/**\n * A range of time in which Check Eligibility looks for scheduled events: an event is found when it starts at or\n * after `startDate` and before `endDate`. It decides only which events are found, not when entry opens: entry\n * follows the area's `policy.scheduledEventsPolicy.entryWindow`. At most a year is searched: an event that starts\n * 365 days or more after `startDate` is not found, even when it starts before `endDate`. `endDate` must be after\n * `startDate`, otherwise the call fails with `SEARCH_WINDOW_INVALID`. At most 20 scheduled events are returned (see\n * `eligibilityDetails.scheduledEvents` in the response).\n */\nexport interface ScheduledEventSearchWindow {\n /** Start of the range: events that start at or after it are found. */\n startDate?: Date | null;\n /** End of the range: events that start before it are found, if they start less than 365 days after `startDate`. Must be after `startDate`. */\n endDate?: Date | null;\n}\n\n/**\n * What the engine would find for the contact in this area, and the status Create Arrival would\n * derive from it. Nothing was recorded. It is the finding, not the outcome; what happened is on the arrival, once one\n * is written. No balance is reported: credits left are read from Pricing Plans. Check Eligibility By Credential\n * returns the same fields.\n */\nexport interface CheckEligibilityResponse {\n /** The contact given: their contact ID, name and picture as Contacts holds them now. When Contacts did not answer (`CONTACTS_UNAVAILABLE` in `eligibilityDetails.issues`), only `contactId` is set. When creating an arrival, send `arrival.contactDetails.contactId`; the server fills in the rest. */\n contactDetails?: ContactDetails;\n /** The status Create Arrival would write now, derived from `eligibilityDetails.issues`: `GRANTED` when there are none, or only `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. Also `DENIED` when Pricing Plans or Contacts did not answer and nothing else admits the contact (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE` in `eligibilityDetails.issues`): the engine could not decide, so show that the check could not be completed, with an option to try again; a site user who decides to let the person in anyway calls Create Arrival with `denialOverride`. */\n status?: StatusWithLiterals;\n /**\n * What the engine found, the same message Create Arrival records on the arrival: the entry's `issues`, the\n * `missingIntakeForms`, and every plan benefit and scheduled event found, each with its own `issues`. Each issue is\n * in one place. Rendered by your app in its own language. With `scheduledEventSearchWindow`, `scheduledEvents`\n * also lists the events found only in that window, with `OUTSIDE_ENTRY_WINDOW`; Create Arrival never records those.\n */\n eligibilityDetails?: EligibilityDetails;\n /**\n * Present when `eligibilityDetails.issues` contains `RECENT_ENTRY`: the earlier arrival that granted this person this\n * area within the last 15 minutes, for an app to tell site collaborators \"let in 4 minutes ago\".\n */\n recentArrival?: RecentArrival;\n}\n\n/** An earlier granted arrival of the same person into the same area, created or overridden within the last 15 minutes. */\nexport interface RecentArrival {\n /**\n * ID of that arrival.\n * @format GUID\n */\n arrivalId?: string;\n /** That arrival's `createdDate`, for an app to tell site collaborators \"let in 4 minutes ago\". For an arrival overridden after it was written, it is the time of the denial; for every overridden arrival the 15 minutes count from its `overriddenDate`: call Get Arrival to show when the person was let in. What granted it is on that arrival: call Get Arrival with `arrivalId` and read its `planBenefit` or `scheduledEvent`. */\n _createdDate?: Date | null;\n}\n\nexport interface GetArrivalRequest {\n /**\n * ID of the arrival to retrieve.\n * @format GUID\n */\n arrivalId: string;\n}\n\nexport interface GetArrivalResponse {\n /** Requested arrival. */\n arrival?: Arrival;\n}\n\nexport interface QueryArrivalsRequest {\n /** WQL expression. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryArrivalsResponse {\n /** List of arrivals. */\n arrivals?: Arrival[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountArrivalsRequest {\n /** Filter, in the same form as the `filter` of a Query Arrivals request. Empty counts all arrivals. */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountArrivalsResponse {\n /** Number of arrivals matching the filter. */\n count?: number;\n}\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 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 CheckEligibilityByCredentialRequest\n extends CheckEligibilityByCredentialRequestCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n /**\n * ID of the entrance the credential is presented at, one of an area's entrances. Eligibility is checked for the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n}\n\n/** @oneof */\nexport interface CheckEligibilityByCredentialRequestCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n}\n\n/**\n * An identifier presented at an entrance, as a reader reports it: the same `type` and `value` as a credential\n * identifier in the Contact Credentials API (`contactCredential.identifiers`).\n */\nexport interface PresentedIdentifier {\n /** Kind of identifier. Further kinds, such as a fingerprint, may be added later. */\n type?: TypeWithLiterals;\n /**\n * The value the reader reports: for `NFC_CARD`, the chip's serial number. Case-sensitive; compared as sent.\n * @maxLength 64\n */\n value?: string;\n}\n\n/** Kind of identifier. */\nexport enum Type {\n /** An NFC card, fob or wristband. `value` is the serial number of its chip, exactly as the reader reports it. */\n NFC_CARD = 'NFC_CARD',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'NFC_CARD';\n\n/**\n * What the engine would find for the credential's holder in this area, and the status Create\n * Arrival would derive from it. Nothing was recorded. The same fields Check Eligibility returns, always against the\n * area's own entry window.\n */\nexport interface CheckEligibilityByCredentialResponse {\n /** The holder of the presented credential: their contact ID, name and picture as Contacts holds them now. When Contacts did not answer (`CONTACTS_UNAVAILABLE` in `eligibilityDetails.issues`), only `contactId` is set. */\n contactDetails?: ContactDetails;\n /** The status Create Arrival would write now, derived from `eligibilityDetails.issues`: `GRANTED` when there are none, or only `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. Also `DENIED` when Pricing Plans or Contacts did not answer and nothing else admits the contact (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE` in `eligibilityDetails.issues`): the engine could not decide, so show that the check could not be completed, with an option to try again; a site user who decides to let the person in anyway calls Create Arrival by contact ID with `denialOverride`, since Create Arrival By Credential carries no override. */\n status?: StatusWithLiterals;\n /**\n * What the engine found, the same message Create Arrival records on the arrival: the entry's `issues`, the\n * `missingIntakeForms`, and every plan benefit and scheduled event found, each with its own `issues`. Each issue is\n * in one place. Rendered by your app in its own language. `scheduledEvents` lists only the events inside the\n * area's entry window, so `OUTSIDE_ENTRY_WINDOW` never appears here.\n */\n eligibilityDetails?: EligibilityDetails;\n /**\n * Present when `eligibilityDetails.issues` contains `RECENT_ENTRY`: the earlier arrival that granted this person this\n * area within the last 15 minutes, for an app to tell site collaborators \"let in 4 minutes ago\".\n */\n recentArrival?: RecentArrival;\n}\n\nexport interface CreateArrivalByCredentialRequest\n extends CreateArrivalByCredentialRequestCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n /**\n * ID of the entrance the credential is presented at, one of an area's entrances. The arrival is recorded in the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n}\n\n/** @oneof */\nexport interface CreateArrivalByCredentialRequestCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n}\n\nexport interface CreateArrivalByCredentialResponse {\n /**\n * The created arrival, with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD`. `GRANTED`: the person is in. `DENIED`: show site collaborators why from its `eligibilityDetails`; letting\n * the person in anyway is Override Arrival as Granted with this arrival's ID.\n */\n arrival?: Arrival;\n}\n\n/** @docsIgnore */\nexport type CreateArrivalApplicationErrors =\n | {\n code?: 'AREA_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ENTRANCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'OVERRIDE_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRICING_PLANS_UNAVAILABLE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACTS_UNAVAILABLE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type OverrideArrivalAsGrantedApplicationErrors =\n | {\n code?: 'ARRIVAL_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'OVERRIDE_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CheckEligibilityApplicationErrors =\n | {\n code?: 'ENTRANCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SEARCH_WINDOW_INVALID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'AREA_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type QueryArrivalsApplicationErrors = {\n code?: 'CREATED_DATE_LOWER_BOUND_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CountArrivalsApplicationErrors =\n | {\n code?: 'CREATED_DATE_LOWER_BOUND_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TOO_MANY_TO_COUNT';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CheckEligibilityByCredentialApplicationErrors =\n | {\n code?: 'BAD_SIGNATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TOKEN_REVOKED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'IDENTIFIER_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'AREA_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ENTRANCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateArrivalByCredentialApplicationErrors =\n | {\n code?: 'BAD_SIGNATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TOKEN_REVOKED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'IDENTIFIER_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'AREA_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ENTRANCE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRICING_PLANS_UNAVAILABLE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACTS_UNAVAILABLE';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Evaluates a person for an area and writes one arrival, whatever it finds about them. For the flows that call\n * it (scans, the dashboard, readers), see About the Arrivals API.\n *\n * Only `arrival.contactDetails.contactId`, `arrival.area.entranceId` and `denialOverride` are read; the\n * area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture,\n * `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, and what granted the entry. `status` follows from the entry's issues:\n * - none, or only `INTAKE_FORM_MISSING` for forms that do not block entry: **`GRANTED`**, with `planBenefit` or\n * `scheduledEvent` naming what admitted the person; the server picks it by the rule on `planBenefit`: an admitting item, free before finite.\n * - `NO_ELIGIBLE_GRANT`, `RECENT_ENTRY`, or `INTAKE_FORM_MISSING` for a form that blocks entry: **`DENIED`**.\n * Nothing is redeemed; a site user may let the person in with Override Arrival as Granted.\n *\n * *Override at creation.** With `denialOverride`, a denial is written `GRANTED` at once, with its issues and\n * `overrideReason`; Arrival Created fires with that `GRANTED` arrival. Only a site user may send it,\n * a Wix user acting through an app (a call that carries the user's identity beside the app's) included; any other\n * caller fails with `OVERRIDE_NOT_ALLOWED` and nothing is recorded.\n *\n * *Redemption.** A granted benefit is redeemed asynchronously after the response, with the arrival ID as the\n * idempotency key: usually within seconds, and retried for several minutes while Pricing Plans is unavailable. If\n * Pricing Plans refuses the redemption, for example a credit pack with no credits left after an override, the\n * arrival stays `GRANTED` and nothing is recorded on it; the balance is read from Pricing Plans.\n *\n * *Repeats within 5 seconds.** A call for the same contact and entrance by the same caller within 5 seconds of an\n * arrival returns that arrival unchanged. The caller is the Wix user when the call carries one, through an app\n * included, so two site collaborators on one scanner app are two callers; otherwise it is the app. A repeat that\n * carries `denialOverride` onto a `DENIED` arrival is the exception: the override is applied to that arrival exactly\n * as Override Arrival as Granted applies it, from its stored evaluation, and Arrival Updated fires instead of\n * Arrival Created. On a `GRANTED` arrival `denialOverride` is ignored. See About the Arrivals API for\n * retries.\n *\n * *Errors and outages.** `CONTACT_NOT_FOUND` and `ENTRANCE_NOT_FOUND` record nothing. When Pricing Plans or\n * Contacts can't be reached and nothing else admits the person, the call fails with `UNAVAILABLE`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`) and records nothing, unless it carries `denialOverride`:\n * a site user has decided, so the arrival is written `GRANTED` with that outage in its issues, no plan benefit, and\n * nothing redeemed. Without Contacts the arrival also has no name or picture.\n * @param arrival - Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field\n * (the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, what granted the entry) is set by the server.\n * @internal\n * @documentationMaturity preview\n * @requiredField arrival\n * @requiredField arrival.area\n * @requiredField arrival.area.entranceId\n * @requiredField arrival.contactDetails\n * @requiredField arrival.contactDetails.contactId\n * @permissionId arrivals:v1:arrival:create_arrival\n * @returns The arrival as written, with the status its issues imply, or `GRANTED` despite them when `denialOverride` let the person in. On a repeat within 5 seconds, the existing arrival: unchanged, or now `GRANTED` when the repeat carried `denialOverride` onto a `DENIED` one.\n * @fqn wix.arrivals.v1.ArrivalsService.CreateArrival\n */\nexport async function createArrival(\n arrival: NonNullablePaths<\n Arrival,\n `area` | `area.entranceId` | `contactDetails` | `contactDetails.contactId`,\n 1\n >,\n options?: CreateArrivalOptions\n): Promise<\n NonNullablePaths<\n Arrival,\n | `planBenefit.poolId`\n | `planBenefit.benefitKey`\n | `planBenefit.displayName`\n | `planBenefit.type`\n | `scheduledEvent.eventId`\n | `scheduledEvent.displayName`\n | `scheduledEvent.appId`\n | `contactDetails.contactId`\n | `source.identifiedBy`\n | `source.createdBy.anonymousVisitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.wixUserId`\n | `source.createdBy.appId`\n | `area._id`\n | `area.locationId`\n | `area.name`\n | `area.entranceId`\n | `area.entranceName`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.scheduledEvents`\n | `status`,\n 3\n > & {\n __applicationErrorsType?: CreateArrivalApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n arrival: arrival,\n denialOverride: options?.denialOverride,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: TRANSFORM_PATHS_0,\n },\n ]\n );\n\n const reqOpts = ambassadorWixArrivalsV1Arrival.createArrival(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )?.arrival!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arrival: '$[0]',\n denialOverride: '$[1].denialOverride',\n },\n singleArgumentUnchanged: false,\n },\n ['arrival', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateArrivalOptions {\n /**\n * A site user's decision to let the person in even if the evaluation denies them, made before the call. Its presence is the decision: send it, even empty (`{}`), to let the person in on a denial; omit it for no override. When the\n * evaluation grants, it is ignored; when it denies, the arrival is written `GRANTED` with `overrideReason` set to\n * `reason`. Only a site user may send it (`OVERRIDE_NOT_ALLOWED` otherwise). On a\n * repeat within 5 seconds onto an existing `DENIED` arrival, it grants that arrival as Override Arrival as Granted\n * does; on an existing `GRANTED` one it is ignored.\n */\n denialOverride?: DenialOverride;\n}\n\n/**\n * Grants a `DENIED` arrival as a site user's override, from the evaluation it was denied with, and redeems the plan\n * benefit that evaluation found, once, after the response. Not a record correction: calling it can spend a\n * Pricing Plans credit. It is a site user's decision and does not check `RECENT_ENTRY`: it spends the picked credit even when\n * the person was let in a moment ago, for example by a new arrival written at the desk after this denial. Before\n * offering \"Let in\", show the person's recent entry (Check Eligibility's `recentArrival`) and ask the site user to confirm. `overrideReason` holds the site user's own words when they give one. This is the one\n * change an arrival receives through this API.\n *\n * Only a site user may call it, a Wix user acting through an app (a call that carries the user's identity beside the\n * app's) included: a caller that isn't a site user (a reader at an entrance, or an app with no Wix user on the\n * call) fails with `OVERRIDE_NOT_ALLOWED`, checked before the arrival is read, and nothing changes. Any `DENIED`\n * arrival may be overridden, whoever wrote it: a site user may let in a person a reader denied instead of writing a new\n * arrival at the desk, not in addition to it, since each of the two would admit the person. The caller is recorded in\n * `overriddenBy`; who wrote the arrival stays in `source.createdBy`. The person is not evaluated again: `eligibilityDetails` stays as it\n * was written at the denial, so its `issues` hold what was overridden, and the benefit or scheduled event that\n * evaluation found, if any, is recorded in `planBenefit` or `scheduledEvent`, picked by the rule on `planBenefit`: one that\n * admitted on its own first (the person was denied only for a blocking intake form or `RECENT_ENTRY`), free before\n * finite. It's the same record `denialOverride`\n * on Create Arrival leaves. Idempotent: on a `DENIED` arrival the status turns `GRANTED`, `revision` moves, and\n * Arrival Updated fires; an arrival that is already `GRANTED` is returned as it is (its\n * `overrideReason` is not changed) and nothing is redeemed twice. An `arrivalId` that names no arrival fails with `ARRIVAL_NOT_FOUND`. To decide before the\n * evaluation, send `denialOverride` on Create Arrival instead; a repeat of that Create Arrival within 5 seconds\n * with `denialOverride` applies this same override to the denied arrival.\n * @param arrivalId - ID of the denied arrival to let the person in on.\n * @internal\n * @documentationMaturity preview\n * @requiredField arrivalId\n * @permissionId arrivals:v1:arrival:override_arrival_as_granted\n * @fqn wix.arrivals.v1.ArrivalsService.OverrideArrivalAsGranted\n */\nexport async function overrideArrivalAsGranted(\n arrivalId: string,\n options?: OverrideArrivalAsGrantedOptions\n): Promise<\n NonNullablePaths<\n OverrideArrivalAsGrantedResponse,\n | `arrival.planBenefit.poolId`\n | `arrival.planBenefit.benefitKey`\n | `arrival.planBenefit.displayName`\n | `arrival.planBenefit.type`\n | `arrival.scheduledEvent.eventId`\n | `arrival.scheduledEvent.displayName`\n | `arrival.scheduledEvent.appId`\n | `arrival.contactDetails.contactId`\n | `arrival.source.identifiedBy`\n | `arrival.source.createdBy.anonymousVisitorId`\n | `arrival.source.createdBy.memberId`\n | `arrival.source.createdBy.wixUserId`\n | `arrival.source.createdBy.appId`\n | `arrival.area._id`\n | `arrival.area.locationId`\n | `arrival.area.name`\n | `arrival.area.entranceId`\n | `arrival.area.entranceName`\n | `arrival.eligibilityDetails.issues`\n | `arrival.eligibilityDetails.missingIntakeForms`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `arrival.eligibilityDetails.planBenefits`\n | `arrival.eligibilityDetails.scheduledEvents`\n | `arrival.status`,\n 4\n > & {\n __applicationErrorsType?: OverrideArrivalAsGrantedApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arrivalId: arrivalId,\n overrideReason: options?.overrideReason,\n });\n\n const reqOpts =\n ambassadorWixArrivalsV1Arrival.overrideArrivalAsGranted(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n arrivalId: '$[0]',\n overrideReason: '$[1].overrideReason',\n },\n singleArgumentUnchanged: false,\n },\n ['arrivalId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface OverrideArrivalAsGrantedOptions {\n /**\n * Why a site user let the person in, in their own words. Optional; stored as the arrival's `overrideReason`. Free text that may describe the person, so it is personal data.\n * @maxLength 500\n */\n overrideReason?: string | null;\n}\n\n/**\n * Checks whether a contact would be granted entry at an entrance, into the area it belongs to, without recording\n * or redeeming anything. It takes the same `entranceId` as Create Arrival.\n *\n * The response is `eligibilityDetails` as Create Arrival would record it, with the `status` Create Arrival would\n * derive from it, and the contact's `contactDetails` (name and picture) as Contacts holds them now. With\n * `scheduledEventSearchWindow`, events found only in that window are also listed, with `OUTSIDE_ENTRY_WINDOW`.\n * Scheduled events are read only while the area's `policy.scheduledEventsPolicy.entryGrantingAppIds` is not\n * empty. The person is checked for now, the time of the call. When they were let into this area within the last\n * 15 minutes and this entry would spend a credit, the status is `DENIED` with `RECENT_ENTRY`, and `recentArrival`\n * names that arrival. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, including a contact that was\n * merged into another, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; an entrance of an archived\n * area fails with `AREA_ARCHIVED`, and a `scheduledEventSearchWindow` whose `endDate` is not after its `startDate` with\n * `SEARCH_WINDOW_INVALID`, checked before anything is read. When Pricing Plans or\n * Contacts can't be reached the call does not fail: the outage is reported in `eligibilityDetails.issues`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`). The status is then `DENIED`, unless something else admits\n * the person. Create Arrival, in the same case, fails with `UNAVAILABLE` unless it carries `denialOverride`. Without Contacts,\n * `contactDetails` has the contact ID alone.\n * Nothing is stored. This method reveals plan state, so it has its own permission rather than the read\n * permission of arrivals.\n * @param contactId - ID of the contact whose eligibility to check.\n * @internal\n * @documentationMaturity preview\n * @requiredField contactId\n * @requiredField options.entranceId\n * @requiredField options.scheduledEventSearchWindow.endDate\n * @requiredField options.scheduledEventSearchWindow.startDate\n * @permissionId arrivals:v1:arrival:check_eligibility\n * @returns What the engine would find for the contact in this area, and the status Create Arrival would\n * derive from it. Nothing was recorded. It is the finding, not the outcome; what happened is on the arrival, once one\n * is written. No balance is reported: credits left are read from Pricing Plans. Check Eligibility By Credential\n * returns the same fields.\n * @fqn wix.arrivals.v1.ArrivalsService.CheckEligibility\n */\nexport async function checkEligibility(\n contactId: string,\n options?: NonNullablePaths<\n CheckEligibilityOptions,\n | `entranceId`\n | `scheduledEventSearchWindow.endDate`\n | `scheduledEventSearchWindow.startDate`,\n 1\n >\n): Promise<\n NonNullablePaths<\n CheckEligibilityResponse,\n | `contactDetails.contactId`\n | `status`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.type`\n | `eligibilityDetails.scheduledEvents`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId`\n | `recentArrival.arrivalId`,\n 4\n > & {\n __applicationErrorsType?: CheckEligibilityApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n entranceId: options?.entranceId,\n scheduledEventSearchWindow: options?.scheduledEventSearchWindow,\n });\n\n const reqOpts = ambassadorWixArrivalsV1Arrival.checkEligibility(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n entranceId: '$[1].entranceId',\n scheduledEventSearchWindow: '$[1].scheduledEventSearchWindow',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CheckEligibilityOptions {\n /**\n * ID of the entrance to check eligibility at, one of an area's entrances. Eligibility is checked for the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n /**\n * A range of time to look for the person's scheduled events in, besides the area's\n * `policy.scheduledEventsPolicy.entryWindow`, for a what-if such as \"which of this client's classes this evening could\n * they get in on?\". Both dates are required when it is set. It changes only which scheduled events are listed:\n * those inside the area's window now, and those that start within this range. An event found only in this range\n * doesn't admit (entry into the area follows the area's window) and is listed with `OUTSIDE_ENTRY_WINDOW`.\n * Everything else is evaluated with the area's window, so `status` and `eligibilityDetails.issues`\n * still say what Create Arrival would find. Not set: only the\n * area's window is used. Always validated (`SEARCH_WINDOW_INVALID`), but finds no events while the area's\n * `scheduledEventsPolicy.entryGrantingAppIds` is empty.\n */\n scheduledEventSearchWindow?: ScheduledEventSearchWindow;\n}\n\n/**\n * Retrieves an arrival.\n * @param arrivalId - ID of the arrival to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField arrivalId\n * @permissionId arrivals:v1:arrival:get_arrival\n * @returns Requested arrival.\n * @fqn wix.arrivals.v1.ArrivalsService.GetArrival\n */\nexport async function getArrival(\n arrivalId: string\n): Promise<\n NonNullablePaths<\n Arrival,\n | `planBenefit.poolId`\n | `planBenefit.benefitKey`\n | `planBenefit.displayName`\n | `planBenefit.type`\n | `scheduledEvent.eventId`\n | `scheduledEvent.displayName`\n | `scheduledEvent.appId`\n | `contactDetails.contactId`\n | `source.identifiedBy`\n | `source.createdBy.anonymousVisitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.wixUserId`\n | `source.createdBy.appId`\n | `area._id`\n | `area.locationId`\n | `area.name`\n | `area.entranceId`\n | `area.entranceName`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.scheduledEvents`\n | `status`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n arrivalId: arrivalId,\n });\n\n const reqOpts = ambassadorWixArrivalsV1Arrival.getArrival(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )?.arrival!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { arrivalId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['arrivalId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 arrivals, given the provided paging, filtering, and sorting.\n *\n * Query Arrivals runs with these defaults, which you can override:\n *\n * - `id` is sorted in `ASC` order\n * - `cursorPaging.limit` is `50`\n *\n * Supported filter and sort fields: `id`, `contactDetails.contactId`,\n * `source.identifiedBy`, `area.id`, `area.locationId`, `area.entranceId`, `eligibilityDetails.issues`, `planBenefit.poolId`,\n * `planBenefit.benefitKey`, `planBenefit.type`, `status`, `createdDate`. Filter only, not sort: `overriddenBy.wixUserId`.\n * `eligibilityDetails.issues` is a list: filter it with `$hasSome` or `$hasAll`, for example\n * `{ \"eligibilityDetails.issues\": { \"$hasSome\": [\"INTAKE_FORM_MISSING\"] } }` for the arrivals where a\n * form was missing; filtering on it requires the `arrivals:v1:arrival:read_eligibility_details` permission, like reading it.\n * An arrival a site user overrode has `status` `GRANTED` and `overriddenBy`, and an `overrideReason` only when a site user gave\n * one. To find overrides, filter `overriddenBy.wixUserId` with a `createdDate` lower bound:\n * `{ \"overriddenBy.wixUserId\": { \"$exists\": true }, \"createdDate\": { \"$gte\": \"2026-11-09T00:00:00Z\" } }` finds\n * every override since that time, and a user ID in place of `$exists` finds those of one site user.\n *\n * `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` and `overriddenBy.wixUserId` have no index. A filter on any of them, or a sort on any but `overriddenBy.wixUserId` (filter only), must also have a lower\n * bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago, at the top level or in an `$and`; otherwise the\n * request fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`. A bound inside an `$or` counts only when every branch has one. A next page,\n * requested with its cursor, is not checked again.\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n * @internal\n * @documentationMaturity preview\n * @permissionId arrivals:v1:arrival:query_arrivals\n * @fqn wix.arrivals.v1.ArrivalsService.QueryArrivals\n */\nexport function queryArrivals(): ArrivalsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Arrival,\n 'CURSOR',\n QueryArrivalsRequest,\n QueryArrivalsResponse\n >({\n func: async (payload: QueryArrivalsRequest) => {\n const reqOpts = ambassadorWixArrivalsV1Arrival.queryArrivals(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: QueryArrivalsRequest['query']) => {\n const args = [query, {}] as [QueryArrivalsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryArrivalsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_2,\n },\n ])\n );\n\n return {\n items: transformedData?.arrivals,\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 ArrivalsQueryResult extends QueryCursorResult {\n items: Arrival[];\n query: ArrivalsQueryBuilder;\n next: () => Promise<ArrivalsQueryResult>;\n prev: () => Promise<ArrivalsQueryResult>;\n}\n\nexport interface ArrivalsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'status'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'status'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | '_id'\n | 'contactDetails.contactId'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'overriddenBy.wixUserId',\n value: string\n ) => ArrivalsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'status'\n | 'overriddenBy.wixUserId',\n value: any\n ) => ArrivalsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'status'\n | 'overriddenBy.wixUserId',\n value: boolean\n ) => ArrivalsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'eligibilityDetails.issues'\n | 'status'\n >\n ) => ArrivalsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | 'planBenefit.poolId'\n | 'planBenefit.benefitKey'\n | 'planBenefit.type'\n | '_id'\n | '_createdDate'\n | 'contactDetails.contactId'\n | 'source.identifiedBy'\n | 'area.id'\n | 'area.locationId'\n | 'area.entranceId'\n | 'eligibilityDetails.issues'\n | 'status'\n >\n ) => ArrivalsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => ArrivalsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ArrivalsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ArrivalsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.arrivals.v1.ArrivalsService.QueryArrivals\n * @requiredField query\n */\nexport async function typedQueryArrivals(query: ArrivalQuery): Promise<\n NonNullablePaths<\n QueryArrivalsResponse,\n | `arrivals`\n | `arrivals.${number}.planBenefit.poolId`\n | `arrivals.${number}.planBenefit.benefitKey`\n | `arrivals.${number}.planBenefit.displayName`\n | `arrivals.${number}.planBenefit.type`\n | `arrivals.${number}.scheduledEvent.eventId`\n | `arrivals.${number}.scheduledEvent.displayName`\n | `arrivals.${number}.scheduledEvent.appId`\n | `arrivals.${number}.contactDetails.contactId`\n | `arrivals.${number}.source.identifiedBy`\n | `arrivals.${number}.source.createdBy.anonymousVisitorId`\n | `arrivals.${number}.source.createdBy.memberId`\n | `arrivals.${number}.source.createdBy.wixUserId`\n | `arrivals.${number}.source.createdBy.appId`\n | `arrivals.${number}.area._id`\n | `arrivals.${number}.area.locationId`\n | `arrivals.${number}.area.name`\n | `arrivals.${number}.area.entranceId`\n | `arrivals.${number}.area.entranceName`\n | `arrivals.${number}.status`,\n 4\n > & {\n __applicationErrorsType?: QueryArrivalsApplicationErrors;\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 = ambassadorWixArrivalsV1Arrival.queryArrivals(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_2,\n },\n ])\n )!;\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 ArrivalQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['eligibilityDetails.issues'];\n operators: ['$hasAll', '$hasSome'];\n sort: 'BOTH';\n },\n {\n fields: [\n '_createdDate',\n '_id',\n 'area._id',\n 'area.entranceId',\n 'area.locationId',\n 'contactDetails.contactId',\n 'planBenefit.benefitKey',\n 'planBenefit.poolId',\n 'planBenefit.type',\n 'source.identifiedBy',\n 'status'\n ];\n operators: '*';\n sort: 'BOTH';\n },\n {\n fields: ['overriddenBy.wixUserId'];\n operators: '*';\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Arrival,\n ArrivalQuerySpec\n>;\nexport type ArrivalQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \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 Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n Arrival,\n ArrivalQuerySpec,\n ArrivalQuery\n >(),\n};\n\n/**\n * Counts arrivals matching a filter, for dashboard tiles such as \"granted today\" and \"denied today\".\n *\n * The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an\n * arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count\n * overrides, filter `{ \"overriddenBy.wixUserId\": { \"$exists\": true } }` with a `createdDate` lower bound.\n * A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate`\n * (`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`.\n * Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by\n * `createdDate`.\n * @internal\n * @documentationMaturity preview\n * @permissionId arrivals:v1:arrival:count_arrivals\n * @fqn wix.arrivals.v1.ArrivalsService.CountArrivals\n */\nexport async function countArrivals(options?: CountArrivalsOptions): Promise<\n NonNullablePaths<CountArrivalsResponse, `count`, 0> & {\n __applicationErrorsType?: CountArrivalsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixArrivalsV1Arrival.countArrivals(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountArrivalsOptions {\n /** Filter, in the same form as the `filter` of a Query Arrivals request. Empty counts all arrivals. */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Checks whether the holder of a presented credential would be granted entry at an entrance, into the area it\n * belongs to, without recording anything or redeeming anything.\n *\n * This is Check Eligibility in the Arrivals Service with the person identified by what they present instead\n * of by `contactId`: the token or identifier is resolved to its credential and holder, then the same\n * evaluation runs. A scanner app uses it to show a client their standing without admitting them: their benefits\n * for this area and their scheduled events, each with its own issue, the forms they are missing, and the\n * status a scan would get. It takes the same `entranceId` as Create Arrival By Credential, so a scanner checks\n * and records at the one position it holds. The response has the same fields Check Eligibility returns, always\n * against the area's own entry window, so that it predicts the Create Arrival that follows the scan. A token that does not\n * resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`; an identifier that belongs to no\n * credential fails with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; when\n * Pricing Plans or Contacts can't be reached the call does not fail and reports the outage in\n * `eligibilityDetails.issues`, as Check Eligibility does. This method\n * reveals plan state, so it has its own permission rather\n * than the read permission of arrivals.\n * @internal\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.credential\n * @requiredField options.entranceId\n * @permissionId arrivals:v1:arrival:check_eligibility_by_credential\n * @returns What the engine would find for the credential's holder in this area, and the status Create\n * Arrival would derive from it. Nothing was recorded. The same fields Check Eligibility returns, always against the\n * area's own entry window.\n * @fqn wix.arrivals.v1.CredentialArrivalsService.CheckEligibilityByCredential\n */\nexport async function checkEligibilityByCredential(\n options: NonNullablePaths<\n CheckEligibilityByCredentialOptions,\n `entranceId`,\n 0\n >\n): Promise<\n NonNullablePaths<\n CheckEligibilityByCredentialResponse,\n | `contactDetails.contactId`\n | `status`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.type`\n | `eligibilityDetails.scheduledEvents`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId`\n | `recentArrival.arrivalId`,\n 4\n > & {\n __applicationErrorsType?: CheckEligibilityByCredentialApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n token: options?.token,\n identifier: options?.identifier,\n entranceId: options?.entranceId,\n });\n\n const reqOpts =\n ambassadorWixArrivalsV1Arrival.checkEligibilityByCredential(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n token: '$[0].token',\n identifier: '$[0].identifier',\n entranceId: '$[0].entranceId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CheckEligibilityByCredentialOptions\n extends CheckEligibilityByCredentialOptionsCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n /**\n * ID of the entrance the credential is presented at, one of an area's entrances. Eligibility is checked for the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n}\n\n/** @oneof */\nexport interface CheckEligibilityByCredentialOptionsCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n}\n\n/**\n * Writes an arrival for the holder of a presented credential: resolves the token or identifier to its credential\n * and holder and calls Create Arrival for them. The outcome is Create Arrival's contract. It carries no override:\n * letting the person in after a denial is Override Arrival as Granted with the denied arrival's ID.\n *\n * A token that does not resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`, an identifier\n * that belongs to none with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with\n * `ENTRANCE_NOT_FOUND`; nothing is recorded. The arrival is recorded at the entrance, in the area it belongs to,\n * with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD` and\n * `source.createdBy` naming the Wix user, or the app that called (a reader or a partner app). When Pricing Plans or Contacts can't be reached and\n * nothing else admits the person, the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE` or\n * `CONTACTS_UNAVAILABLE`) and records nothing. A repeat within 5 seconds by the same caller, for the same holder and\n * entrance, returns the arrival already written, whether it came from a scan or from Create Arrival.\n * @internal\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.credential\n * @requiredField options.entranceId\n * @permissionId arrivals:v1:arrival:create_arrival_by_credential\n * @fqn wix.arrivals.v1.CredentialArrivalsService.CreateArrivalByCredential\n */\nexport async function createArrivalByCredential(\n options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>\n): Promise<\n NonNullablePaths<\n CreateArrivalByCredentialResponse,\n | `arrival.planBenefit.poolId`\n | `arrival.planBenefit.benefitKey`\n | `arrival.planBenefit.displayName`\n | `arrival.planBenefit.type`\n | `arrival.scheduledEvent.eventId`\n | `arrival.scheduledEvent.displayName`\n | `arrival.scheduledEvent.appId`\n | `arrival.contactDetails.contactId`\n | `arrival.source.identifiedBy`\n | `arrival.source.createdBy.anonymousVisitorId`\n | `arrival.source.createdBy.memberId`\n | `arrival.source.createdBy.wixUserId`\n | `arrival.source.createdBy.appId`\n | `arrival.area._id`\n | `arrival.area.locationId`\n | `arrival.area.name`\n | `arrival.area.entranceId`\n | `arrival.area.entranceName`\n | `arrival.eligibilityDetails.issues`\n | `arrival.eligibilityDetails.missingIntakeForms`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `arrival.eligibilityDetails.planBenefits`\n | `arrival.eligibilityDetails.scheduledEvents`\n | `arrival.status`,\n 4\n > & {\n __applicationErrorsType?: CreateArrivalByCredentialApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n token: options?.token,\n identifier: options?.identifier,\n entranceId: options?.entranceId,\n });\n\n const reqOpts =\n ambassadorWixArrivalsV1Arrival.createArrivalByCredential(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n token: '$[0].token',\n identifier: '$[0].identifier',\n entranceId: '$[0].entranceId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateArrivalByCredentialOptions\n extends CreateArrivalByCredentialOptionsCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\n /**\n * ID of the entrance the credential is presented at, one of an area's entrances. The arrival is recorded in the area it belongs to.\n * @format GUID\n */\n entranceId: string;\n}\n\n/** @oneof */\nexport interface CreateArrivalByCredentialOptionsCredentialOneOf {\n /**\n * The presented token: the scanned QR payload, the credential's signed token. Minted by Generate Contact Credential Token in the Contact Credentials API; a QR code's payload is the bare token.\n * @maxLength 2048\n */\n token?: string;\n /** A presented identifier, such as an NFC card: its `type` and the `value` the reader reports, added to the credential with Add Credential Identifier in the Contact Credentials API. Not supported yet: a request with an identifier fails with `UNIMPLEMENTED`; present a token. */\n identifier?: PresentedIdentifier;\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 { 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\nconst TRANSFORM_PATHS_0 = [\n { path: 'arrival.createdDate' },\n { path: 'arrival.updatedDate' },\n { path: 'arrival.overriddenDate' },\n];\nconst TRANSFORM_PATHS_1 = [\n { path: 'scheduledEventSearchWindow.startDate' },\n { path: 'scheduledEventSearchWindow.endDate' },\n];\nconst TRANSFORM_PATHS_2 = [{ path: 'recentArrival.createdDate' }];\nconst TRANSFORM_PATHS_3 = [\n { path: 'arrivals.createdDate' },\n { path: 'arrivals.updatedDate' },\n { path: 'arrivals.overriddenDate' },\n];\n\nfunction resolveWixArrivalsV1CredentialArrivalsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/arrivals-arrivals',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/arrivals-arrivals',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/arrivals/v1/arrivals',\n destPath: '/v1/arrivals',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixArrivalsV1ArrivalsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/arrivals-arrivals',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/arrivals-arrivals',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/arrivals/v1/arrivals',\n destPath: '/v1/arrivals',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_arrivals_arrivals';\n\n/**\n * Evaluates a person for an area and writes one arrival, whatever it finds about them. For the flows that call\n * it (scans, the dashboard, readers), see About the Arrivals API.\n *\n * Only `arrival.contactDetails.contactId`, `arrival.area.entranceId` and `denialOverride` are read; the\n * area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture,\n * `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, and what granted the entry. `status` follows from the entry's issues:\n * - none, or only `INTAKE_FORM_MISSING` for forms that do not block entry: **`GRANTED`**, with `planBenefit` or\n * `scheduledEvent` naming what admitted the person; the server picks it by the rule on `planBenefit`: an admitting item, free before finite.\n * - `NO_ELIGIBLE_GRANT`, `RECENT_ENTRY`, or `INTAKE_FORM_MISSING` for a form that blocks entry: **`DENIED`**.\n * Nothing is redeemed; a site user may let the person in with Override Arrival as Granted.\n *\n * *Override at creation.** With `denialOverride`, a denial is written `GRANTED` at once, with its issues and\n * `overrideReason`; Arrival Created fires with that `GRANTED` arrival. Only a site user may send it,\n * a Wix user acting through an app (a call that carries the user's identity beside the app's) included; any other\n * caller fails with `OVERRIDE_NOT_ALLOWED` and nothing is recorded.\n *\n * *Redemption.** A granted benefit is redeemed asynchronously after the response, with the arrival ID as the\n * idempotency key: usually within seconds, and retried for several minutes while Pricing Plans is unavailable. If\n * Pricing Plans refuses the redemption, for example a credit pack with no credits left after an override, the\n * arrival stays `GRANTED` and nothing is recorded on it; the balance is read from Pricing Plans.\n *\n * *Repeats within 5 seconds.** A call for the same contact and entrance by the same caller within 5 seconds of an\n * arrival returns that arrival unchanged. The caller is the Wix user when the call carries one, through an app\n * included, so two site collaborators on one scanner app are two callers; otherwise it is the app. A repeat that\n * carries `denialOverride` onto a `DENIED` arrival is the exception: the override is applied to that arrival exactly\n * as Override Arrival as Granted applies it, from its stored evaluation, and Arrival Updated fires instead of\n * Arrival Created. On a `GRANTED` arrival `denialOverride` is ignored. See About the Arrivals API for\n * retries.\n *\n * *Errors and outages.** `CONTACT_NOT_FOUND` and `ENTRANCE_NOT_FOUND` record nothing. When Pricing Plans or\n * Contacts can't be reached and nothing else admits the person, the call fails with `UNAVAILABLE`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`) and records nothing, unless it carries `denialOverride`:\n * a site user has decided, so the arrival is written `GRANTED` with that outage in its issues, no plan benefit, and\n * nothing redeemed. Without Contacts the arrival also has no name or picture.\n */\nexport function createArrival(payload: object): RequestOptionsFactory<any> {\n function __createArrival({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.CreateArrival',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createArrival;\n}\n\n/**\n * Grants a `DENIED` arrival as a site user's override, from the evaluation it was denied with, and redeems the plan\n * benefit that evaluation found, once, after the response. Not a record correction: calling it can spend a\n * Pricing Plans credit. It is a site user's decision and does not check `RECENT_ENTRY`: it spends the picked credit even when\n * the person was let in a moment ago, for example by a new arrival written at the desk after this denial. Before\n * offering \"Let in\", show the person's recent entry (Check Eligibility's `recentArrival`) and ask the site user to confirm. `overrideReason` holds the site user's own words when they give one. This is the one\n * change an arrival receives through this API.\n *\n * Only a site user may call it, a Wix user acting through an app (a call that carries the user's identity beside the\n * app's) included: a caller that isn't a site user (a reader at an entrance, or an app with no Wix user on the\n * call) fails with `OVERRIDE_NOT_ALLOWED`, checked before the arrival is read, and nothing changes. Any `DENIED`\n * arrival may be overridden, whoever wrote it: a site user may let in a person a reader denied instead of writing a new\n * arrival at the desk, not in addition to it, since each of the two would admit the person. The caller is recorded in\n * `overriddenBy`; who wrote the arrival stays in `source.createdBy`. The person is not evaluated again: `eligibilityDetails` stays as it\n * was written at the denial, so its `issues` hold what was overridden, and the benefit or scheduled event that\n * evaluation found, if any, is recorded in `planBenefit` or `scheduledEvent`, picked by the rule on `planBenefit`: one that\n * admitted on its own first (the person was denied only for a blocking intake form or `RECENT_ENTRY`), free before\n * finite. It's the same record `denialOverride`\n * on Create Arrival leaves. Idempotent: on a `DENIED` arrival the status turns `GRANTED`, `revision` moves, and\n * Arrival Updated fires; an arrival that is already `GRANTED` is returned as it is (its\n * `overrideReason` is not changed) and nothing is redeemed twice. An `arrivalId` that names no arrival fails with `ARRIVAL_NOT_FOUND`. To decide before the\n * evaluation, send `denialOverride` on Create Arrival instead; a repeat of that Create Arrival within 5 seconds\n * with `denialOverride` applies this same override to the denied arrival.\n */\nexport function overrideArrivalAsGranted(\n payload: object\n): RequestOptionsFactory<any> {\n function __overrideArrivalAsGranted({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.OverrideArrivalAsGranted',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/{arrivalId}/override-as-granted',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __overrideArrivalAsGranted;\n}\n\n/**\n * Checks whether a contact would be granted entry at an entrance, into the area it belongs to, without recording\n * or redeeming anything. It takes the same `entranceId` as Create Arrival.\n *\n * The response is `eligibilityDetails` as Create Arrival would record it, with the `status` Create Arrival would\n * derive from it, and the contact's `contactDetails` (name and picture) as Contacts holds them now. With\n * `scheduledEventSearchWindow`, events found only in that window are also listed, with `OUTSIDE_ENTRY_WINDOW`.\n * Scheduled events are read only while the area's `policy.scheduledEventsPolicy.entryGrantingAppIds` is not\n * empty. The person is checked for now, the time of the call. When they were let into this area within the last\n * 15 minutes and this entry would spend a credit, the status is `DENIED` with `RECENT_ENTRY`, and `recentArrival`\n * names that arrival. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, including a contact that was\n * merged into another, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; an entrance of an archived\n * area fails with `AREA_ARCHIVED`, and a `scheduledEventSearchWindow` whose `endDate` is not after its `startDate` with\n * `SEARCH_WINDOW_INVALID`, checked before anything is read. When Pricing Plans or\n * Contacts can't be reached the call does not fail: the outage is reported in `eligibilityDetails.issues`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`). The status is then `DENIED`, unless something else admits\n * the person. Create Arrival, in the same case, fails with `UNAVAILABLE` unless it carries `denialOverride`. Without Contacts,\n * `contactDetails` has the contact ID alone.\n * Nothing is stored. This method reveals plan state, so it has its own permission rather than the read\n * permission of arrivals.\n */\nexport function checkEligibility(payload: object): RequestOptionsFactory<any> {\n function __checkEligibility({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.CheckEligibility',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/check-eligibility',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __checkEligibility;\n}\n\n/** Retrieves an arrival. */\nexport function getArrival(payload: object): RequestOptionsFactory<any> {\n function __getArrival({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'GET' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.GetArrival',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/{arrivalId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getArrival;\n}\n\n/**\n * Retrieves a list of up to 100 arrivals, given the provided paging, filtering, and sorting.\n *\n * Query Arrivals runs with these defaults, which you can override:\n *\n * - `id` is sorted in `ASC` order\n * - `cursorPaging.limit` is `50`\n *\n * Supported filter and sort fields: `id`, `contactDetails.contactId`,\n * `source.identifiedBy`, `area.id`, `area.locationId`, `area.entranceId`, `eligibilityDetails.issues`, `planBenefit.poolId`,\n * `planBenefit.benefitKey`, `planBenefit.type`, `status`, `createdDate`. Filter only, not sort: `overriddenBy.wixUserId`.\n * `eligibilityDetails.issues` is a list: filter it with `$hasSome` or `$hasAll`, for example\n * `{ \"eligibilityDetails.issues\": { \"$hasSome\": [\"INTAKE_FORM_MISSING\"] } }` for the arrivals where a\n * form was missing; filtering on it requires the `arrivals:v1:arrival:read_eligibility_details` permission, like reading it.\n * An arrival a site user overrode has `status` `GRANTED` and `overriddenBy`, and an `overrideReason` only when a site user gave\n * one. To find overrides, filter `overriddenBy.wixUserId` with a `createdDate` lower bound:\n * `{ \"overriddenBy.wixUserId\": { \"$exists\": true }, \"createdDate\": { \"$gte\": \"2026-11-09T00:00:00Z\" } }` finds\n * every override since that time, and a user ID in place of `$exists` finds those of one site user.\n *\n * `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` and `overriddenBy.wixUserId` have no index. A filter on any of them, or a sort on any but `overriddenBy.wixUserId` (filter only), must also have a lower\n * bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago, at the top level or in an `$and`; otherwise the\n * request fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`. A bound inside an `$or` counts only when every branch has one. A next page,\n * requested with its cursor, is not checked again.\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n */\nexport function queryArrivals(payload: object): RequestOptionsFactory<any> {\n function __queryArrivals({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'GET' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.QueryArrivals',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_3,\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryArrivals;\n}\n\n/**\n * Counts arrivals matching a filter, for dashboard tiles such as \"granted today\" and \"denied today\".\n *\n * The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an\n * arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count\n * overrides, filter `{ \"overriddenBy.wixUserId\": { \"$exists\": true } }` with a `createdDate` lower bound.\n * A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate`\n * (`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`.\n * Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by\n * `createdDate`.\n */\nexport function countArrivals(payload: object): RequestOptionsFactory<any> {\n function __countArrivals({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn: 'wix.arrivals.v1.ArrivalsService.CountArrivals',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1ArrivalsServiceUrl({\n protoPath: '/v1/arrivals/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countArrivals;\n}\n\n/**\n * Checks whether the holder of a presented credential would be granted entry at an entrance, into the area it\n * belongs to, without recording anything or redeeming anything.\n *\n * This is Check Eligibility in the Arrivals Service with the person identified by what they present instead\n * of by `contactId`: the token or identifier is resolved to its credential and holder, then the same\n * evaluation runs. A scanner app uses it to show a client their standing without admitting them: their benefits\n * for this area and their scheduled events, each with its own issue, the forms they are missing, and the\n * status a scan would get. It takes the same `entranceId` as Create Arrival By Credential, so a scanner checks\n * and records at the one position it holds. The response has the same fields Check Eligibility returns, always\n * against the area's own entry window, so that it predicts the Create Arrival that follows the scan. A token that does not\n * resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`; an identifier that belongs to no\n * credential fails with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; when\n * Pricing Plans or Contacts can't be reached the call does not fail and reports the outage in\n * `eligibilityDetails.issues`, as Check Eligibility does. This method\n * reveals plan state, so it has its own permission rather\n * than the read permission of arrivals.\n */\nexport function checkEligibilityByCredential(\n payload: object\n): RequestOptionsFactory<any> {\n function __checkEligibilityByCredential({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn:\n 'wix.arrivals.v1.CredentialArrivalsService.CheckEligibilityByCredential',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1CredentialArrivalsServiceUrl({\n protoPath: '/v1/arrivals/check-eligibility-by-credential',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __checkEligibilityByCredential;\n}\n\n/**\n * Writes an arrival for the holder of a presented credential: resolves the token or identifier to its credential\n * and holder and calls Create Arrival for them. The outcome is Create Arrival's contract. It carries no override:\n * letting the person in after a denial is Override Arrival as Granted with the denied arrival's ID.\n *\n * A token that does not resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`, an identifier\n * that belongs to none with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with\n * `ENTRANCE_NOT_FOUND`; nothing is recorded. The arrival is recorded at the entrance, in the area it belongs to,\n * with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD` and\n * `source.createdBy` naming the Wix user, or the app that called (a reader or a partner app). When Pricing Plans or Contacts can't be reached and\n * nothing else admits the person, the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE` or\n * `CONTACTS_UNAVAILABLE`) and records nothing. A repeat within 5 seconds by the same caller, for the same holder and\n * entrance, returns the arrival already written, whether it came from a scan or from Create Arrival.\n */\nexport function createArrivalByCredential(\n payload: object\n): RequestOptionsFactory<any> {\n function __createArrivalByCredential({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.arrivals.v1.arrival',\n method: 'POST' as any,\n methodFqn:\n 'wix.arrivals.v1.CredentialArrivalsService.CreateArrivalByCredential',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixArrivalsV1CredentialArrivalsServiceUrl({\n protoPath: '/v1/arrivals/create-by-credential',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createArrivalByCredential;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Arrival,\n ArrivalQuery,\n ArrivalsQueryBuilder,\n CheckEligibilityApplicationErrors,\n CheckEligibilityByCredentialApplicationErrors,\n CheckEligibilityByCredentialOptions,\n CheckEligibilityByCredentialResponse,\n CheckEligibilityOptions,\n CheckEligibilityResponse,\n CountArrivalsApplicationErrors,\n CountArrivalsOptions,\n CountArrivalsResponse,\n CreateArrivalApplicationErrors,\n CreateArrivalByCredentialApplicationErrors,\n CreateArrivalByCredentialOptions,\n CreateArrivalByCredentialResponse,\n CreateArrivalOptions,\n OverrideArrivalAsGrantedApplicationErrors,\n OverrideArrivalAsGrantedOptions,\n OverrideArrivalAsGrantedResponse,\n QueryArrivalsApplicationErrors,\n QueryArrivalsResponse,\n checkEligibility as universalCheckEligibility,\n checkEligibilityByCredential as universalCheckEligibilityByCredential,\n countArrivals as universalCountArrivals,\n createArrival as universalCreateArrival,\n createArrivalByCredential as universalCreateArrivalByCredential,\n getArrival as universalGetArrival,\n overrideArrivalAsGranted as universalOverrideArrivalAsGranted,\n queryArrivals as universalQueryArrivals,\n typedQueryArrivals as universalTypedQueryArrivals,\n} from './arrivals-v1-arrival-arrivals.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/arrivals' };\n\n/** @internal */\nexport function createArrival(httpClient: HttpClient): CreateArrivalSignature {\n return (\n arrival: NonNullablePaths<\n Arrival,\n | `area`\n | `area.entranceId`\n | `contactDetails`\n | `contactDetails.contactId`,\n 1\n >,\n options?: CreateArrivalOptions\n ) =>\n universalCreateArrival(\n arrival,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateArrivalSignature {\n /**\n * Evaluates a person for an area and writes one arrival, whatever it finds about them. For the flows that call\n * it (scans, the dashboard, readers), see About the Arrivals API.\n *\n * Only `arrival.contactDetails.contactId`, `arrival.area.entranceId` and `denialOverride` are read; the\n * area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture,\n * `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, and what granted the entry. `status` follows from the entry's issues:\n * - none, or only `INTAKE_FORM_MISSING` for forms that do not block entry: **`GRANTED`**, with `planBenefit` or\n * `scheduledEvent` naming what admitted the person; the server picks it by the rule on `planBenefit`: an admitting item, free before finite.\n * - `NO_ELIGIBLE_GRANT`, `RECENT_ENTRY`, or `INTAKE_FORM_MISSING` for a form that blocks entry: **`DENIED`**.\n * Nothing is redeemed; a site user may let the person in with Override Arrival as Granted.\n *\n * *Override at creation.** With `denialOverride`, a denial is written `GRANTED` at once, with its issues and\n * `overrideReason`; Arrival Created fires with that `GRANTED` arrival. Only a site user may send it,\n * a Wix user acting through an app (a call that carries the user's identity beside the app's) included; any other\n * caller fails with `OVERRIDE_NOT_ALLOWED` and nothing is recorded.\n *\n * *Redemption.** A granted benefit is redeemed asynchronously after the response, with the arrival ID as the\n * idempotency key: usually within seconds, and retried for several minutes while Pricing Plans is unavailable. If\n * Pricing Plans refuses the redemption, for example a credit pack with no credits left after an override, the\n * arrival stays `GRANTED` and nothing is recorded on it; the balance is read from Pricing Plans.\n *\n * *Repeats within 5 seconds.** A call for the same contact and entrance by the same caller within 5 seconds of an\n * arrival returns that arrival unchanged. The caller is the Wix user when the call carries one, through an app\n * included, so two site collaborators on one scanner app are two callers; otherwise it is the app. A repeat that\n * carries `denialOverride` onto a `DENIED` arrival is the exception: the override is applied to that arrival exactly\n * as Override Arrival as Granted applies it, from its stored evaluation, and Arrival Updated fires instead of\n * Arrival Created. On a `GRANTED` arrival `denialOverride` is ignored. See About the Arrivals API for\n * retries.\n *\n * *Errors and outages.** `CONTACT_NOT_FOUND` and `ENTRANCE_NOT_FOUND` record nothing. When Pricing Plans or\n * Contacts can't be reached and nothing else admits the person, the call fails with `UNAVAILABLE`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`) and records nothing, unless it carries `denialOverride`:\n * a site user has decided, so the arrival is written `GRANTED` with that outage in its issues, no plan benefit, and\n * nothing redeemed. Without Contacts the arrival also has no name or picture.\n * @param - Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field\n * (the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the\n * entrance's name, what granted the entry) is set by the server.\n * @returns The arrival as written, with the status its issues imply, or `GRANTED` despite them when `denialOverride` let the person in. On a repeat within 5 seconds, the existing arrival: unchanged, or now `GRANTED` when the repeat carried `denialOverride` onto a `DENIED` one.\n */\n (\n arrival: NonNullablePaths<\n Arrival,\n | `area`\n | `area.entranceId`\n | `contactDetails`\n | `contactDetails.contactId`,\n 1\n >,\n options?: CreateArrivalOptions\n ): Promise<\n NonNullablePaths<\n Arrival,\n | `planBenefit.poolId`\n | `planBenefit.benefitKey`\n | `planBenefit.displayName`\n | `planBenefit.type`\n | `scheduledEvent.eventId`\n | `scheduledEvent.displayName`\n | `scheduledEvent.appId`\n | `contactDetails.contactId`\n | `source.identifiedBy`\n | `source.createdBy.anonymousVisitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.wixUserId`\n | `source.createdBy.appId`\n | `area._id`\n | `area.locationId`\n | `area.name`\n | `area.entranceId`\n | `area.entranceName`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.scheduledEvents`\n | `status`,\n 3\n > & {\n __applicationErrorsType?: CreateArrivalApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function overrideArrivalAsGranted(\n httpClient: HttpClient\n): OverrideArrivalAsGrantedSignature {\n return (arrivalId: string, options?: OverrideArrivalAsGrantedOptions) =>\n universalOverrideArrivalAsGranted(\n arrivalId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface OverrideArrivalAsGrantedSignature {\n /**\n * Grants a `DENIED` arrival as a site user's override, from the evaluation it was denied with, and redeems the plan\n * benefit that evaluation found, once, after the response. Not a record correction: calling it can spend a\n * Pricing Plans credit. It is a site user's decision and does not check `RECENT_ENTRY`: it spends the picked credit even when\n * the person was let in a moment ago, for example by a new arrival written at the desk after this denial. Before\n * offering \"Let in\", show the person's recent entry (Check Eligibility's `recentArrival`) and ask the site user to confirm. `overrideReason` holds the site user's own words when they give one. This is the one\n * change an arrival receives through this API.\n *\n * Only a site user may call it, a Wix user acting through an app (a call that carries the user's identity beside the\n * app's) included: a caller that isn't a site user (a reader at an entrance, or an app with no Wix user on the\n * call) fails with `OVERRIDE_NOT_ALLOWED`, checked before the arrival is read, and nothing changes. Any `DENIED`\n * arrival may be overridden, whoever wrote it: a site user may let in a person a reader denied instead of writing a new\n * arrival at the desk, not in addition to it, since each of the two would admit the person. The caller is recorded in\n * `overriddenBy`; who wrote the arrival stays in `source.createdBy`. The person is not evaluated again: `eligibilityDetails` stays as it\n * was written at the denial, so its `issues` hold what was overridden, and the benefit or scheduled event that\n * evaluation found, if any, is recorded in `planBenefit` or `scheduledEvent`, picked by the rule on `planBenefit`: one that\n * admitted on its own first (the person was denied only for a blocking intake form or `RECENT_ENTRY`), free before\n * finite. It's the same record `denialOverride`\n * on Create Arrival leaves. Idempotent: on a `DENIED` arrival the status turns `GRANTED`, `revision` moves, and\n * Arrival Updated fires; an arrival that is already `GRANTED` is returned as it is (its\n * `overrideReason` is not changed) and nothing is redeemed twice. An `arrivalId` that names no arrival fails with `ARRIVAL_NOT_FOUND`. To decide before the\n * evaluation, send `denialOverride` on Create Arrival instead; a repeat of that Create Arrival within 5 seconds\n * with `denialOverride` applies this same override to the denied arrival.\n * @param - ID of the denied arrival to let the person in on.\n */\n (arrivalId: string, options?: OverrideArrivalAsGrantedOptions): Promise<\n NonNullablePaths<\n OverrideArrivalAsGrantedResponse,\n | `arrival.planBenefit.poolId`\n | `arrival.planBenefit.benefitKey`\n | `arrival.planBenefit.displayName`\n | `arrival.planBenefit.type`\n | `arrival.scheduledEvent.eventId`\n | `arrival.scheduledEvent.displayName`\n | `arrival.scheduledEvent.appId`\n | `arrival.contactDetails.contactId`\n | `arrival.source.identifiedBy`\n | `arrival.source.createdBy.anonymousVisitorId`\n | `arrival.source.createdBy.memberId`\n | `arrival.source.createdBy.wixUserId`\n | `arrival.source.createdBy.appId`\n | `arrival.area._id`\n | `arrival.area.locationId`\n | `arrival.area.name`\n | `arrival.area.entranceId`\n | `arrival.area.entranceName`\n | `arrival.eligibilityDetails.issues`\n | `arrival.eligibilityDetails.missingIntakeForms`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `arrival.eligibilityDetails.planBenefits`\n | `arrival.eligibilityDetails.scheduledEvents`\n | `arrival.status`,\n 4\n > & {\n __applicationErrorsType?: OverrideArrivalAsGrantedApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function checkEligibility(\n httpClient: HttpClient\n): CheckEligibilitySignature {\n return (\n contactId: string,\n options?: NonNullablePaths<\n CheckEligibilityOptions,\n | `entranceId`\n | `scheduledEventSearchWindow.endDate`\n | `scheduledEventSearchWindow.startDate`,\n 1\n >\n ) =>\n universalCheckEligibility(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CheckEligibilitySignature {\n /**\n * Checks whether a contact would be granted entry at an entrance, into the area it belongs to, without recording\n * or redeeming anything. It takes the same `entranceId` as Create Arrival.\n *\n * The response is `eligibilityDetails` as Create Arrival would record it, with the `status` Create Arrival would\n * derive from it, and the contact's `contactDetails` (name and picture) as Contacts holds them now. With\n * `scheduledEventSearchWindow`, events found only in that window are also listed, with `OUTSIDE_ENTRY_WINDOW`.\n * Scheduled events are read only while the area's `policy.scheduledEventsPolicy.entryGrantingAppIds` is not\n * empty. The person is checked for now, the time of the call. When they were let into this area within the last\n * 15 minutes and this entry would spend a credit, the status is `DENIED` with `RECENT_ENTRY`, and `recentArrival`\n * names that arrival. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, including a contact that was\n * merged into another, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; an entrance of an archived\n * area fails with `AREA_ARCHIVED`, and a `scheduledEventSearchWindow` whose `endDate` is not after its `startDate` with\n * `SEARCH_WINDOW_INVALID`, checked before anything is read. When Pricing Plans or\n * Contacts can't be reached the call does not fail: the outage is reported in `eligibilityDetails.issues`\n * (`PRICING_PLANS_UNAVAILABLE` or `CONTACTS_UNAVAILABLE`). The status is then `DENIED`, unless something else admits\n * the person. Create Arrival, in the same case, fails with `UNAVAILABLE` unless it carries `denialOverride`. Without Contacts,\n * `contactDetails` has the contact ID alone.\n * Nothing is stored. This method reveals plan state, so it has its own permission rather than the read\n * permission of arrivals.\n * @param - ID of the contact whose eligibility to check.\n * @returns What the engine would find for the contact in this area, and the status Create Arrival would\n * derive from it. Nothing was recorded. It is the finding, not the outcome; what happened is on the arrival, once one\n * is written. No balance is reported: credits left are read from Pricing Plans. Check Eligibility By Credential\n * returns the same fields.\n */\n (\n contactId: string,\n options?: NonNullablePaths<\n CheckEligibilityOptions,\n | `entranceId`\n | `scheduledEventSearchWindow.endDate`\n | `scheduledEventSearchWindow.startDate`,\n 1\n >\n ): Promise<\n NonNullablePaths<\n CheckEligibilityResponse,\n | `contactDetails.contactId`\n | `status`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.type`\n | `eligibilityDetails.scheduledEvents`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId`\n | `recentArrival.arrivalId`,\n 4\n > & {\n __applicationErrorsType?: CheckEligibilityApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function getArrival(httpClient: HttpClient): GetArrivalSignature {\n return (arrivalId: string) =>\n universalGetArrival(\n arrivalId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetArrivalSignature {\n /**\n * Retrieves an arrival.\n * @param - ID of the arrival to retrieve.\n * @returns Requested arrival.\n */\n (arrivalId: string): Promise<\n NonNullablePaths<\n Arrival,\n | `planBenefit.poolId`\n | `planBenefit.benefitKey`\n | `planBenefit.displayName`\n | `planBenefit.type`\n | `scheduledEvent.eventId`\n | `scheduledEvent.displayName`\n | `scheduledEvent.appId`\n | `contactDetails.contactId`\n | `source.identifiedBy`\n | `source.createdBy.anonymousVisitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.wixUserId`\n | `source.createdBy.appId`\n | `area._id`\n | `area.locationId`\n | `area.name`\n | `area.entranceId`\n | `area.entranceName`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.scheduledEvents`\n | `status`,\n 3\n >\n >;\n}\n\n/** @internal */\nexport function queryArrivals(httpClient: HttpClient): QueryArrivalsSignature {\n return () =>\n universalQueryArrivals(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryArrivalsSignature {\n /**\n * Retrieves a list of up to 100 arrivals, given the provided paging, filtering, and sorting.\n *\n * Query Arrivals runs with these defaults, which you can override:\n *\n * - `id` is sorted in `ASC` order\n * - `cursorPaging.limit` is `50`\n *\n * Supported filter and sort fields: `id`, `contactDetails.contactId`,\n * `source.identifiedBy`, `area.id`, `area.locationId`, `area.entranceId`, `eligibilityDetails.issues`, `planBenefit.poolId`,\n * `planBenefit.benefitKey`, `planBenefit.type`, `status`, `createdDate`. Filter only, not sort: `overriddenBy.wixUserId`.\n * `eligibilityDetails.issues` is a list: filter it with `$hasSome` or `$hasAll`, for example\n * `{ \"eligibilityDetails.issues\": { \"$hasSome\": [\"INTAKE_FORM_MISSING\"] } }` for the arrivals where a\n * form was missing; filtering on it requires the `arrivals:v1:arrival:read_eligibility_details` permission, like reading it.\n * An arrival a site user overrode has `status` `GRANTED` and `overriddenBy`, and an `overrideReason` only when a site user gave\n * one. To find overrides, filter `overriddenBy.wixUserId` with a `createdDate` lower bound:\n * `{ \"overriddenBy.wixUserId\": { \"$exists\": true }, \"createdDate\": { \"$gte\": \"2026-11-09T00:00:00Z\" } }` finds\n * every override since that time, and a user ID in place of `$exists` finds those of one site user.\n *\n * `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` and `overriddenBy.wixUserId` have no index. A filter on any of them, or a sort on any but `overriddenBy.wixUserId` (filter only), must also have a lower\n * bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago, at the top level or in an `$and`; otherwise the\n * request fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`. A bound inside an `$or` counts only when every branch has one. A next page,\n * requested with its cursor, is not checked again.\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n */\n (): ArrivalsQueryBuilder;\n}\n\nexport function typedQueryArrivals(\n httpClient: HttpClient\n): TypedQueryArrivalsSignature {\n return (query: ArrivalQuery) =>\n universalTypedQueryArrivals(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryArrivalsSignature {\n /** */\n (query: ArrivalQuery): Promise<\n NonNullablePaths<\n QueryArrivalsResponse,\n | `arrivals`\n | `arrivals.${number}.planBenefit.poolId`\n | `arrivals.${number}.planBenefit.benefitKey`\n | `arrivals.${number}.planBenefit.displayName`\n | `arrivals.${number}.planBenefit.type`\n | `arrivals.${number}.scheduledEvent.eventId`\n | `arrivals.${number}.scheduledEvent.displayName`\n | `arrivals.${number}.scheduledEvent.appId`\n | `arrivals.${number}.contactDetails.contactId`\n | `arrivals.${number}.source.identifiedBy`\n | `arrivals.${number}.source.createdBy.anonymousVisitorId`\n | `arrivals.${number}.source.createdBy.memberId`\n | `arrivals.${number}.source.createdBy.wixUserId`\n | `arrivals.${number}.source.createdBy.appId`\n | `arrivals.${number}.area._id`\n | `arrivals.${number}.area.locationId`\n | `arrivals.${number}.area.name`\n | `arrivals.${number}.area.entranceId`\n | `arrivals.${number}.area.entranceName`\n | `arrivals.${number}.status`,\n 4\n > & {\n __applicationErrorsType?: QueryArrivalsApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function countArrivals(httpClient: HttpClient): CountArrivalsSignature {\n return (options?: CountArrivalsOptions) =>\n universalCountArrivals(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountArrivalsSignature {\n /**\n * Counts arrivals matching a filter, for dashboard tiles such as \"granted today\" and \"denied today\".\n *\n * The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an\n * arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count\n * overrides, filter `{ \"overriddenBy.wixUserId\": { \"$exists\": true } }` with a `createdDate` lower bound.\n * A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,\n * `planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate`\n * (`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`.\n * Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by\n * `createdDate`.\n */\n (options?: CountArrivalsOptions): Promise<\n NonNullablePaths<CountArrivalsResponse, `count`, 0> & {\n __applicationErrorsType?: CountArrivalsApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function checkEligibilityByCredential(\n httpClient: HttpClient\n): CheckEligibilityByCredentialSignature {\n return (\n options: NonNullablePaths<\n CheckEligibilityByCredentialOptions,\n `entranceId`,\n 0\n >\n ) =>\n universalCheckEligibilityByCredential(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CheckEligibilityByCredentialSignature {\n /**\n * Checks whether the holder of a presented credential would be granted entry at an entrance, into the area it\n * belongs to, without recording anything or redeeming anything.\n *\n * This is Check Eligibility in the Arrivals Service with the person identified by what they present instead\n * of by `contactId`: the token or identifier is resolved to its credential and holder, then the same\n * evaluation runs. A scanner app uses it to show a client their standing without admitting them: their benefits\n * for this area and their scheduled events, each with its own issue, the forms they are missing, and the\n * status a scan would get. It takes the same `entranceId` as Create Arrival By Credential, so a scanner checks\n * and records at the one position it holds. The response has the same fields Check Eligibility returns, always\n * against the area's own entry window, so that it predicts the Create Arrival that follows the scan. A token that does not\n * resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`; an identifier that belongs to no\n * credential fails with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; when\n * Pricing Plans or Contacts can't be reached the call does not fail and reports the outage in\n * `eligibilityDetails.issues`, as Check Eligibility does. This method\n * reveals plan state, so it has its own permission rather\n * than the read permission of arrivals.\n * @returns What the engine would find for the credential's holder in this area, and the status Create\n * Arrival would derive from it. Nothing was recorded. The same fields Check Eligibility returns, always against the\n * area's own entry window.\n */\n (\n options: NonNullablePaths<\n CheckEligibilityByCredentialOptions,\n `entranceId`,\n 0\n >\n ): Promise<\n NonNullablePaths<\n CheckEligibilityByCredentialResponse,\n | `contactDetails.contactId`\n | `status`\n | `eligibilityDetails.issues`\n | `eligibilityDetails.missingIntakeForms`\n | `eligibilityDetails.missingIntakeForms.${number}.formId`\n | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `eligibilityDetails.planBenefits`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName`\n | `eligibilityDetails.planBenefits.${number}.planBenefit.type`\n | `eligibilityDetails.scheduledEvents`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName`\n | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId`\n | `recentArrival.arrivalId`,\n 4\n > & {\n __applicationErrorsType?: CheckEligibilityByCredentialApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function createArrivalByCredential(\n httpClient: HttpClient\n): CreateArrivalByCredentialSignature {\n return (\n options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>\n ) =>\n universalCreateArrivalByCredential(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateArrivalByCredentialSignature {\n /**\n * Writes an arrival for the holder of a presented credential: resolves the token or identifier to its credential\n * and holder and calls Create Arrival for them. The outcome is Create Arrival's contract. It carries no override:\n * letting the person in after a denial is Override Arrival as Granted with the denied arrival's ID.\n *\n * A token that does not resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`, an identifier\n * that belongs to none with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with\n * `ENTRANCE_NOT_FOUND`; nothing is recorded. The arrival is recorded at the entrance, in the area it belongs to,\n * with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD` and\n * `source.createdBy` naming the Wix user, or the app that called (a reader or a partner app). When Pricing Plans or Contacts can't be reached and\n * nothing else admits the person, the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE` or\n * `CONTACTS_UNAVAILABLE`) and records nothing. A repeat within 5 seconds by the same caller, for the same holder and\n * entrance, returns the arrival already written, whether it came from a scan or from Create Arrival.\n */\n (\n options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>\n ): Promise<\n NonNullablePaths<\n CreateArrivalByCredentialResponse,\n | `arrival.planBenefit.poolId`\n | `arrival.planBenefit.benefitKey`\n | `arrival.planBenefit.displayName`\n | `arrival.planBenefit.type`\n | `arrival.scheduledEvent.eventId`\n | `arrival.scheduledEvent.displayName`\n | `arrival.scheduledEvent.appId`\n | `arrival.contactDetails.contactId`\n | `arrival.source.identifiedBy`\n | `arrival.source.createdBy.anonymousVisitorId`\n | `arrival.source.createdBy.memberId`\n | `arrival.source.createdBy.wixUserId`\n | `arrival.source.createdBy.appId`\n | `arrival.area._id`\n | `arrival.area.locationId`\n | `arrival.area.name`\n | `arrival.area.entranceId`\n | `arrival.area.entranceName`\n | `arrival.eligibilityDetails.issues`\n | `arrival.eligibilityDetails.missingIntakeForms`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId`\n | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry`\n | `arrival.eligibilityDetails.planBenefits`\n | `arrival.eligibilityDetails.scheduledEvents`\n | `arrival.status`,\n 4\n > & {\n __applicationErrorsType?: CreateArrivalByCredentialApplicationErrors;\n }\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n AreaInfo,\n Arrival,\n ArrivalGrantedByOneOf,\n ArrivalQuerySpec,\n ArrivalSource,\n ArrivalsQueryBuilder,\n ArrivalsQueryResult,\n CheckEligibilityByCredentialOptions,\n CheckEligibilityByCredentialOptionsCredentialOneOf,\n CheckEligibilityByCredentialRequest,\n CheckEligibilityByCredentialRequestCredentialOneOf,\n CheckEligibilityByCredentialResponse,\n CheckEligibilityOptions,\n CheckEligibilityRequest,\n CheckEligibilityResponse,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n ContactDetails,\n CountArrivalsOptions,\n CountArrivalsRequest,\n CountArrivalsResponse,\n CreateArrivalByCredentialOptions,\n CreateArrivalByCredentialOptionsCredentialOneOf,\n CreateArrivalByCredentialRequest,\n CreateArrivalByCredentialRequestCredentialOneOf,\n CreateArrivalByCredentialResponse,\n CreateArrivalOptions,\n CreateArrivalRequest,\n CreateArrivalResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DenialOverride,\n DomainEvent,\n DomainEventBodyOneOf,\n EligibilityDetails,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EntryIssue,\n GetArrivalRequest,\n GetArrivalResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentificationMethod,\n IdentityType,\n MessageEnvelope,\n MissingIntakeForm,\n OverrideArrivalAsGrantedOptions,\n OverrideArrivalAsGrantedRequest,\n OverrideArrivalAsGrantedResponse,\n PlanBenefit,\n PlanBenefitEligibility,\n PlanBenefitIssue,\n PlanBenefitType,\n PresentedIdentifier,\n QueryArrivalsRequest,\n QueryArrivalsResponse,\n RecentArrival,\n RestoreInfo,\n ScheduledEvent,\n ScheduledEventEligibility,\n ScheduledEventIssue,\n ScheduledEventSearchWindow,\n SortOrder,\n Sorting,\n Status,\n Type,\n WebhookIdentityType,\n utils,\n} from './arrivals-v1-arrival-arrivals.universal.js';\n","import {\n createArrival as publicCreateArrival,\n overrideArrivalAsGranted as publicOverrideArrivalAsGranted,\n checkEligibility as publicCheckEligibility,\n getArrival as publicGetArrival,\n queryArrivals as publicQueryArrivals,\n typedQueryArrivals as publicTypedQueryArrivals,\n countArrivals as publicCountArrivals,\n checkEligibilityByCredential as publicCheckEligibilityByCredential,\n createArrivalByCredential as publicCreateArrivalByCredential,\n} from './arrivals-v1-arrival-arrivals.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ArrivalQuery,\n ArrivalsQueryBuilder,\n typedQueryArrivals as universalTypedQueryArrivals,\n} from './arrivals-v1-arrival-arrivals.universal.js';\n\nfunction customQueryArrivals(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryArrivals(httpClient)(),\n typedQueryFunction: (query: ArrivalQuery) =>\n publicTypedQueryArrivals(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ArrivalsQueryBuilder;\n function overloadedQuery(\n query: ArrivalQuery\n ): ReturnType<typeof universalTypedQueryArrivals>;\n function overloadedQuery(query?: ArrivalQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\n/** @internal */\nexport const createArrival: MaybeContext<\n BuildRESTFunction<typeof publicCreateArrival> & typeof publicCreateArrival\n> = /*#__PURE__*/ createRESTModule(publicCreateArrival);\n/** @internal */\nexport const overrideArrivalAsGranted: MaybeContext<\n BuildRESTFunction<typeof publicOverrideArrivalAsGranted> &\n typeof publicOverrideArrivalAsGranted\n> = /*#__PURE__*/ createRESTModule(publicOverrideArrivalAsGranted);\n/** @internal */\nexport const checkEligibility: MaybeContext<\n BuildRESTFunction<typeof publicCheckEligibility> &\n typeof publicCheckEligibility\n> = /*#__PURE__*/ createRESTModule(publicCheckEligibility);\n/** @internal */\nexport const getArrival: MaybeContext<\n BuildRESTFunction<typeof publicGetArrival> & typeof publicGetArrival\n> = /*#__PURE__*/ createRESTModule(publicGetArrival);\n/** @internal */\nexport const countArrivals: MaybeContext<\n BuildRESTFunction<typeof publicCountArrivals> & typeof publicCountArrivals\n> = /*#__PURE__*/ createRESTModule(publicCountArrivals);\n/** @internal */\nexport const checkEligibilityByCredential: MaybeContext<\n BuildRESTFunction<typeof publicCheckEligibilityByCredential> &\n typeof publicCheckEligibilityByCredential\n> = /*#__PURE__*/ createRESTModule(publicCheckEligibilityByCredential);\n/** @internal */\nexport const createArrivalByCredential: MaybeContext<\n BuildRESTFunction<typeof publicCreateArrivalByCredential> &\n typeof publicCreateArrivalByCredential\n> = /*#__PURE__*/ createRESTModule(publicCreateArrivalByCredential);\nexport const queryArrivals: MaybeContext<\n BuildRESTFunction<typeof customQueryArrivals> & typeof customQueryArrivals\n> = /*#__PURE__*/ createRESTModule(customQueryArrivals);\n\nexport {\n IdentificationMethod,\n IdentityType,\n EntryIssue,\n PlanBenefitType,\n PlanBenefitIssue,\n ScheduledEventIssue,\n Status,\n SortOrder,\n WebhookIdentityType,\n Type,\n} from './arrivals-v1-arrival-arrivals.universal.js';\nexport {\n Arrival,\n ArrivalGrantedByOneOf,\n ContactDetails,\n ArrivalSource,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n AreaInfo,\n EligibilityDetails,\n MissingIntakeForm,\n PlanBenefitEligibility,\n PlanBenefit,\n ScheduledEventEligibility,\n ScheduledEvent,\n CreateArrivalRequest,\n DenialOverride,\n CreateArrivalResponse,\n OverrideArrivalAsGrantedRequest,\n OverrideArrivalAsGrantedResponse,\n CheckEligibilityRequest,\n ScheduledEventSearchWindow,\n CheckEligibilityResponse,\n RecentArrival,\n GetArrivalRequest,\n GetArrivalResponse,\n QueryArrivalsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryArrivalsResponse,\n CursorPagingMetadata,\n Cursors,\n CountArrivalsRequest,\n CountArrivalsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n CheckEligibilityByCredentialRequest,\n CheckEligibilityByCredentialRequestCredentialOneOf,\n PresentedIdentifier,\n CheckEligibilityByCredentialResponse,\n CreateArrivalByCredentialRequest,\n CreateArrivalByCredentialRequestCredentialOneOf,\n CreateArrivalByCredentialResponse,\n CreateArrivalOptions,\n OverrideArrivalAsGrantedOptions,\n CheckEligibilityOptions,\n ArrivalsQueryResult,\n ArrivalsQueryBuilder,\n ArrivalQuerySpec,\n CountArrivalsOptions,\n CheckEligibilityByCredentialOptions,\n CheckEligibilityByCredentialOptionsCredentialOneOf,\n CreateArrivalByCredentialOptions,\n CreateArrivalByCredentialOptionsCredentialOneOf,\n} from './arrivals-v1-arrival-arrivals.universal.js';\nexport { utils } from './arrivals-v1-arrival-arrivals.universal.js';\nexport {\n IdentificationMethodWithLiterals,\n IdentityTypeWithLiterals,\n EntryIssueWithLiterals,\n PlanBenefitTypeWithLiterals,\n PlanBenefitIssueWithLiterals,\n ScheduledEventIssueWithLiterals,\n StatusWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n TypeWithLiterals,\n CreateArrivalApplicationErrors,\n OverrideArrivalAsGrantedApplicationErrors,\n CheckEligibilityApplicationErrors,\n QueryArrivalsApplicationErrors,\n CountArrivalsApplicationErrors,\n CheckEligibilityByCredentialApplicationErrors,\n CreateArrivalByCredentialApplicationErrors,\n CommonQueryWithEntityContext,\n ArrivalQuery,\n} from './arrivals-v1-arrival-arrivals.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,oCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,sBAAsB;AAAA,EAC9B,EAAE,MAAM,sBAAsB;AAAA,EAC9B,EAAE,MAAM,yBAAyB;AACnC;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uCAAuC;AAAA,EAC/C,EAAE,MAAM,qCAAqC;AAC/C;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,4BAA4B,CAAC;AAChE,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,0BAA0B;AACpC;AAEA,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,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BAAkC;AAE9D,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMR,iBAEK,2DAAiB,mBAAmB;","names":["checkEligibility","checkEligibilityByCredential","countArrivals","createArrival","createArrivalByCredential","getArrival","overrideArrivalAsGranted","queryArrivals","import_timestamp","import_rest_modules","payload","import_image","import_transform_paths","TRANSFORM_PATHS_0","TRANSFORM_PATHS_1","TRANSFORM_PATHS_2","IdentificationMethod","IdentityType","EntryIssue","PlanBenefitType","PlanBenefitIssue","ScheduledEventIssue","Status","SortOrder","WebhookIdentityType","Type","createArrival","sdkTransformError","overrideArrivalAsGranted","checkEligibility","getArrival","queryArrivals","countArrivals","checkEligibilityByCredential","createArrivalByCredential","createArrival","overrideArrivalAsGranted","checkEligibility","getArrival","queryArrivals","typedQueryArrivals","countArrivals","checkEligibilityByCredential","createArrivalByCredential","import_rest_modules","queryArrivals","typedQueryArrivals","createArrival","overrideArrivalAsGranted","checkEligibility","getArrival","countArrivals","checkEligibilityByCredential","createArrivalByCredential"]}
|