@eversa/node 1.0.0-rc.1 → 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.
- package/dist/index.d.ts +1558 -1371
- package/dist/index.js +476 -366
- package/package.json +2 -6
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ const InsufficientScopeProblem = object({
|
|
|
52
52
|
detail: required(isString),
|
|
53
53
|
scope: required(lazy(() => Permission))
|
|
54
54
|
});
|
|
55
|
-
const Permission = union(literal("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"), isString);
|
|
55
|
+
const Permission = union(literal("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"), isString);
|
|
56
56
|
const SessionRequiredProblem = object({
|
|
57
57
|
type: required(literal("https://eversa.app/problems/session-required")),
|
|
58
58
|
title: required(isString),
|
|
@@ -117,6 +117,7 @@ const HoldReason = union(literal("identity_unconfirmed", "identity_unverifiable"
|
|
|
117
117
|
const ReferenceKind = literal("workplace", "landlord");
|
|
118
118
|
const CheckKind = literal("credit_report", "criminal_record", "civil_records", "reference", "identity");
|
|
119
119
|
const EmploymentType = literal("full_time", "part_time", "contract", "self_employed", "other");
|
|
120
|
+
const EmbedComponent = literal("screening_status_badge", "application", "stage_badge", "screening_form", "screening_report", "application_invite", "sign_template_editor", "sign_envelope_form", "sign_envelope", "sign_envelope_status_badge");
|
|
120
121
|
const RateLimitedProblem = object({
|
|
121
122
|
type: required(literal("https://eversa.app/problems/rate-limited")),
|
|
122
123
|
title: required(isString),
|
|
@@ -129,6 +130,21 @@ const InvalidApiKeyProblem = object({
|
|
|
129
130
|
status: required(literal(401)),
|
|
130
131
|
detail: required(isString)
|
|
131
132
|
});
|
|
133
|
+
const EmbedOriginsUnsetProblem = object({
|
|
134
|
+
type: required(literal("https://eversa.app/problems/embed-origins-unset")),
|
|
135
|
+
title: required(isString),
|
|
136
|
+
status: required(literal(409)),
|
|
137
|
+
detail: required(isString)
|
|
138
|
+
});
|
|
139
|
+
const IssuedEmbedSession$1 = object({
|
|
140
|
+
object: required(literal("embed_session")),
|
|
141
|
+
id: required(id("es", /^es_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
142
|
+
livemode: required(isBoolean),
|
|
143
|
+
components: required(array(union(lazy(() => EmbedComponent), isString))),
|
|
144
|
+
origins: required(array(isString)),
|
|
145
|
+
expiresAt: required(isString),
|
|
146
|
+
clientSecret: required(isString)
|
|
147
|
+
});
|
|
132
148
|
const Organization$1 = object({
|
|
133
149
|
object: required(literal("organization")),
|
|
134
150
|
id: required(id("org", /^org_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
@@ -168,7 +184,7 @@ const CallingApiKey$1 = object({
|
|
|
168
184
|
name: required(union(isString, isNull)),
|
|
169
185
|
start: required(isString),
|
|
170
186
|
last4: required(isString),
|
|
171
|
-
scope: required(array(union(literal("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"), isString))),
|
|
187
|
+
scope: required(array(union(literal("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"), isString))),
|
|
172
188
|
livemode: required(isBoolean),
|
|
173
189
|
expiresAt: required(union(isString, isNull)),
|
|
174
190
|
createdAt: required(isString),
|
|
@@ -210,7 +226,7 @@ const ApplicationNotFoundProblem = object({
|
|
|
210
226
|
title: required(isString),
|
|
211
227
|
status: required(literal(404)),
|
|
212
228
|
detail: required(isString),
|
|
213
|
-
objectId:
|
|
229
|
+
objectId: optional(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
214
230
|
});
|
|
215
231
|
const Requirement$1 = object({
|
|
216
232
|
object: required(literal("requirement")),
|
|
@@ -318,7 +334,7 @@ const ScreeningNotFoundProblem = object({
|
|
|
318
334
|
title: required(isString),
|
|
319
335
|
status: required(literal(404)),
|
|
320
336
|
detail: required(isString),
|
|
321
|
-
objectId:
|
|
337
|
+
objectId: optional(id("scr", /^scr_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
322
338
|
});
|
|
323
339
|
const Screening$1 = object({
|
|
324
340
|
object: required(literal("screening")),
|
|
@@ -458,7 +474,7 @@ const ProvenanceActor = object({
|
|
|
458
474
|
type: required(lazy(() => ActorType)),
|
|
459
475
|
via: required(lazy(() => ActorVia))
|
|
460
476
|
});
|
|
461
|
-
const ActorType = union(literal("member", "api_key", "applicant", "person", "platform"), isString);
|
|
477
|
+
const ActorType = union(literal("member", "api_key", "applicant", "person", "platform", "signer"), isString);
|
|
462
478
|
const CheckCounts$1 = object({
|
|
463
479
|
total: required(isNumber),
|
|
464
480
|
queued: required(isNumber),
|
|
@@ -535,6 +551,11 @@ const ExternalIdTakenProblem = object({
|
|
|
535
551
|
});
|
|
536
552
|
const ResidenceDuration = literal("under_1_year", "1_to_2_years", "2_to_5_years", "over_5_years");
|
|
537
553
|
const LivingArrangement = literal("renting", "owned", "parents", "other");
|
|
554
|
+
const AddressPeriod$1 = object({
|
|
555
|
+
address: required(lazy(() => PostalAddress$1)),
|
|
556
|
+
from: optional(isString),
|
|
557
|
+
to: optional(isString)
|
|
558
|
+
});
|
|
538
559
|
const ScreeningList$1 = object({
|
|
539
560
|
object: required(literal("list")),
|
|
540
561
|
data: required(array(lazy(() => ScreeningSummary$1))),
|
|
@@ -581,7 +602,7 @@ const PersonNotFoundProblem = object({
|
|
|
581
602
|
detail: required(isString),
|
|
582
603
|
objectId: required(id("per", /^per_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
583
604
|
});
|
|
584
|
-
const EventActor = union(lazy(() => EventActorMember), lazy(() => EventActorApiKey), lazy(() => EventActorApplicant), lazy(() => EventActorPerson), lazy(() => EventActorPlatform));
|
|
605
|
+
const EventActor = union(lazy(() => EventActorMember), lazy(() => EventActorApiKey), lazy(() => EventActorApplicant), lazy(() => EventActorPerson), lazy(() => EventActorPlatform), lazy(() => EventActorSigner));
|
|
585
606
|
const Person$1 = object({
|
|
586
607
|
object: required(literal("person")),
|
|
587
608
|
id: required(id("per", /^per_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
@@ -608,11 +629,6 @@ const Person$1 = object({
|
|
|
608
629
|
previousAddressUnavailableReason: optional(isString),
|
|
609
630
|
references: required(lazy(() => References$1))
|
|
610
631
|
});
|
|
611
|
-
const AddressPeriod$1 = object({
|
|
612
|
-
address: required(lazy(() => PostalAddress$1)),
|
|
613
|
-
from: optional(isString),
|
|
614
|
-
to: optional(isString)
|
|
615
|
-
});
|
|
616
632
|
const PersonList$1 = object({
|
|
617
633
|
object: required(literal("list")),
|
|
618
634
|
data: required(array(lazy(() => PersonListItem$1))),
|
|
@@ -640,6 +656,40 @@ const ApplicationTypeUnavailableProblem = object({
|
|
|
640
656
|
detail: required(isString),
|
|
641
657
|
applicationType: required(union(literal("residential_lease", "employment"), isString))
|
|
642
658
|
});
|
|
659
|
+
const PaymentProcessorUnavailableProblem = object({
|
|
660
|
+
type: required(literal("https://eversa.app/problems/payment-processor-unavailable")),
|
|
661
|
+
title: required(isString),
|
|
662
|
+
status: required(literal(503)),
|
|
663
|
+
detail: required(isString)
|
|
664
|
+
});
|
|
665
|
+
const NoInviteChannelProblem = object({
|
|
666
|
+
type: required(literal("https://eversa.app/problems/no-invite-channel")),
|
|
667
|
+
title: required(isString),
|
|
668
|
+
status: required(literal(422)),
|
|
669
|
+
detail: required(isString),
|
|
670
|
+
objectId: required(id("per", /^per_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
671
|
+
});
|
|
672
|
+
const TemplateUnknownProblem = object({
|
|
673
|
+
type: required(literal("https://eversa.app/problems/template-unknown")),
|
|
674
|
+
title: required(isString),
|
|
675
|
+
status: required(literal(422)),
|
|
676
|
+
detail: required(isString),
|
|
677
|
+
template: required(id("tpl", /^tpl_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
678
|
+
});
|
|
679
|
+
const ApplicationFullProblem = object({
|
|
680
|
+
type: required(literal("https://eversa.app/problems/application-full")),
|
|
681
|
+
title: required(isString),
|
|
682
|
+
status: required(literal(409)),
|
|
683
|
+
detail: required(isString),
|
|
684
|
+
objectId: required(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
685
|
+
});
|
|
686
|
+
const PropertyArchivedProblem = object({
|
|
687
|
+
type: required(literal("https://eversa.app/problems/property-archived")),
|
|
688
|
+
title: required(isString),
|
|
689
|
+
status: required(literal(409)),
|
|
690
|
+
detail: required(isString),
|
|
691
|
+
objectId: required(id("prop", /^prop_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
692
|
+
});
|
|
643
693
|
const PropertyNotFoundProblem = object({
|
|
644
694
|
type: required(literal("https://eversa.app/problems/property-not-found")),
|
|
645
695
|
title: required(isString),
|
|
@@ -647,6 +697,143 @@ const PropertyNotFoundProblem = object({
|
|
|
647
697
|
detail: required(isString),
|
|
648
698
|
objectId: required(id("prop", /^prop_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
649
699
|
});
|
|
700
|
+
const Application$1 = object({
|
|
701
|
+
object: required(literal("application")),
|
|
702
|
+
id: required(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
703
|
+
livemode: required(isBoolean),
|
|
704
|
+
externalId: optional(isString),
|
|
705
|
+
type: required(union(lazy(() => ApplicationType), isString)),
|
|
706
|
+
template: required(object({
|
|
707
|
+
id: required(id("tpl", /^tpl_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
708
|
+
version: required(isNumber)
|
|
709
|
+
})),
|
|
710
|
+
applicationFee: required(union(lazy(() => ApplicationFee), isNull)),
|
|
711
|
+
status: required(union(lazy(() => ApplicationStatus), isString)),
|
|
712
|
+
summary: required(lazy(() => ApplicationCounts$1)),
|
|
713
|
+
spots: required(lazy(() => Spots)),
|
|
714
|
+
joining: required(lazy(() => Joining)),
|
|
715
|
+
link: optional(lazy(() => ApplicationLink$1)),
|
|
716
|
+
subject: required(lazy(() => Subject$1)),
|
|
717
|
+
data: required(lazy(() => ApplicationData$1)),
|
|
718
|
+
payer: required(union(lazy(() => PayerKind), isString)),
|
|
719
|
+
applicants: required(array(lazy(() => ApplicantSummary$1))),
|
|
720
|
+
decision: optional(lazy(() => Decision$1)),
|
|
721
|
+
previousDecisions: required(array(lazy(() => Decision$1))),
|
|
722
|
+
closed: optional(object({
|
|
723
|
+
reason: required(lazy(() => ApplicationClosedReason)),
|
|
724
|
+
note: optional(isString),
|
|
725
|
+
at: required(isString),
|
|
726
|
+
by: required(lazy(() => Actor))
|
|
727
|
+
})),
|
|
728
|
+
assignee: optional(object({
|
|
729
|
+
userId: required(id("usr", /^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
730
|
+
name: optional(isString)
|
|
731
|
+
})),
|
|
732
|
+
createdBy: required(lazy(() => Actor)),
|
|
733
|
+
amounts: required(lazy(() => Amounts)),
|
|
734
|
+
report: required(object({
|
|
735
|
+
status: required(lazy(() => ReportStatus)),
|
|
736
|
+
url: required(isString)
|
|
737
|
+
})),
|
|
738
|
+
metadata: required(lazy(() => Metadata)),
|
|
739
|
+
createdAt: required(isString),
|
|
740
|
+
updatedAt: required(isString)
|
|
741
|
+
});
|
|
742
|
+
const ApplicationClosedReason = union(literal("withdrawn", "no_longer_needed", "expired", "declined", "offer_declined", "offer_expired", "subject_unavailable", "duplicate", "other"), isString);
|
|
743
|
+
const DecisionFactor = literal("credit_grade", "credit_history", "income_ratio", "income_verification", "employment", "rental_history", "references", "legal_records", "identity", "guarantor", "other");
|
|
744
|
+
const DecisionBasis = literal("human", "automated", "human_reviewed");
|
|
745
|
+
const AdverseNotice$1 = object({
|
|
746
|
+
required: required(literal(true)),
|
|
747
|
+
channels: required(array(lazy(() => InviteChannel))),
|
|
748
|
+
sentAt: optional(isString),
|
|
749
|
+
failedAt: optional(isString)
|
|
750
|
+
});
|
|
751
|
+
const InviteChannel = union(literal("email", "sms"), isString);
|
|
752
|
+
const Offer$1 = object({
|
|
753
|
+
id: required(id("ofr", /^ofr_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
754
|
+
status: required(lazy(() => OfferStatus)),
|
|
755
|
+
withdrawnReason: optional(lazy(() => OfferWithdrawnReason)),
|
|
756
|
+
terms: required(lazy(() => OfferTerms$1)),
|
|
757
|
+
termsVersion: required(isNumber),
|
|
758
|
+
termsHash: required(isString),
|
|
759
|
+
requirementId: required(id("req", /^req_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
760
|
+
sentAt: required(isString),
|
|
761
|
+
expiresAt: optional(isString),
|
|
762
|
+
respondedAt: optional(isString),
|
|
763
|
+
respondedBy: optional(lazy(() => Actor)),
|
|
764
|
+
onBehalf: optional(isBoolean),
|
|
765
|
+
evidence: optional(object({
|
|
766
|
+
method: required(union(lazy(() => EvidenceMethod), isString)),
|
|
767
|
+
reference: optional(isString)
|
|
768
|
+
}))
|
|
769
|
+
});
|
|
770
|
+
const OfferTerms$1 = object({
|
|
771
|
+
rent: optional(lazy(() => Amount)),
|
|
772
|
+
lease: optional(lazy(() => OfferLease$1)),
|
|
773
|
+
conditions: required(array(lazy(() => OfferCondition)))
|
|
774
|
+
});
|
|
775
|
+
const OfferCondition = object({
|
|
776
|
+
code: required(union(lazy(() => ConditionCode), isString)),
|
|
777
|
+
note: optional(isString)
|
|
778
|
+
});
|
|
779
|
+
const OfferLease$1 = object({
|
|
780
|
+
startsOn: required(isString),
|
|
781
|
+
endsOn: optional(isString)
|
|
782
|
+
});
|
|
783
|
+
const OfferWithdrawnReason = union(literal("applicant_added", "organization"), isString);
|
|
784
|
+
const OfferStatus = union(literal("pending", "accepted", "declined", "expired", "withdrawn"), isString);
|
|
785
|
+
const ConditionStatus = union(literal("pending", "accepted", "met", "waived"), isString);
|
|
786
|
+
const DeclineReason = literal("credit", "income", "rental_history", "references", "legal_records", "identity", "incomplete", "other");
|
|
787
|
+
const DecisionOutcome = literal("approved", "conditionally_approved", "declined", "deferred");
|
|
788
|
+
const Decision$1 = object({
|
|
789
|
+
id: required(id("dec", /^dec_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
790
|
+
outcome: required(union(lazy(() => DecisionOutcome), isString)),
|
|
791
|
+
reasons: optional(array(union(lazy(() => DeclineReason), isString))),
|
|
792
|
+
conditions: required(array(object({
|
|
793
|
+
code: required(union(lazy(() => ConditionCode), isString)),
|
|
794
|
+
note: optional(isString),
|
|
795
|
+
status: required(lazy(() => ConditionStatus))
|
|
796
|
+
}))),
|
|
797
|
+
offer: optional(lazy(() => Offer$1)),
|
|
798
|
+
notice: optional(lazy(() => AdverseNotice$1)),
|
|
799
|
+
basis: required(union(lazy(() => DecisionBasis), isString)),
|
|
800
|
+
factors: optional(array(union(lazy(() => DecisionFactor), isString))),
|
|
801
|
+
madeBy: required(lazy(() => Actor)),
|
|
802
|
+
decidedAt: required(isString),
|
|
803
|
+
note: optional(isString),
|
|
804
|
+
supersededAt: optional(isString)
|
|
805
|
+
});
|
|
806
|
+
const ApplicantSummary$1 = object({
|
|
807
|
+
object: required(literal("applicant")),
|
|
808
|
+
id: required(id("apl", /^apl_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
809
|
+
role: required(isString),
|
|
810
|
+
status: required(lazy(() => ApplicantStatus)),
|
|
811
|
+
person: required(lazy(() => PersonSummary$1))
|
|
812
|
+
});
|
|
813
|
+
const ApplicationData$1 = object({
|
|
814
|
+
household: optional(object({
|
|
815
|
+
occupants: optional(array(object({
|
|
816
|
+
relationship: required(union(lazy(() => Relationship), isString)),
|
|
817
|
+
isMinor: required(isBoolean)
|
|
818
|
+
}))),
|
|
819
|
+
pets: optional(array(object({
|
|
820
|
+
kind: required(union(lazy(() => PetKind), isString)),
|
|
821
|
+
count: required(isNumber)
|
|
822
|
+
}))),
|
|
823
|
+
vehicles: optional(isNumber),
|
|
824
|
+
noticeGiven: optional(isBoolean)
|
|
825
|
+
})),
|
|
826
|
+
desiredMoveIn: optional(isString),
|
|
827
|
+
custom: optional(lazy(() => CustomBlock))
|
|
828
|
+
});
|
|
829
|
+
const CustomBlock = record(union(isString, isNumber, isBoolean));
|
|
830
|
+
const PetKind = literal("dog", "cat", "other");
|
|
831
|
+
const Relationship = literal("spouse", "partner", "child", "parent", "roommate", "other");
|
|
832
|
+
const Subject$1 = object({
|
|
833
|
+
type: required(literal("property")),
|
|
834
|
+
property: required(lazy(() => Property$1)),
|
|
835
|
+
snapshotAt: required(isString)
|
|
836
|
+
});
|
|
650
837
|
const Property$1 = object({
|
|
651
838
|
object: required(literal("property")),
|
|
652
839
|
id: required(id("prop", /^prop_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
@@ -682,12 +869,42 @@ const PostalAddress$1 = object({
|
|
|
682
869
|
addressLines: required(array(isString))
|
|
683
870
|
});
|
|
684
871
|
const PropertyKind = literal("apartment", "house", "condo", "room", "commercial");
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
872
|
+
const ApplicationLink$1 = object({
|
|
873
|
+
url: required(isString),
|
|
874
|
+
guarantorUrl: optional(isString)
|
|
875
|
+
});
|
|
876
|
+
const Joining = object({
|
|
877
|
+
state: required(lazy(() => JoiningState)),
|
|
878
|
+
until: required(isString)
|
|
879
|
+
});
|
|
880
|
+
const JoiningState = union(literal("open", "full", "closed"), isString);
|
|
881
|
+
const Spots = object({
|
|
882
|
+
total: required(isNumber),
|
|
883
|
+
taken: required(isNumber)
|
|
884
|
+
});
|
|
885
|
+
const ApplicationCounts$1 = object({
|
|
886
|
+
applicants: required(object({
|
|
887
|
+
active: required(isNumber),
|
|
888
|
+
submitted: required(isNumber),
|
|
889
|
+
screened: required(isNumber)
|
|
890
|
+
})),
|
|
891
|
+
requirements: required(object({
|
|
892
|
+
openForApplicants: required(isNumber),
|
|
893
|
+
openForOrganization: required(isNumber)
|
|
894
|
+
}))
|
|
895
|
+
});
|
|
896
|
+
const ApplicationFee = object({
|
|
897
|
+
amount: required(lazy(() => Amount)),
|
|
898
|
+
tax: required(lazy(() => Amount))
|
|
690
899
|
});
|
|
900
|
+
const FundingSource = literal("government_aid", "scholarship", "part_time_work", "family_support", "savings", "other");
|
|
901
|
+
const StudyLoad = literal("full_time", "part_time");
|
|
902
|
+
const TimeInCanada = literal("under_6_months", "6_to_12_months", "1_to_3_years", "over_3_years");
|
|
903
|
+
const ResidencyStatus = literal("citizen_or_permanent_resident", "other");
|
|
904
|
+
const IncomeFrequency = literal("monthly", "annual", "weekly", "hourly");
|
|
905
|
+
const IncomeSourceType = literal("employment", "self_employment", "benefits", "pension", "student_aid", "support", "other");
|
|
906
|
+
const ApplicantSituation = literal("salaried", "self_employed", "retired", "student", "newcomer", "other");
|
|
907
|
+
const ApplicantRole = literal("primary", "co_applicant", "guarantor");
|
|
691
908
|
const ApplicantPaymentStatus = union(literal("not_required", "pending", "processing", "on_hold", "paid", "refunded", "waived"), isString);
|
|
692
909
|
const Applicant$1 = object({
|
|
693
910
|
object: required(literal("applicant")),
|
|
@@ -804,11 +1021,6 @@ const ApplicantData$1 = object({
|
|
|
804
1021
|
})),
|
|
805
1022
|
custom: optional(lazy(() => CustomBlock))
|
|
806
1023
|
});
|
|
807
|
-
const CustomBlock = record(union(isString, isNumber, isBoolean));
|
|
808
|
-
const FundingSource = literal("government_aid", "scholarship", "part_time_work", "family_support", "savings", "other");
|
|
809
|
-
const StudyLoad = literal("full_time", "part_time");
|
|
810
|
-
const TimeInCanada = literal("under_6_months", "6_to_12_months", "1_to_3_years", "over_3_years");
|
|
811
|
-
const ResidencyStatus = literal("citizen_or_permanent_resident", "other");
|
|
812
1024
|
const ApplicantRepresentative$1 = object({
|
|
813
1025
|
givenName: required(isString),
|
|
814
1026
|
familyName: required(isString),
|
|
@@ -837,183 +1049,9 @@ const References$1 = object({
|
|
|
837
1049
|
landlordUnavailableReason: optional(isString)
|
|
838
1050
|
});
|
|
839
1051
|
const IncomeVerification = union(literal("unverified", "pending", "verified", "mismatch"), isString);
|
|
840
|
-
const IncomeFrequency = literal("monthly", "annual", "weekly", "hourly");
|
|
841
|
-
const IncomeSourceType = literal("employment", "self_employment", "benefits", "pension", "student_aid", "support", "other");
|
|
842
|
-
const ApplicantSituation = literal("salaried", "self_employed", "retired", "student", "newcomer", "other");
|
|
843
1052
|
const ApplicantDelivery = union(literal("eversa", "organization", "stopped"), isString);
|
|
844
1053
|
const ApplicantRelation = union(literal("self", "representative"), isString);
|
|
845
1054
|
const ApplicantOrigin = union(literal("entered", "joined"), isString);
|
|
846
|
-
const ApplicationFullProblem = object({
|
|
847
|
-
type: required(literal("https://eversa.app/problems/application-full")),
|
|
848
|
-
title: required(isString),
|
|
849
|
-
status: required(literal(409)),
|
|
850
|
-
detail: required(isString),
|
|
851
|
-
objectId: required(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
852
|
-
});
|
|
853
|
-
const Application$1 = object({
|
|
854
|
-
object: required(literal("application")),
|
|
855
|
-
id: required(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
856
|
-
livemode: required(isBoolean),
|
|
857
|
-
externalId: optional(isString),
|
|
858
|
-
type: required(union(lazy(() => ApplicationType), isString)),
|
|
859
|
-
template: required(object({
|
|
860
|
-
id: required(id("tpl", /^tpl_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
861
|
-
version: required(isNumber)
|
|
862
|
-
})),
|
|
863
|
-
applicationFee: required(union(lazy(() => ApplicationFee), isNull)),
|
|
864
|
-
status: required(union(lazy(() => ApplicationStatus), isString)),
|
|
865
|
-
summary: required(lazy(() => ApplicationCounts$1)),
|
|
866
|
-
spots: required(lazy(() => Spots)),
|
|
867
|
-
joining: required(lazy(() => Joining)),
|
|
868
|
-
link: optional(lazy(() => ApplicationLink$1)),
|
|
869
|
-
subject: required(lazy(() => Subject$1)),
|
|
870
|
-
data: required(lazy(() => ApplicationData$1)),
|
|
871
|
-
payer: required(union(lazy(() => PayerKind), isString)),
|
|
872
|
-
applicants: required(array(lazy(() => ApplicantSummary$1))),
|
|
873
|
-
decision: optional(lazy(() => Decision$1)),
|
|
874
|
-
previousDecisions: required(array(lazy(() => Decision$1))),
|
|
875
|
-
closed: optional(object({
|
|
876
|
-
reason: required(lazy(() => ApplicationClosedReason)),
|
|
877
|
-
note: optional(isString),
|
|
878
|
-
at: required(isString),
|
|
879
|
-
by: required(lazy(() => Actor))
|
|
880
|
-
})),
|
|
881
|
-
assignee: optional(object({
|
|
882
|
-
userId: required(id("usr", /^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
883
|
-
name: optional(isString)
|
|
884
|
-
})),
|
|
885
|
-
createdBy: required(lazy(() => Actor)),
|
|
886
|
-
amounts: required(lazy(() => Amounts)),
|
|
887
|
-
report: required(object({
|
|
888
|
-
status: required(lazy(() => ReportStatus)),
|
|
889
|
-
url: required(isString)
|
|
890
|
-
})),
|
|
891
|
-
metadata: required(lazy(() => Metadata)),
|
|
892
|
-
createdAt: required(isString),
|
|
893
|
-
updatedAt: required(isString)
|
|
894
|
-
});
|
|
895
|
-
const ApplicationClosedReason = union(literal("withdrawn", "no_longer_needed", "expired", "declined", "offer_declined", "offer_expired", "subject_unavailable", "duplicate", "other"), isString);
|
|
896
|
-
const DecisionFactor = literal("credit_grade", "credit_history", "income_ratio", "income_verification", "employment", "rental_history", "references", "legal_records", "identity", "guarantor", "other");
|
|
897
|
-
const DecisionBasis = literal("human", "automated", "human_reviewed");
|
|
898
|
-
const AdverseNotice$1 = object({
|
|
899
|
-
required: required(literal(true)),
|
|
900
|
-
channels: required(array(lazy(() => InviteChannel))),
|
|
901
|
-
sentAt: optional(isString),
|
|
902
|
-
failedAt: optional(isString)
|
|
903
|
-
});
|
|
904
|
-
const InviteChannel = union(literal("email", "sms"), isString);
|
|
905
|
-
const Offer$1 = object({
|
|
906
|
-
id: required(id("ofr", /^ofr_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
907
|
-
status: required(lazy(() => OfferStatus)),
|
|
908
|
-
withdrawnReason: optional(lazy(() => OfferWithdrawnReason)),
|
|
909
|
-
terms: required(lazy(() => OfferTerms$1)),
|
|
910
|
-
termsVersion: required(isNumber),
|
|
911
|
-
termsHash: required(isString),
|
|
912
|
-
requirementId: required(id("req", /^req_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
913
|
-
sentAt: required(isString),
|
|
914
|
-
expiresAt: optional(isString),
|
|
915
|
-
respondedAt: optional(isString),
|
|
916
|
-
respondedBy: optional(lazy(() => Actor)),
|
|
917
|
-
onBehalf: optional(isBoolean),
|
|
918
|
-
evidence: optional(object({
|
|
919
|
-
method: required(union(lazy(() => EvidenceMethod), isString)),
|
|
920
|
-
reference: optional(isString)
|
|
921
|
-
}))
|
|
922
|
-
});
|
|
923
|
-
const OfferTerms$1 = object({
|
|
924
|
-
rent: optional(lazy(() => Amount)),
|
|
925
|
-
lease: optional(lazy(() => OfferLease$1)),
|
|
926
|
-
conditions: required(array(lazy(() => OfferCondition)))
|
|
927
|
-
});
|
|
928
|
-
const OfferCondition = object({
|
|
929
|
-
code: required(union(lazy(() => ConditionCode), isString)),
|
|
930
|
-
note: optional(isString)
|
|
931
|
-
});
|
|
932
|
-
const OfferLease$1 = object({
|
|
933
|
-
startsOn: required(isString),
|
|
934
|
-
endsOn: optional(isString)
|
|
935
|
-
});
|
|
936
|
-
const OfferWithdrawnReason = union(literal("applicant_added", "organization"), isString);
|
|
937
|
-
const OfferStatus = union(literal("pending", "accepted", "declined", "expired", "withdrawn"), isString);
|
|
938
|
-
const ConditionStatus = union(literal("pending", "accepted", "met", "waived"), isString);
|
|
939
|
-
const DeclineReason = literal("credit", "income", "rental_history", "references", "legal_records", "identity", "incomplete", "other");
|
|
940
|
-
const DecisionOutcome = literal("approved", "conditionally_approved", "declined", "deferred");
|
|
941
|
-
const Decision$1 = object({
|
|
942
|
-
id: required(id("dec", /^dec_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
943
|
-
outcome: required(union(lazy(() => DecisionOutcome), isString)),
|
|
944
|
-
reasons: optional(array(union(lazy(() => DeclineReason), isString))),
|
|
945
|
-
conditions: required(array(object({
|
|
946
|
-
code: required(union(lazy(() => ConditionCode), isString)),
|
|
947
|
-
note: optional(isString),
|
|
948
|
-
status: required(lazy(() => ConditionStatus))
|
|
949
|
-
}))),
|
|
950
|
-
offer: optional(lazy(() => Offer$1)),
|
|
951
|
-
notice: optional(lazy(() => AdverseNotice$1)),
|
|
952
|
-
basis: required(union(lazy(() => DecisionBasis), isString)),
|
|
953
|
-
factors: optional(array(union(lazy(() => DecisionFactor), isString))),
|
|
954
|
-
madeBy: required(lazy(() => Actor)),
|
|
955
|
-
decidedAt: required(isString),
|
|
956
|
-
note: optional(isString),
|
|
957
|
-
supersededAt: optional(isString)
|
|
958
|
-
});
|
|
959
|
-
const ApplicantSummary$1 = object({
|
|
960
|
-
object: required(literal("applicant")),
|
|
961
|
-
id: required(id("apl", /^apl_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
962
|
-
role: required(isString),
|
|
963
|
-
status: required(lazy(() => ApplicantStatus)),
|
|
964
|
-
person: required(lazy(() => PersonSummary$1))
|
|
965
|
-
});
|
|
966
|
-
const ApplicationData$1 = object({
|
|
967
|
-
household: optional(object({
|
|
968
|
-
occupants: optional(array(object({
|
|
969
|
-
relationship: required(union(lazy(() => Relationship), isString)),
|
|
970
|
-
isMinor: required(isBoolean)
|
|
971
|
-
}))),
|
|
972
|
-
pets: optional(array(object({
|
|
973
|
-
kind: required(union(lazy(() => PetKind), isString)),
|
|
974
|
-
count: required(isNumber)
|
|
975
|
-
}))),
|
|
976
|
-
vehicles: optional(isNumber),
|
|
977
|
-
noticeGiven: optional(isBoolean)
|
|
978
|
-
})),
|
|
979
|
-
desiredMoveIn: optional(isString),
|
|
980
|
-
custom: optional(lazy(() => CustomBlock))
|
|
981
|
-
});
|
|
982
|
-
const PetKind = literal("dog", "cat", "other");
|
|
983
|
-
const Relationship = literal("spouse", "partner", "child", "parent", "roommate", "other");
|
|
984
|
-
const Subject$1 = object({
|
|
985
|
-
type: required(literal("property")),
|
|
986
|
-
property: required(lazy(() => Property$1)),
|
|
987
|
-
snapshotAt: required(isString)
|
|
988
|
-
});
|
|
989
|
-
const ApplicationLink$1 = object({
|
|
990
|
-
url: required(isString),
|
|
991
|
-
guarantorUrl: optional(isString)
|
|
992
|
-
});
|
|
993
|
-
const Joining = object({
|
|
994
|
-
state: required(lazy(() => JoiningState)),
|
|
995
|
-
until: required(isString)
|
|
996
|
-
});
|
|
997
|
-
const JoiningState = union(literal("open", "full", "closed"), isString);
|
|
998
|
-
const Spots = object({
|
|
999
|
-
total: required(isNumber),
|
|
1000
|
-
taken: required(isNumber)
|
|
1001
|
-
});
|
|
1002
|
-
const ApplicationCounts$1 = object({
|
|
1003
|
-
applicants: required(object({
|
|
1004
|
-
active: required(isNumber),
|
|
1005
|
-
submitted: required(isNumber),
|
|
1006
|
-
screened: required(isNumber)
|
|
1007
|
-
})),
|
|
1008
|
-
requirements: required(object({
|
|
1009
|
-
openForApplicants: required(isNumber),
|
|
1010
|
-
openForOrganization: required(isNumber)
|
|
1011
|
-
}))
|
|
1012
|
-
});
|
|
1013
|
-
const ApplicationFee = object({
|
|
1014
|
-
amount: required(lazy(() => Amount)),
|
|
1015
|
-
tax: required(lazy(() => Amount))
|
|
1016
|
-
});
|
|
1017
1055
|
const ApplicantTransitionRefusedProblem = object({
|
|
1018
1056
|
type: required(literal("https://eversa.app/problems/applicant-transition-refused")),
|
|
1019
1057
|
title: required(isString),
|
|
@@ -1031,14 +1069,6 @@ const PrimaryRequiredProblem = object({
|
|
|
1031
1069
|
detail: required(isString),
|
|
1032
1070
|
objectId: required(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
1033
1071
|
});
|
|
1034
|
-
const NoInviteChannelProblem = object({
|
|
1035
|
-
type: required(literal("https://eversa.app/problems/no-invite-channel")),
|
|
1036
|
-
title: required(isString),
|
|
1037
|
-
status: required(literal(422)),
|
|
1038
|
-
detail: required(isString),
|
|
1039
|
-
objectId: required(id("per", /^per_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
1040
|
-
});
|
|
1041
|
-
const ApplicantRole = literal("primary", "co_applicant", "guarantor");
|
|
1042
1072
|
const ApplicantList$1 = object({
|
|
1043
1073
|
object: required(literal("list")),
|
|
1044
1074
|
data: required(array(lazy(() => Applicant$1))),
|
|
@@ -1092,20 +1122,6 @@ const ApplicationSummary$1 = object({
|
|
|
1092
1122
|
updatedAt: required(isString),
|
|
1093
1123
|
applicants: required(array(lazy(() => ApplicantSummary$1)))
|
|
1094
1124
|
});
|
|
1095
|
-
const TemplateUnknownProblem = object({
|
|
1096
|
-
type: required(literal("https://eversa.app/problems/template-unknown")),
|
|
1097
|
-
title: required(isString),
|
|
1098
|
-
status: required(literal(422)),
|
|
1099
|
-
detail: required(isString),
|
|
1100
|
-
template: required(id("tpl", /^tpl_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
1101
|
-
});
|
|
1102
|
-
const PropertyArchivedProblem = object({
|
|
1103
|
-
type: required(literal("https://eversa.app/problems/property-archived")),
|
|
1104
|
-
title: required(isString),
|
|
1105
|
-
status: required(literal(409)),
|
|
1106
|
-
detail: required(isString),
|
|
1107
|
-
objectId: required(id("prop", /^prop_[0-7][0-9a-hjkmnp-tv-z]{25}$/u))
|
|
1108
|
-
});
|
|
1109
1125
|
const WebhookEndpointDisabledProblem = object({
|
|
1110
1126
|
type: required(literal("https://eversa.app/problems/webhook-endpoint-disabled")),
|
|
1111
1127
|
title: required(isString),
|
|
@@ -1144,7 +1160,7 @@ const WebhookAttempt$1 = object({
|
|
|
1144
1160
|
});
|
|
1145
1161
|
const WebhookAttemptFailure = union(literal("refused", "connection", "timeout", "invalid_status"), isString);
|
|
1146
1162
|
const WebhookDeliveryStatus = literal("pending", "succeeded", "failed");
|
|
1147
|
-
const EventType = union(literal("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"), isString);
|
|
1163
|
+
const EventType = union(literal("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"), isString);
|
|
1148
1164
|
const WebhookDeliveryPendingProblem = object({
|
|
1149
1165
|
type: required(literal("https://eversa.app/problems/webhook-delivery-pending")),
|
|
1150
1166
|
title: required(isString),
|
|
@@ -1186,7 +1202,7 @@ const WebhookEndpointWithSecret$1 = object({
|
|
|
1186
1202
|
secret: required(isString)
|
|
1187
1203
|
});
|
|
1188
1204
|
const WebhookEndpointStatus = literal("enabled", "disabled");
|
|
1189
|
-
const EnabledEvent = literal("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.*", "*");
|
|
1205
|
+
const EnabledEvent = literal("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.*", "*");
|
|
1190
1206
|
const DeletedWebhookEndpoint = object({
|
|
1191
1207
|
object: required(literal("webhook_endpoint")),
|
|
1192
1208
|
id: required(id("we", /^we_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
@@ -1232,7 +1248,7 @@ const Event$1 = object({
|
|
|
1232
1248
|
data: required(lazy(() => EventData$1)),
|
|
1233
1249
|
changes: optional(array(isString))
|
|
1234
1250
|
});
|
|
1235
|
-
const EventData$1 = union(lazy(() => EventDataApplication), lazy(() => EventDataApplicant), lazy(() => EventDataRequirement), lazy(() => EventDataConsent), lazy(() => EventDataDocument), lazy(() => EventDataScreening), lazy(() => EventDataCheck), lazy(() => EventDataScreeningReport), lazy(() => EventDataApplicationReport), lazy(() => EventDataSession), lazy(() => EventDataProperty), lazy(() => EventDataWebhookEndpoint), lazy(() => EventDataPerson), lazy(() => EventDataLegalHold), lazy(() => EventDataRightsRequest), lazy(() => EventDataConfidentialityIncident), lazy(() => EventDataTemplate), lazy(() => EventDataOrganization), lazy(() => EventDataScreeningSettings));
|
|
1251
|
+
const EventData$1 = union(lazy(() => EventDataApplication), lazy(() => EventDataApplicant), lazy(() => EventDataRequirement), lazy(() => EventDataConsent), lazy(() => EventDataDocument), lazy(() => EventDataScreening), lazy(() => EventDataCheck), lazy(() => EventDataScreeningReport), lazy(() => EventDataApplicationReport), lazy(() => EventDataSession), lazy(() => EventDataProperty), lazy(() => EventDataWebhookEndpoint), lazy(() => EventDataPerson), lazy(() => EventDataLegalHold), lazy(() => EventDataRightsRequest), lazy(() => EventDataSignTemplate), lazy(() => EventDataSignEnvelope), lazy(() => EventDataConfidentialityIncident), lazy(() => EventDataTemplate), lazy(() => EventDataOrganization), lazy(() => EventDataScreeningSettings));
|
|
1236
1252
|
const EventNotFoundProblem = object({
|
|
1237
1253
|
type: required(literal("https://eversa.app/problems/event-not-found")),
|
|
1238
1254
|
title: required(isString),
|
|
@@ -1394,6 +1410,11 @@ const EventActorPlatform = object({
|
|
|
1394
1410
|
id: optional(isString),
|
|
1395
1411
|
via: required(lazy(() => ActorVia))
|
|
1396
1412
|
});
|
|
1413
|
+
const EventActorSigner = object({
|
|
1414
|
+
type: required(literal("signer")),
|
|
1415
|
+
id: optional(isString),
|
|
1416
|
+
via: required(lazy(() => ActorVia))
|
|
1417
|
+
});
|
|
1397
1418
|
const EventDataApplication = object({
|
|
1398
1419
|
object: required(literal("application")),
|
|
1399
1420
|
id: required(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
@@ -1529,6 +1550,24 @@ const EventDataRightsRequest = object({
|
|
|
1529
1550
|
sessionId: optional(id("sess", /^sess_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1530
1551
|
reference: optional(isString)
|
|
1531
1552
|
});
|
|
1553
|
+
const EventDataSignTemplate = object({
|
|
1554
|
+
object: required(literal("sign_template")),
|
|
1555
|
+
id: required(id("sgtp", /^sgtp_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1556
|
+
applicationId: optional(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1557
|
+
applicantId: optional(id("apl", /^apl_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1558
|
+
screeningId: optional(id("scr", /^scr_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1559
|
+
sessionId: optional(id("sess", /^sess_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1560
|
+
reference: optional(isString)
|
|
1561
|
+
});
|
|
1562
|
+
const EventDataSignEnvelope = object({
|
|
1563
|
+
object: required(literal("sign_envelope")),
|
|
1564
|
+
id: required(id("sgen", /^sgen_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1565
|
+
applicationId: optional(id("app", /^app_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1566
|
+
applicantId: optional(id("apl", /^apl_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1567
|
+
screeningId: optional(id("scr", /^scr_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1568
|
+
sessionId: optional(id("sess", /^sess_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1569
|
+
reference: optional(isString)
|
|
1570
|
+
});
|
|
1532
1571
|
const EventDataConfidentialityIncident = object({
|
|
1533
1572
|
object: required(literal("confidentiality_incident")),
|
|
1534
1573
|
id: required(id("inc", /^inc_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
@@ -1565,7 +1604,7 @@ const EventDataScreeningSettings = object({
|
|
|
1565
1604
|
sessionId: optional(id("sess", /^sess_[0-7][0-9a-hjkmnp-tv-z]{25}$/u)),
|
|
1566
1605
|
reference: optional(isString)
|
|
1567
1606
|
});
|
|
1568
|
-
const Problem$1 = union(lazy(() => ValidationFailedProblem), lazy(() => MalformedRequestProblem), lazy(() => InsufficientScopeProblem), lazy(() => SessionRequiredProblem), lazy(() => RateLimitedProblem), lazy(() => InvalidApiKeyProblem), lazy(() => MemberNotFoundProblem), lazy(() => RequirementTransitionRefusedProblem), lazy(() => RequirementNotFoundProblem), lazy(() => ApplicationNotFoundProblem), lazy(() => ApplicantDepartedProblem), lazy(() => ApplicationEndedProblem), lazy(() => RequirementNotPerformableProblem), lazy(() => ApplicationLimitReachedProblem), lazy(() => ApplicantNotFoundProblem), lazy(() => ScreeningNotFoundProblem), lazy(() => ScreeningLimitReachedProblem), lazy(() => CheckTypeNotServedProblem), lazy(() => CheckTypeNotPricedProblem), lazy(() => PersonNeedsMissingProblem), lazy(() => ExternalIdTakenProblem), lazy(() => PersonNotFoundProblem), lazy(() => ApplicationTypeUnavailableProblem), lazy(() =>
|
|
1607
|
+
const Problem$1 = union(lazy(() => ValidationFailedProblem), lazy(() => MalformedRequestProblem), lazy(() => InsufficientScopeProblem), lazy(() => SessionRequiredProblem), lazy(() => RateLimitedProblem), lazy(() => InvalidApiKeyProblem), lazy(() => EmbedOriginsUnsetProblem), lazy(() => MemberNotFoundProblem), lazy(() => RequirementTransitionRefusedProblem), lazy(() => RequirementNotFoundProblem), lazy(() => ApplicationNotFoundProblem), lazy(() => ApplicantDepartedProblem), lazy(() => ApplicationEndedProblem), lazy(() => RequirementNotPerformableProblem), lazy(() => ApplicationLimitReachedProblem), lazy(() => ApplicantNotFoundProblem), lazy(() => ScreeningNotFoundProblem), lazy(() => ScreeningLimitReachedProblem), lazy(() => CheckTypeNotServedProblem), lazy(() => CheckTypeNotPricedProblem), lazy(() => PersonNeedsMissingProblem), lazy(() => ExternalIdTakenProblem), lazy(() => PersonNotFoundProblem), lazy(() => ApplicationTypeUnavailableProblem), lazy(() => PaymentProcessorUnavailableProblem), lazy(() => NoInviteChannelProblem), lazy(() => TemplateUnknownProblem), lazy(() => ApplicationFullProblem), lazy(() => PropertyArchivedProblem), lazy(() => PropertyNotFoundProblem), lazy(() => ApplicantTransitionRefusedProblem), lazy(() => PrimaryRequiredProblem), lazy(() => RoleMismatchProblem), lazy(() => CloseReasonRefusedProblem), lazy(() => WebhookEndpointDisabledProblem), lazy(() => WebhookEndpointNotFoundProblem), lazy(() => WebhookDeliveryPendingProblem), lazy(() => WebhookDeliveryNotFoundProblem), lazy(() => SecretRotationConflictProblem), lazy(() => ApiVersionNotReleasedProblem), lazy(() => EventNotFoundProblem), lazy(() => ConsentNotFoundProblem), lazy(() => ContentTooLargeProblem), lazy(() => UnsupportedMediaTypeProblem), lazy(() => InternalErrorProblem), lazy(() => PreconditionFailedProblem), lazy(() => ObjectBusyProblem), lazy(() => InvalidVersionProblem), lazy(() => InvalidTransformProblem), lazy(() => IdempotencyKeyInvalidProblem), lazy(() => IdempotencyKeyInFlightProblem), lazy(() => IdempotencyKeyAnswerWithheldProblem), lazy(() => IdempotencyKeyReusedProblem));
|
|
1569
1608
|
// src/generated/names.ts
|
|
1570
1609
|
const Check = { fields: {
|
|
1571
1610
|
screeningId: "screening_id",
|
|
@@ -1583,6 +1622,10 @@ const Check = { fields: {
|
|
|
1583
1622
|
updatedAt: "updated_at"
|
|
1584
1623
|
} };
|
|
1585
1624
|
const CheckCharge = { fields: { chargedAt: "charged_at" } };
|
|
1625
|
+
const IssuedEmbedSession = { fields: {
|
|
1626
|
+
expiresAt: "expires_at",
|
|
1627
|
+
clientSecret: "client_secret"
|
|
1628
|
+
} };
|
|
1586
1629
|
const Organization = { fields: {
|
|
1587
1630
|
createdAt: "created_at",
|
|
1588
1631
|
updatedAt: "updated_at"
|
|
@@ -1684,31 +1727,6 @@ const CheckCounts = { fields: {
|
|
|
1684
1727
|
needsReview: "needs_review"
|
|
1685
1728
|
} };
|
|
1686
1729
|
const PersonSummary = { fields: { externalId: "external_id" } };
|
|
1687
|
-
const ScreeningList = { fields: {
|
|
1688
|
-
data: ["data", { items: () => ScreeningSummary }],
|
|
1689
|
-
hasMore: "has_more",
|
|
1690
|
-
nextCursor: "next_cursor"
|
|
1691
|
-
} };
|
|
1692
|
-
const ScreeningSummary = { fields: {
|
|
1693
|
-
externalId: "external_id",
|
|
1694
|
-
person: ["person", () => PersonSummary],
|
|
1695
|
-
checkCounts: ["check_counts", () => CheckCounts],
|
|
1696
|
-
applicationId: "application_id",
|
|
1697
|
-
applicantId: "applicant_id",
|
|
1698
|
-
completedAt: "completed_at",
|
|
1699
|
-
createdAt: "created_at",
|
|
1700
|
-
updatedAt: "updated_at"
|
|
1701
|
-
} };
|
|
1702
|
-
const SearchScreenings = { fields: {
|
|
1703
|
-
checkStatus: "check_status",
|
|
1704
|
-
personId: "person_id",
|
|
1705
|
-
applicationId: "application_id",
|
|
1706
|
-
externalId: "external_id",
|
|
1707
|
-
createdAfter: "created_after",
|
|
1708
|
-
createdBefore: "created_before",
|
|
1709
|
-
updatedAfter: "updated_after",
|
|
1710
|
-
updatedBefore: "updated_before"
|
|
1711
|
-
} };
|
|
1712
1730
|
const NewCheckOrder = { fields: { includeMunicipal: "include_municipal" } };
|
|
1713
1731
|
const ReferencesInput = { fields: {
|
|
1714
1732
|
workplace: ["workplace", { fields: {
|
|
@@ -1729,12 +1747,38 @@ const PostalAddressInput = { fields: {
|
|
|
1729
1747
|
administrativeArea: "administrative_area",
|
|
1730
1748
|
addressLines: "address_lines"
|
|
1731
1749
|
} };
|
|
1732
|
-
const CreateScreening = { fields: {
|
|
1733
|
-
person: ["person", () => PersonInput],
|
|
1734
|
-
checks: ["checks", { items: () => NewCheckOrder }],
|
|
1750
|
+
const CreateScreening = { fields: {
|
|
1751
|
+
person: ["person", () => PersonInput],
|
|
1752
|
+
checks: ["checks", { items: () => NewCheckOrder }],
|
|
1753
|
+
externalId: "external_id",
|
|
1754
|
+
consent: ["consent", () => ConsentAttestation],
|
|
1755
|
+
identity: ["identity", () => IdentityAttestation]
|
|
1756
|
+
} };
|
|
1757
|
+
const AddressPeriod = { fields: { address: ["address", () => PostalAddress] } };
|
|
1758
|
+
const ScreeningList = { fields: {
|
|
1759
|
+
data: ["data", { items: () => ScreeningSummary }],
|
|
1760
|
+
hasMore: "has_more",
|
|
1761
|
+
nextCursor: "next_cursor"
|
|
1762
|
+
} };
|
|
1763
|
+
const ScreeningSummary = { fields: {
|
|
1735
1764
|
externalId: "external_id",
|
|
1736
|
-
|
|
1737
|
-
|
|
1765
|
+
person: ["person", () => PersonSummary],
|
|
1766
|
+
checkCounts: ["check_counts", () => CheckCounts],
|
|
1767
|
+
applicationId: "application_id",
|
|
1768
|
+
applicantId: "applicant_id",
|
|
1769
|
+
completedAt: "completed_at",
|
|
1770
|
+
createdAt: "created_at",
|
|
1771
|
+
updatedAt: "updated_at"
|
|
1772
|
+
} };
|
|
1773
|
+
const SearchScreenings = { fields: {
|
|
1774
|
+
checkStatus: "check_status",
|
|
1775
|
+
personId: "person_id",
|
|
1776
|
+
applicationId: "application_id",
|
|
1777
|
+
externalId: "external_id",
|
|
1778
|
+
createdAfter: "created_after",
|
|
1779
|
+
createdBefore: "created_before",
|
|
1780
|
+
updatedAfter: "updated_after",
|
|
1781
|
+
updatedBefore: "updated_before"
|
|
1738
1782
|
} };
|
|
1739
1783
|
const Person = { fields: {
|
|
1740
1784
|
externalId: "external_id",
|
|
@@ -1751,7 +1795,6 @@ const Person = { fields: {
|
|
|
1751
1795
|
previousAddressUnavailableReason: "previous_address_unavailable_reason",
|
|
1752
1796
|
references: ["references", () => References]
|
|
1753
1797
|
} };
|
|
1754
|
-
const AddressPeriod = { fields: { address: ["address", () => PostalAddress] } };
|
|
1755
1798
|
const PersonList = { fields: {
|
|
1756
1799
|
data: ["data", { items: () => PersonListItem }],
|
|
1757
1800
|
hasMore: "has_more",
|
|
@@ -1770,90 +1813,6 @@ const SearchPersons = { fields: {
|
|
|
1770
1813
|
updatedAfter: "updated_after",
|
|
1771
1814
|
updatedBefore: "updated_before"
|
|
1772
1815
|
} };
|
|
1773
|
-
const Property = { fields: {
|
|
1774
|
-
externalId: "external_id",
|
|
1775
|
-
address: ["address", () => PostalAddress],
|
|
1776
|
-
isAffordable: "is_affordable",
|
|
1777
|
-
floorArea: "floor_area",
|
|
1778
|
-
parkingSpaces: "parking_spaces",
|
|
1779
|
-
archivedAt: "archived_at",
|
|
1780
|
-
createdAt: "created_at",
|
|
1781
|
-
updatedAt: "updated_at"
|
|
1782
|
-
} };
|
|
1783
|
-
const PostalAddress = { fields: {
|
|
1784
|
-
regionCode: "region_code",
|
|
1785
|
-
languageCode: "language_code",
|
|
1786
|
-
postalCode: "postal_code",
|
|
1787
|
-
sortingCode: "sorting_code",
|
|
1788
|
-
administrativeArea: "administrative_area",
|
|
1789
|
-
addressLines: "address_lines"
|
|
1790
|
-
} };
|
|
1791
|
-
const Applicant = { fields: {
|
|
1792
|
-
applicationId: "application_id",
|
|
1793
|
-
externalId: "external_id",
|
|
1794
|
-
person: ["person", () => PersonSummary],
|
|
1795
|
-
invitedBy: "invited_by",
|
|
1796
|
-
possibleDuplicateOf: "possible_duplicate_of",
|
|
1797
|
-
sessionId: "session_id",
|
|
1798
|
-
data: ["data", () => ApplicantData],
|
|
1799
|
-
documents: ["documents", { items: () => Document }],
|
|
1800
|
-
consents: ["consents", { items: () => Consent }],
|
|
1801
|
-
submittedAt: "submitted_at",
|
|
1802
|
-
createdAt: "created_at",
|
|
1803
|
-
updatedAt: "updated_at"
|
|
1804
|
-
} };
|
|
1805
|
-
const ApplicantData = { fields: {
|
|
1806
|
-
residenceHistory: ["residence_history", { items: () => AddressPeriod }],
|
|
1807
|
-
income: ["income", { items: { fields: {
|
|
1808
|
-
hoursPerWeek: "hours_per_week",
|
|
1809
|
-
paidBy: "paid_by"
|
|
1810
|
-
} } }],
|
|
1811
|
-
references: ["references", () => References],
|
|
1812
|
-
currentLandlord: "current_landlord",
|
|
1813
|
-
currentRent: "current_rent",
|
|
1814
|
-
livingArrangement: "living_arrangement",
|
|
1815
|
-
notifyChannels: "notify_channels",
|
|
1816
|
-
representative: ["representative", () => ApplicantRepresentative],
|
|
1817
|
-
residency: ["residency", { fields: { timeInCanada: "time_in_canada" } }],
|
|
1818
|
-
situationDetails: ["situation_details", { fields: {
|
|
1819
|
-
salaried: ["salaried", { fields: {
|
|
1820
|
-
annualIncome: "annual_income",
|
|
1821
|
-
startedOn: "started_on"
|
|
1822
|
-
} }],
|
|
1823
|
-
selfEmployed: ["self_employed", { fields: {
|
|
1824
|
-
annualNetIncome: "annual_net_income",
|
|
1825
|
-
businessName: "business_name",
|
|
1826
|
-
startedOn: "started_on"
|
|
1827
|
-
} }],
|
|
1828
|
-
retired: ["retired", { fields: { annualIncome: "annual_income" } }],
|
|
1829
|
-
student: ["student", { fields: {
|
|
1830
|
-
studyLoad: "study_load",
|
|
1831
|
-
fundingSources: "funding_sources",
|
|
1832
|
-
fundingOther: "funding_other",
|
|
1833
|
-
partTimeIncome: "part_time_income"
|
|
1834
|
-
} }],
|
|
1835
|
-
newcomer: ["newcomer", { fields: {
|
|
1836
|
-
arrivedOn: "arrived_on",
|
|
1837
|
-
annualIncome: "annual_income"
|
|
1838
|
-
} }],
|
|
1839
|
-
other: ["other", { fields: { annualIncome: "annual_income" } }]
|
|
1840
|
-
} }]
|
|
1841
|
-
} };
|
|
1842
|
-
const ApplicantRepresentative = { fields: {
|
|
1843
|
-
givenName: "given_name",
|
|
1844
|
-
familyName: "family_name"
|
|
1845
|
-
} };
|
|
1846
|
-
const References = { fields: {
|
|
1847
|
-
workplace: ["workplace", { fields: {
|
|
1848
|
-
companyName: "company_name",
|
|
1849
|
-
jobRole: "job_role",
|
|
1850
|
-
employmentType: "employment_type"
|
|
1851
|
-
} }],
|
|
1852
|
-
workplaceUnavailable: "workplace_unavailable",
|
|
1853
|
-
workplaceUnavailableReason: "workplace_unavailable_reason",
|
|
1854
|
-
landlordUnavailable: "landlord_unavailable",
|
|
1855
|
-
landlordUnavailableReason: "landlord_unavailable_reason"
|
|
1856
|
-
} };
|
|
1857
1816
|
const Application = { fields: {
|
|
1858
1817
|
externalId: "external_id",
|
|
1859
1818
|
applicationFee: "application_fee",
|
|
@@ -1909,15 +1868,40 @@ const Subject = { fields: {
|
|
|
1909
1868
|
property: ["property", () => Property],
|
|
1910
1869
|
snapshotAt: "snapshot_at"
|
|
1911
1870
|
} };
|
|
1871
|
+
const Property = { fields: {
|
|
1872
|
+
externalId: "external_id",
|
|
1873
|
+
address: ["address", () => PostalAddress],
|
|
1874
|
+
isAffordable: "is_affordable",
|
|
1875
|
+
floorArea: "floor_area",
|
|
1876
|
+
parkingSpaces: "parking_spaces",
|
|
1877
|
+
archivedAt: "archived_at",
|
|
1878
|
+
createdAt: "created_at",
|
|
1879
|
+
updatedAt: "updated_at"
|
|
1880
|
+
} };
|
|
1881
|
+
const PostalAddress = { fields: {
|
|
1882
|
+
regionCode: "region_code",
|
|
1883
|
+
languageCode: "language_code",
|
|
1884
|
+
postalCode: "postal_code",
|
|
1885
|
+
sortingCode: "sorting_code",
|
|
1886
|
+
administrativeArea: "administrative_area",
|
|
1887
|
+
addressLines: "address_lines"
|
|
1888
|
+
} };
|
|
1912
1889
|
const ApplicationLink = { fields: { guarantorUrl: "guarantor_url" } };
|
|
1913
1890
|
const ApplicationCounts = { fields: { requirements: ["requirements", { fields: {
|
|
1914
1891
|
openForApplicants: "open_for_applicants",
|
|
1915
1892
|
openForOrganization: "open_for_organization"
|
|
1916
1893
|
} }] } };
|
|
1917
|
-
const
|
|
1918
|
-
data: ["data",
|
|
1919
|
-
|
|
1920
|
-
|
|
1894
|
+
const CreateApplication = { fields: {
|
|
1895
|
+
data: ["data", () => ApplicationDataInput],
|
|
1896
|
+
residentSpots: "resident_spots",
|
|
1897
|
+
joinUntil: "join_until",
|
|
1898
|
+
externalId: "external_id",
|
|
1899
|
+
applicants: ["applicants", { items: () => InvitedApplicantInput }]
|
|
1900
|
+
} };
|
|
1901
|
+
const InvitedApplicantInput = { fields: {
|
|
1902
|
+
person: ["person", () => PersonInput],
|
|
1903
|
+
data: ["data", () => ApplicantDataInput],
|
|
1904
|
+
externalId: "external_id"
|
|
1921
1905
|
} };
|
|
1922
1906
|
const ApplicantDataInput = { fields: {
|
|
1923
1907
|
income: ["income", { items: { fields: {
|
|
@@ -1964,6 +1948,84 @@ const PersonInput = { fields: {
|
|
|
1964
1948
|
previousAddressUnavailableReason: "previous_address_unavailable_reason",
|
|
1965
1949
|
references: ["references", () => ReferencesInput]
|
|
1966
1950
|
} };
|
|
1951
|
+
const ApplicationDataInput = { fields: {
|
|
1952
|
+
household: ["household", { fields: {
|
|
1953
|
+
occupants: ["occupants", { items: { fields: { isMinor: "is_minor" } } }],
|
|
1954
|
+
noticeGiven: "notice_given"
|
|
1955
|
+
} }],
|
|
1956
|
+
desiredMoveIn: "desired_move_in"
|
|
1957
|
+
} };
|
|
1958
|
+
const Applicant = { fields: {
|
|
1959
|
+
applicationId: "application_id",
|
|
1960
|
+
externalId: "external_id",
|
|
1961
|
+
person: ["person", () => PersonSummary],
|
|
1962
|
+
invitedBy: "invited_by",
|
|
1963
|
+
possibleDuplicateOf: "possible_duplicate_of",
|
|
1964
|
+
sessionId: "session_id",
|
|
1965
|
+
data: ["data", () => ApplicantData],
|
|
1966
|
+
documents: ["documents", { items: () => Document }],
|
|
1967
|
+
consents: ["consents", { items: () => Consent }],
|
|
1968
|
+
submittedAt: "submitted_at",
|
|
1969
|
+
createdAt: "created_at",
|
|
1970
|
+
updatedAt: "updated_at"
|
|
1971
|
+
} };
|
|
1972
|
+
const ApplicantData = { fields: {
|
|
1973
|
+
residenceHistory: ["residence_history", { items: () => AddressPeriod }],
|
|
1974
|
+
income: ["income", { items: { fields: {
|
|
1975
|
+
hoursPerWeek: "hours_per_week",
|
|
1976
|
+
paidBy: "paid_by"
|
|
1977
|
+
} } }],
|
|
1978
|
+
references: ["references", () => References],
|
|
1979
|
+
currentLandlord: "current_landlord",
|
|
1980
|
+
currentRent: "current_rent",
|
|
1981
|
+
livingArrangement: "living_arrangement",
|
|
1982
|
+
notifyChannels: "notify_channels",
|
|
1983
|
+
representative: ["representative", () => ApplicantRepresentative],
|
|
1984
|
+
residency: ["residency", { fields: { timeInCanada: "time_in_canada" } }],
|
|
1985
|
+
situationDetails: ["situation_details", { fields: {
|
|
1986
|
+
salaried: ["salaried", { fields: {
|
|
1987
|
+
annualIncome: "annual_income",
|
|
1988
|
+
startedOn: "started_on"
|
|
1989
|
+
} }],
|
|
1990
|
+
selfEmployed: ["self_employed", { fields: {
|
|
1991
|
+
annualNetIncome: "annual_net_income",
|
|
1992
|
+
businessName: "business_name",
|
|
1993
|
+
startedOn: "started_on"
|
|
1994
|
+
} }],
|
|
1995
|
+
retired: ["retired", { fields: { annualIncome: "annual_income" } }],
|
|
1996
|
+
student: ["student", { fields: {
|
|
1997
|
+
studyLoad: "study_load",
|
|
1998
|
+
fundingSources: "funding_sources",
|
|
1999
|
+
fundingOther: "funding_other",
|
|
2000
|
+
partTimeIncome: "part_time_income"
|
|
2001
|
+
} }],
|
|
2002
|
+
newcomer: ["newcomer", { fields: {
|
|
2003
|
+
arrivedOn: "arrived_on",
|
|
2004
|
+
annualIncome: "annual_income"
|
|
2005
|
+
} }],
|
|
2006
|
+
other: ["other", { fields: { annualIncome: "annual_income" } }]
|
|
2007
|
+
} }]
|
|
2008
|
+
} };
|
|
2009
|
+
const ApplicantRepresentative = { fields: {
|
|
2010
|
+
givenName: "given_name",
|
|
2011
|
+
familyName: "family_name"
|
|
2012
|
+
} };
|
|
2013
|
+
const References = { fields: {
|
|
2014
|
+
workplace: ["workplace", { fields: {
|
|
2015
|
+
companyName: "company_name",
|
|
2016
|
+
jobRole: "job_role",
|
|
2017
|
+
employmentType: "employment_type"
|
|
2018
|
+
} }],
|
|
2019
|
+
workplaceUnavailable: "workplace_unavailable",
|
|
2020
|
+
workplaceUnavailableReason: "workplace_unavailable_reason",
|
|
2021
|
+
landlordUnavailable: "landlord_unavailable",
|
|
2022
|
+
landlordUnavailableReason: "landlord_unavailable_reason"
|
|
2023
|
+
} };
|
|
2024
|
+
const ApplicantList = { fields: {
|
|
2025
|
+
data: ["data", { items: () => Applicant }],
|
|
2026
|
+
hasMore: "has_more",
|
|
2027
|
+
nextCursor: "next_cursor"
|
|
2028
|
+
} };
|
|
1967
2029
|
const AddApplicant = { fields: {
|
|
1968
2030
|
person: ["person", () => PersonInput],
|
|
1969
2031
|
data: ["data", () => ApplicantDataInput],
|
|
@@ -1999,25 +2061,6 @@ const IdentityAttestation = { fields: {
|
|
|
1999
2061
|
confirmedAt: "confirmed_at"
|
|
2000
2062
|
} };
|
|
2001
2063
|
const ConsentAttestation = { fields: { collectedAt: "collected_at" } };
|
|
2002
|
-
const ApplicationDataInput = { fields: {
|
|
2003
|
-
household: ["household", { fields: {
|
|
2004
|
-
occupants: ["occupants", { items: { fields: { isMinor: "is_minor" } } }],
|
|
2005
|
-
noticeGiven: "notice_given"
|
|
2006
|
-
} }],
|
|
2007
|
-
desiredMoveIn: "desired_move_in"
|
|
2008
|
-
} };
|
|
2009
|
-
const CreateApplication = { fields: {
|
|
2010
|
-
data: ["data", () => ApplicationDataInput],
|
|
2011
|
-
residentSpots: "resident_spots",
|
|
2012
|
-
joinUntil: "join_until",
|
|
2013
|
-
externalId: "external_id",
|
|
2014
|
-
applicants: ["applicants", { items: () => InvitedApplicantInput }]
|
|
2015
|
-
} };
|
|
2016
|
-
const InvitedApplicantInput = { fields: {
|
|
2017
|
-
person: ["person", () => PersonInput],
|
|
2018
|
-
data: ["data", () => ApplicantDataInput],
|
|
2019
|
-
externalId: "external_id"
|
|
2020
|
-
} };
|
|
2021
2064
|
const WebhookDelivery = { fields: {
|
|
2022
2065
|
endpointId: "endpoint_id",
|
|
2023
2066
|
webhookId: "webhook_id",
|
|
@@ -2513,6 +2556,17 @@ const OPERATIONS = {
|
|
|
2513
2556
|
ifMatch: false,
|
|
2514
2557
|
response: Organization$1,
|
|
2515
2558
|
responseNames: Organization
|
|
2559
|
+
},
|
|
2560
|
+
createEmbedSession: {
|
|
2561
|
+
method: "POST",
|
|
2562
|
+
path: "/api/embed-sessions",
|
|
2563
|
+
query: {},
|
|
2564
|
+
body: "application/json",
|
|
2565
|
+
requestNames: null,
|
|
2566
|
+
idempotencyKey: true,
|
|
2567
|
+
ifMatch: false,
|
|
2568
|
+
response: IssuedEmbedSession$1,
|
|
2569
|
+
responseNames: IssuedEmbedSession
|
|
2516
2570
|
}
|
|
2517
2571
|
};
|
|
2518
2572
|
/** Each resource of the API, one method per operation. */
|
|
@@ -2653,7 +2707,7 @@ var EversaResources = class {
|
|
|
2653
2707
|
/**
|
|
2654
2708
|
* Create an application
|
|
2655
2709
|
*
|
|
2656
|
-
* 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
|
|
2710
|
+
* 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.
|
|
2657
2711
|
*/
|
|
2658
2712
|
create: (propertyId, body, options) => this.#call.json(OPERATIONS.createApplication, {
|
|
2659
2713
|
path: { id: propertyId },
|
|
@@ -2871,13 +2925,49 @@ retrieve: (options) => this.#call.json(OPERATIONS.retrieveCurrentApiKey, { optio
|
|
|
2871
2925
|
* The organization of the request: the one its key's app belongs to, or the one a member's request names. Every role reads it.
|
|
2872
2926
|
*/
|
|
2873
2927
|
retrieve: (options) => this.#call.json(OPERATIONS.retrieveOrganization, { options }) };
|
|
2928
|
+
embedSessions = {
|
|
2929
|
+
/**
|
|
2930
|
+
* Create an embed session
|
|
2931
|
+
*
|
|
2932
|
+
* 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.
|
|
2933
|
+
*
|
|
2934
|
+
* 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.
|
|
2935
|
+
*/
|
|
2936
|
+
create: (body, options) => this.#call.json(OPERATIONS.createEmbedSession, {
|
|
2937
|
+
body,
|
|
2938
|
+
options
|
|
2939
|
+
}) };
|
|
2874
2940
|
};
|
|
2875
2941
|
// ../versions/src/model/rules/version_header.rule.ts
|
|
2876
2942
|
const VERSION_HEADER = "Eversa-Version";
|
|
2877
|
-
//
|
|
2943
|
+
// ../../../node_modules/.pnpm/@eversa-app-limited+std@0.1.3_effect@4.1.2/node_modules/@eversa-app-limited/std/dist/http/fields.js
|
|
2944
|
+
/**
|
|
2945
|
+
* The names of the HTTP fields this package reads and writes, as the IANA HTTP Field Name Registry spells them
|
|
2946
|
+
* (`FIELD_NAMES`) and in the lowercase a server's parsed headers key them by (`FIELD_KEYS`).
|
|
2947
|
+
*
|
|
2948
|
+
* Reach for it rather than a header name typed as a string literal. It imports nothing, so it needs no `effect`.
|
|
2949
|
+
*
|
|
2950
|
+
* @example
|
|
2951
|
+
* ```ts
|
|
2952
|
+
* import { FIELD_KEYS, FIELD_NAMES } from "@eversa/std/http/fields"
|
|
2953
|
+
*
|
|
2954
|
+
* console.log(FIELD_NAMES.idempotencyKey, FIELD_KEYS.idempotencyKey)
|
|
2955
|
+
* // => "Idempotency-Key" "idempotency-key"
|
|
2956
|
+
* ```
|
|
2957
|
+
*
|
|
2958
|
+
* @module
|
|
2959
|
+
*/
|
|
2878
2960
|
/**
|
|
2879
2961
|
* The HTTP fields this package reads and writes, as the IANA HTTP Field Name Registry spells them: for a document (the
|
|
2880
2962
|
* API reference) and for a header record a client normalizes itself (`Headers`, Effect's response headers).
|
|
2963
|
+
*
|
|
2964
|
+
* @example
|
|
2965
|
+
* ```ts
|
|
2966
|
+
* import { FIELD_NAMES } from "@eversa/std/http/fields"
|
|
2967
|
+
*
|
|
2968
|
+
* console.log(FIELD_NAMES.etag, FIELD_NAMES.cdnCacheControl)
|
|
2969
|
+
* // => "ETag" "CDN-Cache-Control"
|
|
2970
|
+
* ```
|
|
2881
2971
|
*/
|
|
2882
2972
|
const FIELD_NAMES = {
|
|
2883
2973
|
cacheControl: "Cache-Control",
|
|
@@ -2976,6 +3066,25 @@ const pagePromise = (first, next) => Object.assign(first, { async *[Symbol.async
|
|
|
2976
3066
|
}
|
|
2977
3067
|
} });
|
|
2978
3068
|
// src/transport.ts
|
|
3069
|
+
/**
|
|
3070
|
+
* What a request sends and what it says it is. A JSON body is named by the operation and written from the caller's own
|
|
3071
|
+
* member names; a body of bytes is a `Blob`, whose own type says what it is, checked here against the types the
|
|
3072
|
+
* operation takes so a wrong one is refused in the caller's own stack rather than by a 415 from the API.
|
|
3073
|
+
*/
|
|
3074
|
+
const sendableBody = (operation, value) => {
|
|
3075
|
+
if (operation.body === null) return null;
|
|
3076
|
+
if (typeof operation.body === "string") return {
|
|
3077
|
+
body: JSON.stringify(toWire(operation.requestNames, value)),
|
|
3078
|
+
contentType: operation.body
|
|
3079
|
+
};
|
|
3080
|
+
const types = operation.body.join(", ");
|
|
3081
|
+
if (!(value instanceof Blob)) throw new EversaError(`this operation takes a Blob or a File (${types}) as its body`);
|
|
3082
|
+
if (!operation.body.includes(value.type)) throw new EversaError(`a body of ${value.type === "" ? "no media type" : value.type} is not one this operation takes (${types})`);
|
|
3083
|
+
return {
|
|
3084
|
+
body: value,
|
|
3085
|
+
contentType: value.type
|
|
3086
|
+
};
|
|
3087
|
+
};
|
|
2979
3088
|
/** RFC 9110: these methods mean the same however many times they are sent. */
|
|
2980
3089
|
const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set([
|
|
2981
3090
|
"GET",
|
|
@@ -2992,7 +3101,7 @@ const TOO_MANY_REQUESTS = 429;
|
|
|
2992
3101
|
const MAX_DELAY_MS = 6e4;
|
|
2993
3102
|
const backoff = (attempt) => Math.min(500 * 2 ** attempt, 8e3);
|
|
2994
3103
|
/**
|
|
2995
|
-
* RFC 9110 section 10.2.3: `Retry-After` in seconds, as the API writes it (`@std/http`); an HTTP date, which it never
|
|
3104
|
+
* RFC 9110 section 10.2.3: `Retry-After` in seconds, as the API writes it (`@eversa/std/http`); an HTTP date, which it never
|
|
2996
3105
|
* writes, falls back to the backoff.
|
|
2997
3106
|
*/
|
|
2998
3107
|
const retryAfter = (response) => {
|
|
@@ -3025,7 +3134,7 @@ var Caller = class {
|
|
|
3025
3134
|
constructor(apiKey, options) {
|
|
3026
3135
|
if (apiKey === "") throw new EversaError("an API key is required: your secret (sk_) or restricted (rk_) key");
|
|
3027
3136
|
this.#apiKey = apiKey;
|
|
3028
|
-
this.#baseUrl = options.baseUrl ?? "https://
|
|
3137
|
+
this.#baseUrl = options.baseUrl ?? "https://www.use-eversa.tech";
|
|
3029
3138
|
this.#fetch = options.fetch ?? ((request) => fetch(request));
|
|
3030
3139
|
this.#maxRetries = options.maxRetries ?? 2;
|
|
3031
3140
|
}
|
|
@@ -3054,12 +3163,13 @@ var Caller = class {
|
|
|
3054
3163
|
[VERSION_HEADER]: API_VERSION,
|
|
3055
3164
|
Accept: "application/json"
|
|
3056
3165
|
});
|
|
3057
|
-
|
|
3166
|
+
const sends = sendableBody(operation, input.body);
|
|
3167
|
+
if (sends !== null) headers.set("Content-Type", sends.contentType);
|
|
3058
3168
|
if (operation.idempotencyKey) headers.set(FIELD_NAMES.idempotencyKey, input.options?.idempotencyKey ?? crypto.randomUUID());
|
|
3059
3169
|
const ifMatch = input.options?.ifMatch;
|
|
3060
3170
|
if (operation.ifMatch && ifMatch !== void 0) headers.set(FIELD_NAMES.ifMatch, ifMatch);
|
|
3061
3171
|
const url = urlOf(this.#baseUrl, operation, input);
|
|
3062
|
-
const body =
|
|
3172
|
+
const body = sends?.body ?? null;
|
|
3063
3173
|
const signal = input.options?.signal ?? null;
|
|
3064
3174
|
const safe = IDEMPOTENT_METHODS.has(operation.method) || headers.has(FIELD_NAMES.idempotencyKey) || headers.has(FIELD_NAMES.ifMatch);
|
|
3065
3175
|
for (let attempt = 0;; attempt += 1) {
|
|
@@ -3082,7 +3192,7 @@ var Caller = class {
|
|
|
3082
3192
|
}
|
|
3083
3193
|
}
|
|
3084
3194
|
};
|
|
3085
|
-
//
|
|
3195
|
+
// ../../../node_modules/.pnpm/@eversa-app-limited+kit@0.9.0_36ac5eb1b0b91bc348a77e2131a2587f/node_modules/@eversa-app-limited/kit/dist/webhooks/standard-webhooks.js
|
|
3086
3196
|
/** The prefix of a signing secret, as Standard Webhooks writes one: `whsec_` and the base64 key. */
|
|
3087
3197
|
const SECRET_PREFIX = "whsec_";
|
|
3088
3198
|
const keyOf = (secret) => Buffer.from(secret.startsWith(SECRET_PREFIX) ? secret.slice(6) : secret, "base64");
|