+432
-52
@@ -12,2 +12,6 @@ export type FreestyleOptions = | ||
| readonly vpc: VpcNamespace; | ||
| /** @deprecated */ | ||
| readonly serverless: ServerlessNamespace; | ||
| /** @deprecated */ | ||
| readonly cron: CronNamespace; | ||
@@ -69,74 +73,235 @@ constructor(options?: FreestyleOptions); | ||
| export type CreateVpcOptions = { | ||
| cidr: string; | ||
| name?: string; | ||
| export class VpcWireGuardNamespace { | ||
| createEphemeral(options?: Record<string, never>): Promise<{ | ||
| vpcId: string; | ||
| sessionId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| clientPublicKey: string; | ||
| clientPrivateKey?: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcIp: string; | ||
| clientAllowedIps: string[]; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| close(): Promise<void>; | ||
| }>; | ||
| deleteEphemeral(options: { sessionId: string }): Promise<void>; | ||
| } | ||
| export type CreateVpcResponse = { | ||
| vpcId: string; | ||
| vpc: VpcHandle; | ||
| export class VpcHandle { | ||
| readonly wireguard: VpcWireGuardNamespace; | ||
| readonly vpcId: string; | ||
| } | ||
| export type ConfigureVpcWireGuardPeerOptions = { | ||
| gatewayVmId: string; | ||
| clientPublicKey: string; | ||
| export class VpcNamespace { | ||
| create(options?: { cidr?: string; name?: string }): Promise<{ vpcId: string; vpc: VpcHandle }>; | ||
| configureWireGuardPeer(vpcId: string, options: { | ||
| gatewayVmId: string; | ||
| clientPublicKey: string; | ||
| }): Promise<{ | ||
| vpcId: string; | ||
| gatewayVmId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| }>; | ||
| } | ||
| export type ConfigureVpcWireGuardPeerResponse = { | ||
| vpcId: string; | ||
| gatewayVmId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| export class Deployment { | ||
| readonly deploymentId: string; | ||
| getDetails(): Promise<{ | ||
| info: { | ||
| deploymentId: string; | ||
| accountId: string; | ||
| envVars: Record<string, string>; | ||
| timeout: number; | ||
| state: string; | ||
| deployedAt?: string; | ||
| domains: string[]; | ||
| }; | ||
| events: unknown[]; | ||
| }>; | ||
| getLogs(options?: Record<string, unknown>): Promise<unknown>; | ||
| fetch(url: string, init?: RequestInit): Promise<Response>; | ||
| } | ||
| export type CreateVpcWireGuardEphemeralOptions = Record<string, never>; | ||
| export class DeploymentsNamespace { | ||
| create(options: ({ | ||
| repo: string; | ||
| branch?: string; | ||
| rootPath?: string; | ||
| } | { | ||
| code: string; | ||
| } | { | ||
| files: { path: string; content: string; encoding?: "utf-8" | "base64" }[]; | ||
| } | { | ||
| tarUrl: string; | ||
| }) & { | ||
| name?: string; | ||
| build?: boolean | { | ||
| command: string; | ||
| outDir?: string | null; | ||
| envVars?: Record<string, string> | null; | ||
| }; | ||
| waitForRollout?: boolean; | ||
| domains?: string[]; | ||
| publicDir?: string; | ||
| staticDir?: string; | ||
| staticPathPrefix?: string; | ||
| prerenderDir?: string; | ||
| staticOnly?: boolean; | ||
| redirects?: { source: string; destination: string; statusCode?: number; permanent?: boolean }[]; | ||
| rewrites?: { source: string; destination: string }[]; | ||
| dynamic?: { source: string; methods?: string[] }[]; | ||
| headers?: { source: string; headers: { key: string; value: string }[] }[]; | ||
| cleanUrls?: boolean; | ||
| trailingSlash?: boolean; | ||
| experimental?: { nextjsOptimization?: boolean }; | ||
| entrypointPath?: string; | ||
| networkPermissions?: { action: "allow" | "deny"; domain: string; behavior: "exact" | "regex" }[]; | ||
| envVars?: Record<string, string>; | ||
| nodeModules?: Record<string, string>; | ||
| timeoutMs?: number; | ||
| egress?: { | ||
| allow?: { | ||
| domains?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| deny?: { | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| }; | ||
| }): Promise<{ deploymentId: string; deployment: Deployment; domains: string[] }>; | ||
| export type CreateVpcWireGuardEphemeralResponse = { | ||
| vpcId: string; | ||
| sessionId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| clientPublicKey: string; | ||
| clientPrivateKey?: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcIp: string; | ||
| clientAllowedIps: string[]; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| list(options?: { limit?: number; cursor?: string; search?: string }): Promise<unknown>; | ||
| ref(options: { deploymentId: string }): Deployment; | ||
| } | ||
| export type VpcWireGuardEphemeralConnection = CreateVpcWireGuardEphemeralResponse & { | ||
| close(): Promise<void>; | ||
| export class RunsNamespace { | ||
| create<T = unknown>(options: { | ||
| code: string; | ||
| egress?: { | ||
| allow?: { | ||
| domains?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| deny?: { | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| }; | ||
| [key: string]: unknown; | ||
| }): Promise<{ result: T }>; | ||
| getLogs(options: { runId: string;[key: string]: unknown }): Promise<unknown>; | ||
| list(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| runs: { | ||
| runId: string; | ||
| createdAt: string; | ||
| startedAt?: string; | ||
| status: "starting" | "running" | "complete"; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| } | ||
| export type DeleteVpcWireGuardEphemeralOptions = { | ||
| sessionId: string; | ||
| export class ServerlessNamespace { | ||
| readonly deployments: DeploymentsNamespace; | ||
| readonly runs: RunsNamespace; | ||
| } | ||
| export class VpcWireGuardNamespace { | ||
| createEphemeral(options?: CreateVpcWireGuardEphemeralOptions): Promise<VpcWireGuardEphemeralConnection>; | ||
| export class CronJob { | ||
| readonly schedule: { | ||
| id: string; | ||
| accountId: string; | ||
| deploymentId?: string | null; | ||
| runConfig?: ({ code: string;[key: string]: unknown }) | null; | ||
| name?: string | null; | ||
| path?: string | null; | ||
| cron: string; | ||
| timezone: string; | ||
| retries: number; | ||
| payload: unknown; | ||
| active: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| }; | ||
| deleteEphemeral(options: DeleteVpcWireGuardEphemeralOptions): Promise<void>; | ||
| } | ||
| update(params: { | ||
| deploymentId?: string; | ||
| run?: { code: string;[key: string]: unknown }; | ||
| name?: string; | ||
| cron?: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| active?: boolean; | ||
| }): Promise<void>; | ||
| export class VpcHandle { | ||
| readonly wireguard: VpcWireGuardNamespace; | ||
| readonly vpcId: string; | ||
| enable(): Promise<void>; | ||
| disable(): Promise<void>; | ||
| executions(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| executions: { | ||
| id: string; | ||
| scheduleId: string; | ||
| deploymentId?: string | null; | ||
| runAt: string; | ||
| status: "queued" | "running" | "succeeded" | "failed" | "retry"; | ||
| attempts: number; | ||
| maxAttempts: number; | ||
| lockedAt?: string | null; | ||
| lockOwner?: string | null; | ||
| lastError?: string | null; | ||
| instanceId?: string | null; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| successRate(options: { start: string | Date; end: string | Date }): Promise<{ | ||
| total: number; | ||
| succeeded: number; | ||
| failed: number; | ||
| successRate: number; | ||
| start: string; | ||
| end: string; | ||
| }>; | ||
| } | ||
| export class VpcNamespace { | ||
| create(options: CreateVpcOptions): Promise<CreateVpcResponse>; | ||
| export class CronNamespace { | ||
| schedule(options: { | ||
| deploymentId?: string; | ||
| run?: { code: string;[key: string]: unknown }; | ||
| name?: string; | ||
| cron: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| }): Promise<{ job: CronJob }>; | ||
| configureWireGuardPeer(vpcId: string, options: ConfigureVpcWireGuardPeerOptions): Promise<ConfigureVpcWireGuardPeerResponse>; | ||
| list(options?: { deploymentId?: string }): Promise<{ jobs: CronJob[] }>; | ||
| } | ||
@@ -609,2 +774,217 @@ | ||
| }; | ||
| } | ||
| export type EgressTransform = { | ||
| headers?: Record<string, string>; | ||
| } | ||
| export type EgressDomainConfig = { | ||
| transform?: EgressTransform[]; | ||
| } | ||
| export type EgressIpConfig = { | ||
| transform?: EgressTransform[]; | ||
| } | ||
| export type EgressAllowRules = { | ||
| domains?: Record<string, EgressDomainConfig[]>; | ||
| ips?: Record<string, EgressIpConfig[]>; | ||
| } | ||
| export type EgressDenyRules = { | ||
| ips?: Record<string, EgressIpConfig[]>; | ||
| } | ||
| export type EgressConfig = { | ||
| allow?: EgressAllowRules; | ||
| deny?: EgressDenyRules; | ||
| } | ||
| export type ServerlessRunConfig = { | ||
| code: string; | ||
| egress?: EgressConfig; | ||
| [key: string]: unknown; | ||
| } | ||
| export type ServerlessDeploymentCreateOptions = ({ | ||
| repo: string; | ||
| branch?: string; | ||
| rootPath?: string; | ||
| } | { | ||
| code: string; | ||
| } | { | ||
| files: { path: string; content: string; encoding?: "utf-8" | "base64" }[]; | ||
| } | { | ||
| tarUrl: string; | ||
| }) & { | ||
| name?: string; | ||
| build?: boolean | { | ||
| command: string; | ||
| outDir?: string | null; | ||
| envVars?: Record<string, string> | null; | ||
| }; | ||
| waitForRollout?: boolean; | ||
| domains?: string[]; | ||
| publicDir?: string; | ||
| staticDir?: string; | ||
| staticPathPrefix?: string; | ||
| prerenderDir?: string; | ||
| staticOnly?: boolean; | ||
| redirects?: { source: string; destination: string; statusCode?: number; permanent?: boolean }[]; | ||
| rewrites?: { source: string; destination: string }[]; | ||
| dynamic?: { source: string; methods?: string[] }[]; | ||
| headers?: { source: string; headers: { key: string; value: string }[] }[]; | ||
| cleanUrls?: boolean; | ||
| trailingSlash?: boolean; | ||
| experimental?: { nextjsOptimization?: boolean }; | ||
| entrypointPath?: string; | ||
| networkPermissions?: { action: "allow" | "deny"; domain: string; behavior: "exact" | "regex" }[]; | ||
| envVars?: Record<string, string>; | ||
| nodeModules?: Record<string, string>; | ||
| timeoutMs?: number; | ||
| egress?: EgressConfig; | ||
| } | ||
| export class Deployment { | ||
| readonly deploymentId: string; | ||
| getDetails(): Promise<{ | ||
| info: { | ||
| deploymentId: string; | ||
| accountId: string; | ||
| envVars: Record<string, string>; | ||
| timeout: number; | ||
| state: string; | ||
| deployedAt?: string; | ||
| domains: string[]; | ||
| }; | ||
| events: unknown[]; | ||
| }>; | ||
| getLogs(options?: Record<string, unknown>): Promise<unknown>; | ||
| fetch(url: string, init?: RequestInit): Promise<Response>; | ||
| } | ||
| export class DeploymentsNamespace { | ||
| create(options: ServerlessDeploymentCreateOptions): Promise<{ | ||
| deploymentId: string; | ||
| deployment: Deployment; | ||
| domains: string[]; | ||
| }>; | ||
| list(options?: { limit?: number; cursor?: string; search?: string }): Promise<unknown>; | ||
| ref(options: { deploymentId: string }): Deployment; | ||
| } | ||
| export class RunsNamespace { | ||
| create<T = unknown>(options: ServerlessRunConfig): Promise<{ result: T;[key: string]: unknown }>; | ||
| getLogs(options: { runId: string;[key: string]: unknown }): Promise<unknown>; | ||
| list(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| runs: { | ||
| runId: string; | ||
| createdAt: string; | ||
| startedAt?: string; | ||
| status: "starting" | "running" | "complete"; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| } | ||
| export class ServerlessNamespace { | ||
| readonly deployments: DeploymentsNamespace; | ||
| readonly runs: RunsNamespace; | ||
| } | ||
| export type CronSchedule = { | ||
| id: string; | ||
| accountId: string; | ||
| deploymentId?: string | null; | ||
| runConfig?: ServerlessRunConfig | null; | ||
| name?: string | null; | ||
| path?: string | null; | ||
| cron: string; | ||
| timezone: string; | ||
| retries: number; | ||
| payload: unknown; | ||
| active: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| export type CronExecutionStatus = "queued" | "running" | "succeeded" | "failed" | "retry"; | ||
| export type CronExecution = { | ||
| id: string; | ||
| scheduleId: string; | ||
| deploymentId?: string | null; | ||
| runAt: string; | ||
| status: CronExecutionStatus; | ||
| attempts: number; | ||
| maxAttempts: number; | ||
| lockedAt?: string | null; | ||
| lockOwner?: string | null; | ||
| lastError?: string | null; | ||
| instanceId?: string | null; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| export type CronRunConfig = ServerlessRunConfig; | ||
| export type CreateCronJobParams = { | ||
| deploymentId?: string; | ||
| run?: CronRunConfig; | ||
| name?: string; | ||
| cron: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| } | ||
| export class CronJob { | ||
| readonly schedule: CronSchedule; | ||
| update(params: { | ||
| deploymentId?: string; | ||
| run?: CronRunConfig; | ||
| name?: string; | ||
| cron?: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| active?: boolean; | ||
| }): Promise<void>; | ||
| enable(): Promise<void>; | ||
| disable(): Promise<void>; | ||
| executions(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| executions: CronExecution[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| successRate(options: { start: string | Date; end: string | Date }): Promise<{ | ||
| total: number; | ||
| succeeded: number; | ||
| failed: number; | ||
| successRate: number; | ||
| start: string; | ||
| end: string; | ||
| }>; | ||
| } | ||
| export class CronNamespace { | ||
| schedule(options: CreateCronJobParams): Promise<{ job: CronJob }>; | ||
| list(options?: { deploymentId?: string }): Promise<{ jobs: CronJob[] }>; | ||
| } |
+432
-52
@@ -12,2 +12,6 @@ export type FreestyleOptions = | ||
| readonly vpc: VpcNamespace; | ||
| /** @deprecated */ | ||
| readonly serverless: ServerlessNamespace; | ||
| /** @deprecated */ | ||
| readonly cron: CronNamespace; | ||
@@ -69,74 +73,235 @@ constructor(options?: FreestyleOptions); | ||
| export type CreateVpcOptions = { | ||
| cidr: string; | ||
| name?: string; | ||
| export class VpcWireGuardNamespace { | ||
| createEphemeral(options?: Record<string, never>): Promise<{ | ||
| vpcId: string; | ||
| sessionId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| clientPublicKey: string; | ||
| clientPrivateKey?: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcIp: string; | ||
| clientAllowedIps: string[]; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| close(): Promise<void>; | ||
| }>; | ||
| deleteEphemeral(options: { sessionId: string }): Promise<void>; | ||
| } | ||
| export type CreateVpcResponse = { | ||
| vpcId: string; | ||
| vpc: VpcHandle; | ||
| export class VpcHandle { | ||
| readonly wireguard: VpcWireGuardNamespace; | ||
| readonly vpcId: string; | ||
| } | ||
| export type ConfigureVpcWireGuardPeerOptions = { | ||
| gatewayVmId: string; | ||
| clientPublicKey: string; | ||
| export class VpcNamespace { | ||
| create(options?: { cidr?: string; name?: string }): Promise<{ vpcId: string; vpc: VpcHandle }>; | ||
| configureWireGuardPeer(vpcId: string, options: { | ||
| gatewayVmId: string; | ||
| clientPublicKey: string; | ||
| }): Promise<{ | ||
| vpcId: string; | ||
| gatewayVmId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| }>; | ||
| } | ||
| export type ConfigureVpcWireGuardPeerResponse = { | ||
| vpcId: string; | ||
| gatewayVmId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| export class Deployment { | ||
| readonly deploymentId: string; | ||
| getDetails(): Promise<{ | ||
| info: { | ||
| deploymentId: string; | ||
| accountId: string; | ||
| envVars: Record<string, string>; | ||
| timeout: number; | ||
| state: string; | ||
| deployedAt?: string; | ||
| domains: string[]; | ||
| }; | ||
| events: unknown[]; | ||
| }>; | ||
| getLogs(options?: Record<string, unknown>): Promise<unknown>; | ||
| fetch(url: string, init?: RequestInit): Promise<Response>; | ||
| } | ||
| export type CreateVpcWireGuardEphemeralOptions = Record<string, never>; | ||
| export class DeploymentsNamespace { | ||
| create(options: ({ | ||
| repo: string; | ||
| branch?: string; | ||
| rootPath?: string; | ||
| } | { | ||
| code: string; | ||
| } | { | ||
| files: { path: string; content: string; encoding?: "utf-8" | "base64" }[]; | ||
| } | { | ||
| tarUrl: string; | ||
| }) & { | ||
| name?: string; | ||
| build?: boolean | { | ||
| command: string; | ||
| outDir?: string | null; | ||
| envVars?: Record<string, string> | null; | ||
| }; | ||
| waitForRollout?: boolean; | ||
| domains?: string[]; | ||
| publicDir?: string; | ||
| staticDir?: string; | ||
| staticPathPrefix?: string; | ||
| prerenderDir?: string; | ||
| staticOnly?: boolean; | ||
| redirects?: { source: string; destination: string; statusCode?: number; permanent?: boolean }[]; | ||
| rewrites?: { source: string; destination: string }[]; | ||
| dynamic?: { source: string; methods?: string[] }[]; | ||
| headers?: { source: string; headers: { key: string; value: string }[] }[]; | ||
| cleanUrls?: boolean; | ||
| trailingSlash?: boolean; | ||
| experimental?: { nextjsOptimization?: boolean }; | ||
| entrypointPath?: string; | ||
| networkPermissions?: { action: "allow" | "deny"; domain: string; behavior: "exact" | "regex" }[]; | ||
| envVars?: Record<string, string>; | ||
| nodeModules?: Record<string, string>; | ||
| timeoutMs?: number; | ||
| egress?: { | ||
| allow?: { | ||
| domains?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| deny?: { | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| }; | ||
| }): Promise<{ deploymentId: string; deployment: Deployment; domains: string[] }>; | ||
| export type CreateVpcWireGuardEphemeralResponse = { | ||
| vpcId: string; | ||
| sessionId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| clientPublicKey: string; | ||
| clientPrivateKey?: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcIp: string; | ||
| clientAllowedIps: string[]; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| list(options?: { limit?: number; cursor?: string; search?: string }): Promise<unknown>; | ||
| ref(options: { deploymentId: string }): Deployment; | ||
| } | ||
| export type VpcWireGuardEphemeralConnection = CreateVpcWireGuardEphemeralResponse & { | ||
| close(): Promise<void>; | ||
| export class RunsNamespace { | ||
| create<T = unknown>(options: { | ||
| code: string; | ||
| egress?: { | ||
| allow?: { | ||
| domains?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| deny?: { | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| }; | ||
| [key: string]: unknown; | ||
| }): Promise<{ result: T }>; | ||
| getLogs(options: { runId: string;[key: string]: unknown }): Promise<unknown>; | ||
| list(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| runs: { | ||
| runId: string; | ||
| createdAt: string; | ||
| startedAt?: string; | ||
| status: "starting" | "running" | "complete"; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| } | ||
| export type DeleteVpcWireGuardEphemeralOptions = { | ||
| sessionId: string; | ||
| export class ServerlessNamespace { | ||
| readonly deployments: DeploymentsNamespace; | ||
| readonly runs: RunsNamespace; | ||
| } | ||
| export class VpcWireGuardNamespace { | ||
| createEphemeral(options?: CreateVpcWireGuardEphemeralOptions): Promise<VpcWireGuardEphemeralConnection>; | ||
| export class CronJob { | ||
| readonly schedule: { | ||
| id: string; | ||
| accountId: string; | ||
| deploymentId?: string | null; | ||
| runConfig?: ({ code: string;[key: string]: unknown }) | null; | ||
| name?: string | null; | ||
| path?: string | null; | ||
| cron: string; | ||
| timezone: string; | ||
| retries: number; | ||
| payload: unknown; | ||
| active: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| }; | ||
| deleteEphemeral(options: DeleteVpcWireGuardEphemeralOptions): Promise<void>; | ||
| } | ||
| update(params: { | ||
| deploymentId?: string; | ||
| run?: { code: string;[key: string]: unknown }; | ||
| name?: string; | ||
| cron?: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| active?: boolean; | ||
| }): Promise<void>; | ||
| export class VpcHandle { | ||
| readonly wireguard: VpcWireGuardNamespace; | ||
| readonly vpcId: string; | ||
| enable(): Promise<void>; | ||
| disable(): Promise<void>; | ||
| executions(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| executions: { | ||
| id: string; | ||
| scheduleId: string; | ||
| deploymentId?: string | null; | ||
| runAt: string; | ||
| status: "queued" | "running" | "succeeded" | "failed" | "retry"; | ||
| attempts: number; | ||
| maxAttempts: number; | ||
| lockedAt?: string | null; | ||
| lockOwner?: string | null; | ||
| lastError?: string | null; | ||
| instanceId?: string | null; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| successRate(options: { start: string | Date; end: string | Date }): Promise<{ | ||
| total: number; | ||
| succeeded: number; | ||
| failed: number; | ||
| successRate: number; | ||
| start: string; | ||
| end: string; | ||
| }>; | ||
| } | ||
| export class VpcNamespace { | ||
| create(options: CreateVpcOptions): Promise<CreateVpcResponse>; | ||
| export class CronNamespace { | ||
| schedule(options: { | ||
| deploymentId?: string; | ||
| run?: { code: string;[key: string]: unknown }; | ||
| name?: string; | ||
| cron: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| }): Promise<{ job: CronJob }>; | ||
| configureWireGuardPeer(vpcId: string, options: ConfigureVpcWireGuardPeerOptions): Promise<ConfigureVpcWireGuardPeerResponse>; | ||
| list(options?: { deploymentId?: string }): Promise<{ jobs: CronJob[] }>; | ||
| } | ||
@@ -609,2 +774,217 @@ | ||
| }; | ||
| } | ||
| export type EgressTransform = { | ||
| headers?: Record<string, string>; | ||
| } | ||
| export type EgressDomainConfig = { | ||
| transform?: EgressTransform[]; | ||
| } | ||
| export type EgressIpConfig = { | ||
| transform?: EgressTransform[]; | ||
| } | ||
| export type EgressAllowRules = { | ||
| domains?: Record<string, EgressDomainConfig[]>; | ||
| ips?: Record<string, EgressIpConfig[]>; | ||
| } | ||
| export type EgressDenyRules = { | ||
| ips?: Record<string, EgressIpConfig[]>; | ||
| } | ||
| export type EgressConfig = { | ||
| allow?: EgressAllowRules; | ||
| deny?: EgressDenyRules; | ||
| } | ||
| export type ServerlessRunConfig = { | ||
| code: string; | ||
| egress?: EgressConfig; | ||
| [key: string]: unknown; | ||
| } | ||
| export type ServerlessDeploymentCreateOptions = ({ | ||
| repo: string; | ||
| branch?: string; | ||
| rootPath?: string; | ||
| } | { | ||
| code: string; | ||
| } | { | ||
| files: { path: string; content: string; encoding?: "utf-8" | "base64" }[]; | ||
| } | { | ||
| tarUrl: string; | ||
| }) & { | ||
| name?: string; | ||
| build?: boolean | { | ||
| command: string; | ||
| outDir?: string | null; | ||
| envVars?: Record<string, string> | null; | ||
| }; | ||
| waitForRollout?: boolean; | ||
| domains?: string[]; | ||
| publicDir?: string; | ||
| staticDir?: string; | ||
| staticPathPrefix?: string; | ||
| prerenderDir?: string; | ||
| staticOnly?: boolean; | ||
| redirects?: { source: string; destination: string; statusCode?: number; permanent?: boolean }[]; | ||
| rewrites?: { source: string; destination: string }[]; | ||
| dynamic?: { source: string; methods?: string[] }[]; | ||
| headers?: { source: string; headers: { key: string; value: string }[] }[]; | ||
| cleanUrls?: boolean; | ||
| trailingSlash?: boolean; | ||
| experimental?: { nextjsOptimization?: boolean }; | ||
| entrypointPath?: string; | ||
| networkPermissions?: { action: "allow" | "deny"; domain: string; behavior: "exact" | "regex" }[]; | ||
| envVars?: Record<string, string>; | ||
| nodeModules?: Record<string, string>; | ||
| timeoutMs?: number; | ||
| egress?: EgressConfig; | ||
| } | ||
| export class Deployment { | ||
| readonly deploymentId: string; | ||
| getDetails(): Promise<{ | ||
| info: { | ||
| deploymentId: string; | ||
| accountId: string; | ||
| envVars: Record<string, string>; | ||
| timeout: number; | ||
| state: string; | ||
| deployedAt?: string; | ||
| domains: string[]; | ||
| }; | ||
| events: unknown[]; | ||
| }>; | ||
| getLogs(options?: Record<string, unknown>): Promise<unknown>; | ||
| fetch(url: string, init?: RequestInit): Promise<Response>; | ||
| } | ||
| export class DeploymentsNamespace { | ||
| create(options: ServerlessDeploymentCreateOptions): Promise<{ | ||
| deploymentId: string; | ||
| deployment: Deployment; | ||
| domains: string[]; | ||
| }>; | ||
| list(options?: { limit?: number; cursor?: string; search?: string }): Promise<unknown>; | ||
| ref(options: { deploymentId: string }): Deployment; | ||
| } | ||
| export class RunsNamespace { | ||
| create<T = unknown>(options: ServerlessRunConfig): Promise<{ result: T;[key: string]: unknown }>; | ||
| getLogs(options: { runId: string;[key: string]: unknown }): Promise<unknown>; | ||
| list(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| runs: { | ||
| runId: string; | ||
| createdAt: string; | ||
| startedAt?: string; | ||
| status: "starting" | "running" | "complete"; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| } | ||
| export class ServerlessNamespace { | ||
| readonly deployments: DeploymentsNamespace; | ||
| readonly runs: RunsNamespace; | ||
| } | ||
| export type CronSchedule = { | ||
| id: string; | ||
| accountId: string; | ||
| deploymentId?: string | null; | ||
| runConfig?: ServerlessRunConfig | null; | ||
| name?: string | null; | ||
| path?: string | null; | ||
| cron: string; | ||
| timezone: string; | ||
| retries: number; | ||
| payload: unknown; | ||
| active: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| export type CronExecutionStatus = "queued" | "running" | "succeeded" | "failed" | "retry"; | ||
| export type CronExecution = { | ||
| id: string; | ||
| scheduleId: string; | ||
| deploymentId?: string | null; | ||
| runAt: string; | ||
| status: CronExecutionStatus; | ||
| attempts: number; | ||
| maxAttempts: number; | ||
| lockedAt?: string | null; | ||
| lockOwner?: string | null; | ||
| lastError?: string | null; | ||
| instanceId?: string | null; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| export type CronRunConfig = ServerlessRunConfig; | ||
| export type CreateCronJobParams = { | ||
| deploymentId?: string; | ||
| run?: CronRunConfig; | ||
| name?: string; | ||
| cron: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| } | ||
| export class CronJob { | ||
| readonly schedule: CronSchedule; | ||
| update(params: { | ||
| deploymentId?: string; | ||
| run?: CronRunConfig; | ||
| name?: string; | ||
| cron?: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| active?: boolean; | ||
| }): Promise<void>; | ||
| enable(): Promise<void>; | ||
| disable(): Promise<void>; | ||
| executions(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| executions: CronExecution[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| successRate(options: { start: string | Date; end: string | Date }): Promise<{ | ||
| total: number; | ||
| succeeded: number; | ||
| failed: number; | ||
| successRate: number; | ||
| start: string; | ||
| end: string; | ||
| }>; | ||
| } | ||
| export class CronNamespace { | ||
| schedule(options: CreateCronJobParams): Promise<{ job: CronJob }>; | ||
| list(options?: { deploymentId?: string }): Promise<{ jobs: CronJob[] }>; | ||
| } |
+432
-52
@@ -12,2 +12,6 @@ export type FreestyleOptions = | ||
| readonly vpc: VpcNamespace; | ||
| /** @deprecated */ | ||
| readonly serverless: ServerlessNamespace; | ||
| /** @deprecated */ | ||
| readonly cron: CronNamespace; | ||
@@ -69,74 +73,235 @@ constructor(options?: FreestyleOptions); | ||
| export type CreateVpcOptions = { | ||
| cidr: string; | ||
| name?: string; | ||
| export class VpcWireGuardNamespace { | ||
| createEphemeral(options?: Record<string, never>): Promise<{ | ||
| vpcId: string; | ||
| sessionId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| clientPublicKey: string; | ||
| clientPrivateKey?: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcIp: string; | ||
| clientAllowedIps: string[]; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| close(): Promise<void>; | ||
| }>; | ||
| deleteEphemeral(options: { sessionId: string }): Promise<void>; | ||
| } | ||
| export type CreateVpcResponse = { | ||
| vpcId: string; | ||
| vpc: VpcHandle; | ||
| export class VpcHandle { | ||
| readonly wireguard: VpcWireGuardNamespace; | ||
| readonly vpcId: string; | ||
| } | ||
| export type ConfigureVpcWireGuardPeerOptions = { | ||
| gatewayVmId: string; | ||
| clientPublicKey: string; | ||
| export class VpcNamespace { | ||
| create(options?: { cidr?: string; name?: string }): Promise<{ vpcId: string; vpc: VpcHandle }>; | ||
| configureWireGuardPeer(vpcId: string, options: { | ||
| gatewayVmId: string; | ||
| clientPublicKey: string; | ||
| }): Promise<{ | ||
| vpcId: string; | ||
| gatewayVmId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| }>; | ||
| } | ||
| export type ConfigureVpcWireGuardPeerResponse = { | ||
| vpcId: string; | ||
| gatewayVmId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| export class Deployment { | ||
| readonly deploymentId: string; | ||
| getDetails(): Promise<{ | ||
| info: { | ||
| deploymentId: string; | ||
| accountId: string; | ||
| envVars: Record<string, string>; | ||
| timeout: number; | ||
| state: string; | ||
| deployedAt?: string; | ||
| domains: string[]; | ||
| }; | ||
| events: unknown[]; | ||
| }>; | ||
| getLogs(options?: Record<string, unknown>): Promise<unknown>; | ||
| fetch(url: string, init?: RequestInit): Promise<Response>; | ||
| } | ||
| export type CreateVpcWireGuardEphemeralOptions = Record<string, never>; | ||
| export class DeploymentsNamespace { | ||
| create(options: ({ | ||
| repo: string; | ||
| branch?: string; | ||
| rootPath?: string; | ||
| } | { | ||
| code: string; | ||
| } | { | ||
| files: { path: string; content: string; encoding?: "utf-8" | "base64" }[]; | ||
| } | { | ||
| tarUrl: string; | ||
| }) & { | ||
| name?: string; | ||
| build?: boolean | { | ||
| command: string; | ||
| outDir?: string | null; | ||
| envVars?: Record<string, string> | null; | ||
| }; | ||
| waitForRollout?: boolean; | ||
| domains?: string[]; | ||
| publicDir?: string; | ||
| staticDir?: string; | ||
| staticPathPrefix?: string; | ||
| prerenderDir?: string; | ||
| staticOnly?: boolean; | ||
| redirects?: { source: string; destination: string; statusCode?: number; permanent?: boolean }[]; | ||
| rewrites?: { source: string; destination: string }[]; | ||
| dynamic?: { source: string; methods?: string[] }[]; | ||
| headers?: { source: string; headers: { key: string; value: string }[] }[]; | ||
| cleanUrls?: boolean; | ||
| trailingSlash?: boolean; | ||
| experimental?: { nextjsOptimization?: boolean }; | ||
| entrypointPath?: string; | ||
| networkPermissions?: { action: "allow" | "deny"; domain: string; behavior: "exact" | "regex" }[]; | ||
| envVars?: Record<string, string>; | ||
| nodeModules?: Record<string, string>; | ||
| timeoutMs?: number; | ||
| egress?: { | ||
| allow?: { | ||
| domains?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| deny?: { | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| }; | ||
| }): Promise<{ deploymentId: string; deployment: Deployment; domains: string[] }>; | ||
| export type CreateVpcWireGuardEphemeralResponse = { | ||
| vpcId: string; | ||
| sessionId: string; | ||
| endpointHost?: string; | ||
| endpointPort: number; | ||
| listenPort: number; | ||
| interfaceName: string; | ||
| serverPublicKey: string; | ||
| clientPublicKey: string; | ||
| clientPrivateKey?: string; | ||
| serverTunnelIp: string; | ||
| clientTunnelIp: string; | ||
| vpcIp: string; | ||
| clientAllowedIps: string[]; | ||
| vpcCidr: string; | ||
| clientConfig: string; | ||
| list(options?: { limit?: number; cursor?: string; search?: string }): Promise<unknown>; | ||
| ref(options: { deploymentId: string }): Deployment; | ||
| } | ||
| export type VpcWireGuardEphemeralConnection = CreateVpcWireGuardEphemeralResponse & { | ||
| close(): Promise<void>; | ||
| export class RunsNamespace { | ||
| create<T = unknown>(options: { | ||
| code: string; | ||
| egress?: { | ||
| allow?: { | ||
| domains?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| deny?: { | ||
| ips?: Record<string, { transform?: { headers?: Record<string, string> }[] }[]>; | ||
| }; | ||
| }; | ||
| [key: string]: unknown; | ||
| }): Promise<{ result: T }>; | ||
| getLogs(options: { runId: string;[key: string]: unknown }): Promise<unknown>; | ||
| list(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| runs: { | ||
| runId: string; | ||
| createdAt: string; | ||
| startedAt?: string; | ||
| status: "starting" | "running" | "complete"; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| } | ||
| export type DeleteVpcWireGuardEphemeralOptions = { | ||
| sessionId: string; | ||
| export class ServerlessNamespace { | ||
| readonly deployments: DeploymentsNamespace; | ||
| readonly runs: RunsNamespace; | ||
| } | ||
| export class VpcWireGuardNamespace { | ||
| createEphemeral(options?: CreateVpcWireGuardEphemeralOptions): Promise<VpcWireGuardEphemeralConnection>; | ||
| export class CronJob { | ||
| readonly schedule: { | ||
| id: string; | ||
| accountId: string; | ||
| deploymentId?: string | null; | ||
| runConfig?: ({ code: string;[key: string]: unknown }) | null; | ||
| name?: string | null; | ||
| path?: string | null; | ||
| cron: string; | ||
| timezone: string; | ||
| retries: number; | ||
| payload: unknown; | ||
| active: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| }; | ||
| deleteEphemeral(options: DeleteVpcWireGuardEphemeralOptions): Promise<void>; | ||
| } | ||
| update(params: { | ||
| deploymentId?: string; | ||
| run?: { code: string;[key: string]: unknown }; | ||
| name?: string; | ||
| cron?: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| active?: boolean; | ||
| }): Promise<void>; | ||
| export class VpcHandle { | ||
| readonly wireguard: VpcWireGuardNamespace; | ||
| readonly vpcId: string; | ||
| enable(): Promise<void>; | ||
| disable(): Promise<void>; | ||
| executions(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| executions: { | ||
| id: string; | ||
| scheduleId: string; | ||
| deploymentId?: string | null; | ||
| runAt: string; | ||
| status: "queued" | "running" | "succeeded" | "failed" | "retry"; | ||
| attempts: number; | ||
| maxAttempts: number; | ||
| lockedAt?: string | null; | ||
| lockOwner?: string | null; | ||
| lastError?: string | null; | ||
| instanceId?: string | null; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| successRate(options: { start: string | Date; end: string | Date }): Promise<{ | ||
| total: number; | ||
| succeeded: number; | ||
| failed: number; | ||
| successRate: number; | ||
| start: string; | ||
| end: string; | ||
| }>; | ||
| } | ||
| export class VpcNamespace { | ||
| create(options: CreateVpcOptions): Promise<CreateVpcResponse>; | ||
| export class CronNamespace { | ||
| schedule(options: { | ||
| deploymentId?: string; | ||
| run?: { code: string;[key: string]: unknown }; | ||
| name?: string; | ||
| cron: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| }): Promise<{ job: CronJob }>; | ||
| configureWireGuardPeer(vpcId: string, options: ConfigureVpcWireGuardPeerOptions): Promise<ConfigureVpcWireGuardPeerResponse>; | ||
| list(options?: { deploymentId?: string }): Promise<{ jobs: CronJob[] }>; | ||
| } | ||
@@ -609,2 +774,217 @@ | ||
| }; | ||
| } | ||
| export type EgressTransform = { | ||
| headers?: Record<string, string>; | ||
| } | ||
| export type EgressDomainConfig = { | ||
| transform?: EgressTransform[]; | ||
| } | ||
| export type EgressIpConfig = { | ||
| transform?: EgressTransform[]; | ||
| } | ||
| export type EgressAllowRules = { | ||
| domains?: Record<string, EgressDomainConfig[]>; | ||
| ips?: Record<string, EgressIpConfig[]>; | ||
| } | ||
| export type EgressDenyRules = { | ||
| ips?: Record<string, EgressIpConfig[]>; | ||
| } | ||
| export type EgressConfig = { | ||
| allow?: EgressAllowRules; | ||
| deny?: EgressDenyRules; | ||
| } | ||
| export type ServerlessRunConfig = { | ||
| code: string; | ||
| egress?: EgressConfig; | ||
| [key: string]: unknown; | ||
| } | ||
| export type ServerlessDeploymentCreateOptions = ({ | ||
| repo: string; | ||
| branch?: string; | ||
| rootPath?: string; | ||
| } | { | ||
| code: string; | ||
| } | { | ||
| files: { path: string; content: string; encoding?: "utf-8" | "base64" }[]; | ||
| } | { | ||
| tarUrl: string; | ||
| }) & { | ||
| name?: string; | ||
| build?: boolean | { | ||
| command: string; | ||
| outDir?: string | null; | ||
| envVars?: Record<string, string> | null; | ||
| }; | ||
| waitForRollout?: boolean; | ||
| domains?: string[]; | ||
| publicDir?: string; | ||
| staticDir?: string; | ||
| staticPathPrefix?: string; | ||
| prerenderDir?: string; | ||
| staticOnly?: boolean; | ||
| redirects?: { source: string; destination: string; statusCode?: number; permanent?: boolean }[]; | ||
| rewrites?: { source: string; destination: string }[]; | ||
| dynamic?: { source: string; methods?: string[] }[]; | ||
| headers?: { source: string; headers: { key: string; value: string }[] }[]; | ||
| cleanUrls?: boolean; | ||
| trailingSlash?: boolean; | ||
| experimental?: { nextjsOptimization?: boolean }; | ||
| entrypointPath?: string; | ||
| networkPermissions?: { action: "allow" | "deny"; domain: string; behavior: "exact" | "regex" }[]; | ||
| envVars?: Record<string, string>; | ||
| nodeModules?: Record<string, string>; | ||
| timeoutMs?: number; | ||
| egress?: EgressConfig; | ||
| } | ||
| export class Deployment { | ||
| readonly deploymentId: string; | ||
| getDetails(): Promise<{ | ||
| info: { | ||
| deploymentId: string; | ||
| accountId: string; | ||
| envVars: Record<string, string>; | ||
| timeout: number; | ||
| state: string; | ||
| deployedAt?: string; | ||
| domains: string[]; | ||
| }; | ||
| events: unknown[]; | ||
| }>; | ||
| getLogs(options?: Record<string, unknown>): Promise<unknown>; | ||
| fetch(url: string, init?: RequestInit): Promise<Response>; | ||
| } | ||
| export class DeploymentsNamespace { | ||
| create(options: ServerlessDeploymentCreateOptions): Promise<{ | ||
| deploymentId: string; | ||
| deployment: Deployment; | ||
| domains: string[]; | ||
| }>; | ||
| list(options?: { limit?: number; cursor?: string; search?: string }): Promise<unknown>; | ||
| ref(options: { deploymentId: string }): Deployment; | ||
| } | ||
| export class RunsNamespace { | ||
| create<T = unknown>(options: ServerlessRunConfig): Promise<{ result: T;[key: string]: unknown }>; | ||
| getLogs(options: { runId: string;[key: string]: unknown }): Promise<unknown>; | ||
| list(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| runs: { | ||
| runId: string; | ||
| createdAt: string; | ||
| startedAt?: string; | ||
| status: "starting" | "running" | "complete"; | ||
| }[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| } | ||
| export class ServerlessNamespace { | ||
| readonly deployments: DeploymentsNamespace; | ||
| readonly runs: RunsNamespace; | ||
| } | ||
| export type CronSchedule = { | ||
| id: string; | ||
| accountId: string; | ||
| deploymentId?: string | null; | ||
| runConfig?: ServerlessRunConfig | null; | ||
| name?: string | null; | ||
| path?: string | null; | ||
| cron: string; | ||
| timezone: string; | ||
| retries: number; | ||
| payload: unknown; | ||
| active: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| export type CronExecutionStatus = "queued" | "running" | "succeeded" | "failed" | "retry"; | ||
| export type CronExecution = { | ||
| id: string; | ||
| scheduleId: string; | ||
| deploymentId?: string | null; | ||
| runAt: string; | ||
| status: CronExecutionStatus; | ||
| attempts: number; | ||
| maxAttempts: number; | ||
| lockedAt?: string | null; | ||
| lockOwner?: string | null; | ||
| lastError?: string | null; | ||
| instanceId?: string | null; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| export type CronRunConfig = ServerlessRunConfig; | ||
| export type CreateCronJobParams = { | ||
| deploymentId?: string; | ||
| run?: CronRunConfig; | ||
| name?: string; | ||
| cron: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| } | ||
| export class CronJob { | ||
| readonly schedule: CronSchedule; | ||
| update(params: { | ||
| deploymentId?: string; | ||
| run?: CronRunConfig; | ||
| name?: string; | ||
| cron?: string; | ||
| timezone?: string; | ||
| retries?: number; | ||
| payload?: unknown; | ||
| path?: string; | ||
| active?: boolean; | ||
| }): Promise<void>; | ||
| enable(): Promise<void>; | ||
| disable(): Promise<void>; | ||
| executions(options?: { limit?: number; cursor?: string }): Promise<{ | ||
| executions: CronExecution[]; | ||
| nextCursor?: string; | ||
| totalCount?: number; | ||
| }>; | ||
| successRate(options: { start: string | Date; end: string | Date }): Promise<{ | ||
| total: number; | ||
| succeeded: number; | ||
| failed: number; | ||
| successRate: number; | ||
| start: string; | ||
| end: string; | ||
| }>; | ||
| } | ||
| export class CronNamespace { | ||
| schedule(options: CreateCronJobParams): Promise<{ job: CronJob }>; | ||
| list(options?: { deploymentId?: string }): Promise<{ jobs: CronJob[] }>; | ||
| } |
+1
-1
| { | ||
| "name": "freestyle", | ||
| "version": "0.1.55", | ||
| "version": "0.1.56", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "exports": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
2803636
1.18%40390
0.86%95
6.74%