Skip to content

🎥 Make videos programmatically with React

5.5 KB
Raw Blame
import {
	deleteFunction,
	deleteRender,
	estimatePrice,
	getAwsClient,
	getCompositionsOnLambda,
	getFunctions,
	getRenderProgress as deprecatedGetRenderProgress,
	getSites as deprecatedGetSites,
	presignUrl as deprecatedPresignUrl,
	renderMediaOnLambda as deprecatedRenderMediaOnLambda,
	renderStillOnLambda as deprecatedRenderStillOnLambda,
	renderVideoOnLambda,
	validateWebhookSignature,
	type AwsPartition,
	type AwsRegion,
	type CustomCredentials,
	type DeleteFunctionInput,
	type DeleteRenderInput,
	type EnhancedErrorInfo,
	type EstimatePriceInput,
	type FunctionInfo,
	type GetAwsClientInput,
	type GetAwsClientOutput,
	type GetCompositionsOnLambdaInput,
	type GetCompositionsOnLambdaOutput,
	type GetFunctionsInput,
	type GetOrCreateBucketInput,
	type GetOrCreateBucketOutput,
	type GetRenderProgressInput,
	type GetSitesInput,
	type GetSitesOutput,
	type RenderMediaOnLambdaInput,
	type RenderMediaOnLambdaOutput,
	type RenderProgress,
	type RenderStillOnLambdaInput,
	type RenderStillOnLambdaOutput,
} from '@remotion/lambda-client';
import {NoReactInternals} from 'remotion/no-react';
import type {DeleteSiteInput, DeleteSiteOutput} from './api/delete-site';
import {deleteSite} from './api/delete-site';
import type {
	DeployFunctionInput,
	DeployFunctionOutput,
} from './api/deploy-function';
import {deployFunction} from './api/deploy-function';
import type {DeploySiteInput, DeploySiteOutput} from './api/deploy-site';
import {deploySite as deploySiteImplementation} from './api/deploy-site';
import type {
	DeploySiteFromBundleInput,
	DeploySiteFromBundleOutput,
} from './api/deploy-site-from-bundle';
import {deploySiteFromBundle} from './api/deploy-site-from-bundle';
import type {
	DownloadMediaInput,
	DownloadMediaOutput,
} from './api/download-media';
import {downloadMedia} from './api/download-media';
import type {GetFunctionInfoInput} from './api/get-function-info';
import {getFunctionInfo} from './api/get-function-info';
import {getOrCreateBucket} from './api/get-or-create-bucket';
import {getRegions} from './api/get-regions';
import type {
	SimulatePermissionsInput,
	SimulatePermissionsOutput,
} from './api/iam-validation/simulate';
import {simulatePermissions} from './api/iam-validation/simulate';
import {
	getRolePolicy,
	getUserPolicy,
} from './api/iam-validation/suggested-policy';
import {
	LambdaInternals,
	type _InternalOverallRenderProgress,
} from './internals';

export type {WebhookPayload} from '@remotion/lambda-client';

/**
 * @deprecated Use `bundle()` from `@remotion/bundler`, then pass its output to `deploySiteFromBundle()`.
 */
const deploySite: (args: DeploySiteInput) => DeploySiteOutput =
	deploySiteImplementation;

/**
 * @deprecated Import this from `@remotion/lambda-client` instead
 */
const renderMediaOnLambda = NoReactInternals.ENABLE_V5_BREAKING_CHANGES
	? () => {
			throw new Error(
				'renderMediaOnLambda() has moved to `@remotion/lambda-client`. Please import it from there.',
			);
		}
	: deprecatedRenderMediaOnLambda;

/**
 * @deprecated Import this from `@remotion/lambda-client` instead
 */
const getRenderProgress = NoReactInternals.ENABLE_V5_BREAKING_CHANGES
	? () => {
			throw new Error(
				'getRenderProgress() has moved to `@remotion/lambda-client`. Please import it from there.',
			);
		}
	: deprecatedGetRenderProgress;

/**
 * @deprecated Import this from `@remotion/lambda-client` instead
 */
const renderStillOnLambda = NoReactInternals.ENABLE_V5_BREAKING_CHANGES
	? () => {
			throw new Error(
				'renderStillOnLambda() has moved to `@remotion/lambda-client`. Please import it from there.',
			);
		}
	: deprecatedRenderStillOnLambda;

/**
 * @deprecated Import this from `@remotion/lambda-client` instead
 */
const presignUrl = NoReactInternals.ENABLE_V5_BREAKING_CHANGES
	? () => {
			throw new Error(
				'presignUrl() has moved to `@remotion/lambda-client`. Please import it from there.',
			);
		}
	: deprecatedPresignUrl;

/**
 * @deprecated Import this from `@remotion/lambda-client` instead
 */
const getSites = NoReactInternals.ENABLE_V5_BREAKING_CHANGES
	? () => {
			throw new Error(
				'getSites() has moved to `@remotion/lambda-client`. Please import it from there.',
			);
		}
	: deprecatedGetSites;

export {
	deleteFunction,
	deleteRender,
	deleteSite,
	deployFunction,
	deploySite,
	deploySiteFromBundle,
	downloadMedia,
	estimatePrice,
	getAwsClient,
	getCompositionsOnLambda,
	getFunctionInfo,
	getFunctions,
	getOrCreateBucket,
	getRegions,
	getRenderProgress,
	getRolePolicy,
	getSites,
	getUserPolicy,
	LambdaInternals,
	presignUrl,
	renderMediaOnLambda,
	renderStillOnLambda,
	renderVideoOnLambda,
	simulatePermissions,
	validateWebhookSignature,
};
export type {
	AwsPartition,
	AwsRegion,
	CustomCredentials,
	DeleteFunctionInput,
	DeleteRenderInput,
	DeleteSiteInput,
	DeleteSiteOutput,
	DeployFunctionInput,
	DeployFunctionOutput,
	DeploySiteFromBundleInput,
	DeploySiteFromBundleOutput,
	DeploySiteInput,
	DeploySiteOutput,
	DownloadMediaInput,
	DownloadMediaOutput,
	EnhancedErrorInfo,
	EstimatePriceInput,
	FunctionInfo,
	GetAwsClientInput,
	GetAwsClientOutput,
	GetCompositionsOnLambdaInput,
	GetCompositionsOnLambdaOutput,
	GetFunctionInfoInput,
	GetFunctionsInput,
	GetOrCreateBucketInput,
	GetOrCreateBucketOutput,
	GetRenderProgressInput,
	GetSitesInput,
	GetSitesOutput,
	RenderMediaOnLambdaInput,
	RenderMediaOnLambdaOutput,
	RenderProgress,
	RenderStillOnLambdaInput,
	RenderStillOnLambdaOutput,
	SimulatePermissionsInput,
	SimulatePermissionsOutput,
};

export type {GetPolicyOptions} from './api/iam-validation/suggested-policy';
export {_InternalOverallRenderProgress};