@eversa/node 1.0.0-rc.2 → 1.0.0-rc.3

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +1558 -1371
  2. package/dist/index.js +476 -366
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -99,7 +99,7 @@ type InsufficientScopeProblem = {
99
99
  /**
100
100
  * A permission, `resource:action`: one an organization's member or API key holds, or, prefixed `eversa:`, one of Eversa's own staff. A 403 names the one the operation needs.
101
101
  */
102
- type Permission = ("organization:read" | "organization:manage" | "members:read" | "members:manage" | "apps:read" | "apps:manage" | "api_keys:read" | "api_keys:manage" | "access_reviews:manage" | "billing:read" | "billing:manage" | "properties:read" | "properties:write" | "applications:read" | "applications:write" | "decisions:write" | "screenings:read" | "screenings:write" | "reports:read" | "documents:read" | "documents:read_sensitive" | "events:read" | "applicants:assist" | "webhooks:manage" | "privacy:read" | "privacy:manage" | "messages:read" | "messages:write" | "eversa:organizations:read" | "eversa:organizations:manage" | "eversa:staff:manage" | "eversa:access_reviews:manage" | "eversa:customer_data:read" | "eversa:reference_checks:perform" | "eversa:subscriptions:read" | "eversa:subscriptions:manage" | "eversa:prices:manage" | "eversa:refunds:issue" | "eversa:evidence:open" | "eversa:privacy:erase" | "eversa:users:find" | "eversa:audit:read" | "eversa:checks:review") | (string & Record<never, never>);
102
+ type Permission = ("organization:read" | "organization:manage" | "members:read" | "members:manage" | "apps:read" | "apps:manage" | "api_keys:read" | "api_keys:manage" | "access_reviews:manage" | "billing:read" | "billing:manage" | "properties:read" | "properties:write" | "applications:read" | "applications:write" | "decisions:write" | "screenings:read" | "screenings:write" | "reports:read" | "documents:read" | "documents:read_sensitive" | "events:read" | "applicants:assist" | "webhooks:manage" | "privacy:read" | "privacy:manage" | "messages:read" | "messages:write" | "sign:read" | "sign:write" | "eversa:organizations:read" | "eversa:organizations:manage" | "eversa:staff:manage" | "eversa:access_reviews:manage" | "eversa:customer_data:read" | "eversa:reference_checks:perform" | "eversa:subscriptions:read" | "eversa:subscriptions:manage" | "eversa:prices:manage" | "eversa:refunds:issue" | "eversa:evidence:open" | "eversa:privacy:erase" | "eversa:users:find" | "eversa:audit:read" | "eversa:checks:review") | (string & Record<never, never>);
103
103
  /**
104
104
  * Sign in or send an API key to use this endpoint. The request carried no credential this endpoint accepts. Sign in, then name one of the apps of an organization you belong to in Eversa-App, or, on an operation over the organization itself, the organization in Eversa-Organization. Where the endpoint takes an API key, send one as a Bearer token instead: `Authorization: Bearer <key>`.
105
105
  */
@@ -246,7 +246,7 @@ type Actor = ActorMember | ActorApiKey | ActorApplicant | ActorPerson | ActorPla
246
246
  * - `api`: a call to this API
247
247
  * - `embed`: the form embedded in your site
248
248
  * - `hosted`: the form hosted by Eversa
249
- * - `backoffice`: the Eversa dashboard
249
+ * - `backoffice`: the Eversa platform
250
250
  * - `mcp`: an AI assistant connected through the Model Context Protocol
251
251
  * - `system`: Eversa on its own, such as an expiry
252
252
  * - `assisted`: a member of your organization acting for the applicant, in an assisted session
@@ -367,6 +367,20 @@ type NameInput = {
367
367
  */
368
368
  readonly additional?: string;
369
369
  };
370
+ /**
371
+ * An embedded component an embed session opens.
372
+ * - `screening_status_badge`: the screening status badge, `screeningStatusBadge` on the page
373
+ * - `application`: the application's panel, `application` on the page
374
+ * - `stage_badge`: the stage badge, `stageBadge` on the page
375
+ * - `screening_form`: the screening form, `screeningForm` on the page
376
+ * - `screening_report`: a screening's report, `screeningReport` on the page
377
+ * - `application_invite`: the invite that opens an application, `applicationInvite` on the page
378
+ * - `sign_template_editor`: the editor a template is set up in, `signTemplateEditor` on the page
379
+ * - `sign_envelope_form`: the form an envelope is prepared and sent from, `signEnvelopeForm` on the page
380
+ * - `sign_envelope`: the panel a sent envelope is followed in, `signEnvelope` on the page
381
+ * - `sign_envelope_status_badge`: the badge that says where a sent envelope stands, `signEnvelopeStatusBadge` on the page
382
+ */
383
+ type EmbedComponent = "screening_status_badge" | "application" | "stage_badge" | "screening_form" | "screening_report" | "application_invite" | "sign_template_editor" | "sign_envelope_form" | "sign_envelope" | "sign_envelope_status_badge";
370
384
  /**
371
385
  * Too many requests. This API key sent more requests than its limit allows. Wait the seconds Retry-After gives, then retry.
372
386
  */
@@ -409,6 +423,69 @@ type InvalidApiKeyProblem = {
409
423
  */
410
424
  readonly detail: string;
411
425
  };
426
+ /**
427
+ * The app names no page for its embedded components. Add the origins of the pages that show your embedded components, such as https://app.example.com, under Settings › API keys, Embed origins, in the Eversa platform, then create the session again.
428
+ */
429
+ type EmbedOriginsUnsetProblem = {
430
+ /**
431
+ * A URI that names the problem type. Compare it, never parse it.
432
+ */
433
+ readonly type: "https://eversa.app/problems/embed-origins-unset";
434
+ /**
435
+ * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
436
+ */
437
+ readonly title: string;
438
+ /**
439
+ * The HTTP status code of this response.
440
+ */
441
+ readonly status: 409;
442
+ /**
443
+ * A plain explanation of this occurrence.
444
+ */
445
+ readonly detail: string;
446
+ };
447
+ /**
448
+ * An embed session, as it was created.
449
+ */
450
+ type IssuedEmbedSession = {
451
+ /**
452
+ * Always `embed_session`.
453
+ */
454
+ readonly object: "embed_session";
455
+ /**
456
+ * The embed session's id: `es_` and 26 lowercase characters. Treat it as opaque.
457
+ */
458
+ readonly id: `es_${string}`;
459
+ /**
460
+ * `true` for a session of a live app.
461
+ */
462
+ readonly livemode: boolean;
463
+ /**
464
+ * The embedded components the session opens.
465
+ */
466
+ readonly components: ReadonlyArray<EmbedComponent | (string & Record<never, never>)>;
467
+ /**
468
+ * The origins the session's components may be shown on: the app's embed origins, as they stand now. A frame on any other page shows nothing.
469
+ */
470
+ readonly origins: ReadonlyArray<string>;
471
+ /**
472
+ * When the session ends, an hour after it was created at most. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
473
+ */
474
+ readonly expiresAt: string;
475
+ /**
476
+ * What the page hands to `Eversa.init({ clientSecret })`. Shown this once and kept nowhere: render it into the page for the member signed in to it, and never log or store it.
477
+ */
478
+ readonly clientSecret: string;
479
+ };
480
+ /**
481
+ * An embed session for one page of yours that shows embedded components, for the member signed in to it.
482
+ */
483
+ type CreateEmbedSession = {
484
+ /**
485
+ * The embedded components the page shows. A component reads what your key reads for it: the screening status badge takes `screenings:read`, and shows each check's result with `reports:read` too; the application panel and the stage badge take `applications:read`, and the panel draws its applicants' screening badges with `screenings:read`; the screening form takes `screenings:write`, and reads the checks it offers with `screenings:read`; the report takes `reports:read`; the application invite takes `applications:write`, and `properties:read` and `properties:write` for the homes it lists and adds.
486
+ */
487
+ readonly components: ReadonlyArray<EmbedComponent>;
488
+ };
412
489
  /**
413
490
  * Your organization: its name, its slug and the language Eversa writes in for it (`locale`) when nothing else names one, such as a message to a person whose language is unknown.
414
491
  */
@@ -426,7 +503,7 @@ type Organization = {
426
503
  */
427
504
  readonly name: string;
428
505
  /**
429
- * The organization's slug, unique across Eversa: the dashboard's address names it.
506
+ * The organization's slug, unique across Eversa: the Eversa platform's address names it.
430
507
  */
431
508
  readonly slug: string;
432
509
  readonly locale: OrganizationLocale | (string & Record<never, never>);
@@ -471,7 +548,7 @@ type MemberNotFoundProblem = {
471
548
  readonly objectId: `usr_${string}`;
472
549
  };
473
550
  /**
474
- * A member of your organization, who signs in to the dashboard. An application's assignee is one, by `id`, and so is an actor of type `member`.
551
+ * A member of your organization, who signs in to the Eversa platform. An application's assignee is one, by `id`, and so is an actor of type `member`.
475
552
  */
476
553
  type Member = {
477
554
  /**
@@ -555,7 +632,7 @@ type CallingApiKey = {
555
632
  /**
556
633
  * The permissions the key holds.
557
634
  */
558
- readonly scope: ReadonlyArray<("organization:read" | "organization:manage" | "members:read" | "members:manage" | "apps:read" | "apps:manage" | "api_keys:read" | "api_keys:manage" | "access_reviews:manage" | "billing:read" | "billing:manage" | "properties:read" | "properties:write" | "applications:read" | "applications:write" | "decisions:write" | "screenings:read" | "screenings:write" | "reports:read" | "documents:read" | "documents:read_sensitive" | "events:read" | "applicants:assist" | "webhooks:manage" | "privacy:read" | "privacy:manage" | "messages:read" | "messages:write") | (string & Record<never, never>)>;
635
+ readonly scope: ReadonlyArray<("organization:read" | "organization:manage" | "members:read" | "members:manage" | "apps:read" | "apps:manage" | "api_keys:read" | "api_keys:manage" | "access_reviews:manage" | "billing:read" | "billing:manage" | "properties:read" | "properties:write" | "applications:read" | "applications:write" | "decisions:write" | "screenings:read" | "screenings:write" | "reports:read" | "documents:read" | "documents:read_sensitive" | "events:read" | "applicants:assist" | "webhooks:manage" | "privacy:read" | "privacy:manage" | "messages:read" | "messages:write" | "sign:read" | "sign:write") | (string & Record<never, never>)>;
559
636
  /**
560
637
  * `true` for a key of a live app.
561
638
  */
@@ -751,9 +828,9 @@ type ApplicationNotFoundProblem = {
751
828
  */
752
829
  readonly detail: string;
753
830
  /**
754
- * The application that was asked for.
831
+ * The application that was asked for, when asked for by its id.
755
832
  */
756
- readonly objectId: `app_${string}`;
833
+ readonly objectId?: `app_${string}`;
757
834
  };
758
835
  /**
759
836
  * Something an applicant, the person of a screening or you must do next.
@@ -1126,9 +1203,9 @@ type ScreeningNotFoundProblem = {
1126
1203
  */
1127
1204
  readonly detail: string;
1128
1205
  /**
1129
- * The screening that was asked for.
1206
+ * The screening that was asked for, when asked for by its id.
1130
1207
  */
1131
- readonly objectId: `scr_${string}`;
1208
+ readonly objectId?: `scr_${string}`;
1132
1209
  };
1133
1210
  /**
1134
1211
  * Checks ordered on one person, with the requirements, documents, consents and report.
@@ -1580,8 +1657,9 @@ type ProvenanceActor = {
1580
1657
  * - `applicant`: the person being screened, as an applicant
1581
1658
  * - `person`: the person being screened, on a screening of their own; none acts since a screening has no form
1582
1659
  * - `platform`: Eversa
1660
+ * - `signer`: a recipient of a sending, on their own link to sign
1583
1661
  */
1584
- type ActorType = ("member" | "api_key" | "applicant" | "person" | "platform") | (string & Record<never, never>);
1662
+ type ActorType = ("member" | "api_key" | "applicant" | "person" | "platform" | "signer") | (string & Record<never, never>);
1585
1663
  /**
1586
1664
  * How many checks the screening holds, in all and in each status, and what the completed ones came to.
1587
1665
  */
@@ -1853,6 +1931,89 @@ type ExternalIdTakenProblem = {
1853
1931
  */
1854
1932
  readonly objectId?: (string & Record<never, never>) | null;
1855
1933
  };
1934
+ /**
1935
+ * Up to 50 string pairs of your own, never personal information; keys up to 40 characters, trimmed and Unicode-normalized; two keys that become identical are refused; values up to 500, without control characters or lone surrogates, otherwise stored as sent.
1936
+ */
1937
+ type MetadataInput = {
1938
+ readonly [key: string]: string;
1939
+ };
1940
+ /**
1941
+ * One check to order. include_municipal is an option of criminal_record, depth of civil_records, jurisdictions of criminal_record and civil_records. Your organization pays for it.
1942
+ */
1943
+ type NewCheckOrder = {
1944
+ readonly type: CheckKind;
1945
+ readonly reference?: ReferenceKind;
1946
+ /**
1947
+ * criminal_record only: also search municipal courts when the provincial search finds no match. false when omitted.
1948
+ */
1949
+ readonly includeMunicipal?: boolean;
1950
+ readonly depth?: SearchDepth;
1951
+ readonly jurisdictions?: ReadonlyArray<Jurisdiction>;
1952
+ };
1953
+ /**
1954
+ * The contacts a reference check calls: someone at the workplace and a landlord.
1955
+ */
1956
+ type ReferencesInput = {
1957
+ /**
1958
+ * A contact at the person's workplace.
1959
+ */
1960
+ readonly workplace?: {
1961
+ /**
1962
+ * Name of the contact. Trimmed and Unicode-normalized (NFC); case kept.
1963
+ */
1964
+ readonly name: string;
1965
+ /**
1966
+ * Email of the contact. An RFC 5321 address, trimmed and lowercased.
1967
+ */
1968
+ readonly email?: string;
1969
+ /**
1970
+ * Phone number of the contact. Any national or international format, Canada assumed when there is no country code; stored as E.164.
1971
+ */
1972
+ readonly phone?: string;
1973
+ /**
1974
+ * Name of the employer. Trimmed and Unicode-normalized (NFC); case kept.
1975
+ */
1976
+ readonly companyName?: string;
1977
+ /**
1978
+ * The person's job. Trimmed and Unicode-normalized (NFC); case kept.
1979
+ */
1980
+ readonly jobRole?: string;
1981
+ readonly employmentType?: EmploymentType;
1982
+ };
1983
+ /**
1984
+ * A landlord who can give a reference.
1985
+ */
1986
+ readonly landlord?: {
1987
+ /**
1988
+ * Name of the contact. Trimmed and Unicode-normalized (NFC); case kept.
1989
+ */
1990
+ readonly name: string;
1991
+ /**
1992
+ * Email of the contact. An RFC 5321 address, trimmed and lowercased.
1993
+ */
1994
+ readonly email?: string;
1995
+ /**
1996
+ * Phone number of the contact. Any national or international format, Canada assumed when there is no country code; stored as E.164.
1997
+ */
1998
+ readonly phone?: string;
1999
+ };
2000
+ /**
2001
+ * The applicant has no workplace contact to give. When true, give workplace_unavailable_reason and no workplace.
2002
+ */
2003
+ readonly workplaceUnavailable?: boolean;
2004
+ /**
2005
+ * Why there is no workplace contact. Trimmed and Unicode-normalized (NFC); case kept.
2006
+ */
2007
+ readonly workplaceUnavailableReason?: string;
2008
+ /**
2009
+ * The applicant has no landlord to give. When true, give landlord_unavailable_reason and no landlord.
2010
+ */
2011
+ readonly landlordUnavailable?: boolean;
2012
+ /**
2013
+ * Why there is no landlord. Trimmed and Unicode-normalized (NFC); case kept.
2014
+ */
2015
+ readonly landlordUnavailableReason?: string;
2016
+ };
1856
2017
  /**
1857
2018
  * How long the person has lived at their current address, as a range. A request gives the range the person chose; a read answers it from moved_in on the day of the read when the person gave that day, else the range they chose.
1858
2019
  * - `under_1_year`: less than a year
@@ -1869,6 +2030,74 @@ type ResidenceDuration = "under_1_year" | "1_to_2_years" | "2_to_5_years" | "ove
1869
2030
  * - `other`: somewhere else
1870
2031
  */
1871
2032
  type LivingArrangement = "renting" | "owned" | "parents" | "other";
2033
+ /**
2034
+ * A postal address: country, province, city, postal code and street lines; region_code defaults to CA. In Canada, the province, the city and the postal code are required.
2035
+ */
2036
+ type PostalAddressInput = {
2037
+ /**
2038
+ * ISO 3166-1 alpha-2 country code; defaults to CA. Set it for an address outside Canada.
2039
+ */
2040
+ readonly regionCode?: string;
2041
+ /**
2042
+ * Language the address is written in, as a BCP 47 tag. An RFC 5646 language tag of at most 35 characters, in its canonical case.
2043
+ */
2044
+ readonly languageCode?: string;
2045
+ /**
2046
+ * Any case and spacing; stored uppercase, a Canadian code as A1A 1A1.
2047
+ */
2048
+ readonly postalCode?: string;
2049
+ /**
2050
+ * Sorting code, where the country uses one. Trimmed and Unicode-normalized (NFC); case kept.
2051
+ */
2052
+ readonly sortingCode?: string;
2053
+ /**
2054
+ * Province, state or region as its ISO 3166-2 code without the country prefix, any case; stored uppercase.
2055
+ */
2056
+ readonly administrativeArea?: string;
2057
+ /**
2058
+ * City. Trimmed and Unicode-normalized (NFC); case kept.
2059
+ */
2060
+ readonly locality?: string;
2061
+ /**
2062
+ * Neighbourhood or borough. Trimmed and Unicode-normalized (NFC); case kept.
2063
+ */
2064
+ readonly sublocality?: string;
2065
+ /**
2066
+ * Street address, one line per entry, unit or apartment included.
2067
+ */
2068
+ readonly addressLines: ReadonlyArray<string>;
2069
+ };
2070
+ /**
2071
+ * Order checks on one person whose data you send, attest the consent you hold under a signed mandate and that you confirmed their identity; the checks start at once. person must carry every field the check types list under needs for the ordered checks, unless another ordered check provides it, counting what Eversa already holds for a person named by id; a missing field answers 422. person also says how to reach them, by email or by phone, or why you can give neither (contact_unavailable_reason), and any of the three stands for the email a check type lists under needs; none of them answers 422.
2072
+ */
2073
+ type CreateScreening = {
2074
+ readonly person: PersonInput;
2075
+ /**
2076
+ * The checks to order, one to twelve; each kind at most once, a reference once per contact.
2077
+ */
2078
+ readonly checks: ReadonlyArray<NewCheckOrder>;
2079
+ /**
2080
+ * Your identifier for this object. Trimmed and Unicode-normalized (NFC); case kept.
2081
+ */
2082
+ readonly externalId?: string;
2083
+ readonly metadata?: MetadataInput;
2084
+ readonly consent: ConsentAttestation;
2085
+ readonly identity: IdentityAttestation;
2086
+ };
2087
+ /**
2088
+ * An address the person lived at, with the dates.
2089
+ */
2090
+ type AddressPeriod = {
2091
+ readonly address: PostalAddress;
2092
+ /**
2093
+ * Date the person moved to this address. A calendar date in UTC.
2094
+ */
2095
+ readonly from?: string;
2096
+ /**
2097
+ * Date the person left this address. A calendar date in UTC.
2098
+ */
2099
+ readonly to?: string;
2100
+ };
1872
2101
  /**
1873
2102
  * A page of screenings, newest first.
1874
2103
  */
@@ -2022,177 +2251,40 @@ type SearchScreenings = {
2022
2251
  readonly cursor?: `scr_${string}`;
2023
2252
  };
2024
2253
  /**
2025
- * Up to 50 string pairs of your own, never personal information; keys up to 40 characters, trimmed and Unicode-normalized; two keys that become identical are refused; values up to 500, without control characters or lone surrogates, otherwise stored as sent.
2026
- */
2027
- type MetadataInput = {
2028
- readonly [key: string]: string;
2029
- };
2030
- /**
2031
- * One check to order. include_municipal is an option of criminal_record, depth of civil_records, jurisdictions of criminal_record and civil_records. Your organization pays for it.
2254
+ * Person not found. No person has this id in the mode of your API key, live or test.
2032
2255
  */
2033
- type NewCheckOrder = {
2034
- readonly type: CheckKind;
2035
- readonly reference?: ReferenceKind;
2256
+ type PersonNotFoundProblem = {
2036
2257
  /**
2037
- * criminal_record only: also search municipal courts when the provincial search finds no match. false when omitted.
2258
+ * A URI that names the problem type. Compare it, never parse it.
2038
2259
  */
2039
- readonly includeMunicipal?: boolean;
2040
- readonly depth?: SearchDepth;
2041
- readonly jurisdictions?: ReadonlyArray<Jurisdiction>;
2260
+ readonly type: "https://eversa.app/problems/person-not-found";
2261
+ /**
2262
+ * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
2263
+ */
2264
+ readonly title: string;
2265
+ /**
2266
+ * The HTTP status code of this response.
2267
+ */
2268
+ readonly status: 404;
2269
+ /**
2270
+ * A plain explanation of this occurrence.
2271
+ */
2272
+ readonly detail: string;
2273
+ /**
2274
+ * The person who was asked for.
2275
+ */
2276
+ readonly objectId: `per_${string}`;
2042
2277
  };
2043
2278
  /**
2044
- * The contacts a reference check calls: someone at the workplace and a landlord.
2279
+ * Who acted, as an event records it: never a name.
2045
2280
  */
2046
- type ReferencesInput = {
2281
+ type EventActor = EventActorMember | EventActorApiKey | EventActorApplicant | EventActorPerson | EventActorPlatform | EventActorSigner;
2282
+ /**
2283
+ * A person as your organization submitted them.
2284
+ */
2285
+ type Person = {
2047
2286
  /**
2048
- * A contact at the person's workplace.
2049
- */
2050
- readonly workplace?: {
2051
- /**
2052
- * Name of the contact. Trimmed and Unicode-normalized (NFC); case kept.
2053
- */
2054
- readonly name: string;
2055
- /**
2056
- * Email of the contact. An RFC 5321 address, trimmed and lowercased.
2057
- */
2058
- readonly email?: string;
2059
- /**
2060
- * Phone number of the contact. Any national or international format, Canada assumed when there is no country code; stored as E.164.
2061
- */
2062
- readonly phone?: string;
2063
- /**
2064
- * Name of the employer. Trimmed and Unicode-normalized (NFC); case kept.
2065
- */
2066
- readonly companyName?: string;
2067
- /**
2068
- * The person's job. Trimmed and Unicode-normalized (NFC); case kept.
2069
- */
2070
- readonly jobRole?: string;
2071
- readonly employmentType?: EmploymentType;
2072
- };
2073
- /**
2074
- * A landlord who can give a reference.
2075
- */
2076
- readonly landlord?: {
2077
- /**
2078
- * Name of the contact. Trimmed and Unicode-normalized (NFC); case kept.
2079
- */
2080
- readonly name: string;
2081
- /**
2082
- * Email of the contact. An RFC 5321 address, trimmed and lowercased.
2083
- */
2084
- readonly email?: string;
2085
- /**
2086
- * Phone number of the contact. Any national or international format, Canada assumed when there is no country code; stored as E.164.
2087
- */
2088
- readonly phone?: string;
2089
- };
2090
- /**
2091
- * The applicant has no workplace contact to give. When true, give workplace_unavailable_reason and no workplace.
2092
- */
2093
- readonly workplaceUnavailable?: boolean;
2094
- /**
2095
- * Why there is no workplace contact. Trimmed and Unicode-normalized (NFC); case kept.
2096
- */
2097
- readonly workplaceUnavailableReason?: string;
2098
- /**
2099
- * The applicant has no landlord to give. When true, give landlord_unavailable_reason and no landlord.
2100
- */
2101
- readonly landlordUnavailable?: boolean;
2102
- /**
2103
- * Why there is no landlord. Trimmed and Unicode-normalized (NFC); case kept.
2104
- */
2105
- readonly landlordUnavailableReason?: string;
2106
- };
2107
- /**
2108
- * A postal address: country, province, city, postal code and street lines; region_code defaults to CA. In Canada, the province, the city and the postal code are required.
2109
- */
2110
- type PostalAddressInput = {
2111
- /**
2112
- * ISO 3166-1 alpha-2 country code; defaults to CA. Set it for an address outside Canada.
2113
- */
2114
- readonly regionCode?: string;
2115
- /**
2116
- * Language the address is written in, as a BCP 47 tag. An RFC 5646 language tag of at most 35 characters, in its canonical case.
2117
- */
2118
- readonly languageCode?: string;
2119
- /**
2120
- * Any case and spacing; stored uppercase, a Canadian code as A1A 1A1.
2121
- */
2122
- readonly postalCode?: string;
2123
- /**
2124
- * Sorting code, where the country uses one. Trimmed and Unicode-normalized (NFC); case kept.
2125
- */
2126
- readonly sortingCode?: string;
2127
- /**
2128
- * Province, state or region as its ISO 3166-2 code without the country prefix, any case; stored uppercase.
2129
- */
2130
- readonly administrativeArea?: string;
2131
- /**
2132
- * City. Trimmed and Unicode-normalized (NFC); case kept.
2133
- */
2134
- readonly locality?: string;
2135
- /**
2136
- * Neighbourhood or borough. Trimmed and Unicode-normalized (NFC); case kept.
2137
- */
2138
- readonly sublocality?: string;
2139
- /**
2140
- * Street address, one line per entry, unit or apartment included.
2141
- */
2142
- readonly addressLines: ReadonlyArray<string>;
2143
- };
2144
- /**
2145
- * Order checks on one person whose data you send, attest the consent you hold under a signed mandate and that you confirmed their identity; the checks start at once. person must carry every field the check types list under needs for the ordered checks, unless another ordered check provides it, counting what Eversa already holds for a person named by id; a missing field answers 422. person also says how to reach them, by email or by phone, or why you can give neither (contact_unavailable_reason), and any of the three stands for the email a check type lists under needs; none of them answers 422.
2146
- */
2147
- type CreateScreening = {
2148
- readonly person: PersonInput;
2149
- /**
2150
- * The checks to order, one to twelve; each kind at most once, a reference once per contact.
2151
- */
2152
- readonly checks: ReadonlyArray<NewCheckOrder>;
2153
- /**
2154
- * Your identifier for this object. Trimmed and Unicode-normalized (NFC); case kept.
2155
- */
2156
- readonly externalId?: string;
2157
- readonly metadata?: MetadataInput;
2158
- readonly consent: ConsentAttestation;
2159
- readonly identity: IdentityAttestation;
2160
- };
2161
- /**
2162
- * Person not found. No person has this id in the mode of your API key, live or test.
2163
- */
2164
- type PersonNotFoundProblem = {
2165
- /**
2166
- * A URI that names the problem type. Compare it, never parse it.
2167
- */
2168
- readonly type: "https://eversa.app/problems/person-not-found";
2169
- /**
2170
- * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
2171
- */
2172
- readonly title: string;
2173
- /**
2174
- * The HTTP status code of this response.
2175
- */
2176
- readonly status: 404;
2177
- /**
2178
- * A plain explanation of this occurrence.
2179
- */
2180
- readonly detail: string;
2181
- /**
2182
- * The person who was asked for.
2183
- */
2184
- readonly objectId: `per_${string}`;
2185
- };
2186
- /**
2187
- * Who acted, as an event records it: never a name.
2188
- */
2189
- type EventActor = EventActorMember | EventActorApiKey | EventActorApplicant | EventActorPerson | EventActorPlatform;
2190
- /**
2191
- * A person as your organization submitted them.
2192
- */
2193
- type Person = {
2194
- /**
2195
- * Always `person`.
2287
+ * Always `person`.
2196
2288
  */
2197
2289
  readonly object: "person";
2198
2290
  /**
@@ -2267,20 +2359,6 @@ type Person = {
2267
2359
  readonly previousAddressUnavailableReason?: string;
2268
2360
  readonly references: References;
2269
2361
  };
2270
- /**
2271
- * An address the person lived at, with the dates.
2272
- */
2273
- type AddressPeriod = {
2274
- readonly address: PostalAddress;
2275
- /**
2276
- * Date the person moved to this address. A calendar date in UTC.
2277
- */
2278
- readonly from?: string;
2279
- /**
2280
- * Date the person left this address. A calendar date in UTC.
2281
- */
2282
- readonly to?: string;
2283
- };
2284
2362
  /**
2285
2363
  * A page of persons, newest first, each as a list shows them; the whole person is its retrieve's.
2286
2364
  */
@@ -2438,13 +2516,13 @@ type ApplicationTypeUnavailableProblem = {
2438
2516
  readonly applicationType: ("residential_lease" | "employment") | (string & Record<never, never>);
2439
2517
  };
2440
2518
  /**
2441
- * Property not found. No property has this id in the mode of your API key, live or test.
2519
+ * The payment processor is unavailable. The payment processor did not answer. Nothing changed here: send the request again after the seconds Retry-After gives.
2442
2520
  */
2443
- type PropertyNotFoundProblem = {
2521
+ type PaymentProcessorUnavailableProblem = {
2444
2522
  /**
2445
2523
  * A URI that names the problem type. Compare it, never parse it.
2446
2524
  */
2447
- readonly type: "https://eversa.app/problems/property-not-found";
2525
+ readonly type: "https://eversa.app/problems/payment-processor-unavailable";
2448
2526
  /**
2449
2527
  * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
2450
2528
  */
@@ -2452,145 +2530,120 @@ type PropertyNotFoundProblem = {
2452
2530
  /**
2453
2531
  * The HTTP status code of this response.
2454
2532
  */
2455
- readonly status: 404;
2533
+ readonly status: 503;
2456
2534
  /**
2457
2535
  * A plain explanation of this occurrence.
2458
2536
  */
2459
2537
  readonly detail: string;
2460
- /**
2461
- * The property that was asked for.
2462
- */
2463
- readonly objectId: `prop_${string}`;
2464
2538
  };
2465
2539
  /**
2466
- * A property you rent out: its address, kind, rent and listing facts.
2540
+ * No way to invite the person. The person has neither an email nor a phone, so Eversa cannot send them the invite; send one with the person, or deliver the link yourself with the invite's delivery set to organization.
2467
2541
  */
2468
- type Property = {
2542
+ type NoInviteChannelProblem = {
2469
2543
  /**
2470
- * Always `property`.
2544
+ * A URI that names the problem type. Compare it, never parse it.
2471
2545
  */
2472
- readonly object: "property";
2546
+ readonly type: "https://eversa.app/problems/no-invite-channel";
2473
2547
  /**
2474
- * The property's id: `prop_` and 26 lowercase characters. Treat it as opaque.
2548
+ * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
2475
2549
  */
2476
- readonly id: `prop_${string}`;
2550
+ readonly title: string;
2477
2551
  /**
2478
- * `true` when the object was created with a live key.
2552
+ * The HTTP status code of this response.
2479
2553
  */
2480
- readonly livemode: boolean;
2554
+ readonly status: 422;
2481
2555
  /**
2482
- * Your identifier for this object.
2556
+ * A plain explanation of this occurrence.
2483
2557
  */
2484
- readonly externalId?: string;
2485
- readonly kind?: PropertyKind | (string & Record<never, never>);
2486
- readonly address: PostalAddress;
2487
- readonly rent?: Amount;
2558
+ readonly detail: string;
2488
2559
  /**
2489
- * true when the rent is subsidized or rent-controlled.
2560
+ * The person who was to be invited.
2490
2561
  */
2491
- readonly isAffordable?: boolean;
2562
+ readonly objectId: `per_${string}`;
2563
+ };
2564
+ /**
2565
+ * Unknown template. The template is not one of this app's; send one of its templates, or omit it for your default.
2566
+ */
2567
+ type TemplateUnknownProblem = {
2492
2568
  /**
2493
- * How many rooms, as Quebec listings count them: in half-steps, the bathroom counting as the half (4.5 is a 4½).
2569
+ * A URI that names the problem type. Compare it, never parse it.
2494
2570
  */
2495
- readonly rooms?: number;
2571
+ readonly type: "https://eversa.app/problems/template-unknown";
2496
2572
  /**
2497
- * How many bedrooms.
2573
+ * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
2498
2574
  */
2499
- readonly bedrooms?: number;
2575
+ readonly title: string;
2500
2576
  /**
2501
- * How many bathrooms, in half-steps: a half bathroom has a toilet and a sink, and no shower or tub.
2577
+ * The HTTP status code of this response.
2502
2578
  */
2503
- readonly bathrooms?: number;
2504
- readonly floorArea?: FloorArea;
2579
+ readonly status: 422;
2505
2580
  /**
2506
- * How many parking spaces come with the property.
2581
+ * A plain explanation of this occurrence.
2507
2582
  */
2508
- readonly parkingSpaces?: number;
2583
+ readonly detail: string;
2509
2584
  /**
2510
- * When the property was archived; from then on it takes no new application. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2585
+ * The template that was asked for.
2511
2586
  */
2512
- readonly archivedAt?: string;
2513
- readonly metadata: Metadata;
2587
+ readonly template: `tpl_${string}`;
2588
+ };
2589
+ /**
2590
+ * The application has no spot left. An application holds at most resident_spots residents, its active primary and co-applicants; a guarantor takes no spot. A resident past them is refused, and so are spots set below the residents on it: raise resident_spots, or remove someone first.
2591
+ */
2592
+ type ApplicationFullProblem = {
2514
2593
  /**
2515
- * When the object was created. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2594
+ * A URI that names the problem type. Compare it, never parse it.
2516
2595
  */
2517
- readonly createdAt: string;
2596
+ readonly type: "https://eversa.app/problems/application-full";
2518
2597
  /**
2519
- * When the object last changed. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2598
+ * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
2520
2599
  */
2521
- readonly updatedAt: string;
2522
- };
2523
- /**
2524
- * The property's floor area, in square metres.
2525
- */
2526
- type FloorArea = {
2600
+ readonly title: string;
2527
2601
  /**
2528
- * The area, to the centimetre.
2602
+ * The HTTP status code of this response.
2529
2603
  */
2530
- readonly value: number;
2604
+ readonly status: 409;
2531
2605
  /**
2532
- * Square metres (SI), the one unit an area is kept in.
2606
+ * A plain explanation of this occurrence.
2533
2607
  */
2534
- readonly unit: "m2";
2608
+ readonly detail: string;
2609
+ /**
2610
+ * The application whose spots are taken.
2611
+ */
2612
+ readonly objectId: `app_${string}`;
2535
2613
  };
2536
2614
  /**
2537
- * A postal address as returned, with its id.
2615
+ * Property is archived. The property is archived, so it takes no new application. Its applications stay as they are.
2538
2616
  */
2539
- type PostalAddress = {
2617
+ type PropertyArchivedProblem = {
2540
2618
  /**
2541
- * The address's id: `addr_` and 26 lowercase characters. Treat it as opaque.
2619
+ * A URI that names the problem type. Compare it, never parse it.
2542
2620
  */
2543
- readonly id: `addr_${string}`;
2621
+ readonly type: "https://eversa.app/problems/property-archived";
2544
2622
  /**
2545
- * Country, as an ISO 3166-1 alpha-2 code.
2623
+ * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
2546
2624
  */
2547
- readonly regionCode: string;
2625
+ readonly title: string;
2548
2626
  /**
2549
- * Language the address is written in, as a BCP 47 tag. An RFC 5646 language tag of at most 35 characters, in its canonical case.
2627
+ * The HTTP status code of this response.
2550
2628
  */
2551
- readonly languageCode?: string;
2629
+ readonly status: 409;
2552
2630
  /**
2553
- * Postal code; a Canadian code reads A1A 1A1.
2554
- */
2555
- readonly postalCode?: string;
2556
- /**
2557
- * Sorting code, where the country uses one.
2558
- */
2559
- readonly sortingCode?: string;
2560
- /**
2561
- * Province, state or region, as its ISO 3166-2 code without the country prefix.
2562
- */
2563
- readonly administrativeArea?: string;
2564
- /**
2565
- * City.
2566
- */
2567
- readonly locality?: string;
2568
- /**
2569
- * Neighbourhood or borough.
2631
+ * A plain explanation of this occurrence.
2570
2632
  */
2571
- readonly sublocality?: string;
2633
+ readonly detail: string;
2572
2634
  /**
2573
- * Street address, one line per entry, unit or apartment included.
2635
+ * The property that is archived.
2574
2636
  */
2575
- readonly addressLines: ReadonlyArray<string>;
2637
+ readonly objectId: `prop_${string}`;
2576
2638
  };
2577
2639
  /**
2578
- * What kind of property it is.
2579
- * - `apartment`: an apartment
2580
- * - `house`: a house
2581
- * - `condo`: a condominium unit
2582
- * - `room`: a room in a shared home
2583
- * - `commercial`: a commercial space
2584
- */
2585
- type PropertyKind = "apartment" | "house" | "condo" | "room" | "commercial";
2586
- /**
2587
- * The payment processor is unavailable. The payment processor did not answer. Nothing changed here: send the request again after the seconds Retry-After gives.
2640
+ * Property not found. No property has this id in the mode of your API key, live or test.
2588
2641
  */
2589
- type PaymentProcessorUnavailableProblem = {
2642
+ type PropertyNotFoundProblem = {
2590
2643
  /**
2591
2644
  * A URI that names the problem type. Compare it, never parse it.
2592
2645
  */
2593
- readonly type: "https://eversa.app/problems/payment-processor-unavailable";
2646
+ readonly type: "https://eversa.app/problems/property-not-found";
2594
2647
  /**
2595
2648
  * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
2596
2649
  */
@@ -2598,107 +2651,114 @@ type PaymentProcessorUnavailableProblem = {
2598
2651
  /**
2599
2652
  * The HTTP status code of this response.
2600
2653
  */
2601
- readonly status: 503;
2654
+ readonly status: 404;
2602
2655
  /**
2603
2656
  * A plain explanation of this occurrence.
2604
2657
  */
2605
2658
  readonly detail: string;
2659
+ /**
2660
+ * The property that was asked for.
2661
+ */
2662
+ readonly objectId: `prop_${string}`;
2606
2663
  };
2607
2664
  /**
2608
- * Where the applicant's payment stands.
2609
- * - `not_required`: the applicant pays nothing
2610
- * - `pending`: the applicant has not paid yet
2611
- * - `processing`: the applicant's card payment is on its way
2612
- * - `on_hold`: the payment is held and not charged yet
2613
- * - `paid`: the applicant paid
2614
- * - `refunded`: the payment was refunded
2615
- * - `waived`: you waived the payment
2616
- */
2617
- type ApplicantPaymentStatus = ("not_required" | "pending" | "processing" | "on_hold" | "paid" | "refunded" | "waived") | (string & Record<never, never>);
2618
- /**
2619
- * One person on an application, with their own screening.
2665
+ * A rental application for a property: its state, its applicants in summary and its decision. List its applicants, requirements and documents for the rest.
2620
2666
  */
2621
- type Applicant = {
2667
+ type Application = {
2622
2668
  /**
2623
- * Always `applicant`.
2669
+ * Always `application`.
2624
2670
  */
2625
- readonly object: "applicant";
2671
+ readonly object: "application";
2626
2672
  /**
2627
- * The applicant's id: `apl_` and 26 lowercase characters. Treat it as opaque.
2673
+ * The application's id: `app_` and 26 lowercase characters. Treat it as opaque.
2628
2674
  */
2629
- readonly id: `apl_${string}`;
2675
+ readonly id: `app_${string}`;
2630
2676
  /**
2631
2677
  * `true` when the object was created with a live key.
2632
2678
  */
2633
2679
  readonly livemode: boolean;
2634
- /**
2635
- * The application the applicant is on.
2636
- */
2637
- readonly applicationId: `app_${string}`;
2638
- /**
2639
- * The applicant's role: primary, co_applicant, guarantor.
2640
- */
2641
- readonly role: string;
2642
- readonly status: ApplicantStatus;
2643
2680
  /**
2644
2681
  * Your identifier for this object.
2645
2682
  */
2646
2683
  readonly externalId?: string;
2647
- readonly person: PersonSummary;
2648
- readonly invitedBy?: Actor;
2649
- readonly origin: ApplicantOrigin;
2650
- readonly relation?: ApplicantRelation;
2651
- /**
2652
- * The applicant you entered whom this person, who joined by the application's link under a name like theirs, may be. Until they are merged or told apart in the Eversa dashboard, they take no spot, are not asked for the fee and cannot send their part. Absent otherwise.
2653
- */
2654
- readonly possibleDuplicateOf?: `apl_${string}`;
2655
- readonly mode: ScreeningMode;
2656
- /**
2657
- * The hosted or embedded form session. Absent when mode is manual.
2658
- */
2659
- readonly sessionId?: `sess_${string}`;
2660
- readonly delivery: ApplicantDelivery;
2684
+ readonly type: ApplicationType | (string & Record<never, never>);
2661
2685
  /**
2662
- * The applicant's own screening.
2686
+ * The template applied to this application, by id and version.
2663
2687
  */
2664
- readonly screening: {
2688
+ readonly template: {
2665
2689
  /**
2666
- * The applicant's screening.
2690
+ * The template's id: `tpl_` and 26 lowercase characters. Treat it as opaque.
2667
2691
  */
2668
- readonly id: `scr_${string}`;
2669
- readonly status: ScreeningStatus | (string & Record<never, never>);
2692
+ readonly id: `tpl_${string}`;
2670
2693
  /**
2671
- * true while some checks are still running.
2694
+ * Template version.
2672
2695
  */
2673
- readonly partial: boolean;
2696
+ readonly version: number;
2674
2697
  };
2675
- readonly data?: ApplicantData;
2676
2698
  /**
2677
- * The applicant's documents. Each lists what the document is, its size, dates and status; its file name, provenance and review only where the credential holds `documents:read`, which the documents endpoints and the file's download need too.
2699
+ * The fee each applicant pays, fixed when the application was made: the template's share of what its checks cost then, with its additional fee; null when none.
2678
2700
  */
2679
- readonly documents: ReadonlyArray<Document>;
2701
+ readonly applicationFee: ApplicationFee | null;
2702
+ readonly status: ApplicationStatus | (string & Record<never, never>);
2703
+ readonly summary: ApplicationCounts;
2704
+ readonly spots: Spots;
2705
+ readonly joining: Joining;
2706
+ readonly link?: ApplicationLink;
2707
+ readonly subject: Subject;
2708
+ readonly data: ApplicationData;
2709
+ readonly payer: PayerKind | (string & Record<never, never>);
2680
2710
  /**
2681
- * The consents the applicant gave.
2711
+ * The applicants, each in summary. Retrieve or list them (GET /api/applications/{id}/applicants) for their situation, documents and consents.
2682
2712
  */
2683
- readonly consents: ReadonlyArray<Consent>;
2684
- readonly payment?: ApplicantPayment;
2713
+ readonly applicants: ReadonlyArray<ApplicantSummary>;
2714
+ readonly decision?: Decision;
2685
2715
  /**
2686
- * When the applicant submitted the form. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2716
+ * Every decision a newer one replaced, including one set aside because an applicant was added.
2687
2717
  */
2688
- readonly submittedAt?: string;
2718
+ readonly previousDecisions: ReadonlyArray<Decision>;
2689
2719
  /**
2690
- * Who took the applicant off, when and why; present when status is removed or rejected.
2720
+ * Why and when the application was closed; present when status is closed.
2691
2721
  */
2692
- readonly removed?: {
2722
+ readonly closed?: {
2723
+ readonly reason: ApplicationClosedReason;
2693
2724
  /**
2694
- * When the applicant was removed. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2725
+ * The note given when it was closed.
2726
+ */
2727
+ readonly note?: string;
2728
+ /**
2729
+ * When it was closed. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2695
2730
  */
2696
2731
  readonly at: string;
2697
2732
  readonly by: Actor;
2698
- readonly reason: RemovedReason;
2699
2733
  };
2700
2734
  /**
2701
- * When the applicant was added. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2735
+ * The person on your team who handles the application.
2736
+ */
2737
+ readonly assignee?: {
2738
+ /**
2739
+ * Their Eversa user id, `usr_` and 26 lowercase characters. They are a member of your organization.
2740
+ */
2741
+ readonly userId: `usr_${string}`;
2742
+ /**
2743
+ * Their name.
2744
+ */
2745
+ readonly name?: string;
2746
+ };
2747
+ readonly createdBy: Actor;
2748
+ readonly amounts: Amounts;
2749
+ /**
2750
+ * Status of the report and where to read it.
2751
+ */
2752
+ readonly report: {
2753
+ readonly status: ReportStatus;
2754
+ /**
2755
+ * API path of the report.
2756
+ */
2757
+ readonly url: string;
2758
+ };
2759
+ readonly metadata: Metadata;
2760
+ /**
2761
+ * When the object was created. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2702
2762
  */
2703
2763
  readonly createdAt: string;
2704
2764
  /**
@@ -2707,96 +2767,644 @@ type Applicant = {
2707
2767
  readonly updatedAt: string;
2708
2768
  };
2709
2769
  /**
2710
- * Why the applicant was removed.
2711
- * - `withdrawn`: the applicant asked to leave
2712
- * - `replaced`: another applicant takes their place
2713
- * - `added_by_mistake`: the applicant was added by mistake
2714
- * - `rejected`: you rejected the applicant, who is listed as rejected rather than removed
2715
- * - `no_longer_needed`: the applicant is no longer needed
2716
- * - `other`: any other reason
2717
- * - `removed_by_applicant`: another person on the application removed them from the hosted form before they sent their part
2718
- * - `merged`: you merged into them the person who joined by the link under a name like theirs, who goes on as the applicant in their place
2770
+ * Why the application was closed.
2771
+ * - `withdrawn`: the applicants withdrew
2772
+ * - `no_longer_needed`: the application is no longer needed
2773
+ * - `expired`: the application expired
2774
+ * - `declined`: you declined the application
2775
+ * - `offer_declined`: the applicant declined the offer
2776
+ * - `offer_expired`: the offer expired before the applicant accepted it
2777
+ * - `subject_unavailable`: the property is no longer available
2778
+ * - `duplicate`: another application covers the same request
2779
+ * - `other`: any other reason, including withdrawing a pending offer
2719
2780
  */
2720
- type RemovedReason = ("withdrawn" | "replaced" | "added_by_mistake" | "rejected" | "no_longer_needed" | "other" | "removed_by_applicant" | "merged") | (string & Record<never, never>);
2781
+ type ApplicationClosedReason = ("withdrawn" | "no_longer_needed" | "expired" | "declined" | "offer_declined" | "offer_expired" | "subject_unavailable" | "duplicate" | "other") | (string & Record<never, never>);
2721
2782
  /**
2722
- * What the applicant pays, the application's fee or their screening, and where the payment stands.
2783
+ * A main factor a decision rested on.
2784
+ * - `credit_grade`: the credit score or grade
2785
+ * - `credit_history`: the payment history and collections in the credit file
2786
+ * - `income_ratio`: the rent as a share of the income
2787
+ * - `income_verification`: whether the income could be verified
2788
+ * - `employment`: the employment
2789
+ * - `rental_history`: the rental history, rental board records included
2790
+ * - `references`: the references
2791
+ * - `legal_records`: court or criminal records
2792
+ * - `identity`: the identity verification
2793
+ * - `guarantor`: a guarantor or a co-applicant
2794
+ * - `other`: any other factor
2723
2795
  */
2724
- type ApplicantPayment = {
2725
- readonly payer: PayerKind | (string & Record<never, never>);
2726
- readonly status: ApplicantPaymentStatus;
2727
- readonly method: PaymentMethod;
2728
- readonly amount: Amount;
2729
- };
2796
+ type DecisionFactor = "credit_grade" | "credit_history" | "income_ratio" | "income_verification" | "employment" | "rental_history" | "references" | "legal_records" | "identity" | "guarantor" | "other";
2730
2797
  /**
2731
- * How the applicant's payment is collected.
2732
- * - `card`: the applicant pays by card through Eversa (`startApplicantPayment`), which you can refund
2733
- * - `recorded`: you collect it and record where it stands (`recordApplicantPayment`)
2798
+ * How the decision was made, as you declare it.
2799
+ * - `human`: a person decided
2800
+ * - `automated`: the decision was computed
2801
+ * - `human_reviewed`: computed, then reviewed by a person
2734
2802
  */
2735
- type PaymentMethod = ("card" | "recorded") | (string & Record<never, never>);
2803
+ type DecisionBasis = "human" | "automated" | "human_reviewed";
2736
2804
  /**
2737
- * The applicant's situation as filled in: work, income, references and rent.
2805
+ * The adverse notice a decline sends the active primary applicant, by every channel they can be reached on, in the language of their form. It says the application was not accepted, and that the applicant may ask your organization which information the decision relied on and where it came from, and have wrong information corrected. A decline whose basis is automated adds the notice Quebec's private-sector act asks for (s. 12.1): that the decision was made by automated processing, that the applicant may ask for the personal information used, the reasons and the principal factors and parameters, and have that information corrected, and that they may submit their observations to a member of your staff who can review the decision. Co-applicants and guarantors get no notice: telling them is your organization's job.
2738
2806
  */
2739
- type ApplicantData = {
2740
- readonly situation?: ApplicantSituation | (string & Record<never, never>);
2807
+ type AdverseNotice = {
2741
2808
  /**
2742
- * Addresses the applicant lived at.
2809
+ * Always true: every decline sends a notice.
2743
2810
  */
2744
- readonly residenceHistory?: ReadonlyArray<AddressPeriod>;
2811
+ readonly required: true;
2745
2812
  /**
2746
- * Jobs.
2813
+ * How the notice is sent: email, sms or both. Empty when the applicant has neither, and failed_at is set.
2747
2814
  */
2748
- readonly employment?: ReadonlyArray<{
2749
- /**
2750
- * Name of the employer.
2751
- */
2752
- readonly employer: string;
2753
- /**
2754
- * Job title.
2755
- */
2756
- readonly position?: string;
2757
- readonly type: EmploymentType | (string & Record<never, never>);
2758
- /**
2759
- * When the job started. A calendar date in UTC.
2760
- */
2761
- readonly since?: string;
2762
- }>;
2815
+ readonly channels: ReadonlyArray<InviteChannel>;
2763
2816
  /**
2764
- * Income sources.
2817
+ * When the notice was sent on a channel. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2765
2818
  */
2766
- readonly income?: ReadonlyArray<{
2767
- readonly source: IncomeSourceType | (string & Record<never, never>);
2768
- readonly amount: Amount;
2769
- readonly frequency: IncomeFrequency | (string & Record<never, never>);
2770
- /**
2771
- * Hours worked per week; required when frequency is hourly.
2772
- */
2773
- readonly hoursPerWeek?: number;
2774
- /**
2775
- * Who pays the income, such as the employer of a second job.
2819
+ readonly sentAt?: string;
2820
+ /**
2821
+ * When every message of the notice failed, or the applicant could not be reached on any channel. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2822
+ */
2823
+ readonly failedAt?: string;
2824
+ };
2825
+ /**
2826
+ * A channel a message goes out on.
2827
+ * - `email`: an email to the person's address
2828
+ * - `sms`: a text message to the person's phone
2829
+ */
2830
+ type InviteChannel = ("email" | "sms") | (string & Record<never, never>);
2831
+ /**
2832
+ * The offer an approval creates; the applicant accepts it through a requirement.
2833
+ */
2834
+ type Offer = {
2835
+ /**
2836
+ * The offer's id: `ofr_` and 26 lowercase characters. Treat it as opaque.
2837
+ */
2838
+ readonly id: `ofr_${string}`;
2839
+ readonly status: OfferStatus;
2840
+ readonly withdrawnReason?: OfferWithdrawnReason;
2841
+ readonly terms: OfferTerms;
2842
+ /**
2843
+ * Version of the offer terms.
2844
+ */
2845
+ readonly termsVersion: number;
2846
+ /**
2847
+ * SHA-256 of the offer terms as shown to the applicant, for the terms_version beside it. Accepting the offer quotes it as offer_terms_hash.
2848
+ */
2849
+ readonly termsHash: string;
2850
+ /**
2851
+ * The offer_acceptance requirement whose answer accepts this offer.
2852
+ */
2853
+ readonly requirementId: `req_${string}`;
2854
+ /**
2855
+ * When the offer was sent. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2856
+ */
2857
+ readonly sentAt: string;
2858
+ /**
2859
+ * When the offer expires. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2860
+ */
2861
+ readonly expiresAt?: string;
2862
+ /**
2863
+ * When the applicant answered. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2864
+ */
2865
+ readonly respondedAt?: string;
2866
+ readonly respondedBy?: Actor;
2867
+ /**
2868
+ * true when you recorded the answer on the applicant's behalf.
2869
+ */
2870
+ readonly onBehalf?: boolean;
2871
+ /**
2872
+ * How the answer reached you, when you recorded it on the applicant's behalf.
2873
+ */
2874
+ readonly evidence?: {
2875
+ readonly method: EvidenceMethod | (string & Record<never, never>);
2876
+ /**
2877
+ * Your reference for the evidence, such as a call log entry.
2776
2878
  */
2777
- readonly paidBy?: string;
2778
- readonly verification: IncomeVerification;
2879
+ readonly reference?: string;
2880
+ };
2881
+ };
2882
+ /**
2883
+ * What the offer promises, as the applicant sees it: the rent, the lease and the conditions. terms_hash covers them, with the application, the decision and terms_version.
2884
+ */
2885
+ type OfferTerms = {
2886
+ readonly rent?: Amount;
2887
+ readonly lease?: OfferLease;
2888
+ /**
2889
+ * The conditions of the approval, in the order it set them; empty for an approval without.
2890
+ */
2891
+ readonly conditions: ReadonlyArray<OfferCondition>;
2892
+ };
2893
+ /**
2894
+ * A condition of the offer, as the applicant accepts it.
2895
+ */
2896
+ type OfferCondition = {
2897
+ readonly code: ConditionCode | (string & Record<never, never>);
2898
+ /**
2899
+ * A note on the condition.
2900
+ */
2901
+ readonly note?: string;
2902
+ };
2903
+ /**
2904
+ * The lease the offer offers: its first day and, for a fixed term, its last.
2905
+ */
2906
+ type OfferLease = {
2907
+ /**
2908
+ * The lease's first day. A calendar date in UTC.
2909
+ */
2910
+ readonly startsOn: string;
2911
+ /**
2912
+ * The lease's last day, for a fixed term. Absent for a lease of indeterminate term. A calendar date in UTC.
2913
+ */
2914
+ readonly endsOn?: string;
2915
+ };
2916
+ /**
2917
+ * Why the offer was withdrawn.
2918
+ * - `applicant_added`: an applicant joined after the decision
2919
+ * - `organization`: you withdrew it
2920
+ */
2921
+ type OfferWithdrawnReason = ("applicant_added" | "organization") | (string & Record<never, never>);
2922
+ /**
2923
+ * Where the offer stands.
2924
+ * - `pending`: waiting for the applicant's answer
2925
+ * - `accepted`: the applicant accepted it; final
2926
+ * - `declined`: the applicant declined it; final
2927
+ * - `expired`: no answer came before it expired; final
2928
+ * - `withdrawn`: the offer was withdrawn; final
2929
+ */
2930
+ type OfferStatus = ("pending" | "accepted" | "declined" | "expired" | "withdrawn") | (string & Record<never, never>);
2931
+ /**
2932
+ * Where a condition of an approval stands.
2933
+ * - `pending`: the offer is not accepted yet
2934
+ * - `accepted`: the applicant accepted the offer and its conditions
2935
+ * - `met`: the condition was fulfilled; final
2936
+ * - `waived`: you waived the condition; final
2937
+ */
2938
+ type ConditionStatus = ("pending" | "accepted" | "met" | "waived") | (string & Record<never, never>);
2939
+ /**
2940
+ * Why you declined the application.
2941
+ * - `credit`: the credit file
2942
+ * - `income`: the income
2943
+ * - `rental_history`: the rental history
2944
+ * - `references`: the references
2945
+ * - `legal_records`: court or criminal records
2946
+ * - `identity`: the identity could not be confirmed
2947
+ * - `incomplete`: the application is incomplete
2948
+ * - `other`: any other reason
2949
+ */
2950
+ type DeclineReason = "credit" | "income" | "rental_history" | "references" | "legal_records" | "identity" | "incomplete" | "other";
2951
+ /**
2952
+ * What you decided.
2953
+ * - `approved`: you approved the application, and an offer goes to the applicant
2954
+ * - `conditionally_approved`: you approved it under conditions, and an offer goes to the applicant
2955
+ * - `declined`: you declined it with reasons, and it closes
2956
+ * - `deferred`: you put the decision off
2957
+ */
2958
+ type DecisionOutcome = "approved" | "conditionally_approved" | "declined" | "deferred";
2959
+ /**
2960
+ * A decision on the application, with the offer it creates or the notice it sends.
2961
+ */
2962
+ type Decision = {
2963
+ /**
2964
+ * The decision's id: `dec_` and 26 lowercase characters. Treat it as opaque.
2965
+ */
2966
+ readonly id: `dec_${string}`;
2967
+ readonly outcome: DecisionOutcome | (string & Record<never, never>);
2968
+ /**
2969
+ * Why you declined.
2970
+ */
2971
+ readonly reasons?: ReadonlyArray<DeclineReason | (string & Record<never, never>)>;
2972
+ /**
2973
+ * The conditions of a conditional approval.
2974
+ */
2975
+ readonly conditions: ReadonlyArray<{
2976
+ readonly code: ConditionCode | (string & Record<never, never>);
2977
+ /**
2978
+ * A note on the condition.
2979
+ */
2980
+ readonly note?: string;
2981
+ readonly status: ConditionStatus;
2779
2982
  }>;
2780
- readonly references?: References;
2983
+ readonly offer?: Offer;
2984
+ readonly notice?: AdverseNotice;
2985
+ readonly basis: DecisionBasis | (string & Record<never, never>);
2986
+ /**
2987
+ * The main factors behind the decision.
2988
+ */
2989
+ readonly factors?: ReadonlyArray<DecisionFactor | (string & Record<never, never>)>;
2990
+ readonly madeBy: Actor;
2991
+ /**
2992
+ * When the decision was recorded. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
2993
+ */
2994
+ readonly decidedAt: string;
2995
+ /**
2996
+ * Your own note; never shown to the applicant.
2997
+ */
2998
+ readonly note?: string;
2999
+ /**
3000
+ * Set when an applicant was added after this decision. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3001
+ */
3002
+ readonly supersededAt?: string;
3003
+ };
3004
+ /**
3005
+ * An applicant as a list shows it. Retrieve the applicant for their situation, documents and consents.
3006
+ */
3007
+ type ApplicantSummary = {
3008
+ /**
3009
+ * Always `applicant`.
3010
+ */
3011
+ readonly object: "applicant";
3012
+ /**
3013
+ * The applicant's id: `apl_` and 26 lowercase characters. Treat it as opaque.
3014
+ */
3015
+ readonly id: `apl_${string}`;
3016
+ /**
3017
+ * The applicant's role: primary, co_applicant, guarantor.
3018
+ */
3019
+ readonly role: string;
3020
+ readonly status: ApplicantStatus;
3021
+ readonly person: PersonSummary;
3022
+ };
3023
+ /**
3024
+ * Facts about the household, never about one applicant.
3025
+ */
3026
+ type ApplicationData = {
3027
+ /**
3028
+ * Who and what will live in the property, and whether notice was given where they live now.
3029
+ */
3030
+ readonly household?: {
3031
+ /**
3032
+ * People who will live in the property besides the applicants.
3033
+ */
3034
+ readonly occupants?: ReadonlyArray<{
3035
+ readonly relationship: Relationship | (string & Record<never, never>);
3036
+ /**
3037
+ * true for a minor.
3038
+ */
3039
+ readonly isMinor: boolean;
3040
+ }>;
3041
+ /**
3042
+ * Pets, up to ten entries.
3043
+ */
3044
+ readonly pets?: ReadonlyArray<{
3045
+ readonly kind: PetKind | (string & Record<never, never>);
3046
+ /**
3047
+ * How many.
3048
+ */
3049
+ readonly count: number;
3050
+ }>;
3051
+ /**
3052
+ * Number of vehicles.
3053
+ */
3054
+ readonly vehicles?: number;
3055
+ /**
3056
+ * true once the household gave notice to the landlord of the home it rents now, false while it has not. Absent when it was not said.
3057
+ */
3058
+ readonly noticeGiven?: boolean;
3059
+ };
3060
+ /**
3061
+ * The date the household wants to move in. A calendar date in UTC.
3062
+ */
3063
+ readonly desiredMoveIn?: string;
3064
+ readonly custom?: CustomBlock;
3065
+ };
3066
+ /**
3067
+ * Up to 50 answers to the questions your account adds to the form.
3068
+ */
3069
+ type CustomBlock = {
3070
+ readonly [key: string]: (string & Record<never, never>) | number | boolean;
3071
+ };
3072
+ /**
3073
+ * The kind of pet.
3074
+ * - `dog`: a dog
3075
+ * - `cat`: a cat
3076
+ * - `other`: any other animal
3077
+ */
3078
+ type PetKind = "dog" | "cat" | "other";
3079
+ /**
3080
+ * How an occupant is related to the applicants.
3081
+ * - `spouse`: a spouse
3082
+ * - `partner`: a partner
3083
+ * - `child`: a child
3084
+ * - `parent`: a parent
3085
+ * - `roommate`: a roommate
3086
+ * - `other`: any other relationship
3087
+ */
3088
+ type Relationship = "spouse" | "partner" | "child" | "parent" | "roommate" | "other";
3089
+ /**
3090
+ * What was applied for: a copy of the property, taken when the application opened.
3091
+ */
3092
+ type Subject = {
3093
+ /**
3094
+ * Always property.
3095
+ */
3096
+ readonly type: "property";
3097
+ readonly property: Property;
3098
+ /**
3099
+ * When the property was copied into the application; the property itself may change later. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3100
+ */
3101
+ readonly snapshotAt: string;
3102
+ };
3103
+ /**
3104
+ * A property you rent out: its address, kind, rent and listing facts.
3105
+ */
3106
+ type Property = {
3107
+ /**
3108
+ * Always `property`.
3109
+ */
3110
+ readonly object: "property";
3111
+ /**
3112
+ * The property's id: `prop_` and 26 lowercase characters. Treat it as opaque.
3113
+ */
3114
+ readonly id: `prop_${string}`;
3115
+ /**
3116
+ * `true` when the object was created with a live key.
3117
+ */
3118
+ readonly livemode: boolean;
3119
+ /**
3120
+ * Your identifier for this object.
3121
+ */
3122
+ readonly externalId?: string;
3123
+ readonly kind?: PropertyKind | (string & Record<never, never>);
3124
+ readonly address: PostalAddress;
3125
+ readonly rent?: Amount;
3126
+ /**
3127
+ * true when the rent is subsidized or rent-controlled.
3128
+ */
3129
+ readonly isAffordable?: boolean;
3130
+ /**
3131
+ * How many rooms, as Quebec listings count them: in half-steps, the bathroom counting as the half (4.5 is a 4½).
3132
+ */
3133
+ readonly rooms?: number;
3134
+ /**
3135
+ * How many bedrooms.
3136
+ */
3137
+ readonly bedrooms?: number;
3138
+ /**
3139
+ * How many bathrooms, in half-steps: a half bathroom has a toilet and a sink, and no shower or tub.
3140
+ */
3141
+ readonly bathrooms?: number;
3142
+ readonly floorArea?: FloorArea;
3143
+ /**
3144
+ * How many parking spaces come with the property.
3145
+ */
3146
+ readonly parkingSpaces?: number;
3147
+ /**
3148
+ * When the property was archived; from then on it takes no new application. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3149
+ */
3150
+ readonly archivedAt?: string;
3151
+ readonly metadata: Metadata;
3152
+ /**
3153
+ * When the object was created. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3154
+ */
3155
+ readonly createdAt: string;
3156
+ /**
3157
+ * When the object last changed. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3158
+ */
3159
+ readonly updatedAt: string;
3160
+ };
3161
+ /**
3162
+ * The property's floor area, in square metres.
3163
+ */
3164
+ type FloorArea = {
3165
+ /**
3166
+ * The area, to the centimetre.
3167
+ */
3168
+ readonly value: number;
3169
+ /**
3170
+ * Square metres (SI), the one unit an area is kept in.
3171
+ */
3172
+ readonly unit: "m2";
3173
+ };
3174
+ /**
3175
+ * A postal address as returned, with its id.
3176
+ */
3177
+ type PostalAddress = {
3178
+ /**
3179
+ * The address's id: `addr_` and 26 lowercase characters. Treat it as opaque.
3180
+ */
3181
+ readonly id: `addr_${string}`;
3182
+ /**
3183
+ * Country, as an ISO 3166-1 alpha-2 code.
3184
+ */
3185
+ readonly regionCode: string;
3186
+ /**
3187
+ * Language the address is written in, as a BCP 47 tag. An RFC 5646 language tag of at most 35 characters, in its canonical case.
3188
+ */
3189
+ readonly languageCode?: string;
3190
+ /**
3191
+ * Postal code; a Canadian code reads A1A 1A1.
3192
+ */
3193
+ readonly postalCode?: string;
3194
+ /**
3195
+ * Sorting code, where the country uses one.
3196
+ */
3197
+ readonly sortingCode?: string;
3198
+ /**
3199
+ * Province, state or region, as its ISO 3166-2 code without the country prefix.
3200
+ */
3201
+ readonly administrativeArea?: string;
3202
+ /**
3203
+ * City.
3204
+ */
3205
+ readonly locality?: string;
3206
+ /**
3207
+ * Neighbourhood or borough.
3208
+ */
3209
+ readonly sublocality?: string;
3210
+ /**
3211
+ * Street address, one line per entry, unit or apartment included.
3212
+ */
3213
+ readonly addressLines: ReadonlyArray<string>;
3214
+ };
3215
+ /**
3216
+ * What kind of property it is.
3217
+ * - `apartment`: an apartment
3218
+ * - `house`: a house
3219
+ * - `condo`: a condominium unit
3220
+ * - `room`: a room in a shared home
3221
+ * - `commercial`: a commercial space
3222
+ */
3223
+ type PropertyKind = "apartment" | "house" | "condo" | "room" | "commercial";
3224
+ /**
3225
+ * The links people join the application by: one for the people who will live there and, once you ask for a guarantor, one that leads only to the guarantor's spot. Each opens no one's file, so read, copy, print or share them at any time.
3226
+ */
3227
+ type ApplicationLink = {
3228
+ /**
3229
+ * The link for the people who will live there: anyone who has it can join while joining is open.
3230
+ */
3231
+ readonly url: string;
3232
+ /**
3233
+ * The link that leads only to the guarantor's spot; present once you asked for a guarantor.
3234
+ */
3235
+ readonly guarantorUrl?: string;
3236
+ };
3237
+ /**
3238
+ * Whether people can still join the application, and the day joining stops.
3239
+ */
3240
+ type Joining = {
3241
+ readonly state: JoiningState;
3242
+ /**
3243
+ * join_until: when joining stops. At that time Eversa expires the people you entered who never started, and closes the application as expired when nobody is on it. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3244
+ */
3245
+ readonly until: string;
3246
+ };
3247
+ /**
3248
+ * Whether someone can still join the application as a resident.
3249
+ * - `open`: a resident can join: a spot is free and joining has not stopped
3250
+ * - `full`: every spot is taken; raise resident_spots to let someone else join
3251
+ * - `closed`: joining stopped: join_until passed, a decision other than a deferral stands, or the application ended. People already on it can still finish
3252
+ */
3253
+ type JoiningState = ("open" | "full" | "closed") | (string & Record<never, never>);
3254
+ /**
3255
+ * The residents the application has room for, and how many of them are on it.
3256
+ */
3257
+ type Spots = {
3258
+ /**
3259
+ * The most residents who will live there, resident_spots: the primary and the co-applicants.
3260
+ */
3261
+ readonly total: number;
3262
+ /**
3263
+ * The active primary and co-applicants on it; a guarantor takes no spot.
3264
+ */
3265
+ readonly taken: number;
3266
+ };
3267
+ /**
3268
+ * Counts of applicants and of open requirements.
3269
+ */
3270
+ type ApplicationCounts = {
3271
+ /**
3272
+ * Applicant counts.
3273
+ */
3274
+ readonly applicants: {
3275
+ /**
3276
+ * Applicants still on the application.
3277
+ */
3278
+ readonly active: number;
3279
+ /**
3280
+ * Applicants who submitted their form.
3281
+ */
3282
+ readonly submitted: number;
3283
+ /**
3284
+ * Applicants whose screening is done.
3285
+ */
3286
+ readonly screened: number;
3287
+ };
3288
+ /**
3289
+ * Requirement counts, by whom each waits on.
3290
+ */
3291
+ readonly requirements: {
3292
+ /**
3293
+ * Open requirements addressed to an applicant.
3294
+ */
3295
+ readonly openForApplicants: number;
3296
+ /**
3297
+ * Requirements waiting on you: open ones addressed to you, and answers waiting for your review. More than 0 while the status is awaiting_organization.
3298
+ */
3299
+ readonly openForOrganization: number;
3300
+ };
3301
+ };
3302
+ /**
3303
+ * The application fee each applicant pays: the amount before taxes and the taxes, in one currency.
3304
+ */
3305
+ type ApplicationFee = {
3306
+ readonly amount: Amount;
3307
+ readonly tax: Amount;
3308
+ };
3309
+ /**
3310
+ * A rental application to open for the property, with the applicants Eversa invites and, when you have several, the template.
3311
+ */
3312
+ type CreateApplication = {
3313
+ readonly type?: ApplicationType;
3314
+ /**
3315
+ * The template to apply; omit for your default for this type of application.
3316
+ */
3317
+ readonly template?: `tpl_${string}`;
3318
+ readonly data?: ApplicationDataInput;
3319
+ readonly payer?: PayerKind;
3320
+ readonly residentSpots?: number;
3321
+ /**
3322
+ * When joining stops, after now and at most 30 days ahead; 14 days after the creation when omitted. People already on the application can still finish after it. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3323
+ */
3324
+ readonly joinUntil?: string;
3325
+ /**
3326
+ * Your identifier for this object. Trimmed and Unicode-normalized (NFC); case kept.
3327
+ */
3328
+ readonly externalId?: string;
3329
+ readonly metadata?: MetadataInput;
3330
+ /**
3331
+ * The applicants, none to eight: with none, people join by the application's link. One is primary when any will live there: role defaults to primary, so send co_applicant or guarantor for the others; a lone guarantor needs no primary.
3332
+ */
3333
+ readonly applicants: ReadonlyArray<InvitedApplicantInput>;
3334
+ };
3335
+ /**
3336
+ * An applicant invited to the hosted form: Eversa sends the invite by email and by text message when both are given, which needs the person's email, phone or existing person id, unless invite.delivery is organization and you send the link yourself.
3337
+ */
3338
+ type InvitedApplicantInput = {
3339
+ readonly role?: ApplicantRole;
3340
+ readonly person: PersonInput;
3341
+ readonly data?: ApplicantDataInput;
2781
3342
  /**
2782
- * A landlord who can give a reference.
3343
+ * Your identifier for this object. Trimmed and Unicode-normalized (NFC); case kept.
2783
3344
  */
2784
- readonly currentLandlord?: {
3345
+ readonly externalId?: string;
3346
+ readonly invite?: ApplicantInviteSettings;
3347
+ };
3348
+ /**
3349
+ * Settings for the applicant's invitation: who delivers the application's link, its language and reminders.
3350
+ */
3351
+ type ApplicantInviteSettings = {
3352
+ readonly delivery?: InviteDelivery;
3353
+ /**
3354
+ * Language of the invite and the form. Defaults to en-CA; send fr-CA for a French invite. A BCP 47 tag; en and fr tags resolve to en-CA and fr-CA.
3355
+ */
3356
+ readonly locale?: string;
3357
+ /**
3358
+ * Whether Eversa reminds the person by the application's link 1, 3 and 7 days after the invitation, while they have not sent their part and Eversa delivers their messages. false stops them for good: nothing turns them back on, and each reminder lets the person stop them too. Omitted: on.
3359
+ */
3360
+ readonly reminders?: boolean;
3361
+ };
3362
+ /**
3363
+ * Who carries the invite's link to the person.
3364
+ * - `eversa`: Eversa sends the link by email and by text message, on every channel the person has
3365
+ * - `organization`: you send the link yourself, from the answer that created or resent the invite; Eversa sends the person nothing, and the person needs no email or phone
3366
+ */
3367
+ type InviteDelivery = "eversa" | "organization";
3368
+ /**
3369
+ * What you know about the applicant's situation: work, income, rent and flags.
3370
+ */
3371
+ type ApplicantDataInput = {
3372
+ readonly situation?: ApplicantSituation;
3373
+ /**
3374
+ * Jobs, up to five.
3375
+ */
3376
+ readonly employment?: ReadonlyArray<{
2785
3377
  /**
2786
- * Name of the contact.
3378
+ * Name of the employer. Trimmed and Unicode-normalized (NFC); case kept.
2787
3379
  */
2788
- readonly name: string;
3380
+ readonly employer: string;
2789
3381
  /**
2790
- * Email of the contact.
3382
+ * Job title. Trimmed and Unicode-normalized (NFC); case kept.
2791
3383
  */
2792
- readonly email?: string;
3384
+ readonly position?: string;
3385
+ readonly type: EmploymentType;
2793
3386
  /**
2794
- * Phone number of the contact. In E.164.
3387
+ * When the job started. A calendar date in UTC.
2795
3388
  */
2796
- readonly phone?: string;
2797
- };
3389
+ readonly since?: string;
3390
+ }>;
3391
+ /**
3392
+ * Income sources, up to five.
3393
+ */
3394
+ readonly income?: ReadonlyArray<{
3395
+ readonly source: IncomeSourceType;
3396
+ readonly amount: Amount;
3397
+ readonly frequency: IncomeFrequency;
3398
+ /**
3399
+ * Hours worked per week; required when frequency is hourly.
3400
+ */
3401
+ readonly hoursPerWeek?: number;
3402
+ /**
3403
+ * Who pays the income, such as the employer of a second job. Trimmed and Unicode-normalized (NFC); case kept.
3404
+ */
3405
+ readonly paidBy?: string;
3406
+ }>;
2798
3407
  readonly currentRent?: Amount;
2799
- readonly livingArrangement?: LivingArrangement | (string & Record<never, never>);
2800
3408
  /**
2801
3409
  * Facts that change which questions the form asks.
2802
3410
  */
@@ -2827,13 +3435,12 @@ type ApplicantData = {
2827
3435
  */
2828
3436
  readonly sms?: boolean;
2829
3437
  };
2830
- readonly representative?: ApplicantRepresentative;
2831
3438
  /**
2832
3439
  * The applicant's status in Canada and how long they have lived here.
2833
3440
  */
2834
3441
  readonly residency?: {
2835
- readonly status: ResidencyStatus | (string & Record<never, never>);
2836
- readonly timeInCanada?: TimeInCanada | (string & Record<never, never>);
3442
+ readonly status: ResidencyStatus;
3443
+ readonly timeInCanada?: TimeInCanada;
2837
3444
  };
2838
3445
  /**
2839
3446
  * What the applicant states about their situation, one block per situation.
@@ -2845,7 +3452,7 @@ type ApplicantData = {
2845
3452
  readonly salaried?: {
2846
3453
  readonly annualIncome?: Amount;
2847
3454
  /**
2848
- * Name of the employer.
3455
+ * Name of the employer. Trimmed and Unicode-normalized (NFC); case kept.
2849
3456
  */
2850
3457
  readonly employer: string;
2851
3458
  /**
@@ -2859,7 +3466,7 @@ type ApplicantData = {
2859
3466
  readonly selfEmployed?: {
2860
3467
  readonly annualNetIncome?: Amount;
2861
3468
  /**
2862
- * Name of the business.
3469
+ * Name of the business. Trimmed and Unicode-normalized (NFC); case kept.
2863
3470
  */
2864
3471
  readonly businessName: string;
2865
3472
  /**
@@ -2879,16 +3486,16 @@ type ApplicantData = {
2879
3486
  */
2880
3487
  readonly student?: {
2881
3488
  /**
2882
- * Name of the school.
3489
+ * Name of the school. Trimmed and Unicode-normalized (NFC); case kept.
2883
3490
  */
2884
3491
  readonly school: string;
2885
- readonly studyLoad: StudyLoad | (string & Record<never, never>);
3492
+ readonly studyLoad: StudyLoad;
2886
3493
  /**
2887
3494
  * Where the student's money comes from, one to six sources, each once.
2888
3495
  */
2889
- readonly fundingSources: ReadonlyArray<FundingSource | (string & Record<never, never>)>;
3496
+ readonly fundingSources: ReadonlyArray<FundingSource>;
2890
3497
  /**
2891
- * What "other" funding is.
3498
+ * What "other" funding is. Trimmed and Unicode-normalized (NFC); case kept.
2892
3499
  */
2893
3500
  readonly fundingOther?: string;
2894
3501
  readonly partTimeIncome?: Amount;
@@ -2903,7 +3510,7 @@ type ApplicantData = {
2903
3510
  readonly arrivedOn: string;
2904
3511
  readonly annualIncome?: Amount;
2905
3512
  /**
2906
- * Name of the employer, when the newcomer has one.
3513
+ * Name of the employer, when the newcomer has one. Trimmed and Unicode-normalized (NFC); case kept.
2907
3514
  */
2908
3515
  readonly employer?: string;
2909
3516
  };
@@ -2912,18 +3519,18 @@ type ApplicantData = {
2912
3519
  */
2913
3520
  readonly other?: {
2914
3521
  /**
2915
- * The applicant's situation, in their own words.
3522
+ * The applicant's situation, in their own words. Trimmed and Unicode-normalized (NFC); case kept; may span lines, line breaks stored as \n.
2916
3523
  */
2917
3524
  readonly description: string;
2918
3525
  readonly annualIncome?: Amount;
2919
3526
  };
2920
3527
  };
2921
- readonly custom?: CustomBlock;
3528
+ readonly custom?: CustomBlockInput;
2922
3529
  };
2923
3530
  /**
2924
- * Up to 50 answers to the questions your account adds to the form.
3531
+ * Up to 50 answers to the questions your account adds to the form: strings, numbers or booleans, an integer within ±9007199254740991 (I-JSON, RFC 7493). Keys up to 40 characters and string answers up to 500, both trimmed and Unicode-normalized (NFC), case kept, without control characters or lone surrogates; two keys that become identical are refused.
2925
3532
  */
2926
- type CustomBlock = {
3533
+ type CustomBlockInput = {
2927
3534
  readonly [key: string]: (string & Record<never, never>) | number | boolean;
2928
3535
  };
2929
3536
  /**
@@ -2956,112 +3563,6 @@ type TimeInCanada = "under_6_months" | "6_to_12_months" | "1_to_3_years" | "over
2956
3563
  * - `other`: neither
2957
3564
  */
2958
3565
  type ResidencyStatus = "citizen_or_permanent_resident" | "other";
2959
- /**
2960
- * Who fills the form for the applicant when it is not them: their name, how they are related, a phone when they gave one, and whether they gave their word that the applicant allowed them. A consent given while one is named says so (method representative).
2961
- */
2962
- type ApplicantRepresentative = {
2963
- /**
2964
- * Their given names.
2965
- */
2966
- readonly givenName: string;
2967
- /**
2968
- * Their family names.
2969
- */
2970
- readonly familyName: string;
2971
- readonly relationship: RepresentativeRelationship | (string & Record<never, never>);
2972
- /**
2973
- * Their phone number, E.164.
2974
- */
2975
- readonly phone?: string;
2976
- /**
2977
- * Whether they gave their word that the applicant allowed them to apply in their name.
2978
- */
2979
- readonly permitted: boolean;
2980
- };
2981
- /**
2982
- * How someone who fills the form for the applicant is related to them.
2983
- * - `child`: their child
2984
- * - `spouse_or_partner`: their spouse or partner
2985
- * - `parent`: their parent
2986
- * - `other_relative`: another relative
2987
- * - `friend`: a friend
2988
- * - `caregiver`: their caregiver
2989
- * - `legal_representative`: their legal representative
2990
- * - `other`: someone else
2991
- */
2992
- type RepresentativeRelationship = "child" | "spouse_or_partner" | "parent" | "other_relative" | "friend" | "caregiver" | "legal_representative" | "other";
2993
- /**
2994
- * The reference contacts the person gave.
2995
- */
2996
- type References = {
2997
- /**
2998
- * A contact at the person's workplace.
2999
- */
3000
- readonly workplace?: {
3001
- /**
3002
- * Name of the contact.
3003
- */
3004
- readonly name: string;
3005
- /**
3006
- * Email of the contact.
3007
- */
3008
- readonly email?: string;
3009
- /**
3010
- * Phone number of the contact. In E.164.
3011
- */
3012
- readonly phone?: string;
3013
- /**
3014
- * Name of the employer.
3015
- */
3016
- readonly companyName?: string;
3017
- /**
3018
- * The person's job.
3019
- */
3020
- readonly jobRole?: string;
3021
- readonly employmentType?: EmploymentType | (string & Record<never, never>);
3022
- };
3023
- /**
3024
- * A landlord who can give a reference.
3025
- */
3026
- readonly landlord?: {
3027
- /**
3028
- * Name of the contact.
3029
- */
3030
- readonly name: string;
3031
- /**
3032
- * Email of the contact.
3033
- */
3034
- readonly email?: string;
3035
- /**
3036
- * Phone number of the contact. In E.164.
3037
- */
3038
- readonly phone?: string;
3039
- };
3040
- /**
3041
- * The applicant has no workplace contact to give. When true, give workplace_unavailable_reason and no workplace.
3042
- */
3043
- readonly workplaceUnavailable?: true;
3044
- /**
3045
- * Why there is no workplace contact.
3046
- */
3047
- readonly workplaceUnavailableReason?: string;
3048
- /**
3049
- * The applicant has no landlord to give. When true, give landlord_unavailable_reason and no landlord.
3050
- */
3051
- readonly landlordUnavailable?: true;
3052
- /**
3053
- * Why there is no landlord.
3054
- */
3055
- readonly landlordUnavailableReason?: string;
3056
- };
3057
- /**
3058
- * Whether an income amount was confirmed.
3059
- * - `unverified`: nothing confirmed the amount yet
3060
- * - `pending`: a confirmation is in progress
3061
- * - `verified`: a document or a third party confirmed it
3062
- * - `mismatch`: the confirmation disagrees with the amount
3063
- */
3064
- type IncomeVerification = ("unverified" | "pending" | "verified" | "mismatch") | (string & Record<never, never>);
3065
3566
  /**
3066
3567
  * The period an income amount covers.
3067
3568
  * - `monthly`: per month
@@ -3089,570 +3590,559 @@ type IncomeSourceType = "employment" | "self_employment" | "benefits" | "pension
3089
3590
  * - `student`: studies, funded by aid, family or part-time work
3090
3591
  * - `newcomer`: a recent arrival in Canada
3091
3592
  * - `other`: another situation, which the applicant describes
3092
- */
3093
- type ApplicantSituation = "salaried" | "self_employed" | "retired" | "student" | "newcomer" | "other";
3094
- /**
3095
- * Who carries the application's link and Eversa's messages about their part to the applicant.
3096
- * - `eversa`: Eversa sends the link and its messages by email and by text message
3097
- * - `organization`: you deliver the link yourself, from the application's link; Eversa sends the person nothing
3098
- * - `stopped`: you told Eversa to stop writing to the person (POST /api/applications/{id}/applicants/{applicant_id}/invite/cancel); a resend that names no delivery resumes eversa
3099
- */
3100
- type ApplicantDelivery = ("eversa" | "organization" | "stopped") | (string & Record<never, never>);
3101
- /**
3102
- * Whom the account that holds a part fills it for.
3103
- * - `self`: the account's holder, for themselves
3104
- * - `representative`: the account's holder, for someone else
3105
- */
3106
- type ApplicantRelation = ("self" | "representative") | (string & Record<never, never>);
3107
- /**
3108
- * How the applicant came onto the application.
3109
- * - `entered`: your organization, or an applicant on the application, entered them
3110
- * - `joined`: they joined by the application's link
3111
- */
3112
- type ApplicantOrigin = ("entered" | "joined") | (string & Record<never, never>);
3113
- /**
3114
- * The application has no spot left. An application holds at most resident_spots residents, its active primary and co-applicants; a guarantor takes no spot. A resident past them is refused, and so are spots set below the residents on it: raise resident_spots, or remove someone first.
3115
- */
3116
- type ApplicationFullProblem = {
3117
- /**
3118
- * A URI that names the problem type. Compare it, never parse it.
3119
- */
3120
- readonly type: "https://eversa.app/problems/application-full";
3121
- /**
3122
- * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
3123
- */
3124
- readonly title: string;
3125
- /**
3126
- * The HTTP status code of this response.
3127
- */
3128
- readonly status: 409;
3129
- /**
3130
- * A plain explanation of this occurrence.
3131
- */
3132
- readonly detail: string;
3133
- /**
3134
- * The application whose spots are taken.
3135
- */
3136
- readonly objectId: `app_${string}`;
3137
- };
3593
+ */
3594
+ type ApplicantSituation = "salaried" | "self_employed" | "retired" | "student" | "newcomer" | "other";
3138
3595
  /**
3139
- * A rental application for a property: its state, its applicants in summary and its decision. List its applicants, requirements and documents for the rest.
3596
+ * The person to screen: what you already know about them. Give at least an id, an email, a phone, or a name with given and family names. No national id number is taken: a credit bureau matches the person on the name, the birth date, the addresses, the email and the phone.
3140
3597
  */
3141
- type Application = {
3598
+ type PersonInput = {
3142
3599
  /**
3143
- * Always `application`.
3600
+ * Id of a person you already submitted. When present, the other fields update that person.
3144
3601
  */
3145
- readonly object: "application";
3602
+ readonly id?: `per_${string}`;
3146
3603
  /**
3147
- * The application's id: `app_` and 26 lowercase characters. Treat it as opaque.
3604
+ * Your identifier for this object. Trimmed and Unicode-normalized (NFC); case kept.
3148
3605
  */
3149
- readonly id: `app_${string}`;
3606
+ readonly externalId?: string;
3607
+ readonly name?: NameInput;
3150
3608
  /**
3151
- * `true` when the object was created with a live key.
3609
+ * Names the person used before, up to three.
3152
3610
  */
3153
- readonly livemode: boolean;
3611
+ readonly priorNames?: ReadonlyArray<NameInput>;
3154
3612
  /**
3155
- * Your identifier for this object.
3613
+ * Date of birth, between 1900-01-01 and today. A calendar date in UTC.
3156
3614
  */
3157
- readonly externalId?: string;
3158
- readonly type: ApplicationType | (string & Record<never, never>);
3615
+ readonly dateOfBirth?: string;
3159
3616
  /**
3160
- * The template applied to this application, by id and version.
3617
+ * Email address. An RFC 5321 address, trimmed and lowercased.
3161
3618
  */
3162
- readonly template: {
3163
- /**
3164
- * The template's id: `tpl_` and 26 lowercase characters. Treat it as opaque.
3165
- */
3166
- readonly id: `tpl_${string}`;
3167
- /**
3168
- * Template version.
3169
- */
3170
- readonly version: number;
3171
- };
3619
+ readonly email?: string;
3172
3620
  /**
3173
- * The fee each applicant pays, fixed when the application was made: the template's share of what its checks cost then, with its additional fee; null when none.
3621
+ * Phone number. Any national or international format, Canada assumed when there is no country code; stored as E.164.
3174
3622
  */
3175
- readonly applicationFee: ApplicationFee | null;
3176
- readonly status: ApplicationStatus | (string & Record<never, never>);
3177
- readonly summary: ApplicationCounts;
3178
- readonly spots: Spots;
3179
- readonly joining: Joining;
3180
- readonly link?: ApplicationLink;
3181
- readonly subject: Subject;
3182
- readonly data: ApplicationData;
3183
- readonly payer: PayerKind | (string & Record<never, never>);
3623
+ readonly phone?: string;
3184
3624
  /**
3185
- * The applicants, each in summary. Retrieve or list them (GET /api/applications/{id}/applicants) for their situation, documents and consents.
3625
+ * Why you can give neither an email nor a phone for the person, in your own words; present when you gave one. Trimmed and Unicode-normalized (NFC); case kept.
3186
3626
  */
3187
- readonly applicants: ReadonlyArray<ApplicantSummary>;
3188
- readonly decision?: Decision;
3627
+ readonly contactUnavailableReason?: string;
3628
+ readonly address?: PostalAddressInput;
3189
3629
  /**
3190
- * Every decision a newer one replaced, including one set aside because an applicant was added.
3630
+ * Date the person moved to the current address. A calendar date in UTC.
3191
3631
  */
3192
- readonly previousDecisions: ReadonlyArray<Decision>;
3632
+ readonly movedIn?: string;
3193
3633
  /**
3194
- * Why and when the application was closed; present when status is closed.
3634
+ * Most recent first; an address outside Canada names its region_code.
3195
3635
  */
3196
- readonly closed?: {
3197
- readonly reason: ApplicationClosedReason;
3636
+ readonly previousAddresses?: ReadonlyArray<{
3637
+ readonly address: PostalAddressInput;
3198
3638
  /**
3199
- * The note given when it was closed.
3639
+ * Date the person moved to this address. A calendar date in UTC.
3200
3640
  */
3201
- readonly note?: string;
3641
+ readonly from: string;
3202
3642
  /**
3203
- * When it was closed. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3643
+ * Date the person left this address, on or after from. A past address has both dates; the current one is the person's address. A calendar date in UTC.
3204
3644
  */
3205
- readonly at: string;
3206
- readonly by: Actor;
3207
- };
3645
+ readonly to: string;
3646
+ }>;
3647
+ readonly livingArrangement?: LivingArrangement;
3648
+ readonly residenceDuration?: ResidenceDuration;
3208
3649
  /**
3209
- * The person on your team who handles the application.
3650
+ * Why the person has no previous address to give; present when they said they have none. Trimmed and Unicode-normalized (NFC); case kept.
3210
3651
  */
3211
- readonly assignee?: {
3652
+ readonly previousAddressUnavailableReason?: string;
3653
+ readonly references?: ReferencesInput;
3654
+ };
3655
+ /**
3656
+ * The applicant's part in the application.
3657
+ * - `primary`: the main applicant, one per application
3658
+ * - `co_applicant`: another applicant on the lease with the primary
3659
+ * - `guarantor`: backs the whole application
3660
+ */
3661
+ type ApplicantRole = "primary" | "co_applicant" | "guarantor";
3662
+ /**
3663
+ * Facts about the household, never about one applicant.
3664
+ */
3665
+ type ApplicationDataInput = {
3666
+ /**
3667
+ * Who and what will live in the property, and whether notice was given where they live now.
3668
+ */
3669
+ readonly household?: {
3212
3670
  /**
3213
- * Their Eversa user id, `usr_` and 26 lowercase characters. They are a member of your organization.
3671
+ * People who will live in the property besides the applicants.
3214
3672
  */
3215
- readonly userId: `usr_${string}`;
3673
+ readonly occupants?: ReadonlyArray<{
3674
+ readonly relationship: Relationship;
3675
+ /**
3676
+ * true for a minor.
3677
+ */
3678
+ readonly isMinor: boolean;
3679
+ }>;
3216
3680
  /**
3217
- * Their name.
3681
+ * Pets, up to ten entries.
3218
3682
  */
3219
- readonly name?: string;
3220
- };
3221
- readonly createdBy: Actor;
3222
- readonly amounts: Amounts;
3223
- /**
3224
- * Status of the report and where to read it.
3225
- */
3226
- readonly report: {
3227
- readonly status: ReportStatus;
3683
+ readonly pets?: ReadonlyArray<{
3684
+ readonly kind: PetKind;
3685
+ /**
3686
+ * How many.
3687
+ */
3688
+ readonly count: number;
3689
+ }>;
3228
3690
  /**
3229
- * API path of the report.
3691
+ * Number of vehicles.
3230
3692
  */
3231
- readonly url: string;
3693
+ readonly vehicles?: number;
3694
+ /**
3695
+ * true once the household gave notice to the landlord of the home it rents now, false while it has not. Absent when it was not said.
3696
+ */
3697
+ readonly noticeGiven?: boolean;
3232
3698
  };
3233
- readonly metadata: Metadata;
3234
3699
  /**
3235
- * When the object was created. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3236
- */
3237
- readonly createdAt: string;
3238
- /**
3239
- * When the object last changed. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3700
+ * The date the household wants to move in. A calendar date in UTC.
3240
3701
  */
3241
- readonly updatedAt: string;
3702
+ readonly desiredMoveIn?: string;
3703
+ readonly custom?: CustomBlockInput;
3242
3704
  };
3243
3705
  /**
3244
- * Why the application was closed.
3245
- * - `withdrawn`: the applicants withdrew
3246
- * - `no_longer_needed`: the application is no longer needed
3247
- * - `expired`: the application expired
3248
- * - `declined`: you declined the application
3249
- * - `offer_declined`: the applicant declined the offer
3250
- * - `offer_expired`: the offer expired before the applicant accepted it
3251
- * - `subject_unavailable`: the property is no longer available
3252
- * - `duplicate`: another application covers the same request
3253
- * - `other`: any other reason, including withdrawing a pending offer
3254
- */
3255
- type ApplicationClosedReason = ("withdrawn" | "no_longer_needed" | "expired" | "declined" | "offer_declined" | "offer_expired" | "subject_unavailable" | "duplicate" | "other") | (string & Record<never, never>);
3256
- /**
3257
- * A main factor a decision rested on.
3258
- * - `credit_grade`: the credit score or grade
3259
- * - `credit_history`: the payment history and collections in the credit file
3260
- * - `income_ratio`: the rent as a share of the income
3261
- * - `income_verification`: whether the income could be verified
3262
- * - `employment`: the employment
3263
- * - `rental_history`: the rental history, rental board records included
3264
- * - `references`: the references
3265
- * - `legal_records`: court or criminal records
3266
- * - `identity`: the identity verification
3267
- * - `guarantor`: a guarantor or a co-applicant
3268
- * - `other`: any other factor
3269
- */
3270
- type DecisionFactor = "credit_grade" | "credit_history" | "income_ratio" | "income_verification" | "employment" | "rental_history" | "references" | "legal_records" | "identity" | "guarantor" | "other";
3271
- /**
3272
- * How the decision was made, as you declare it.
3273
- * - `human`: a person decided
3274
- * - `automated`: the decision was computed
3275
- * - `human_reviewed`: computed, then reviewed by a person
3706
+ * Where the applicant's payment stands.
3707
+ * - `not_required`: the applicant pays nothing
3708
+ * - `pending`: the applicant has not paid yet
3709
+ * - `processing`: the applicant's card payment is on its way
3710
+ * - `on_hold`: the payment is held and not charged yet
3711
+ * - `paid`: the applicant paid
3712
+ * - `refunded`: the payment was refunded
3713
+ * - `waived`: you waived the payment
3276
3714
  */
3277
- type DecisionBasis = "human" | "automated" | "human_reviewed";
3715
+ type ApplicantPaymentStatus = ("not_required" | "pending" | "processing" | "on_hold" | "paid" | "refunded" | "waived") | (string & Record<never, never>);
3278
3716
  /**
3279
- * The adverse notice a decline sends the active primary applicant, by every channel they can be reached on, in the language of their form. It says the application was not accepted, and that the applicant may ask your organization which information the decision relied on and where it came from, and have wrong information corrected. A decline whose basis is automated adds the notice Quebec's private-sector act asks for (s. 12.1): that the decision was made by automated processing, that the applicant may ask for the personal information used, the reasons and the principal factors and parameters, and have that information corrected, and that they may submit their observations to a member of your staff who can review the decision. Co-applicants and guarantors get no notice: telling them is your organization's job.
3717
+ * One person on an application, with their own screening.
3280
3718
  */
3281
- type AdverseNotice = {
3719
+ type Applicant = {
3282
3720
  /**
3283
- * Always true: every decline sends a notice.
3721
+ * Always `applicant`.
3284
3722
  */
3285
- readonly required: true;
3723
+ readonly object: "applicant";
3286
3724
  /**
3287
- * How the notice is sent: email, sms or both. Empty when the applicant has neither, and failed_at is set.
3725
+ * The applicant's id: `apl_` and 26 lowercase characters. Treat it as opaque.
3288
3726
  */
3289
- readonly channels: ReadonlyArray<InviteChannel>;
3727
+ readonly id: `apl_${string}`;
3290
3728
  /**
3291
- * When the notice was sent on a channel. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3729
+ * `true` when the object was created with a live key.
3292
3730
  */
3293
- readonly sentAt?: string;
3731
+ readonly livemode: boolean;
3294
3732
  /**
3295
- * When every message of the notice failed, or the applicant could not be reached on any channel. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3733
+ * The application the applicant is on.
3296
3734
  */
3297
- readonly failedAt?: string;
3298
- };
3299
- /**
3300
- * A channel a message goes out on.
3301
- * - `email`: an email to the person's address
3302
- * - `sms`: a text message to the person's phone
3303
- */
3304
- type InviteChannel = ("email" | "sms") | (string & Record<never, never>);
3305
- /**
3306
- * The offer an approval creates; the applicant accepts it through a requirement.
3307
- */
3308
- type Offer = {
3735
+ readonly applicationId: `app_${string}`;
3309
3736
  /**
3310
- * The offer's id: `ofr_` and 26 lowercase characters. Treat it as opaque.
3737
+ * The applicant's role: primary, co_applicant, guarantor.
3311
3738
  */
3312
- readonly id: `ofr_${string}`;
3313
- readonly status: OfferStatus;
3314
- readonly withdrawnReason?: OfferWithdrawnReason;
3315
- readonly terms: OfferTerms;
3739
+ readonly role: string;
3740
+ readonly status: ApplicantStatus;
3316
3741
  /**
3317
- * Version of the offer terms.
3742
+ * Your identifier for this object.
3318
3743
  */
3319
- readonly termsVersion: number;
3744
+ readonly externalId?: string;
3745
+ readonly person: PersonSummary;
3746
+ readonly invitedBy?: Actor;
3747
+ readonly origin: ApplicantOrigin;
3748
+ readonly relation?: ApplicantRelation;
3320
3749
  /**
3321
- * SHA-256 of the offer terms as shown to the applicant, for the terms_version beside it. Accepting the offer quotes it as offer_terms_hash.
3750
+ * The applicant you entered whom this person, who joined by the application's link under a name like theirs, may be. Until they are merged or told apart in the Eversa platform, they take no spot, are not asked for the fee and cannot send their part. Absent otherwise.
3322
3751
  */
3323
- readonly termsHash: string;
3752
+ readonly possibleDuplicateOf?: `apl_${string}`;
3753
+ readonly mode: ScreeningMode;
3324
3754
  /**
3325
- * The offer_acceptance requirement whose answer accepts this offer.
3755
+ * The hosted or embedded form session. Absent when mode is manual.
3326
3756
  */
3327
- readonly requirementId: `req_${string}`;
3757
+ readonly sessionId?: `sess_${string}`;
3758
+ readonly delivery: ApplicantDelivery;
3328
3759
  /**
3329
- * When the offer was sent. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3760
+ * The applicant's own screening.
3330
3761
  */
3331
- readonly sentAt: string;
3762
+ readonly screening: {
3763
+ /**
3764
+ * The applicant's screening.
3765
+ */
3766
+ readonly id: `scr_${string}`;
3767
+ readonly status: ScreeningStatus | (string & Record<never, never>);
3768
+ /**
3769
+ * true while some checks are still running.
3770
+ */
3771
+ readonly partial: boolean;
3772
+ };
3773
+ readonly data?: ApplicantData;
3332
3774
  /**
3333
- * When the offer expires. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3775
+ * The applicant's documents. Each lists what the document is, its size, dates and status; its file name, provenance and review only where the credential holds `documents:read`, which the documents endpoints and the file's download need too.
3334
3776
  */
3335
- readonly expiresAt?: string;
3777
+ readonly documents: ReadonlyArray<Document>;
3336
3778
  /**
3337
- * When the applicant answered. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3779
+ * The consents the applicant gave.
3338
3780
  */
3339
- readonly respondedAt?: string;
3340
- readonly respondedBy?: Actor;
3781
+ readonly consents: ReadonlyArray<Consent>;
3782
+ readonly payment?: ApplicantPayment;
3341
3783
  /**
3342
- * true when you recorded the answer on the applicant's behalf.
3784
+ * When the applicant submitted the form. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3343
3785
  */
3344
- readonly onBehalf?: boolean;
3786
+ readonly submittedAt?: string;
3345
3787
  /**
3346
- * How the answer reached you, when you recorded it on the applicant's behalf.
3788
+ * Who took the applicant off, when and why; present when status is removed or rejected.
3347
3789
  */
3348
- readonly evidence?: {
3349
- readonly method: EvidenceMethod | (string & Record<never, never>);
3790
+ readonly removed?: {
3350
3791
  /**
3351
- * Your reference for the evidence, such as a call log entry.
3792
+ * When the applicant was removed. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3352
3793
  */
3353
- readonly reference?: string;
3794
+ readonly at: string;
3795
+ readonly by: Actor;
3796
+ readonly reason: RemovedReason;
3354
3797
  };
3355
- };
3356
- /**
3357
- * What the offer promises, as the applicant sees it: the rent, the lease and the conditions. terms_hash covers them, with the application, the decision and terms_version.
3358
- */
3359
- type OfferTerms = {
3360
- readonly rent?: Amount;
3361
- readonly lease?: OfferLease;
3362
- /**
3363
- * The conditions of the approval, in the order it set them; empty for an approval without.
3364
- */
3365
- readonly conditions: ReadonlyArray<OfferCondition>;
3366
- };
3367
- /**
3368
- * A condition of the offer, as the applicant accepts it.
3369
- */
3370
- type OfferCondition = {
3371
- readonly code: ConditionCode | (string & Record<never, never>);
3372
- /**
3373
- * A note on the condition.
3374
- */
3375
- readonly note?: string;
3376
- };
3377
- /**
3378
- * The lease the offer offers: its first day and, for a fixed term, its last.
3379
- */
3380
- type OfferLease = {
3381
3798
  /**
3382
- * The lease's first day. A calendar date in UTC.
3799
+ * When the applicant was added. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3383
3800
  */
3384
- readonly startsOn: string;
3801
+ readonly createdAt: string;
3385
3802
  /**
3386
- * The lease's last day, for a fixed term. Absent for a lease of indeterminate term. A calendar date in UTC.
3803
+ * When the object last changed. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3387
3804
  */
3388
- readonly endsOn?: string;
3805
+ readonly updatedAt: string;
3389
3806
  };
3390
3807
  /**
3391
- * Why the offer was withdrawn.
3392
- * - `applicant_added`: an applicant joined after the decision
3393
- * - `organization`: you withdrew it
3394
- */
3395
- type OfferWithdrawnReason = ("applicant_added" | "organization") | (string & Record<never, never>);
3396
- /**
3397
- * Where the offer stands.
3398
- * - `pending`: waiting for the applicant's answer
3399
- * - `accepted`: the applicant accepted it; final
3400
- * - `declined`: the applicant declined it; final
3401
- * - `expired`: no answer came before it expired; final
3402
- * - `withdrawn`: the offer was withdrawn; final
3403
- */
3404
- type OfferStatus = ("pending" | "accepted" | "declined" | "expired" | "withdrawn") | (string & Record<never, never>);
3405
- /**
3406
- * Where a condition of an approval stands.
3407
- * - `pending`: the offer is not accepted yet
3408
- * - `accepted`: the applicant accepted the offer and its conditions
3409
- * - `met`: the condition was fulfilled; final
3410
- * - `waived`: you waived the condition; final
3808
+ * Why the applicant was removed.
3809
+ * - `withdrawn`: the applicant asked to leave
3810
+ * - `replaced`: another applicant takes their place
3811
+ * - `added_by_mistake`: the applicant was added by mistake
3812
+ * - `rejected`: you rejected the applicant, who is listed as rejected rather than removed
3813
+ * - `no_longer_needed`: the applicant is no longer needed
3814
+ * - `other`: any other reason
3815
+ * - `removed_by_applicant`: another person on the application removed them from the hosted form before they sent their part
3816
+ * - `merged`: you merged into them the person who joined by the link under a name like theirs, who goes on as the applicant in their place
3411
3817
  */
3412
- type ConditionStatus = ("pending" | "accepted" | "met" | "waived") | (string & Record<never, never>);
3818
+ type RemovedReason = ("withdrawn" | "replaced" | "added_by_mistake" | "rejected" | "no_longer_needed" | "other" | "removed_by_applicant" | "merged") | (string & Record<never, never>);
3413
3819
  /**
3414
- * Why you declined the application.
3415
- * - `credit`: the credit file
3416
- * - `income`: the income
3417
- * - `rental_history`: the rental history
3418
- * - `references`: the references
3419
- * - `legal_records`: court or criminal records
3420
- * - `identity`: the identity could not be confirmed
3421
- * - `incomplete`: the application is incomplete
3422
- * - `other`: any other reason
3820
+ * What the applicant pays, the application's fee or their screening, and where the payment stands.
3423
3821
  */
3424
- type DeclineReason = "credit" | "income" | "rental_history" | "references" | "legal_records" | "identity" | "incomplete" | "other";
3822
+ type ApplicantPayment = {
3823
+ readonly payer: PayerKind | (string & Record<never, never>);
3824
+ readonly status: ApplicantPaymentStatus;
3825
+ readonly method: PaymentMethod;
3826
+ readonly amount: Amount;
3827
+ };
3425
3828
  /**
3426
- * What you decided.
3427
- * - `approved`: you approved the application, and an offer goes to the applicant
3428
- * - `conditionally_approved`: you approved it under conditions, and an offer goes to the applicant
3429
- * - `declined`: you declined it with reasons, and it closes
3430
- * - `deferred`: you put the decision off
3829
+ * How the applicant's payment is collected.
3830
+ * - `card`: the applicant pays by card through Eversa (`startApplicantPayment`), which you can refund
3831
+ * - `recorded`: you collect it and record where it stands (`recordApplicantPayment`)
3431
3832
  */
3432
- type DecisionOutcome = "approved" | "conditionally_approved" | "declined" | "deferred";
3833
+ type PaymentMethod = ("card" | "recorded") | (string & Record<never, never>);
3433
3834
  /**
3434
- * A decision on the application, with the offer it creates or the notice it sends.
3835
+ * The applicant's situation as filled in: work, income, references and rent.
3435
3836
  */
3436
- type Decision = {
3437
- /**
3438
- * The decision's id: `dec_` and 26 lowercase characters. Treat it as opaque.
3439
- */
3440
- readonly id: `dec_${string}`;
3441
- readonly outcome: DecisionOutcome | (string & Record<never, never>);
3837
+ type ApplicantData = {
3838
+ readonly situation?: ApplicantSituation | (string & Record<never, never>);
3442
3839
  /**
3443
- * Why you declined.
3840
+ * Addresses the applicant lived at.
3444
3841
  */
3445
- readonly reasons?: ReadonlyArray<DeclineReason | (string & Record<never, never>)>;
3842
+ readonly residenceHistory?: ReadonlyArray<AddressPeriod>;
3446
3843
  /**
3447
- * The conditions of a conditional approval.
3844
+ * Jobs.
3448
3845
  */
3449
- readonly conditions: ReadonlyArray<{
3450
- readonly code: ConditionCode | (string & Record<never, never>);
3846
+ readonly employment?: ReadonlyArray<{
3451
3847
  /**
3452
- * A note on the condition.
3848
+ * Name of the employer.
3453
3849
  */
3454
- readonly note?: string;
3455
- readonly status: ConditionStatus;
3850
+ readonly employer: string;
3851
+ /**
3852
+ * Job title.
3853
+ */
3854
+ readonly position?: string;
3855
+ readonly type: EmploymentType | (string & Record<never, never>);
3856
+ /**
3857
+ * When the job started. A calendar date in UTC.
3858
+ */
3859
+ readonly since?: string;
3456
3860
  }>;
3457
- readonly offer?: Offer;
3458
- readonly notice?: AdverseNotice;
3459
- readonly basis: DecisionBasis | (string & Record<never, never>);
3460
- /**
3461
- * The main factors behind the decision.
3462
- */
3463
- readonly factors?: ReadonlyArray<DecisionFactor | (string & Record<never, never>)>;
3464
- readonly madeBy: Actor;
3465
3861
  /**
3466
- * When the decision was recorded. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3467
- */
3468
- readonly decidedAt: string;
3469
- /**
3470
- * Your own note; never shown to the applicant.
3862
+ * Income sources.
3471
3863
  */
3472
- readonly note?: string;
3864
+ readonly income?: ReadonlyArray<{
3865
+ readonly source: IncomeSourceType | (string & Record<never, never>);
3866
+ readonly amount: Amount;
3867
+ readonly frequency: IncomeFrequency | (string & Record<never, never>);
3868
+ /**
3869
+ * Hours worked per week; required when frequency is hourly.
3870
+ */
3871
+ readonly hoursPerWeek?: number;
3872
+ /**
3873
+ * Who pays the income, such as the employer of a second job.
3874
+ */
3875
+ readonly paidBy?: string;
3876
+ readonly verification: IncomeVerification;
3877
+ }>;
3878
+ readonly references?: References;
3473
3879
  /**
3474
- * Set when an applicant was added after this decision. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
3880
+ * A landlord who can give a reference.
3475
3881
  */
3476
- readonly supersededAt?: string;
3477
- };
3478
- /**
3479
- * An applicant as a list shows it. Retrieve the applicant for their situation, documents and consents.
3480
- */
3481
- type ApplicantSummary = {
3882
+ readonly currentLandlord?: {
3883
+ /**
3884
+ * Name of the contact.
3885
+ */
3886
+ readonly name: string;
3887
+ /**
3888
+ * Email of the contact.
3889
+ */
3890
+ readonly email?: string;
3891
+ /**
3892
+ * Phone number of the contact. In E.164.
3893
+ */
3894
+ readonly phone?: string;
3895
+ };
3896
+ readonly currentRent?: Amount;
3897
+ readonly livingArrangement?: LivingArrangement | (string & Record<never, never>);
3482
3898
  /**
3483
- * Always `applicant`.
3899
+ * Facts that change which questions the form asks.
3484
3900
  */
3485
- readonly object: "applicant";
3901
+ readonly flags?: {
3902
+ /**
3903
+ * No Canadian credit file yet.
3904
+ */
3905
+ readonly newcomer?: boolean;
3906
+ /**
3907
+ * The applicant is retired.
3908
+ */
3909
+ readonly retired?: boolean;
3910
+ /**
3911
+ * The applicant is a student.
3912
+ */
3913
+ readonly student?: boolean;
3914
+ };
3486
3915
  /**
3487
- * The applicant's id: `apl_` and 26 lowercase characters. Treat it as opaque.
3916
+ * How the applicant asked to be told about their application. A message goes by the channels they chose, and a notice that is owed to them goes by every channel they have when none they chose can carry it.
3488
3917
  */
3489
- readonly id: `apl_${string}`;
3918
+ readonly notifyChannels?: {
3919
+ /**
3920
+ * By email.
3921
+ */
3922
+ readonly email?: boolean;
3923
+ /**
3924
+ * By text message.
3925
+ */
3926
+ readonly sms?: boolean;
3927
+ };
3928
+ readonly representative?: ApplicantRepresentative;
3490
3929
  /**
3491
- * The applicant's role: primary, co_applicant, guarantor.
3930
+ * The applicant's status in Canada and how long they have lived here.
3492
3931
  */
3493
- readonly role: string;
3494
- readonly status: ApplicantStatus;
3495
- readonly person: PersonSummary;
3496
- };
3497
- /**
3498
- * Facts about the household, never about one applicant.
3499
- */
3500
- type ApplicationData = {
3932
+ readonly residency?: {
3933
+ readonly status: ResidencyStatus | (string & Record<never, never>);
3934
+ readonly timeInCanada?: TimeInCanada | (string & Record<never, never>);
3935
+ };
3501
3936
  /**
3502
- * Who and what will live in the property, and whether notice was given where they live now.
3937
+ * What the applicant states about their situation, one block per situation.
3503
3938
  */
3504
- readonly household?: {
3939
+ readonly situationDetails?: {
3940
+ /**
3941
+ * What a salaried applicant states: employer, start date and salary.
3942
+ */
3943
+ readonly salaried?: {
3944
+ readonly annualIncome?: Amount;
3945
+ /**
3946
+ * Name of the employer.
3947
+ */
3948
+ readonly employer: string;
3949
+ /**
3950
+ * When the job started. A calendar date in UTC.
3951
+ */
3952
+ readonly startedOn: string;
3953
+ };
3505
3954
  /**
3506
- * People who will live in the property besides the applicants.
3955
+ * What a self-employed applicant states: business, start date and net income.
3507
3956
  */
3508
- readonly occupants?: ReadonlyArray<{
3509
- readonly relationship: Relationship | (string & Record<never, never>);
3957
+ readonly selfEmployed?: {
3958
+ readonly annualNetIncome?: Amount;
3510
3959
  /**
3511
- * true for a minor.
3960
+ * Name of the business.
3512
3961
  */
3513
- readonly isMinor: boolean;
3514
- }>;
3962
+ readonly businessName: string;
3963
+ /**
3964
+ * When the business started. A calendar date in UTC.
3965
+ */
3966
+ readonly startedOn: string;
3967
+ };
3515
3968
  /**
3516
- * Pets, up to ten entries.
3969
+ * What a retired applicant states: retirement income and savings.
3517
3970
  */
3518
- readonly pets?: ReadonlyArray<{
3519
- readonly kind: PetKind | (string & Record<never, never>);
3971
+ readonly retired?: {
3972
+ readonly annualIncome?: Amount;
3973
+ readonly savings: Amount;
3974
+ };
3975
+ /**
3976
+ * What a student states: school, study load, funding and part-time income.
3977
+ */
3978
+ readonly student?: {
3520
3979
  /**
3521
- * How many.
3980
+ * Name of the school.
3522
3981
  */
3523
- readonly count: number;
3524
- }>;
3982
+ readonly school: string;
3983
+ readonly studyLoad: StudyLoad | (string & Record<never, never>);
3984
+ /**
3985
+ * Where the student's money comes from, one to six sources, each once.
3986
+ */
3987
+ readonly fundingSources: ReadonlyArray<FundingSource | (string & Record<never, never>)>;
3988
+ /**
3989
+ * What "other" funding is.
3990
+ */
3991
+ readonly fundingOther?: string;
3992
+ readonly partTimeIncome?: Amount;
3993
+ };
3525
3994
  /**
3526
- * Number of vehicles.
3995
+ * What a newcomer states: arrival date, employer and income.
3527
3996
  */
3528
- readonly vehicles?: number;
3997
+ readonly newcomer?: {
3998
+ /**
3999
+ * When the applicant arrived in Canada. A calendar date in UTC.
4000
+ */
4001
+ readonly arrivedOn: string;
4002
+ readonly annualIncome?: Amount;
4003
+ /**
4004
+ * Name of the employer, when the newcomer has one.
4005
+ */
4006
+ readonly employer?: string;
4007
+ };
3529
4008
  /**
3530
- * true once the household gave notice to the landlord of the home it rents now, false while it has not. Absent when it was not said.
4009
+ * What an applicant in another situation states, in their own words.
3531
4010
  */
3532
- readonly noticeGiven?: boolean;
4011
+ readonly other?: {
4012
+ /**
4013
+ * The applicant's situation, in their own words.
4014
+ */
4015
+ readonly description: string;
4016
+ readonly annualIncome?: Amount;
4017
+ };
3533
4018
  };
3534
- /**
3535
- * The date the household wants to move in. A calendar date in UTC.
3536
- */
3537
- readonly desiredMoveIn?: string;
3538
4019
  readonly custom?: CustomBlock;
3539
4020
  };
3540
4021
  /**
3541
- * The kind of pet.
3542
- * - `dog`: a dog
3543
- * - `cat`: a cat
3544
- * - `other`: any other animal
3545
- */
3546
- type PetKind = "dog" | "cat" | "other";
3547
- /**
3548
- * How an occupant is related to the applicants.
3549
- * - `spouse`: a spouse
3550
- * - `partner`: a partner
3551
- * - `child`: a child
3552
- * - `parent`: a parent
3553
- * - `roommate`: a roommate
3554
- * - `other`: any other relationship
3555
- */
3556
- type Relationship = "spouse" | "partner" | "child" | "parent" | "roommate" | "other";
3557
- /**
3558
- * What was applied for: a copy of the property, taken when the application opened.
4022
+ * Who fills the form for the applicant when it is not them: their name, how they are related, a phone when they gave one, and whether they gave their word that the applicant allowed them. A consent given while one is named says so (method representative).
3559
4023
  */
3560
- type Subject = {
3561
- /**
3562
- * Always property.
3563
- */
3564
- readonly type: "property";
3565
- readonly property: Property;
4024
+ type ApplicantRepresentative = {
3566
4025
  /**
3567
- * When the property was copied into the application; the property itself may change later. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
4026
+ * Their given names.
3568
4027
  */
3569
- readonly snapshotAt: string;
3570
- };
3571
- /**
3572
- * The links people join the application by: one for the people who will live there and, once you ask for a guarantor, one that leads only to the guarantor's spot. Each opens no one's file, so read, copy, print or share them at any time.
3573
- */
3574
- type ApplicationLink = {
4028
+ readonly givenName: string;
3575
4029
  /**
3576
- * The link for the people who will live there: anyone who has it can join while joining is open.
4030
+ * Their family names.
3577
4031
  */
3578
- readonly url: string;
4032
+ readonly familyName: string;
4033
+ readonly relationship: RepresentativeRelationship | (string & Record<never, never>);
3579
4034
  /**
3580
- * The link that leads only to the guarantor's spot; present once you asked for a guarantor.
4035
+ * Their phone number, E.164.
3581
4036
  */
3582
- readonly guarantorUrl?: string;
3583
- };
3584
- /**
3585
- * Whether people can still join the application, and the day joining stops.
3586
- */
3587
- type Joining = {
3588
- readonly state: JoiningState;
4037
+ readonly phone?: string;
3589
4038
  /**
3590
- * join_until: when joining stops. At that time Eversa expires the people you entered who never started, and closes the application as expired when nobody is on it. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
4039
+ * Whether they gave their word that the applicant allowed them to apply in their name.
3591
4040
  */
3592
- readonly until: string;
4041
+ readonly permitted: boolean;
3593
4042
  };
3594
4043
  /**
3595
- * Whether someone can still join the application as a resident.
3596
- * - `open`: a resident can join: a spot is free and joining has not stopped
3597
- * - `full`: every spot is taken; raise resident_spots to let someone else join
3598
- * - `closed`: joining stopped: join_until passed, a decision other than a deferral stands, or the application ended. People already on it can still finish
3599
- */
3600
- type JoiningState = ("open" | "full" | "closed") | (string & Record<never, never>);
3601
- /**
3602
- * The residents the application has room for, and how many of them are on it.
4044
+ * How someone who fills the form for the applicant is related to them.
4045
+ * - `child`: their child
4046
+ * - `spouse_or_partner`: their spouse or partner
4047
+ * - `parent`: their parent
4048
+ * - `other_relative`: another relative
4049
+ * - `friend`: a friend
4050
+ * - `caregiver`: their caregiver
4051
+ * - `legal_representative`: their legal representative
4052
+ * - `other`: someone else
3603
4053
  */
3604
- type Spots = {
3605
- /**
3606
- * The most residents who will live there, resident_spots: the primary and the co-applicants.
3607
- */
3608
- readonly total: number;
3609
- /**
3610
- * The active primary and co-applicants on it; a guarantor takes no spot.
3611
- */
3612
- readonly taken: number;
3613
- };
4054
+ type RepresentativeRelationship = "child" | "spouse_or_partner" | "parent" | "other_relative" | "friend" | "caregiver" | "legal_representative" | "other";
3614
4055
  /**
3615
- * Counts of applicants and of open requirements.
4056
+ * The reference contacts the person gave.
3616
4057
  */
3617
- type ApplicationCounts = {
4058
+ type References = {
3618
4059
  /**
3619
- * Applicant counts.
4060
+ * A contact at the person's workplace.
3620
4061
  */
3621
- readonly applicants: {
4062
+ readonly workplace?: {
3622
4063
  /**
3623
- * Applicants still on the application.
4064
+ * Name of the contact.
3624
4065
  */
3625
- readonly active: number;
4066
+ readonly name: string;
3626
4067
  /**
3627
- * Applicants who submitted their form.
4068
+ * Email of the contact.
3628
4069
  */
3629
- readonly submitted: number;
4070
+ readonly email?: string;
3630
4071
  /**
3631
- * Applicants whose screening is done.
4072
+ * Phone number of the contact. In E.164.
3632
4073
  */
3633
- readonly screened: number;
4074
+ readonly phone?: string;
4075
+ /**
4076
+ * Name of the employer.
4077
+ */
4078
+ readonly companyName?: string;
4079
+ /**
4080
+ * The person's job.
4081
+ */
4082
+ readonly jobRole?: string;
4083
+ readonly employmentType?: EmploymentType | (string & Record<never, never>);
3634
4084
  };
3635
4085
  /**
3636
- * Requirement counts, by whom each waits on.
4086
+ * A landlord who can give a reference.
3637
4087
  */
3638
- readonly requirements: {
4088
+ readonly landlord?: {
3639
4089
  /**
3640
- * Open requirements addressed to an applicant.
4090
+ * Name of the contact.
3641
4091
  */
3642
- readonly openForApplicants: number;
4092
+ readonly name: string;
3643
4093
  /**
3644
- * Requirements waiting on you: open ones addressed to you, and answers waiting for your review. More than 0 while the status is awaiting_organization.
4094
+ * Email of the contact.
3645
4095
  */
3646
- readonly openForOrganization: number;
4096
+ readonly email?: string;
4097
+ /**
4098
+ * Phone number of the contact. In E.164.
4099
+ */
4100
+ readonly phone?: string;
3647
4101
  };
4102
+ /**
4103
+ * The applicant has no workplace contact to give. When true, give workplace_unavailable_reason and no workplace.
4104
+ */
4105
+ readonly workplaceUnavailable?: true;
4106
+ /**
4107
+ * Why there is no workplace contact.
4108
+ */
4109
+ readonly workplaceUnavailableReason?: string;
4110
+ /**
4111
+ * The applicant has no landlord to give. When true, give landlord_unavailable_reason and no landlord.
4112
+ */
4113
+ readonly landlordUnavailable?: true;
4114
+ /**
4115
+ * Why there is no landlord.
4116
+ */
4117
+ readonly landlordUnavailableReason?: string;
3648
4118
  };
3649
4119
  /**
3650
- * The application fee each applicant pays: the amount before taxes and the taxes, in one currency.
4120
+ * Whether an income amount was confirmed.
4121
+ * - `unverified`: nothing confirmed the amount yet
4122
+ * - `pending`: a confirmation is in progress
4123
+ * - `verified`: a document or a third party confirmed it
4124
+ * - `mismatch`: the confirmation disagrees with the amount
3651
4125
  */
3652
- type ApplicationFee = {
3653
- readonly amount: Amount;
3654
- readonly tax: Amount;
3655
- };
4126
+ type IncomeVerification = ("unverified" | "pending" | "verified" | "mismatch") | (string & Record<never, never>);
4127
+ /**
4128
+ * Who carries the application's link and Eversa's messages about their part to the applicant.
4129
+ * - `eversa`: Eversa sends the link and its messages by email and by text message
4130
+ * - `organization`: you deliver the link yourself, from the application's link; Eversa sends the person nothing
4131
+ * - `stopped`: you told Eversa to stop writing to the person (POST /api/applications/{id}/applicants/{applicant_id}/invite/cancel); a resend that names no delivery resumes eversa
4132
+ */
4133
+ type ApplicantDelivery = ("eversa" | "organization" | "stopped") | (string & Record<never, never>);
4134
+ /**
4135
+ * Whom the account that holds a part fills it for.
4136
+ * - `self`: the account's holder, for themselves
4137
+ * - `representative`: the account's holder, for someone else
4138
+ */
4139
+ type ApplicantRelation = ("self" | "representative") | (string & Record<never, never>);
4140
+ /**
4141
+ * How the applicant came onto the application.
4142
+ * - `entered`: your organization, or an applicant on the application, entered them
4143
+ * - `joined`: they joined by the application's link
4144
+ */
4145
+ type ApplicantOrigin = ("entered" | "joined") | (string & Record<never, never>);
3656
4146
  /**
3657
4147
  * Applicant cannot make that move. The applicant cannot move to that status from the one it is in; allowed lists where it can go.
3658
4148
  */
@@ -3725,31 +4215,6 @@ type RemoveApplicant = {
3725
4215
  * - `other`: any other reason
3726
4216
  */
3727
4217
  type RemoveApplicantReason = "withdrawn" | "replaced" | "added_by_mistake" | "rejected" | "no_longer_needed" | "other";
3728
- /**
3729
- * No way to invite the person. The person has neither an email nor a phone, so Eversa cannot send them the invite; send one with the person, or deliver the link yourself with the invite's delivery set to organization.
3730
- */
3731
- type NoInviteChannelProblem = {
3732
- /**
3733
- * A URI that names the problem type. Compare it, never parse it.
3734
- */
3735
- readonly type: "https://eversa.app/problems/no-invite-channel";
3736
- /**
3737
- * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
3738
- */
3739
- readonly title: string;
3740
- /**
3741
- * The HTTP status code of this response.
3742
- */
3743
- readonly status: 422;
3744
- /**
3745
- * A plain explanation of this occurrence.
3746
- */
3747
- readonly detail: string;
3748
- /**
3749
- * The person who was to be invited.
3750
- */
3751
- readonly objectId: `per_${string}`;
3752
- };
3753
4218
  /**
3754
4219
  * Sends the application's link to the applicant again.
3755
4220
  */
@@ -3764,19 +4229,6 @@ type SendApplicantInvite = {
3764
4229
  */
3765
4230
  readonly reminders?: boolean;
3766
4231
  };
3767
- /**
3768
- * Who carries the invite's link to the person.
3769
- * - `eversa`: Eversa sends the link by email and by text message, on every channel the person has
3770
- * - `organization`: you send the link yourself, from the answer that created or resent the invite; Eversa sends the person nothing, and the person needs no email or phone
3771
- */
3772
- type InviteDelivery = "eversa" | "organization";
3773
- /**
3774
- * The applicant's part in the application.
3775
- * - `primary`: the main applicant, one per application
3776
- * - `co_applicant`: another applicant on the lease with the primary
3777
- * - `guarantor`: backs the whole application
3778
- */
3779
- type ApplicantRole = "primary" | "co_applicant" | "guarantor";
3780
4232
  /**
3781
4233
  * A role an applicant can be added with or switched to.
3782
4234
  * - `co_applicant`: another applicant on the lease with the primary
@@ -3807,256 +4259,28 @@ type ApplicantList = {
3807
4259
  /**
3808
4260
  * Role does not match the requirement. The requirement asks for an applicant of another role; send that role, or leave role out.
3809
4261
  */
3810
- type RoleMismatchProblem = {
3811
- /**
3812
- * A URI that names the problem type. Compare it, never parse it.
3813
- */
3814
- readonly type: "https://eversa.app/problems/role-mismatch";
3815
- /**
3816
- * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
3817
- */
3818
- readonly title: string;
3819
- /**
3820
- * The HTTP status code of this response.
3821
- */
3822
- readonly status: 422;
3823
- /**
3824
- * A plain explanation of this occurrence.
3825
- */
3826
- readonly detail: string;
3827
- /**
3828
- * The requirement the applicant was added to answer.
3829
- */
3830
- readonly objectId: `req_${string}`;
3831
- readonly role: ApplicantRole | (string & Record<never, never>);
3832
- };
3833
- /**
3834
- * What you know about the applicant's situation: work, income, rent and flags.
3835
- */
3836
- type ApplicantDataInput = {
3837
- readonly situation?: ApplicantSituation;
3838
- /**
3839
- * Jobs, up to five.
3840
- */
3841
- readonly employment?: ReadonlyArray<{
3842
- /**
3843
- * Name of the employer. Trimmed and Unicode-normalized (NFC); case kept.
3844
- */
3845
- readonly employer: string;
3846
- /**
3847
- * Job title. Trimmed and Unicode-normalized (NFC); case kept.
3848
- */
3849
- readonly position?: string;
3850
- readonly type: EmploymentType;
3851
- /**
3852
- * When the job started. A calendar date in UTC.
3853
- */
3854
- readonly since?: string;
3855
- }>;
3856
- /**
3857
- * Income sources, up to five.
3858
- */
3859
- readonly income?: ReadonlyArray<{
3860
- readonly source: IncomeSourceType;
3861
- readonly amount: Amount;
3862
- readonly frequency: IncomeFrequency;
3863
- /**
3864
- * Hours worked per week; required when frequency is hourly.
3865
- */
3866
- readonly hoursPerWeek?: number;
3867
- /**
3868
- * Who pays the income, such as the employer of a second job. Trimmed and Unicode-normalized (NFC); case kept.
3869
- */
3870
- readonly paidBy?: string;
3871
- }>;
3872
- readonly currentRent?: Amount;
3873
- /**
3874
- * Facts that change which questions the form asks.
3875
- */
3876
- readonly flags?: {
3877
- /**
3878
- * No Canadian credit file yet.
3879
- */
3880
- readonly newcomer?: boolean;
3881
- /**
3882
- * The applicant is retired.
3883
- */
3884
- readonly retired?: boolean;
3885
- /**
3886
- * The applicant is a student.
3887
- */
3888
- readonly student?: boolean;
3889
- };
3890
- /**
3891
- * How the applicant asked to be told about their application. A message goes by the channels they chose, and a notice that is owed to them goes by every channel they have when none they chose can carry it.
3892
- */
3893
- readonly notifyChannels?: {
3894
- /**
3895
- * By email.
3896
- */
3897
- readonly email?: boolean;
3898
- /**
3899
- * By text message.
3900
- */
3901
- readonly sms?: boolean;
3902
- };
3903
- /**
3904
- * The applicant's status in Canada and how long they have lived here.
3905
- */
3906
- readonly residency?: {
3907
- readonly status: ResidencyStatus;
3908
- readonly timeInCanada?: TimeInCanada;
3909
- };
3910
- /**
3911
- * What the applicant states about their situation, one block per situation.
3912
- */
3913
- readonly situationDetails?: {
3914
- /**
3915
- * What a salaried applicant states: employer, start date and salary.
3916
- */
3917
- readonly salaried?: {
3918
- readonly annualIncome?: Amount;
3919
- /**
3920
- * Name of the employer. Trimmed and Unicode-normalized (NFC); case kept.
3921
- */
3922
- readonly employer: string;
3923
- /**
3924
- * When the job started. A calendar date in UTC.
3925
- */
3926
- readonly startedOn: string;
3927
- };
3928
- /**
3929
- * What a self-employed applicant states: business, start date and net income.
3930
- */
3931
- readonly selfEmployed?: {
3932
- readonly annualNetIncome?: Amount;
3933
- /**
3934
- * Name of the business. Trimmed and Unicode-normalized (NFC); case kept.
3935
- */
3936
- readonly businessName: string;
3937
- /**
3938
- * When the business started. A calendar date in UTC.
3939
- */
3940
- readonly startedOn: string;
3941
- };
3942
- /**
3943
- * What a retired applicant states: retirement income and savings.
3944
- */
3945
- readonly retired?: {
3946
- readonly annualIncome?: Amount;
3947
- readonly savings: Amount;
3948
- };
3949
- /**
3950
- * What a student states: school, study load, funding and part-time income.
3951
- */
3952
- readonly student?: {
3953
- /**
3954
- * Name of the school. Trimmed and Unicode-normalized (NFC); case kept.
3955
- */
3956
- readonly school: string;
3957
- readonly studyLoad: StudyLoad;
3958
- /**
3959
- * Where the student's money comes from, one to six sources, each once.
3960
- */
3961
- readonly fundingSources: ReadonlyArray<FundingSource>;
3962
- /**
3963
- * What "other" funding is. Trimmed and Unicode-normalized (NFC); case kept.
3964
- */
3965
- readonly fundingOther?: string;
3966
- readonly partTimeIncome?: Amount;
3967
- };
3968
- /**
3969
- * What a newcomer states: arrival date, employer and income.
3970
- */
3971
- readonly newcomer?: {
3972
- /**
3973
- * When the applicant arrived in Canada. A calendar date in UTC.
3974
- */
3975
- readonly arrivedOn: string;
3976
- readonly annualIncome?: Amount;
3977
- /**
3978
- * Name of the employer, when the newcomer has one. Trimmed and Unicode-normalized (NFC); case kept.
3979
- */
3980
- readonly employer?: string;
3981
- };
3982
- /**
3983
- * What an applicant in another situation states, in their own words.
3984
- */
3985
- readonly other?: {
3986
- /**
3987
- * The applicant's situation, in their own words. Trimmed and Unicode-normalized (NFC); case kept; may span lines, line breaks stored as \n.
3988
- */
3989
- readonly description: string;
3990
- readonly annualIncome?: Amount;
3991
- };
3992
- };
3993
- readonly custom?: CustomBlockInput;
3994
- };
3995
- /**
3996
- * Up to 50 answers to the questions your account adds to the form: strings, numbers or booleans, an integer within ±9007199254740991 (I-JSON, RFC 7493). Keys up to 40 characters and string answers up to 500, both trimmed and Unicode-normalized (NFC), case kept, without control characters or lone surrogates; two keys that become identical are refused.
3997
- */
3998
- type CustomBlockInput = {
3999
- readonly [key: string]: (string & Record<never, never>) | number | boolean;
4000
- };
4001
- /**
4002
- * The person to screen: what you already know about them. Give at least an id, an email, a phone, or a name with given and family names. No national id number is taken: a credit bureau matches the person on the name, the birth date, the addresses, the email and the phone.
4003
- */
4004
- type PersonInput = {
4005
- /**
4006
- * Id of a person you already submitted. When present, the other fields update that person.
4007
- */
4008
- readonly id?: `per_${string}`;
4009
- /**
4010
- * Your identifier for this object. Trimmed and Unicode-normalized (NFC); case kept.
4011
- */
4012
- readonly externalId?: string;
4013
- readonly name?: NameInput;
4014
- /**
4015
- * Names the person used before, up to three.
4016
- */
4017
- readonly priorNames?: ReadonlyArray<NameInput>;
4018
- /**
4019
- * Date of birth, between 1900-01-01 and today. A calendar date in UTC.
4020
- */
4021
- readonly dateOfBirth?: string;
4022
- /**
4023
- * Email address. An RFC 5321 address, trimmed and lowercased.
4024
- */
4025
- readonly email?: string;
4262
+ type RoleMismatchProblem = {
4026
4263
  /**
4027
- * Phone number. Any national or international format, Canada assumed when there is no country code; stored as E.164.
4264
+ * A URI that names the problem type. Compare it, never parse it.
4028
4265
  */
4029
- readonly phone?: string;
4266
+ readonly type: "https://eversa.app/problems/role-mismatch";
4030
4267
  /**
4031
- * Why you can give neither an email nor a phone for the person, in your own words; present when you gave one. Trimmed and Unicode-normalized (NFC); case kept.
4268
+ * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
4032
4269
  */
4033
- readonly contactUnavailableReason?: string;
4034
- readonly address?: PostalAddressInput;
4270
+ readonly title: string;
4035
4271
  /**
4036
- * Date the person moved to the current address. A calendar date in UTC.
4272
+ * The HTTP status code of this response.
4037
4273
  */
4038
- readonly movedIn?: string;
4274
+ readonly status: 422;
4039
4275
  /**
4040
- * Most recent first; an address outside Canada names its region_code.
4276
+ * A plain explanation of this occurrence.
4041
4277
  */
4042
- readonly previousAddresses?: ReadonlyArray<{
4043
- readonly address: PostalAddressInput;
4044
- /**
4045
- * Date the person moved to this address. A calendar date in UTC.
4046
- */
4047
- readonly from: string;
4048
- /**
4049
- * Date the person left this address, on or after from. A past address has both dates; the current one is the person's address. A calendar date in UTC.
4050
- */
4051
- readonly to: string;
4052
- }>;
4053
- readonly livingArrangement?: LivingArrangement;
4054
- readonly residenceDuration?: ResidenceDuration;
4278
+ readonly detail: string;
4055
4279
  /**
4056
- * Why the person has no previous address to give; present when they said they have none. Trimmed and Unicode-normalized (NFC); case kept.
4280
+ * The requirement the applicant was added to answer.
4057
4281
  */
4058
- readonly previousAddressUnavailableReason?: string;
4059
- readonly references?: ReferencesInput;
4282
+ readonly objectId: `req_${string}`;
4283
+ readonly role: ApplicantRole | (string & Record<never, never>);
4060
4284
  };
4061
4285
  /**
4062
4286
  * A co-applicant or guarantor to invite. Eversa invites the person by email and by text message when both are given, or, with invite.delivery set to organization, sends nothing and you send the link from the answer yourself. The hosted form collects their consent, documents and answers, and none of their data yet. An invite Eversa sends needs the person's email, phone or the id of a person you submitted before.
@@ -4075,20 +4299,6 @@ type AddApplicant = {
4075
4299
  readonly requirementId?: `req_${string}`;
4076
4300
  readonly invite?: ApplicantInviteSettings;
4077
4301
  };
4078
- /**
4079
- * Settings for the applicant's invitation: who delivers the application's link, its language and reminders.
4080
- */
4081
- type ApplicantInviteSettings = {
4082
- readonly delivery?: InviteDelivery;
4083
- /**
4084
- * Language of the invite and the form. Defaults to en-CA; send fr-CA for a French invite. A BCP 47 tag; en and fr tags resolve to en-CA and fr-CA.
4085
- */
4086
- readonly locale?: string;
4087
- /**
4088
- * Whether Eversa reminds the person by the application's link 1, 3 and 7 days after the invitation, while they have not sent their part and Eversa delivers their messages. false stops them for good: nothing turns them back on, and each reminder lets the person stop them too. Omitted: on.
4089
- */
4090
- readonly reminders?: boolean;
4091
- };
4092
4302
  /**
4093
4303
  * The current offer is not in that state. Close with offer_declined once the current offer is declined, and with offer_expired once it lapsed.
4094
4304
  */
@@ -4287,56 +4497,6 @@ type DecisionOutcomeEncoded = DecisionOutcome | "";
4287
4497
  * One of the values of ApplicationType, or empty, which is as if the parameter were absent.
4288
4498
  */
4289
4499
  type ApplicationTypeEncoded = ApplicationType | "";
4290
- /**
4291
- * Unknown template. The template is not one of this app's; send one of its templates, or omit it for your default.
4292
- */
4293
- type TemplateUnknownProblem = {
4294
- /**
4295
- * A URI that names the problem type. Compare it, never parse it.
4296
- */
4297
- readonly type: "https://eversa.app/problems/template-unknown";
4298
- /**
4299
- * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
4300
- */
4301
- readonly title: string;
4302
- /**
4303
- * The HTTP status code of this response.
4304
- */
4305
- readonly status: 422;
4306
- /**
4307
- * A plain explanation of this occurrence.
4308
- */
4309
- readonly detail: string;
4310
- /**
4311
- * The template that was asked for.
4312
- */
4313
- readonly template: `tpl_${string}`;
4314
- };
4315
- /**
4316
- * Property is archived. The property is archived, so it takes no new application. Its applications stay as they are.
4317
- */
4318
- type PropertyArchivedProblem = {
4319
- /**
4320
- * A URI that names the problem type. Compare it, never parse it.
4321
- */
4322
- readonly type: "https://eversa.app/problems/property-archived";
4323
- /**
4324
- * A short summary of the problem type, in the language Content-Language names: English, or French when Accept-Language prefers it. Identify the problem by type, never by title.
4325
- */
4326
- readonly title: string;
4327
- /**
4328
- * The HTTP status code of this response.
4329
- */
4330
- readonly status: 409;
4331
- /**
4332
- * A plain explanation of this occurrence.
4333
- */
4334
- readonly detail: string;
4335
- /**
4336
- * The property that is archived.
4337
- */
4338
- readonly objectId: `prop_${string}`;
4339
- };
4340
4500
  /**
4341
4501
  * That you confirmed the person's identity: the name, how and when.
4342
4502
  */
@@ -4365,88 +4525,6 @@ type ConsentAttestation = {
4365
4525
  */
4366
4526
  readonly reference?: string;
4367
4527
  };
4368
- /**
4369
- * Facts about the household, never about one applicant.
4370
- */
4371
- type ApplicationDataInput = {
4372
- /**
4373
- * Who and what will live in the property, and whether notice was given where they live now.
4374
- */
4375
- readonly household?: {
4376
- /**
4377
- * People who will live in the property besides the applicants.
4378
- */
4379
- readonly occupants?: ReadonlyArray<{
4380
- readonly relationship: Relationship;
4381
- /**
4382
- * true for a minor.
4383
- */
4384
- readonly isMinor: boolean;
4385
- }>;
4386
- /**
4387
- * Pets, up to ten entries.
4388
- */
4389
- readonly pets?: ReadonlyArray<{
4390
- readonly kind: PetKind;
4391
- /**
4392
- * How many.
4393
- */
4394
- readonly count: number;
4395
- }>;
4396
- /**
4397
- * Number of vehicles.
4398
- */
4399
- readonly vehicles?: number;
4400
- /**
4401
- * true once the household gave notice to the landlord of the home it rents now, false while it has not. Absent when it was not said.
4402
- */
4403
- readonly noticeGiven?: boolean;
4404
- };
4405
- /**
4406
- * The date the household wants to move in. A calendar date in UTC.
4407
- */
4408
- readonly desiredMoveIn?: string;
4409
- readonly custom?: CustomBlockInput;
4410
- };
4411
- /**
4412
- * A rental application to open for the property, with the applicants Eversa invites and, when you have several, the template.
4413
- */
4414
- type CreateApplication = {
4415
- readonly type?: ApplicationType;
4416
- /**
4417
- * The template to apply; omit for your default for this type of application.
4418
- */
4419
- readonly template?: `tpl_${string}`;
4420
- readonly data?: ApplicationDataInput;
4421
- readonly payer?: PayerKind;
4422
- readonly residentSpots?: number;
4423
- /**
4424
- * When joining stops, after now and at most 30 days ahead; 14 days after the creation when omitted. People already on the application can still finish after it. Written in UTC, ending in `Z`; read with any offset (percent-encode a `+` in a query).
4425
- */
4426
- readonly joinUntil?: string;
4427
- /**
4428
- * Your identifier for this object. Trimmed and Unicode-normalized (NFC); case kept.
4429
- */
4430
- readonly externalId?: string;
4431
- readonly metadata?: MetadataInput;
4432
- /**
4433
- * The applicants, none to eight: with none, people join by the application's link. One is primary when any will live there: role defaults to primary, so send co_applicant or guarantor for the others; a lone guarantor needs no primary.
4434
- */
4435
- readonly applicants: ReadonlyArray<InvitedApplicantInput>;
4436
- };
4437
- /**
4438
- * An applicant invited to the hosted form: Eversa sends the invite by email and by text message when both are given, which needs the person's email, phone or existing person id, unless invite.delivery is organization and you send the link yourself.
4439
- */
4440
- type InvitedApplicantInput = {
4441
- readonly role?: ApplicantRole;
4442
- readonly person: PersonInput;
4443
- readonly data?: ApplicantDataInput;
4444
- /**
4445
- * Your identifier for this object. Trimmed and Unicode-normalized (NFC); case kept.
4446
- */
4447
- readonly externalId?: string;
4448
- readonly invite?: ApplicantInviteSettings;
4449
- };
4450
4528
  /**
4451
4529
  * Webhook endpoint disabled. The endpoint is disabled, so nothing is sent to it. Enable it with its PATCH, then send the delivery again.
4452
4530
  */
@@ -4680,8 +4758,24 @@ type WebhookDeliveryStatus = "pending" | "succeeded" | "failed";
4680
4758
  * - `rights_request.overdue`: an open rights request's due_at passed with no answer, which the person may take as a refusal; recorded once by the daily sweep
4681
4759
  * - `confidentiality_incident.reported`: a confidentiality incident was entered in the register; kept for Eversa's audit only, never in your log or sent to a webhook
4682
4760
  * - `confidentiality_incident.updated`: a confidentiality incident was assessed, contained, notified, closed or given a person it concerns; changes names the fields; kept for Eversa's audit only, never in your log or sent to a webhook
4683
- */
4684
- type EventType = ("application.created" | "application.updated" | "application.submitted" | "application.screening_started" | "application.ready" | "application.accepted" | "application.closed" | "application.expired" | "applicant.added" | "applicant.invited" | "applicant.started" | "applicant.submitted" | "applicant.expired" | "applicant.withdrawn" | "applicant.removed" | "applicant.rejected" | "applicant.promoted" | "applicant.payment_updated" | "applicant.reminded" | "applicant.guarantor_requested" | "requirement.created" | "requirement.answered" | "requirement.reviewed" | "requirement.resolved" | "requirement.expired" | "requirement.canceled" | "decision.recorded" | "decision.updated" | "offer.sent" | "offer.accepted" | "offer.declined" | "offer.expired" | "offer.withdrawn" | "consent.granted" | "consent.withdrawn" | "consent.expired" | "document.added" | "document.upload_renewed" | "document.received" | "document.verified" | "document.rejected" | "document.deleted" | "screening.created" | "screening.updated" | "screening.completed" | "screening.canceled" | "check.queued" | "check.held" | "check.waiting_started" | "check.review_started" | "check.completed" | "check.failed" | "check.canceled" | "check.retried" | "check.findings_opened" | "report.partially_completed" | "report.completed" | "report.completed_degraded" | "report.failed" | "report.updated" | "report.expired" | "session.created" | "session.opened" | "session.submitted" | "session.expired" | "session.revoked" | "invite.canceled" | "property.created" | "property.updated" | "property.archived" | "property.unarchived" | "template.created" | "template.updated" | "organization.updated" | "screening_settings.updated" | "webhook_endpoint.created" | "webhook_endpoint.updated" | "webhook_endpoint.deleted" | "webhook_endpoint.delivery_retried" | "webhook_endpoint.tested" | "person.updated" | "person.erased" | "person.messaged" | "legal_hold.placed" | "legal_hold.released" | "legal_hold.ended" | "rights_request.received" | "rights_request.verified" | "rights_request.refused" | "rights_request.exported" | "rights_request.completed" | "rights_request.notice_failed" | "rights_request.due_soon" | "rights_request.overdue" | "confidentiality_incident.reported" | "confidentiality_incident.updated") | (string & Record<never, never>);
4761
+ * - `sign_template.created`: a template was started; kept for Eversa's audit only, never in your log or sent to a webhook
4762
+ * - `sign_template.updated`: a template's draft was saved; kept for Eversa's audit only, never in your log or sent to a webhook
4763
+ * - `sign_template.published`: a template was published: envelopes sent from now on use it
4764
+ * - `sign_envelope.sent`: a template went out to the people it is addressed to
4765
+ * - `sign_envelope.voided`: a sending was called back, so nobody may sign it any longer
4766
+ * - `sign_envelope.delivered`: a recipient of a sending was sent their link to sign, by each channel the sender gave; kept for Eversa's audit only, never in your log or sent to a webhook
4767
+ * - `sign_envelope.downloaded`: a sending's document was downloaded, its signatures and their record with it; names the sending, never what it holds; kept for Eversa's audit only, never in your log or sent to a webhook
4768
+ * - `sign_envelope.opened`: a recipient of a sending opened its paper on their link, the first time; the signer is the actor; kept for Eversa's audit only, never in your log or sent to a webhook
4769
+ * - `sign_envelope.signed`: a recipient of a sending signed it; the signer is the actor, and the signature stays on the sending; kept for Eversa's audit only, never in your log or sent to a webhook
4770
+ * - `sign_envelope.declined`: a recipient of a sending refused to sign it, which ends the sending; the signer is the actor, and it names the sending and the signer by id, never the reason
4771
+ * - `sign_envelope.previewed`: a sending's document was looked at where the sending is followed (its panel's Preview), its signatures and their record with it; names the sending, never what it holds; kept for Eversa's audit only, never in your log or sent to a webhook
4772
+ * - `sign_envelope.completed`: every required recipient of a sending signed, so it is complete and its document final
4773
+ * - `sign_envelope.copy_delivered`: a signer of a completed sending was sent their link to the signed document, by each channel their invitation used; kept for Eversa's audit only, never in your log or sent to a webhook
4774
+ * - `sign_envelope.expired`: a sending's time ran out before everyone signed, so nobody may sign it any longer
4775
+ * - `sign_envelope.extended`: a sending's deadline was moved later, and every link still open with it; kept for Eversa's audit only, never in your log or sent to a webhook
4776
+ * - `sign_envelope.recipient_updated`: a recipient's email or phone was corrected while they could still sign, the links sent before revoked; changes names the contacts changed, and status when the recipient had opened their link and went back to awaiting; never the contact; kept for Eversa's audit only, never in your log or sent to a webhook
4777
+ */
4778
+ type EventType = ("application.created" | "application.updated" | "application.submitted" | "application.screening_started" | "application.ready" | "application.accepted" | "application.closed" | "application.expired" | "applicant.added" | "applicant.invited" | "applicant.started" | "applicant.submitted" | "applicant.expired" | "applicant.withdrawn" | "applicant.removed" | "applicant.rejected" | "applicant.promoted" | "applicant.payment_updated" | "applicant.reminded" | "applicant.guarantor_requested" | "requirement.created" | "requirement.answered" | "requirement.reviewed" | "requirement.resolved" | "requirement.expired" | "requirement.canceled" | "decision.recorded" | "decision.updated" | "offer.sent" | "offer.accepted" | "offer.declined" | "offer.expired" | "offer.withdrawn" | "consent.granted" | "consent.withdrawn" | "consent.expired" | "document.added" | "document.upload_renewed" | "document.received" | "document.verified" | "document.rejected" | "document.deleted" | "screening.created" | "screening.updated" | "screening.completed" | "screening.canceled" | "check.queued" | "check.held" | "check.waiting_started" | "check.review_started" | "check.completed" | "check.failed" | "check.canceled" | "check.retried" | "check.findings_opened" | "report.partially_completed" | "report.completed" | "report.completed_degraded" | "report.failed" | "report.updated" | "report.expired" | "session.created" | "session.opened" | "session.submitted" | "session.expired" | "session.revoked" | "invite.canceled" | "property.created" | "property.updated" | "property.archived" | "property.unarchived" | "template.created" | "template.updated" | "organization.updated" | "screening_settings.updated" | "webhook_endpoint.created" | "webhook_endpoint.updated" | "webhook_endpoint.deleted" | "webhook_endpoint.delivery_retried" | "webhook_endpoint.tested" | "person.updated" | "person.erased" | "person.messaged" | "legal_hold.placed" | "legal_hold.released" | "legal_hold.ended" | "rights_request.received" | "rights_request.verified" | "rights_request.refused" | "rights_request.exported" | "rights_request.completed" | "rights_request.notice_failed" | "rights_request.due_soon" | "rights_request.overdue" | "confidentiality_incident.reported" | "confidentiality_incident.updated" | "sign_template.created" | "sign_template.updated" | "sign_template.published" | "sign_envelope.sent" | "sign_envelope.voided" | "sign_envelope.delivered" | "sign_envelope.downloaded" | "sign_envelope.opened" | "sign_envelope.signed" | "sign_envelope.declined" | "sign_envelope.previewed" | "sign_envelope.completed" | "sign_envelope.copy_delivered" | "sign_envelope.expired" | "sign_envelope.extended" | "sign_envelope.recipient_updated") | (string & Record<never, never>);
4685
4779
  /**
4686
4780
  * Delivery still being tried. A delivery of this event to the endpoint is still pending, so it is not sent again beside it. Retry once that delivery has succeeded or failed.
4687
4781
  */
@@ -4833,7 +4927,7 @@ type WebhookEndpointStatus = "enabled" | "disabled";
4833
4927
  /**
4834
4928
  * An event type such as screening.completed, a family such as screening.*, or * for every event. A type that is not sent yet is refused.
4835
4929
  */
4836
- type EnabledEvent = "application.created" | "application.updated" | "application.submitted" | "application.screening_started" | "application.ready" | "application.accepted" | "application.closed" | "application.expired" | "applicant.added" | "applicant.invited" | "applicant.started" | "applicant.submitted" | "applicant.expired" | "applicant.withdrawn" | "applicant.removed" | "applicant.rejected" | "applicant.promoted" | "applicant.payment_updated" | "requirement.created" | "requirement.answered" | "requirement.reviewed" | "requirement.resolved" | "requirement.expired" | "requirement.canceled" | "decision.recorded" | "decision.updated" | "offer.sent" | "offer.accepted" | "offer.declined" | "offer.expired" | "offer.withdrawn" | "consent.granted" | "consent.withdrawn" | "consent.expired" | "document.received" | "document.verified" | "document.rejected" | "screening.created" | "screening.updated" | "screening.completed" | "screening.canceled" | "check.queued" | "check.held" | "check.review_started" | "check.completed" | "check.failed" | "check.canceled" | "check.retried" | "session.created" | "session.opened" | "session.submitted" | "session.expired" | "session.revoked" | "invite.canceled" | "property.created" | "property.updated" | "property.archived" | "property.unarchived" | "template.created" | "template.updated" | "organization.updated" | "screening_settings.updated" | "webhook_endpoint.created" | "webhook_endpoint.updated" | "webhook_endpoint.deleted" | "webhook_endpoint.tested" | "person.updated" | "person.erased" | "person.messaged" | "legal_hold.placed" | "legal_hold.released" | "legal_hold.ended" | "rights_request.received" | "rights_request.verified" | "rights_request.refused" | "rights_request.exported" | "rights_request.completed" | "rights_request.notice_failed" | "rights_request.due_soon" | "rights_request.overdue" | "application.*" | "applicant.*" | "requirement.*" | "decision.*" | "offer.*" | "consent.*" | "document.*" | "screening.*" | "check.*" | "report.*" | "session.*" | "invite.*" | "property.*" | "template.*" | "organization.*" | "screening_settings.*" | "webhook_endpoint.*" | "person.*" | "legal_hold.*" | "rights_request.*" | "*";
4930
+ type EnabledEvent = "application.created" | "application.updated" | "application.submitted" | "application.screening_started" | "application.ready" | "application.accepted" | "application.closed" | "application.expired" | "applicant.added" | "applicant.invited" | "applicant.started" | "applicant.submitted" | "applicant.expired" | "applicant.withdrawn" | "applicant.removed" | "applicant.rejected" | "applicant.promoted" | "applicant.payment_updated" | "requirement.created" | "requirement.answered" | "requirement.reviewed" | "requirement.resolved" | "requirement.expired" | "requirement.canceled" | "decision.recorded" | "decision.updated" | "offer.sent" | "offer.accepted" | "offer.declined" | "offer.expired" | "offer.withdrawn" | "consent.granted" | "consent.withdrawn" | "consent.expired" | "document.received" | "document.verified" | "document.rejected" | "screening.created" | "screening.updated" | "screening.completed" | "screening.canceled" | "check.queued" | "check.held" | "check.review_started" | "check.completed" | "check.failed" | "check.canceled" | "check.retried" | "session.created" | "session.opened" | "session.submitted" | "session.expired" | "session.revoked" | "invite.canceled" | "property.created" | "property.updated" | "property.archived" | "property.unarchived" | "template.created" | "template.updated" | "organization.updated" | "screening_settings.updated" | "webhook_endpoint.created" | "webhook_endpoint.updated" | "webhook_endpoint.deleted" | "webhook_endpoint.tested" | "person.updated" | "person.erased" | "person.messaged" | "legal_hold.placed" | "legal_hold.released" | "legal_hold.ended" | "rights_request.received" | "rights_request.verified" | "rights_request.refused" | "rights_request.exported" | "rights_request.completed" | "rights_request.notice_failed" | "rights_request.due_soon" | "rights_request.overdue" | "sign_template.published" | "sign_envelope.sent" | "sign_envelope.voided" | "sign_envelope.declined" | "sign_envelope.completed" | "sign_envelope.expired" | "application.*" | "applicant.*" | "requirement.*" | "decision.*" | "offer.*" | "consent.*" | "document.*" | "screening.*" | "check.*" | "report.*" | "session.*" | "invite.*" | "property.*" | "template.*" | "organization.*" | "screening_settings.*" | "webhook_endpoint.*" | "person.*" | "legal_hold.*" | "rights_request.*" | "sign_template.*" | "sign_envelope.*" | "*";
4837
4931
  /**
4838
4932
  * The endpoint, deleted with its deliveries.
4839
4933
  */
@@ -5026,11 +5120,11 @@ type Event = {
5026
5120
  /**
5027
5121
  * The ids of the objects the event is about; never the objects themselves.
5028
5122
  */
5029
- type EventData = EventDataApplication | EventDataApplicant | EventDataRequirement | EventDataConsent | EventDataDocument | EventDataScreening | EventDataCheck | EventDataScreeningReport | EventDataApplicationReport | EventDataSession | EventDataProperty | EventDataWebhookEndpoint | EventDataPerson | EventDataLegalHold | EventDataRightsRequest | EventDataConfidentialityIncident | EventDataTemplate | EventDataOrganization | EventDataScreeningSettings;
5123
+ type EventData = EventDataApplication | EventDataApplicant | EventDataRequirement | EventDataConsent | EventDataDocument | EventDataScreening | EventDataCheck | EventDataScreeningReport | EventDataApplicationReport | EventDataSession | EventDataProperty | EventDataWebhookEndpoint | EventDataPerson | EventDataLegalHold | EventDataRightsRequest | EventDataSignTemplate | EventDataSignEnvelope | EventDataConfidentialityIncident | EventDataTemplate | EventDataOrganization | EventDataScreeningSettings;
5030
5124
  /**
5031
5125
  * An event type such as screening.completed, or a family followed by .* such as screening.*, which matches every type of the family.
5032
5126
  */
5033
- type EventTypeFilter = "application.created" | "application.updated" | "application.submitted" | "application.screening_started" | "application.ready" | "application.accepted" | "application.closed" | "application.expired" | "applicant.added" | "applicant.invited" | "applicant.started" | "applicant.submitted" | "applicant.expired" | "applicant.withdrawn" | "applicant.removed" | "applicant.rejected" | "applicant.promoted" | "applicant.payment_updated" | "requirement.created" | "requirement.answered" | "requirement.reviewed" | "requirement.resolved" | "requirement.expired" | "requirement.canceled" | "decision.recorded" | "decision.updated" | "offer.sent" | "offer.accepted" | "offer.declined" | "offer.expired" | "offer.withdrawn" | "consent.granted" | "consent.withdrawn" | "consent.expired" | "document.received" | "document.verified" | "document.rejected" | "screening.created" | "screening.updated" | "screening.completed" | "screening.canceled" | "check.queued" | "check.held" | "check.waiting_started" | "check.review_started" | "check.completed" | "check.failed" | "check.canceled" | "check.retried" | "report.partially_completed" | "report.completed" | "report.completed_degraded" | "report.failed" | "report.updated" | "report.expired" | "session.created" | "session.opened" | "session.submitted" | "session.expired" | "session.revoked" | "invite.canceled" | "property.created" | "property.updated" | "property.archived" | "property.unarchived" | "template.created" | "template.updated" | "organization.updated" | "screening_settings.updated" | "webhook_endpoint.created" | "webhook_endpoint.updated" | "webhook_endpoint.deleted" | "webhook_endpoint.tested" | "person.updated" | "person.erased" | "person.messaged" | "legal_hold.placed" | "legal_hold.released" | "legal_hold.ended" | "rights_request.received" | "rights_request.verified" | "rights_request.refused" | "rights_request.exported" | "rights_request.completed" | "rights_request.notice_failed" | "rights_request.due_soon" | "rights_request.overdue" | "application.*" | "applicant.*" | "requirement.*" | "decision.*" | "offer.*" | "consent.*" | "document.*" | "screening.*" | "check.*" | "report.*" | "session.*" | "invite.*" | "property.*" | "template.*" | "organization.*" | "screening_settings.*" | "webhook_endpoint.*" | "person.*" | "legal_hold.*" | "rights_request.*";
5127
+ type EventTypeFilter = "application.created" | "application.updated" | "application.submitted" | "application.screening_started" | "application.ready" | "application.accepted" | "application.closed" | "application.expired" | "applicant.added" | "applicant.invited" | "applicant.started" | "applicant.submitted" | "applicant.expired" | "applicant.withdrawn" | "applicant.removed" | "applicant.rejected" | "applicant.promoted" | "applicant.payment_updated" | "requirement.created" | "requirement.answered" | "requirement.reviewed" | "requirement.resolved" | "requirement.expired" | "requirement.canceled" | "decision.recorded" | "decision.updated" | "offer.sent" | "offer.accepted" | "offer.declined" | "offer.expired" | "offer.withdrawn" | "consent.granted" | "consent.withdrawn" | "consent.expired" | "document.received" | "document.verified" | "document.rejected" | "screening.created" | "screening.updated" | "screening.completed" | "screening.canceled" | "check.queued" | "check.held" | "check.waiting_started" | "check.review_started" | "check.completed" | "check.failed" | "check.canceled" | "check.retried" | "report.partially_completed" | "report.completed" | "report.completed_degraded" | "report.failed" | "report.updated" | "report.expired" | "session.created" | "session.opened" | "session.submitted" | "session.expired" | "session.revoked" | "invite.canceled" | "property.created" | "property.updated" | "property.archived" | "property.unarchived" | "template.created" | "template.updated" | "organization.updated" | "screening_settings.updated" | "webhook_endpoint.created" | "webhook_endpoint.updated" | "webhook_endpoint.deleted" | "webhook_endpoint.tested" | "person.updated" | "person.erased" | "person.messaged" | "legal_hold.placed" | "legal_hold.released" | "legal_hold.ended" | "rights_request.received" | "rights_request.verified" | "rights_request.refused" | "rights_request.exported" | "rights_request.completed" | "rights_request.notice_failed" | "rights_request.due_soon" | "rights_request.overdue" | "sign_template.published" | "sign_envelope.sent" | "sign_envelope.voided" | "sign_envelope.declined" | "sign_envelope.completed" | "sign_envelope.expired" | "application.*" | "applicant.*" | "requirement.*" | "decision.*" | "offer.*" | "consent.*" | "document.*" | "screening.*" | "check.*" | "report.*" | "session.*" | "invite.*" | "property.*" | "template.*" | "organization.*" | "screening_settings.*" | "webhook_endpoint.*" | "person.*" | "legal_hold.*" | "rights_request.*" | "sign_template.*" | "sign_envelope.*";
5034
5128
  /**
5035
5129
  * Event not found. No event has this id in the mode of your API key, live or test.
5036
5130
  */
@@ -5566,6 +5660,20 @@ type EventActorPlatform = {
5566
5660
  readonly id?: string;
5567
5661
  readonly via: ActorVia;
5568
5662
  };
5663
+ /**
5664
+ * A recipient of a sending, on their own link to sign.
5665
+ */
5666
+ type EventActorSigner = {
5667
+ /**
5668
+ * Who acted.
5669
+ */
5670
+ readonly type: "signer";
5671
+ /**
5672
+ * The recipient who acted, as their `sgrc_` id.
5673
+ */
5674
+ readonly id?: string;
5675
+ readonly via: ActorVia;
5676
+ };
5569
5677
  /**
5570
5678
  * An event about an application.
5571
5679
  */
@@ -6061,6 +6169,72 @@ type EventDataRightsRequest = {
6061
6169
  */
6062
6170
  readonly reference?: string;
6063
6171
  };
6172
+ /**
6173
+ * An event about a template your organization signs on.
6174
+ */
6175
+ type EventDataSignTemplate = {
6176
+ /**
6177
+ * Type of the object the event is about: always `sign_template`.
6178
+ */
6179
+ readonly object: "sign_template";
6180
+ /**
6181
+ * The id of the object the event is about.
6182
+ */
6183
+ readonly id: `sgtp_${string}`;
6184
+ /**
6185
+ * The application the event concerns.
6186
+ */
6187
+ readonly applicationId?: `app_${string}`;
6188
+ /**
6189
+ * The applicant the event concerns.
6190
+ */
6191
+ readonly applicantId?: `apl_${string}`;
6192
+ /**
6193
+ * The screening the event concerns.
6194
+ */
6195
+ readonly screeningId?: `scr_${string}`;
6196
+ /**
6197
+ * The session the event concerns.
6198
+ */
6199
+ readonly sessionId?: `sess_${string}`;
6200
+ /**
6201
+ * Reserved for an event that names an outside record; no event type sets it yet.
6202
+ */
6203
+ readonly reference?: string;
6204
+ };
6205
+ /**
6206
+ * An event about one sending of a template to the people who sign it.
6207
+ */
6208
+ type EventDataSignEnvelope = {
6209
+ /**
6210
+ * Type of the object the event is about: always `sign_envelope`.
6211
+ */
6212
+ readonly object: "sign_envelope";
6213
+ /**
6214
+ * The id of the object the event is about.
6215
+ */
6216
+ readonly id: `sgen_${string}`;
6217
+ /**
6218
+ * The application the event concerns.
6219
+ */
6220
+ readonly applicationId?: `app_${string}`;
6221
+ /**
6222
+ * The applicant the event concerns.
6223
+ */
6224
+ readonly applicantId?: `apl_${string}`;
6225
+ /**
6226
+ * The screening the event concerns.
6227
+ */
6228
+ readonly screeningId?: `scr_${string}`;
6229
+ /**
6230
+ * The session the event concerns.
6231
+ */
6232
+ readonly sessionId?: `sess_${string}`;
6233
+ /**
6234
+ * Reserved for an event that names an outside record; no event type sets it yet.
6235
+ */
6236
+ readonly reference?: string;
6237
+ };
6064
6238
  /**
6065
6239
  * An event about a confidentiality incident of your register.
6066
6240
  */
@@ -6194,7 +6368,7 @@ type EventDataScreeningSettings = {
6194
6368
  readonly reference?: string;
6195
6369
  };
6196
6370
  /** Every problem the API answers (RFC 9457), told apart by its `type`. */
6197
- type Problem = ValidationFailedProblem | MalformedRequestProblem | InsufficientScopeProblem | SessionRequiredProblem | RateLimitedProblem | InvalidApiKeyProblem | MemberNotFoundProblem | RequirementTransitionRefusedProblem | RequirementNotFoundProblem | ApplicationNotFoundProblem | ApplicantDepartedProblem | ApplicationEndedProblem | RequirementNotPerformableProblem | ApplicationLimitReachedProblem | ApplicantNotFoundProblem | ScreeningNotFoundProblem | ScreeningLimitReachedProblem | CheckTypeNotServedProblem | CheckTypeNotPricedProblem | PersonNeedsMissingProblem | ExternalIdTakenProblem | PersonNotFoundProblem | ApplicationTypeUnavailableProblem | PropertyNotFoundProblem | PaymentProcessorUnavailableProblem | ApplicationFullProblem | ApplicantTransitionRefusedProblem | PrimaryRequiredProblem | NoInviteChannelProblem | RoleMismatchProblem | CloseReasonRefusedProblem | TemplateUnknownProblem | PropertyArchivedProblem | WebhookEndpointDisabledProblem | WebhookEndpointNotFoundProblem | WebhookDeliveryPendingProblem | WebhookDeliveryNotFoundProblem | SecretRotationConflictProblem | ApiVersionNotReleasedProblem | EventNotFoundProblem | ConsentNotFoundProblem | ContentTooLargeProblem | UnsupportedMediaTypeProblem | InternalErrorProblem | PreconditionFailedProblem | ObjectBusyProblem | InvalidVersionProblem | InvalidTransformProblem | IdempotencyKeyInvalidProblem | IdempotencyKeyInFlightProblem | IdempotencyKeyAnswerWithheldProblem | IdempotencyKeyReusedProblem;
6371
+ type Problem = ValidationFailedProblem | MalformedRequestProblem | InsufficientScopeProblem | SessionRequiredProblem | RateLimitedProblem | InvalidApiKeyProblem | EmbedOriginsUnsetProblem | MemberNotFoundProblem | RequirementTransitionRefusedProblem | RequirementNotFoundProblem | ApplicationNotFoundProblem | ApplicantDepartedProblem | ApplicationEndedProblem | RequirementNotPerformableProblem | ApplicationLimitReachedProblem | ApplicantNotFoundProblem | ScreeningNotFoundProblem | ScreeningLimitReachedProblem | CheckTypeNotServedProblem | CheckTypeNotPricedProblem | PersonNeedsMissingProblem | ExternalIdTakenProblem | PersonNotFoundProblem | ApplicationTypeUnavailableProblem | PaymentProcessorUnavailableProblem | NoInviteChannelProblem | TemplateUnknownProblem | ApplicationFullProblem | PropertyArchivedProblem | PropertyNotFoundProblem | ApplicantTransitionRefusedProblem | PrimaryRequiredProblem | RoleMismatchProblem | CloseReasonRefusedProblem | WebhookEndpointDisabledProblem | WebhookEndpointNotFoundProblem | WebhookDeliveryPendingProblem | WebhookDeliveryNotFoundProblem | SecretRotationConflictProblem | ApiVersionNotReleasedProblem | EventNotFoundProblem | ConsentNotFoundProblem | ContentTooLargeProblem | UnsupportedMediaTypeProblem | InternalErrorProblem | PreconditionFailedProblem | ObjectBusyProblem | InvalidVersionProblem | InvalidTransformProblem | IdempotencyKeyInvalidProblem | IdempotencyKeyInFlightProblem | IdempotencyKeyAnswerWithheldProblem | IdempotencyKeyReusedProblem;
6198
6372
  /** The URI that names a problem type. Compare it, never parse it. */
6199
6373
  type ProblemType = Problem["type"];
6200
6374
  /** One page of a list, as every list of the reference answers it (`isPage` in the model). */
@@ -6222,8 +6396,11 @@ interface Operation<R extends Guard<unknown> | "binary" = Guard<unknown> | "bina
6222
6396
  readonly path: string;
6223
6397
  /** Each query parameter's wire name by its argument's camelCase name, where the two differ. */
6224
6398
  readonly query: Readonly<Record<string, string>>;
6225
- readonly body: "application/json" | "application/merge-patch+json" | null;
6226
- /** How the body's members are named on the wire. */
6399
+ /**
6400
+ * The media type of a JSON body, the media types a body of bytes may carry, or `null` where there is no body.
6401
+ */
6402
+ readonly body: "application/json" | "application/merge-patch+json" | ReadonlyArray<string> | null;
6403
+ /** How the body's members are named on the wire; a body of bytes has none. */
6227
6404
  readonly requestNames: Names;
6228
6405
  /** Whether the operation takes an `Idempotency-Key`, which the transport sends on every call. */
6229
6406
  readonly idempotencyKey: boolean;
@@ -6393,7 +6570,7 @@ declare class EversaResources {
6393
6570
  /**
6394
6571
  * Create an application
6395
6572
  *
6396
- * Opens a rental application for the property with the applicants Eversa invites and, when you have several, the template to apply. Each applicant gets their own screening. Invited applicants receive the application's link by email and by text message when both are given, unless their invite.delivery is organization. The application gets its link (link.url), which you can read again at any time. An applicant whose data you hold is created with the manual endpoint; add the others with the add-applicant endpoints.
6573
+ * Opens a rental application for the property with the applicants Eversa invites and, when you have several, the template to apply. Each applicant gets their own screening. Invited applicants receive the application's link by email, unless their invite.delivery is organization. The application gets its link (link.url), which you can read again at any time. Add more applicants with the add-applicant endpoint.
6397
6574
  */
6398
6575
  create: (propertyId: `prop_${string}`, body: CreateApplication, options?: IdempotentRequestOptions) => Promise<Application>;
6399
6576
  /**
@@ -6572,6 +6749,16 @@ declare class EversaResources {
6572
6749
  */
6573
6750
  retrieve: (options?: RequestOptions) => Promise<Organization>;
6574
6751
  };
6752
+ readonly embedSessions: {
6753
+ /**
6754
+ * Create an embed session
6755
+ *
6756
+ * Creates a session that opens the components named, in your key's app, for an hour, on the app's embed origins alone, which its settings name: a frame on any other page shows nothing. Each component reads what your key reads for it, so the key must hold its permission; revoking or turning off the key ends every session it created. Create one each time the page renders, and hand the client secret to the page alone.
6757
+ *
6758
+ * The permission each component needs of your key: the screening status badge `screenings:read`, the application's panel and the stage badge `applications:read`, the screening form `screenings:write`, a screening's report `reports:read`, the application invite `applications:write`, the sign template editor and the sign envelope form `sign:write`, and a sign envelope's panel and its status badge `sign:read`. A component the key cannot open answers 403, naming the permission it lacks.
6759
+ */
6760
+ create: (body: CreateEmbedSession, options?: IdempotentRequestOptions) => Promise<IssuedEmbedSession>;
6761
+ };
6575
6762
  }
6576
6763
  /** Every error the SDK throws. */
6577
6764
  export declare class EversaError extends Error {
@@ -6628,4 +6815,4 @@ export declare class Eversa extends EversaResources {
6628
6815
  };
6629
6816
  constructor(apiKey: string, options?: EversaOptions);
6630
6817
  }
6631
- export { type Actor, type ActorApiKey, type ActorApplicant, type ActorMember, type ActorPerson, type ActorPlatform, type ActorType, type ActorVia, type AddApplicant, type AddressPeriod, type AdverseNotice, type Amount, type Amounts, type ApiVersionNotReleasedProblem, type Applicant, type ApplicantData, type ApplicantDataInput, type ApplicantDelivery, type ApplicantDepartedProblem, type ApplicantInviteSettings, type ApplicantList, type ApplicantNotFoundProblem, type ApplicantOrigin, type ApplicantPayment, type ApplicantPaymentStatus, type ApplicantRelation, type ApplicantRepresentative, type ApplicantRole, type ApplicantSituation, type ApplicantStatus, type ApplicantSummary, type ApplicantTransitionRefusedProblem, type Application, type ApplicationClosedReason, type ApplicationCounts, type ApplicationData, type ApplicationDataInput, type ApplicationEndedProblem, type ApplicationFee, type ApplicationFullProblem, type ApplicationLimitReachedProblem, type ApplicationLink, type ApplicationList, type ApplicationNotFoundProblem, type ApplicationStatus, type ApplicationSummary, type ApplicationType, type ApplicationTypeEncoded, type ApplicationTypeUnavailableProblem, type AttestationMethod, type CallingApiKey, type CancelScreeningReason, type Check, type CheckCanceled, type CheckCanceledReason, type CheckCharge, type CheckCounts, type CheckFailureReason, type CheckKind, type CheckResult, type CheckStatus, type CheckSummary, type CheckTypeNotPricedProblem, type CheckTypeNotServedProblem, type CloseApplication, type CloseApplicationReason, type CloseReasonRefusedProblem, type ConditionCode, type ConditionStatus, type ConditionalRequestOptions, type Consent, type ConsentAttestation, type ConsentList, type ConsentMethod, type ConsentNotFoundProblem, type ConsentPurpose, type ConsentStatus, type ContentTooLargeProblem, type CreateApplication, type CreateScreening, type CreateWebhookEndpoint, type Currency, type CustomBlock, type CustomBlockInput, type Decision, type DecisionBasis, type DecisionFactor, type DecisionOutcome, type DecisionOutcomeEncoded, type DeclineReason, type DeletedWebhookEndpoint, type Document, type DocumentContentType, type DocumentKind, type DocumentProvenance, type DocumentReview, type DocumentReviewOutcome, type DocumentStatus, type DocumentSubtype, type DocumentUpload, type DocumentUploadHeaders, type EmploymentType, type EnabledEvent, type Event, type EventActor, type EventActorApiKey, type EventActorApplicant, type EventActorMember, type EventActorPerson, type EventActorPlatform, type EventData, type EventDataApplicant, type EventDataApplication, type EventDataApplicationReport, type EventDataCheck, type EventDataConfidentialityIncident, type EventDataConsent, type EventDataDocument, type EventDataLegalHold, type EventDataOrganization, type EventDataPerson, type EventDataProperty, type EventDataRequirement, type EventDataRightsRequest, type EventDataScreening, type EventDataScreeningReport, type EventDataScreeningSettings, type EventDataSession, type EventDataTemplate, type EventDataWebhookEndpoint, type EventList, type EventNotFoundProblem, type EventType, type EventTypeFilter, Eversa as default, type EversaOptions, type EvidenceMethod, type ExternalIdTakenProblem, type FloorArea, type FundingSource, type HoldReason, type IdempotencyKeyAnswerWithheldProblem, type IdempotencyKeyInFlightProblem, type IdempotencyKeyInvalidProblem, type IdempotencyKeyReusedProblem, type IdempotentRequestOptions, type IdentityAttestation, type IdentityConfirmationMethod, type IdentityConfirmed, type IncomeFrequency, type IncomeSourceType, type IncomeVerification, type InsufficientScopeProblem, type InternalErrorProblem, type InvalidApiKeyProblem, type InvalidTransformProblem, type InvalidVersionProblem, type InviteChannel, type InviteDelivery, type InvitedApplicantInput, type Joining, type JoiningState, type Jurisdiction, type KeyRateLimit, type LivingArrangement, type Locale, type MalformedRequestProblem, type Member, type MemberList, type MemberNotFoundProblem, type Metadata, type MetadataInput, type Name, type NameInput, type NewCheckOrder, type NoInviteChannelProblem, type ObjectBusyProblem, type Offer, type OfferCondition, type OfferLease, type OfferStatus, type OfferTerms, type OfferWithdrawnReason, type Organization, type OrganizationLocale, type Page, type PagePromise, type PayerKind, type PaymentMethod, type PaymentProcessorUnavailableProblem, type PerformableBy, type Permission, type Person, type PersonField, type PersonInput, type PersonKey, type PersonList, type PersonListAddress, type PersonListItem, type PersonNeedsMissingProblem, type PersonNotFoundProblem, type PersonSummary, type PetKind, type PostalAddress, type PostalAddressInput, type PreconditionFailedProblem, type PrimaryRequiredProblem, type Problem, type ProblemError, type ProblemErrorCode, type ProblemType, type Property, type PropertyArchivedProblem, type PropertyKind, type PropertyNotFoundProblem, type ProvenanceActor, type RateLimitedProblem, type ReferenceKind, type References, type ReferencesInput, type Relationship, type RemoveApplicant, type RemoveApplicantReason, type RemovedReason, type ReportStatus, type RepresentativeRelationship, type RequestOptions, type Requirement, type RequirementAddressee, type RequirementAddresseeApplicant, type RequirementAddresseeOrganization, type RequirementAddresseePerson, type RequirementAnswer, type RequirementCanceledReason, type RequirementNotFoundProblem, type RequirementNotPerformableProblem, type RequirementParent, type RequirementParentApplication, type RequirementParentScreening, type RequirementReview, type RequirementReviewOutcome, type RequirementStatus, type RequirementTransitionRefusedProblem, type ResidenceDuration, type ResidencyStatus, type RoleMismatchProblem, type Screening, type ScreeningCanceled, type ScreeningLimitReachedProblem, type ScreeningList, type ScreeningMode, type ScreeningNotFoundProblem, type ScreeningStatus, type ScreeningSummary, type SearchApplications, type SearchDepth, type SearchPersons, type SearchScreenings, type SecondaryRole, type SecretRotationConflictProblem, type SendApplicantInvite, type SessionRequiredProblem, type SignedForm, type Spots, type StudyLoad, type Subject, type TemplateUnknownProblem, type TimeInCanada, type UnsupportedMediaTypeProblem, type UpdateWebhookEndpoint, type ValidationFailedProblem, type WebhookAttempt, type WebhookAttemptFailure, type WebhookDelivery, type WebhookDeliveryList, type WebhookDeliveryNotFoundProblem, type WebhookDeliveryPendingProblem, type WebhookDeliveryStatus, type WebhookEndpoint, type WebhookEndpointDisabledProblem, type WebhookEndpointList, type WebhookEndpointNotFoundProblem, type WebhookEndpointStatus, type WebhookEndpointWithSecret, type WebhookHeaders };
6818
+ export { type Actor, type ActorApiKey, type ActorApplicant, type ActorMember, type ActorPerson, type ActorPlatform, type ActorType, type ActorVia, type AddApplicant, type AddressPeriod, type AdverseNotice, type Amount, type Amounts, type ApiVersionNotReleasedProblem, type Applicant, type ApplicantData, type ApplicantDataInput, type ApplicantDelivery, type ApplicantDepartedProblem, type ApplicantInviteSettings, type ApplicantList, type ApplicantNotFoundProblem, type ApplicantOrigin, type ApplicantPayment, type ApplicantPaymentStatus, type ApplicantRelation, type ApplicantRepresentative, type ApplicantRole, type ApplicantSituation, type ApplicantStatus, type ApplicantSummary, type ApplicantTransitionRefusedProblem, type Application, type ApplicationClosedReason, type ApplicationCounts, type ApplicationData, type ApplicationDataInput, type ApplicationEndedProblem, type ApplicationFee, type ApplicationFullProblem, type ApplicationLimitReachedProblem, type ApplicationLink, type ApplicationList, type ApplicationNotFoundProblem, type ApplicationStatus, type ApplicationSummary, type ApplicationType, type ApplicationTypeEncoded, type ApplicationTypeUnavailableProblem, type AttestationMethod, type CallingApiKey, type CancelScreeningReason, type Check, type CheckCanceled, type CheckCanceledReason, type CheckCharge, type CheckCounts, type CheckFailureReason, type CheckKind, type CheckResult, type CheckStatus, type CheckSummary, type CheckTypeNotPricedProblem, type CheckTypeNotServedProblem, type CloseApplication, type CloseApplicationReason, type CloseReasonRefusedProblem, type ConditionCode, type ConditionStatus, type ConditionalRequestOptions, type Consent, type ConsentAttestation, type ConsentList, type ConsentMethod, type ConsentNotFoundProblem, type ConsentPurpose, type ConsentStatus, type ContentTooLargeProblem, type CreateApplication, type CreateEmbedSession, type CreateScreening, type CreateWebhookEndpoint, type Currency, type CustomBlock, type CustomBlockInput, type Decision, type DecisionBasis, type DecisionFactor, type DecisionOutcome, type DecisionOutcomeEncoded, type DeclineReason, type DeletedWebhookEndpoint, type Document, type DocumentContentType, type DocumentKind, type DocumentProvenance, type DocumentReview, type DocumentReviewOutcome, type DocumentStatus, type DocumentSubtype, type DocumentUpload, type DocumentUploadHeaders, type EmbedComponent, type EmbedOriginsUnsetProblem, type EmploymentType, type EnabledEvent, type Event, type EventActor, type EventActorApiKey, type EventActorApplicant, type EventActorMember, type EventActorPerson, type EventActorPlatform, type EventActorSigner, type EventData, type EventDataApplicant, type EventDataApplication, type EventDataApplicationReport, type EventDataCheck, type EventDataConfidentialityIncident, type EventDataConsent, type EventDataDocument, type EventDataLegalHold, type EventDataOrganization, type EventDataPerson, type EventDataProperty, type EventDataRequirement, type EventDataRightsRequest, type EventDataScreening, type EventDataScreeningReport, type EventDataScreeningSettings, type EventDataSession, type EventDataSignEnvelope, type EventDataSignTemplate, type EventDataTemplate, type EventDataWebhookEndpoint, type EventList, type EventNotFoundProblem, type EventType, type EventTypeFilter, Eversa as default, type EversaOptions, type EvidenceMethod, type ExternalIdTakenProblem, type FloorArea, type FundingSource, type HoldReason, type IdempotencyKeyAnswerWithheldProblem, type IdempotencyKeyInFlightProblem, type IdempotencyKeyInvalidProblem, type IdempotencyKeyReusedProblem, type IdempotentRequestOptions, type IdentityAttestation, type IdentityConfirmationMethod, type IdentityConfirmed, type IncomeFrequency, type IncomeSourceType, type IncomeVerification, type InsufficientScopeProblem, type InternalErrorProblem, type InvalidApiKeyProblem, type InvalidTransformProblem, type InvalidVersionProblem, type InviteChannel, type InviteDelivery, type InvitedApplicantInput, type IssuedEmbedSession, type Joining, type JoiningState, type Jurisdiction, type KeyRateLimit, type LivingArrangement, type Locale, type MalformedRequestProblem, type Member, type MemberList, type MemberNotFoundProblem, type Metadata, type MetadataInput, type Name, type NameInput, type NewCheckOrder, type NoInviteChannelProblem, type ObjectBusyProblem, type Offer, type OfferCondition, type OfferLease, type OfferStatus, type OfferTerms, type OfferWithdrawnReason, type Organization, type OrganizationLocale, type Page, type PagePromise, type PayerKind, type PaymentMethod, type PaymentProcessorUnavailableProblem, type PerformableBy, type Permission, type Person, type PersonField, type PersonInput, type PersonKey, type PersonList, type PersonListAddress, type PersonListItem, type PersonNeedsMissingProblem, type PersonNotFoundProblem, type PersonSummary, type PetKind, type PostalAddress, type PostalAddressInput, type PreconditionFailedProblem, type PrimaryRequiredProblem, type Problem, type ProblemError, type ProblemErrorCode, type ProblemType, type Property, type PropertyArchivedProblem, type PropertyKind, type PropertyNotFoundProblem, type ProvenanceActor, type RateLimitedProblem, type ReferenceKind, type References, type ReferencesInput, type Relationship, type RemoveApplicant, type RemoveApplicantReason, type RemovedReason, type ReportStatus, type RepresentativeRelationship, type RequestOptions, type Requirement, type RequirementAddressee, type RequirementAddresseeApplicant, type RequirementAddresseeOrganization, type RequirementAddresseePerson, type RequirementAnswer, type RequirementCanceledReason, type RequirementNotFoundProblem, type RequirementNotPerformableProblem, type RequirementParent, type RequirementParentApplication, type RequirementParentScreening, type RequirementReview, type RequirementReviewOutcome, type RequirementStatus, type RequirementTransitionRefusedProblem, type ResidenceDuration, type ResidencyStatus, type RoleMismatchProblem, type Screening, type ScreeningCanceled, type ScreeningLimitReachedProblem, type ScreeningList, type ScreeningMode, type ScreeningNotFoundProblem, type ScreeningStatus, type ScreeningSummary, type SearchApplications, type SearchDepth, type SearchPersons, type SearchScreenings, type SecondaryRole, type SecretRotationConflictProblem, type SendApplicantInvite, type SessionRequiredProblem, type SignedForm, type Spots, type StudyLoad, type Subject, type TemplateUnknownProblem, type TimeInCanada, type UnsupportedMediaTypeProblem, type UpdateWebhookEndpoint, type ValidationFailedProblem, type WebhookAttempt, type WebhookAttemptFailure, type WebhookDelivery, type WebhookDeliveryList, type WebhookDeliveryNotFoundProblem, type WebhookDeliveryPendingProblem, type WebhookDeliveryStatus, type WebhookEndpoint, type WebhookEndpointDisabledProblem, type WebhookEndpointList, type WebhookEndpointNotFoundProblem, type WebhookEndpointStatus, type WebhookEndpointWithSecret, type WebhookHeaders };