@manta-eu/react/worker
Reference for @manta-eu/react/worker as it is on main.
Classes
SignInUnreachableError
Extends
Error
Constructors
Constructor
new SignInUnreachableError(
cause):SignInUnreachableError
Parameters
cause
unknown
Returns
Overrides
Error.constructor
Properties
cause?
optionalcause?:unknown
Inherited from
Error.cause
message
message:
string
Inherited from
Error.message
name
name:
string
Inherited from
Error.name
stack?
optionalstack?:string
Inherited from
Error.stack
stackTraceLimit
staticstackTraceLimit:number
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Error.stackTraceLimit
Methods
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
Error.captureStackTrace
prepareStackTrace()
staticprepareStackTrace(err,stackTraces):any
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTrace
Type Aliases
ApprovalEmailMessage
ApprovalEmailMessage = {
content:ApprovalRequestEmailContent;subject:string;template:"approvalRequest"; } | {content:ManualStepEmailContent;subject:string;template:"manualStep"; } | {content:RequestAssignmentEmailContent;subject:string;template:"requestAssignment"; }
ApprovalEmailRequest
ApprovalEmailRequest =
object
Properties
author
author:
string
description
description:
string|null
href
href:
string
title
title:
string
ApprovalEnv
ApprovalEnv =
AppWorkerEnv&object
Type Declaration
APP_ORIGIN?
optionalAPP_ORIGIN?:string
KEYCLOAK_URL?
optionalKEYCLOAK_URL?:string
MANTA_APP_CLIENT_ID?
optionalMANTA_APP_CLIENT_ID?:string
MANTA_APP_CLIENT_SECRET?
optionalMANTA_APP_CLIENT_SECRET?:string
SPARQL_UPDATE_PSK?
optionalSPARQL_UPDATE_PSK?:string
VITE_KEYCLOAK_REALM?
optionalVITE_KEYCLOAK_REALM?:string
ApprovalRequestEmailArgs
ApprovalRequestEmailArgs =
object
Properties
approver
approver:
string
brandName
brandName:
string
homeHref
homeHref:
string
origin
origin:
string
requests
requests:
ApprovalEmailRequest[]
settingsHref
settingsHref:
string
ApprovalRequestEmailContent
ApprovalRequestEmailContent =
object
Properties
approvalRequests
approvalRequests:
object[]
approvalAuthor
approvalAuthor:
string
approvalDescription?
optionalapprovalDescription?:string
approvalTitle
approvalTitle:
string
position
position:
number
reviewUrl
reviewUrl:
string
approverName
approverName:
string
brandName
brandName:
string
homeUrl
homeUrl:
string
moreRequestCount?
optionalmoreRequestCount?:number
settingsUrl
settingsUrl:
string
AppWorkerEnv
AppWorkerEnv =
BrandGuidelinesEnv&CustomAppEnv&object
Type Declaration
AGENTS?
optionalAGENTS?:object
AGENTS.fetch
fetch: typeof
fetch
ASSETS?
optionalASSETS?:object
ASSETS.fetch
fetch: typeof
fetch
MANTA_AGENTS_URL?
optionalMANTA_AGENTS_URL?:string
MANTA_SESSION_SECRET?
optionalMANTA_SESSION_SECRET?:string
AppWorkerOptions
AppWorkerOptions =
object
Properties
brandGuidelines?
optionalbrandGuidelines?:BrandGuidelinesRoutesOptions
cookiePrefix?
optionalcookiePrefix?:string
graphqlOperations?
optionalgraphqlOperations?:GraphQLAllowlist
proxyRoutes?
optionalproxyRoutes?: readonlyProxyRoute[]
requestAssignmentEmails?
optionalrequestAssignmentEmails?:object
appName
appName:
string
from
from:
string
signIn?
optionalsignIn?:object
customApp
customApp:
CustomAppSignIn
BrandGuidelinesEnv
BrandGuidelinesEnv =
object
Properties
GOOGLE_FONTS_API_KEY?
optionalGOOGLE_FONTS_API_KEY?:string
BrandGuidelinesRoutesOptions
BrandGuidelinesRoutesOptions =
object
Properties
storageHosts?
optionalstorageHosts?: readonlystring[]
CustomAppEnv
CustomAppEnv =
object
Properties
KEYCLOAK_URL?
optionalKEYCLOAK_URL?:string
MANTA_APP_CLIENT_ID?
optionalMANTA_APP_CLIENT_ID?:string
MANTA_APP_CLIENT_SECRET?
optionalMANTA_APP_CLIENT_SECRET?:string
VITE_KEYCLOAK_REALM?
optionalVITE_KEYCLOAK_REALM?:string
CustomAppSignIn
CustomAppSignIn =
object
Properties
datastoreId?
optionaldatastoreId?:string
The one datastore the app opens; /, /datastores and /g/... lead straight to it.
idpHint?
optionalidpHint?:string
offlineAccess?
optionalofflineAccess?:boolean
signOutOfManta?
optionalsignOutOfManta?:boolean
GraphQLAllowlist
GraphQLAllowlist =
Record<string, readonlystring[]>
ManualStepEmailArgs
ManualStepEmailArgs =
object
Properties
appName
appName:
string
brandName
brandName:
string
origin
origin:
string
reviewHref
reviewHref:
string
settingsHref
settingsHref:
string
step
step:
string
title
title:
string
ManualStepEmailContent
ManualStepEmailContent =
object
Properties
appName
appName:
string
approvalTitle
approvalTitle:
string
brandName
brandName:
string
manualStepText
manualStepText:
string
reviewUrl
reviewUrl:
string
settingsUrl
settingsUrl:
string
OutgoingEmail
OutgoingEmail =
object
Properties
message
message:
ApprovalEmailMessage
to
to:
string
ProxyRoute
ProxyRoute =
object
Properties
graphql?
optionalgraphql?:true
methods
methods: readonly
string[]
path
path:
string
readOnly?
optionalreadOnly?:true
websocket?
optionalwebsocket?:true
RequestAssignmentEmailArgs
RequestAssignmentEmailArgs =
object
Properties
appName
appName:
string
origin
origin:
string
requestsHref
requestsHref:
string
title
title:
string
why
why:
string|null
RequestAssignmentEmailContent
RequestAssignmentEmailContent =
Omit<SchemaInterface<typeofMantaRequestAssignmentEmailTemplateSchema>,"$id"|"description"|"templateSource"> &Partial<Pick<SchemaInterface<typeofMantaRequestAssignmentEmailTemplateSchema>,"description">>
SendApprovalEmailsInput
SendApprovalEmailsInput =
object
Properties
datastoreId
datastoreId:
string
emails
emails: readonly
OutgoingEmail[]
from
from:
string
reportError?
optionalreportError?: (error) =>void
Parameters
error
unknown
Returns
void
ServiceEnv
ServiceEnv =
Pick<ApprovalEnv,"MANTA_AGENTS_URL"|"AGENTS"|"KEYCLOAK_URL"|"VITE_KEYCLOAK_REALM"|"MANTA_APP_CLIENT_ID"|"MANTA_APP_CLIENT_SECRET">
ServiceFetchOptions
ServiceFetchOptions =
object
Properties
datastoreId?
optionaldatastoreId?:string
StartedEmail
StartedEmail =
object
Properties
iri
iri:
string
template
template:
ApprovalEmailMessage["template"]
to
to:
string
StartedEmails
StartedEmails =
object
Properties
emails
emails:
StartedEmail[]
plan
plan:
string
Functions
approvalRequestEmail()
approvalRequestEmail(
args):ApprovalEmailMessage
Parameters
args
Returns
createAppWorker()
createAppWorker<
E>(options?):Hono<{Bindings:E; },BlankSchema,"/"> &object
Type Parameters
E
E extends AppWorkerEnv
Parameters
options?
AppWorkerOptions = {}
Returns
Hono<{ Bindings: E; }, BlankSchema, "/"> & object
manualStepEmail()
manualStepEmail(
args):ApprovalEmailMessage
Parameters
args
Returns
requestAssignmentEmail()
requestAssignmentEmail(
args):ApprovalEmailMessage
Parameters
args
Returns
sendApprovalEmails()
sendApprovalEmails(
env,input):Promise<StartedEmails|undefined>
Parameters
env
input
Returns
Promise<StartedEmails | undefined>
serviceFetch()
serviceFetch(
env,options?): {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Parameters
env
options?
ServiceFetchOptions = {}
Returns
(
input,init?):Promise<Response>
Parameters
input
URL | RequestInfo
init?
RequestInit
Returns
Promise<Response>
(
input,init?):Promise<Response>
Parameters
input
string | URL | Request
init?
RequestInit
Returns
Promise<Response>