Skip to content

@pumpkin-plugins/pumpkin-pie-api API / client / PieClient

Class: PieClient ​

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:29

Validated protocol 0 consumer with no host imports or implicit cache.

Constructors ​

Constructor ​

new PieClient(send, options?): PieClient

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:33

Inject the transport and share a callback guard with any expansion router.

Parameters ​

send ​

SendMessage

options? ​

ClientOptions = {}

Returns ​

PieClient

Methods ​

getValue() ​

getValue(id, viewer?, argument?): PlaceholderValue

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:79

Look up one identifier, including placeholders requiring an argument.

Parameters ​

id ​

string

viewer? ​

string

argument? ​

string

Returns ​

PlaceholderValue


list() ​

list(): readonly RegisteredPlaceholder[]

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:83

List built-in and contributed advertised placeholders.

Returns ​

readonly RegisteredPlaceholder[]


ping() ​

ping(): ProviderInfo

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:41

Negotiate protocol 0; unsupported versions throw IncompatibleError.

Returns ​

ProviderInfo


registerExpansion() ​

registerExpansion(registration): RegisteredExpansion

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:87

Register or replace a namespace; returns applied TTL rather than requested TTL.

Parameters ​

registration ​

ExpansionRegistration

Returns ​

RegisteredExpansion


resolve() ​

resolve(text, viewer?, argument?): ResolvedLine

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:45

Resolve a line, even when it contains no tokens. Viewer is the subject's name.

Parameters ​

text ​

string

viewer? ​

string

argument? ​

string

Returns ​

ResolvedLine


resolveBatch() ​

resolveBatch(requests): readonly ResolvedLine[]

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:49

Resolve exactly one bounded batch; discard mismatched output counts.

Parameters ​

requests ​

readonly Line[]

Returns ​

readonly ResolvedLine[]


resolveMany() ​

resolveMany(lines): readonly ResolvedLine[]

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:53

Resolve valid inputs in bounded batches, returning nothing partial on failure.

Parameters ​

lines ​

readonly Line[]

Returns ​

readonly ResolvedLine[]


unregisterExpansions() ​

unregisterExpansions(): readonly string[]

Defined in: tools/apis/pumpkin-pie-api/src/client.ts:91

Drop ALL namespaces owned by the calling plugin, not just this client.

Returns ​

readonly string[]

pumpkin-plugins documentation