chore: import upstream snapshot with attribution
Publish CLI Package / publish-npm (push) Waiting to run
Publish Python SDK / publish-pypi (push) Waiting to run
Publish TypeScript SDK / publish-npm (push) Waiting to run
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:20:55 +08:00
commit d25d482dc2
13754 changed files with 4996608 additions and 0 deletions
@@ -0,0 +1,70 @@
import type { RipplingBulkCreateCustomObjectRecordsParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingBulkCreateCustomObjectRecordsTool: ToolConfig<RipplingBulkCreateCustomObjectRecordsParams> =
{
id: 'rippling_bulk_create_custom_object_records',
name: 'Rippling Bulk Create Custom Object Records',
description: 'Bulk create custom object records',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
rowsToWrite: {
type: 'json',
required: true,
visibility: 'user-or-llm',
description: 'Array of records to create [{external_id?, data}]',
},
allOrNothing: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'If true, fail entire batch on any error',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/bulk/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { rows_to_write: params.rowsToWrite }
if (params.allOrNothing != null) body.all_or_nothing = params.allOrNothing
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const createdRecords = data.data ?? []
return {
success: true,
output: {
createdRecords,
totalCount: Array.isArray(createdRecords) ? createdRecords.length : 0,
},
}
},
outputs: {
createdRecords: { type: 'array', description: 'Created custom object records' },
totalCount: { type: 'number', description: 'Number of records created' },
},
}
@@ -0,0 +1,64 @@
import type { RipplingBulkDeleteCustomObjectRecordsParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingBulkDeleteCustomObjectRecordsTool: ToolConfig<RipplingBulkDeleteCustomObjectRecordsParams> =
{
id: 'rippling_bulk_delete_custom_object_records',
name: 'Rippling Bulk Delete Custom Object Records',
description: 'Bulk delete custom object records',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
rowsToDelete: {
type: 'json',
required: true,
visibility: 'user-or-llm',
description: 'Array of records to delete',
},
allOrNothing: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'If true, fail entire batch on any error',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/bulk-delete/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { rows_to_delete: params.rowsToDelete }
if (params.allOrNothing != null) body.all_or_nothing = params.allOrNothing
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return {
success: true,
output: { deleted: true },
}
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the bulk delete succeeded' },
},
}
@@ -0,0 +1,70 @@
import type { RipplingBulkUpdateCustomObjectRecordsParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingBulkUpdateCustomObjectRecordsTool: ToolConfig<RipplingBulkUpdateCustomObjectRecordsParams> =
{
id: 'rippling_bulk_update_custom_object_records',
name: 'Rippling Bulk Update Custom Object Records',
description: 'Bulk update custom object records',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
rowsToUpdate: {
type: 'json',
required: true,
visibility: 'user-or-llm',
description: 'Array of records to update',
},
allOrNothing: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'If true, fail entire batch on any error',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/bulk/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { rows_to_update: params.rowsToUpdate }
if (params.allOrNothing != null) body.all_or_nothing = params.allOrNothing
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const updatedRecords = data.data ?? []
return {
success: true,
output: {
updatedRecords,
totalCount: Array.isArray(updatedRecords) ? updatedRecords.length : 0,
},
}
},
outputs: {
updatedRecords: { type: 'array', description: 'Updated custom object records' },
totalCount: { type: 'number', description: 'Number of records updated' },
},
}
@@ -0,0 +1,76 @@
import type { RipplingCreateBusinessPartnerParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateBusinessPartnerTool: ToolConfig<RipplingCreateBusinessPartnerParams> = {
id: 'rippling_create_business_partner',
name: 'Rippling Create Business Partner',
description: 'Create a new business partner',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
businessPartnerGroupId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Business partner group ID',
},
workerId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Worker ID',
},
},
request: {
url: `https://rest.ripplingapis.com/business-partners/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
return {
business_partner_group_id: params.businessPartnerGroupId,
worker_id: params.workerId,
}
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
business_partner_group_id: (data.business_partner_group_id as string) ?? null,
worker_id: (data.worker_id as string) ?? null,
client_group_id: (data.client_group_id as string) ?? null,
client_group_member_count: (data.client_group_member_count as number) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
business_partner_group_id: { type: 'string', description: 'Group ID', optional: true },
worker_id: { type: 'string', description: 'Worker ID', optional: true },
client_group_id: { type: 'string', description: 'Client group ID', optional: true },
client_group_member_count: {
type: 'number',
description: 'Client group member count',
optional: true,
},
},
}
@@ -0,0 +1,82 @@
import type { RipplingCreateBusinessPartnerGroupParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateBusinessPartnerGroupTool: ToolConfig<RipplingCreateBusinessPartnerGroupParams> =
{
id: 'rippling_create_business_partner_group',
name: 'Rippling Create Business Partner Group',
description: 'Create a new business partner group',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
name: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Group name',
},
domain: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Domain (HR, IT, FINANCE, RECRUITING, OTHER)',
},
defaultBusinessPartnerId: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Default business partner ID',
},
},
request: {
url: `https://rest.ripplingapis.com/business-partner-groups/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { name: params.name }
if (params.domain != null) body.domain = params.domain
if (params.defaultBusinessPartnerId != null)
body.default_business_partner_id = params.defaultBusinessPartnerId
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
domain: (data.domain as string) ?? null,
default_business_partner_id: (data.default_business_partner_id as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
domain: { type: 'string', description: 'Domain', optional: true },
default_business_partner_id: {
type: 'string',
description: 'Default partner ID',
optional: true,
},
},
}
@@ -0,0 +1,69 @@
import type { RipplingCreateCustomAppParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateCustomAppTool: ToolConfig<RipplingCreateCustomAppParams> = {
id: 'rippling_create_custom_app',
name: 'Rippling Create Custom App',
description: 'Create a new custom app',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
name: { type: 'string', required: true, visibility: 'user-or-llm', description: 'App name' },
apiName: { type: 'string', required: true, visibility: 'user-or-llm', description: 'API name' },
description: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Description',
},
},
request: {
url: `https://rest.ripplingapis.com/custom-apps/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { name: params.name, api_name: params.apiName }
if (params.description != null) body.description = params.description
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
api_name: (data.api_name as string) ?? null,
description: (data.description as string) ?? null,
icon: (data.icon as string) ?? null,
pages: (data.pages as unknown[]) ?? [],
},
}
},
outputs: {
id: { type: 'string', description: 'App ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
icon: { type: 'string', description: 'Icon URL', optional: true },
pages: { type: 'json', description: 'Array of page summaries', optional: true },
},
}
@@ -0,0 +1,87 @@
import type { RipplingCreateCustomObjectParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateCustomObjectTool: ToolConfig<RipplingCreateCustomObjectParams> = {
id: 'rippling_create_custom_object',
name: 'Rippling Create Custom Object',
description: 'Create a new custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
name: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Object name' },
description: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Description',
},
category: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Category',
},
},
request: {
url: `https://rest.ripplingapis.com/custom-objects/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { name: params.name }
if (params.description != null) body.description = params.description
if (params.category != null) body.category = params.category
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
description: (data.description as string) ?? null,
api_name: (data.api_name as string) ?? null,
plural_label: (data.plural_label as string) ?? null,
category_id: (data.category_id as string) ?? null,
enable_history: (data.enable_history as boolean) ?? null,
native_category_id: (data.native_category_id as string) ?? null,
managed_package_install_id: (data.managed_package_install_id as string) ?? null,
owner_id: (data.owner_id as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
plural_label: { type: 'string', description: 'Plural label', optional: true },
category_id: { type: 'string', description: 'Category ID', optional: true },
enable_history: { type: 'boolean', description: 'History enabled', optional: true },
native_category_id: { type: 'string', description: 'Native category ID', optional: true },
managed_package_install_id: {
type: 'string',
description: 'Package install ID',
optional: true,
},
owner_id: { type: 'string', description: 'Owner ID', optional: true },
},
}
@@ -0,0 +1,159 @@
import type { RipplingCreateCustomObjectFieldParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateCustomObjectFieldTool: ToolConfig<RipplingCreateCustomObjectFieldParams> =
{
id: 'rippling_create_custom_object_field',
name: 'Rippling Create Custom Object Field',
description: 'Create a field on a custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
name: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Field name',
},
description: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Description',
},
dataType: {
type: 'json',
required: true,
visibility: 'user-or-llm',
description: 'Data type configuration',
},
required: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Whether the field is required',
},
rqlDefinition: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'RQL definition object',
},
isUnique: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Whether field is unique',
},
formulaAttrMetas: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Formula attribute metadata',
},
section: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Section configuration',
},
enableHistory: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Enable history tracking',
},
derivedFieldFormula: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Derived field formula expression',
},
derivedAggregatedField: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Derived aggregated field configuration',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/fields/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { name: params.name, data_type: params.dataType }
if (params.description != null) body.description = params.description
if (params.required != null) body.required = params.required
if (params.rqlDefinition != null) body.rql_definition = params.rqlDefinition
if (params.isUnique != null) body.is_unique = params.isUnique
if (params.formulaAttrMetas != null) body.formula_attr_metas = params.formulaAttrMetas
if (params.section != null) body.section = params.section
if (params.enableHistory != null) body.enable_history = params.enableHistory
if (params.derivedFieldFormula != null)
body.derived_field_formula = params.derivedFieldFormula
if (params.derivedAggregatedField != null)
body.derived_aggregated_field = params.derivedAggregatedField
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
custom_object: (data.custom_object as string) ?? null,
description: (data.description as string) ?? null,
api_name: (data.api_name as string) ?? null,
data_type: data.data_type ?? null,
is_unique: (data.is_unique as boolean) ?? null,
is_immutable: (data.is_immutable as boolean) ?? null,
is_standard: (data.is_standard as boolean) ?? null,
enable_history: (data.enable_history as boolean) ?? null,
managed_package_install_id: (data.managed_package_install_id as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Field ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
custom_object: { type: 'string', description: 'Custom object', optional: true },
description: { type: 'string', description: 'Description', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
data_type: { type: 'json', description: 'Data type configuration', optional: true },
is_unique: { type: 'boolean', description: 'Is unique', optional: true },
is_immutable: { type: 'boolean', description: 'Is immutable', optional: true },
is_standard: { type: 'boolean', description: 'Is standard', optional: true },
enable_history: { type: 'boolean', description: 'History enabled', optional: true },
managed_package_install_id: {
type: 'string',
description: 'Package install ID',
optional: true,
},
},
}
@@ -0,0 +1,87 @@
import type { RipplingCreateCustomObjectRecordParams } from '@/tools/rippling/types'
import { CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateCustomObjectRecordTool: ToolConfig<RipplingCreateCustomObjectRecordParams> =
{
id: 'rippling_create_custom_object_record',
name: 'Rippling Create Custom Object Record',
description: 'Create a custom object record',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
externalId: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'External ID for the record',
},
data: { type: 'json', required: true, visibility: 'user-or-llm', description: 'Record data' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { data: params.data }
if (params.externalId != null && params.externalId !== '')
body.external_id = params.externalId
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const json = await response.json()
const record = (json.data ?? json) as Record<string, unknown>
const {
id,
created_at,
updated_at,
name,
external_id,
created_by,
last_modified_by,
owner_role,
system_updated_at,
...dynamicFields
} = record
return {
success: true,
output: {
id: (id as string) ?? '',
created_at: (created_at as string) ?? null,
updated_at: (updated_at as string) ?? null,
name: (name as string) ?? null,
external_id: (external_id as string) ?? null,
created_by: created_by ?? null,
last_modified_by: last_modified_by ?? null,
owner_role: owner_role ?? null,
system_updated_at: (system_updated_at as string) ?? null,
data: dynamicFields,
},
}
},
outputs: {
...CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES,
data: { type: 'json', description: 'Full record data' },
},
}
@@ -0,0 +1,62 @@
import type { RipplingCreateCustomPageParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateCustomPageTool: ToolConfig<RipplingCreateCustomPageParams> = {
id: 'rippling_create_custom_page',
name: 'Rippling Create CustomPage',
description: 'Create a new custom page',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
name: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Page name' },
},
request: {
url: `https://rest.ripplingapis.com/custom-pages/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
return { name: params.name }
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
components: data.components ?? [],
actions: data.actions ?? [],
canvas_actions: data.canvas_actions ?? [],
variables: data.variables ?? [],
media: data.media ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Page ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
components: { type: 'json', description: 'Page components', optional: true },
actions: { type: 'json', description: 'Page actions', optional: true },
canvas_actions: { type: 'json', description: 'Canvas actions', optional: true },
variables: { type: 'json', description: 'Page variables', optional: true },
media: { type: 'json', description: 'Page media', optional: true },
},
}
@@ -0,0 +1,105 @@
import type { RipplingCreateCustomSettingParams } from '@/tools/rippling/types'
import { CUSTOM_SETTING_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateCustomSettingTool: ToolConfig<RipplingCreateCustomSettingParams> = {
id: 'rippling_create_custom_setting',
name: 'Rippling Create Custom Setting',
description: 'Create a new custom setting',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
displayName: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Display name',
},
apiName: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Unique API name',
},
dataType: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Data type of the setting',
},
secretValue: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Secret value (for secret data type)',
},
stringValue: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'String value (for string data type)',
},
numberValue: {
type: 'number',
required: false,
visibility: 'user-or-llm',
description: 'Number value (for number data type)',
},
booleanValue: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Boolean value (for boolean data type)',
},
},
request: {
url: `https://rest.ripplingapis.com/custom-settings/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.displayName != null) body.display_name = params.displayName
if (params.apiName != null) body.api_name = params.apiName
if (params.dataType != null) body.data_type = params.dataType
if (params.secretValue != null) body.secret_value = params.secretValue
if (params.stringValue != null) body.string_value = params.stringValue
if (params.numberValue != null) body.number_value = params.numberValue
if (params.booleanValue != null) body.boolean_value = params.booleanValue
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
display_name: (data.display_name as string) ?? null,
api_name: (data.api_name as string) ?? null,
data_type: (data.data_type as string) ?? null,
secret_value: (data.secret_value as string) ?? null,
string_value: (data.string_value as string) ?? null,
number_value: data.number_value ?? null,
boolean_value: data.boolean_value ?? null,
},
}
},
outputs: {
...CUSTOM_SETTING_OUTPUT_PROPERTIES,
},
}
@@ -0,0 +1,90 @@
import type { RipplingCreateDepartmentParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateDepartmentTool: ToolConfig<RipplingCreateDepartmentParams> = {
id: 'rippling_create_department',
name: 'Rippling Create Department',
description: 'Create a new department',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
name: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Department name',
},
parentId: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Parent department ID',
},
referenceCode: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Reference code',
},
},
request: {
url: `https://rest.ripplingapis.com/departments/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { name: params.name }
if (params.parentId != null) body.parent_id = params.parentId
if (params.referenceCode != null) body.reference_code = params.referenceCode
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
parent_id: (data.parent_id as string) ?? null,
reference_code: (data.reference_code as string) ?? null,
department_hierarchy_id: (data.department_hierarchy_id as unknown[]) ?? [],
parent: data.parent ?? null,
department_hierarchy: data.department_hierarchy ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Department ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
parent_id: { type: 'string', description: 'Parent department ID', optional: true },
reference_code: { type: 'string', description: 'Reference code', optional: true },
department_hierarchy_id: {
type: 'json',
description: 'Department hierarchy IDs',
optional: true,
},
parent: { type: 'json', description: 'Expanded parent department', optional: true },
department_hierarchy: {
type: 'json',
description: 'Expanded department hierarchy',
optional: true,
},
},
}
@@ -0,0 +1,57 @@
import type { RipplingCreateDraftHiresParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateDraftHiresTool: ToolConfig<RipplingCreateDraftHiresParams> = {
id: 'rippling_create_draft_hires',
name: 'Rippling Create Draft Hires',
description: 'Create bulk draft hires',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
draftHires: {
type: 'json',
required: true,
visibility: 'user-or-llm',
description: 'Array of draft hire objects',
},
},
request: {
url: `https://rest.ripplingapis.com/draft-hires/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
return { draft_hires: params.draftHires }
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
invalidItems: data.invalid_items ?? [],
successfulResults: data.successful_results ?? [],
totalInvalid: (data.invalid_items ?? []).length,
totalSuccessful: (data.successful_results ?? []).length,
},
}
},
outputs: {
invalidItems: { type: 'json', description: 'Failed draft hires' },
successfulResults: { type: 'json', description: 'Successful draft hires' },
totalInvalid: { type: 'number', description: 'Number of failures' },
totalSuccessful: { type: 'number', description: 'Number of successes' },
},
}
@@ -0,0 +1,67 @@
import type { RipplingCreateObjectCategoryParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateObjectCategoryTool: ToolConfig<RipplingCreateObjectCategoryParams> = {
id: 'rippling_create_object_category',
name: 'Rippling Create ObjectCategory',
description: 'Create a new object category',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
name: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Category name',
},
description: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Description',
},
},
request: {
url: `https://rest.ripplingapis.com/object-categories/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { name: params.name }
if (params.description != null) body.description = params.description
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
description: (data.description as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Category ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
},
}
+52
View File
@@ -0,0 +1,52 @@
import type { RipplingCreateTitleParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateTitleTool: ToolConfig<RipplingCreateTitleParams> = {
id: 'rippling_create_title',
name: 'Rippling Create Title',
description: 'Create a new title',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
name: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Title name' },
},
request: {
url: `https://rest.ripplingapis.com/titles/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
return { name: params.name }
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Title ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Title name', optional: true },
},
}
@@ -0,0 +1,98 @@
import type { RipplingCreateWorkLocationParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingCreateWorkLocationTool: ToolConfig<RipplingCreateWorkLocationParams> = {
id: 'rippling_create_work_location',
name: 'Rippling Create Work Location',
description: 'Create a new work location',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
name: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Location name',
},
streetAddress: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Street address',
},
locality: { type: 'string', required: false, visibility: 'user-or-llm', description: 'City' },
region: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'State/region',
},
postalCode: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Postal code',
},
country: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Country code',
},
addressType: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Address type (HOME, WORK, OTHER)',
},
},
request: {
url: `https://rest.ripplingapis.com/work-locations/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { name: params.name }
const address: Record<string, string> = { street_address: params.streetAddress }
if (params.locality != null) address.locality = params.locality
if (params.region != null) address.region = params.region
if (params.postalCode != null) address.postal_code = params.postalCode
if (params.country != null) address.country = params.country
if (params.addressType != null) address.type = params.addressType
body.address = address
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
address: data.address ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Location ID' },
created_at: { type: 'string', description: 'Created timestamp', optional: true },
updated_at: { type: 'string', description: 'Updated timestamp', optional: true },
name: { type: 'string', description: 'Name' },
address: { type: 'json', description: 'Address', optional: true },
},
}
@@ -0,0 +1,39 @@
import type { RipplingDeleteBusinessPartnerParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteBusinessPartnerTool: ToolConfig<RipplingDeleteBusinessPartnerParams> = {
id: 'rippling_delete_business_partner',
name: 'Rippling Delete Business Partner',
description: 'Delete a business partner',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/business-partners/${encodeURIComponent(params.id.trim())}/`,
method: 'DELETE',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
@@ -0,0 +1,43 @@
import type { RipplingDeleteBusinessPartnerGroupParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteBusinessPartnerGroupTool: ToolConfig<RipplingDeleteBusinessPartnerGroupParams> =
{
id: 'rippling_delete_business_partner_group',
name: 'Rippling Delete Business Partner Group',
description: 'Delete a business partner group',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/business-partner-groups/${encodeURIComponent(params.id.trim())}/`,
method: 'DELETE',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
@@ -0,0 +1,39 @@
import type { RipplingDeleteCustomAppParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteCustomAppTool: ToolConfig<RipplingDeleteCustomAppParams> = {
id: 'rippling_delete_custom_app',
name: 'Rippling Delete CustomApp',
description: 'Delete a custom app',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-apps/${encodeURIComponent(params.id.trim())}/`,
method: 'DELETE',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
@@ -0,0 +1,39 @@
import type { RipplingDeleteCustomObjectParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteCustomObjectTool: ToolConfig<RipplingDeleteCustomObjectParams> = {
id: 'rippling_delete_custom_object',
name: 'Rippling Delete Custom Object',
description: 'Delete a custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/`,
method: 'DELETE',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
@@ -0,0 +1,47 @@
import type { RipplingDeleteCustomObjectFieldParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteCustomObjectFieldTool: ToolConfig<RipplingDeleteCustomObjectFieldParams> =
{
id: 'rippling_delete_custom_object_field',
name: 'Rippling Delete Custom Object Field',
description: 'Delete a field from a custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
fieldApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Field API name',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/fields/${encodeURIComponent(params.fieldApiName.trim())}/`,
method: 'DELETE',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: { deleted: { type: 'boolean', description: 'Whether the field was deleted' } },
}
@@ -0,0 +1,47 @@
import type { RipplingDeleteCustomObjectRecordParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteCustomObjectRecordTool: ToolConfig<RipplingDeleteCustomObjectRecordParams> =
{
id: 'rippling_delete_custom_object_record',
name: 'Rippling Delete Custom Object Record',
description: 'Delete a custom object record',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
codrId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Record ID',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/${encodeURIComponent(params.codrId.trim())}/`,
method: 'DELETE',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: { deleted: { type: 'boolean', description: 'Whether the record was deleted' } },
}
@@ -0,0 +1,39 @@
import type { RipplingDeleteCustomPageParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteCustomPageTool: ToolConfig<RipplingDeleteCustomPageParams> = {
id: 'rippling_delete_custom_page',
name: 'Rippling Delete CustomPage',
description: 'Delete a custom page',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-pages/${encodeURIComponent(params.id.trim())}/`,
method: 'DELETE',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
@@ -0,0 +1,39 @@
import type { RipplingDeleteCustomSettingParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteCustomSettingTool: ToolConfig<RipplingDeleteCustomSettingParams> = {
id: 'rippling_delete_custom_setting',
name: 'Rippling Delete Custom Setting',
description: 'Delete a custom setting',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-settings/${encodeURIComponent(params.id.trim())}/`,
method: 'DELETE',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
@@ -0,0 +1,39 @@
import type { RipplingDeleteObjectCategoryParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteObjectCategoryTool: ToolConfig<RipplingDeleteObjectCategoryParams> = {
id: 'rippling_delete_object_category',
name: 'Rippling Delete ObjectCategory',
description: 'Delete an object category',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/object-categories/${encodeURIComponent(params.id.trim())}/`,
method: 'DELETE',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
+39
View File
@@ -0,0 +1,39 @@
import type { RipplingDeleteTitleParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteTitleTool: ToolConfig<RipplingDeleteTitleParams> = {
id: 'rippling_delete_title',
name: 'Rippling Delete Title',
description: 'Delete a title',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/titles/${encodeURIComponent(params.id.trim())}/`,
method: 'DELETE',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
@@ -0,0 +1,39 @@
import type { RipplingDeleteWorkLocationParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingDeleteWorkLocationTool: ToolConfig<RipplingDeleteWorkLocationParams> = {
id: 'rippling_delete_work_location',
name: 'Rippling Delete Work Location',
description: 'Delete a work location',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'ID of the resource to delete',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/work-locations/${encodeURIComponent(params.id.trim())}/`,
method: 'DELETE',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
return { success: true, output: { deleted: true } }
},
outputs: {
deleted: { type: 'boolean', description: 'Whether the resource was deleted' },
},
}
@@ -0,0 +1,67 @@
import type { RipplingGetBusinessPartnerParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetBusinessPartnerTool: ToolConfig<RipplingGetBusinessPartnerParams> = {
id: 'rippling_get_business_partner',
name: 'Rippling Get Business Partner',
description: 'Get a specific business partner by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
},
request: {
url: (params) => {
const base = `https://rest.ripplingapis.com/business-partners/${encodeURIComponent(params.id.trim())}/`
if (params.expand != null) return `${base}?expand=${encodeURIComponent(params.expand)}`
return base
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
business_partner_group_id: (data.business_partner_group_id as string) ?? null,
worker_id: (data.worker_id as string) ?? null,
client_group_id: (data.client_group_id as string) ?? null,
client_group_member_count: (data.client_group_member_count as number) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
business_partner_group_id: { type: 'string', description: 'Group ID', optional: true },
worker_id: { type: 'string', description: 'Worker ID', optional: true },
client_group_id: { type: 'string', description: 'Client group ID', optional: true },
client_group_member_count: {
type: 'number',
description: 'Client group member count',
optional: true,
},
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,69 @@
import type { RipplingGetBusinessPartnerGroupParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetBusinessPartnerGroupTool: ToolConfig<RipplingGetBusinessPartnerGroupParams> =
{
id: 'rippling_get_business_partner_group',
name: 'Rippling Get Business Partner Group',
description: 'Get a specific business partner group by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
},
request: {
url: (params) => {
const base = `https://rest.ripplingapis.com/business-partner-groups/${encodeURIComponent(params.id.trim())}/`
if (params.expand != null) return `${base}?expand=${encodeURIComponent(params.expand)}`
return base
},
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
domain: (data.domain as string) ?? null,
default_business_partner_id: (data.default_business_partner_id as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
domain: { type: 'string', description: 'Domain', optional: true },
default_business_partner_id: {
type: 'string',
description: 'Default partner ID',
optional: true,
},
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,59 @@
import type { RipplingGetCurrentUserParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetCurrentUserTool: ToolConfig<RipplingGetCurrentUserParams> = {
id: 'rippling_get_current_user',
name: 'Rippling Get Current User',
description: 'Get SSO information for the current user',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.expand != null) query.set('expand', params.expand)
const qs = query.toString()
return `https://rest.ripplingapis.com/sso-me/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
work_email: (data.work_email as string) ?? null,
company_id: (data.company_id as string) ?? null,
company: data.company ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'User ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
work_email: { type: 'string', description: 'Work email', optional: true },
company_id: { type: 'string', description: 'Company ID', optional: true },
company: { type: 'json', description: 'Expanded company object', optional: true },
},
}
+56
View File
@@ -0,0 +1,56 @@
import type { RipplingGetCustomAppParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetCustomAppTool: ToolConfig<RipplingGetCustomAppParams> = {
id: 'rippling_get_custom_app',
name: 'Rippling Get CustomApp',
description: 'Get a specific custom app',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-apps/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
api_name: (data.api_name as string) ?? null,
description: (data.description as string) ?? null,
icon: (data.icon as string) ?? null,
pages: (data.pages as unknown[]) ?? [],
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'App ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
icon: { type: 'string', description: 'Icon URL', optional: true },
pages: { type: 'json', description: 'Array of page summaries', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,71 @@
import type { RipplingGetCustomObjectParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetCustomObjectTool: ToolConfig<RipplingGetCustomObjectParams> = {
id: 'rippling_get_custom_object',
name: 'Rippling Get Custom Object',
description: 'Get a custom object by API name',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'custom object api name',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
description: (data.description as string) ?? null,
api_name: (data.api_name as string) ?? null,
plural_label: (data.plural_label as string) ?? null,
category_id: (data.category_id as string) ?? null,
enable_history: (data.enable_history as boolean) ?? null,
native_category_id: (data.native_category_id as string) ?? null,
managed_package_install_id: (data.managed_package_install_id as string) ?? null,
owner_id: (data.owner_id as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
plural_label: { type: 'string', description: 'Plural label', optional: true },
category_id: { type: 'string', description: 'Category ID', optional: true },
enable_history: { type: 'boolean', description: 'History enabled', optional: true },
native_category_id: { type: 'string', description: 'Native category ID', optional: true },
managed_package_install_id: {
type: 'string',
description: 'Package install ID',
optional: true,
},
owner_id: { type: 'string', description: 'Owner ID', optional: true },
},
}
@@ -0,0 +1,79 @@
import type { RipplingGetCustomObjectFieldParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetCustomObjectFieldTool: ToolConfig<RipplingGetCustomObjectFieldParams> = {
id: 'rippling_get_custom_object_field',
name: 'Rippling Get Custom Object Field',
description: 'Get a specific field of a custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
fieldApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Field API name',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/fields/${encodeURIComponent(params.fieldApiName.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
custom_object: (data.custom_object as string) ?? null,
description: (data.description as string) ?? null,
api_name: (data.api_name as string) ?? null,
data_type: data.data_type ?? null,
is_unique: (data.is_unique as boolean) ?? null,
is_immutable: (data.is_immutable as boolean) ?? null,
is_standard: (data.is_standard as boolean) ?? null,
enable_history: (data.enable_history as boolean) ?? null,
managed_package_install_id: (data.managed_package_install_id as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Field ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
custom_object: { type: 'string', description: 'Custom object', optional: true },
description: { type: 'string', description: 'Description', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
data_type: { type: 'json', description: 'Data type configuration', optional: true },
is_unique: { type: 'boolean', description: 'Is unique', optional: true },
is_immutable: { type: 'boolean', description: 'Is immutable', optional: true },
is_standard: { type: 'boolean', description: 'Is standard', optional: true },
enable_history: { type: 'boolean', description: 'History enabled', optional: true },
managed_package_install_id: {
type: 'string',
description: 'Package install ID',
optional: true,
},
},
}
@@ -0,0 +1,69 @@
import type { RipplingGetCustomObjectRecordParams } from '@/tools/rippling/types'
import { CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetCustomObjectRecordTool: ToolConfig<RipplingGetCustomObjectRecordParams> = {
id: 'rippling_get_custom_object_record',
name: 'Rippling Get Custom Object Record',
description: 'Get a specific custom object record',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
codrId: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Record ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/${encodeURIComponent(params.codrId.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const record = await response.json()
const {
id,
created_at,
updated_at,
name,
external_id,
created_by,
last_modified_by,
owner_role,
system_updated_at,
...dynamicFields
} = record
return {
success: true,
output: {
id: (id as string) ?? '',
created_at: (created_at as string) ?? null,
updated_at: (updated_at as string) ?? null,
name: (name as string) ?? null,
external_id: (external_id as string) ?? null,
created_by: created_by ?? null,
last_modified_by: last_modified_by ?? null,
owner_role: owner_role ?? null,
system_updated_at: (system_updated_at as string) ?? null,
data: dynamicFields,
},
}
},
outputs: {
...CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES,
data: { type: 'json', description: 'Full record data' },
},
}
@@ -0,0 +1,78 @@
import type { RipplingGetCustomObjectRecordByExternalIdParams } from '@/tools/rippling/types'
import { CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetCustomObjectRecordByExternalIdTool: ToolConfig<RipplingGetCustomObjectRecordByExternalIdParams> =
{
id: 'rippling_get_custom_object_record_by_external_id',
name: 'Rippling Get Record By External ID',
description: 'Get a custom object record by external ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
externalId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'External ID',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/external_id/${encodeURIComponent(params.externalId.trim())}/`,
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const record = await response.json()
const {
id,
created_at,
updated_at,
name,
external_id,
created_by,
last_modified_by,
owner_role,
system_updated_at,
...dynamicFields
} = record
return {
success: true,
output: {
id: (id as string) ?? '',
created_at: (created_at as string) ?? null,
updated_at: (updated_at as string) ?? null,
name: (name as string) ?? null,
external_id: (external_id as string) ?? null,
created_by: created_by ?? null,
last_modified_by: last_modified_by ?? null,
owner_role: owner_role ?? null,
system_updated_at: (system_updated_at as string) ?? null,
data: dynamicFields,
},
}
},
outputs: {
...CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES,
data: { type: 'json', description: 'Full record data' },
},
}
@@ -0,0 +1,58 @@
import type { RipplingGetCustomPageParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetCustomPageTool: ToolConfig<RipplingGetCustomPageParams> = {
id: 'rippling_get_custom_page',
name: 'Rippling Get CustomPage',
description: 'Get a specific custom page',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-pages/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
components: data.components ?? [],
actions: data.actions ?? [],
canvas_actions: data.canvas_actions ?? [],
variables: data.variables ?? [],
media: data.media ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Page ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
components: { type: 'json', description: 'Page components', optional: true },
actions: { type: 'json', description: 'Page actions', optional: true },
canvas_actions: { type: 'json', description: 'Canvas actions', optional: true },
variables: { type: 'json', description: 'Page variables', optional: true },
media: { type: 'json', description: 'Page media', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,52 @@
import type { RipplingGetCustomSettingParams } from '@/tools/rippling/types'
import { CUSTOM_SETTING_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetCustomSettingTool: ToolConfig<RipplingGetCustomSettingParams> = {
id: 'rippling_get_custom_setting',
name: 'Rippling Get Custom Setting',
description: 'Get a specific custom setting',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-settings/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
display_name: (data.display_name as string) ?? null,
api_name: (data.api_name as string) ?? null,
data_type: (data.data_type as string) ?? null,
secret_value: (data.secret_value as string) ?? null,
string_value: (data.string_value as string) ?? null,
number_value: data.number_value ?? null,
boolean_value: data.boolean_value ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
...CUSTOM_SETTING_OUTPUT_PROPERTIES,
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+60
View File
@@ -0,0 +1,60 @@
import type { RipplingGetDepartmentParams } from '@/tools/rippling/types'
import { DEPARTMENT_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetDepartmentTool: ToolConfig<RipplingGetDepartmentParams> = {
id: 'rippling_get_department',
name: 'Rippling Get Department',
description: 'Get a specific department by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
},
request: {
url: (params) => {
const base = `https://rest.ripplingapis.com/departments/${encodeURIComponent(params.id.trim())}/`
if (params.expand != null) return `${base}?expand=${encodeURIComponent(params.expand)}`
return base
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
parent_id: (data.parent_id as string) ?? null,
reference_code: (data.reference_code as string) ?? null,
department_hierarchy_id: (data.department_hierarchy_id as unknown[]) ?? [],
parent: data.parent ?? null,
department_hierarchy: data.department_hierarchy ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
...DEPARTMENT_OUTPUT_PROPERTIES,
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,67 @@
import type { RipplingGetEmploymentTypeParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetEmploymentTypeTool: ToolConfig<RipplingGetEmploymentTypeParams> = {
id: 'rippling_get_employment_type',
name: 'Rippling Get Employment Type',
description: 'Get a specific employment type by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/employment-types/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
label: (data.label as string) ?? null,
name: (data.name as string) ?? null,
type: (data.type as string) ?? null,
compensation_time_period: (data.compensation_time_period as string) ?? null,
amount_worked: (data.amount_worked as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Employment type ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
label: { type: 'string', description: 'Label', optional: true },
name: { type: 'string', description: 'Name', optional: true },
type: { type: 'string', description: 'Type (CONTRACTOR, EMPLOYEE)', optional: true },
compensation_time_period: {
type: 'string',
description: 'Compensation period (HOURLY, SALARIED)',
optional: true,
},
amount_worked: {
type: 'string',
description: 'Amount worked (PART-TIME, FULL-TIME, TEMPORARY)',
optional: true,
},
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,48 @@
import type { RipplingGetJobFunctionParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetJobFunctionTool: ToolConfig<RipplingGetJobFunctionParams> = {
id: 'rippling_get_job_function',
name: 'Rippling Get Job Function',
description: 'Get a specific job function by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/job-functions/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Job function ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,51 @@
import type { RipplingGetObjectCategoryParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetObjectCategoryTool: ToolConfig<RipplingGetObjectCategoryParams> = {
id: 'rippling_get_object_category',
name: 'Rippling Get ObjectCategory',
description: 'Get a specific object category',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/object-categories/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
description: (data.description as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Category ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
},
}
+61
View File
@@ -0,0 +1,61 @@
import type { RipplingGetReportRunParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetReportRunTool: ToolConfig<RipplingGetReportRunParams> = {
id: 'rippling_get_report_run',
name: 'Rippling Get Report Run',
description: 'Get a report run by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
runId: { type: 'string', required: true, visibility: 'user-or-llm', description: 'run id' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/report-runs/${encodeURIComponent(params.runId.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const result = data.result as Record<string, unknown> | null
return {
success: true,
output: {
id: (data.id as string) ?? '',
report_id: (data.report_id as string) ?? null,
status: (data.status as string) ?? null,
file_url: (result?.file_url as string) ?? null,
expires_at: (result?.expires_at as string) ?? null,
output_type: (result?.output_type as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Report run ID' },
report_id: { type: 'string', description: 'Report ID', optional: true },
status: { type: 'string', description: 'Run status', optional: true },
file_url: { type: 'string', description: 'URL to download the report file', optional: true },
expires_at: {
type: 'string',
description: 'Expiration timestamp for the file URL',
optional: true,
},
output_type: { type: 'string', description: 'Output format (JSON or CSV)', optional: true },
__meta: {
type: 'json',
description: 'Metadata including redacted_fields',
optional: true,
},
},
}
+61
View File
@@ -0,0 +1,61 @@
import type { RipplingGetSupergroupParams } from '@/tools/rippling/types'
import { SUPERGROUP_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetSupergroupTool: ToolConfig<RipplingGetSupergroupParams> = {
id: 'rippling_get_supergroup',
name: 'Rippling Get Supergroup',
description: 'Get a specific supergroup by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/supergroups/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
display_name: (data.display_name as string) ?? null,
description: (data.description as string) ?? null,
app_owner_id: (data.app_owner_id as string) ?? null,
group_type: (data.group_type as string) ?? null,
name: (data.name as string) ?? null,
sub_group_type: (data.sub_group_type as string) ?? null,
read_only: (data.read_only as boolean) ?? null,
parent: (data.parent as string) ?? null,
mutually_exclusive_key: (data.mutually_exclusive_key as string) ?? null,
cumulatively_exhaustive_default: (data.cumulatively_exhaustive_default as boolean) ?? null,
include_terminated: (data.include_terminated as boolean) ?? null,
allow_non_employees: (data.allow_non_employees as boolean) ?? null,
can_override_role_states: (data.can_override_role_states as boolean) ?? null,
priority: (data.priority as number) ?? null,
is_invisible: (data.is_invisible as boolean) ?? null,
ignore_prov_group_matching: (data.ignore_prov_group_matching as boolean) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
...SUPERGROUP_OUTPUT_PROPERTIES,
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+61
View File
@@ -0,0 +1,61 @@
import type { RipplingGetTeamParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetTeamTool: ToolConfig<RipplingGetTeamParams> = {
id: 'rippling_get_team',
name: 'Rippling Get Team',
description: 'Get a specific team by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
},
request: {
url: (params) => {
const base = `https://rest.ripplingapis.com/teams/${encodeURIComponent(params.id.trim())}/`
if (params.expand != null) return `${base}?expand=${encodeURIComponent(params.expand)}`
return base
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
parent_id: (data.parent_id as string) ?? null,
parent: data.parent ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Team ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
parent_id: { type: 'string', description: 'Parent team ID', optional: true },
parent: { type: 'json', description: 'Expanded parent team', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+48
View File
@@ -0,0 +1,48 @@
import type { RipplingGetTitleParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetTitleTool: ToolConfig<RipplingGetTitleParams> = {
id: 'rippling_get_title',
name: 'Rippling Get Title',
description: 'Get a specific title by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/titles/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Title ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Title name', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+69
View File
@@ -0,0 +1,69 @@
import type { RipplingGetUserParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetUserTool: ToolConfig<RipplingGetUserParams> = {
id: 'rippling_get_user',
name: 'Rippling Get User',
description: 'Get a specific user by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) => `https://rest.ripplingapis.com/users/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
active: (data.active as boolean) ?? null,
username: (data.username as string) ?? null,
display_name: (data.display_name as string) ?? null,
preferred_language: (data.preferred_language as string) ?? null,
locale: (data.locale as string) ?? null,
timezone: (data.timezone as string) ?? null,
number: (data.number as string) ?? null,
name: data.name ?? null,
emails: data.emails ?? [],
phone_numbers: data.phone_numbers ?? [],
addresses: data.addresses ?? [],
photos: data.photos ?? [],
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'User ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
active: { type: 'boolean', description: 'Is active', optional: true },
username: { type: 'string', description: 'Username', optional: true },
display_name: { type: 'string', description: 'Display name', optional: true },
preferred_language: { type: 'string', description: 'Preferred language', optional: true },
locale: { type: 'string', description: 'Locale', optional: true },
timezone: { type: 'string', description: 'Timezone', optional: true },
number: { type: 'string', description: 'Profile number', optional: true },
name: { type: 'json', description: 'User name object', optional: true },
emails: { type: 'json', description: 'Email addresses', optional: true },
phone_numbers: { type: 'json', description: 'Phone numbers', optional: true },
addresses: { type: 'json', description: 'Addresses', optional: true },
photos: { type: 'json', description: 'Photos', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,50 @@
import type { RipplingGetWorkLocationParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetWorkLocationTool: ToolConfig<RipplingGetWorkLocationParams> = {
id: 'rippling_get_work_location',
name: 'Rippling Get Work Location',
description: 'Get a specific work location by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/work-locations/${encodeURIComponent(params.id.trim())}/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
address: data.address ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Location ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
address: { type: 'json', description: 'Address object', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+113
View File
@@ -0,0 +1,113 @@
import type { RipplingGetWorkerParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingGetWorkerTool: ToolConfig<RipplingGetWorkerParams> = {
id: 'rippling_get_worker',
name: 'Rippling Get Worker',
description: 'Get a specific worker by ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Resource ID' },
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
},
request: {
url: (params) => {
const base = `https://rest.ripplingapis.com/workers/${encodeURIComponent(params.id.trim())}/`
if (params.expand != null) return `${base}?expand=${encodeURIComponent(params.expand)}`
return base
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
user_id: (data.user_id as string) ?? null,
is_manager: (data.is_manager as boolean) ?? null,
manager_id: (data.manager_id as string) ?? null,
legal_entity_id: (data.legal_entity_id as string) ?? null,
country: (data.country as string) ?? null,
start_date: (data.start_date as string) ?? null,
end_date: (data.end_date as string) ?? null,
number: (data.number as number) ?? null,
work_email: (data.work_email as string) ?? null,
personal_email: (data.personal_email as string) ?? null,
status: (data.status as string) ?? null,
employment_type_id: (data.employment_type_id as string) ?? null,
department_id: (data.department_id as string) ?? null,
teams_id: (data.teams_id as unknown[]) ?? [],
title: (data.title as string) ?? null,
level_id: (data.level_id as string) ?? null,
compensation_id: (data.compensation_id as string) ?? null,
overtime_exemption: (data.overtime_exemption as string) ?? null,
title_effective_date: (data.title_effective_date as string) ?? null,
business_partners_id: (data.business_partners_id as unknown[]) ?? [],
location: data.location ?? null,
gender: (data.gender as string) ?? null,
date_of_birth: (data.date_of_birth as string) ?? null,
race: (data.race as string) ?? null,
ethnicity: (data.ethnicity as string) ?? null,
citizenship: (data.citizenship as string) ?? null,
termination_details: data.termination_details ?? null,
custom_fields: data.custom_fields ?? null,
country_fields: data.country_fields ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Worker ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
user_id: { type: 'string', description: 'User ID', optional: true },
is_manager: { type: 'boolean', description: 'Is manager', optional: true },
manager_id: { type: 'string', description: 'Manager ID', optional: true },
legal_entity_id: { type: 'string', description: 'Legal entity ID', optional: true },
country: { type: 'string', description: 'Country', optional: true },
start_date: { type: 'string', description: 'Start date', optional: true },
end_date: { type: 'string', description: 'End date', optional: true },
number: { type: 'number', description: 'Worker number', optional: true },
work_email: { type: 'string', description: 'Work email', optional: true },
personal_email: { type: 'string', description: 'Personal email', optional: true },
status: { type: 'string', description: 'Status', optional: true },
employment_type_id: { type: 'string', description: 'Employment type ID', optional: true },
department_id: { type: 'string', description: 'Department ID', optional: true },
teams_id: { type: 'json', description: 'Team IDs', optional: true },
title: { type: 'string', description: 'Job title', optional: true },
level_id: { type: 'string', description: 'Level ID', optional: true },
compensation_id: { type: 'string', description: 'Compensation ID', optional: true },
overtime_exemption: { type: 'string', description: 'Overtime exemption', optional: true },
title_effective_date: { type: 'string', description: 'Title effective date', optional: true },
business_partners_id: { type: 'json', description: 'Business partner IDs', optional: true },
location: { type: 'json', description: 'Worker location', optional: true },
gender: { type: 'string', description: 'Gender', optional: true },
date_of_birth: { type: 'string', description: 'Date of birth', optional: true },
race: { type: 'string', description: 'Race', optional: true },
ethnicity: { type: 'string', description: 'Ethnicity', optional: true },
citizenship: { type: 'string', description: 'Citizenship', optional: true },
termination_details: { type: 'json', description: 'Termination details', optional: true },
custom_fields: { type: 'json', description: 'Custom fields', optional: true },
country_fields: { type: 'json', description: 'Country-specific fields', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+87
View File
@@ -0,0 +1,87 @@
export { ripplingBulkCreateCustomObjectRecordsTool } from './bulk_create_custom_object_records'
export { ripplingBulkDeleteCustomObjectRecordsTool } from './bulk_delete_custom_object_records'
export { ripplingBulkUpdateCustomObjectRecordsTool } from './bulk_update_custom_object_records'
export { ripplingCreateBusinessPartnerTool } from './create_business_partner'
export { ripplingCreateBusinessPartnerGroupTool } from './create_business_partner_group'
export { ripplingCreateCustomAppTool } from './create_custom_app'
export { ripplingCreateCustomObjectTool } from './create_custom_object'
export { ripplingCreateCustomObjectFieldTool } from './create_custom_object_field'
export { ripplingCreateCustomObjectRecordTool } from './create_custom_object_record'
export { ripplingCreateCustomPageTool } from './create_custom_page'
export { ripplingCreateCustomSettingTool } from './create_custom_setting'
export { ripplingCreateDepartmentTool } from './create_department'
export { ripplingCreateDraftHiresTool } from './create_draft_hires'
export { ripplingCreateObjectCategoryTool } from './create_object_category'
export { ripplingCreateTitleTool } from './create_title'
export { ripplingCreateWorkLocationTool } from './create_work_location'
export { ripplingDeleteBusinessPartnerTool } from './delete_business_partner'
export { ripplingDeleteBusinessPartnerGroupTool } from './delete_business_partner_group'
export { ripplingDeleteCustomAppTool } from './delete_custom_app'
export { ripplingDeleteCustomObjectTool } from './delete_custom_object'
export { ripplingDeleteCustomObjectFieldTool } from './delete_custom_object_field'
export { ripplingDeleteCustomObjectRecordTool } from './delete_custom_object_record'
export { ripplingDeleteCustomPageTool } from './delete_custom_page'
export { ripplingDeleteCustomSettingTool } from './delete_custom_setting'
export { ripplingDeleteObjectCategoryTool } from './delete_object_category'
export { ripplingDeleteTitleTool } from './delete_title'
export { ripplingDeleteWorkLocationTool } from './delete_work_location'
export { ripplingGetBusinessPartnerTool } from './get_business_partner'
export { ripplingGetBusinessPartnerGroupTool } from './get_business_partner_group'
export { ripplingGetCurrentUserTool } from './get_current_user'
export { ripplingGetCustomAppTool } from './get_custom_app'
export { ripplingGetCustomObjectTool } from './get_custom_object'
export { ripplingGetCustomObjectFieldTool } from './get_custom_object_field'
export { ripplingGetCustomObjectRecordTool } from './get_custom_object_record'
export { ripplingGetCustomObjectRecordByExternalIdTool } from './get_custom_object_record_by_external_id'
export { ripplingGetCustomPageTool } from './get_custom_page'
export { ripplingGetCustomSettingTool } from './get_custom_setting'
export { ripplingGetDepartmentTool } from './get_department'
export { ripplingGetEmploymentTypeTool } from './get_employment_type'
export { ripplingGetJobFunctionTool } from './get_job_function'
export { ripplingGetObjectCategoryTool } from './get_object_category'
export { ripplingGetReportRunTool } from './get_report_run'
export { ripplingGetSupergroupTool } from './get_supergroup'
export { ripplingGetTeamTool } from './get_team'
export { ripplingGetTitleTool } from './get_title'
export { ripplingGetUserTool } from './get_user'
export { ripplingGetWorkLocationTool } from './get_work_location'
export { ripplingGetWorkerTool } from './get_worker'
export { ripplingListBusinessPartnerGroupsTool } from './list_business_partner_groups'
export { ripplingListBusinessPartnersTool } from './list_business_partners'
export { ripplingListCompaniesTool } from './list_companies'
export { ripplingListCustomAppsTool } from './list_custom_apps'
export { ripplingListCustomFieldsTool } from './list_custom_fields'
export { ripplingListCustomObjectFieldsTool } from './list_custom_object_fields'
export { ripplingListCustomObjectRecordsTool } from './list_custom_object_records'
export { ripplingListCustomObjectsTool } from './list_custom_objects'
export { ripplingListCustomPagesTool } from './list_custom_pages'
export { ripplingListCustomSettingsTool } from './list_custom_settings'
export { ripplingListDepartmentsTool } from './list_departments'
export { ripplingListEmploymentTypesTool } from './list_employment_types'
export { ripplingListEntitlementsTool } from './list_entitlements'
export { ripplingListJobFunctionsTool } from './list_job_functions'
export { ripplingListObjectCategoriesTool } from './list_object_categories'
export { ripplingListSupergroupExclusionMembersTool } from './list_supergroup_exclusion_members'
export { ripplingListSupergroupInclusionMembersTool } from './list_supergroup_inclusion_members'
export { ripplingListSupergroupMembersTool } from './list_supergroup_members'
export { ripplingListSupergroupsTool } from './list_supergroups'
export { ripplingListTeamsTool } from './list_teams'
export { ripplingListTitlesTool } from './list_titles'
export { ripplingListUsersTool } from './list_users'
export { ripplingListWorkLocationsTool } from './list_work_locations'
export { ripplingListWorkersTool } from './list_workers'
export { ripplingQueryCustomObjectRecordsTool } from './query_custom_object_records'
export { ripplingTriggerReportRunTool } from './trigger_report_run'
export * from './types'
export { ripplingUpdateCustomAppTool } from './update_custom_app'
export { ripplingUpdateCustomObjectTool } from './update_custom_object'
export { ripplingUpdateCustomObjectFieldTool } from './update_custom_object_field'
export { ripplingUpdateCustomObjectRecordTool } from './update_custom_object_record'
export { ripplingUpdateCustomPageTool } from './update_custom_page'
export { ripplingUpdateCustomSettingTool } from './update_custom_setting'
export { ripplingUpdateDepartmentTool } from './update_department'
export { ripplingUpdateObjectCategoryTool } from './update_object_category'
export { ripplingUpdateSupergroupExclusionMembersTool } from './update_supergroup_exclusion_members'
export { ripplingUpdateSupergroupInclusionMembersTool } from './update_supergroup_inclusion_members'
export { ripplingUpdateTitleTool } from './update_title'
export { ripplingUpdateWorkLocationTool } from './update_work_location'
@@ -0,0 +1,86 @@
import type { RipplingListBusinessPartnerGroupsParams } from '@/tools/rippling/types'
import { BUSINESS_PARTNER_GROUP_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListBusinessPartnerGroupsTool: ToolConfig<RipplingListBusinessPartnerGroupsParams> =
{
id: 'rippling_list_business_partner_groups',
name: 'Rippling List Business Partner Groups',
description: 'List all business partner groups',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/business-partner-groups/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
businessPartnerGroups: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
domain: (item.domain as string) ?? null,
default_business_partner_id: (item.default_business_partner_id as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
businessPartnerGroups: {
type: 'array',
description: 'List of businessPartnerGroups',
items: { type: 'object', properties: BUSINESS_PARTNER_GROUP_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,90 @@
import type { RipplingListBusinessPartnersParams } from '@/tools/rippling/types'
import { BUSINESS_PARTNER_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListBusinessPartnersTool: ToolConfig<RipplingListBusinessPartnersParams> = {
id: 'rippling_list_business_partners',
name: 'Rippling List Business Partners',
description: 'List all business partners',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
filter: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filter expression',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.filter != null) query.set('filter', params.filter)
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/business-partners/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
businessPartners: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
business_partner_group_id: (item.business_partner_group_id as string) ?? null,
worker_id: (item.worker_id as string) ?? null,
client_group_id: (item.client_group_id as string) ?? null,
client_group_member_count: (item.client_group_member_count as number) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
businessPartners: {
type: 'array',
description: 'List of businessPartners',
items: { type: 'object', properties: BUSINESS_PARTNER_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+87
View File
@@ -0,0 +1,87 @@
import type { RipplingListCompaniesParams } from '@/tools/rippling/types'
import { COMPANY_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListCompaniesTool: ToolConfig<RipplingListCompaniesParams> = {
id: 'rippling_list_companies',
name: 'Rippling List Companies',
description: 'List all companies',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/companies/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
companies: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
legal_name: (item.legal_name as string) ?? null,
doing_business_as_name: (item.doing_business_as_name as string) ?? null,
phone: (item.phone as string) ?? null,
primary_email: (item.primary_email as string) ?? null,
parent_legal_entity_id: (item.parent_legal_entity_id as string) ?? null,
legal_entities_id: (item.legal_entities_id as unknown[]) ?? [],
physical_address: item.physical_address ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
companies: {
type: 'array',
description: 'List of companies',
items: { type: 'object', properties: COMPANY_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,59 @@
import type { RipplingListCustomAppsParams } from '@/tools/rippling/types'
import { CUSTOM_APP_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListCustomAppsTool: ToolConfig<RipplingListCustomAppsParams> = {
id: 'rippling_list_custom_apps',
name: 'Rippling List CustomApps',
description: 'List all custom apps',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
},
request: {
url: `https://rest.ripplingapis.com/custom-apps/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
customApps: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
api_name: (item.api_name as string) ?? null,
description: (item.description as string) ?? null,
icon: (item.icon as string) ?? null,
pages: (item.pages as unknown[]) ?? [],
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
customApps: {
type: 'array',
description: 'List of customApps',
items: { type: 'object', properties: CUSTOM_APP_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,76 @@
import type { RipplingListCustomFieldsParams } from '@/tools/rippling/types'
import { CUSTOM_FIELD_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListCustomFieldsTool: ToolConfig<RipplingListCustomFieldsParams> = {
id: 'rippling_list_custom_fields',
name: 'Rippling List Custom Fields',
description: 'List all custom fields',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/custom-fields/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
customFields: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
description: (item.description as string) ?? null,
required: (item.required as boolean) ?? null,
type: (item.type as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
customFields: {
type: 'array',
description: 'List of customFields',
items: { type: 'object', properties: CUSTOM_FIELD_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,73 @@
import type { RipplingListCustomObjectFieldsParams } from '@/tools/rippling/types'
import { CUSTOM_OBJECT_FIELD_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListCustomObjectFieldsTool: ToolConfig<RipplingListCustomObjectFieldsParams> =
{
id: 'rippling_list_custom_object_fields',
name: 'Rippling List Custom Object Fields',
description: 'List all fields for a custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/fields/`,
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
fields: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
custom_object: (item.custom_object as string) ?? null,
description: (item.description as string) ?? null,
api_name: (item.api_name as string) ?? null,
data_type: item.data_type ?? null,
is_unique: (item.is_unique as boolean) ?? null,
is_immutable: (item.is_immutable as boolean) ?? null,
is_standard: (item.is_standard as boolean) ?? null,
enable_history: (item.enable_history as boolean) ?? null,
managed_package_install_id: (item.managed_package_install_id as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
},
}
},
outputs: {
fields: {
type: 'array',
description: 'List of fields',
items: { type: 'object', properties: CUSTOM_OBJECT_FIELD_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of fields returned' },
nextLink: { type: 'string', description: 'Next page link', optional: true },
},
}
@@ -0,0 +1,90 @@
import type { RipplingListCustomObjectRecordsParams } from '@/tools/rippling/types'
import { CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListCustomObjectRecordsTool: ToolConfig<RipplingListCustomObjectRecordsParams> =
{
id: 'rippling_list_custom_object_records',
name: 'Rippling List Custom Object Records',
description: 'List all records for a custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/`,
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
records: results.map((item: Record<string, unknown>) => {
const {
id,
created_at,
updated_at,
name,
external_id,
created_by,
last_modified_by,
owner_role,
system_updated_at,
...dynamicFields
} = item
return {
id: (id as string) ?? '',
created_at: (created_at as string) ?? null,
updated_at: (updated_at as string) ?? null,
name: (name as string) ?? null,
external_id: (external_id as string) ?? null,
created_by: created_by ?? null,
last_modified_by: last_modified_by ?? null,
owner_role: owner_role ?? null,
system_updated_at: (system_updated_at as string) ?? null,
data: dynamicFields,
}
}),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
},
}
},
outputs: {
records: {
type: 'array',
description: 'List of records',
items: {
type: 'object',
properties: {
...CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES,
data: { type: 'json', description: 'Full record data including dynamic fields' },
},
},
},
totalCount: { type: 'number', description: 'Number of records returned' },
nextLink: { type: 'string', description: 'Next page link', optional: true },
},
}
@@ -0,0 +1,64 @@
import type { RipplingListCustomObjectsParams } from '@/tools/rippling/types'
import { CUSTOM_OBJECT_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListCustomObjectsTool: ToolConfig<RipplingListCustomObjectsParams> = {
id: 'rippling_list_custom_objects',
name: 'Rippling List Custom Objects',
description: 'List all custom objects',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
},
request: {
url: `https://rest.ripplingapis.com/custom-objects/`,
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
customObjects: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
description: (item.description as string) ?? null,
api_name: (item.api_name as string) ?? null,
plural_label: (item.plural_label as string) ?? null,
category_id: (item.category_id as string) ?? null,
enable_history: (item.enable_history as boolean) ?? null,
native_category_id: (item.native_category_id as string) ?? null,
managed_package_install_id: (item.managed_package_install_id as string) ?? null,
owner_id: (item.owner_id as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
},
}
},
outputs: {
customObjects: {
type: 'array',
description: 'List of customObjects',
items: { type: 'object', properties: CUSTOM_OBJECT_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
},
}
@@ -0,0 +1,60 @@
import type { RipplingListCustomPagesParams } from '@/tools/rippling/types'
import { CUSTOM_PAGE_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListCustomPagesTool: ToolConfig<RipplingListCustomPagesParams> = {
id: 'rippling_list_custom_pages',
name: 'Rippling List CustomPages',
description: 'List all custom pages',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
},
request: {
url: `https://rest.ripplingapis.com/custom-pages/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
customPages: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
components: item.components ?? [],
actions: item.actions ?? [],
canvas_actions: item.canvas_actions ?? [],
variables: item.variables ?? [],
media: item.media ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
customPages: {
type: 'array',
description: 'List of customPages',
items: { type: 'object', properties: CUSTOM_PAGE_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,79 @@
import type { RipplingListCustomSettingsParams } from '@/tools/rippling/types'
import { CUSTOM_SETTING_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListCustomSettingsTool: ToolConfig<RipplingListCustomSettingsParams> = {
id: 'rippling_list_custom_settings',
name: 'Rippling List Custom Settings',
description: 'List all custom settings',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/custom-settings/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
customSettings: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
display_name: (item.display_name as string) ?? null,
api_name: (item.api_name as string) ?? null,
data_type: (item.data_type as string) ?? null,
secret_value: (item.secret_value as string) ?? null,
string_value: (item.string_value as string) ?? null,
number_value: (item.number_value as number) ?? null,
boolean_value: (item.boolean_value as boolean) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
customSettings: {
type: 'array',
description: 'List of custom settings',
items: { type: 'object', properties: CUSTOM_SETTING_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,85 @@
import type { RipplingListDepartmentsParams } from '@/tools/rippling/types'
import { DEPARTMENT_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListDepartmentsTool: ToolConfig<RipplingListDepartmentsParams> = {
id: 'rippling_list_departments',
name: 'Rippling List Departments',
description: 'List all departments',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/departments/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
departments: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
parent_id: (item.parent_id as string) ?? null,
reference_code: (item.reference_code as string) ?? null,
department_hierarchy_id: (item.department_hierarchy_id as unknown[]) ?? [],
parent: item.parent ?? null,
department_hierarchy: item.department_hierarchy ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
departments: {
type: 'array',
description: 'List of departments',
items: { type: 'object', properties: DEPARTMENT_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,77 @@
import type { RipplingListEmploymentTypesParams } from '@/tools/rippling/types'
import { EMPLOYMENT_TYPE_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListEmploymentTypesTool: ToolConfig<RipplingListEmploymentTypesParams> = {
id: 'rippling_list_employment_types',
name: 'Rippling List Employment Types',
description: 'List all employment types',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/employment-types/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
employmentTypes: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
label: (item.label as string) ?? null,
name: (item.name as string) ?? null,
type: (item.type as string) ?? null,
compensation_time_period: (item.compensation_time_period as string) ?? null,
amount_worked: (item.amount_worked as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
employmentTypes: {
type: 'array',
description: 'List of employmentTypes',
items: { type: 'object', properties: EMPLOYMENT_TYPE_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,54 @@
import type { RipplingListEntitlementsParams } from '@/tools/rippling/types'
import { ENTITLEMENT_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListEntitlementsTool: ToolConfig<RipplingListEntitlementsParams> = {
id: 'rippling_list_entitlements',
name: 'Rippling List Entitlements',
description: 'List all entitlements',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
},
request: {
url: `https://rest.ripplingapis.com/entitlements/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
entitlements: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
description: (item.description as string) ?? null,
display_name: (item.display_name as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
entitlements: {
type: 'array',
description: 'List of entitlements',
items: { type: 'object', properties: ENTITLEMENT_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,73 @@
import type { RipplingListJobFunctionsParams } from '@/tools/rippling/types'
import { JOB_FUNCTION_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListJobFunctionsTool: ToolConfig<RipplingListJobFunctionsParams> = {
id: 'rippling_list_job_functions',
name: 'Rippling List Job Functions',
description: 'List all job functions',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/job-functions/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
jobFunctions: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
jobFunctions: {
type: 'array',
description: 'List of jobFunctions',
items: { type: 'object', properties: JOB_FUNCTION_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,54 @@
import type { RipplingListObjectCategoriesParams } from '@/tools/rippling/types'
import { OBJECT_CATEGORY_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListObjectCategoriesTool: ToolConfig<RipplingListObjectCategoriesParams> = {
id: 'rippling_list_object_categories',
name: 'Rippling List Object Categories',
description: 'List all object categories',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
},
request: {
url: `https://rest.ripplingapis.com/object-categories/`,
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
objectCategories: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
description: (item.description as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
},
}
},
outputs: {
objectCategories: {
type: 'array',
description: 'List of objectCategories',
items: { type: 'object', properties: OBJECT_CATEGORY_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
},
}
@@ -0,0 +1,86 @@
import type { RipplingListSupergroupExclusionMembersParams } from '@/tools/rippling/types'
import { GROUP_MEMBER_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListSupergroupExclusionMembersTool: ToolConfig<RipplingListSupergroupExclusionMembersParams> =
{
id: 'rippling_list_supergroup_exclusion_members',
name: 'Rippling List Supergroup Exclusion Members',
description: 'List exclusion members of a supergroup',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
groupId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Supergroup ID',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Fields to expand (e.g., worker)',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
const qs = query.toString()
return `https://rest.ripplingapis.com/supergroups/${encodeURIComponent(params.groupId.trim())}/exclusion-members/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
members: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
full_name: (item.full_name as string) ?? null,
work_email: (item.work_email as string) ?? null,
worker_id: (item.worker_id as string) ?? null,
worker: item.worker ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
members: {
type: 'array',
description: 'List of members',
items: { type: 'object', properties: GROUP_MEMBER_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of members returned' },
nextLink: { type: 'string', description: 'Next page link', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,86 @@
import type { RipplingListSupergroupInclusionMembersParams } from '@/tools/rippling/types'
import { GROUP_MEMBER_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListSupergroupInclusionMembersTool: ToolConfig<RipplingListSupergroupInclusionMembersParams> =
{
id: 'rippling_list_supergroup_inclusion_members',
name: 'Rippling List Supergroup Inclusion Members',
description: 'List inclusion members of a supergroup',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
groupId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Supergroup ID',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Fields to expand (e.g., worker)',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
const qs = query.toString()
return `https://rest.ripplingapis.com/supergroups/${encodeURIComponent(params.groupId.trim())}/inclusion-members/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
members: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
full_name: (item.full_name as string) ?? null,
work_email: (item.work_email as string) ?? null,
worker_id: (item.worker_id as string) ?? null,
worker: item.worker ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
members: {
type: 'array',
description: 'List of members',
items: { type: 'object', properties: GROUP_MEMBER_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of members returned' },
nextLink: { type: 'string', description: 'Next page link', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,82 @@
import type { RipplingListSupergroupMembersParams } from '@/tools/rippling/types'
import { GROUP_MEMBER_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListSupergroupMembersTool: ToolConfig<RipplingListSupergroupMembersParams> = {
id: 'rippling_list_supergroup_members',
name: 'Rippling List Supergroup Members',
description: 'List members of a supergroup',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
groupId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Supergroup ID',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Fields to expand (e.g., worker)',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
const qs = query.toString()
return `https://rest.ripplingapis.com/supergroups/${encodeURIComponent(params.groupId.trim())}/members/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
members: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
full_name: (item.full_name as string) ?? null,
work_email: (item.work_email as string) ?? null,
worker_id: (item.worker_id as string) ?? null,
worker: item.worker ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
members: {
type: 'array',
description: 'List of members',
items: { type: 'object', properties: GROUP_MEMBER_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of members returned' },
nextLink: { type: 'string', description: 'Next page link', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,89 @@
import type { RipplingListSupergroupsParams } from '@/tools/rippling/types'
import { SUPERGROUP_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListSupergroupsTool: ToolConfig<RipplingListSupergroupsParams> = {
id: 'rippling_list_supergroups',
name: 'Rippling List Supergroups',
description: 'List all supergroups',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
filter: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filter expression (filterable fields: app_owner_id, group_type)',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.filter != null) query.set('filter', params.filter)
if (params.orderBy != null) query.set('order_by', params.orderBy)
const qs = query.toString()
return `https://rest.ripplingapis.com/supergroups/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
supergroups: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
display_name: (item.display_name as string) ?? null,
description: (item.description as string) ?? null,
app_owner_id: (item.app_owner_id as string) ?? null,
group_type: (item.group_type as string) ?? null,
name: (item.name as string) ?? null,
sub_group_type: (item.sub_group_type as string) ?? null,
read_only: (item.read_only as boolean) ?? null,
parent: (item.parent as string) ?? null,
mutually_exclusive_key: (item.mutually_exclusive_key as string) ?? null,
cumulatively_exhaustive_default:
(item.cumulatively_exhaustive_default as boolean) ?? null,
include_terminated: (item.include_terminated as boolean) ?? null,
allow_non_employees: (item.allow_non_employees as boolean) ?? null,
can_override_role_states: (item.can_override_role_states as boolean) ?? null,
priority: (item.priority as number) ?? null,
is_invisible: (item.is_invisible as boolean) ?? null,
ignore_prov_group_matching: (item.ignore_prov_group_matching as boolean) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
supergroups: {
type: 'array',
description: 'List of supergroups',
items: { type: 'object', properties: SUPERGROUP_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+82
View File
@@ -0,0 +1,82 @@
import type { RipplingListTeamsParams } from '@/tools/rippling/types'
import { TEAM_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListTeamsTool: ToolConfig<RipplingListTeamsParams> = {
id: 'rippling_list_teams',
name: 'Rippling List Teams',
description: 'List all teams',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/teams/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
teams: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
parent_id: (item.parent_id as string) ?? null,
parent: item.parent ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
teams: {
type: 'array',
description: 'List of teams',
items: { type: 'object', properties: TEAM_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+73
View File
@@ -0,0 +1,73 @@
import type { RipplingListTitlesParams } from '@/tools/rippling/types'
import { TITLE_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListTitlesTool: ToolConfig<RipplingListTitlesParams> = {
id: 'rippling_list_titles',
name: 'Rippling List Titles',
description: 'List all titles',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/titles/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
titles: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
titles: {
type: 'array',
description: 'List of titles',
items: { type: 'object', properties: TITLE_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+84
View File
@@ -0,0 +1,84 @@
import type { RipplingListUsersParams } from '@/tools/rippling/types'
import { USER_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListUsersTool: ToolConfig<RipplingListUsersParams> = {
id: 'rippling_list_users',
name: 'Rippling List Users',
description: 'List all users with optional pagination',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/users/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
users: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
active: (item.active as boolean) ?? null,
username: (item.username as string) ?? null,
display_name: (item.display_name as string) ?? null,
preferred_language: (item.preferred_language as string) ?? null,
locale: (item.locale as string) ?? null,
timezone: (item.timezone as string) ?? null,
number: (item.number as string) ?? null,
name: item.name ?? null,
emails: item.emails ?? [],
phone_numbers: item.phone_numbers ?? [],
addresses: item.addresses ?? [],
photos: item.photos ?? [],
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
users: {
type: 'array',
description: 'List of users',
items: { type: 'object', properties: USER_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,77 @@
import type { RipplingListWorkLocationsParams } from '@/tools/rippling/types'
import { WORK_LOCATION_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListWorkLocationsTool: ToolConfig<RipplingListWorkLocationsParams> = {
id: 'rippling_list_work_locations',
name: 'Rippling List Work Locations',
description: 'List all work locations',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/work-locations/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
Accept: 'application/json',
}),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
workLocations: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
name: (item.name as string) ?? null,
address: item.address ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
workLocations: {
type: 'array',
description: 'List of workLocations',
items: { type: 'object', properties: WORK_LOCATION_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
+115
View File
@@ -0,0 +1,115 @@
import type { RipplingListWorkersParams } from '@/tools/rippling/types'
import { WORKER_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingListWorkersTool: ToolConfig<RipplingListWorkersParams> = {
id: 'rippling_list_workers',
name: 'Rippling List Workers',
description: 'List all workers with optional filtering and pagination',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
filter: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filter expression',
},
expand: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated fields to expand',
},
orderBy: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Sort field. Prefix with - for descending',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor from previous response',
},
},
request: {
url: (params) => {
const query = new URLSearchParams()
if (params.filter != null) query.set('filter', params.filter)
if (params.expand != null) query.set('expand', params.expand)
if (params.orderBy != null) query.set('order_by', params.orderBy)
if (params.cursor != null) query.set('cursor', params.cursor)
const qs = query.toString()
return `https://rest.ripplingapis.com/workers/${qs ? `?${qs}` : ''}`
},
method: 'GET',
headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, Accept: 'application/json' }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
workers: results.map((item: Record<string, unknown>) => ({
id: (item.id as string) ?? '',
created_at: (item.created_at as string) ?? null,
updated_at: (item.updated_at as string) ?? null,
user_id: (item.user_id as string) ?? null,
is_manager: (item.is_manager as boolean) ?? null,
manager_id: (item.manager_id as string) ?? null,
legal_entity_id: (item.legal_entity_id as string) ?? null,
country: (item.country as string) ?? null,
start_date: (item.start_date as string) ?? null,
end_date: (item.end_date as string) ?? null,
number: (item.number as number) ?? null,
work_email: (item.work_email as string) ?? null,
personal_email: (item.personal_email as string) ?? null,
status: (item.status as string) ?? null,
employment_type_id: (item.employment_type_id as string) ?? null,
department_id: (item.department_id as string) ?? null,
teams_id: (item.teams_id as unknown[]) ?? [],
title: (item.title as string) ?? null,
level_id: (item.level_id as string) ?? null,
compensation_id: (item.compensation_id as string) ?? null,
overtime_exemption: (item.overtime_exemption as string) ?? null,
title_effective_date: (item.title_effective_date as string) ?? null,
business_partners_id: (item.business_partners_id as unknown[]) ?? [],
location: item.location ?? null,
gender: (item.gender as string) ?? null,
date_of_birth: (item.date_of_birth as string) ?? null,
race: (item.race as string) ?? null,
ethnicity: (item.ethnicity as string) ?? null,
citizenship: (item.citizenship as string) ?? null,
termination_details: item.termination_details ?? null,
custom_fields: item.custom_fields ?? null,
country_fields: item.country_fields ?? null,
})),
totalCount: results.length,
nextLink: (data.next_link as string) ?? null,
__meta: data.__meta ?? null,
},
}
},
outputs: {
workers: {
type: 'array',
description: 'List of workers',
items: { type: 'object', properties: WORKER_OUTPUT_PROPERTIES },
},
totalCount: { type: 'number', description: 'Number of items returned' },
nextLink: { type: 'string', description: 'Link to next page of results', optional: true },
__meta: { type: 'json', description: 'Metadata including redacted_fields', optional: true },
},
}
@@ -0,0 +1,116 @@
import type { RipplingQueryCustomObjectRecordsParams } from '@/tools/rippling/types'
import { CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingQueryCustomObjectRecordsTool: ToolConfig<RipplingQueryCustomObjectRecordsParams> =
{
id: 'rippling_query_custom_object_records',
name: 'Rippling Query Custom Object Records',
description: 'Query custom object records with filters',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
query: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Query expression',
},
limit: {
type: 'number',
required: false,
visibility: 'user-or-llm',
description: 'Maximum number of records to return',
},
cursor: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Pagination cursor',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/query/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.query != null) body.query = params.query
if (params.limit != null) body.limit = params.limit
if (params.cursor != null) body.cursor = params.cursor
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const results = data.results ?? []
return {
success: true,
output: {
records: results.map((item: Record<string, unknown>) => {
const {
id,
created_at,
updated_at,
name,
external_id,
created_by,
last_modified_by,
owner_role,
system_updated_at,
...dynamicFields
} = item
return {
id: (id as string) ?? '',
created_at: (created_at as string) ?? null,
updated_at: (updated_at as string) ?? null,
name: (name as string) ?? null,
external_id: (external_id as string) ?? null,
created_by: created_by ?? null,
last_modified_by: last_modified_by ?? null,
owner_role: owner_role ?? null,
system_updated_at: (system_updated_at as string) ?? null,
data: dynamicFields,
}
}),
totalCount: results.length,
cursor: (data.cursor as string) ?? null,
},
}
},
outputs: {
records: {
type: 'array',
description: 'Matching records',
items: {
type: 'object',
properties: {
...CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES,
data: { type: 'json', description: 'Full record data' },
},
},
},
totalCount: { type: 'number', description: 'Number of records returned' },
cursor: { type: 'string', description: 'Cursor for next page of results', optional: true },
},
}
@@ -0,0 +1,103 @@
import type { RipplingTriggerReportRunParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingTriggerReportRunTool: ToolConfig<RipplingTriggerReportRunParams> = {
id: 'rippling_trigger_report_run',
name: 'Rippling Trigger Report Run',
description: 'Trigger a new report run',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
reportId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Report ID to run',
},
includeObjectIds: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Include object IDs in the report',
},
includeTotalRows: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Include total row count',
},
formatDateFields: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Date field formatting configuration',
},
formatCurrencyFields: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Currency field formatting configuration',
},
outputType: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Output type (JSON or CSV)',
},
},
request: {
url: `https://rest.ripplingapis.com/report-runs/`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = { report_id: params.reportId }
if (params.includeObjectIds != null) body.include_object_ids = params.includeObjectIds
if (params.includeTotalRows != null) body.include_total_rows = params.includeTotalRows
if (params.formatDateFields != null) body.format_date_fields = params.formatDateFields
if (params.formatCurrencyFields != null)
body.format_currency_fields = params.formatCurrencyFields
if (params.outputType != null) body.output_type = params.outputType
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
const result = data.result as Record<string, unknown> | null
return {
success: true,
output: {
id: (data.id as string) ?? '',
report_id: (data.report_id as string) ?? null,
status: (data.status as string) ?? null,
file_url: (result?.file_url as string) ?? null,
expires_at: (result?.expires_at as string) ?? null,
output_type: (result?.output_type as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Report run ID' },
report_id: { type: 'string', description: 'Report ID', optional: true },
status: { type: 'string', description: 'Run status', optional: true },
file_url: { type: 'string', description: 'URL to download the report file', optional: true },
expires_at: {
type: 'string',
description: 'Expiration timestamp for the file URL',
optional: true,
},
output_type: { type: 'string', description: 'Output format (JSON or CSV)', optional: true },
},
}
+845
View File
@@ -0,0 +1,845 @@
import type { OutputProperty } from '@/tools/types'
/** Worker output properties */
export const WORKER_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Worker ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
user_id: { type: 'string', description: 'Associated user ID' },
is_manager: { type: 'boolean', description: 'Whether the worker is a manager' },
manager_id: { type: 'string', description: 'Manager worker ID' },
legal_entity_id: { type: 'string', description: 'Legal entity ID' },
country: { type: 'string', description: 'Worker country code' },
start_date: { type: 'string', description: 'Employment start date' },
end_date: { type: 'string', description: 'Employment end date' },
number: { type: 'number', description: 'Worker number' },
work_email: { type: 'string', description: 'Work email address' },
personal_email: { type: 'string', description: 'Personal email address' },
status: {
type: 'string',
description: 'Worker status (INIT, HIRED, ACCEPTED, ACTIVE, TERMINATED)',
},
employment_type_id: { type: 'string', description: 'Employment type ID' },
department_id: { type: 'string', description: 'Department ID' },
teams_id: { type: 'json', description: 'Array of team IDs' },
title: { type: 'string', description: 'Job title' },
level_id: { type: 'string', description: 'Level ID' },
compensation_id: { type: 'string', description: 'Compensation ID' },
overtime_exemption: {
type: 'string',
description: 'Overtime exemption status (EXEMPT, NON_EXEMPT)',
},
title_effective_date: { type: 'string', description: 'Title effective date' },
business_partners_id: { type: 'json', description: 'Array of business partner IDs' },
location: { type: 'json', description: 'Worker location (type, work_location_id)' },
gender: { type: 'string', description: 'Gender' },
date_of_birth: { type: 'string', description: 'Date of birth' },
race: { type: 'string', description: 'Race' },
ethnicity: { type: 'string', description: 'Ethnicity' },
citizenship: { type: 'string', description: 'Citizenship country code' },
termination_details: { type: 'json', description: 'Termination details' },
custom_fields: { type: 'json', description: 'Custom fields (expandable)' },
country_fields: { type: 'json', description: 'Country-specific fields' },
} as const satisfies Record<string, OutputProperty>
/** User output properties */
export const USER_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'User ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
active: { type: 'boolean', description: 'Whether the user is active' },
username: { type: 'string', description: 'Unique username' },
display_name: { type: 'string', description: 'Display name' },
preferred_language: { type: 'string', description: 'Preferred language' },
locale: { type: 'string', description: 'Locale' },
timezone: { type: 'string', description: 'Timezone (IANA format)' },
number: { type: 'string', description: 'Permanent profile number' },
name: { type: 'json', description: 'User name object (given_name, family_name, etc.)' },
emails: { type: 'json', description: 'Array of email objects' },
phone_numbers: { type: 'json', description: 'Array of phone number objects' },
addresses: { type: 'json', description: 'Array of address objects' },
photos: { type: 'json', description: 'Array of photo objects' },
} as const satisfies Record<string, OutputProperty>
/** Company output properties */
export const COMPANY_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Company ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Company name' },
legal_name: { type: 'string', description: 'Legal name' },
doing_business_as_name: { type: 'string', description: 'DBA name' },
phone: { type: 'string', description: 'Phone number' },
primary_email: { type: 'string', description: 'Primary email' },
parent_legal_entity_id: { type: 'string', description: 'Parent legal entity ID' },
legal_entities_id: { type: 'json', description: 'Array of legal entity IDs' },
physical_address: { type: 'json', description: 'Physical address of the holding entity' },
} as const satisfies Record<string, OutputProperty>
/** Department output properties */
export const DEPARTMENT_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Department ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Department name' },
parent_id: { type: 'string', description: 'Parent department ID' },
reference_code: { type: 'string', description: 'Reference code' },
department_hierarchy_id: { type: 'json', description: 'Array of department IDs in hierarchy' },
parent: { type: 'json', description: 'Expanded parent department' },
department_hierarchy: { type: 'json', description: 'Expanded department hierarchy' },
} as const satisfies Record<string, OutputProperty>
/** Team output properties */
export const TEAM_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Team ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Team name' },
parent_id: { type: 'string', description: 'Parent team ID' },
parent: { type: 'json', description: 'Expanded parent team' },
} as const satisfies Record<string, OutputProperty>
/** Employment type output properties */
export const EMPLOYMENT_TYPE_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Employment type ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
label: { type: 'string', description: 'Employment type label' },
name: { type: 'string', description: 'Employment type name' },
type: { type: 'string', description: 'Type (CONTRACTOR, EMPLOYEE)' },
compensation_time_period: {
type: 'string',
description: 'Compensation period (HOURLY, SALARIED)',
},
amount_worked: { type: 'string', description: 'Amount worked (PART-TIME, FULL-TIME, TEMPORARY)' },
} as const satisfies Record<string, OutputProperty>
/** Title output properties */
export const TITLE_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Title ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Title name' },
} as const satisfies Record<string, OutputProperty>
/** Work location output properties */
export const WORK_LOCATION_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Work location ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Location name' },
address: { type: 'json', description: 'Address object' },
} as const satisfies Record<string, OutputProperty>
/** Custom field output properties */
export const CUSTOM_FIELD_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Custom field ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Field name' },
description: { type: 'string', description: 'Field description' },
required: { type: 'boolean', description: 'Whether the field is required' },
type: { type: 'string', description: 'Field type (TEXT, DATE, NUMBER, CURRENCY, etc.)' },
} as const satisfies Record<string, OutputProperty>
/** Job function output properties */
export const JOB_FUNCTION_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Job function ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Job function name' },
} as const satisfies Record<string, OutputProperty>
/** Entitlement output properties */
export const ENTITLEMENT_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Entitlement ID' },
description: { type: 'string', description: 'Entitlement description' },
display_name: { type: 'string', description: 'Display name' },
} as const satisfies Record<string, OutputProperty>
/** Business partner output properties */
export const BUSINESS_PARTNER_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Business partner ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
business_partner_group_id: { type: 'string', description: 'Business partner group ID' },
worker_id: { type: 'string', description: 'Worker ID' },
client_group_id: { type: 'string', description: 'Client group ID' },
client_group_member_count: { type: 'number', description: 'Client group member count' },
} as const satisfies Record<string, OutputProperty>
/** Business partner group output properties */
export const BUSINESS_PARTNER_GROUP_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Business partner group ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Group name' },
domain: { type: 'string', description: 'Domain (HR, IT, FINANCE, RECRUITING, OTHER)' },
default_business_partner_id: { type: 'string', description: 'Default business partner ID' },
} as const satisfies Record<string, OutputProperty>
/** Supergroup output properties */
export const SUPERGROUP_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Supergroup ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
display_name: { type: 'string', description: 'Display name' },
description: { type: 'string', description: 'Description' },
app_owner_id: { type: 'string', description: 'App owner ID' },
group_type: { type: 'string', description: 'Group type' },
name: { type: 'string', description: 'Name' },
sub_group_type: { type: 'string', description: 'Sub group type' },
read_only: { type: 'boolean', description: 'Whether the group is read only' },
parent: { type: 'string', description: 'Parent group ID' },
mutually_exclusive_key: { type: 'string', description: 'Mutually exclusive key' },
cumulatively_exhaustive_default: {
type: 'boolean',
description: 'Whether the group is the cumulatively exhaustive default',
},
include_terminated: {
type: 'boolean',
description: 'Whether the group includes terminated roles',
},
allow_non_employees: {
type: 'boolean',
description: 'Whether the group allows non-employees',
},
can_override_role_states: {
type: 'boolean',
description: 'Whether the group can override role states',
},
priority: { type: 'number', description: 'Group priority' },
is_invisible: { type: 'boolean', description: 'Whether the group is invisible' },
ignore_prov_group_matching: {
type: 'boolean',
description: 'Whether to ignore provisioning group matching',
},
} as const satisfies Record<string, OutputProperty>
/** Group member output properties */
export const GROUP_MEMBER_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Member ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
full_name: { type: 'string', description: 'Full name' },
work_email: { type: 'string', description: 'Work email' },
worker_id: { type: 'string', description: 'Worker ID' },
worker: { type: 'json', description: 'Expanded worker object' },
} as const satisfies Record<string, OutputProperty>
/** Custom object output properties */
export const CUSTOM_OBJECT_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Custom object ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Object name' },
description: { type: 'string', description: 'Description' },
api_name: { type: 'string', description: 'API name' },
plural_label: { type: 'string', description: 'Plural label' },
category_id: { type: 'string', description: 'Category ID' },
native_category_id: { type: 'string', description: 'Native category ID' },
managed_package_install_id: { type: 'string', description: 'Package install ID' },
owner_id: { type: 'string', description: 'Owner ID' },
enable_history: { type: 'boolean', description: 'Whether history is enabled' },
} as const satisfies Record<string, OutputProperty>
/** Custom object field output properties */
export const CUSTOM_OBJECT_FIELD_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Field ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Field name' },
custom_object: { type: 'string', description: 'Parent custom object' },
description: { type: 'string', description: 'Description' },
api_name: { type: 'string', description: 'API name' },
data_type: { type: 'json', description: 'Data type configuration' },
is_unique: { type: 'boolean', description: 'Whether the field is unique' },
is_immutable: { type: 'boolean', description: 'Whether the field is immutable' },
is_standard: { type: 'boolean', description: 'Whether the field is standard' },
enable_history: { type: 'boolean', description: 'Whether history is enabled' },
managed_package_install_id: { type: 'string', description: 'Package install ID' },
} as const satisfies Record<string, OutputProperty>
/** Custom object record output properties */
export const CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Record ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Record name' },
external_id: { type: 'string', description: 'External ID' },
created_by: { type: 'json', description: 'Created by user (id, display_value, image)' },
last_modified_by: {
type: 'json',
description: 'Last modified by user (id, display_value, image)',
},
owner_role: { type: 'json', description: 'Owner role (id, display_value, image)' },
system_updated_at: { type: 'string', description: 'System update timestamp' },
} as const satisfies Record<string, OutputProperty>
/** Custom app output properties */
export const CUSTOM_APP_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'App ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'App name' },
api_name: { type: 'string', description: 'API name' },
description: { type: 'string', description: 'Description' },
icon: { type: 'string', description: 'Icon URL' },
pages: { type: 'json', description: 'Array of page summaries' },
} as const satisfies Record<string, OutputProperty>
/** Custom page output properties */
export const CUSTOM_PAGE_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Page ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Page name' },
components: { type: 'json', description: 'Page components' },
actions: { type: 'json', description: 'Page actions' },
canvas_actions: { type: 'json', description: 'Canvas actions' },
variables: { type: 'json', description: 'Page variables' },
media: { type: 'json', description: 'Page media' },
} as const satisfies Record<string, OutputProperty>
/** Custom setting output properties */
export const CUSTOM_SETTING_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Setting ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
display_name: { type: 'string', description: 'Display name' },
api_name: { type: 'string', description: 'API name' },
data_type: { type: 'string', description: 'Data type' },
secret_value: { type: 'string', description: 'Secret value' },
string_value: { type: 'string', description: 'String value' },
number_value: { type: 'number', description: 'Number value' },
boolean_value: { type: 'boolean', description: 'Boolean value' },
} as const satisfies Record<string, OutputProperty>
/** Object category output properties */
export const OBJECT_CATEGORY_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Category ID' },
created_at: { type: 'string', description: 'Record creation date' },
updated_at: { type: 'string', description: 'Record update date' },
name: { type: 'string', description: 'Category name' },
description: { type: 'string', description: 'Description' },
} as const satisfies Record<string, OutputProperty>
/** Workers */
export interface RipplingListWorkersParams {
apiKey: string
filter?: string
expand?: string
orderBy?: string
cursor?: string
}
export interface RipplingGetWorkerParams {
apiKey: string
id: string
expand?: string
}
/** Users */
export interface RipplingListUsersParams {
apiKey: string
orderBy?: string
cursor?: string
}
export interface RipplingGetUserParams {
apiKey: string
id: string
}
/** Companies */
export interface RipplingListCompaniesParams {
apiKey: string
expand?: string
orderBy?: string
cursor?: string
}
/** SSO Me */
export interface RipplingGetCurrentUserParams {
apiKey: string
expand?: string
}
/** Entitlements */
export interface RipplingListEntitlementsParams {
apiKey: string
}
/** Departments */
export interface RipplingListDepartmentsParams {
apiKey: string
expand?: string
orderBy?: string
cursor?: string
}
export interface RipplingGetDepartmentParams {
apiKey: string
id: string
expand?: string
}
export interface RipplingCreateDepartmentParams {
apiKey: string
name: string
parentId?: string
referenceCode?: string
}
export interface RipplingUpdateDepartmentParams {
apiKey: string
id: string
name?: string
parentId?: string
referenceCode?: string
}
/** Teams */
export interface RipplingListTeamsParams {
apiKey: string
expand?: string
orderBy?: string
cursor?: string
}
export interface RipplingGetTeamParams {
apiKey: string
id: string
expand?: string
}
/** Employment Types */
export interface RipplingListEmploymentTypesParams {
apiKey: string
orderBy?: string
cursor?: string
}
export interface RipplingGetEmploymentTypeParams {
apiKey: string
id: string
}
/** Titles */
export interface RipplingListTitlesParams {
apiKey: string
orderBy?: string
cursor?: string
}
export interface RipplingGetTitleParams {
apiKey: string
id: string
}
export interface RipplingCreateTitleParams {
apiKey: string
name: string
}
export interface RipplingUpdateTitleParams {
apiKey: string
id: string
name?: string
}
export interface RipplingDeleteTitleParams {
apiKey: string
id: string
}
/** Work Locations */
export interface RipplingListWorkLocationsParams {
apiKey: string
orderBy?: string
cursor?: string
}
export interface RipplingGetWorkLocationParams {
apiKey: string
id: string
}
export interface RipplingCreateWorkLocationParams {
apiKey: string
name: string
streetAddress: string
locality?: string
region?: string
postalCode?: string
country?: string
addressType?: string
}
export interface RipplingUpdateWorkLocationParams {
apiKey: string
id: string
name?: string
streetAddress?: string
locality?: string
region?: string
postalCode?: string
country?: string
addressType?: string
}
export interface RipplingDeleteWorkLocationParams {
apiKey: string
id: string
}
/** Custom Fields */
export interface RipplingListCustomFieldsParams {
apiKey: string
orderBy?: string
cursor?: string
}
/** Job Functions */
export interface RipplingListJobFunctionsParams {
apiKey: string
orderBy?: string
cursor?: string
}
export interface RipplingGetJobFunctionParams {
apiKey: string
id: string
}
/** Business Partners */
export interface RipplingListBusinessPartnersParams {
apiKey: string
filter?: string
expand?: string
orderBy?: string
cursor?: string
}
export interface RipplingGetBusinessPartnerParams {
apiKey: string
id: string
expand?: string
}
export interface RipplingCreateBusinessPartnerParams {
apiKey: string
businessPartnerGroupId: string
workerId: string
}
export interface RipplingDeleteBusinessPartnerParams {
apiKey: string
id: string
}
/** Business Partner Groups */
export interface RipplingListBusinessPartnerGroupsParams {
apiKey: string
expand?: string
orderBy?: string
cursor?: string
}
export interface RipplingGetBusinessPartnerGroupParams {
apiKey: string
id: string
expand?: string
}
export interface RipplingCreateBusinessPartnerGroupParams {
apiKey: string
name: string
domain?: string
defaultBusinessPartnerId?: string
}
export interface RipplingDeleteBusinessPartnerGroupParams {
apiKey: string
id: string
}
/** Supergroups */
export interface RipplingListSupergroupsParams {
apiKey: string
filter?: string
orderBy?: string
}
export interface RipplingGetSupergroupParams {
apiKey: string
id: string
}
export interface RipplingListSupergroupMembersParams {
apiKey: string
groupId: string
expand?: string
orderBy?: string
}
export interface RipplingListSupergroupInclusionMembersParams {
apiKey: string
groupId: string
expand?: string
orderBy?: string
}
export interface RipplingListSupergroupExclusionMembersParams {
apiKey: string
groupId: string
expand?: string
orderBy?: string
}
export interface RipplingUpdateSupergroupInclusionMembersParams {
apiKey: string
groupId: string
operations: unknown
}
export interface RipplingUpdateSupergroupExclusionMembersParams {
apiKey: string
groupId: string
operations: unknown
}
/** Custom Objects */
export interface RipplingListCustomObjectsParams {
apiKey: string
}
export interface RipplingGetCustomObjectParams {
apiKey: string
customObjectApiName: string
}
export interface RipplingCreateCustomObjectParams {
apiKey: string
name: string
description?: string
category?: string
}
export interface RipplingUpdateCustomObjectParams {
apiKey: string
customObjectApiName: string
name?: string
description?: string
category?: string
pluralLabel?: string
ownerRole?: string
}
export interface RipplingDeleteCustomObjectParams {
apiKey: string
customObjectApiName: string
}
/** Custom Object Fields */
export interface RipplingListCustomObjectFieldsParams {
apiKey: string
customObjectApiName: string
}
export interface RipplingGetCustomObjectFieldParams {
apiKey: string
customObjectApiName: string
fieldApiName: string
}
export interface RipplingCreateCustomObjectFieldParams {
apiKey: string
customObjectApiName: string
name: string
description?: string
dataType: unknown
required?: boolean
rqlDefinition?: unknown
isUnique?: boolean
formulaAttrMetas?: unknown
section?: unknown
enableHistory?: boolean
derivedFieldFormula?: string
derivedAggregatedField?: unknown
}
export interface RipplingUpdateCustomObjectFieldParams {
apiKey: string
customObjectApiName: string
fieldApiName: string
name?: string
description?: string
dataType?: unknown
required?: boolean
rqlDefinition?: unknown
isUnique?: boolean
formulaAttrMetas?: unknown
section?: unknown
enableHistory?: boolean
derivedFieldFormula?: string
nameFieldDetails?: unknown
}
export interface RipplingDeleteCustomObjectFieldParams {
apiKey: string
customObjectApiName: string
fieldApiName: string
}
/** Custom Object Records */
export interface RipplingListCustomObjectRecordsParams {
apiKey: string
customObjectApiName: string
}
export interface RipplingGetCustomObjectRecordParams {
apiKey: string
customObjectApiName: string
codrId: string
}
export interface RipplingGetCustomObjectRecordByExternalIdParams {
apiKey: string
customObjectApiName: string
externalId: string
}
export interface RipplingQueryCustomObjectRecordsParams {
apiKey: string
customObjectApiName: string
query?: string
limit?: number
cursor?: string
}
export interface RipplingCreateCustomObjectRecordParams {
apiKey: string
customObjectApiName: string
externalId?: string
data: unknown
}
export interface RipplingUpdateCustomObjectRecordParams {
apiKey: string
customObjectApiName: string
codrId: string
externalId?: string
data?: unknown
}
export interface RipplingDeleteCustomObjectRecordParams {
apiKey: string
customObjectApiName: string
codrId: string
}
export interface RipplingBulkCreateCustomObjectRecordsParams {
apiKey: string
customObjectApiName: string
rowsToWrite: unknown
allOrNothing?: boolean
}
export interface RipplingBulkUpdateCustomObjectRecordsParams {
apiKey: string
customObjectApiName: string
rowsToUpdate: unknown
allOrNothing?: boolean
}
export interface RipplingBulkDeleteCustomObjectRecordsParams {
apiKey: string
customObjectApiName: string
rowsToDelete: string[]
allOrNothing?: boolean
}
/** Custom Apps */
export interface RipplingListCustomAppsParams {
apiKey: string
}
export interface RipplingGetCustomAppParams {
apiKey: string
id: string
}
export interface RipplingCreateCustomAppParams {
apiKey: string
name: string
apiName: string
description?: string
}
export interface RipplingUpdateCustomAppParams {
apiKey: string
id: string
name?: string
apiName?: string
description?: string
}
export interface RipplingDeleteCustomAppParams {
apiKey: string
id: string
}
/** Custom Pages */
export interface RipplingListCustomPagesParams {
apiKey: string
}
export interface RipplingGetCustomPageParams {
apiKey: string
id: string
}
export interface RipplingCreateCustomPageParams {
apiKey: string
name: string
}
export interface RipplingUpdateCustomPageParams {
apiKey: string
id: string
name?: string
}
export interface RipplingDeleteCustomPageParams {
apiKey: string
id: string
}
/** Custom Settings */
export interface RipplingListCustomSettingsParams {
apiKey: string
orderBy?: string
cursor?: string
}
export interface RipplingGetCustomSettingParams {
apiKey: string
id: string
}
export interface RipplingCreateCustomSettingParams {
apiKey: string
displayName?: string
apiName?: string
dataType?: string
secretValue?: string
stringValue?: string
numberValue?: number
booleanValue?: boolean
}
export interface RipplingUpdateCustomSettingParams {
apiKey: string
id: string
displayName?: string
apiName?: string
dataType?: string
secretValue?: string
stringValue?: string
numberValue?: number
booleanValue?: boolean
}
export interface RipplingDeleteCustomSettingParams {
apiKey: string
id: string
}
/** Object Categories */
export interface RipplingListObjectCategoriesParams {
apiKey: string
}
export interface RipplingGetObjectCategoryParams {
apiKey: string
id: string
}
export interface RipplingCreateObjectCategoryParams {
apiKey: string
name: string
description?: string
}
export interface RipplingUpdateObjectCategoryParams {
apiKey: string
id: string
name?: string
description?: string
}
export interface RipplingDeleteObjectCategoryParams {
apiKey: string
id: string
}
/** Report Runs */
export interface RipplingGetReportRunParams {
apiKey: string
runId: string
}
export interface RipplingTriggerReportRunParams {
apiKey: string
reportId: string
includeObjectIds?: boolean
includeTotalRows?: boolean
formatDateFields?: unknown
formatCurrencyFields?: unknown
outputType?: string
}
/** Draft Hires */
export interface RipplingCreateDraftHiresParams {
apiKey: string
draftHires: unknown
}
@@ -0,0 +1,78 @@
import type { RipplingUpdateCustomAppParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateCustomAppTool: ToolConfig<RipplingUpdateCustomAppParams> = {
id: 'rippling_update_custom_app',
name: 'Rippling Update CustomApp',
description: 'Update a custom app',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'App ID' },
name: { type: 'string', required: false, visibility: 'user-or-llm', description: 'App name' },
apiName: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'API name',
},
description: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Description',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-apps/${encodeURIComponent(params.id.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.name != null) body.name = params.name
if (params.apiName != null) body.api_name = params.apiName
if (params.description != null) body.description = params.description
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
api_name: (data.api_name as string) ?? null,
description: (data.description as string) ?? null,
icon: (data.icon as string) ?? null,
pages: (data.pages as unknown[]) ?? [],
},
}
},
outputs: {
id: { type: 'string', description: 'App ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
icon: { type: 'string', description: 'Icon URL', optional: true },
pages: { type: 'json', description: 'Array of page summaries', optional: true },
},
}
@@ -0,0 +1,109 @@
import type { RipplingUpdateCustomObjectParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateCustomObjectTool: ToolConfig<RipplingUpdateCustomObjectParams> = {
id: 'rippling_update_custom_object',
name: 'Rippling Update Custom Object',
description: 'Update a custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
name: { type: 'string', required: false, visibility: 'user-or-llm', description: 'Name' },
description: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Description',
},
category: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Category',
},
pluralLabel: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Plural label',
},
ownerRole: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Owner role',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.name != null) body.name = params.name
if (params.description != null) body.description = params.description
if (params.category != null) body.category = params.category
if (params.pluralLabel != null) body.plural_label = params.pluralLabel
if (params.ownerRole != null) body.owner_role = params.ownerRole
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
description: (data.description as string) ?? null,
api_name: (data.api_name as string) ?? null,
plural_label: (data.plural_label as string) ?? null,
category_id: (data.category_id as string) ?? null,
enable_history: (data.enable_history as boolean) ?? null,
native_category_id: (data.native_category_id as string) ?? null,
managed_package_install_id: (data.managed_package_install_id as string) ?? null,
owner_id: (data.owner_id as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
plural_label: { type: 'string', description: 'Plural label', optional: true },
category_id: { type: 'string', description: 'Category ID', optional: true },
enable_history: { type: 'boolean', description: 'History enabled', optional: true },
native_category_id: { type: 'string', description: 'Native category ID', optional: true },
managed_package_install_id: {
type: 'string',
description: 'Package install ID',
optional: true,
},
owner_id: { type: 'string', description: 'Owner ID', optional: true },
},
}
@@ -0,0 +1,166 @@
import type { RipplingUpdateCustomObjectFieldParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateCustomObjectFieldTool: ToolConfig<RipplingUpdateCustomObjectFieldParams> =
{
id: 'rippling_update_custom_object_field',
name: 'Rippling Update Custom Object Field',
description: 'Update a field on a custom object',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
fieldApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Field API name',
},
name: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Field name',
},
description: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Description',
},
dataType: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Data type',
},
required: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Whether the field is required',
},
rqlDefinition: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'RQL definition object',
},
isUnique: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Is unique',
},
formulaAttrMetas: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Formula attribute metadata',
},
section: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Section configuration',
},
enableHistory: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Enable history',
},
derivedFieldFormula: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Derived field formula expression',
},
nameFieldDetails: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Name field details configuration',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/fields/${encodeURIComponent(params.fieldApiName.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.name != null) body.name = params.name
if (params.description != null) body.description = params.description
if (params.dataType != null) body.data_type = params.dataType
if (params.required != null) body.required = params.required
if (params.rqlDefinition != null) body.rql_definition = params.rqlDefinition
if (params.isUnique != null) body.is_unique = params.isUnique
if (params.formulaAttrMetas != null) body.formula_attr_metas = params.formulaAttrMetas
if (params.section != null) body.section = params.section
if (params.enableHistory != null) body.enable_history = params.enableHistory
if (params.derivedFieldFormula != null)
body.derived_field_formula = params.derivedFieldFormula
if (params.nameFieldDetails != null) body.name_field_details = params.nameFieldDetails
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
custom_object: (data.custom_object as string) ?? null,
description: (data.description as string) ?? null,
api_name: (data.api_name as string) ?? null,
data_type: data.data_type ?? null,
is_unique: (data.is_unique as boolean) ?? null,
is_immutable: (data.is_immutable as boolean) ?? null,
is_standard: (data.is_standard as boolean) ?? null,
enable_history: (data.enable_history as boolean) ?? null,
managed_package_install_id: (data.managed_package_install_id as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Field ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
custom_object: { type: 'string', description: 'Custom object', optional: true },
description: { type: 'string', description: 'Description', optional: true },
api_name: { type: 'string', description: 'API name', optional: true },
data_type: { type: 'json', description: 'Data type configuration', optional: true },
is_unique: { type: 'boolean', description: 'Is unique', optional: true },
is_immutable: { type: 'boolean', description: 'Is immutable', optional: true },
is_standard: { type: 'boolean', description: 'Is standard', optional: true },
enable_history: { type: 'boolean', description: 'History enabled', optional: true },
managed_package_install_id: {
type: 'string',
description: 'Package install ID',
optional: true,
},
},
}
@@ -0,0 +1,99 @@
import type { RipplingUpdateCustomObjectRecordParams } from '@/tools/rippling/types'
import { CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateCustomObjectRecordTool: ToolConfig<RipplingUpdateCustomObjectRecordParams> =
{
id: 'rippling_update_custom_object_record',
name: 'Rippling Update Custom Object Record',
description: 'Update a custom object record',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
customObjectApiName: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Custom object API name',
},
codrId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Record ID',
},
externalId: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'External ID for the record',
},
data: {
type: 'json',
required: false,
visibility: 'user-or-llm',
description: 'Updated record data',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-objects/${encodeURIComponent(params.customObjectApiName.trim())}/records/${encodeURIComponent(params.codrId.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.externalId != null && params.externalId !== '')
body.external_id = params.externalId
if (params.data != null) body.data = params.data
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const json = await response.json()
const record = (json.data ?? json) as Record<string, unknown>
const {
id,
created_at,
updated_at,
name,
external_id,
created_by,
last_modified_by,
owner_role,
system_updated_at,
...dynamicFields
} = record
return {
success: true,
output: {
id: (id as string) ?? '',
created_at: (created_at as string) ?? null,
updated_at: (updated_at as string) ?? null,
name: (name as string) ?? null,
external_id: (external_id as string) ?? null,
created_by: created_by ?? null,
last_modified_by: last_modified_by ?? null,
owner_role: owner_role ?? null,
system_updated_at: (system_updated_at as string) ?? null,
data: dynamicFields,
},
}
},
outputs: {
...CUSTOM_OBJECT_RECORD_OUTPUT_PROPERTIES,
data: { type: 'json', description: 'Full record data' },
},
}
@@ -0,0 +1,66 @@
import type { RipplingUpdateCustomPageParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateCustomPageTool: ToolConfig<RipplingUpdateCustomPageParams> = {
id: 'rippling_update_custom_page',
name: 'Rippling Update CustomPage',
description: 'Update a custom page',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Page ID' },
name: { type: 'string', required: false, visibility: 'user-or-llm', description: 'Page name' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-pages/${encodeURIComponent(params.id.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.name != null) body.name = params.name
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
components: data.components ?? [],
actions: data.actions ?? [],
canvas_actions: data.canvas_actions ?? [],
variables: data.variables ?? [],
media: data.media ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Page ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
components: { type: 'json', description: 'Page components', optional: true },
actions: { type: 'json', description: 'Page actions', optional: true },
canvas_actions: { type: 'json', description: 'Canvas actions', optional: true },
variables: { type: 'json', description: 'Page variables', optional: true },
media: { type: 'json', description: 'Page media', optional: true },
},
}
@@ -0,0 +1,107 @@
import type { RipplingUpdateCustomSettingParams } from '@/tools/rippling/types'
import { CUSTOM_SETTING_OUTPUT_PROPERTIES } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateCustomSettingTool: ToolConfig<RipplingUpdateCustomSettingParams> = {
id: 'rippling_update_custom_setting',
name: 'Rippling Update Custom Setting',
description: 'Update a custom setting',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Setting ID' },
displayName: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Display name',
},
apiName: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Unique API name',
},
dataType: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Data type of the setting',
},
secretValue: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Secret value (for secret data type)',
},
stringValue: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'String value (for string data type)',
},
numberValue: {
type: 'number',
required: false,
visibility: 'user-or-llm',
description: 'Number value (for number data type)',
},
booleanValue: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Boolean value (for boolean data type)',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/custom-settings/${encodeURIComponent(params.id.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.displayName != null) body.display_name = params.displayName
if (params.apiName != null) body.api_name = params.apiName
if (params.dataType != null) body.data_type = params.dataType
if (params.secretValue != null) body.secret_value = params.secretValue
if (params.stringValue != null) body.string_value = params.stringValue
if (params.numberValue != null) body.number_value = params.numberValue
if (params.booleanValue != null) body.boolean_value = params.booleanValue
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
display_name: (data.display_name as string) ?? null,
api_name: (data.api_name as string) ?? null,
data_type: (data.data_type as string) ?? null,
secret_value: (data.secret_value as string) ?? null,
string_value: (data.string_value as string) ?? null,
number_value: data.number_value ?? null,
boolean_value: data.boolean_value ?? null,
},
}
},
outputs: {
...CUSTOM_SETTING_OUTPUT_PROPERTIES,
},
}
@@ -0,0 +1,93 @@
import type { RipplingUpdateDepartmentParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateDepartmentTool: ToolConfig<RipplingUpdateDepartmentParams> = {
id: 'rippling_update_department',
name: 'Rippling Update Department',
description: 'Update an existing department',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Department ID' },
name: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Department name',
},
parentId: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Parent department ID',
},
referenceCode: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Reference code',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/departments/${encodeURIComponent(params.id.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.name != null) body.name = params.name
if (params.parentId != null) body.parent_id = params.parentId
if (params.referenceCode != null) body.reference_code = params.referenceCode
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
parent_id: (data.parent_id as string) ?? null,
reference_code: (data.reference_code as string) ?? null,
department_hierarchy_id: (data.department_hierarchy_id as unknown[]) ?? [],
parent: data.parent ?? null,
department_hierarchy: data.department_hierarchy ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Department ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
parent_id: { type: 'string', description: 'Parent department ID', optional: true },
reference_code: { type: 'string', description: 'Reference code', optional: true },
department_hierarchy_id: {
type: 'json',
description: 'Department hierarchy IDs',
optional: true,
},
parent: { type: 'json', description: 'Expanded parent department', optional: true },
department_hierarchy: {
type: 'json',
description: 'Expanded department hierarchy',
optional: true,
},
},
}
@@ -0,0 +1,70 @@
import type { RipplingUpdateObjectCategoryParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateObjectCategoryTool: ToolConfig<RipplingUpdateObjectCategoryParams> = {
id: 'rippling_update_object_category',
name: 'Rippling Update ObjectCategory',
description: 'Update an object category',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Category ID' },
name: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Category name',
},
description: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Description',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/object-categories/${encodeURIComponent(params.id.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.name != null) body.name = params.name
if (params.description != null) body.description = params.description
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
description: (data.description as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Category ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Name', optional: true },
description: { type: 'string', description: 'Description', optional: true },
},
}
@@ -0,0 +1,52 @@
import type { RipplingUpdateSupergroupExclusionMembersParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateSupergroupExclusionMembersTool: ToolConfig<RipplingUpdateSupergroupExclusionMembersParams> =
{
id: 'rippling_update_supergroup_exclusion_members',
name: 'Rippling Update Supergroup Exclusion Members',
description: 'Update exclusion members of a supergroup',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
groupId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Supergroup ID',
},
operations: {
type: 'json',
required: true,
visibility: 'user-or-llm',
description: 'Operations array [{op: "add"|"remove", value: [{id: "member_id"}]}]',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/supergroups/${encodeURIComponent(params.groupId.trim())}/exclusion-members/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => ({ Operations: params.operations }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return { success: true, output: { ok: data.ok ?? false } }
},
outputs: {
ok: { type: 'boolean', description: 'Whether the operation succeeded' },
},
}
@@ -0,0 +1,52 @@
import type { RipplingUpdateSupergroupInclusionMembersParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateSupergroupInclusionMembersTool: ToolConfig<RipplingUpdateSupergroupInclusionMembersParams> =
{
id: 'rippling_update_supergroup_inclusion_members',
name: 'Rippling Update Supergroup Inclusion Members',
description: 'Update inclusion members of a supergroup',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
groupId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Supergroup ID',
},
operations: {
type: 'json',
required: true,
visibility: 'user-or-llm',
description: 'Operations array [{op: "add"|"remove", value: [{id: "member_id"}]}]',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/supergroups/${encodeURIComponent(params.groupId.trim())}/inclusion-members/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => ({ Operations: params.operations }),
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return { success: true, output: { ok: data.ok ?? false } }
},
outputs: {
ok: { type: 'boolean', description: 'Whether the operation succeeded' },
},
}
+56
View File
@@ -0,0 +1,56 @@
import type { RipplingUpdateTitleParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateTitleTool: ToolConfig<RipplingUpdateTitleParams> = {
id: 'rippling_update_title',
name: 'Rippling Update Title',
description: 'Update an existing title',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Title ID' },
name: { type: 'string', required: false, visibility: 'user-or-llm', description: 'Title name' },
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/titles/${encodeURIComponent(params.id.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.name != null) body.name = params.name
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Title ID' },
created_at: { type: 'string', description: 'Creation date', optional: true },
updated_at: { type: 'string', description: 'Update date', optional: true },
name: { type: 'string', description: 'Title name', optional: true },
},
}
@@ -0,0 +1,102 @@
import type { RipplingUpdateWorkLocationParams } from '@/tools/rippling/types'
import type { ToolConfig } from '@/tools/types'
export const ripplingUpdateWorkLocationTool: ToolConfig<RipplingUpdateWorkLocationParams> = {
id: 'rippling_update_work_location',
name: 'Rippling Update Work Location',
description: 'Update a work location',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Rippling API key',
},
id: { type: 'string', required: true, visibility: 'user-or-llm', description: 'Location ID' },
name: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Location name',
},
streetAddress: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Street address',
},
locality: { type: 'string', required: false, visibility: 'user-or-llm', description: 'City' },
region: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'State/region',
},
postalCode: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Postal code',
},
country: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Country code',
},
addressType: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Address type (HOME, WORK, OTHER)',
},
},
request: {
url: (params) =>
`https://rest.ripplingapis.com/work-locations/${encodeURIComponent(params.id.trim())}/`,
method: 'PATCH',
headers: (params) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.name != null) body.name = params.name
const address: Record<string, string> = {}
if (params.streetAddress != null) address.street_address = params.streetAddress
if (params.locality != null) address.locality = params.locality
if (params.region != null) address.region = params.region
if (params.postalCode != null) address.postal_code = params.postalCode
if (params.country != null) address.country = params.country
if (params.addressType != null) address.type = params.addressType
if (Object.keys(address).length > 0) body.address = address
return body
},
},
transformResponse: async (response: Response) => {
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
}
const data = await response.json()
return {
success: true,
output: {
id: (data.id as string) ?? '',
created_at: (data.created_at as string) ?? null,
updated_at: (data.updated_at as string) ?? null,
name: (data.name as string) ?? null,
address: data.address ?? null,
},
}
},
outputs: {
id: { type: 'string', description: 'Location ID' },
created_at: { type: 'string', description: 'Created timestamp', optional: true },
updated_at: { type: 'string', description: 'Updated timestamp', optional: true },
name: { type: 'string', description: 'Name' },
address: { type: 'json', description: 'Address', optional: true },
},
}