@wix/auto_sdk_arrivals_arrivals 1.0.6 → 1.0.7

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.
@@ -4,8 +4,9 @@ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
4
4
  /**
5
5
  * An arrival is the record of one entry into an area, at one of its entrances: who arrived, where, what the
6
6
  * eligibility engine found (`eligibilityDetails`), and whether access was given (`status`). Arrivals are written
7
- * only by Create Arrival, directly or through Create Arrival By Credential. An arrival changes only through Override Arrival as
8
- * Granted, which moves a denial to `GRANTED`, and when two contacts are merged in CRM, which moves
7
+ * only by Create Arrival, directly or through Create Arrival By Credential. An arrival changes only when staff override it, which
8
+ * moves a denial to `GRANTED` (Override Arrival as Granted, or a repeat of Create Arrival within 5 seconds that carries
9
+ * `denialOverride`), and when two contacts are merged in CRM, which moves
9
10
  * `contactDetails.contactId` to the surviving contact; the snapshot stays as it was. The person's name and picture are kept as they were
10
11
  * when the arrival was written, and a granted arrival keeps what granted the entry. `eligibilityDetails` and
11
12
  * `overrideReason` say why a person was not eligible, so they are returned only to callers with the
@@ -29,18 +30,19 @@ interface Arrival extends ArrivalGrantedByOneOf {
29
30
  */
30
31
  _id?: string | null;
31
32
  /**
32
- * Revision number. Moves when staff override a denied arrival with Override Arrival as Granted, and when a CRM contact merge
33
+ * Revision number. Moves when staff override a denied arrival — with Override Arrival as Granted, or with a repeat of
34
+ * Create Arrival within 5 seconds that carries `denialOverride` — and when a CRM contact merge
33
35
  * moves the arrival to the surviving contact; nothing else changes an arrival.
34
36
  * @readonly
35
37
  */
36
38
  revision?: string | null;
37
39
  /**
38
- * Date and time the arrival was created: the moment the person was evaluated at the entrance. For a granted arrival that was not overridden, it is the time the person was let in; for one staff overrode afterwards, it is the denial's time, and the override's time is `updatedDate`.
40
+ * Date and time the arrival was created: the moment the person was evaluated at the entrance. For a granted arrival that was not overridden, it is the time the person was let in; for one staff overrode afterwards, it is the denial's time, and the override's time is `overriddenDate`.
39
41
  * @readonly
40
42
  */
41
43
  _createdDate?: Date | null;
42
44
  /**
43
- * Date and time the arrival was last updated. Equal to `createdDate` until staff override the arrival or a contact merge moves it.
45
+ * Date and time the arrival was last updated. Equal to `createdDate` until staff override the arrival or a contact merge moves it. For the time of the override itself, read `overriddenDate`, which a later merge does not move.
44
46
  * @readonly
45
47
  */
46
48
  _updatedDate?: Date | null;
