@apillon/sdk
Version:
▶◀ Apillon SDK for NodeJS ▶◀
51 lines • 1.68 kB
TypeScript
import { CloudFunctionJob } from './cloud-function-job';
import { ApillonModel } from '../../lib/apillon';
import { ICreateCloudFunctionJob } from '../../types/cloud-functions';
export declare class CloudFunction extends ApillonModel {
/**
* Unique identifier of the bucket where the cloud function code is stored
*/
bucketUuid: string;
/**
* Name of the cloud function
*/
name: string;
/**
* Description of the cloud function
*/
description: string;
/**
* Gateway URL of the cloud function, for triggering job execution
*/
gatewayUrl: string;
/**
* List of jobs associated with the cloud function
*/
jobs: CloudFunctionJob[];
/**
* Constructor which should only be called via CloudFunctions class
* @param data Data to populate cloud function with
*/
constructor(uuid: string, data?: Partial<CloudFunction>);
/**
* Gets and populates cloud function details.
* @returns CloudFunction instance
*/
get(): Promise<this>;
/**
* Sets environment variables for a specific cloud function
* @param {{ key: string; value: string }[]} variables Environment variables to set
* @returns {Promise<void>}
*/
setEnvironment(variables: {
key: string;
value: string;
}[]): Promise<void>;
/**
* Creates a new job for a specific cloud function
* @param {CreateJobDto} body Data for creating the job
* @returns {Promise<CloudFunctionJob>} Newly created cloud function job
*/
createJob(body: ICreateCloudFunctionJob): Promise<CloudFunctionJob>;
}
//# sourceMappingURL=cloud-function.d.ts.map