Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

NiuAdminClient

Generated from the checked-in source. Do not edit this reference by hand.

SDK source. All SDK types.

TypeScript
constructor(options: NiuAdminOptions);
TypeScript
/** Owner-only scoped role change. Preserves sessions/scope; reload after a stale-role409.
* Rejects self changes and protected actors. Never issues a replacement token.
*/
/** Durable identity-only creation. Replay returns the same user, never a new session or token. */
createOperatorIdentity(input: {
organization_id: string;
project_id?: string | null;
name: string;
role: OperatorAccessRole;
}, options: RequestOptions & {
idempotencyKey: string;
}): Promise<{
operator: OperatorAccessView;
session: null;
token: null;
}>;
TypeScript
/** Scope is enforced before pagination; follow next_cursor to avoid incomplete user recovery. */
listOperatorsPage(query?: {
organizationId?: string;
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: OperatorAccessView[];
next_cursor: string | null;
}>;
TypeScript
/** Read saved sign-in metadata; this does not establish browser sign-in availability. */
getMemberPasswordConfiguration(operatorId: string, options?: RequestOptions): Promise<MemberPasswordConfiguration>;
TypeScript
/** Provision or explicitly reset a member password. Refresh the revision after an uncertain outcome; never blindly retry. */
setMemberPassword(operatorId: string, input: MemberPasswordInput, options?: RequestOptions): Promise<{
revision: number;
}>;
TypeScript
updateOperatorRole(operatorId: string, input: OperatorRoleUpdate, options?: RequestOptions): Promise<{
data: OperatorAccessView;
}>;
TypeScript
/** Read the current member; this never selects a caller-supplied operator ID. */
getMemberProfile(options?: RequestOptions): Promise<{
data: MemberProfile;
}>;
TypeScript
/** Omitted/null avatar clears it. Stale revision returns 409; reload before retry. */
updateMemberProfile(input: MemberProfileUpdate, options?: RequestOptions): Promise<{
data: MemberProfile;
}>;
TypeScript
/** A missing saved preference resolves to the deployment default appearance. */
getMemberPreferences(options?: RequestOptions): Promise<{
data: MemberPreferences;
}>;
TypeScript
/** Saves the current member's preference in backend storage. */
updateMemberPreferences(input: MemberPreferences, options?: RequestOptions): Promise<{
data: MemberPreferences;
}>;
TypeScript
/** Platform-only membership history, including inactive and revoked members. */
listProviderMembers(providerId: string, options?: RequestOptions): Promise<{
data: ProviderMember[];
}>;
TypeScript
listSupplierMembers(supplierId: string, options?: RequestOptions): Promise<{
data: SupplierMember[];
}>;
TypeScript
/** Grant/change/revoke a membership; Provider roles do not grant platform configuration authority. */
setProviderMember(providerId: string, operatorId: string, input: ProviderMemberUpdate, options?: RequestOptions): Promise<{
data: {
active: boolean;
};
}>;
TypeScript
setSupplierMember(supplierId: string, operatorId: string, input: SupplierMemberUpdate, options?: RequestOptions): Promise<{
data: {
active: boolean;
};
}>;
TypeScript
/** Platform directory; configuration counts include retained disabled configurations. */
listProviderBusinesses(options?: RequestOptions): Promise<{
data: ProviderBusiness[];
}>;
TypeScript
listSupplierBusinesses(options?: RequestOptions): Promise<{
data: SupplierBusiness[];
}>;
TypeScript
/** Create a business identity; this does not qualify supply or publish an offer. */
createProviderBusiness(input: string | ProviderBusinessCreate, options?: RequestOptions): Promise<{
data: {
id: string;
slug: string;
};
}>;
TypeScript
createSupplierBusiness(input: string | ProviderBusinessCreate, options?: RequestOptions): Promise<{
data: {
id: string;
slug: string;
};
}>;
TypeScript
/** Only an unconfigured Provider can be removed; dependent configurations/offers/memberships return 409. */
deleteProviderBusiness(providerId: string, options?: RequestOptions): Promise<{
data: {
deleted: true;
};
}>;
TypeScript
deleteSupplierBusiness(supplierId: string, options?: RequestOptions): Promise<{
data: {
deleted: true;
};
}>;
TypeScript
/** Platform administration only; metadata contains no credentials or procurement prices. */
getProviderProfile(providerId: string, options?: RequestOptions): Promise<{
data: ProviderProfile;
}>;
TypeScript
/** Platform-only Provider integration default, independent of inference formats. */
getProviderIntegration(providerId: string, options?: RequestOptions): Promise<{
data: ProviderIntegration;
}>;
TypeScript
/** Platform-only configuration. Does not enable Credits or change existing balances. */
getCustomerUnitConfiguration(options?: RequestOptions): Promise<{
data: CustomerUnitConfiguration;
}>;
TypeScript
getCustomerUnitModePreview(target: 'currency' | 'credits', options?: RequestOptions): Promise<{
data: CustomerUnitModePreview;
}>;
TypeScript
prepareCustomerUnitMode(input: CustomerUnitModePreviewInput, options?: RequestOptions): Promise<{
data: CustomerUnitSavedModePreview;
}>;
TypeScript
getSavedCustomerUnitModePreview(previewId: string, options?: RequestOptions): Promise<{
data: CustomerUnitSavedModePreview;
}>;
TypeScript
publishCustomerUnitMode(input: {
preview_id: string;
expected_revision: string;
idempotency_key: string;
}, options?: RequestOptions): Promise<{
data: CustomerUnitModePublication;
}>;
TypeScript
getCustomerUnitBalance(organizationId: string, options?: RequestOptions): Promise<{
data: CustomerUnitBalance;
}>;
TypeScript
refundCustomerUnitCharge(organizationId: string, attemptId: string, input: CustomerUnitRefundInput, options?: RequestOptions): Promise<{
data: CustomerUnitRefund;
}>;
TypeScript
previewCustomerUnitPurchaseReversal(organizationId: string, orderId: string, query?: {
creditAtoms?: string;
}, options?: RequestOptions): Promise<{
data: CustomerUnitPurchaseReversalPreview;
}>;
TypeScript
reverseCustomerUnitPurchase(organizationId: string, orderId: string, input: CustomerUnitRefundInput, options?: RequestOptions): Promise<{
data: CustomerUnitPurchaseReversal;
}>;
TypeScript
getCustomerUnitTextTariff(model: string, options?: RequestOptions): Promise<{
data: CustomerUnitTextTariff;
}>;
TypeScript
publishCustomerUnitTextTariff(input: CustomerUnitTextTariffInput, options?: RequestOptions): Promise<{
data: CustomerUnitTextTariff;
}>;
TypeScript
listCustomerUnitMediaTariffs(model?: string, options?: RequestOptions): Promise<{
data: CustomerUnitMediaTariff[];
}>;
TypeScript
publishCustomerUnitMediaTariff(input: CustomerUnitMediaTariffInput, options?: RequestOptions): Promise<{
data: CustomerUnitMediaTariff;
}>;
TypeScript
issueCustomerUnitGrant(organizationId: string, input: CustomerUnitGrantInput, options?: RequestOptions): Promise<{
data: CustomerUnitGrant;
}>;
TypeScript
/** Platform-only exact purchase preview. Retried intent retains its original expiry. */
prepareCustomerUnitQuote(organizationId: string, input: CustomerUnitQuoteInput, options?: RequestOptions): Promise<{
data: CustomerUnitQuote;
}>;
TypeScript
getCustomerUnitQuote(organizationId: string, quoteId: string, options?: RequestOptions): Promise<{
data: CustomerUnitQuote;
}>;
TypeScript
publishCustomerUnitDefinition(input: CustomerUnitDefinitionInput, options?: RequestOptions): Promise<{
data: CustomerUnitDefinition;
}>;
TypeScript
publishCustomerUnitPurchaseRule(input: CustomerUnitPurchaseRuleInput, options?: RequestOptions): Promise<{
data: CustomerUnitPurchaseRule;
}>;
TypeScript
setProviderIntegration(providerId: string, input: {
integration_type: ProviderIntegrationType;
expected_revision: number;
}, options?: RequestOptions): Promise<{
data: ProviderIntegration;
}>;
TypeScript
/** Null selection inherits the owning Provider default; no default means unspecified Custom. */
getConnectionIntegration(connectionId: string, options?: RequestOptions): Promise<{
data: ProviderIntegration;
}>;
TypeScript
setConnectionIntegration(connectionId: string, input: {
integration_type: ProviderIntegrationType | null;
expected_revision: number;
}, options?: RequestOptions): Promise<{
data: ProviderIntegration;
}>;
TypeScript
getSupplierProfile(supplierId: string, options?: RequestOptions): Promise<{
data: SupplierProfile;
}>;
TypeScript
/** Empty strings clear optional metadata; omission/null preserves it. Retain the last read revision. */
updateProviderProfile(providerId: string, input: ProviderProfileUpdate, options?: RequestOptions): Promise<{
data: ProviderProfile;
}>;
TypeScript
updateSupplierProfile(supplierId: string, input: SupplierProfileUpdate, options?: RequestOptions): Promise<{
data: SupplierProfile;
}>;
TypeScript
/** Read the current publication for diagnostics or an explicit static replacement. */
getRoutingRegistryStatus(options?: RequestOptions): Promise<{
data: RoutingRegistryStatus;
}>;
TypeScript
/** A bounded directory page. Keep credentials fixed while following next_cursor. */
listWorkspacesPage(page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: Workspace[];
next_cursor: string | null;
}>;
TypeScript
/** Traverse the complete authorized directory; errors never return a partial result. */
listWorkspaces(options?: RequestOptions): Promise<{
data: Workspace[];
}>;
TypeScript
/** Iterate the live directory. Errors propagate; stale cursors are never silently restarted. */
iterateWorkspaces(query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): AsyncGenerator<Workspace>;
TypeScript
/** Read a scoped page; a missing or foreign cursor returns 409. */
listCompaniesPage(page?: CompanyPageOptions, options?: RequestOptions): Promise<CompanyPage>;
TypeScript
/** Traverse every authorized page; never return partial results after an error. */
listCompanies(options?: RequestOptions): Promise<{
data: CompanyMetadata[];
}>;
TypeScript
/** Installation-only atomic company/account creation; retain idempotencyKey on uncertain responses. */
createCompany(input: CompanyCreationInput, options?: CompanyCreateOptions): Promise<CreatedCompany>;
TypeScript
/** Read the installation-wide currency; null means setup is incomplete. */
getPlatformCurrency(options?: RequestOptions): Promise<{
data: {
currency: string | null;
};
}>;
TypeScript
configurePlatformCurrency(currency: string, options?: RequestOptions): Promise<{
data: {
currency: string;
};
}>;
TypeScript
/** Use options.idempotencyKey for safe replay and pass organizationId for an existing company. */
createWorkspace(input: WorkspaceInput, options?: WorkspaceCreateOptions): Promise<Workspace>;
TypeScript
/** Renaming preserves the backend-assigned routing reference. */
/** Workspace-id alias; the legacy company/workspace method remains available. */
renameWorkspaceById(workspaceId: string, name: string, options?: RequestOptions): Promise<{
id: string;
name: string;
}>;
TypeScript
/** Deletes only an empty workspace under the existing company-owner restrictions. */
deleteWorkspaceById(workspaceId: string, options?: RequestOptions): Promise<void>;
TypeScript
/** Accept workspace IDs for current callers and scoped legacy references for compatibility. */
renameWorkspace(scope: TenantScope | string, name: string, options?: RequestOptions): Promise<{
id: string;
name: string;
}>;
TypeScript
/** Only eligible empty workspaces may be deleted; existing business data is protected. */
deleteWorkspace(scope: TenantScope | string, options?: RequestOptions): Promise<void>;
TypeScript
/** Exact persisted route lookup; missing and out-of-scope workspaces both return 404. */
resolveWorkspaceRoute(routeSlug: string, options?: RequestOptions): Promise<WorkspaceRoute>;
TypeScript
/** Complete active Provider grants for the signed-in operator; installation sessions return an empty list. */
listProviderMemberships(options?: RequestOptions): Promise<{
data: ProviderMembership[];
}>;
TypeScript
listSupplierMemberships(options?: RequestOptions): Promise<{
data: SupplierMembership[];
}>;
TypeScript
/** Platform-only committed recovery progress; null fields mean no recorded worker step. */
getFinancialRecoveryDiagnostics(options?: RequestOptions): Promise<FinancialRecoveryDiagnostics>;
TypeScript
/** Platform administrator inventory; does not imply merchant activation or enabled checkout. */
listPaymentIntegrations(options?: RequestOptions): Promise<{
data: PaymentIntegration[];
}>;
TypeScript
/** Platform administrator read. Public display settings also exist at GET /v1/branding. */
getPlatformEPayConfiguration(options?: RequestOptions): Promise<{
data: EPayConfiguration;
}>;
TypeScript
/** Revision checked; no implicit retry or merchant activation claim. */
savePlatformEPayConfiguration(input: EPayConfigurationInput, options?: RequestOptions): Promise<{
data: EPayConfiguration;
}>;
TypeScript
/** Platform-only durable operation metadata. Reads never modify configuration. */
listPlatformAuditEvents(query?: PlatformAuditQuery, options?: RequestOptions): Promise<PlatformAuditPage>;
TypeScript
/** Saved Chat/Video timelines. Category is always explicit on the wire; never dispatches inference. */
sessions(workspace: string): {
list(query?: import("./generations-sessions.js").GenerationsSessionPageOptions, options?: RequestOptions): Promise<import("./generations-sessions.js").VideoGenerationsSessionPage>;
listChat(query?: import("./generations-sessions.js").GenerationsSessionPageOptions, options?: RequestOptions): Promise<import("./generations-sessions.js").ChatGenerationsSessionPage>;
iterate(query?: import("./generations-sessions.js").GenerationsSessionPageOptions, options?: RequestOptions): AsyncGenerator<import("./generations-sessions.js").VideoGenerationsSessionSummary>;
iterateChat(query?: import("./generations-sessions.js").GenerationsSessionPageOptions, options?: RequestOptions): AsyncGenerator<import("./generations-sessions.js").ChatGenerationsSessionSummary>;
retrieveChat(session: string, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").ChatGenerationsSession;
}>;
retrieve(session: string, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
create(session: string, input: {
title: string;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
update(session: string, input: {
expected_revision: string;
title: string;
archived: boolean;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
appendTurn(session: string, turn: string, input: {
expected_revision: string;
instruction: import("./generations-sessions.js").GenerationsInstruction;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
attachTask(session: string, turn: string, input: {
expected_revision: string;
task_id: string;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
bindIntent(session: string, turn: string, input: {
expected_revision: string;
intent_id: string;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
deleteInstruction(session: string, turn: string, expectedRevision: string, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
};
TypeScript
/** Compatibility facade for saved timelines, tasks and artifacts. Prefer sessions(workspace) for timelines. */
generations(scope: TenantScope | WorkspaceScope): {
sessions: {
list(query?: import("./generations-sessions.js").GenerationsSessionPageOptions, options?: RequestOptions): Promise<import("./generations-sessions.js").VideoGenerationsSessionPage>;
listChat(query?: import("./generations-sessions.js").GenerationsSessionPageOptions, options?: RequestOptions): Promise<import("./generations-sessions.js").ChatGenerationsSessionPage>;
iterate(query?: import("./generations-sessions.js").GenerationsSessionPageOptions, options?: RequestOptions): AsyncGenerator<import("./generations-sessions.js").VideoGenerationsSessionSummary>;
iterateChat(query?: import("./generations-sessions.js").GenerationsSessionPageOptions, options?: RequestOptions): AsyncGenerator<import("./generations-sessions.js").ChatGenerationsSessionSummary>;
retrieveChat(session: string, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").ChatGenerationsSession;
}>;
retrieve(session: string, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
create(session: string, input: {
title: string;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
update(session: string, input: {
expected_revision: string;
title: string;
archived: boolean;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
appendTurn(session: string, turn: string, input: {
expected_revision: string;
instruction: import("./generations-sessions.js").GenerationsInstruction;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
attachTask(session: string, turn: string, input: {
expected_revision: string;
task_id: string;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
bindIntent(session: string, turn: string, input: {
expected_revision: string;
intent_id: string;
}, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
deleteInstruction(session: string, turn: string, expectedRevision: string, options?: RequestOptions): Promise<{
data: import("./generations-sessions.js").VideoGenerationsSession;
}>;
};
tasks: {
list: (query?: GenerationInventoryQuery, options?: RequestOptions) => Promise<import("./generations-inventory.js").GenerationInventoryPage<import("./generations-inventory.js").GenerationTask>>;
retrieve: (task: string, options?: RequestOptions) => Promise<{
data: import("./generations-inventory.js").GenerationTask;
}>;
refresh: (task: string, options?: RequestOptions) => Promise<VideoJobState>;
refreshResult(task: string, kind: GenerationArtifactKind, options?: RequestOptions): Promise<Response>;
diagnostics: (task: string, options?: RequestOptions) => Promise<import("./generation-task-diagnostics.js").GenerationTaskDiagnostics>;
};
artifacts: {
list: (query?: GenerationInventoryQuery, options?: RequestOptions) => Promise<import("./generations-inventory.js").GenerationInventoryPage<import("./generations-inventory.js").GenerationArtifact>>;
retrieve: (task: string, kind: GenerationArtifactKind, options?: RequestOptions) => Promise<{
data: import("./generations-inventory.js").GenerationArtifact;
}>;
content: (task: string, kind: GenerationArtifactKind, options?: RequestOptions) => Promise<Response>;
captureStatus(task: string, kind: GenerationArtifactKind, options?: RequestOptions): Promise<{
data: import("./generation-artifact-capture.js").GenerationArtifactCapture;
}>;
capture(task: string, kind: GenerationArtifactKind, input: GenerationArtifactCaptureInput, options?: RequestOptions): Promise<{
data: import("./generation-artifact-capture.js").GenerationArtifactCapture;
}>;
};
};
TypeScript
getBranding(options?: RequestOptions): Promise<BrandingConfiguration>;
TypeScript
/** Revision-checked save. Empty palettes inherit Niu theme defaults. */
saveBranding(expectedRevision: string, settings: BrandingSettings, options?: RequestOptions): Promise<BrandingConfiguration>;
TypeScript
/** Actor-owned metadata only; retained request content requires retrieve permission. */
listVideoIntents(scope: TenantScope | WorkspaceScope, query?: VideoJobHistoryQuery, options?: RequestOptions): Promise<VideoIntentIndex>;
TypeScript
/** Persist an immutable request under a fresh client UUID. Does not generate or reserve funds. */
saveVideoIntent(scope: TenantScope | WorkspaceScope, intentId: string, keyId: string, request: VideoIntentRequest, options?: RequestOptions): Promise<{
data: VideoSubmissionIntent;
}>;
TypeScript
/** Actor-owned historical read independent of inference key expiry/revocation.
* Returned key IDs are context only; submission still checks current authority. */
getVideoIntent(scope: TenantScope | WorkspaceScope, intentId: string, options?: RequestOptions): Promise<{
data: VideoSubmissionIntent;
}>;
TypeScript
/** Explicit submission or replay. Never replace an uncertain submission with a fresh intent. */
submitVideoIntent(scope: TenantScope | WorkspaceScope, intentId: string, expectedRevision: number, options?: RequestOptions): Promise<VideoJobState>;
TypeScript
/** Erase retained input; does not cancel generation, delete the job, or refund charges. */
deleteVideoIntent(scope: TenantScope | WorkspaceScope, intentId: string, expectedRevision: number, options?: RequestOptions): Promise<VideoIntentDeletion>;
TypeScript
/** Cancel a prepared native-material operation with current workspace Write access.
* Independent of inference-key expiry or revocation; never dispatches or cancels
* an operation whose upstream outcome is unknown.
*/
cancelPreparedMediaOperation(scope: TenantScope, operationId: string, model: string, options?: RequestOptions): Promise<{
data: {
status: 'not_sent';
};
}>;
TypeScript
/** Read saved native operations with current workspace Read access.
* The original key may be expired or revoked. An optional saved group pins
* its account binding; omitting it reads all saved accounts for this key/model.
* This helper never dispatches, refreshes upstream state or restores key grants.
*/
mediaOperationModels(scope: TenantScope, keyId: string, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: string[];
next_cursor: string | null;
}>;
TypeScript
/** Read exact saved key/model history without restoring inference authority. */
mediaOperationHistory(scope: TenantScope, context: MediaOperationHistoryContext): {
list: (query?: MediaOperationHistoryQuery, options?: RequestOptions) => Promise<MediaAssetPage<MediaAssetOperation>>;
retrieve: (operationId: string, options?: RequestOptions) => Promise<{
data: MediaAssetOperation;
}>;
retrieveByIdempotency: (idempotencyKey: string, options?: RequestOptions) => Promise<{
data: MediaAssetOperation;
}>;
};
TypeScript
/** Session-authenticated media with an explicit current key/account context. */
dashboardMedia(scope: TenantScope, keyId: string): {
capabilities: (model?: string, options?: RequestOptions) => Promise<import("./provider-capabilities.js").NativeProviderCapabilities>;
verification: {
create: (input: import("./media-verification.js").MediaVerificationInput, options?: import("./media-assets.js").MediaAssetMutationOptions) => Promise<{
data: import("./media-verification.js").MediaVerificationSession;
}>;
list: (input: {
model: string;
after?: string;
limit?: number;
}, options?: RequestOptions) => Promise<{
data: import("./media-verification.js").MediaVerificationSession[];
next_cursor: string | null;
}>;
retrieve: (id: string, model: string, options?: RequestOptions) => Promise<{
data: import("./media-verification.js").MediaVerificationSession;
}>;
link: (id: string, model: string, options?: RequestOptions) => Promise<import("./media-verification.js").MediaVerificationLink>;
refresh: (id: string, model: string, options?: RequestOptions) => Promise<{
data: import("./media-verification.js").MediaVerificationSession;
}>;
};
groups: {
list: (input: {
model: string;
after?: string;
limit?: number;
}, options?: RequestOptions) => Promise<MediaAssetPage<import("./media-assets.js").MediaAssetGroup>>;
create: (input: {
model: string;
name: string;
description?: string;
}, options?: import("./media-assets.js").MediaAssetMutationOptions) => Promise<import("./media-assets.js").MediaAssetMutation>;
retrieve: (id: string, model: string, options?: RequestOptions) => Promise<{
data: import("./media-assets.js").MediaAssetGroup;
}>;
update: (id: string, input: {
model: string;
name?: string;
description?: string;
expected_revision?: string;
}, options?: import("./media-assets.js").MediaAssetMutationOptions) => Promise<import("./media-assets.js").MediaAssetMutation>;
delete: (id: string, input: {
model: string;
expected_revision?: string;
}, options?: import("./media-assets.js").MediaAssetMutationOptions) => Promise<import("./media-assets.js").MediaAssetMutation>;
refresh: (id: string, model: string, options?: RequestOptions) => Promise<{
data: import("./media-assets.js").MediaAssetGroup;
}>;
};
assets: {
list: (input: {
model: string;
after?: string;
limit?: number;
} & {
group_id?: string;
}, options?: RequestOptions) => Promise<MediaAssetPage<import("./media-assets.js").MediaAsset>>;
create: (input: {
model: string;
group_id: string;
url: string;
name?: string;
kind: "image" | "video" | "audio";
}, options?: import("./media-assets.js").MediaAssetMutationOptions) => Promise<import("./media-assets.js").MediaAssetMutation>;
retrieve: (id: string, model: string, options?: RequestOptions) => Promise<{
data: import("./media-assets.js").MediaAsset;
}>;
update: (id: string, input: {
model: string;
name: string;
expected_revision?: string;
}, options?: import("./media-assets.js").MediaAssetMutationOptions) => Promise<import("./media-assets.js").MediaAssetMutation>;
delete: (id: string, input: {
model: string;
expected_revision?: string;
}, options?: import("./media-assets.js").MediaAssetMutationOptions) => Promise<import("./media-assets.js").MediaAssetMutation>;
refresh: (id: string, model: string, options?: RequestOptions) => Promise<{
data: import("./media-assets.js").MediaAsset;
}>;
};
operations: {
prepare: (input: import("./media-assets.js").MediaAssetOperationInput, options: import("./media-assets.js").MediaAssetPreparationOptions) => Promise<import("./media-assets.js").MediaAssetMutation>;
dispatch: (id: string, input: import("./media-assets.js").MediaAssetOperationInput, options: import("./media-assets.js").MediaAssetPreparationOptions) => Promise<import("./media-assets.js").MediaAssetMutation>;
cancel: (id: string, model: string, options?: RequestOptions) => Promise<{
data: MediaAssetOperation;
}>;
list: (input: {
model: string;
after?: string;
limit?: number;
}, options?: RequestOptions) => Promise<MediaAssetPage<MediaAssetOperation>>;
retrieveByIdempotency: (idempotencyKey: string, model: string, options?: RequestOptions) => Promise<{
data: MediaAssetOperation;
}>;
retrieve: (id: string, model: string, options?: RequestOptions) => Promise<{
data: MediaAssetOperation;
}>;
};
};
TypeScript
/** Uses the member session and current key grants via X-Niu-Key-Id; never requires the key secret. */
listDashboardVideoJobs(scope: TenantScope, keyId: string, query?: VideoJobHistoryQuery, options?: RequestOptions): Promise<VideoJobHistory>;
TypeScript
listDashboardVideoModels(scope: TenantScope, keyId: string, options?: RequestOptions): Promise<VideoModelList>;
TypeScript
estimateDashboardVideo(scope: TenantScope, keyId: string, input: VideoCreateRequest, options?: RequestOptions): Promise<VideoEstimate>;
TypeScript
createDashboardVideoJob(scope: TenantScope, keyId: string, input: VideoCreateRequest, options?: VideoCreateOptions): Promise<VideoJobState>;
TypeScript
getDashboardVideoJob(scope: TenantScope, keyId: string, jobId: string, options?: RequestOptions): Promise<VideoJobState>;
TypeScript
getDashboardVideoBilling(scope: TenantScope, keyId: string, jobId: string, options?: RequestOptions): Promise<VideoJobBilling>;
TypeScript
/** Saved safe query receipts; no polling or financial mutation. */
getDashboardVideoObservations(scope: TenantScope, keyId: string, jobId: string, query?: VideoQueryObservationQuery, options?: RequestOptions): Promise<VideoQueryObservationPage>;
TypeScript
getDashboardVideoTimings(scope: TenantScope, keyId: string, jobId: string, options?: RequestOptions): Promise<VideoTransportTimings>;
TypeScript
/** May query the original Provider job; never resubmits generation. */
refreshDashboardVideoJob(scope: TenantScope, keyId: string, jobId: string, options?: RequestOptions): Promise<VideoJobState>;
TypeScript
getDashboardVideoResultsStatus(scope: TenantScope, keyId: string, jobId: string, options?: RequestOptions): Promise<VideoResultAvailability>;
TypeScript
getDashboardVideoResult(scope: TenantScope, keyId: string, jobId: string, kind: 'video' | 'last_frame', options?: RequestOptions): Promise<Response>;
TypeScript
/** Query the original task and deliver its current output once; never generates. */
refreshDashboardVideoResult(scope: TenantScope, keyId: string, jobId: string, kind: 'video' | 'last_frame', options?: RequestOptions): Promise<Response>;
TypeScript
deleteDashboardVideoResults(scope: TenantScope, keyId: string, jobId: string, options?: RequestOptions): Promise<{
deleted: true;
}>;
TypeScript
/** Platform-only current-configuration traffic, independent of offers and earnings.
* Range totals are independent of model pagination; pages are live snapshots.
*/
getProviderConfigurationUsage(providerId: string, range: ProviderConfigurationUsageQuery, options?: RequestOptions): Promise<{
data: ProviderConfigurationUsage;
}>;
TypeScript
getSupplierConfigurationUsage(supplierId: string, range: SupplierConfigurationUsageQuery, options?: RequestOptions): Promise<{
data: SupplierConfigurationUsage;
}>;
TypeScript
/** Current own-Provider rates, with explicit alias continuation; no customer identities. */
listProviderOffersPage(providerId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: ProviderOffer[];
next_after: string | null;
}>;
TypeScript
listSupplierOffersPage(supplierId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: SupplierOffer[];
next_after: string | null;
}>;
TypeScript
/** Traverse current offers; pages are not a frozen multi-request snapshot. */
listProviderOffers(providerId: string, options?: RequestOptions): Promise<ProviderOffer[]>;
TypeScript
listSupplierOffers(supplierId: string, options?: RequestOptions): Promise<SupplierOffer[]>;
TypeScript
/** Platform-administrator publication of a new immutable rate revision and clears prior qualification. */
publishProviderRates(providerId: string, rates: ProviderRateInput, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
publishSupplierRates(supplierId: string, rates: SupplierRateInput, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
/** Platform administration or active membership in this Provider is required. */
getProviderOfferRevision(providerId: string, offerId: string, revisionId: string, options?: RequestOptions): Promise<{
data: ProviderOfferRevision;
}>;
TypeScript
getSupplierOfferRevision(supplierId: string, offerId: string, revisionId: string, options?: RequestOptions): Promise<{
data: SupplierOfferRevision;
}>;
TypeScript
/** Scoped procurement history; follow next_before until has_more is false. */
listProviderOfferHistory(providerId: string, offerId: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<ProviderOfferHistory>;
TypeScript
listSupplierOfferHistory(supplierId: string, offerId: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<SupplierOfferHistory>;
TypeScript
/** Platform-only full earning history for settlement selection. IDs are never display labels. */
listProviderEarnings(providerId: string, page?: LedgerHistoryQuery, options?: RequestOptions): Promise<ProviderEarningPage>;
TypeScript
listSupplierEarnings(supplierId: string, page?: LedgerHistoryQuery, options?: RequestOptions): Promise<SupplierEarningPage>;
TypeScript
/** Record confirmed external payment only; preserve the supplied key/reference/selection on retry. */
recordProviderSettlement(providerId: string, input: ProviderSettlementInput, options?: RequestOptions): Promise<{
data: {
id: string;
};
}>;
TypeScript
recordSupplierSettlement(supplierId: string, input: SupplierSettlementInput, options?: RequestOptions): Promise<{
data: {
id: string;
};
}>;
TypeScript
/** All-time Provider payment history; keep filters fixed while following next_cursor. */
listProviderSettlements(providerId: string, page?: ProviderSettlementQuery, options?: RequestOptions): Promise<ProviderSettlementPage>;
TypeScript
listSupplierSettlements(supplierId: string, page?: SupplierSettlementQuery, options?: RequestOptions): Promise<SupplierSettlementPage>;
TypeScript
/** Platform-administrator review. Does not activate offers or verify the underlying evidence. */
qualifyProvider(providerId: string, input: ProviderQualificationInput, options?: RequestOptions): Promise<{
data: {
qualification_status: 'qualified';
};
}>;
TypeScript
qualifySupplier(supplierId: string, input: SupplierQualificationInput, options?: RequestOptions): Promise<{
data: {
qualification_status: 'qualified';
};
}>;
TypeScript
/** Platform-administrator qualification review, pinned to the current rate revision; does not activate the offer. */
qualifyProviderOffer(providerId: string, offerId: string, input: ProviderOfferQualificationInput, options?: RequestOptions): Promise<{
data: {
qualification_status: 'qualified';
};
}>;
TypeScript
qualifySupplierOffer(supplierId: string, offerId: string, input: SupplierOfferQualificationInput, options?: RequestOptions): Promise<{
data: {
qualification_status: 'qualified';
};
}>;
TypeScript
revokeProviderQualification(providerId: string, reasonSha256: string, options?: RequestOptions): Promise<{
data: {
qualification_status: 'revoked';
};
}>;
TypeScript
revokeSupplierQualification(supplierId: string, reasonSha256: string, options?: RequestOptions): Promise<{
data: {
qualification_status: 'revoked';
};
}>;
TypeScript
revokeProviderOfferQualification(providerId: string, offerId: string, reasonSha256: string, options?: RequestOptions): Promise<{
data: {
qualification_status: 'revoked';
};
}>;
TypeScript
revokeSupplierOfferQualification(supplierId: string, offerId: string, reasonSha256: string, options?: RequestOptions): Promise<{
data: {
qualification_status: 'revoked';
};
}>;
TypeScript
/** Requires Provider owner/admin or installation access; activation still requires current qualification. */
setProviderOfferActive(providerId: string, offerId: string, active: boolean, options?: RequestOptions): Promise<{
data: {
active: boolean;
};
}>;
TypeScript
setSupplierOfferActive(supplierId: string, offerId: string, active: boolean, options?: RequestOptions): Promise<{
data: {
active: boolean;
};
}>;
TypeScript
/** Retrieve one workspace API key with its unified limits and 60s usage window. */
getWorkspaceKey(scope: TenantScope | string, keyId: string, options?: RequestOptions): Promise<WorkspaceKeyDetail>;
TypeScript
/** Workspace owner/admin write access. Requires an explicit finite or null lifetime. */
createWorkspaceKey(scope: TenantScope | string, input: WorkspaceKeyCreateInput, options?: RequestOptions): Promise<IssuedWorkspaceKey & {
key: WorkspaceKeyDetail | null;
}>;
TypeScript
/** Durable creation. Reuse requestId and identical input after an uncertain result; a replay never repeats the secret. */
createWorkspaceKeyRequest(scope: TenantScope | string, requestId: string, input: WorkspaceKeyCreateInput, options?: RequestOptions): Promise<WorkspaceKeyMutationResult>;
TypeScript
/** Durable rotation. A recovered result identifies the replacement but cannot recover its secret. */
rotateWorkspaceKeyRequest(scope: TenantScope | string, requestId: string, keyId: string, options?: RequestOptions): Promise<WorkspaceKeyMutationResult>;
TypeScript
/** A null observation is not proof of rollback; an in-flight request may still commit. */
getWorkspaceKeyRequest(scope: TenantScope | string, requestId: string, options?: RequestOptions): Promise<WorkspaceKeyRequestStatus>;
TypeScript
/** Changes metadata or policy limits; preserves expiration and secret. */
updateWorkspaceKey(scope: TenantScope | string, keyId: string, input: WorkspaceKeyUpdateInput, options?: RequestOptions): Promise<WorkspaceKeyDetail>;
TypeScript
/** Returns the replacement secret once; preserves expiry and shared lineage limits. */
rotateWorkspaceKey(scope: TenantScope | string, keyId: string, options?: RequestOptions): Promise<IssuedWorkspaceKey & {
key: WorkspaceKeyDetail | null;
}>;
TypeScript
/** Blocks new access while retaining saved metadata and request history. */
revokeWorkspaceKey(scope: TenantScope | string, keyId: string, options?: RequestOptions): Promise<void>;
TypeScript
/** Scoped key metadata without secrets; uncertain dispatches still count as last use. */
listWorkspaceKeys(scope: TenantScope | string, options?: RequestOptions): Promise<{
data: WorkspaceKeyDetail[];
}>;
TypeScript
/** Iterate authorized key details without materializing the complete directory. */
iterateWorkspaceKeys(scope: TenantScope | string, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): AsyncGenerator<WorkspaceKeyDetail>;
TypeScript
/** Explicit bounded page; the complete-directory method remains compatible. */
listWorkspaceKeyPage(scope: TenantScope | string, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<WorkspaceKeyDetailPage>;
TypeScript
/** Shared company funds require organization-wide owner/admin authorization. */
/** Platform-only named company accounts. Does not grant ordinary tenant access or create funds. */
listPlatformCustomerAccounts(page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: {
organization_id: string;
organization_name: string;
accounts: CustomerBalance[];
}[];
next_after: string | null;
}>;
TypeScript
getCustomerBalance(organizationId: string, options?: RequestOptions): Promise<{
data: CustomerBalance[];
}>;
TypeScript
/** Workspace read access. Missing receipt returns 404; never queries upstream or changes billing. */
getRequestUsageReconciliation(scope: TenantScope, attemptId: string, options?: RequestOptions): Promise<RequestUsageReconciliation>;
TypeScript
/** Installation write only. Records supplemental usage; financial recovery settles separately. */
reconcileRequestUsage(scope: TenantScope, attemptId: string, options?: RequestOptions): Promise<RequestUsageReconciliation>;
TypeScript
/** Company-wide balance permission required. Keep currency fixed while following next_before. */
listCustomerBalanceReservations(organizationId: string, page?: CustomerBalanceReservationQuery, options?: RequestOptions): Promise<{
data: CustomerBalanceReservation[];
next_before: string | null;
}>;
TypeScript
/** Read-only customer charge-to-ledger comparison; does not certify payment settlement. */
getCustomerChargeReconciliation(organizationId: string, options?: RequestOptions): Promise<{
data: CustomerChargeReconciliation[];
}>;
TypeScript
/** Create/replay a supported-currency top-up; preserve the idempotency key after uncertainty. No automatic retry. */
createCustomerTopup(organizationId: string, input: CustomerTopupInput, options?: RequestOptions): Promise<{
data: CustomerTopup;
}>;
TypeScript
/** Read saved status without an upstream query or payment mutation. */
getCustomerTopup(organizationId: string, orderId: string, options?: RequestOptions): Promise<{
data: CustomerTopup;
}>;
TypeScript
/** Installation-only original-merchant query recovery. May perform an upstream query;
* never creates a checkout or automatically retries. Pending EPay query recovery is unsupported.
* Paid/closed status replays use durable local state without an upstream call. */
reconcileCustomerTopup(organizationId: string, orderId: string, options?: RequestOptions): Promise<{
data: CustomerTopup;
}>;
TypeScript
getCustomerPaymentMethods(organizationId: string, options?: RequestOptions & {
currency?: string;
payment_gateway?: CustomerTopupInput['payment_gateway'];
}): Promise<{
data: CustomerPaymentMethods;
}>;
TypeScript
listCustomerTopups(organizationId: string, options?: RequestOptions & {
before?: string;
}): Promise<{
data: (CustomerTopup & {
created_at: string;
})[];
next_cursor: string | null;
}>;
TypeScript
/** Installation-only ledger refund/reversal. Never initiates an external payment or automatically retries. */
reverseCustomerBalanceEntry(organizationId: string, entryId: string, input: CustomerBalanceReversalInput, options?: RequestOptions): Promise<{
data: {
recorded: true;
};
}>;
TypeScript
/** Company ledger pages of up to 100 entries. Pass next_cursor as before. */
getCustomerBalanceTransactions(organizationId: string, options?: RequestOptions & {
before?: string;
currency?: string;
kind?: CustomerBalanceTransaction['kind'];
}): Promise<{
data: CustomerBalanceTransaction[];
next_cursor: string | null;
}>;
TypeScript
/** Company-scoped immutable credit/warning revisions. Pass next_before for older pages. */
getCustomerBalancePolicyHistory(organizationId: string, currency: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<CustomerBalancePolicyHistory>;
TypeScript
/** Platform-only approved credit policy. Changes borrowing capacity, never posts received funds. No automatic retry. */
setCustomerBalancePolicy(organizationId: string, currency: string, input: CustomerBalancePolicyInput, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
/** Durable intent only; never posts funds. Publish the exact returned input with its original key. */
prepareCustomerBalanceGrant(organizationId: string, currency: string, input: CustomerBalanceGrantInput, options?: RequestOptions): Promise<{
data: PreparedCustomerBalanceGrant;
}>;
TypeScript
/** Read original intent; prepared never proves that an in-flight publication failed. */
getPreparedCustomerBalanceGrant(organizationId: string, currency: string, key: string, options?: RequestOptions): Promise<{
data: PreparedCustomerBalanceGrant;
}>;
TypeScript
/** Durable grant intent history, currency-scoped, newest first; no automatic issuance. */
listPreparedCustomerBalanceGrants(organizationId: string, currency: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: PreparedCustomerBalanceGrant[];
next_before: string | null;
}>;
TypeScript
/** Platform-only noncash gift. Reuse the same idempotency key for an exact retry; never creates a payment receipt. */
grantCustomerBalance(organizationId: string, currency: string, input: CustomerBalanceGrantInput, options?: RequestOptions): Promise<{
data: {
id: string;
application_policy: 'future_only' | 'unpaid_credit_first';
applied_to_credit_nanos: string;
retained_for_future_consumption_nanos: string;
};
}>;
TypeScript
/** Platform-only full unused-gift correction. Retain the original key on an uncertain response; no automatic retry. */
correctUnusedCustomerBalanceGrant(organizationId: string, currency: string, grantId: string, input: CustomerBalanceGiftCorrectionInput, options?: RequestOptions): Promise<{
data: {
id: string;
};
}>;
TypeScript
/** Read one original gift and its correction to recover an uncertain response. */
getIssuedCustomerBalanceGrant(organizationId: string, currency: string, grantId: string, options?: RequestOptions): Promise<{
data: IssuedCustomerBalanceGrant;
}>;
TypeScript
/** Platform-only original gifts with separate correction history; internal references are not display labels. */
listIssuedCustomerBalanceGrants(organizationId: string, currency: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: IssuedCustomerBalanceGrant[];
next_before: string | null;
}>;
TypeScript
/** Company warning preference only; cannot alter funds or approved credit. */
setCustomerBalanceWarning(organizationId: string, currency: string, input: {
warning_threshold_nanos: string | null;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
/** Customer-safe billing read; server workspace authorization is authoritative. */
getCustomerBilling(scope: TenantScope, options?: RequestOptions): Promise<{
data: CustomerBilling;
}>;
TypeScript
/** Scoped immutable selling history; amount strings are never coerced to numbers. */
getCustomerTariffHistory(scope: TenantScope, model: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<CustomerTariffHistory>;
TypeScript
/** Current shared tariff-eligible aliases; publication rechecks availability. */
listPlatformPricingModels(page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: {
model_alias: string;
media: {
channel: string;
resolutions: string[];
reference_video: boolean;
meter: string;
} | null;
}[];
next_after: string | null;
}>;
TypeScript
/** Platform-only named companies, including companies without workspaces or accounts. */
listRetailCustomerTargets(page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: {
organization_id: string;
organization_name: string;
created_at: string;
}[];
next_after: string | null;
}>;
TypeScript
/** Registered shared aliases, including disabled configuration; not supply readiness. */
listRegisteredRetailModels(page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: {
model_alias: string;
}[];
next_after: string | null;
}>;
TypeScript
/** Platform-only read; never changes routes or initiates payment. Unknown amounts remain null. */
getCommercialPosition(query: {
currency: string;
days?: 7 | 30 | 90;
from?: string;
until?: string;
}, options?: RequestOptions): Promise<CommercialPosition>;
TypeScript
/** Platform-only posting summary. Cash receipts, gift issuance and net consumption revenue are distinct. */
getCustomerFinancialSummary(query: {
currency: string;
days?: 7 | 30 | 90;
from?: string;
until?: string;
}, options?: RequestOptions): Promise<CustomerFinancialSummary>;
TypeScript
/** Platform-only explicit liability evidence; publication does not authorize dispatch. */
publishMediaLiabilityQualification(supplier: string, offer: string, input: MediaLiabilityPublication, options?: RequestOptions): Promise<{
data: MediaLiabilityPublicationResult;
}>;
TypeScript
/** Platform-only immutable qualification history. Quantities do not imply an available route. */
listMediaLiabilityQualifications(supplier: string, offer: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<MediaLiabilityQualificationPage>;
TypeScript
/** Future admission only; already pinned jobs retain their bound. */
retireMediaLiabilityQualification(supplier: string, offer: string, revision: string, input: MediaLiabilityRevocation, options?: RequestOptions): Promise<{
data: MediaLiabilityPublicationResult;
}>;
TypeScript
/** Platform configuration only; does not create funding or qualify a video route. */
setRetailMediaEnrollment(scope: TenantScope, input: RetailMediaEnrollmentPublication, options?: RequestOptions): Promise<{
data: RetailMediaEnrollmentResult;
}>;
TypeScript
/** Own customer selection is advisory; immutable task binding happens during admission. */
getRetailMediaEnrollment(scope: TenantScope, dimensions: MediaBillingDimensions, meter: string, options?: RequestOptions): Promise<{
data: RetailMediaEnrollment;
}>;
TypeScript
/** Platform selling publication; preserves exact prior outcome for the same canonical intent/key. */
publishRetailStandard(input: RetailStandardPublication, options?: RequestOptions): Promise<{
data: RetailPublicationResult;
}>;
TypeScript
listRetailStandards(page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: RetailPriceRecord[];
next_after: string | null;
}>;
TypeScript
/** Finite explicit result; customer-specific rules override global rules without stacking. */
publishRetailPromotion(priceId: string, input: RetailPromotionPublication, options?: RequestOptions): Promise<{
data: RetailPublicationResult;
}>;
TypeScript
/** Complete cutoff coverage per page; temporal state is not customer selection or admission. */
listRetailPromotions(priceId: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<RetailPromotionPage>;
TypeScript
retireRetailPromotion(priceId: string, promotionId: string, input: RetailPromotionRetirement, options?: RequestOptions): Promise<{
data: RetailPublicationResult;
}>;
TypeScript
getRetailPriceHistory(priceId: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<RetailPriceHistory>;
TypeScript
/** Platform preview, not enrollment, spending permission or a request price snapshot. */
previewRetailPrice(priceId: string, customerOrganizationId: string, options?: RequestOptions): Promise<RetailSelection>;
TypeScript
setRetailTextEnrollment(scope: TenantScope, input: RetailTextEnrollmentPublication, options?: RequestOptions): Promise<{
data: Omit<RetailTextEnrollment, 'pricing_source' | 'effective_price'> & {
revision: string;
};
}>;
TypeScript
getRetailTextEnrollment(scope: TenantScope, modelAlias: string, options?: RequestOptions): Promise<{
data: RetailTextEnrollment;
}>;
TypeScript
/** Named pricing targets; platform permission does not grant customer data access. */
listPlatformPricingTargets(page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: {
organization_id: string;
organization_name: string;
workspace_id: string;
workspace_name: string;
}[];
next_after: string | null;
}>;
TypeScript
/** Current selling prices only; pass next_after unchanged to continue. */
listPlatformCustomerTariffs(scope: TenantScope, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: (CustomerTariff & {
created_at: string;
pricing_health?: PlatformPricingHealth;
})[];
next_after: string | null;
}>;
TypeScript
/** Platform-only selling history, independent of customer content permissions. */
getPlatformCustomerTariffHistory(scope: TenantScope, model: string, page?: {
before?: string;
limit?: number;
}, options?: RequestOptions): Promise<CustomerTariffHistory>;
TypeScript
/** Explicit platform-administrator retail publication. No retry or Provider-price fallback. */
publishCustomerTariff(scope: TenantScope, rates: CustomerTariffInput, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
/** Platform-administrator video selling configuration; publication does not qualify dispatch. */
publishCustomerMediaRate(organizationId: string, input: CustomerMediaRateCard, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
/** Named qualified commercial video choices without procurement or credentials. */
listCustomerMediaRateModels(organizationId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: CustomerMediaRateModel[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
/** Platform-administrator customer price history; never includes purchase prices. */
listCustomerMediaRates(organizationId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: CustomerMediaRateRecord[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
/** Atomically replace a dimensional selling schedule; no automatic mutation retries. */
replaceCustomerMediaRate(organizationId: string, previousRevision: string, input: CustomerMediaRateCard, options?: RequestOptions): Promise<{
data: {
revision: string;
effective_from: string;
};
}>;
TypeScript
/** Platform-administrator agreed Provider media purchase terms; independent from retail pricing. */
publishProviderMediaRate(providerId: string, input: ProviderMediaRateCard, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
publishSupplierMediaRate(supplierId: string, input: SupplierMediaRateCard, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
/** Atomically publish new terms and end the previous schedule at their start. */
replaceProviderMediaRate(providerId: string, previousRevision: string, input: ProviderMediaRateCard, options?: RequestOptions): Promise<{
data: {
revision: string;
effective_from: string;
};
}>;
TypeScript
replaceSupplierMediaRate(supplierId: string, previousRevision: string, input: SupplierMediaRateCard, options?: RequestOptions): Promise<{
data: {
revision: string;
effective_from: string;
};
}>;
TypeScript
/** Exact purchase history, authorized for installation or this Provider's active member. */
listProviderMediaRates(providerId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: ProviderMediaRateRecord[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
listSupplierMediaRates(supplierId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: SupplierMediaRateRecord[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
/** Read named configuration choices without credentials or purchase/customer prices. */
listProviderMediaRateModels(providerId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: ProviderMediaRateModel[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
listSupplierMediaRateModels(supplierId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: SupplierMediaRateModel[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
/** Platform-administrator draft choices; no credentials, procurement or customer prices. Continue by next_after while has_more, even when data is empty. */
listProviderMediaOfferModels(providerId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: ProviderMediaOfferModel[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
listSupplierMediaOfferModels(supplierId: string, page?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: SupplierMediaOfferModel[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
/** Publishes an inactive media offer without text prices. Never retries automatically. */
publishProviderMediaOffer(providerId: string, input: ProviderMediaOfferInput, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
publishSupplierMediaOffer(supplierId: string, input: SupplierMediaOfferInput, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
/** Platform-administrator cutoff; existing purchase snapshots and earnings stay immutable. */
retireProviderMediaRate(providerId: string, revision: string, effectiveUntil: number, options?: RequestOptions): Promise<{
data: {
revision: string;
effective_until: string;
};
}>;
TypeScript
retireSupplierMediaRate(supplierId: string, revision: string, effectiveUntil: number, options?: RequestOptions): Promise<{
data: {
revision: string;
effective_until: string;
};
}>;
TypeScript
/** End eligibility without changing published prices or historical job snapshots. */
retireCustomerMediaRate(organizationId: string, revision: string, effectiveUntil: number, options?: RequestOptions): Promise<{
data: {
revision: string;
effective_until: string;
};
}>;
TypeScript
/** Full customer-only invoice history; existing balance debits count as settlement. */
listCustomerInvoices(scope: TenantScope, page?: LedgerHistoryQuery, options?: RequestOptions): Promise<CustomerInvoicePage>;
TypeScript
/** Installation-only invoice closure. Preserve the caller's idempotency key on manual replay. */
issueCustomerInvoice(scope: TenantScope, input: CustomerInvoiceInput, options?: RequestOptions): Promise<{
data: {
id: string;
};
}>;
TypeScript
/** Workspace-authorized customer line items. Unknown/out-of-scope invoices return 404; amounts and token counts remain exact decimal strings. */
getCustomerInvoiceLines(scope: TenantScope, invoiceId: string, options?: RequestOptions, mediaAfter?: string): Promise<{
data: CustomerInvoiceLine[];
media_lines?: CustomerInvoiceMediaLine[];
media_next_cursor?: string | null;
}>;
TypeScript
/** Installation-only record of a confirmed external payment; does not collect or transfer money. */
recordCustomerInvoicePayment(scope: TenantScope, invoiceId: string, paymentReference: string, options?: RequestOptions): Promise<{
data: {
id: string;
};
}>;
TypeScript
getWorkspaceGuardrail(scope: TenantScope, options?: RequestOptions): Promise<{
data: {
revision: number;
policy: GuardrailPolicy;
} | null;
}>;
TypeScript
getKeyIpPolicy(scope: TenantScope, keyId: string, options?: RequestOptions): Promise<{
data: KeyIpPolicy;
}>;
TypeScript
/** Null allows all sources; [] denies all. Secret rotation preserves the policy. */
setKeyIpPolicy(scope: TenantScope, keyId: string, input: {
allowed_cidrs: string[] | null;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
listKeyIpPolicyHistory(scope: TenantScope, keyId: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: KeyIpPolicyRevision[];
}>;
TypeScript
/** Read known token subtotals; unknown requests are not zero usage. No TPM enforcement. */
getKeyTokenUsageWindow(scope: TenantScope, keyId: string, options?: RequestOptions): Promise<{
data: KeyTokenUsageWindow;
}>;
TypeScript
/** All matching configurations, including disabled entries. No silent row cap.
* Platform administration required; supplying a Provider ID filters business ownership. */
listProviderCredentials(query?: {
providerId?: string;
supplierId?: string;
}, options?: RequestOptions): Promise<{
data: ProviderCredential[];
}>;
TypeScript
listSupplierCredentials(query?: {
supplierId?: string;
}, options?: RequestOptions): Promise<{
data: SupplierCredential[];
}>;
TypeScript
/** Platform-only creation; preserve the returned configuration identity. No automatic retry. */
createProviderCredential(input: ProviderCredentialCreateInput, options?: RequestOptions): Promise<{
data: Omit<ProviderCredential, 'supplier'>;
}>;
TypeScript
createSupplierCredential(input: SupplierCredentialCreateInput, options?: RequestOptions): Promise<{
data: Omit<SupplierCredential, 'supplier'>;
}>;
TypeScript
/** Optimistic update of one configuration. Omitted api_key preserves the secret. */
updateProviderCredential(id: string, input: ProviderCredentialUpdateInput, options?: RequestOptions): Promise<{
data: Omit<ProviderCredential, 'supplier'>;
}>;
TypeScript
updateSupplierCredential(id: string, input: SupplierCredentialUpdateInput, options?: RequestOptions): Promise<{
data: Omit<SupplierCredential, 'supplier'>;
}>;
TypeScript
/** Complete per-credential management inventory; availability is not commercial qualification. */
listProviderModels(credentialId: string, options?: RequestOptions): Promise<{
data: ProviderModelAvailability[];
}>;
TypeScript
listSupplierModels(credentialId: string, options?: RequestOptions): Promise<{
data: SupplierModelAvailability[];
}>;
TypeScript
/** Create a new alias or update using its current revision. Alias ownership cannot move. */
upsertProviderModel(credentialId: string, input: ProviderModelInput, options?: RequestOptions): Promise<{
data: ProviderModel;
}>;
TypeScript
upsertSupplierModel(credentialId: string, input: SupplierModelInput, options?: RequestOptions): Promise<{
data: SupplierModel;
}>;
TypeScript
/** Bounded upstream catalog probe using the saved credential. Does not generate output. */
checkProviderModel(credentialId: string, alias: string, options?: RequestOptions): Promise<{
data: ProviderModelCheck;
}>;
TypeScript
checkSupplierModel(credentialId: string, alias: string, options?: RequestOptions): Promise<{
data: SupplierModelCheck;
}>;
TypeScript
/** Read the bounded upstream inventory; does not create aliases or configure billing. */
discoverProviderModels(credentialId: string, options?: RequestOptions): Promise<ProviderDiscovery>;
TypeScript
discoverSupplierModels(credentialId: string, options?: RequestOptions): Promise<ProviderDiscovery>;
TypeScript
/** Refresh matching metadata only. Concurrent configuration changes return 409; no automatic retry. */
refreshProviderCatalog(credentialId: string, options?: RequestOptions): Promise<{
updated: number;
}>;
TypeScript
refreshSupplierCatalog(credentialId: string, options?: RequestOptions): Promise<{
updated: number;
}>;
TypeScript
/** Platform-only safe-failure state; reading does not probe or reset the credential. */
getProviderCooldown(providerId: string, options?: RequestOptions): Promise<{
data: ProviderCooldown;
}>;
TypeScript
getVendorCooldown(vendorId: string, options?: RequestOptions): Promise<{
data: VendorCooldown;
}>;
TypeScript
getProviderRequestRateLimit(providerId: string, options?: RequestOptions): Promise<{
data: ProviderRequestRateLimit;
}>;
TypeScript
getVendorRequestRateLimit(vendorId: string, options?: RequestOptions): Promise<{
data: VendorRequestRateLimit;
}>;
TypeScript
/** Null removes the rate limit; zero denies dispatch. Credential edits preserve this independent policy. */
setProviderRequestRateLimit(providerId: string, input: {
requests_per_minute: number | null;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: ProviderRequestRateLimit;
}>;
TypeScript
setVendorRequestRateLimit(vendorId: string, input: {
requests_per_minute: number | null;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: VendorRequestRateLimit;
}>;
TypeScript
listProviderRequestRateLimitHistory(providerId: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: ProviderRequestRateLimitRevision[];
}>;
TypeScript
listVendorRequestRateLimitHistory(vendorId: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: VendorRequestRateLimitRevision[];
}>;
TypeScript
getKeyRequestRateLimit(scope: TenantScope, keyId: string, options?: RequestOptions): Promise<{
data: KeyRequestRateLimit;
}>;
TypeScript
/** Null removes the rate limit; zero denies dispatch. Secret rotation preserves the policy. */
setKeyRequestRateLimit(scope: TenantScope, keyId: string, input: {
requests_per_minute: number | null;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
listKeyRequestRateLimitHistory(scope: TenantScope, keyId: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: KeyRequestRateLimitRevision[];
}>;
TypeScript
getKeyTokenRateLimit(scope: TenantScope, keyId: string, options?: RequestOptions): Promise<{
data: KeyTokenRateLimit;
}>;
TypeScript
/** Null removes the rate limit; zero denies dispatch. Secret rotation preserves the policy. */
setKeyTokenRateLimit(scope: TenantScope, keyId: string, input: {
tokens_per_minute: number | null;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
listKeyTokenRateLimitHistory(scope: TenantScope, keyId: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: KeyTokenRateLimitRevision[];
}>;
TypeScript
/** Read current unresolved capacity across a key's rotation lineage; never releases it. */
listKeyCapacityRequests(scope: TenantScope, keyId: string, query?: {
kind?: 'concurrency' | 'tokens';
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<KeyCapacityPage>;
TypeScript
getKeyConcurrencyLimit(scope: TenantScope, keyId: string, options?: RequestOptions): Promise<{
data: KeyConcurrencyLimit;
}>;
TypeScript
/** Null removes the concurrency limit; zero denies dispatch. Secret rotation preserves the policy. */
setKeyConcurrencyLimit(scope: TenantScope, keyId: string, input: {
max_concurrent_requests: number | null;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
listKeyConcurrencyLimitHistory(scope: TenantScope, keyId: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: KeyConcurrencyLimitRevision[];
}>;
TypeScript
/** Platform-administrator candidate pool; customer permissions remain attached to its alias. */
getModelRoutePool(alias: string, options?: RequestOptions): Promise<{
data: ModelRoutePool;
}>;
TypeScript
/** Platform-only live keyset traversal; retain next_after as the next query's after. */
listModelRoutePools(query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: ModelRoutePool[];
has_more: boolean;
next_after: string | null;
}>;
TypeScript
/** Iterate the live pool directory, preserving alias cursors and platform authority. */
iterateModelRoutePools(query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): AsyncGenerator<ModelRoutePool>;
TypeScript
setModelRoutePool(input: ModelRoutePoolInput, options?: RequestOptions): Promise<{
data: {
revision: number;
};
}>;
TypeScript
listModelRoutePoolHistory(alias: string, beforeRevision?: number, options?: RequestOptions): Promise<{
data: ModelRoutePoolRevision[];
}>;
TypeScript
/** Dry-run routing evaluation for a Model Pool without dispatching upstream inference. */
previewModelRoutePool(alias: string, input: ModelRoutePoolPreviewInput, options?: RequestOptions): Promise<{
data: ModelRoutePoolPreviewResult;
}>;
TypeScript
/** Audit pool pricing readiness, candidate margin health, and observed routing traffic distribution. */
auditModelRoutePool(alias: string, query?: {
days?: number;
}, options?: RequestOptions): Promise<{
data: ModelRoutePoolAudit;
}>;
TypeScript
listKeySpendingLimits(scope: TenantScope, keyId: string, options?: RequestOptions): Promise<{
data: KeySpendingAccount[];
}>;
TypeScript
/** Owner-only customer cap. Rotation shares this limit and its lifetime commitments. */
setKeySpendingLimit(scope: TenantScope, keyId: string, currency: string, input: {
limit_nanos: string | null;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
listKeySpendingLimitHistory(scope: TenantScope, keyId: string, currency: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: KeySpendingLimitRevision[];
}>;
TypeScript
/** Currency discovery exposes this workspace's commitments, never company funds. */
listWorkspaceSpendingLimits(scope: TenantScope, options?: RequestOptions): Promise<{
data: WorkspaceSpendingAccount[];
}>;
TypeScript
getWorkspaceSpendingLimit(scope: TenantScope, currency: string, options?: RequestOptions): Promise<{
data: WorkspaceSpendingLimit | null;
}>;
TypeScript
/** Owner-only retail limit; never changes company funds or procurement budgets. */
setWorkspaceSpendingLimit(scope: TenantScope, currency: string, input: {
limit_nanos: string;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: {
revision: string;
};
}>;
TypeScript
listWorkspaceSpendingLimitHistory(scope: TenantScope, currency: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: WorkspaceSpendingLimitRevision[];
next_before_revision: string | null;
}>;
TypeScript
/** Explicit Credits workspace cap and commitment; preserved monetary caps block Credits admission until configured. */
getWorkspaceCustomerUnitSpendingLimit(scope: TenantScope | string, options?: RequestOptions): Promise<{
data: CustomerUnitSpendingLimit;
}>;
TypeScript
/** Owner-only Credits workspace cap or explicit null for unlimited. Preserves monetary limits for currency mode. */
setWorkspaceCustomerUnitSpendingLimit(scope: TenantScope | string, input: CustomerUnitSpendingLimitInput, options?: RequestOptions): Promise<{
data: CustomerUnitSpendingLimitRevision;
}>;

listWorkspaceCustomerUnitSpendingLimitHistory

Section titled “listWorkspaceCustomerUnitSpendingLimitHistory”
TypeScript
listWorkspaceCustomerUnitSpendingLimitHistory(scope: TenantScope | string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: CustomerUnitSpendingLimitRevision[];
next_before_revision: string | null;
}>;
TypeScript
/** Explicit Credits API-key cap and commitment across rotations; preserved monetary caps block Credits admission until configured. */
getKeyCustomerUnitSpendingLimit(scope: TenantScope | string, keyId: string, options?: RequestOptions): Promise<{
data: CustomerUnitSpendingLimit;
}>;
TypeScript
/** Owner-only Credits API-key cap or explicit null for unlimited across the key's rotation lineage. */
setKeyCustomerUnitSpendingLimit(scope: TenantScope | string, keyId: string, input: CustomerUnitSpendingLimitInput, options?: RequestOptions): Promise<{
data: CustomerUnitSpendingLimitRevision;
}>;
TypeScript
listKeyCustomerUnitSpendingLimitHistory(scope: TenantScope | string, keyId: string, query?: {
beforeRevision?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: CustomerUnitSpendingLimitRevision[];
next_before_revision: string | null;
}>;
TypeScript
/** Immutable metadata only; excludes policy patterns and internal actor identifiers. */
listWorkspaceGuardrailHistory(scope: TenantScope, beforeRevision?: number, options?: RequestOptions): Promise<{
data: Array<{
revision: number;
policy_name: string;
active: boolean;
actor_name: string;
activated_at: string;
restored_from_revision: number | null;
}>;
next_cursor: number | null;
}>;
TypeScript
getWorkspaceGuardrailRevision(scope: TenantScope, revision: number, options?: RequestOptions): Promise<{
data: {
revision: number;
policy: GuardrailPolicy;
};
}>;
TypeScript
/** Creates a new active revision from an existing one; stale heads conflict without retries. */
rollbackWorkspaceGuardrail(scope: TenantScope, expectedRevision: number, targetRevision: number, options?: RequestOptions): Promise<{
revision: number;
restored_from_revision: number;
}>;
TypeScript
getKeyGuardrail(scope: TenantScope, keyId: string, options?: RequestOptions): Promise<{
data: {
assignment_revision: number;
policy_revision: number | null;
policy: GuardrailPolicy | null;
} | null;
}>;
TypeScript
assignKeyGuardrail(scope: TenantScope, keyId: string, policyRevision: number, expectedAssignmentRevision: number, options?: RequestOptions): Promise<{
assignment_revision: number;
}>;
TypeScript
listKeyGuardrailHistory(scope: TenantScope, keyId: string, beforeAssignmentRevision?: number, options?: RequestOptions): Promise<{
data: Array<{
assignment_revision: number;
policy_revision: number | null;
policy_name: string | null;
actor_name: string;
created_at: string;
}>;
next_cursor: number | null;
}>;
TypeScript
clearKeyGuardrail(scope: TenantScope, keyId: string, expectedAssignmentRevision: number, options?: RequestOptions): Promise<{
assignment_revision: number;
}>;
TypeScript
activateWorkspaceGuardrail(scope: TenantScope, expectedRevision: number, policy: GuardrailPolicy, options?: RequestOptions): Promise<{
revision: number;
}>;
TypeScript
previewWorkspaceGuardrail(scope: TenantScope, policy: GuardrailPolicy, model: string, provider: string, options?: RequestOptions): Promise<GuardrailPreview>;
TypeScript
/** Synthetic local test only: no policy activation or inference dispatch. */
previewGuardrailInput(scope: TenantScope, input: GuardrailInputTest, options?: RequestOptions): Promise<GuardrailInputTestResult>;
TypeScript
/** Synthetic local test only: no policy activation or inference dispatch. */
previewGuardrailOutput(scope: TenantScope, input: GuardrailOutputTest, options?: RequestOptions): Promise<GuardrailOutputTestResult>;
TypeScript
/** Read the actor's mutable Video composer; unavailable saved keys confer no action grant. */
getVideoComposerDraft(scope: TenantScope | WorkspaceScope, options?: RequestOptions): Promise<VideoComposerDraftState>;
TypeScript
/** Revision-checked partial save or null clear, with a 30-day inactivity TTL.
* Never estimates, inspects, reserves funds or submits inference. */
saveVideoComposerDraft(scope: TenantScope | WorkspaceScope, payload: VideoComposerDraftPayload | null, expectedRevision: number, options?: RequestOptions): Promise<VideoComposerDraftState>;
TypeScript
/** Load the saved workspace draft; browser storage is only a disposable cache. */
getChatDraft(scope: TenantScope | WorkspaceScope, options?: RequestOptions): Promise<ChatDraftState>;
TypeScript
/** Save or clear at the last read revision; conflicts require explicit reload and reconciliation. */
saveChatDraft(scope: TenantScope | WorkspaceScope, payload: ChatDraftPayload | null, expectedRevision: number, options?: RequestOptions): Promise<ChatDraftState>;
TypeScript
/** Compatibility view of the latest 100 sessions. Use iterateChatSessions for full history. */
listChatSessions(scope: TenantScope | WorkspaceScope, options?: RequestOptions): Promise<{
data: ChatSession[];
}>;
TypeScript
/** Continuation over the owner's recent sessions; a moved cursor requires restarting. */
listChatSessionPage(scope: TenantScope | WorkspaceScope, query?: ChatSessionPageQuery, options?: RequestOptions): Promise<ChatSessionPage>;
TypeScript
/** Live owner-scoped history. Short pages may continue; a stale cursor surfaces its 409. */
iterateChatSessions(scope: TenantScope | WorkspaceScope, query?: ChatSessionPageQuery, options?: RequestOptions): AsyncGenerator<ChatSession>;
TypeScript
/** Compatibility view of the latest 100 archived sessions. */
listArchivedChatSessions(scope: TenantScope | WorkspaceScope, options?: RequestOptions): Promise<{
data: ChatSession[];
}>;
TypeScript
setChatSessionArchived(scope: TenantScope | WorkspaceScope, sessionId: string, archived: boolean, options?: RequestOptions): Promise<void>;
TypeScript
/** Restore one complete owned conversation without walking recent history pages. */
getChatSession(scope: TenantScope | WorkspaceScope, sessionId: string, options?: RequestOptions): Promise<{
data: ChatSession;
archived: boolean;
revision: string;
guardedWrites: boolean;
}>;
TypeScript
exportChatSession(scope: TenantScope | WorkspaceScope, sessionId: string, options?: RequestOptions): Promise<ChatExport>;
TypeScript
saveChatSession(scope: TenantScope | WorkspaceScope, sessionId: string, session: ChatSession, options?: RequestOptions): Promise<{
saved: boolean;
reference?: string | null;
}>;
TypeScript
/** Null creates only; a read revision atomically protects an update from stale clients. */
saveChatSessionIfCurrent(scope: TenantScope | WorkspaceScope, sessionId: string, session: ChatSession, expectedRevision: string | null, options?: RequestOptions): Promise<{
saved: boolean;
revision: string;
guardedWrites: true;
}>;
TypeScript
deleteChatSession(scope: TenantScope | WorkspaceScope, sessionId: string, options?: RequestOptions): Promise<void>;
TypeScript
getProviderAssociation(configurationId: string, options?: RequestOptions): Promise<{
data: {
id: string;
name: string;
} | null;
}>;
TypeScript
getSupplierAssociation(configurationId: string, options?: RequestOptions): Promise<{
data: {
id: string;
name: string;
} | null;
}>;
TypeScript
associateProvider(configurationId: string, providerId: string, expectedRevision: number, options?: RequestOptions): Promise<void>;
TypeScript
associateSupplier(configurationId: string, supplierId: string, expectedRevision: number, options?: RequestOptions): Promise<void>;
TypeScript
/** Platform-only fixed Ark operation; use getAssetGroupRequest for saved status.
* Never automatically retry an uncertain upstream creation with a new key.
*/
createOrdinaryAssetGroup(configurationId: string, input: OrdinaryAssetGroupInput, options?: RequestOptions): Promise<{
data: {
id: string;
status: 'dispatching' | 'uncertain' | 'succeeded';
};
}>;
TypeScript
/** Encrypt a metadata patch for the saved original group. This never dispatches.
* Reuse update_id only for the identical patch; omitted fields stay unchanged.
*/
prepareOrdinaryAssetGroupUpdate(configurationId: string, input: OrdinaryAssetGroupUpdateInput, options?: RequestOptions): Promise<{
data: OrdinaryAssetGroupUpdatePreparation;
}>;
TypeScript
/** Explicit one-shot dispatch. Uncertainty must never be retried automatically.
* Caller cancellation does not cancel claimed work. Both outcomes need read-back.
*/
dispatchOrdinaryAssetGroupUpdate(configurationId: string, updateId: string, scope: TenantScope, options?: RequestOptions): Promise<{
data: {
update_id: string;
status: 'acknowledged' | 'uncertain';
reconciliation_required: true;
};
}>;
TypeScript
/** Fresh authorized read-back; mismatch and uncertainty preserve the hold. */
reconcileOrdinaryAssetGroupUpdate(configurationId: string, updateId: string, readId: string, scope: TenantScope, options?: RequestOptions): Promise<{
data: {
update_id: string;
status: 'reconciled';
reconciliation_required: false;
};
}>;
TypeScript
/** Audit only: no retained patch, upstream identities or procurement data. */
listOrdinaryAssetGroupUpdates(configurationId: string, scope: TenantScope, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: OrdinaryAssetGroupUpdateAudit[];
next_cursor: string | null;
}>;
TypeScript
/** Erasure preserves immutable audit, mutation holds and replay protection. */
deleteOrdinaryAssetGroupUpdatePatch(configurationId: string, updateId: string, scope: TenantScope, options?: RequestOptions): Promise<void>;
TypeScript
/** Platform-only targeted read. A read identity is one-shot; no automatic retry.
* Caller cancellation does not cancel already claimed upstream work.
*/
readOrdinaryAssetGroup(configurationId: string, input: OrdinaryAssetGroupReadInput, options?: RequestOptions): Promise<{
data: {
read_id: string;
name: string;
description: string | null;
created_at: string;
updated_at: string;
};
}>;
TypeScript
/** Audit metadata only. Unresolved does not mean an upstream read is running. */
listOrdinaryAssetGroupReads(configurationId: string, scope: TenantScope, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: Array<{
read_id: string;
status: 'unresolved' | 'succeeded' | 'failed';
started_at: string;
completed_at: string | null;
duration_ms: number | null;
reason: string | null;
}>;
next_cursor: string | null;
}>;
TypeScript
/** Saved encrypted result only; never sends an upstream read. */
getOrdinaryAssetGroupRead(configurationId: string, readId: string, scope: TenantScope, options?: RequestOptions): Promise<{
data: {
read_id: string;
name: string;
description: string | null;
created_at: string;
updated_at: string;
};
}>;
TypeScript
deleteOrdinaryAssetGroupRead(configurationId: string, readId: string, scope: TenantScope, options?: RequestOptions): Promise<void>;
TypeScript
/** One-shot page; continuation uses a retained parent identity, never a raw cursor. */
listOrdinaryAssets(configurationId: string, input: OrdinaryAssetListingInput, options?: RequestOptions): Promise<{
data: OrdinaryAssetListing;
}>;
TypeScript
/** Audit only; unresolved does not imply running or permit an upstream replay. */
/** Platform-only one-shot lookup from a retained page. Never automatically retried. */
lookupOrdinaryAsset(configurationId: string, input: OrdinaryAssetLookupInput, options?: RequestOptions): Promise<{
data: {
lookup_id: string;
status: 'succeeded';
asset_status: 'Active' | 'Processing' | 'Failed';
};
}>;
TypeScript
/** Durable operational audit only; missing completion remains unresolved. */
/** Saved content only; never sends another upstream lookup. */
getOrdinaryAssetLookupResult(configurationId: string, scope: TenantScope, lookupId: string, options?: RequestOptions): Promise<{
data: OrdinaryAssetLookupResult;
}>;
TypeScript
/** Erases retained content; immutable operational history remains. */
deleteOrdinaryAssetLookupResult(configurationId: string, scope: TenantScope, lookupId: string, options?: RequestOptions): Promise<void>;
TypeScript
listOrdinaryAssetLookups(configurationId: string, scope: TenantScope, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: OrdinaryAssetLookupAudit[];
next_cursor: string | null;
}>;
TypeScript
listOrdinaryAssetListings(configurationId: string, scope: TenantScope, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: OrdinaryAssetListingAudit[];
next_cursor: string | null;
}>;
TypeScript
/** Recovers retained encrypted content without an upstream listing call. */
getOrdinaryAssetListing(configurationId: string, listingId: string, scope: TenantScope, options?: RequestOptions): Promise<{
data: OrdinaryAssetListing;
}>;
TypeScript
deleteOrdinaryAssetListing(configurationId: string, listingId: string, scope: TenantScope, options?: RequestOptions): Promise<void>;
TypeScript
/** Records explicit cascading-deletion consent; never dispatches deletion. */
prepareOrdinaryAssetGroupDeletionConsent(configurationId: string, input: OrdinaryAssetGroupDeletionConsentInput, options?: RequestOptions): Promise<{
data: {
consent_id: string;
prepared: true;
dispatch_available: false;
};
}>;
TypeScript
/** Irreversible one-shot deletion; never automatically retries uncertain outcomes. */
dispatchOrdinaryAssetGroupDeletion(configurationId: string, scope: TenantScope, consentId: string, options?: RequestOptions): Promise<{
data: {
consent_id: string;
status: 'acknowledged' | 'uncertain';
reconciliation_required: true;
};
}>;
TypeScript
/** Consent status is descriptive; it never establishes current dispatch rights. */
getOrdinaryAssetGroupDeletionConsent(configurationId: string, scope: TenantScope, consentId: string, options?: RequestOptions): Promise<{
data: OrdinaryAssetGroupDeletionConsentStatus;
}>;
TypeScript
/** Idempotent local revocation; it does not erase claims or cancel dispatched work. */
revokeOrdinaryAssetGroupDeletionConsent(configurationId: string, scope: TenantScope, consentId: string, options?: RequestOptions): Promise<void>;
TypeScript
createAssetOperationAuthorization(configurationId: string, input: AssetOperationAuthorizationInput, options?: RequestOptions): Promise<{
data: {
id: string;
operation: 'CreateAssetGroup' | 'GetAssetGroup' | 'ListAssets' | 'GetAsset' | 'UpdateAssetGroup' | 'DeleteAssetGroup' | 'CreateAsset';
dispatch_available: false;
};
}>;
TypeScript
listAssetOperationAuthorizations(configurationId: string, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: AssetOperationAuthorization[];
next_cursor: string | null;
}>;
TypeScript
revokeAssetOperationAuthorization(configurationId: string, authorizationId: string, options?: RequestOptions): Promise<void>;
TypeScript
getAssetManagementConfiguration(configurationId: string, options?: RequestOptions): Promise<{
data: AssetManagementConfiguration | null;
}>;
TypeScript
revokeAssetManagement(configurationId: string, input: {
expected_revision: number;
erase_history?: boolean;
confirm_erase?: boolean;
}, options?: RequestOptions): Promise<{
data: {
revision: number;
configured: false;
dispatch_available: false;
erased_revisions: number;
};
}>;
TypeScript
configureAssetManagement(configurationId: string, input: AssetManagementConfigurationInput, options?: RequestOptions): Promise<{
data: AssetManagementConfiguration;
}>;
TypeScript
assignPersonalCredentialOwner(configurationId: string, organizationId: string, expectedRevision: number, options?: RequestOptions): Promise<{
assigned: boolean;
}>;
TypeScript
listGatewayActivity(scope: TenantScope, query?: GatewayActivityQuery, options?: RequestOptions): Promise<GatewayActivityPage>;
TypeScript
/** Customer-safe CSV; HTTP 413 rejects oversized ranges without a partial file. */
exportGatewayActivity(scope: TenantScope, query?: GatewayActivityExportQuery, options?: RequestOptions): Promise<string>;
TypeScript
/** Missing historical/denied attribution stays null; this does not claim content inspection. */
getRequestGuardrailDecision(scope: TenantScope, attemptId: string, options?: RequestOptions): Promise<{
data: RequestGuardrailDecision | null;
}>;
TypeScript
/** Installation-only disclosure; declarations are not verified processing guarantees. */
getGuardrailDetectorDescription(detector: string, options?: RequestOptions): Promise<GuardrailDetectorDescription>;
TypeScript
/** Explicit external processing consent; no policy activation or customer billing. */
previewGuardrailDetector(detector: string, input: GuardrailDetectorPreviewInput, options?: RequestOptions): Promise<GuardrailDetectorPreviewResult>;
TypeScript
/** Declared processing conditions for deployment-authorized workspace detectors. */
listWorkspaceDetectors(scope: TenantScope, options?: RequestOptions): Promise<{
data: WorkspaceDetectorDescription[];
}>;
TypeScript
/** Declared audio/video processing conditions only; performs no inspection or activation. */
listWorkspaceMediaDetectors(scope: TenantScope, options?: RequestOptions): Promise<{
data: WorkspaceMediaDetectorDescription[];
}>;
TypeScript
/** Image disclosure is separate from text consent; policy activation remains unavailable. */
listWorkspaceImageDetectors(scope: TenantScope, options?: RequestOptions): Promise<{
data: WorkspaceImageDetectorDescription[];
}>;
TypeScript
/** Explicit image consent for a synthetic test; does not save or activate a policy. */
previewWorkspaceImageDetector(scope: TenantScope, detector: string, input: ImageDetectorPreviewInput, options?: RequestOptions): Promise<ImageDetectorPreviewResult>;
TypeScript
/** Metadata-only required input decisions, including pre-admission denials. */
listInputDetectorDecisions(scope: TenantScope, options?: RequestOptions): Promise<{
data: Array<{
detector: string;
configuration_fingerprint: string;
stage: 'input';
coverage: 'local_text';
enforcer_version: 'external-input-v1';
outcome: 'clear' | 'matched' | 'indeterminate';
reason: string;
elapsed_ms: number;
key_name: string;
workspace_revision: number | null;
key_policy_revision: number | null;
key_assignment_revision: number | null;
recorded_at: string;
}>;
coverage: 'latest_100_input_detector_decisions';
}>;
TypeScript
/** Latest 100 pre-admission access denials; excludes content and dispatch-time race denials. */
listGuardrailPreparationDenials(scope: TenantScope, options?: RequestOptions): Promise<{
data: GuardrailPreparationDenial[];
coverage: 'latest_100_preparation_denials';
}>;
TypeScript
/** Recorded policy exceptions only; eligibility status denials remain outside coverage. */
listGuardrailDispatchDenials(scope: TenantScope, options?: RequestOptions): Promise<{
data: Array<{
stage: 'dispatch' | 'batch_admission';
outcome: 'blocked';
coverage: 'model_provider_access' | 'policy_binding';
reason: 'access_denied' | 'input_binding_missing' | 'policy_changed';
key_name: string;
workspace_policy_name: string | null;
key_policy_name: string | null;
workspace_revision: number | null;
key_policy_revision: number | null;
key_assignment_revision: number | null;
recorded_at: string;
}>;
coverage: 'latest_100_dispatch_policy_exceptions';
}>;
TypeScript
getRequestPayload(scope: TenantScope, attemptId: string, options?: RequestOptions): Promise<{
data: RequestPayload | null;
}>;
TypeScript
/** Local request discovery only; does not query upstream or establish asset readiness. */
listAssetGroupRequests(scope: TenantScope, query?: {
after?: string;
limit?: number;
}, options?: RequestOptions): Promise<{
data: Array<{
id: string;
name: string | null;
status: 'prepared' | 'dispatching' | 'uncertain' | 'succeeded';
created_at: string;
request_content_status: 'retained' | 'deleted' | 'expired';
}>;
next_cursor: string | null;
}>;
TypeScript
getAssetGroupRequest(scope: TenantScope, intentId: string, options?: RequestOptions): Promise<{
data: {
status: 'prepared' | 'dispatching' | 'uncertain' | 'succeeded';
created_at: string;
request_content_status: 'retained' | 'deleted' | 'expired';
request: {
name: string;
description: string | null;
} | null;
dispatch?: {
outcome: 'succeeded' | 'uncertain';
reason: 'invalid_configuration' | 'destination_rejected' | 'upstream_uncertain' | 'timeout' | null;
duration_ms: number;
} | null;
} | null;
}>;
TypeScript
deleteAssetGroupRequest(scope: TenantScope, intentId: string, options?: RequestOptions): Promise<void>;
TypeScript
deleteRequestPayload(scope: TenantScope, attemptId: string, options?: RequestOptions): Promise<void>;
TypeScript
listAccounts(scope: TenantScope, options?: RequestOptions): Promise<{
data: SupplierAccount[];
}>;
TypeScript
createAccount(scope: TenantScope, account: SupplierAccountInput, options?: RequestOptions): Promise<{
id: string;
health: string;
}>;
TypeScript
/** Lists durable local materials, not qualified Provider assets. */
listWorkspaceAssets(scope: TenantScope | WorkspaceScope, page?: WorkspaceAssetPageOptions, options?: RequestOptions): Promise<WorkspaceAssetPage>;
TypeScript
getWorkspaceAsset(scope: TenantScope | WorkspaceScope, assetId: string, options?: RequestOptions): Promise<{
data: WorkspaceAsset;
}>;
TypeScript
/** Upload does not authorize inspection, Provider ingestion or generation. */
uploadWorkspaceAsset(scope: TenantScope | WorkspaceScope, input: {
name: string;
contentType: string;
bytes: Uint8Array;
}, options?: RequestOptions): Promise<{
data: WorkspaceAsset;
}>;
TypeScript
renameWorkspaceAsset(scope: TenantScope | WorkspaceScope, assetId: string, input: {
name: string;
expected_revision: string;
}, options?: RequestOptions): Promise<{
data: WorkspaceAsset;
}>;
TypeScript
deleteWorkspaceAsset(scope: TenantScope | WorkspaceScope, assetId: string, expectedRevision?: string, options?: RequestOptions): Promise<void>;
TypeScript
downloadWorkspaceAsset(scope: TenantScope | WorkspaceScope, assetId: string, options?: RequestOptions): Promise<ArrayBuffer>;