Skip to content

Interface: OpenAiAccountSeatBuilder ​

Defined in: openai/src/builders/openai-account-seat-builder.ts:9

Fluent builder for constructing a passive OpenAiAccountSeatNode (type: 'openai:account-seat').

Configures either an OpenAI API key seat resolved late via P.env(key) or a Codex CLI subscription seat backed by configDir without import-time I/O.

Extends ​

Methods ​

apiKey() ​

ts
apiKey(envOrKey): OpenAiAccountSeatBuilder;

Defined in: openai/src/builders/openai-account-seat-builder.ts:37

Binds a literal API key or symbolic P.env(key) reference for OpenAI Responses API authentication.

Returns a new immutable builder instance that resolves the key only at leaf turn invocation time.

Parameters ​

ParameterTypeDescription
envOrKeystring | EnvRefSymbolic EnvRef or literal API key string.

Returns ​

OpenAiAccountSeatBuilder

New immutable account seat builder with apiKey configured.

Throws ​

If envOrKey is an empty or whitespace-only string.


configDir() ​

ts
configDir(path): OpenAiAccountSeatBuilder;

Defined in: openai/src/builders/openai-account-seat-builder.ts:24

Binds a filesystem path to a Codex CLI configuration directory containing OAuth credentials.

Returns a new immutable builder instance with configDir set while leaving the receiver unchanged.

Parameters ​

ParameterTypeDescription
pathstringPath to the Codex CLI directory (such as '~/.codex-a').

Returns ​

OpenAiAccountSeatBuilder

New immutable account seat builder with configDir configured.

Throws ​

If path is an empty or whitespace-only string.


toAST() ​

ts
toAST(): OpenAiAccountSeatNode;

Defined in: openai/src/builders/openai-account-seat-builder.ts:46

Compiles the builder configuration into a deeply frozen passive OpenAiAccountSeatNode AST node.

Preserves a monomorphic property shape with type: 'openai:account-seat' and zero runtime methods.

Returns ​

OpenAiAccountSeatNode

Frozen passive AST node representing the OpenAI account seat.

Overrides ​

AstBuilder.toAST

Properties ​

PropertyModifierTypeDescriptionDefined in
idreadonlystringUnique identifier of the OpenAI account seat within capacity pools.openai/src/builders/openai-account-seat-builder.ts:11

Released under the MIT License.