@wix/auto_sdk_arrivals_arrivals 1.0.3 → 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 +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +37 -26
- package/build/cjs/index.typings.js +1 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +37 -26
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +1 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +37 -26
- package/build/es/index.typings.mjs +1 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +37 -26
- package/build/es/meta.mjs +1 -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 +53 -36
- package/build/internal/cjs/meta.d.ts +37 -26
- package/build/internal/es/index.d.mts +16 -10
- package/build/internal/es/index.typings.d.mts +53 -36
- package/build/internal/es/meta.d.mts +37 -26
- package/package.json +4 -4
package/build/cjs/meta.d.ts
CHANGED
|
@@ -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
|
/**
|
|
@@ -288,8 +290,9 @@ interface EligibilityDetails {
|
|
|
288
290
|
* The issues of the entry as a whole. The issues decide the status the evaluation gives: `GRANTED` when there are none, or only
|
|
289
291
|
* `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. When staff let the person in —
|
|
290
292
|
* 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
|
|
293
|
+
* `GRANTED` whatever the issues, and the issues show what was overridden. On an arrival, `PRICING_PLANS_UNAVAILABLE`
|
|
294
|
+
* and `CONTACTS_UNAVAILABLE` are found only that way, with `denialOverride`, since otherwise Create Arrival fails with
|
|
295
|
+
* `UNAVAILABLE`; Check Eligibility reports them without failing. A `DENIED` arrival always has at
|
|
293
296
|
* least one. Empty when nothing stood in the way.
|
|
294
297
|
* @maxSize 3
|
|
295
298
|
*/
|
|
@@ -302,8 +305,10 @@ interface EligibilityDetails {
|
|
|
302
305
|
/**
|
|
303
306
|
* The person's Pricing Plans benefits allowed into this area, each a `planBenefit` with its own `issues`: empty
|
|
304
307
|
* means the benefit admits. Listed on a `DENIED` arrival too, admitting ones included, so an override can take one
|
|
305
|
-
* later. The grant picks one by the rule on the arrival's `planBenefit` and records it there.
|
|
306
|
-
*
|
|
308
|
+
* later. The grant picks one by the rule on the arrival's `planBenefit` and records it there. Listed in the order of
|
|
309
|
+
* 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
|
|
310
|
+
* person holds no benefit for this area, and when the status of the contact's site member (`memberInfo.status` in
|
|
311
|
+
* Contacts) is `BLOCKED`, `DELETED` or `OFFLINE`, since such a member holds no plans here.
|
|
307
312
|
* @maxSize 20
|
|
308
313
|
*/
|
|
309
314
|
planBenefits?: PlanBenefitEligibility[];
|
|
@@ -322,8 +327,9 @@ interface EligibilityDetails {
|
|
|
322
327
|
* An issue of the entry as a whole. The issues decide the status the evaluation gives: `GRANTED` when there are none, or only
|
|
323
328
|
* `INTAKE_FORM_MISSING` for forms that do not block entry; `DENIED` otherwise. When staff let the person in —
|
|
324
329
|
* afterwards with Override Arrival as Granted, or beforehand with `denialOverride` on Create Arrival — the status is
|
|
325
|
-
* `GRANTED` whatever the issues, and the issues show what was overridden. `PRICING_PLANS_UNAVAILABLE`
|
|
326
|
-
* only that way, with `denialOverride`, since otherwise
|
|
330
|
+
* `GRANTED` whatever the issues, and the issues show what was overridden. On an arrival, `PRICING_PLANS_UNAVAILABLE`
|
|
331
|
+
* and `CONTACTS_UNAVAILABLE` are found only that way, with `denialOverride`, since otherwise Create Arrival fails with
|
|
332
|
+
* `UNAVAILABLE`; Check Eligibility reports them without failing. Why a single benefit or event does not admit is on
|
|
327
333
|
* that item (`PlanBenefitIssue`, `ScheduledEventIssue`), not here.
|
|
328
334
|
*/
|
|
329
335
|
declare enum EntryIssue {
|
|
@@ -331,22 +337,27 @@ declare enum EntryIssue {
|
|
|
331
337
|
* No grant the person holds admits them into this area now. A grant is what can grant entry — a plan benefit
|
|
332
338
|
* (`planBenefits`) or a scheduled event they are booked on (`scheduledEvents`) — the same two kinds an arrival
|
|
333
339
|
* records in `planBenefit` or `scheduledEvent` once granted. Either nothing was found — `planBenefits` and
|
|
334
|
-
* `scheduledEvents` are empty — or everything found has an issue of its own, which says why.
|
|
340
|
+
* `scheduledEvents` are empty — or everything found has an issue of its own, which says why. A contact whose site
|
|
341
|
+
* member's status (`memberInfo.status` in Contacts) is `BLOCKED`, `DELETED` or `OFFLINE` holds no plans here, so it
|
|
342
|
+
* finds none. Also reported when a
|
|
335
343
|
* credit pack would admit but the person is booked on an event here and now that still waits for approval: no
|
|
336
344
|
* credit is spent while the booking may be approved moments later (the event carries `PENDING_CONFIRMATION`).
|
|
337
345
|
* Declines at creation; staff override, or sell a plan, approve the booking or renew the plan and create a new
|
|
338
|
-
* arrival. Not reported when Pricing Plans did not answer: `PRICING_PLANS_UNAVAILABLE`
|
|
346
|
+
* arrival. Not reported when Pricing Plans or Contacts did not answer: `PRICING_PLANS_UNAVAILABLE` or
|
|
347
|
+
* `CONTACTS_UNAVAILABLE` takes its place.
|
|
339
348
|
*/
|
|
340
349
|
NO_ELIGIBLE_GRANT = "NO_ELIGIBLE_GRANT",
|
|
341
350
|
/** 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. */
|
|
342
351
|
INTAKE_FORM_MISSING = "INTAKE_FORM_MISSING",
|
|
343
352
|
/** 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). */
|
|
344
353
|
RECENT_ENTRY = "RECENT_ENTRY",
|
|
345
|
-
/** Pricing Plans did not answer, so plan benefits were not checked.
|
|
346
|
-
PRICING_PLANS_UNAVAILABLE = "PRICING_PLANS_UNAVAILABLE"
|
|
354
|
+
/** 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`. */
|
|
355
|
+
PRICING_PLANS_UNAVAILABLE = "PRICING_PLANS_UNAVAILABLE",
|
|
356
|
+
/** 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. */
|
|
357
|
+
CONTACTS_UNAVAILABLE = "CONTACTS_UNAVAILABLE"
|
|
347
358
|
}
|
|
348
359
|
/** @enumType */
|
|
349
|
-
type EntryIssueWithLiterals = EntryIssue | 'NO_ELIGIBLE_GRANT' | 'INTAKE_FORM_MISSING' | 'RECENT_ENTRY' | 'PRICING_PLANS_UNAVAILABLE';
|
|
360
|
+
type EntryIssueWithLiterals = EntryIssue | 'NO_ELIGIBLE_GRANT' | 'INTAKE_FORM_MISSING' | 'RECENT_ENTRY' | 'PRICING_PLANS_UNAVAILABLE' | 'CONTACTS_UNAVAILABLE';
|
|
350
361
|
/** An intake form the area's policy requires that the person has no valid submission for. */
|
|
351
362
|
interface MissingIntakeForm {
|
|
352
363
|
/**
|
|
@@ -418,11 +429,11 @@ declare enum PlanBenefitType {
|
|
|
418
429
|
type PlanBenefitTypeWithLiterals = PlanBenefitType | 'CREDIT' | 'UNLIMITED';
|
|
419
430
|
/** Why a Pricing Plans benefit does not admit. Where Pricing Plans has a word for a finding, the value uses it. */
|
|
420
431
|
declare enum PlanBenefitIssue {
|
|
421
|
-
/** The benefit's plan is not active — ended, cancelled or
|
|
432
|
+
/** 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. */
|
|
422
433
|
PLAN_NOT_ACTIVE = "PLAN_NOT_ACTIVE",
|
|
423
434
|
/** A credit pack with no credits left, as Pricing Plans reports. Staff override, or sell credits and create a new arrival. */
|
|
424
435
|
NOT_ENOUGH_BALANCE = "NOT_ENOUGH_BALANCE",
|
|
425
|
-
/** The plan's usage policy does not allow entry at this hour or on this day, as Pricing Plans reports. */
|
|
436
|
+
/** 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`. */
|
|
426
437
|
OUTSIDE_ACCESS_HOURS = "OUTSIDE_ACCESS_HOURS",
|
|
427
438
|
/** 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. */
|
|
428
439
|
USAGE_LIMIT_REACHED = "USAGE_LIMIT_REACHED"
|
|
@@ -585,9 +596,9 @@ interface ScheduledEventSearchWindow {
|
|
|
585
596
|
* returns the same fields.
|
|
586
597
|
*/
|
|
587
598
|
interface CheckEligibilityResponse {
|
|
588
|
-
/** 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. */
|
|
599
|
+
/** 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. */
|
|
589
600
|
contactDetails?: ContactDetails;
|
|
590
|
-
/** 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. */
|
|
601
|
+
/** 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. */
|
|
591
602
|
status?: StatusWithLiterals;
|
|
592
603
|
/**
|
|
593
604
|
* What the engine found — the same message Create Arrival records on the arrival: the entry's `issues`, the
|
|
@@ -931,9 +942,9 @@ type TypeWithLiterals = Type | 'NFC_CARD';
|
|
|
931
942
|
* area's own entry window.
|
|
932
943
|
*/
|
|
933
944
|
interface CheckEligibilityByCredentialResponse {
|
|
934
|
-
/** The holder of the presented credential: their contact ID, name and picture as Contacts holds them now. */
|
|
945
|
+
/** 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. */
|
|
935
946
|
contactDetails?: ContactDetails;
|
|
936
|
-
/** 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. */
|
|
947
|
+
/** 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. */
|
|
937
948
|
status?: StatusWithLiterals;
|
|
938
949
|
/**
|
|
939
950
|
* What the engine found — the same message Create Arrival records on the arrival: the entry's `issues`, the
|
|
@@ -1000,6 +1011,10 @@ type CreateArrivalApplicationErrors = {
|
|
|
1000
1011
|
code?: 'PRICING_PLANS_UNAVAILABLE';
|
|
1001
1012
|
description?: string;
|
|
1002
1013
|
data?: Record<string, any>;
|
|
1014
|
+
} | {
|
|
1015
|
+
code?: 'CONTACTS_UNAVAILABLE';
|
|
1016
|
+
description?: string;
|
|
1017
|
+
data?: Record<string, any>;
|
|
1003
1018
|
};
|
|
1004
1019
|
/** @docsIgnore */
|
|
1005
1020
|
type OverrideArrivalAsGrantedApplicationErrors = {
|
|
@@ -1028,10 +1043,6 @@ type CheckEligibilityApplicationErrors = {
|
|
|
1028
1043
|
code?: 'AREA_ARCHIVED';
|
|
1029
1044
|
description?: string;
|
|
1030
1045
|
data?: Record<string, any>;
|
|
1031
|
-
} | {
|
|
1032
|
-
code?: 'PRICING_PLANS_UNAVAILABLE';
|
|
1033
|
-
description?: string;
|
|
1034
|
-
data?: Record<string, any>;
|
|
1035
1046
|
};
|
|
1036
1047
|
/** @docsIgnore */
|
|
1037
1048
|
type CountArrivalsApplicationErrors = {
|
|
@@ -1060,10 +1071,6 @@ type CheckEligibilityByCredentialApplicationErrors = {
|
|
|
1060
1071
|
code?: 'ENTRANCE_NOT_FOUND';
|
|
1061
1072
|
description?: string;
|
|
1062
1073
|
data?: Record<string, any>;
|
|
1063
|
-
} | {
|
|
1064
|
-
code?: 'PRICING_PLANS_UNAVAILABLE';
|
|
1065
|
-
description?: string;
|
|
1066
|
-
data?: Record<string, any>;
|
|
1067
1074
|
};
|
|
1068
1075
|
/** @docsIgnore */
|
|
1069
1076
|
type CreateArrivalByCredentialApplicationErrors = {
|
|
@@ -1090,6 +1097,10 @@ type CreateArrivalByCredentialApplicationErrors = {
|
|
|
1090
1097
|
code?: 'PRICING_PLANS_UNAVAILABLE';
|
|
1091
1098
|
description?: string;
|
|
1092
1099
|
data?: Record<string, any>;
|
|
1100
|
+
} | {
|
|
1101
|
+
code?: 'CONTACTS_UNAVAILABLE';
|
|
1102
|
+
description?: string;
|
|
1103
|
+
data?: Record<string, any>;
|
|
1093
1104
|
};
|
|
1094
1105
|
|
|
1095
1106
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
package/build/cjs/meta.js
CHANGED
|
@@ -349,6 +349,7 @@ var EntryIssue = /* @__PURE__ */ ((EntryIssue2) => {
|
|
|
349
349
|
EntryIssue2["INTAKE_FORM_MISSING"] = "INTAKE_FORM_MISSING";
|
|
350
350
|
EntryIssue2["RECENT_ENTRY"] = "RECENT_ENTRY";
|
|
351
351
|
EntryIssue2["PRICING_PLANS_UNAVAILABLE"] = "PRICING_PLANS_UNAVAILABLE";
|
|
352
|
+
EntryIssue2["CONTACTS_UNAVAILABLE"] = "CONTACTS_UNAVAILABLE";
|
|
352
353
|
return EntryIssue2;
|
|
353
354
|
})(EntryIssue || {});
|
|
354
355
|
var PlanBenefitType = /* @__PURE__ */ ((PlanBenefitType2) => {
|