@@ -62,7 +64,9 @@ interface Arrival extends ArrivalGrantedByOneOf {
62
64
  * person is missing, and every plan benefit and scheduled event it found for the area, each with its own issue. Set
63
65
  * by the server at creation and never changed afterwards: an override keeps it, so its `issues` hold what was overridden. Returned
64
66
  * only to callers with the `arrivals:v1:arrival:read_eligibility_details` permission, since it says why a person was
65
- * not eligible; filtering on `eligibilityDetails.issues` requires the same permission.
67
+ * not eligible; filtering on `eligibilityDetails.issues` requires the same permission. Every response that carries an
68
+ * arrival leaves it out for other callers, Create Arrival and Create Arrival By Credential included: an app without
69
+ * the permission, such as a reader at an entrance, gets `status` and not the reason.
66
70
  * @readonly
67
71
  */
68
72
  eligibilityDetails?: EligibilityDetails;
@@ -82,6 +86,11 @@ interface Arrival extends ArrivalGrantedByOneOf {
82
86
  * @readonly
83
87
  */
84
88
  overriddenBy?: CommonIdentificationData;
89
+ /**
90
+ * Date and time staff let the person in against a denial, set once with `overriddenBy`: when Override Arrival as Granted granted the arrival, or its `createdDate` when Create Arrival let the person in with `denialOverride` on the call that wrote it. Set by the server; absent on every arrival staff did not override. A later contact merge moves `updatedDate` but never this.
91
+ * @readonly
92
+ */
93
+ overriddenDate?: Date | null;
85
94
  }
86
95
  /** @oneof */
87
96
  interface ArrivalGrantedByOneOf {
@@ -315,7 +324,7 @@ declare enum EntryIssue {
315
324
  NO_ELIGIBLE_GRANT = "NO_ELIGIBLE_GRANT",
316
325
  /** 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. */
317
326
  INTAKE_FORM_MISSING = "INTAKE_FORM_MISSING",
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. The earlier entry counts whatever granted it: a credit, an unlimited plan, a scheduled event or an override, and the 15 minutes count from that arrival's `createdDate`: for an overridden arrival, from its denial. Declines at creation; the override spends a credit. Reported only when this entry would spend a credit: not when an unlimited plan or a scheduled event admits now. */
327
+ /** The person was already granted entry into this area within the last 15 minutes and a credit would be spent again: a retried scan, a re-entry, or a guest on the same credential. The earlier entry counts whatever granted it: a credit, an unlimited plan, a scheduled event or an override, and the 15 minutes count from that arrival's `createdDate`, or for an overridden arrival from its `overriddenDate`, when staff let the person in. Declines at creation; the override spends a credit. Reported only when this entry would spend a credit: not when an unlimited plan or a scheduled event admits now. */
319
328
  RECENT_ENTRY = "RECENT_ENTRY",
320
329
  /** 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
330
  PRICING_PLANS_UNAVAILABLE = "PRICING_PLANS_UNAVAILABLE",
@@ -580,14 +589,14 @@ interface CheckEligibilityResponse {
580
589
  */
581
590
  recentArrival?: RecentArrival;
582
591
  }
583
- /** An earlier granted arrival of the same person into the same area, created within the last 15 minutes. */
592
+ /** An earlier granted arrival of the same person into the same area, created or overridden within the last 15 minutes. */
584
593
  interface RecentArrival {
585
594
  /**
586
595
  * ID of that arrival.
587
596
  * @format GUID
588
597
  */
589
598
  arrivalId?: string;
590
- /** That arrival's `createdDate`, for an app to tell staff "let in 4 minutes ago". For an arrival staff overrode, it is the time of the denial they overrode. What granted it is on that arrival: call Get Arrival with `arrivalId` and read its `planBenefit` or `scheduledEvent`. */
599
+ /** That arrival's `createdDate`, for an app to tell staff "let in 4 minutes ago". For an arrival staff overrode, it is the time of the denial they overrode, and the 15 minutes count from its `overriddenDate`: call Get Arrival to show when the person was let in. What granted it is on that arrival: call Get Arrival with `arrivalId` and read its `planBenefit` or `scheduledEvent`. */
591
600
  _createdDate?: Date | null;
592
601
  }
593
602
  interface GetArrivalRequest {
@@ -1121,41 +1130,41 @@ interface ArrivalsQueryBuilder {
1121
1130
  * @param value - Value to compare against.
1122
1131
  * @documentationMaturity preview
1123
1132
  */
1124
- eq: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status', value: any) => ArrivalsQueryBuilder;
1133
+ eq: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status' | 'overriddenBy.wixUserId', value: any) => ArrivalsQueryBuilder;
1125
1134
  /** @param propertyName - Property whose value is compared with `value`.
1126
1135
  * @param value - Value to compare against.
1127
1136
  * @documentationMaturity preview
1128
1137
  */
1129
- ne: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status', value: any) => ArrivalsQueryBuilder;
1138
+ ne: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status' | 'overriddenBy.wixUserId', value: any) => ArrivalsQueryBuilder;
1130
1139
  /** @param propertyName - Property whose value is compared with `value`.
1131
1140
  * @param value - Value to compare against.
1132
1141
  * @documentationMaturity preview
1133
1142
  */
1134
- ge: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: any) => ArrivalsQueryBuilder;
1143
+ ge: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'overriddenBy.wixUserId', value: any) => ArrivalsQueryBuilder;
1135
1144
  /** @param propertyName - Property whose value is compared with `value`.
1136
1145
  * @param value - Value to compare against.
1137
1146
  * @documentationMaturity preview
1138
1147
  */
1139
- gt: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: any) => ArrivalsQueryBuilder;
1148
+ gt: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'overriddenBy.wixUserId', value: any) => ArrivalsQueryBuilder;
1140
1149
  /** @param propertyName - Property whose value is compared with `value`.
1141
1150
  * @param value - Value to compare against.
1142
1151
  * @documentationMaturity preview
1143
1152
  */
