import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { PageCursorURL, PagePromise } from "../../core/pagination.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; /** * Agents defined by the company */ export declare class SourceRevisions extends APIResource { /** * A list of source revisions for an agent. * * @example HTTP * Representative request and response shapes. * ``` * GET /agents/{agent_id}/source-revisions/?limit=1&cursor=cursor 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", * "created_at": "string", * "updated_at": "string", * "version": 0, * "source_digest": "string" * } * ], * "next_link": "string" * } * ``` */ list(agentID: string, query?: SourceRevisionListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a source revision for an agent. * * @example HTTP * Representative request and response shapes. * ``` * POST /agents/{agent_id}/source-revisions/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "entrypoint": "entrypoint", * "files": [ * { * "content": "content", * "kind": "kind", * "path": "path" * } * ] * } * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "version": 0, * "files": [ * { * "path": "string", * "content": "string", * "kind": "string" * } * ], * "entrypoint": "string", * "source_digest": "string" * } * ``` */ create(agentID: string, body: SourceRevisionCreateParams, options?: RequestOptions): APIPromise; /** * Retrieve a source revision for an agent. * * @example HTTP * Representative request and response shapes. * ``` * GET /agents/{agent_id}/source-revisions/{source_revision_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", * "created_at": "string", * "updated_at": "string", * "version": 0, * "files": [ * { * "path": "string", * "content": "string", * "kind": "string" * } * ], * "entrypoint": "string", * "source_digest": "string" * } * ``` */ retrieve(agentID: string, sourceRevisionID: string, options?: RequestOptions): APIPromise; } export type SourceRevisionListResponsesPageCursorURL = PageCursorURL; /** * List representation of an agent source revision without source contents. */ export interface SourceRevisionListResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * The digest of the source revision */ source_digest?: string; /** * The version number of the source revision */ version?: number; } export interface SourceRevisionCreateResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The entrypoint file */ entrypoint: string; /** * The files in the source revision */ files: Array; /** * Record update date */ updated_at: string; /** * The digest of the source revision */ source_digest?: string; /** * The version number of the source revision */ version?: number; } export declare namespace SourceRevisionCreateResponse { interface File { /** * The contents of the source file */ content: string; /** * The source file language or format */ kind: string; /** * The path of the source file */ path: string; } } export interface SourceRevisionRetrieveResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The entrypoint file */ entrypoint: string; /** * The files in the source revision */ files: Array; /** * Record update date */ updated_at: string; /** * The digest of the source revision */ source_digest?: string; /** * The version number of the source revision */ version?: number; } export declare namespace SourceRevisionRetrieveResponse { interface File { /** * The contents of the source file */ content: string; /** * The source file language or format */ kind: string; /** * The path of the source file */ path: string; } } export interface SourceRevisionListParams { /** * The cursor from a previous next_link. */ cursor?: string; /** * The maximum number of results to return. */ limit?: number; } export interface SourceRevisionCreateParams { /** * The entrypoint file */ entrypoint: string; /** * The files in the source revision */ files: Array; } export declare namespace SourceRevisionCreateParams { interface File { /** * The contents of the source file */ content: string; /** * The source file language or format */ kind: string; /** * The path of the source file */ path: string; } } export declare namespace SourceRevisions { export { type SourceRevisionListResponse as SourceRevisionListResponse, type SourceRevisionCreateResponse as SourceRevisionCreateResponse, type SourceRevisionRetrieveResponse as SourceRevisionRetrieveResponse, type SourceRevisionListResponsesPageCursorURL as SourceRevisionListResponsesPageCursorURL, type SourceRevisionListParams as SourceRevisionListParams, type SourceRevisionCreateParams as SourceRevisionCreateParams, }; } //# sourceMappingURL=source-revisions.d.mts.map