@wix/auto_sdk_arrivals_arrivals 1.0.2 → 1.0.4
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 +2 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +41 -28
- package/build/cjs/index.typings.js +2 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +41 -28
- package/build/cjs/meta.js +2 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +2 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +41 -28
- package/build/es/index.typings.mjs +2 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +41 -28
- package/build/es/meta.mjs +2 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +16 -10
- package/build/internal/cjs/index.typings.d.ts +57 -38
- package/build/internal/cjs/meta.d.ts +41 -28
- package/build/internal/es/index.d.mts +16 -10
- package/build/internal/es/index.typings.d.mts +57 -38
- package/build/internal/es/meta.d.mts +41 -28
- package/package.json +4 -4
|
@@ -100,7 +100,9 @@ interface ArrivalGrantedByOneOf {
|
|
|
100
100
|
* The person who arrived: their contact ID, and their name and picture as the Contacts API held them when the
|
|
101
101
|
* arrival was written. The name and picture are a snapshot — for history and live lists without a Contacts
|
|
102
102
|
* read; a later change in Contacts does not update them. A contact merge moves `contactId` to the surviving
|
|
103
|
-
* contact and leaves the snapshot as it was. Named as Bookings names the same thing on a booking.
|
|
103
|
+
* contact and leaves the snapshot as it was. Named as Bookings names the same thing on a booking. The name and
|
|
104
|
+
* picture are absent when the contact has none, or when Contacts did not answer (`CONTACTS_UNAVAILABLE` in
|
|
105
|
+
* `eligibilityDetails.issues`).
|
|
104
106
|
*/
|
|
105
107
|
interface ContactDetails {
|
|
106
108
|
/**
|
|
@@ -254,8 +256,9 @@ interface EligibilityDetails {
|
|
|
254
256
|
* The issues of the entry as a whole. The issues decide the status the evaluation gives: `GRANTED` when there are none, or only
|
|
255
257
|
* `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. When staff let the person in —
|
|
256
258
|
* afterwards with Override Arrival as Granted, or beforehand with `denialOverride` on Create Arrival — the status is
|
|
257
|
-
* `GRANTED` whatever the issues, and the issues show what was overridden. `PRICING_PLANS_UNAVAILABLE`
|
|
258
|
-
* only that way, with `denialOverride`, since otherwise
|
|
259
|
+
* `GRANTED` whatever the issues, and the issues show what was overridden. On an arrival, `PRICING_PLANS_UNAVAILABLE`
|
|
260
|
+
* and `CONTACTS_UNAVAILABLE` are found only that way, with `denialOverride`, since otherwise Create Arrival fails with
|
|
261
|
+
* `UNAVAILABLE`; Check Eligibility reports them without failing. A `DENIED` arrival always has at
|
|
259
262
|
* least one. Empty when nothing stood in the way.
|
|
260
263
|
* @maxSize 3
|
|
261
264
|
*/
|
|
@@ -268,8 +271,10 @@ interface EligibilityDetails {
|
|
|
268
271
|
/**
|
|
269
272
|
* The person's Pricing Plans benefits allowed into this area, each a `planBenefit` with its own `issues`: empty
|
|
270
273
|
* means the benefit admits. Listed on a `DENIED` arrival too, admitting ones included, so an override can take one
|
|
271
|
-
* later. The grant picks one by the rule on the arrival's `planBenefit` and records it there.
|
|
272
|
-
*
|
|
274
|
+
* later. The grant picks one by the rule on the arrival's `planBenefit` and records it there. Listed in the order of
|
|
275
|
+
* 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
|
|
276
|
+
* person holds no benefit for this area, and when the status of the contact's site member (`memberInfo.status` in
|
|
277
|
+
* Contacts) is `BLOCKED`, `DELETED` or `OFFLINE`, since such a member holds no plans here.
|
|
273
278
|
* @maxSize 20
|
|
274
279
|
*/
|
|
275
280
|
planBenefits?: PlanBenefitEligibility[];
|
|
@@ -288,8 +293,9 @@ interface EligibilityDetails {
|
|
|
288
293
|
* An issue of the entry as a whole. The issues decide the status the evaluation gives: `GRANTED` when there are none, or only
|
|
289
294
|
* `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. When staff let the person in —
|
|
290
295
|
* afterwards with Override Arrival as Granted, or beforehand with `denialOverride` on Create Arrival — the status is
|
|
291
|
-
* `GRANTED` whatever the issues, and the issues show what was overridden. `PRICING_PLANS_UNAVAILABLE`
|
|
292
|
-
* only that way, with `denialOverride`, since otherwise
|
|
296
|
+
* `GRANTED` whatever the issues, and the issues show what was overridden. On an arrival, `PRICING_PLANS_UNAVAILABLE`
|
|
297
|
+
* and `CONTACTS_UNAVAILABLE` are found only that way, with `denialOverride`, since otherwise Create Arrival fails with
|
|
298
|
+
* `UNAVAILABLE`; Check Eligibility reports them without failing. Why a single benefit or event does not admit is on
|
|
293
299
|
* that item (`PlanBenefitIssue`, `ScheduledEventIssue`), not here.
|
|
294
300
|
*/
|
|
295
301
|
declare enum EntryIssue {
|
|
@@ -297,22 +303,27 @@ declare enum EntryIssue {
|
|
|
297
303
|
* No grant the person holds admits them into this area now. A grant is what can grant entry — a plan benefit
|
|
298
304
|
* (`planBenefits`) or a scheduled event they are booked on (`scheduledEvents`) — the same two kinds an arrival
|
|
299
305
|
* records in `planBenefit` or `scheduledEvent` once granted. Either nothing was found — `planBenefits` and
|
|
300
|
-
* `scheduledEvents` are empty — or everything found has an issue of its own, which says why.
|
|
306
|
+
* `scheduledEvents` are empty — or everything found has an issue of its own, which says why. A contact whose site
|
|
307
|
+
* member's status (`memberInfo.status` in Contacts) is `BLOCKED`, `DELETED` or `OFFLINE` holds no plans here, so it
|
|
308
|
+
* finds none. Also reported when a
|
|
301
309
|
* credit pack would admit but the person is booked on an event here and now that still waits for approval: no
|
|
302
310
|
* credit is spent while the booking may be approved moments later (the event carries `PENDING_CONFIRMATION`).
|
|
303
311
|
* Declines at creation; staff override, or sell a plan, approve the booking or renew the plan and create a new
|
|
304
|
-
* arrival. Not reported when Pricing Plans did not answer: `PRICING_PLANS_UNAVAILABLE`
|
|
312
|
+
* arrival. Not reported when Pricing Plans or Contacts did not answer: `PRICING_PLANS_UNAVAILABLE` or
|
|
313
|
+
* `CONTACTS_UNAVAILABLE` takes its place.
|
|
305
314
|
*/
|
|
306
315
|
NO_ELIGIBLE_GRANT = "NO_ELIGIBLE_GRANT",
|
|
307
316
|
/** 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 staff can chase the paperwork. */
|
|
308
317
|
INTAKE_FORM_MISSING = "INTAKE_FORM_MISSING",
|
|
309
318
|
/** 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. Declines at creation; the override spends a credit. Not reported when nothing would be spent twice (an unlimited plan, a scheduled event). */
|
|
310
319
|
RECENT_ENTRY = "RECENT_ENTRY",
|
|
311
|
-
/** Pricing Plans did not answer, so plan benefits were not checked.
|
|
312
|
-
PRICING_PLANS_UNAVAILABLE = "PRICING_PLANS_UNAVAILABLE"
|
|
320
|
+
/** 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 staff 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`. */
|
|
321
|
+
PRICING_PLANS_UNAVAILABLE = "PRICING_PLANS_UNAVAILABLE",
|
|
322
|
+
/** 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 staff 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. */
|
|
323
|
+
CONTACTS_UNAVAILABLE = "CONTACTS_UNAVAILABLE"
|
|
313
324
|
}
|
|
314
325
|
/** @enumType */
|
|
315
|
-
type EntryIssueWithLiterals = EntryIssue | 'NO_ELIGIBLE_GRANT' | 'INTAKE_FORM_MISSING' | 'RECENT_ENTRY' | 'PRICING_PLANS_UNAVAILABLE';
|
|
326
|
+
type EntryIssueWithLiterals = EntryIssue | 'NO_ELIGIBLE_GRANT' | 'INTAKE_FORM_MISSING' | 'RECENT_ENTRY' | 'PRICING_PLANS_UNAVAILABLE' | 'CONTACTS_UNAVAILABLE';
|
|
316
327
|
/** An intake form the area's policy requires that the person has no valid submission for. */
|
|
317
328
|
interface MissingIntakeForm {
|
|
318
329
|
/**
|
|
@@ -384,15 +395,17 @@ declare enum PlanBenefitType {
|
|
|
384
395
|
type PlanBenefitTypeWithLiterals = PlanBenefitType | 'CREDIT' | 'UNLIMITED';
|
|
385
396
|
/** Why a Pricing Plans benefit does not admit. Where Pricing Plans has a word for a finding, the value uses it. */
|
|
386
397
|
declare enum PlanBenefitIssue {
|
|
387
|
-
/** The benefit's plan is not active — ended, cancelled or
|
|
398
|
+
/** 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. Staff override, or renew the plan and create a new arrival. */
|
|
388
399
|
PLAN_NOT_ACTIVE = "PLAN_NOT_ACTIVE",
|
|
389
400
|
/** A credit pack with no credits left, as Pricing Plans reports. Staff override, or sell credits and create a new arrival. */
|
|
390
401
|
NOT_ENOUGH_BALANCE = "NOT_ENOUGH_BALANCE",
|
|
391
|
-
/** The plan's usage policy does not allow entry at this hour or on this day, as Pricing Plans reports. */
|
|
392
|
-
OUTSIDE_ACCESS_HOURS = "OUTSIDE_ACCESS_HOURS"
|
|
402
|
+
/** 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`. */
|
|
403
|
+
OUTSIDE_ACCESS_HOURS = "OUTSIDE_ACCESS_HOURS",
|
|
404
|
+
/** 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. Staff override, or the client comes back in the next period. */
|
|
405
|
+
USAGE_LIMIT_REACHED = "USAGE_LIMIT_REACHED"
|
|
393
406
|
}
|
|
394
407
|
/** @enumType */
|
|
395
|
-
type PlanBenefitIssueWithLiterals = PlanBenefitIssue | 'PLAN_NOT_ACTIVE' | 'NOT_ENOUGH_BALANCE' | 'OUTSIDE_ACCESS_HOURS';
|
|
408
|
+
type PlanBenefitIssueWithLiterals = PlanBenefitIssue | 'PLAN_NOT_ACTIVE' | 'NOT_ENOUGH_BALANCE' | 'OUTSIDE_ACCESS_HOURS' | 'USAGE_LIMIT_REACHED';
|
|
396
409
|
/**
|
|
397
410
|
* A scheduled event the engine found for the person at this area, with whether it admits: the event itself, of
|
|
398
411
|
* the same type as the arrival's `scheduledEvent`, and its `issues`.
|
|
@@ -549,9 +562,9 @@ interface ScheduledEventSearchWindow {
|
|
|
549
562
|
* returns the same fields.
|
|
550
563
|
*/
|
|
551
564
|
interface CheckEligibilityResponse {
|
|
552
|
-
/** 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. */
|
|
565
|
+
/** 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. */
|
|
553
566
|
contactDetails?: ContactDetails;
|
|
554
|
-
/** 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. */
|
|
567
|
+
/** 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 failed and can be tried again, not a denial. */
|
|
555
568
|
status?: StatusWithLiterals;
|
|
556
569
|
/**
|
|
557
570
|
* What the engine found — the same message Create Arrival records on the arrival: the entry's `issues`, the
|
|
@@ -893,9 +906,9 @@ type TypeWithLiterals = Type | 'NFC_CARD';
|
|
|
893
906
|
* area's own entry window.
|
|
894
907
|
*/
|
|
895
908
|
interface CheckEligibilityByCredentialResponse {
|
|
896
|
-
/** The holder of the presented credential: their contact ID, name and picture as Contacts holds them now. */
|
|
909
|
+
/** 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. */
|
|
897
910
|
contactDetails?: ContactDetails;
|
|
898
|
-
/** 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. */
|
|
911
|
+
/** 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 failed and can be tried again, not a denial. */
|
|
899
912
|
status?: StatusWithLiterals;
|
|
900
913
|
/**
|
|
901
914
|
* What the engine found — the same message Create Arrival records on the arrival: the entry's `issues`, the
|
|
@@ -962,6 +975,10 @@ type CreateArrivalApplicationErrors = {
|
|
|
962
975
|
code?: 'PRICING_PLANS_UNAVAILABLE';
|
|
963
976
|
description?: string;
|
|
964
977
|
data?: Record<string, any>;
|
|
978
|
+
} | {
|
|
979
|
+
code?: 'CONTACTS_UNAVAILABLE';
|
|
980
|
+
description?: string;
|
|
981
|
+
data?: Record<string, any>;
|
|
965
982
|
};
|
|
966
983
|
/** @docsIgnore */
|
|
967
984
|
type OverrideArrivalAsGrantedApplicationErrors = {
|
|
@@ -990,10 +1007,6 @@ type CheckEligibilityApplicationErrors = {
|
|
|
990
1007
|
code?: 'AREA_ARCHIVED';
|
|
991
1008
|
description?: string;
|
|
992
1009
|
data?: Record<string, any>;
|
|
993
|
-
} | {
|
|
994
|
-
code?: 'PRICING_PLANS_UNAVAILABLE';
|
|
995
|
-
description?: string;
|
|
996
|
-
data?: Record<string, any>;
|
|
997
1010
|
};
|
|
998
1011
|
/** @docsIgnore */
|
|
999
1012
|
type CountArrivalsApplicationErrors = {
|
|
@@ -1022,10 +1035,6 @@ type CheckEligibilityByCredentialApplicationErrors = {
|
|
|
1022
1035
|
code?: 'ENTRANCE_NOT_FOUND';
|
|
1023
1036
|
description?: string;
|
|
1024
1037
|
data?: Record<string, any>;
|
|
1025
|
-
} | {
|
|
1026
|
-
code?: 'PRICING_PLANS_UNAVAILABLE';
|
|
1027
|
-
description?: string;
|
|
1028
|
-
data?: Record<string, any>;
|
|
1029
1038
|
};
|
|
1030
1039
|
/** @docsIgnore */
|
|
1031
1040
|
type CreateArrivalByCredentialApplicationErrors = {
|
|
@@ -1052,6 +1061,10 @@ type CreateArrivalByCredentialApplicationErrors = {
|
|
|
1052
1061
|
code?: 'PRICING_PLANS_UNAVAILABLE';
|
|
1053
1062
|
description?: string;
|
|
1054
1063
|
data?: Record<string, any>;
|
|
1064
|
+
} | {
|
|
1065
|
+
code?: 'CONTACTS_UNAVAILABLE';
|
|
1066
|
+
description?: string;
|
|
1067
|
+
data?: Record<string, any>;
|
|
1055
1068
|
};
|
|
1056
1069
|
interface CreateArrivalOptions {
|
|
1057
1070
|
/**
|
|
@@ -363,6 +363,7 @@ var EntryIssue = /* @__PURE__ */ ((EntryIssue2) => {
|
|
|
363
363
|
EntryIssue2["INTAKE_FORM_MISSING"] = "INTAKE_FORM_MISSING";
|
|
364
364
|
EntryIssue2["RECENT_ENTRY"] = "RECENT_ENTRY";
|
|
365
365
|
EntryIssue2["PRICING_PLANS_UNAVAILABLE"] = "PRICING_PLANS_UNAVAILABLE";
|
|
366
|
+
EntryIssue2["CONTACTS_UNAVAILABLE"] = "CONTACTS_UNAVAILABLE";
|
|
366
367
|
return EntryIssue2;
|
|
367
368
|
})(EntryIssue || {});
|
|
368
369
|
var PlanBenefitType = /* @__PURE__ */ ((PlanBenefitType2) => {
|
|
@@ -374,6 +375,7 @@ var PlanBenefitIssue = /* @__PURE__ */ ((PlanBenefitIssue2) => {
|
|
|
374
375
|
PlanBenefitIssue2["PLAN_NOT_ACTIVE"] = "PLAN_NOT_ACTIVE";
|
|
375
376
|
PlanBenefitIssue2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
376
377
|
PlanBenefitIssue2["OUTSIDE_ACCESS_HOURS"] = "OUTSIDE_ACCESS_HOURS";
|
|
378
|
+
PlanBenefitIssue2["USAGE_LIMIT_REACHED"] = "USAGE_LIMIT_REACHED";
|
|
377
379
|
return PlanBenefitIssue2;
|
|
378
380
|
})(PlanBenefitIssue || {});
|
|
379
381
|
var ScheduledEventIssue = /* @__PURE__ */ ((ScheduledEventIssue2) => {
|