For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
Article

defineFunction

API reference for defineFunction: parameters, properties, and return types.

Use with AI:Rippling AI ChatGPT Claude Cursor

Defines a function, its source, and its execution settings.

import { defineFunction } from '@rippling/rippling-sdk';

Properties​

PropertyRequiredTypeDescription
apiNameRequiredstring

Unique identifier for this function (e.g. 'gym_today_schedule_fn').

descriptionRequirednull | string

Human-readable description of what this function does.

nameRequiredstring

Display name shown in the Rippling UI.

allowedDomainsOptionalstring[]

Outbound domain allowlist. Requests to domains not in this list will be blocked.

Documented default: null

codeOptionalstring

TypeScript handler source code. Must export an onRipplingEvent function.

Documented default: `''`

dependenciesOptionalRecord<string, string>

NPM package dependencies as a { packageName: versionRange } map (e.g. { '@rippling/rippling-sdk': '^0.2.0' }).

Documented default: null

deploymentOptionsOptionalRecord<string, any>

Raw deployment options object.

Documented default: null

editorGroupOptionalnull | DefinedGroup—
inputOptionalValueParser<TInput>—
isAsyncOptionalboolean

Whether this function runs asynchronously (fire-and-forget).

Documented default: `false`

outputOptionalValueParser<TOutput>—
runnerGroupOptionalnull | DefinedGroup

Embedded permission groups. Omit to preserve existing groups or use backend defaults on creation.

settingDependenciesOptionalreadonly (string | DefinedCustomSetting)[]

Setting definitions to include in the manifest, or API names of existing settings. Composer currently supports declaring these on creation, but not changing an existing Function's list.

sourceOptionalURL

Handler source file read unchanged by project export. Importing the definition performs no file I/O.

viewerGroupOptionalnull | DefinedGroup—

Complete options type

TypeScript signature
defineFunction<TInput = unknown, TOutput = unknown>(props: DefinedFunctionProps<TInput, TOutput>): DefinedFunction<TInput, TOutput>;

Returns​

DefinedFunction<TInput, TOutput>

Availability​

CapabilitySupport
Pull into a projectSupported
Runtime operationsAvailable with an authenticated SDK client