1144
- le: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: any) => ArrivalsQueryBuilder;
1153
+ le: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'overriddenBy.wixUserId', value: any) => ArrivalsQueryBuilder;
1145
1154
  /** @param propertyName - Property whose value is compared with `value`.
1146
1155
  * @param value - Value to compare against.
1147
1156
  * @documentationMaturity preview
1148
1157
  */
1149
- lt: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: any) => ArrivalsQueryBuilder;
1158
+ lt: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'overriddenBy.wixUserId', value: any) => ArrivalsQueryBuilder;
1150
1159
  /** @param propertyName - Property whose value is compared with `string`.
1151
1160
  * @param string - String to compare against. Case-insensitive.
1152
1161
  * @documentationMaturity preview
1153
1162
  */
1154
- startsWith: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId', value: string) => ArrivalsQueryBuilder;
1163
+ startsWith: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | '_id' | 'contactDetails.contactId' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'overriddenBy.wixUserId', value: string) => ArrivalsQueryBuilder;
1155
1164
  /** @documentationMaturity preview */
1156
- in: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status', value: any) => ArrivalsQueryBuilder;
1165
+ in: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status' | 'overriddenBy.wixUserId', value: any) => ArrivalsQueryBuilder;
1157
1166
  /** @documentationMaturity preview */
1158
- exists: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status', value: boolean) => ArrivalsQueryBuilder;
1167
+ exists: (propertyName: 'planBenefit.poolId' | 'planBenefit.benefitKey' | 'planBenefit.type' | '_id' | '_createdDate' | 'contactDetails.contactId' | 'source.identifiedBy' | 'area.id' | 'area.locationId' | 'area.entranceId' | 'status' | 'overriddenBy.wixUserId', value: boolean) => ArrivalsQueryBuilder;
1159
1168
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1160
1169
  * @documentationMaturity preview
1161
1170
  */
@@ -1205,6 +1214,11 @@ interface ArrivalQuerySpec extends QuerySpec {
1205
1214
  ];
1206
1215
  operators: '*';
1207
1216
  sort: 'BOTH';
1217
+ },
1218
+ {
1219
+ fields: ['overriddenBy.wixUserId'];
1220
+ operators: '*';
1221
+ sort: 'NONE';
1208
1222
  }
1209
1223
  ];
1210
1224
  }
@@ -56,7 +56,8 @@ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform
56
56
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
57
57
  var TRANSFORM_PATHS_0 = [
58
58
  { path: "arrival.createdDate" },
59
- { path: "arrival.updatedDate" }
59
+ { path: "arrival.updatedDate" },
60
+ { path: "arrival.overriddenDate" }
60
61
  ];
61
62
  var TRANSFORM_PATHS_1 = [
62
63
  { path: "scheduledEventSearchWindow.startDate" },
@@ -65,7 +66,8 @@ var TRANSFORM_PATHS_1 = [
65
66
  var TRANSFORM_PATHS_2 = [{ path: "recentArrival.createdDate" }];
66
67
  var TRANSFORM_PATHS_3 = [
67
68
  { path: "arrivals.createdDate" },
68
- { path: "arrivals.updatedDate" }
69
+ { path: "arrivals.updatedDate" },
70
+ { path: "arrivals.overriddenDate" }
69
71
  ];
70
72
  function resolveWixArrivalsV1CredentialArrivalsServiceUrl(opts) {
71
73
  const domainToMappings = {