@wix/auto_sdk_arrivals_arrivals 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +35 -11
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +36 -48
- package/build/cjs/index.typings.js +35 -11
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +19 -30
- package/build/cjs/meta.js +28 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +35 -11
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +36 -48
- package/build/es/index.typings.mjs +35 -11
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +19 -30
- package/build/es/meta.mjs +28 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +24 -22
- package/build/internal/cjs/index.typings.d.ts +66 -75
- package/build/internal/cjs/meta.d.ts +19 -30
- package/build/internal/es/index.d.mts +24 -22
- package/build/internal/es/index.typings.d.mts +66 -75
- package/build/internal/es/meta.d.mts +19 -30
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { Arrival, CreateArrivalOptions, CreateArrivalApplicationErrors, OverrideArrivalAsGrantedOptions, OverrideArrivalAsGrantedResponse, OverrideArrivalAsGrantedApplicationErrors, CheckEligibilityOptions, CheckEligibilityResponse, CheckEligibilityApplicationErrors, CountArrivalsOptions, CountArrivalsResponse, CountArrivalsApplicationErrors, CheckEligibilityByCredentialOptions, CheckEligibilityByCredentialResponse, CheckEligibilityByCredentialApplicationErrors, CreateArrivalByCredentialOptions, CreateArrivalByCredentialResponse, CreateArrivalByCredentialApplicationErrors, ArrivalsQueryBuilder, ArrivalQuery, typedQueryArrivals } from './index.typings.js';
|
|
3
|
-
export { AccountInfo, ActionEvent, AreaInfo, ArrivalDenied, ArrivalGranted, ArrivalGrantedByOneOf, ArrivalQuerySpec, ArrivalSource, ArrivalsQueryResult,
|
|
3
|
+
export { AccountInfo, ActionEvent, AreaInfo, ArrivalDenied, ArrivalGranted, ArrivalGrantedByOneOf, ArrivalQuerySpec, ArrivalSource, ArrivalsQueryResult, CheckEligibilityByCredentialOptionsCredentialOneOf, CheckEligibilityByCredentialRequest, CheckEligibilityByCredentialRequestCredentialOneOf, CheckEligibilityRequest, CommonIdentificationData, CommonIdentificationDataIdOneOf, CommonQueryWithEntityContext, ContactDetails, CountArrivalsRequest, CreateArrivalByCredentialOptionsCredentialOneOf, CreateArrivalByCredentialRequest, CreateArrivalByCredentialRequestCredentialOneOf, CreateArrivalRequest, CreateArrivalResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DenialOverride, DomainEvent, DomainEventBodyOneOf, EligibilityDetails, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EntryIssue, EntryIssueWithLiterals, GetArrivalRequest, GetArrivalResponse, IdentificationData, IdentificationDataIdOneOf, IdentificationMethod, IdentificationMethodWithLiterals, IdentityType, IdentityTypeWithLiterals, MessageEnvelope, MissingIntakeForm, OverrideArrivalAsGrantedRequest, PlanBenefit, PlanBenefitEligibility, PlanBenefitIssue, PlanBenefitIssueWithLiterals, PlanBenefitType, PlanBenefitTypeWithLiterals, PresentedIdentifier, QueryArrivalsRequest, QueryArrivalsResponse, RecentArrival, RestoreInfo, ScheduledEvent, ScheduledEventEligibility, ScheduledEventIssue, ScheduledEventIssueWithLiterals, ScheduledEventSearchWindow, SortOrder, SortOrderWithLiterals, Sorting, Status, StatusWithLiterals, Type, TypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
declare function createArrival$1(httpClient: HttpClient): CreateArrivalSignature;
|
|
@@ -9,9 +9,9 @@ interface CreateArrivalSignature {
|
|
|
9
9
|
* Evaluates a person for an area and writes one arrival, whatever it finds about them. For the flows that call
|
|
10
10
|
* it — scans, the dashboard, readers — see About Arrivals.
|
|
11
11
|
*
|
|
12
|
-
* Only `arrival.
|
|
13
|
-
* area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture
|
|
14
|
-
*
|
|
12
|
+
* Only `arrival.contactDetails.contactId`, `arrival.area.entranceId` and `denialOverride` are read; the
|
|
13
|
+
* area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture,
|
|
14
|
+
* `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the
|
|
15
15
|
* entrance's name, and what granted the entry. `status` follows from the entry's issues:
|
|
16
16
|
* - none, or only `INTAKE_FORM_MISSING` for forms that do not block entry: **`GRANTED`**, with `planBenefit` or
|
|
17
17
|
* `scheduledEvent` naming what admitted the person; the server picks it by the rule on `planBenefit`: an admitting item, free before finite.
|
|
@@ -30,12 +30,12 @@ interface CreateArrivalSignature {
|
|
|
30
30
|
* reached, the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE`) and records nothing — unless it carries `denialOverride`: staff
|
|
31
31
|
* have decided, so the arrival is written `GRANTED` with `PRICING_PLANS_UNAVAILABLE` in its issues, no plan
|
|
32
32
|
* benefit, and nothing redeemed.
|
|
33
|
-
* @param - Arrival to create. Only `
|
|
34
|
-
* the rest of `
|
|
33
|
+
* @param - Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field —
|
|
34
|
+
* the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the
|
|
35
35
|
* entrance's name, what granted the entry — is set by the server.
|
|
36
36
|
* @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.
|
|
37
37
|
*/
|
|
38
|
-
(arrival: NonNullablePaths<Arrival, `area` | `area.entranceId` | `
|
|
38
|
+
(arrival: NonNullablePaths<Arrival, `area` | `area.entranceId` | `contactDetails` | `contactDetails.contactId`, 1>, options?: CreateArrivalOptions): Promise<NonNullablePaths<Arrival, `planBenefit.poolId` | `planBenefit.benefitKey` | `planBenefit.displayName` | `planBenefit.type` | `scheduledEvent.eventId` | `scheduledEvent.displayName` | `scheduledEvent.appId` | `contactDetails.contactId` | `source.identifiedBy` | `source.createdBy.anonymousVisitorId` | `source.createdBy.memberId` | `source.createdBy.wixUserId` | `source.createdBy.appId` | `area._id` | `area.locationId` | `area.name` | `area.entranceId` | `area.entranceName` | `eligibilityDetails.issues` | `eligibilityDetails.missingIntakeForms` | `eligibilityDetails.missingIntakeForms.${number}.formId` | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `eligibilityDetails.planBenefits` | `eligibilityDetails.scheduledEvents` | `status`, 3> & {
|
|
39
39
|
__applicationErrorsType?: CreateArrivalApplicationErrors;
|
|
40
40
|
}>;
|
|
41
41
|
}
|
|
@@ -62,7 +62,7 @@ interface OverrideArrivalAsGrantedSignature {
|
|
|
62
62
|
* with `denialOverride` applies this same override to the denied arrival.
|
|
63
63
|
* @param - ID of the denied arrival to let the person in on.
|
|
64
64
|
*/
|
|
65
|
-
(arrivalId: string, options?: OverrideArrivalAsGrantedOptions): Promise<NonNullablePaths<OverrideArrivalAsGrantedResponse, `arrival.planBenefit.poolId` | `arrival.planBenefit.benefitKey` | `arrival.planBenefit.displayName` | `arrival.planBenefit.type` | `arrival.scheduledEvent.eventId` | `arrival.scheduledEvent.displayName` | `arrival.scheduledEvent.appId` | `arrival.
|
|
65
|
+
(arrivalId: string, options?: OverrideArrivalAsGrantedOptions): Promise<NonNullablePaths<OverrideArrivalAsGrantedResponse, `arrival.planBenefit.poolId` | `arrival.planBenefit.benefitKey` | `arrival.planBenefit.displayName` | `arrival.planBenefit.type` | `arrival.scheduledEvent.eventId` | `arrival.scheduledEvent.displayName` | `arrival.scheduledEvent.appId` | `arrival.contactDetails.contactId` | `arrival.source.identifiedBy` | `arrival.source.createdBy.anonymousVisitorId` | `arrival.source.createdBy.memberId` | `arrival.source.createdBy.wixUserId` | `arrival.source.createdBy.appId` | `arrival.area._id` | `arrival.area.locationId` | `arrival.area.name` | `arrival.area.entranceId` | `arrival.area.entranceName` | `arrival.eligibilityDetails.issues` | `arrival.eligibilityDetails.missingIntakeForms` | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId` | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `arrival.eligibilityDetails.planBenefits` | `arrival.eligibilityDetails.scheduledEvents` | `arrival.status`, 4> & {
|
|
66
66
|
__applicationErrorsType?: OverrideArrivalAsGrantedApplicationErrors;
|
|
67
67
|
}>;
|
|
68
68
|
}
|
|
@@ -70,14 +70,15 @@ interface OverrideArrivalAsGrantedSignature {
|
|
|
70
70
|
declare function checkEligibility$1(httpClient: HttpClient): CheckEligibilitySignature;
|
|
71
71
|
interface CheckEligibilitySignature {
|
|
72
72
|
/**
|
|
73
|
-
* Checks whether a contact would be granted entry
|
|
73
|
+
* Checks whether a contact would be granted entry at an entrance, into the area it belongs to, without recording
|
|
74
|
+
* or redeeming anything. It takes the same `entranceId` as Create Arrival.
|
|
74
75
|
*
|
|
75
76
|
* The response is `eligibilityDetails` as Create Arrival would record it, with the `status` Create Arrival would
|
|
76
|
-
* derive from it, and `
|
|
77
|
+
* derive from it, and the contact's `contactDetails` (name and picture) as Contacts holds them now. With
|
|
77
78
|
* `scheduledEventSearchWindow`, events found only in that window are also listed, with `OUTSIDE_ENTRY_WINDOW`.
|
|
78
79
|
* Scheduled events are read only while the area's `policy.scheduledEventsPolicy.entryGrantingAppIds` is not
|
|
79
|
-
* empty. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, an `
|
|
80
|
-
* no
|
|
80
|
+
* empty. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, an `entranceId` that names
|
|
81
|
+
* no entrance with `ENTRANCE_NOT_FOUND`, and the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE`) when Pricing Plans cannot be
|
|
81
82
|
* reached.
|
|
82
83
|
* Nothing is stored. This method reveals plan state, so it has its own permission rather than the read
|
|
83
84
|
* permission of arrivals.
|
|
@@ -87,7 +88,7 @@ interface CheckEligibilitySignature {
|
|
|
87
88
|
* is written. No balance is reported: credits left are read from Pricing Plans. Check Eligibility By Credential
|
|
88
89
|
* returns the same fields.
|
|
89
90
|
*/
|
|
90
|
-
(contactId: string, options?: NonNullablePaths<CheckEligibilityOptions, `
|
|
91
|
+
(contactId: string, options?: NonNullablePaths<CheckEligibilityOptions, `entranceId` | `scheduledEventSearchWindow.endDate` | `scheduledEventSearchWindow.startDate`, 1>): Promise<NonNullablePaths<CheckEligibilityResponse, `contactDetails.contactId` | `status` | `eligibilityDetails.issues` | `eligibilityDetails.missingIntakeForms` | `eligibilityDetails.missingIntakeForms.${number}.formId` | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `eligibilityDetails.planBenefits` | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId` | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey` | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName` | `eligibilityDetails.planBenefits.${number}.planBenefit.type` | `eligibilityDetails.scheduledEvents` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId` | `recentArrival.arrivalId`, 4> & {
|
|
91
92
|
__applicationErrorsType?: CheckEligibilityApplicationErrors;
|
|
92
93
|
}>;
|
|
93
94
|
}
|
|
@@ -99,7 +100,7 @@ interface GetArrivalSignature {
|
|
|
99
100
|
* @param - ID of the arrival to retrieve.
|
|
100
101
|
* @returns Requested arrival.
|
|
101
102
|
*/
|
|
102
|
-
(arrivalId: string): Promise<NonNullablePaths<Arrival, `planBenefit.poolId` | `planBenefit.benefitKey` | `planBenefit.displayName` | `planBenefit.type` | `scheduledEvent.eventId` | `scheduledEvent.displayName` | `scheduledEvent.appId` | `
|
|
103
|
+
(arrivalId: string): Promise<NonNullablePaths<Arrival, `planBenefit.poolId` | `planBenefit.benefitKey` | `planBenefit.displayName` | `planBenefit.type` | `scheduledEvent.eventId` | `scheduledEvent.displayName` | `scheduledEvent.appId` | `contactDetails.contactId` | `source.identifiedBy` | `source.createdBy.anonymousVisitorId` | `source.createdBy.memberId` | `source.createdBy.wixUserId` | `source.createdBy.appId` | `area._id` | `area.locationId` | `area.name` | `area.entranceId` | `area.entranceName` | `eligibilityDetails.issues` | `eligibilityDetails.missingIntakeForms` | `eligibilityDetails.missingIntakeForms.${number}.formId` | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `eligibilityDetails.planBenefits` | `eligibilityDetails.scheduledEvents` | `status`, 3>>;
|
|
103
104
|
}
|
|
104
105
|
/** @internal */
|
|
105
106
|
declare function countArrivals$1(httpClient: HttpClient): CountArrivalsSignature;
|
|
@@ -120,17 +121,18 @@ interface CountArrivalsSignature {
|
|
|
120
121
|
declare function checkEligibilityByCredential$1(httpClient: HttpClient): CheckEligibilityByCredentialSignature;
|
|
121
122
|
interface CheckEligibilityByCredentialSignature {
|
|
122
123
|
/**
|
|
123
|
-
* Checks whether the holder of a presented credential would be granted entry
|
|
124
|
-
* anything or redeeming anything.
|
|
124
|
+
* Checks whether the holder of a presented credential would be granted entry at an entrance, into the area it
|
|
125
|
+
* belongs to, without recording anything or redeeming anything.
|
|
125
126
|
*
|
|
126
127
|
* This is Check Eligibility in the Arrivals Service with the person identified by what they present instead
|
|
127
128
|
* of by `contactId`: the token or identifier is resolved to its credential and holder, then the same
|
|
128
129
|
* evaluation runs. A scanner app uses it to show a client their standing without admitting them: their benefits
|
|
129
130
|
* for this area and their scheduled events, each with its own issue, the forms they are missing, and the
|
|
130
|
-
* status a scan would get.
|
|
131
|
-
*
|
|
131
|
+
* status a scan would get. It takes the same `entranceId` as Create Arrival By Credential, so a scanner checks
|
|
132
|
+
* and records at the one position it holds. The response has the same fields Check Eligibility returns, always
|
|
133
|
+
* against the area's own entry window, so that it predicts the Create Arrival that follows the scan. A token that does not
|
|
132
134
|
* resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`; an identifier that belongs to no
|
|
133
|
-
* credential fails with `IDENTIFIER_NOT_FOUND`, and an `
|
|
135
|
+
* credential fails with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; when
|
|
134
136
|
* Pricing Plans cannot be reached the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE`), as Create Arrival does. This method
|
|
135
137
|
* reveals plan state, so it has its own permission rather
|
|
136
138
|
* than the read permission of arrivals.
|
|
@@ -138,7 +140,7 @@ interface CheckEligibilityByCredentialSignature {
|
|
|
138
140
|
* Arrival would derive from it. Nothing was recorded. The same fields Check Eligibility returns, always against the
|
|
139
141
|
* area's own entry window.
|
|
140
142
|
*/
|
|
141
|
-
(options
|
|
143
|
+
(options: NonNullablePaths<CheckEligibilityByCredentialOptions, `entranceId`, 0>): Promise<NonNullablePaths<CheckEligibilityByCredentialResponse, `contactDetails.contactId` | `status` | `eligibilityDetails.issues` | `eligibilityDetails.missingIntakeForms` | `eligibilityDetails.missingIntakeForms.${number}.formId` | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `eligibilityDetails.planBenefits` | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId` | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey` | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName` | `eligibilityDetails.planBenefits.${number}.planBenefit.type` | `eligibilityDetails.scheduledEvents` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId` | `recentArrival.arrivalId`, 4> & {
|
|
142
144
|
__applicationErrorsType?: CheckEligibilityByCredentialApplicationErrors;
|
|
143
145
|
}>;
|
|
144
146
|
}
|
|
@@ -153,11 +155,11 @@ interface CreateArrivalByCredentialSignature {
|
|
|
153
155
|
* A token that does not resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`, an identifier
|
|
154
156
|
* that belongs to none with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with
|
|
155
157
|
* `ENTRANCE_NOT_FOUND`; nothing is recorded. The arrival is recorded at the entrance, in the area it belongs to,
|
|
156
|
-
* with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD
|
|
158
|
+
* with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD` and
|
|
157
159
|
* `source.createdBy` naming the staff member or the device. When Pricing Plans cannot be reached the
|
|
158
160
|
* call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE`) and records nothing.
|
|
159
161
|
*/
|
|
160
|
-
(options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>): Promise<NonNullablePaths<CreateArrivalByCredentialResponse, `arrival.planBenefit.poolId` | `arrival.planBenefit.benefitKey` | `arrival.planBenefit.displayName` | `arrival.planBenefit.type` | `arrival.scheduledEvent.eventId` | `arrival.scheduledEvent.displayName` | `arrival.scheduledEvent.appId` | `arrival.
|
|
162
|
+
(options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>): Promise<NonNullablePaths<CreateArrivalByCredentialResponse, `arrival.planBenefit.poolId` | `arrival.planBenefit.benefitKey` | `arrival.planBenefit.displayName` | `arrival.planBenefit.type` | `arrival.scheduledEvent.eventId` | `arrival.scheduledEvent.displayName` | `arrival.scheduledEvent.appId` | `arrival.contactDetails.contactId` | `arrival.source.identifiedBy` | `arrival.source.createdBy.anonymousVisitorId` | `arrival.source.createdBy.memberId` | `arrival.source.createdBy.wixUserId` | `arrival.source.createdBy.appId` | `arrival.area._id` | `arrival.area.locationId` | `arrival.area.name` | `arrival.area.entranceId` | `arrival.area.entranceName` | `arrival.eligibilityDetails.issues` | `arrival.eligibilityDetails.missingIntakeForms` | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId` | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `arrival.eligibilityDetails.planBenefits` | `arrival.eligibilityDetails.scheduledEvents` | `arrival.status`, 4> & {
|
|
161
163
|
__applicationErrorsType?: CreateArrivalByCredentialApplicationErrors;
|
|
162
164
|
}>;
|
|
163
165
|
}
|
|
@@ -6,7 +6,7 @@ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
|
|
|
6
6
|
* eligibility engine found (`eligibilityDetails`), and whether access was given (`status`). Arrivals are written
|
|
7
7
|
* only by Create Arrival, directly or through Create Arrival By Credential. An arrival changes only through Override Arrival as
|
|
8
8
|
* Granted, which moves a denial to `GRANTED`, and when two contacts are merged in CRM, which moves
|
|
9
|
-
* `
|
|
9
|
+
* `contactDetails.contactId` to the surviving contact; the snapshot stays as it was. The person's name and picture are kept as they were
|
|
10
10
|
* when the arrival was written, and a granted arrival keeps what granted the entry. `eligibilityDetails` and
|
|
11
11
|
* `overrideReason` say why a person was not eligible, so they are returned only to callers with the
|
|
12
12
|
* `arrivals:v1:arrival:read_eligibility_details` permission.
|
|
@@ -44,8 +44,8 @@ interface Arrival extends ArrivalGrantedByOneOf {
|
|
|
44
44
|
* @readonly
|
|
45
45
|
*/
|
|
46
46
|
_updatedDate?: Date | null;
|
|
47
|
-
/** Who arrived
|
|
48
|
-
|
|
47
|
+
/** 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. */
|
|
48
|
+
contactDetails?: ContactDetails;
|
|
49
49
|
/**
|
|
50
50
|
* How the arrival came to be, and who created it. Set by the server.
|
|
51
51
|
* @readonly
|
|
@@ -96,17 +96,6 @@ interface ArrivalGrantedByOneOf {
|
|
|
96
96
|
*/
|
|
97
97
|
scheduledEvent?: ScheduledEvent;
|
|
98
98
|
}
|
|
99
|
-
/** Who arrived: the contact, with a snapshot of their name and picture, and their credential when they hold one. */
|
|
100
|
-
interface Attendee {
|
|
101
|
-
/** The contact who arrived, with their name and picture as Contacts held them when the arrival was written. On Create Arrival only `contactDetails.contactId` is sent; the server fills in the rest. */
|
|
102
|
-
contactDetails?: ContactDetails;
|
|
103
|
-
/**
|
|
104
|
-
* ID of the person's contact credential, when they hold one. Set by the server: the credential whose token or identifier was presented at a scan, or the contact's credential on an arrival written by contact ID; a value sent when setting an arrival is ignored. Whether something was presented is `source.identifiedBy`, not this field. Absent when the contact has no credential. A CRM contact merge does not change it, so it may name a credential the merge deleted; to find all of a person's arrivals, query by `attendee.contactDetails.contactId`.
|
|
105
|
-
* @format GUID
|
|
106
|
-
* @readonly
|
|
107
|
-
*/
|
|
108
|
-
contactCredentialId?: string | null;
|
|
109
|
-
}
|
|
110
99
|
/**
|
|
111
100
|
* The person who arrived: their contact ID, and their name and picture as the Contacts API held them when the
|
|
112
101
|
* arrival was written. The name and picture are a snapshot — for history and live lists without a Contacts
|
|
@@ -115,7 +104,7 @@ interface Attendee {
|
|
|
115
104
|
*/
|
|
116
105
|
interface ContactDetails {
|
|
117
106
|
/**
|
|
118
|
-
* ID of the contact who arrived. The only field of `contactDetails` sent when
|
|
107
|
+
* ID of the contact who arrived. The only field of `contactDetails` sent when creating an arrival.
|
|
119
108
|
* @format GUID
|
|
120
109
|
*/
|
|
121
110
|
contactId?: string;
|
|
@@ -139,13 +128,13 @@ interface ContactDetails {
|
|
|
139
128
|
}
|
|
140
129
|
/** How an arrival came to be, and who created it. Set by the server. */
|
|
141
130
|
interface ArrivalSource {
|
|
142
|
-
/** 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
|
|
131
|
+
/** 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 — staff or a device — is `createdBy`. */
|
|
143
132
|
identifiedBy?: IdentificationMethodWithLiterals;
|
|
144
133
|
/**
|
|
145
134
|
* Who created the arrival, from the call identity: a Wix user (`wixUserId`) — staff in a scanner app, or an owner on
|
|
146
135
|
* the contact card — or an app (`appId`) — a reader at an entrance, or a partner app. This, not `identifiedBy`, is what tells staff
|
|
147
136
|
* from devices. Only `wixUserId` or `appId` is ever set; `anonymousVisitorId` and `memberId` never appear on an arrival,
|
|
148
|
-
* since members and visitors cannot
|
|
137
|
+
* since members and visitors cannot create arrivals. Who let the person in against a denial is `overriddenBy`, not this field.
|
|
149
138
|
*/
|
|
150
139
|
createdBy?: CommonIdentificationData;
|
|
151
140
|
}
|
|
@@ -480,8 +469,8 @@ interface ArrivalDenied {
|
|
|
480
469
|
}
|
|
481
470
|
interface CreateArrivalRequest {
|
|
482
471
|
/**
|
|
483
|
-
* Arrival to create. Only `
|
|
484
|
-
* the rest of `
|
|
472
|
+
* Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field —
|
|
473
|
+
* the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the
|
|
485
474
|
* entrance's name, what granted the entry — is set by the server.
|
|
486
475
|
*/
|
|
487
476
|
arrival: Arrival;
|
|
@@ -529,10 +518,10 @@ interface CheckEligibilityRequest {
|
|
|
529
518
|
*/
|
|
530
519
|
contactId: string;
|
|
531
520
|
/**
|
|
532
|
-
* ID of the
|
|
521
|
+
* ID of the entrance to check eligibility at, one of an area's entrances. Eligibility is checked for the area it belongs to.
|
|
533
522
|
* @format GUID
|
|
534
523
|
*/
|
|
535
|
-
|
|
524
|
+
entranceId: string;
|
|
536
525
|
/**
|
|
537
526
|
* A range of time to look for the person's scheduled events in, besides the area's
|
|
538
527
|
* `policy.scheduledEventsPolicy.entryWindow`, for a what-if such as "which of this client's classes this evening could
|
|
@@ -565,8 +554,8 @@ interface ScheduledEventSearchWindow {
|
|
|
565
554
|
* returns the same fields.
|
|
566
555
|
*/
|
|
567
556
|
interface CheckEligibilityResponse {
|
|
568
|
-
/** The contact given: their contact ID, name and picture as Contacts holds them now
|
|
569
|
-
|
|
557
|
+
/** The contact given: their contact ID, name and picture as Contacts holds them now. When creating an arrival, send `arrival.contactDetails.contactId`; the server fills in the rest. */
|
|
558
|
+
contactDetails?: ContactDetails;
|
|
570
559
|
/** 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. */
|
|
571
560
|
status?: StatusWithLiterals;
|
|
572
561
|
/**
|
|
@@ -868,10 +857,10 @@ interface CheckEligibilityByCredentialRequest extends CheckEligibilityByCredenti
|
|
|
868
857
|
/** 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. */
|
|
869
858
|
identifier?: PresentedIdentifier;
|
|
870
859
|
/**
|
|
871
|
-
* ID of the area
|
|
860
|
+
* ID of the entrance the credential is presented at, one of an area's entrances. Eligibility is checked for the area it belongs to.
|
|
872
861
|
* @format GUID
|
|
873
862
|
*/
|
|
874
|
-
|
|
863
|
+
entranceId: string;
|
|
875
864
|
}
|
|
876
865
|
/** @oneof */
|
|
877
866
|
interface CheckEligibilityByCredentialRequestCredentialOneOf {
|
|
@@ -909,8 +898,8 @@ type TypeWithLiterals = Type | 'NFC_CARD';
|
|
|
909
898
|
* area's own entry window.
|
|
910
899
|
*/
|
|
911
900
|
interface CheckEligibilityByCredentialResponse {
|
|
912
|
-
/** The holder of the presented credential: their contact ID, name and picture as Contacts holds them now
|
|
913
|
-
|
|
901
|
+
/** The holder of the presented credential: their contact ID, name and picture as Contacts holds them now. */
|
|
902
|
+
contactDetails?: ContactDetails;
|
|
914
903
|
/** 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. */
|
|
915
904
|
status?: StatusWithLiterals;
|
|
916
905
|
/**
|
|
@@ -991,7 +980,7 @@ type OverrideArrivalAsGrantedApplicationErrors = {
|
|
|
991
980
|
};
|
|
992
981
|
/** @docsIgnore */
|
|
993
982
|
type CheckEligibilityApplicationErrors = {
|
|
994
|
-
code?: '
|
|
983
|
+
code?: 'ENTRANCE_NOT_FOUND';
|
|
995
984
|
description?: string;
|
|
996
985
|
data?: Record<string, any>;
|
|
997
986
|
} | {
|
|
@@ -1035,7 +1024,7 @@ type CheckEligibilityByCredentialApplicationErrors = {
|
|
|
1035
1024
|
description?: string;
|
|
1036
1025
|
data?: Record<string, any>;
|
|
1037
1026
|
} | {
|
|
1038
|
-
code?: '
|
|
1027
|
+
code?: 'ENTRANCE_NOT_FOUND';
|
|
1039
1028
|
description?: string;
|
|
1040
1029
|
data?: Record<string, any>;
|
|
1041
1030
|
} | {
|
|
@@ -1073,9 +1062,9 @@ type CreateArrivalByCredentialApplicationErrors = {
|
|
|
1073
1062
|
* Evaluates a person for an area and writes one arrival, whatever it finds about them. For the flows that call
|
|
1074
1063
|
* it — scans, the dashboard, readers — see About Arrivals.
|
|
1075
1064
|
*
|
|
1076
|
-
* Only `arrival.
|
|
1077
|
-
* area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture
|
|
1078
|
-
*
|
|
1065
|
+
* Only `arrival.contactDetails.contactId`, `arrival.area.entranceId` and `denialOverride` are read; the
|
|
1066
|
+
* area is the one the entrance belongs to. Everything else is set by the server: the contact's name and picture,
|
|
1067
|
+
* `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the
|
|
1079
1068
|
* entrance's name, and what granted the entry. `status` follows from the entry's issues:
|
|
1080
1069
|
* - none, or only `INTAKE_FORM_MISSING` for forms that do not block entry: **`GRANTED`**, with `planBenefit` or
|
|
1081
1070
|
* `scheduledEvent` naming what admitted the person; the server picks it by the rule on `planBenefit`: an admitting item, free before finite.
|
|
@@ -1094,22 +1083,21 @@ type CreateArrivalByCredentialApplicationErrors = {
|
|
|
1094
1083
|
* reached, the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE`) and records nothing — unless it carries `denialOverride`: staff
|
|
1095
1084
|
* have decided, so the arrival is written `GRANTED` with `PRICING_PLANS_UNAVAILABLE` in its issues, no plan
|
|
1096
1085
|
* benefit, and nothing redeemed.
|
|
1097
|
-
* @param arrival - Arrival to create. Only `
|
|
1098
|
-
* the rest of `
|
|
1086
|
+
* @param arrival - Arrival to create. Only `contactDetails.contactId` and `area.entranceId` are read; every other field —
|
|
1087
|
+
* the rest of `contactDetails`, `eligibilityDetails`, `status`, `source`, the area's ID, name and location, the
|
|
1099
1088
|
* entrance's name, what granted the entry — is set by the server.
|
|
1100
1089
|
* @internal
|
|
1101
1090
|
* @documentationMaturity preview
|
|
1102
1091
|
* @requiredField arrival
|
|
1103
1092
|
* @requiredField arrival.area
|
|
1104
1093
|
* @requiredField arrival.area.entranceId
|
|
1105
|
-
* @requiredField arrival.
|
|
1106
|
-
* @requiredField arrival.
|
|
1107
|
-
* @requiredField arrival.attendee.contactDetails.contactId
|
|
1094
|
+
* @requiredField arrival.contactDetails
|
|
1095
|
+
* @requiredField arrival.contactDetails.contactId
|
|
1108
1096
|
* @permissionId arrivals:v1:arrival:create_arrival
|
|
1109
1097
|
* @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.
|
|
1110
1098
|
* @fqn wix.arrivals.v1.ArrivalsService.CreateArrival
|
|
1111
1099
|
*/
|
|
1112
|
-
declare function createArrival(arrival: NonNullablePaths<Arrival, `area` | `area.entranceId` | `
|
|
1100
|
+
declare function createArrival(arrival: NonNullablePaths<Arrival, `area` | `area.entranceId` | `contactDetails` | `contactDetails.contactId`, 1>, options?: CreateArrivalOptions): Promise<NonNullablePaths<Arrival, `planBenefit.poolId` | `planBenefit.benefitKey` | `planBenefit.displayName` | `planBenefit.type` | `scheduledEvent.eventId` | `scheduledEvent.displayName` | `scheduledEvent.appId` | `contactDetails.contactId` | `source.identifiedBy` | `source.createdBy.anonymousVisitorId` | `source.createdBy.memberId` | `source.createdBy.wixUserId` | `source.createdBy.appId` | `area._id` | `area.locationId` | `area.name` | `area.entranceId` | `area.entranceName` | `eligibilityDetails.issues` | `eligibilityDetails.missingIntakeForms` | `eligibilityDetails.missingIntakeForms.${number}.formId` | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `eligibilityDetails.planBenefits` | `eligibilityDetails.scheduledEvents` | `status`, 3> & {
|
|
1113
1101
|
__applicationErrorsType?: CreateArrivalApplicationErrors;
|
|
1114
1102
|
}>;
|
|
1115
1103
|
interface CreateArrivalOptions {
|
|
@@ -1147,7 +1135,7 @@ interface CreateArrivalOptions {
|
|
|
1147
1135
|
* @permissionId arrivals:v1:arrival:override_arrival_as_granted
|
|
1148
1136
|
* @fqn wix.arrivals.v1.ArrivalsService.OverrideArrivalAsGranted
|
|
1149
1137
|
*/
|
|
1150
|
-
declare function overrideArrivalAsGranted(arrivalId: string, options?: OverrideArrivalAsGrantedOptions): Promise<NonNullablePaths<OverrideArrivalAsGrantedResponse, `arrival.planBenefit.poolId` | `arrival.planBenefit.benefitKey` | `arrival.planBenefit.displayName` | `arrival.planBenefit.type` | `arrival.scheduledEvent.eventId` | `arrival.scheduledEvent.displayName` | `arrival.scheduledEvent.appId` | `arrival.
|
|
1138
|
+
declare function overrideArrivalAsGranted(arrivalId: string, options?: OverrideArrivalAsGrantedOptions): Promise<NonNullablePaths<OverrideArrivalAsGrantedResponse, `arrival.planBenefit.poolId` | `arrival.planBenefit.benefitKey` | `arrival.planBenefit.displayName` | `arrival.planBenefit.type` | `arrival.scheduledEvent.eventId` | `arrival.scheduledEvent.displayName` | `arrival.scheduledEvent.appId` | `arrival.contactDetails.contactId` | `arrival.source.identifiedBy` | `arrival.source.createdBy.anonymousVisitorId` | `arrival.source.createdBy.memberId` | `arrival.source.createdBy.wixUserId` | `arrival.source.createdBy.appId` | `arrival.area._id` | `arrival.area.locationId` | `arrival.area.name` | `arrival.area.entranceId` | `arrival.area.entranceName` | `arrival.eligibilityDetails.issues` | `arrival.eligibilityDetails.missingIntakeForms` | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId` | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `arrival.eligibilityDetails.planBenefits` | `arrival.eligibilityDetails.scheduledEvents` | `arrival.status`, 4> & {
|
|
1151
1139
|
__applicationErrorsType?: OverrideArrivalAsGrantedApplicationErrors;
|
|
1152
1140
|
}>;
|
|
1153
1141
|
interface OverrideArrivalAsGrantedOptions {
|
|
@@ -1158,14 +1146,15 @@ interface OverrideArrivalAsGrantedOptions {
|
|
|
1158
1146
|
overrideReason?: string | null;
|
|
1159
1147
|
}
|
|
1160
1148
|
/**
|
|
1161
|
-
* Checks whether a contact would be granted entry
|
|
1149
|
+
* Checks whether a contact would be granted entry at an entrance, into the area it belongs to, without recording
|
|
1150
|
+
* or redeeming anything. It takes the same `entranceId` as Create Arrival.
|
|
1162
1151
|
*
|
|
1163
1152
|
* The response is `eligibilityDetails` as Create Arrival would record it, with the `status` Create Arrival would
|
|
1164
|
-
* derive from it, and `
|
|
1153
|
+
* derive from it, and the contact's `contactDetails` (name and picture) as Contacts holds them now. With
|
|
1165
1154
|
* `scheduledEventSearchWindow`, events found only in that window are also listed, with `OUTSIDE_ENTRY_WINDOW`.
|
|
1166
1155
|
* Scheduled events are read only while the area's `policy.scheduledEventsPolicy.entryGrantingAppIds` is not
|
|
1167
|
-
* empty. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, an `
|
|
1168
|
-
* no
|
|
1156
|
+
* empty. A `contactId` that is not a contact of the site fails with `CONTACT_NOT_FOUND`, an `entranceId` that names
|
|
1157
|
+
* no entrance with `ENTRANCE_NOT_FOUND`, and the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE`) when Pricing Plans cannot be
|
|
1169
1158
|
* reached.
|
|
1170
1159
|
* Nothing is stored. This method reveals plan state, so it has its own permission rather than the read
|
|
1171
1160
|
* permission of arrivals.
|
|
@@ -1173,7 +1162,7 @@ interface OverrideArrivalAsGrantedOptions {
|
|
|
1173
1162
|
* @internal
|
|
1174
1163
|
* @documentationMaturity preview
|
|
1175
1164
|
* @requiredField contactId
|
|
1176
|
-
* @requiredField options.
|
|
1165
|
+
* @requiredField options.entranceId
|
|
1177
1166
|
* @requiredField options.scheduledEventSearchWindow.endDate
|
|
1178
1167
|
* @requiredField options.scheduledEventSearchWindow.startDate
|
|
1179
1168
|
* @permissionId arrivals:v1:arrival:check_eligibility
|
|
@@ -1183,15 +1172,15 @@ interface OverrideArrivalAsGrantedOptions {
|
|
|
1183
1172
|
* returns the same fields.
|
|
1184
1173
|
* @fqn wix.arrivals.v1.ArrivalsService.CheckEligibility
|
|
1185
1174
|
*/
|
|
1186
|
-
declare function checkEligibility(contactId: string, options?: NonNullablePaths<CheckEligibilityOptions, `
|
|
1175
|
+
declare function checkEligibility(contactId: string, options?: NonNullablePaths<CheckEligibilityOptions, `entranceId` | `scheduledEventSearchWindow.endDate` | `scheduledEventSearchWindow.startDate`, 1>): Promise<NonNullablePaths<CheckEligibilityResponse, `contactDetails.contactId` | `status` | `eligibilityDetails.issues` | `eligibilityDetails.missingIntakeForms` | `eligibilityDetails.missingIntakeForms.${number}.formId` | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `eligibilityDetails.planBenefits` | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId` | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey` | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName` | `eligibilityDetails.planBenefits.${number}.planBenefit.type` | `eligibilityDetails.scheduledEvents` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId` | `recentArrival.arrivalId`, 4> & {
|
|
1187
1176
|
__applicationErrorsType?: CheckEligibilityApplicationErrors;
|
|
1188
1177
|
}>;
|
|
1189
1178
|
interface CheckEligibilityOptions {
|
|
1190
1179
|
/**
|
|
1191
|
-
* ID of the
|
|
1180
|
+
* ID of the entrance to check eligibility at, one of an area's entrances. Eligibility is checked for the area it belongs to.
|
|
1192
1181
|
* @format GUID
|
|
1193
1182
|
*/
|
|
1194
|
-
|
|
1183
|
+
entranceId: string;
|
|
1195
1184
|
/**
|
|
1196
1185
|
* A range of time to look for the person's scheduled events in, besides the area's
|
|
1197
1186
|
* `policy.scheduledEventsPolicy.entryWindow`, for a what-if such as "which of this client's classes this evening could
|
|
@@ -1214,11 +1203,11 @@ interface CheckEligibilityOptions {
|
|
|
1214
1203
|
* @returns Requested arrival.
|
|
1215
1204
|
* @fqn wix.arrivals.v1.ArrivalsService.GetArrival
|
|
1216
1205
|
*/
|
|
1217
|
-
declare function getArrival(arrivalId: string): Promise<NonNullablePaths<Arrival, `planBenefit.poolId` | `planBenefit.benefitKey` | `planBenefit.displayName` | `planBenefit.type` | `scheduledEvent.eventId` | `scheduledEvent.displayName` | `scheduledEvent.appId` | `
|
|
1206
|
+
declare function getArrival(arrivalId: string): Promise<NonNullablePaths<Arrival, `planBenefit.poolId` | `planBenefit.benefitKey` | `planBenefit.displayName` | `planBenefit.type` | `scheduledEvent.eventId` | `scheduledEvent.displayName` | `scheduledEvent.appId` | `contactDetails.contactId` | `source.identifiedBy` | `source.createdBy.anonymousVisitorId` | `source.createdBy.memberId` | `source.createdBy.wixUserId` | `source.createdBy.appId` | `area._id` | `area.locationId` | `area.name` | `area.entranceId` | `area.entranceName` | `eligibilityDetails.issues` | `eligibilityDetails.missingIntakeForms` | `eligibilityDetails.missingIntakeForms.${number}.formId` | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `eligibilityDetails.planBenefits` | `eligibilityDetails.scheduledEvents` | `status`, 3>>;
|
|
1218
1207
|
/**
|
|
1219
1208
|
* Retrieves a list of arrivals, given the provided [paging, filtering, and sorting][1].
|
|
1220
1209
|
*
|
|
1221
|
-
* Supported filter and sort fields: `id`, `
|
|
1210
|
+
* Supported filter and sort fields: `id`, `contactDetails.contactId`,
|
|
1222
1211
|
* `source.identifiedBy`, `area.id`, `area.locationId`, `area.entranceId`, `eligibilityDetails.issues`, `planBenefit.poolId`,
|
|
1223
1212
|
* `planBenefit.benefitKey`, `planBenefit.type`, `status`, `createdDate`.
|
|
1224
1213
|
* `eligibilityDetails.issues` is a list: filter it with `$hasSome` or `$hasAll`, for example
|
|
@@ -1254,49 +1243,49 @@ interface ArrivalsQueryBuilder {
|
|
|
1254
1243
|
* @param value - Value to compare against.
|
|
1255
1244
|
* @documentationMaturity preview
|
|
1256
1245
|
*/
|
|
1257
|
-
eq: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | '
|
|
1246
|
+
eq: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status', value: any) => ArrivalsQueryBuilder;
|
|
1258
1247
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1259
1248
|
* @param value - Value to compare against.
|
|
1260
1249
|
* @documentationMaturity preview
|
|
1261
1250
|
*/
|
|
1262
|
-
ne: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | '
|
|
1251
|
+
ne: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status', value: any) => ArrivalsQueryBuilder;
|
|
1263
1252
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1264
1253
|
* @param value - Value to compare against.
|
|
1265
1254
|
* @documentationMaturity preview
|
|
1266
1255
|
*/
|
|
1267
|
-
ge: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | '
|
|
1256
|
+
ge: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: any) => ArrivalsQueryBuilder;
|
|
1268
1257
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1269
1258
|
* @param value - Value to compare against.
|
|
1270
1259
|
* @documentationMaturity preview
|
|
1271
1260
|
*/
|
|
1272
|
-
gt: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | '
|
|
1261
|
+
gt: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: any) => ArrivalsQueryBuilder;
|
|
1273
1262
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1274
1263
|
* @param value - Value to compare against.
|
|
1275
1264
|
* @documentationMaturity preview
|
|
1276
1265
|
*/
|
|
1277
|
-
le: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | '
|
|
1266
|
+
le: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: any) => ArrivalsQueryBuilder;
|
|
1278
1267
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1279
1268
|
* @param value - Value to compare against.
|
|
1280
1269
|
* @documentationMaturity preview
|
|
1281
1270
|
*/
|
|
1282
|
-
lt: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | '
|
|
1271
|
+
lt: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: any) => ArrivalsQueryBuilder;
|
|
1283
1272
|
/** @param propertyName - Property whose value is compared with `string`.
|
|
1284
1273
|
* @param string - String to compare against. Case-insensitive.
|
|
1285
1274
|
* @documentationMaturity preview
|
|
1286
1275
|
*/
|
|
1287
|
-
startsWith: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '
|
|
1276
|
+
startsWith: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: string) => ArrivalsQueryBuilder;
|
|
1288
1277
|
/** @documentationMaturity preview */
|
|
1289
|
-
in: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | '
|
|
1278
|
+
in: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status', value: any) => ArrivalsQueryBuilder;
|
|
1290
1279
|
/** @documentationMaturity preview */
|
|
1291
|
-
exists: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | '
|
|
1280
|
+
exists: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status', value: boolean) => ArrivalsQueryBuilder;
|
|
1292
1281
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1293
1282
|
* @documentationMaturity preview
|
|
1294
1283
|
*/
|
|
1295
|
-
ascending: (...propertyNames: Array<'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | '
|
|
1284
|
+
ascending: (...propertyNames: Array<'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'eligibilityDetails.issues' | 'status'>) => ArrivalsQueryBuilder;
|
|
1296
1285
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1297
1286
|
* @documentationMaturity preview
|
|
1298
1287
|
*/
|
|
1299
|
-
descending: (...propertyNames: Array<'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | '
|
|
1288
|
+
descending: (...propertyNames: Array<'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'eligibilityDetails.issues' | 'status'>) => ArrivalsQueryBuilder;
|
|
1300
1289
|
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1301
1290
|
* @documentationMaturity preview
|
|
1302
1291
|
*/
|
|
@@ -1313,7 +1302,7 @@ interface ArrivalsQueryBuilder {
|
|
|
1313
1302
|
* @fqn wix.arrivals.v1.ArrivalsService.QueryArrivals
|
|
1314
1303
|
* @requiredField query
|
|
1315
1304
|
*/
|
|
1316
|
-
declare function typedQueryArrivals(query: ArrivalQuery): Promise<NonNullablePaths<QueryArrivalsResponse, `arrivals` | `arrivals.${number}.planBenefit.poolId` | `arrivals.${number}.planBenefit.benefitKey` | `arrivals.${number}.planBenefit.displayName` | `arrivals.${number}.planBenefit.type` | `arrivals.${number}.scheduledEvent.eventId` | `arrivals.${number}.scheduledEvent.displayName` | `arrivals.${number}.scheduledEvent.appId` | `arrivals.${number}.
|
|
1305
|
+
declare function typedQueryArrivals(query: ArrivalQuery): Promise<NonNullablePaths<QueryArrivalsResponse, `arrivals` | `arrivals.${number}.planBenefit.poolId` | `arrivals.${number}.planBenefit.benefitKey` | `arrivals.${number}.planBenefit.displayName` | `arrivals.${number}.planBenefit.type` | `arrivals.${number}.scheduledEvent.eventId` | `arrivals.${number}.scheduledEvent.displayName` | `arrivals.${number}.scheduledEvent.appId` | `arrivals.${number}.contactDetails.contactId` | `arrivals.${number}.source.identifiedBy` | `arrivals.${number}.source.createdBy.anonymousVisitorId` | `arrivals.${number}.source.createdBy.memberId` | `arrivals.${number}.source.createdBy.wixUserId` | `arrivals.${number}.source.createdBy.appId` | `arrivals.${number}.area._id` | `arrivals.${number}.area.locationId` | `arrivals.${number}.area.name` | `arrivals.${number}.area.entranceId` | `arrivals.${number}.area.entranceName` | `arrivals.${number}.status`, 4>>;
|
|
1317
1306
|
interface ArrivalQuerySpec extends QuerySpec {
|
|
1318
1307
|
paging: 'cursor';
|
|
1319
1308
|
wql: [
|
|
@@ -1329,8 +1318,7 @@ interface ArrivalQuerySpec extends QuerySpec {
|
|
|
1329
1318
|
'area._id',
|
|
1330
1319
|
'area.entranceId',
|
|
1331
1320
|
'area.locationId',
|
|
1332
|
-
'
|
|
1333
|
-
'attendee.contactDetails.contactId',
|
|
1321
|
+
'contactDetails.contactId',
|
|
1334
1322
|
'planBenefit.benefitKey',
|
|
1335
1323
|
'planBenefit.poolId',
|
|
1336
1324
|
'planBenefit.type',
|
|
@@ -1411,30 +1399,33 @@ interface CountArrivalsOptions {
|
|
|
1411
1399
|
filter?: Record<string, any> | null;
|
|
1412
1400
|
}
|
|
1413
1401
|
/**
|
|
1414
|
-
* Checks whether the holder of a presented credential would be granted entry
|
|
1415
|
-
* anything or redeeming anything.
|
|
1402
|
+
* Checks whether the holder of a presented credential would be granted entry at an entrance, into the area it
|
|
1403
|
+
* belongs to, without recording anything or redeeming anything.
|
|
1416
1404
|
*
|
|
1417
1405
|
* This is Check Eligibility in the Arrivals Service with the person identified by what they present instead
|
|
1418
1406
|
* of by `contactId`: the token or identifier is resolved to its credential and holder, then the same
|
|
1419
1407
|
* evaluation runs. A scanner app uses it to show a client their standing without admitting them: their benefits
|
|
1420
1408
|
* for this area and their scheduled events, each with its own issue, the forms they are missing, and the
|
|
1421
|
-
* status a scan would get.
|
|
1422
|
-
*
|
|
1409
|
+
* status a scan would get. It takes the same `entranceId` as Create Arrival By Credential, so a scanner checks
|
|
1410
|
+
* and records at the one position it holds. The response has the same fields Check Eligibility returns, always
|
|
1411
|
+
* against the area's own entry window, so that it predicts the Create Arrival that follows the scan. A token that does not
|
|
1423
1412
|
* resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`; an identifier that belongs to no
|
|
1424
|
-
* credential fails with `IDENTIFIER_NOT_FOUND`, and an `
|
|
1413
|
+
* credential fails with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with `ENTRANCE_NOT_FOUND`; when
|
|
1425
1414
|
* Pricing Plans cannot be reached the call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE`), as Create Arrival does. This method
|
|
1426
1415
|
* reveals plan state, so it has its own permission rather
|
|
1427
1416
|
* than the read permission of arrivals.
|
|
1428
1417
|
* @internal
|
|
1429
1418
|
* @documentationMaturity preview
|
|
1430
|
-
* @requiredField options
|
|
1419
|
+
* @requiredField options
|
|
1420
|
+
* @requiredField options.credential
|
|
1421
|
+
* @requiredField options.entranceId
|
|
1431
1422
|
* @permissionId arrivals:v1:arrival:check_eligibility_by_credential
|
|
1432
1423
|
* @returns What the engine would find for the credential's holder in this area, and the status Create
|
|
1433
1424
|
* Arrival would derive from it. Nothing was recorded. The same fields Check Eligibility returns, always against the
|
|
1434
1425
|
* area's own entry window.
|
|
1435
1426
|
* @fqn wix.arrivals.v1.CredentialArrivalsService.CheckEligibilityByCredential
|
|
1436
1427
|
*/
|
|
1437
|
-
declare function checkEligibilityByCredential(options
|
|
1428
|
+
declare function checkEligibilityByCredential(options: NonNullablePaths<CheckEligibilityByCredentialOptions, `entranceId`, 0>): Promise<NonNullablePaths<CheckEligibilityByCredentialResponse, `contactDetails.contactId` | `status` | `eligibilityDetails.issues` | `eligibilityDetails.missingIntakeForms` | `eligibilityDetails.missingIntakeForms.${number}.formId` | `eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `eligibilityDetails.planBenefits` | `eligibilityDetails.planBenefits.${number}.planBenefit.poolId` | `eligibilityDetails.planBenefits.${number}.planBenefit.benefitKey` | `eligibilityDetails.planBenefits.${number}.planBenefit.displayName` | `eligibilityDetails.planBenefits.${number}.planBenefit.type` | `eligibilityDetails.scheduledEvents` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.eventId` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.displayName` | `eligibilityDetails.scheduledEvents.${number}.scheduledEvent.appId` | `recentArrival.arrivalId`, 4> & {
|
|
1438
1429
|
__applicationErrorsType?: CheckEligibilityByCredentialApplicationErrors;
|
|
1439
1430
|
}>;
|
|
1440
1431
|
interface CheckEligibilityByCredentialOptions extends CheckEligibilityByCredentialOptionsCredentialOneOf {
|
|
@@ -1446,10 +1437,10 @@ interface CheckEligibilityByCredentialOptions extends CheckEligibilityByCredenti
|
|
|
1446
1437
|
/** 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. */
|
|
1447
1438
|
identifier?: PresentedIdentifier;
|
|
1448
1439
|
/**
|
|
1449
|
-
* ID of the area
|
|
1440
|
+
* ID of the entrance the credential is presented at, one of an area's entrances. Eligibility is checked for the area it belongs to.
|
|
1450
1441
|
* @format GUID
|
|
1451
1442
|
*/
|
|
1452
|
-
|
|
1443
|
+
entranceId: string;
|
|
1453
1444
|
}
|
|
1454
1445
|
/** @oneof */
|
|
1455
1446
|
interface CheckEligibilityByCredentialOptionsCredentialOneOf {
|
|
@@ -1469,7 +1460,7 @@ interface CheckEligibilityByCredentialOptionsCredentialOneOf {
|
|
|
1469
1460
|
* A token that does not resolve to a live credential fails with `BAD_SIGNATURE` or `TOKEN_REVOKED`, an identifier
|
|
1470
1461
|
* that belongs to none with `IDENTIFIER_NOT_FOUND`, and an `entranceId` that names no entrance with
|
|
1471
1462
|
* `ENTRANCE_NOT_FOUND`; nothing is recorded. The arrival is recorded at the entrance, in the area it belongs to,
|
|
1472
|
-
* with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD
|
|
1463
|
+
* with `source.identifiedBy` `BY_TOKEN` or `BY_NFC_CARD` and
|
|
1473
1464
|
* `source.createdBy` naming the staff member or the device. When Pricing Plans cannot be reached the
|
|
1474
1465
|
* call fails with `UNAVAILABLE` (`PRICING_PLANS_UNAVAILABLE`) and records nothing.
|
|
1475
1466
|
* @internal
|
|
@@ -1480,7 +1471,7 @@ interface CheckEligibilityByCredentialOptionsCredentialOneOf {
|
|
|
1480
1471
|
* @permissionId arrivals:v1:arrival:create_arrival_by_credential
|
|
1481
1472
|
* @fqn wix.arrivals.v1.CredentialArrivalsService.CreateArrivalByCredential
|
|
1482
1473
|
*/
|
|
1483
|
-
declare function createArrivalByCredential(options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>): Promise<NonNullablePaths<CreateArrivalByCredentialResponse, `arrival.planBenefit.poolId` | `arrival.planBenefit.benefitKey` | `arrival.planBenefit.displayName` | `arrival.planBenefit.type` | `arrival.scheduledEvent.eventId` | `arrival.scheduledEvent.displayName` | `arrival.scheduledEvent.appId` | `arrival.
|
|
1474
|
+
declare function createArrivalByCredential(options: NonNullablePaths<CreateArrivalByCredentialOptions, `entranceId`, 0>): Promise<NonNullablePaths<CreateArrivalByCredentialResponse, `arrival.planBenefit.poolId` | `arrival.planBenefit.benefitKey` | `arrival.planBenefit.displayName` | `arrival.planBenefit.type` | `arrival.scheduledEvent.eventId` | `arrival.scheduledEvent.displayName` | `arrival.scheduledEvent.appId` | `arrival.contactDetails.contactId` | `arrival.source.identifiedBy` | `arrival.source.createdBy.anonymousVisitorId` | `arrival.source.createdBy.memberId` | `arrival.source.createdBy.wixUserId` | `arrival.source.createdBy.appId` | `arrival.area._id` | `arrival.area.locationId` | `arrival.area.name` | `arrival.area.entranceId` | `arrival.area.entranceName` | `arrival.eligibilityDetails.issues` | `arrival.eligibilityDetails.missingIntakeForms` | `arrival.eligibilityDetails.missingIntakeForms.${number}.formId` | `arrival.eligibilityDetails.missingIntakeForms.${number}.blocksEntry` | `arrival.eligibilityDetails.planBenefits` | `arrival.eligibilityDetails.scheduledEvents` | `arrival.status`, 4> & {
|
|
1484
1475
|
__applicationErrorsType?: CreateArrivalByCredentialApplicationErrors;
|
|
1485
1476
|
}>;
|
|
1486
1477
|
interface CreateArrivalByCredentialOptions extends CreateArrivalByCredentialOptionsCredentialOneOf {
|
|
@@ -1508,4 +1499,4 @@ interface CreateArrivalByCredentialOptionsCredentialOneOf {
|
|
|
1508
1499
|
identifier?: PresentedIdentifier;
|
|
1509
1500
|
}
|
|
1510
1501
|
|
|
1511
|
-
export { type AccountInfo, type ActionEvent, type AreaInfo, type Arrival, type ArrivalDenied, type ArrivalGranted, type ArrivalGrantedByOneOf, type ArrivalQuery, type ArrivalQuerySpec, type ArrivalSource, type ArrivalsQueryBuilder, type ArrivalsQueryResult, type
|
|
1502
|
+
export { type AccountInfo, type ActionEvent, type AreaInfo, type Arrival, type ArrivalDenied, type ArrivalGranted, type ArrivalGrantedByOneOf, type ArrivalQuery, type ArrivalQuerySpec, type ArrivalSource, type ArrivalsQueryBuilder, type ArrivalsQueryResult, type CheckEligibilityApplicationErrors, type CheckEligibilityByCredentialApplicationErrors, type CheckEligibilityByCredentialOptions, type CheckEligibilityByCredentialOptionsCredentialOneOf, type CheckEligibilityByCredentialRequest, type CheckEligibilityByCredentialRequestCredentialOneOf, type CheckEligibilityByCredentialResponse, type CheckEligibilityOptions, type CheckEligibilityRequest, type CheckEligibilityResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CommonQueryWithEntityContext, type ContactDetails, type CountArrivalsApplicationErrors, type CountArrivalsOptions, type CountArrivalsRequest, type CountArrivalsResponse, type CreateArrivalApplicationErrors, type CreateArrivalByCredentialApplicationErrors, type CreateArrivalByCredentialOptions, type CreateArrivalByCredentialOptionsCredentialOneOf, type CreateArrivalByCredentialRequest, type CreateArrivalByCredentialRequestCredentialOneOf, type CreateArrivalByCredentialResponse, type CreateArrivalOptions, type CreateArrivalRequest, type CreateArrivalResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DenialOverride, type DomainEvent, type DomainEventBodyOneOf, type EligibilityDetails, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, EntryIssue, type EntryIssueWithLiterals, type GetArrivalRequest, type GetArrivalResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentificationMethod, type IdentificationMethodWithLiterals, IdentityType, type IdentityTypeWithLiterals, type MessageEnvelope, type MissingIntakeForm, type OverrideArrivalAsGrantedApplicationErrors, type OverrideArrivalAsGrantedOptions, type OverrideArrivalAsGrantedRequest, type OverrideArrivalAsGrantedResponse, type PlanBenefit, type PlanBenefitEligibility, PlanBenefitIssue, type PlanBenefitIssueWithLiterals, PlanBenefitType, type PlanBenefitTypeWithLiterals, type PresentedIdentifier, type QueryArrivalsRequest, type QueryArrivalsResponse, type RecentArrival, type RestoreInfo, type ScheduledEvent, type ScheduledEventEligibility, ScheduledEventIssue, type ScheduledEventIssueWithLiterals, type ScheduledEventSearchWindow, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, Type, type TypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, checkEligibility, checkEligibilityByCredential, countArrivals, createArrival, createArrivalByCredential, getArrival, overrideArrivalAsGranted, queryArrivals, typedQueryArrivals, utils };
|