@segmentstream/app · I–L
8 public exports from @segmentstream/app.
Public exports
JobReadOptions
interface JobReadOptions {
readonly signal?: AbortSignal;
}JobRun
A pipeline run, returned immediately by `run()` and refreshed with `getRun()`.
interface JobRun {
readonly id: string;
readonly deploymentId: string;
readonly jobName: string;
readonly status: string;
readonly trigger: string;
readonly partitionRange?: {
readonly startDate: string;
readonly endDate: string;
};
readonly failure?: {
readonly code: string;
readonly detail: string;
readonly retryable: boolean;
readonly reference: string;
};
readonly createdAt: string;
readonly updatedAt: string;
readonly startedAt?: string;
readonly completedAt?: string;
}JobRunOptions
interface JobRunOptions {
readonly idempotencyKey?: string;
readonly partitionRange?: {
readonly startDate: string;
readonly endDate: string;
};
readonly signal?: AbortSignal;
}JobsClient
Server-only pipeline execution. The workspace credential can start and read only jobs deployed with `allow_app_runs=True`. Check the app user's permissions before calling on their behalf.
interface JobsClient {
readonly run: (jobName: string, options?: JobRunOptions) => Promise<JobRun>;
readonly getRun: (runId: string, options?: JobReadOptions) => Promise<JobRun>;
readonly listRuns: (jobName: string, options?: JobReadOptions) => Promise<readonly JobRun[]>;
}JsonRecord
A record of an entity the client has no types for.
type JsonRecord = {
readonly [field: string]: JsonValue;
};JsonValue
JSON as the ontology service sends and accepts it.
type JsonValue = string | number | boolean | null | ReadonlyArray<JsonValue> | {
readonly [key: string]: JsonValue;
};isAllowed
Whether one of the holder's permissions equals `required` or covers it through a wildcard.
function isAllowed(required: string, holder: PermissionHolder): boolean;
isSameOrigin
Whether a form post came from the app's own pages. A decision must never be made from another site, which could otherwise approve an agent in the member's name. Fetch Metadata describes the browser's public request even when a trusted proxy rewrites the server's request URL.
function isSameOrigin(request: Request): boolean;