انتقل إلى المحتوى الرئيسي

Function: isCommandKey()

isCommandKey(key): key is "agent.shared.admin.tenant.ensure.v1" | "agent.shared.admin.did.create.v1" | "agent.shared.admin.did.update.v1"

Defined in: packages/contracts/src/commands.ts:142

Whether a string is a registered command key. A sender asks this at start for every command it will send, and does not start on false: a command with no registration has no row, so no principal is granted it.

Parameters​

key​

string

Any string, typically a subject built from a placement.

Returns​

key is "agent.shared.admin.tenant.ensure.v1" | "agent.shared.admin.did.create.v1" | "agent.shared.admin.did.update.v1"

true only for a key of AGENT_COMMANDS; narrows the type.