@envoy/envoy-integrations-sdk
- AgreementAttributes
- CompanyAttributes
- EmployeeAttributes
- EmployeeFilterFields
- FlowAttributes
- FlowFilterFields
- InviteAttributes
- InviteCreationAttributes
- InviteFilterFields
- LocationAttributes
- LocationFilterFields
- SignInFieldAttributes
- AgreementModel
- AgreementPageAttributes
- AgreementPageModel
- AgreementPageRelationships
- AgreementRelationships
- CompanyModel
- CompanyRelationships
- EmployeeModel
- EmployeeRelationships
- EmployeeSortFields
- FlowModel
- FlowRelationships
- FlowSortFields
- InviteCreationModel
- InviteModel
- InviteRelationships
- InviteSortFields
- LocationModel
- LocationRelationships
- LocationSortFields
- SignInFieldModel
- SignInFieldPageAttributes
- SignInFieldPageModel
- SignInFieldPageRelationships
- SignInFieldRelationships
- UserAttributes
- UserModel
- EntryEventHandler
- InviteEventHandler
- MigrationRouteHandler
- OptionsRouteHandler
- PluginUninstalledEventHandler
- RemoteValueRouteHandler
- SelectedValuesRouteHandler
- ValidationRouteHandler
- EnvoyEventMeta
- EnvoyMetaAuth
- EnvoyMetaCompany
- EnvoyMetaJob
- EnvoyMetaLocation
- EnvoyMetaZone
- EnvoyRouteMeta
- EnvoyEntryEventRequest
- EnvoyEventRequest
- EnvoyInviteEventRequest
- EnvoyMigrationRouteRequest
- EnvoyOptionsRouteRequest
- EnvoyRemoteValueRouteRequest
- EnvoyRouteRequest
- EnvoySelectedValuesRouteRequest
- EnvoyValidationRouteRequest
- employeeSignInEnabledFilterMiddleware
- excludedEmployeesFilterMiddleware
- inviteOnlyEntryFilterMiddleware
- asyncHandler
- entryEventHandler
- inviteEventHandler
- migrationRouteHandler
- optionsRouteHandler
- pluginUninstalledEventHandler
- remoteValueRouteHandler
- selectedValuesRouteHandler
- validationRouteHandler
- employeeSignInEnabledFilterMiddleware
- envoyMiddleware
- errorMiddleware
- excludedEmployeesFilterMiddleware
- inviteOnlyEntryFilterMiddleware
Ƭ AgreementModel: JSONAPIModel<AgreementAttributes, AgreementRelationships>
resources/AgreementResource.ts:26
Ƭ AgreementPageAttributes: Object
| Name | Type |
|---|---|
enabled? |
boolean |
position? |
number |
resources/AgreementPageResource.ts:6
Ƭ AgreementPageModel: JSONAPIModel<AgreementPageAttributes, AgreementPageRelationships>
resources/AgreementPageResource.ts:19
Ƭ AgreementPageRelationships: "flow" | "agreements"
resources/AgreementPageResource.ts:14
Ƭ AgreementRelationships: "agreement-page"
resources/AgreementResource.ts:21
Ƭ CompanyModel: JSONAPIModel<CompanyAttributes, CompanyRelationships>
resources/CompanyResource.ts:21
Ƭ CompanyRelationships: "locations"
resources/CompanyResource.ts:16
Ƭ EmployeeModel: JSONAPIModel<EmployeeAttributes, EmployeeRelationships>
resources/EmployeeResource.ts:47
Ƭ EmployeeRelationships: "locations" | "company"
resources/EmployeeResource.ts:42
Ƭ EmployeeSortFields: "name" | "created_at" | "-name" | "-created_at"
resources/EmployeeResource.ts:6
Ƭ FlowModel: JSONAPIModel<FlowAttributes, FlowRelationships>
Ƭ FlowRelationships: "location" | "sign-in-field-page" | "agreement-page"
Ƭ FlowSortFields: "name" | "created_at" | "-name" | "-created_at"
Ƭ InviteCreationModel: JSONAPIModel<InviteCreationAttributes, InviteRelationships, "invites", undefined>
resources/InviteResource.ts:92
Ƭ InviteModel: JSONAPIModel<InviteAttributes, InviteRelationships, "invites">
resources/InviteResource.ts:87
Ƭ InviteRelationships: "attendee" | "creator" | "employee" | "entry" | "flow" | "location"
resources/InviteResource.ts:82
Ƭ InviteSortFields: "name" | "created_at" | "-name" | "-created_at"
Ƭ LocationModel: JSONAPIModel<LocationAttributes, LocationRelationships>
resources/LocationResource.ts:67
Ƭ LocationRelationships: "company" | "employees" | "flows" | "employee-screening-flow"
resources/LocationResource.ts:62
Ƭ LocationSortFields: "name" | "created_at" | "-name" | "-created_at"
resources/LocationResource.ts:6
Ƭ SignInFieldModel: JSONAPIModel<SignInFieldAttributes, SignInFieldRelationships>
resources/SignInFieldResource.ts:31
Ƭ SignInFieldPageAttributes: Object
| Name | Type |
|---|---|
enabled? |
boolean |
position? |
number |
resources/SignInFieldPageResource.ts:6
Ƭ SignInFieldPageModel: JSONAPIModel<SignInFieldPageAttributes, SignInFieldPageRelationships>
resources/SignInFieldPageResource.ts:23
Ƭ SignInFieldPageRelationships: "flow" | "actionable-sign-in-field-actions" | "actionable-sign-in-fields" | "sign-in-field-actions" | "sign-in-fields"
resources/SignInFieldPageResource.ts:14
Ƭ SignInFieldRelationships: "sign-in-field-page"
resources/SignInFieldResource.ts:26
Ƭ UserAttributes: Object
| Name | Type |
|---|---|
email |
string |
name |
string |
Ƭ UserModel: JSONAPIModel<UserAttributes, "">
Ƭ EnvoyRequest<Payload, Config>: EnvoyBaseRequest<EnvoyRouteMeta<Config> | EnvoyEventMeta<string, Config>, Payload>
You probably won't need to use this type directly. For routes, use EnvoyRouteRequest, and for events, use EnvoyEntryEventRequest or EnvoyInviteEventRequest.
| Name | Type |
|---|---|
Payload |
Payload = unknown |
Config |
Config = Record<string, unknown> |
Ƭ EntryPayload: Object
| Name | Type |
|---|---|
attributes |
Object |
attributes.email |
string | null |
attributes.employee-screening-flow |
boolean |
attributes.flow-name |
string |
attributes.full-name |
string |
attributes.host |
string | null |
attributes.host-email |
string | null |
attributes.legal-docs? |
{ agreement: { id: string } ; id: string ; signed-at: string ; url: string }[] |
attributes.nda? |
string |
attributes.phone-number? |
string |
attributes.private-notes |
string | null |
attributes.signed-in-at |
string |
attributes.signed-out-at? |
string |
attributes.thumbnails |
Object |
attributes.thumbnails.large |
string | null |
attributes.thumbnails.original |
string | null |
attributes.thumbnails.small |
string | null |
attributes.user-data |
{ field: string ; value: string | null }[] |
id |
string |
relationships |
Object |
relationships.agreeable-ndas? |
Object |
relationships.agreeable-ndas.data |
JSONAPIData<"agreeable-ndas">[] |
relationships.device? |
Object |
relationships.device.data |
JSONAPIData<"devices"> |
relationships.employee? |
Object |
relationships.employee.data |
JSONAPIData<"employees"> |
relationships.flow? |
Object |
relationships.flow.data |
JSONAPIData<"flows"> |
relationships.invite? |
Object |
relationships.invite.data |
JSONAPIData<"invites"> |
relationships.location |
Object |
relationships.location.data |
JSONAPIData<"locations"> |
relationships.visitor-entrance? |
Object |
relationships.visitor-entrance.data |
JSONAPIData<"visitor-entrances"> |
type |
"entries" |
Ƭ InvitePayload: Object
| Name | Type |
|---|---|
attributes |
Object |
attributes.arrived |
boolean |
attributes.been-here-before |
boolean |
attributes.edit-token |
string |
attributes.email |
string | null |
attributes.employee-screening-flow |
boolean |
attributes.expected-arrival-time |
string |
attributes.flow-id |
string |
attributes.flow-name |
string |
attributes.full-name |
string |
attributes.inviter-email |
string | null |
attributes.inviter-name |
string | null |
attributes.legal-docs? |
{ agreement: { id: string } ; id: string ; signed-at: string ; url: string }[] |
attributes.nda? |
string |
attributes.photo-url |
string | null |
attributes.preregistration-complete |
boolean |
attributes.private-notes |
string | null |
attributes.qr-code |
string | null |
attributes.qr-code-sent-at |
string | null |
attributes.reminder-sent-at |
string | null |
attributes.secret-token |
string |
attributes.signed-in-at? |
string |
attributes.signed-out-at? |
string |
attributes.user-data |
{ field: string ; value: string | null }[] |
id |
string |
relationships |
Object |
relationships.agreeable-ndas? |
Object |
relationships.agreeable-ndas.data |
JSONAPIData<"agreeable-ndas">[] |
relationships.employee? |
Object |
relationships.employee.data |
JSONAPIData<"employees"> |
relationships.entry? |
Object |
relationships.entry.data |
JSONAPIData<"entries"> |
relationships.flow? |
Object |
relationships.flow.data |
JSONAPIData<"flows"> |
relationships.location |
Object |
relationships.location.data |
JSONAPIData<"locations"> |
type |
"invites" |
Ƭ EntryEventHandler<Config, Additions>: (req: EnvoyEntryEventRequest<Config> & Additions, res: EnvoyResponse) => Result
Handle an entry event, such as entry_sign_in.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
▸ (req, res): Result
| Name | Type |
|---|---|
req |
EnvoyEntryEventRequest<Config> & Additions |
res |
EnvoyResponse |
Result
Ƭ InviteEventHandler<Config, Additions>: (req: EnvoyInviteEventRequest<Config> & Additions, res: EnvoyResponse) => Result
Handle an invite event, such as invite_created.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
▸ (req, res): Result
| Name | Type |
|---|---|
req |
EnvoyInviteEventRequest<Config> & Additions |
res |
EnvoyResponse |
Result
Ƭ MigrationRouteHandler<OldConfig, NewConfig, Additions>: (req: EnvoyMigrationRouteRequest<OldConfig> & Additions, res: EnvoyResponse<NewConfig>) => Result
Handle a "migration" route.
| Name | Type |
|---|---|
OldConfig |
OldConfig = SomeObject |
NewConfig |
NewConfig = SomeObject |
Additions |
Additions = SomeObject |
▸ (req, res): Result
| Name | Type |
|---|---|
req |
EnvoyMigrationRouteRequest<OldConfig> & Additions |
res |
EnvoyResponse<NewConfig> |
Result
Ƭ OptionsRouteHandler<Config, Additions>: (req: EnvoyOptionsRouteRequest<Config> & Additions, res: EnvoyOptionsRouteResponse) => Result
Handle an "options" route.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
▸ (req, res): Result
| Name | Type |
|---|---|
req |
EnvoyOptionsRouteRequest<Config> & Additions |
res |
EnvoyOptionsRouteResponse |
Result
Ƭ PluginUninstalledEventHandler<Config, Additions>: (req: EnvoyEventRequest<"plugin_uninstalled", never, Config> & Additions, res: EnvoyResponse) => Result
Handle a plugin_uninstalled event for cleaning up.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
▸ (req, res): Result
| Name | Type |
|---|---|
req |
EnvoyEventRequest<"plugin_uninstalled", never, Config> & Additions |
res |
EnvoyResponse |
Result
Ƭ RemoteValueRouteHandler<Config, Additions>: (req: EnvoyRemoteValueRouteRequest<Config> & Additions, res: EnvoyRemoteValueRouteResponse) => Result
Handle a "remote value" route.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
▸ (req, res): Result
| Name | Type |
|---|---|
req |
EnvoyRemoteValueRouteRequest<Config> & Additions |
res |
EnvoyRemoteValueRouteResponse |
Result
Ƭ SelectedValuesRouteHandler<Config, Additions>: (req: EnvoySelectedValuesRouteRequest<Config> & Additions, res: EnvoySelectedValuesRouteResponse) => Result
Handle a "selected values" route.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
▸ (req, res): Result
| Name | Type |
|---|---|
req |
EnvoySelectedValuesRouteRequest<Config> & Additions |
res |
EnvoySelectedValuesRouteResponse |
Result
Ƭ ValidationRouteHandler<Config, Payload, Additions>: (req: EnvoyValidationRouteRequest<Payload, Config> & Additions, res: EnvoyResponse<Partial<Config>>) => Result
Handle a "validation" route.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Payload |
Payload = SomeObject |
Additions |
Additions = SomeObject |
▸ (req, res): Result
| Name | Type |
|---|---|
req |
EnvoyValidationRouteRequest<Payload, Config> & Additions |
res |
EnvoyResponse<Partial<Config>> |
Result
Ƭ EnvoySignatureVerifierOptions: Object
| Name | Type |
|---|---|
algorithm |
"sha256" | string |
encoding |
BinaryToTextEncoding |
header |
"x-envoy-signature" | string |
secret |
string |
util/EnvoySignatureVerifier.ts:8
Ƭ EnvoyEventMeta<Event, Config>: Object
Metadata that will be included in the request body for events.
| Name | Type |
|---|---|
Event |
Event: string = string |
Config |
Config = Record<string, unknown> |
| Name | Type |
|---|---|
auth |
EnvoyMetaAuth | null |
company |
EnvoyMetaCompany |
config |
Config |
event |
Event |
install_id |
string |
job |
EnvoyMetaJob<Event> |
location |
EnvoyMetaLocation |
zone |
EnvoyMetaZone |
plugin_id |
string |
Ƭ EnvoyMetaAuth: Object
A short-lived userAPI token.
Will be used to construct the userAPI property found in req.envoy.userAPI.
| Name | Type |
|---|---|
access_token |
string |
expires_in |
number |
refresh_token |
string | null |
refresh_token_expires_in |
number | null |
token_type |
"Bearer" |
Ƭ EnvoyMetaCompany: Object
| Name | Type |
|---|---|
attributes |
Object |
attributes.active |
boolean |
attributes.created-at |
string |
attributes.name |
string |
id |
string |
type |
"companies" |
Ƭ EnvoyMetaJob<Event>: Object
| Name | Type |
|---|---|
Event |
Event: string = string |
| Name | Type |
|---|---|
id |
string |
identifier |
string |
name |
Event |
Ƭ EnvoyMetaLocation: Object
| Name | Type |
|---|---|
attributes |
Object |
attributes.address |
string |
attributes.address-line-one |
string | null |
attributes.address-line-two |
string | null |
attributes.city |
string | null |
attributes.company-name-override |
string | null |
attributes.country |
string | null |
attributes.created-at |
string |
attributes.latitude |
number | null |
attributes.locale |
string | null |
attributes.longitude |
number | null |
attributes.name |
string |
attributes.state |
string | null |
attributes.timezone |
string |
attributes.zip |
string | null |
id |
string |
type |
"locations" |
Ƭ EnvoyMetaZone: Object
| Name | Type |
|---|---|
attributes |
Object |
attributes.address |
string | null |
attributes.logo-url |
string | null |
attributes.name |
string |
attributes.time-zone |
string |
id |
string |
type |
"zones" |
Ƭ EnvoyRouteMeta<Config, Params>: Object
Metadata that will be included in the request body for setup routes, like validation URLs or options URLs.
| Name | Type |
|---|---|
Config |
Config = Record<string, unknown> |
Params |
Params = Record<string, unknown> |
| Name | Type |
|---|---|
auth |
EnvoyMetaAuth | null |
company |
EnvoyMetaCompany |
config |
Config |
forwarded_bearer_token? |
string |
install_id |
string |
location |
EnvoyMetaLocation |
zone |
EnvoyMetaZone |
params |
Params |
plugin_id |
string |
route |
string |
Ƭ EnvoyEntryEventRequest<Config>: EnvoyEventRequest<EnvoyEntryEvent, EntryPayload, Config>
Use to type your req object in entry event handlers,
such as handlers for entry_sign_in.
| Name | Type |
|---|---|
Config |
Config = Record<string, unknown> |
Ƭ EnvoyEventRequest<Event, Payload, Config>: EnvoyBaseRequest<EnvoyEventMeta<Event, Config>, Payload>
Base type for event requests. You should use EnvoyEntryEventRequest or EnvoyInviteEventRequest.
| Name | Type |
|---|---|
Event |
Event: string = string |
Payload |
Payload = unknown |
Config |
Config = Record<string, unknown> |
Ƭ EnvoyInviteEventRequest<Config>: EnvoyEventRequest<EnvoyInviteEvent, InvitePayload, Config>
Use to type your req object in invite event handlers,
such as handlers for invite_created or upcoming_visit.
| Name | Type |
|---|---|
Config |
Config = Record<string, unknown> |
Ƭ EnvoyMigrationRouteRequest<OldConfig>: EnvoyRouteRequest<never, OldConfig, never>
Use to type your req object in Envoy "migration" route handlers.
| Name | Type |
|---|---|
OldConfig |
OldConfig = Record<string, unknown> |
Ƭ EnvoyOptionsRouteRequest<Config>: EnvoyRouteRequest<EnvoyOptionsRouteResponseBody, Config, EnvoyOptionsRouteParams>
Use to type your req object in Envoy "options URL" route handlers.
| Name | Type |
|---|---|
Config |
Config = Record<string, unknown> |
Ƭ EnvoyRemoteValueRouteRequest<Config>: EnvoyRouteRequest<EnvoyRemoteValueRouteResponseBody, Config, never>
Use to type your req object in Envoy "remote value URL" route handlers.
| Name | Type |
|---|---|
Config |
Config = Record<string, unknown> |
Ƭ EnvoyRouteRequest<Payload, Config, Params>: EnvoyBaseRequest<EnvoyRouteMeta<Config, Params>, Payload>
Use to type your req object in Envoy route handlers such as validation URLs.
| Name | Type |
|---|---|
Payload |
Payload = unknown |
Config |
Config = Record<string, unknown> |
Params |
Params = Record<string, unknown> |
Ƭ EnvoySelectedValuesRouteRequest<Config>: EnvoyRouteRequest<EnvoySelectedValuesRouteResponseBody, Config, EnvoySelectedValuesRouteParams>
Use to type your req object in Envoy "selected values URL" route handlers.
| Name | Type |
|---|---|
Config |
Config = Record<string, unknown> |
Ƭ EnvoyValidationRouteRequest<Payload, Config>: EnvoyRouteRequest<Payload, Config, never>
Use to type your req object in Envoy "validation URL" route handlers.
| Name | Type |
|---|---|
Payload |
Payload = Record<string, unknown> |
Config |
Config = Record<string, unknown> |
Ƭ EnvoyOptionsRouteResponse: EnvoyResponse<EnvoyOptionsRouteResponseBody>
Use to type your res object in Envoy "options URL" route handlers.
Ƭ EnvoyRemoteValueRouteResponse: EnvoyResponse<EnvoyRemoteValueRouteResponseBody>
Use to type your res object in Envoy "remote value URL" route handlers.
Ƭ EnvoySelectedValuesRouteResponse: EnvoyResponse<EnvoySelectedValuesRouteResponseBody>
Use to type your res object in Envoy "selected values URL" route handlers.
Ƭ EnvoyStorageItem<Value>: Object
| Name | Type |
|---|---|
Value |
Value = unknown |
| Name | Type |
|---|---|
key |
string |
value |
Value |
▸ employeeSignInEnabledFilterMiddleware<Config>(employeeSignInEnabledKey, message?): RequestHandler
Will only proceed if the install's config has a truthy value for the given employeeSignInEnabledKey.
| Name |
|---|
Config |
| Name | Type | Default value |
|---|---|---|
employeeSignInEnabledKey |
keyof Config |
undefined |
message |
string |
'Envoy Protect is disabled.' |
RequestHandler
▸ excludedEmployeesFilterMiddleware<Config>(excludeEmployeesKey, message?): RequestHandler
Will not proceed if the employee who's signing in is present in the excluded employees list.
| Name |
|---|
Config |
| Name | Type | Default value |
|---|---|---|
excludeEmployeesKey |
keyof Config |
undefined |
message |
string |
'Employee excluded from integration.' |
RequestHandler
▸ inviteOnlyEntryFilterMiddleware<Config>(invitesOnlyKey, message?): RequestHandler
Will only proceed if the entry has an invite
and the install's config has a truthy value for the given invitesOnlyKey.
| Name |
|---|
Config |
| Name | Type | Default value |
|---|---|---|
invitesOnlyKey |
keyof Config |
undefined |
message |
string |
'Visitors must be invited.' |
RequestHandler
▸ asyncHandler<Req, Res>(handler): RequestHandler
Wraps any express.js-based handlers to catch Promise-based errors.
| Name | Type |
|---|---|
Req |
Req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>, Req> |
Res |
Res: Response<any, Record<string, any>, Res> |
| Name | Type |
|---|---|
handler |
(req: Req, res: Res) => Result |
RequestHandler
▸ entryEventHandler<Config, Additions>(handler): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
Handler for entry events.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
| Name | Type |
|---|---|
handler |
EntryEventHandler<Config, Additions> |
RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
▸ inviteEventHandler<Config, Additions>(handler): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
Handler for invite events.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
| Name | Type |
|---|---|
handler |
InviteEventHandler<Config, Additions> |
RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
▸ migrationRouteHandler<OldConfig, NewConfig, Additions>(handler): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
Handler for a migration route.
| Name | Type |
|---|---|
OldConfig |
OldConfig |
NewConfig |
NewConfig |
Additions |
Additions = SomeObject |
| Name | Type |
|---|---|
handler |
MigrationRouteHandler<OldConfig, NewConfig, Additions> |
RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
▸ optionsRouteHandler<Config, Additions>(handler): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
Handler for options URL routes.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
| Name | Type |
|---|---|
handler |
OptionsRouteHandler<Config, Additions> |
RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
▸ pluginUninstalledEventHandler<Config, Additions>(handler): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
Handler for plugin_uninstalled events.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
| Name | Type |
|---|---|
handler |
PluginUninstalledEventHandler<Config, Additions> |
RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
▸ remoteValueRouteHandler<Config, Additions>(handler): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
Handler for remote value URL routes.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
| Name | Type |
|---|---|
handler |
RemoteValueRouteHandler<Config, Additions> |
RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
▸ selectedValuesRouteHandler<Config, Additions>(handler): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
Handler for selected values URL routes.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Additions |
Additions = SomeObject |
| Name | Type |
|---|---|
handler |
SelectedValuesRouteHandler<Config, Additions> |
RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
▸ validationRouteHandler<Config, Payload, Additions>(handler): RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
Handler for validation URL routes.
| Name | Type |
|---|---|
Config |
Config = SomeObject |
Payload |
Payload = SomeObject |
Additions |
Additions = SomeObject |
| Name | Type |
|---|---|
handler |
ValidationRouteHandler<Config, Payload, Additions> |
RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
▸ employeeSignInEnabledFilterMiddleware<Config>(employeeSignInEnabledKey, message?): RequestHandler
Will only proceed if the install's config has a truthy value for the given employeeSignInEnabledKey.
| Name |
|---|
Config |
| Name | Type | Default value |
|---|---|---|
employeeSignInEnabledKey |
keyof Config |
undefined |
message |
string |
'Envoy Protect is disabled.' |
RequestHandler
▸ envoyMiddleware(options?): RequestHandler
Sets up an EnvoyPluginSDK object in the path req.envoy.
Modifies the res object to include Envoy's helpers, per EnvoyResponse.
Also verifies that the request is coming from Envoy, as well as managing the plugin access token lifecycle.
| Name | Type |
|---|---|
options? |
EnvoySignatureVerifierOptions |
RequestHandler
▸ errorMiddleware(onError?): ErrorRequestHandler
Catches errors and sets the proper status code.
| Name | Type |
|---|---|
onError |
(err: Error) => void |
ErrorRequestHandler
▸ excludedEmployeesFilterMiddleware<Config>(excludeEmployeesKey, message?): RequestHandler
Will not proceed if the employee who's signing in is present in the excluded employees list.
| Name |
|---|
Config |
| Name | Type | Default value |
|---|---|---|
excludeEmployeesKey |
keyof Config |
undefined |
message |
string |
'Employee excluded from integration.' |
RequestHandler
▸ inviteOnlyEntryFilterMiddleware<Config>(invitesOnlyKey, message?): RequestHandler
Will only proceed if the entry has an invite
and the install's config has a truthy value for the given invitesOnlyKey.
| Name |
|---|
Config |
| Name | Type | Default value |
|---|---|---|
invitesOnlyKey |
keyof Config |
undefined |
message |
string |
'Visitors must be invited.' |
RequestHandler