@graphty/graphty-element / index / SourceDescriptor
Interface: SourceDescriptor ​
Defined in: graph-io/dist/src/sources/types.d.ts:325
What a form needs to ask for a source's parameters, as data. Only plainName and params are required. Experimental.
Properties ​
auth? ​
readonlyoptionalauth?: readonlyCredentialKind[]
Defined in: graph-io/dist/src/sources/types.d.ts:335
The credential kinds it takes.
Default Value ​
[]authRequired? ​
readonlyoptionalauthRequired?:"optional"|"none"|"required"
Defined in: graph-io/dist/src/sources/types.d.ts:337
Whether a credential is needed.
Default Value ​
"none"defaultEndpoint? ​
readonlyoptionaldefaultEndpoint?:string|null
Defined in: graph-io/dist/src/sources/types.d.ts:339
The endpoint used when the caller names none.
Default Value ​
nullfeatures? ​
readonlyoptionalfeatures?: readonlySourceFeature[]
Defined in: graph-io/dist/src/sources/types.d.ts:369
The optional features it has; default: from the methods present.
kind? ​
readonlyoptionalkind?:SourceKind
Defined in: graph-io/dist/src/sources/types.d.ts:333
What kind of service it is.
Default Value ​
"other"migrateParams? ​
readonlyoptionalmigrateParams?: (params,fromVersion) =>Record<string,unknown>
Defined in: graph-io/dist/src/sources/types.d.ts:376
Upgrade params recorded by an older version.
Parameters ​
params ​
Record<string, unknown>
the old params
fromVersion ​
number
the version they were recorded with
Returns ​
Record<string, unknown>
the params for the current version
needs? ​
readonlyoptionalneeds?:object
Defined in: graph-io/dist/src/sources/types.d.ts:351
What it needs from a browser. Absent means "not declared": nothing is checked first. secureContext: true is checked before any request.
headers? ​
readonlyoptionalheaders?: readonlystring[]
Request headers the service must allow from a page.
secureContext? ​
readonlyoptionalsecureContext?:boolean
Whether it needs a secure context (Web Crypto).
websocket? ​
readonlyoptionalwebsocket?:boolean
Whether it needs a WebSocket.
params ​
readonlyparams: readonlySourceParamDescriptor[]
Defined in: graph-io/dist/src/sources/types.d.ts:329
The parameters.
plainName ​
readonlyplainName:string
Defined in: graph-io/dist/src/sources/types.d.ts:327
The source's default name; catalog data an application may replace by id.
rateLimit? ​
readonlyoptionalrateLimit?:object
Defined in: graph-io/dist/src/sources/types.d.ts:360
Paces ctx.fetch: at most requests per perMs, and concurrent at once.
concurrent? ​
readonlyoptionalconcurrent?:number
At most this many requests at once.
perMs ​
readonlyperMs:number
The period, in milliseconds.
requests ​
readonlyrequests:number
At most this many requests per period.
runtimes? ​
readonlyoptionalruntimes?:Readonly<Partial<Record<SourceRuntime, {reason?:SourceRuntimeReason;supported:boolean; }>>>
Defined in: graph-io/dist/src/sources/types.d.ts:341
Where it runs; a runtime marked unsupported is refused with E_SOURCE_RUNTIME before any request.
samples? ​
readonlyoptionalsamples?: readonlySourceSample[]
Defined in: graph-io/dist/src/sources/types.d.ts:378
Public examples to offer.
version? ​
readonlyoptionalversion?:number
Defined in: graph-io/dist/src/sources/types.d.ts:331
Bump when params or cursors change shape.
Default Value ​
1