@envoy/envoy-integrations-sdk / EnvoyPluginSDK
Sets up all relevant Envoy functions. Attaches itself to every request object using our {@link middleware}, to allow for easy access to Envoy functions.
| Name | Type |
|---|---|
Meta |
Meta = unknown |
Payload |
Payload = unknown |
• new EnvoyPluginSDK<Meta, Payload>(body, isVerified?, pluginAccessToken?)
Don't create an instance of this class directly.
Instead, use {@link middleware} to automatically attach an instance to req on every request.
| Name | Type |
|---|---|
Meta |
Meta = unknown |
Payload |
Payload = unknown |
| Name | Type | Default value | Description |
|---|---|---|---|
body |
EnvoyRequestBody<Meta, Payload> |
undefined |
Request body |
isVerified |
boolean |
false | If the request has been verified via {@link EnvoySignatureVerifier} |
pluginAccessToken |
null | string |
null | An access token from EnvoyPluginAPI.loginAsPlugin |
• get getJob(): (jobId: string) => EnvoyPluginJob
Returns a job based on an ID.
fn
▸ (jobId): EnvoyPluginJob
| Name | Type |
|---|---|
jobId |
string |
• get globalStorage(): EnvoyPluginStorage
Storage scoped globally (across installs).
• get installStorage(): EnvoyPluginStorage
Storage scoped to the install.
• get job(): EnvoyPluginJob
Perform operations on the current job.
• get jobId(): null | string
Returns the current job's ID.
null | string
• get jwt(): EnvoyJWT
A utility to encode and decode JWTs. Useful for verifiable communications between plugin endpoints.
• get meta(): Meta
The metadata for the request. Either an EnvoyEventMeta} or EnvoyRouteMeta.
Meta
• get payload(): Payload
The payload for the request. For events, it's some Envoy event payload, like an EntryPayload or InvitePayload. For setup step validation URLs, it's the form submitted values for a validation URL.
Payload
• get pluginAPI(): EnvoyPluginAPI
Envoy API scoped to the plugin. Used to perform storage or job operations.
• get userAPI(): EnvoyUserAPI
Envoy API scoped to the user. Used only in routes.