import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Functions defined by the company */ export declare class Deployments extends APIResource { /** * A list of function deployments. * * - Requires: `API Tier 1` * * @example HTTP * Representative request and response shapes. * ``` * GET /functions/{function_api_name}/deployments/ HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "results": [ * { * "id": "string", * "external_id": "string", * "function_id": "string", * "function_api_name": "string", * "function_version_id": "string", * "function_version_human_friendly_id": 0, * "code": "string", * "dependencies": {}, * "allowed_domains": [ * "string" * ], * "runtime": "string", * "options": {}, * "io_contract": {}, * "status": "string", * "created_at": "string", * "updated_at": "string" * } * ] * } * ``` */ list(functionAPIName: string, options?: RequestOptions): APIPromise; /** * Create a new function deployment. * * @example HTTP * Representative request and response shapes. * ``` * POST /functions/{function_api_name}/deployments/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * {} * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "external_id": "string", * "function_id": "string", * "function_api_name": "string", * "function_version_id": "string", * "function_version_human_friendly_id": 0, * "code": "string", * "dependencies": {}, * "allowed_domains": [ * "string" * ], * "runtime": "string", * "options": {}, * "io_contract": {}, * "status": "string", * "created_at": "string", * "updated_at": "string" * } * ``` */ create(functionAPIName: string, body?: DeploymentCreateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieve a specific function deployment. * * @example HTTP * Representative request and response shapes. * ``` * GET /functions/{function_api_name}/deployments/{deployment_id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "external_id": "string", * "function_id": "string", * "function_api_name": "string", * "function_version_id": "string", * "function_version_human_friendly_id": 0, * "code": "string", * "dependencies": {}, * "allowed_domains": [ * "string" * ], * "runtime": "string", * "options": {}, * "io_contract": {}, * "status": "string", * "created_at": "string", * "updated_at": "string" * } * ``` */ retrieve(deploymentID: string, params: DeploymentRetrieveParams, options?: RequestOptions): APIPromise; /** * A list of function deployment logs. * * - Requires: `API Tier 1` * * @example HTTP * Representative request and response shapes. * ``` * GET /functions/{function_api_name}/deployments/{deployment_id}/logs/ HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "results": [ * { * "message": "string", * "sequence_num": 0, * "timestamp": "string", * "level": "string", * "params": {} * } * ] * } * ``` */ listLogs(deploymentID: string, params: DeploymentListLogsParams, options?: RequestOptions): APIPromise; } export interface FunctionDeployment { /** * The ID of the deployment */ id: string; /** * The creation date of the deployment */ created_at: string; /** * The last updated date of the deployment */ updated_at: string; /** * Domains that function runs from this deployment are allowed to access */ allowed_domains?: Array; /** * The code for the deployment */ code?: string; /** * The dependencies of the deployment */ dependencies?: unknown; /** * The external ID of the deployment */ external_id?: string; /** * The API name of the function that this deployment is associated with */ function_api_name?: string; /** * The ID of the function that this deployment is associated with */ function_id?: string; /** * The human friendly ID of version that this deployment is associated with */ function_version_human_friendly_id?: number; /** * The ID of the version that this deployment is associated with */ function_version_id?: string; /** * Input and output JSON Schema contracts for the deployment */ io_contract?: unknown; /** * Additional, runtime-specific options for the deployment */ options?: unknown; /** * The runtime for the deployment */ runtime?: string; /** * The status of the deployment */ status?: string; } export interface DeploymentListResponse { results?: Array; } export interface DeploymentListLogsResponse { results?: Array; } export declare namespace DeploymentListLogsResponse { interface Result { /** * The log message */ message: string; /** * The sequence number of the log line */ sequence_num: number; /** * The log level */ level?: string; /** * Parameters associated with the log line */ params?: unknown; /** * The log timestamp */ timestamp?: string; } } export interface DeploymentCreateParams { /** * Domains that function runs from this deployment are allowed to access */ allowed_domains?: Array; /** * The code for the deployment */ code?: string; /** * The dependencies of the deployment */ dependencies?: unknown; /** * Input and output JSON Schema contracts for the deployment */ io_contract?: unknown; /** * Additional, runtime-specific options for the deployment */ options?: unknown; /** * The runtime for the deployment */ runtime?: string; } export interface DeploymentRetrieveParams { /** * The API name of the function. */ function_api_name: string; } export interface DeploymentListLogsParams { /** * The API name of the function. */ function_api_name: string; } export declare namespace Deployments { export { type FunctionDeployment as FunctionDeployment, type DeploymentListResponse as DeploymentListResponse, type DeploymentListLogsResponse as DeploymentListLogsResponse, type DeploymentCreateParams as DeploymentCreateParams, type DeploymentRetrieveParams as DeploymentRetrieveParams, type DeploymentListLogsParams as DeploymentListLogsParams, }; } //# sourceMappingURL=deployments.d.ts.map