Skip to content

Commit 2397fd0

Browse files
committed
fix(rippling): add missing custom page fields and structured custom setting responses
- Add 5 missing CustomPage fields (components, actions, canvas_actions, variables, media) to types and all page tools - Replace opaque data blob with structured field mapping in create/update custom setting transforms - Fix secret_value type cast consistency in list_custom_settings
1 parent 824e326 commit 2397fd0

8 files changed

Lines changed: 83 additions & 5 deletions

apps/sim/tools/rippling/create_custom_page.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ export const ripplingCreateCustomPageTool: ToolConfig<RipplingCreateCustomPagePa
4040
created_at: (data.created_at as string) ?? null,
4141
updated_at: (data.updated_at as string) ?? null,
4242
name: (data.name as string) ?? null,
43+
components: data.components ?? [],
44+
actions: data.actions ?? [],
45+
canvas_actions: data.canvas_actions ?? [],
46+
variables: data.variables ?? [],
47+
media: data.media ?? null,
4348
},
4449
}
4550
},
@@ -48,5 +53,10 @@ export const ripplingCreateCustomPageTool: ToolConfig<RipplingCreateCustomPagePa
4853
created_at: { type: 'string', description: 'Creation date', optional: true },
4954
updated_at: { type: 'string', description: 'Update date', optional: true },
5055
name: { type: 'string', description: 'Name', optional: true },
56+
components: { type: 'json', description: 'Page components', optional: true },
57+
actions: { type: 'json', description: 'Page actions', optional: true },
58+
canvas_actions: { type: 'json', description: 'Canvas actions', optional: true },
59+
variables: { type: 'json', description: 'Page variables', optional: true },
60+
media: { type: 'json', description: 'Page media', optional: true },
5161
},
5262
}

apps/sim/tools/rippling/create_custom_setting.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,30 @@ export const ripplingCreateCustomSettingTool: ToolConfig<RipplingCreateCustomSet
3535
const data = await response.json()
3636
return {
3737
success: true,
38-
output: { id: (data.id as string) ?? '', data },
38+
output: {
39+
id: (data.id as string) ?? '',
40+
created_at: (data.created_at as string) ?? null,
41+
updated_at: (data.updated_at as string) ?? null,
42+
display_name: (data.display_name as string) ?? null,
43+
api_name: (data.api_name as string) ?? null,
44+
data_type: (data.data_type as string) ?? null,
45+
secret_value: (data.secret_value as string) ?? null,
46+
string_value: (data.string_value as string) ?? null,
47+
number_value: data.number_value ?? null,
48+
boolean_value: data.boolean_value ?? null,
49+
},
3950
}
4051
},
4152
outputs: {
4253
id: { type: 'string', description: 'Setting ID' },
43-
data: { type: 'json', description: 'Full setting data' },
54+
created_at: { type: 'string', description: 'Created timestamp', optional: true },
55+
updated_at: { type: 'string', description: 'Updated timestamp', optional: true },
56+
display_name: { type: 'string', description: 'Display name', optional: true },
57+
api_name: { type: 'string', description: 'API name', optional: true },
58+
data_type: { type: 'string', description: 'Data type', optional: true },
59+
secret_value: { type: 'string', description: 'Secret value', optional: true },
60+
string_value: { type: 'string', description: 'String value', optional: true },
61+
number_value: { type: 'number', description: 'Number value', optional: true },
62+
boolean_value: { type: 'boolean', description: 'Boolean value', optional: true },
4463
},
4564
}

apps/sim/tools/rippling/get_custom_page.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ export const ripplingGetCustomPageTool: ToolConfig<RipplingGetCustomPageParams>
3434
created_at: (data.created_at as string) ?? null,
3535
updated_at: (data.updated_at as string) ?? null,
3636
name: (data.name as string) ?? null,
37+
components: data.components ?? [],
38+
actions: data.actions ?? [],
39+
canvas_actions: data.canvas_actions ?? [],
40+
variables: data.variables ?? [],
41+
media: data.media ?? null,
3742
},
3843
}
3944
},
@@ -42,5 +47,10 @@ export const ripplingGetCustomPageTool: ToolConfig<RipplingGetCustomPageParams>
4247
created_at: { type: 'string', description: 'Creation date', optional: true },
4348
updated_at: { type: 'string', description: 'Update date', optional: true },
4449
name: { type: 'string', description: 'Name', optional: true },
50+
components: { type: 'json', description: 'Page components', optional: true },
51+
actions: { type: 'json', description: 'Page actions', optional: true },
52+
canvas_actions: { type: 'json', description: 'Canvas actions', optional: true },
53+
variables: { type: 'json', description: 'Page variables', optional: true },
54+
media: { type: 'json', description: 'Page media', optional: true },
4555
},
4656
}

apps/sim/tools/rippling/list_custom_pages.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ export const ripplingListCustomPagesTool: ToolConfig<RipplingListCustomPagesPara
3535
created_at: (item.created_at as string) ?? null,
3636
updated_at: (item.updated_at as string) ?? null,
3737
name: (item.name as string) ?? null,
38+
components: item.components ?? [],
39+
actions: item.actions ?? [],
40+
canvas_actions: item.canvas_actions ?? [],
41+
variables: item.variables ?? [],
42+
media: item.media ?? null,
3843
})),
3944
totalCount: results.length,
4045
nextLink: (data.next_link as string) ?? null,

apps/sim/tools/rippling/list_custom_settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const ripplingListCustomSettingsTool: ToolConfig<RipplingListCustomSettin
5454
display_name: (item.display_name as string) ?? null,
5555
api_name: (item.api_name as string) ?? null,
5656
data_type: (item.data_type as string) ?? null,
57-
secret_value: item.secret_value ?? null,
57+
secret_value: (item.secret_value as string) ?? null,
5858
string_value: (item.string_value as string) ?? null,
5959
number_value: (item.number_value as number) ?? null,
6060
boolean_value: (item.boolean_value as boolean) ?? null,

apps/sim/tools/rippling/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ export const CUSTOM_PAGE_OUTPUT_PROPERTIES = {
269269
created_at: { type: 'string', description: 'Record creation date' },
270270
updated_at: { type: 'string', description: 'Record update date' },
271271
name: { type: 'string', description: 'Page name' },
272+
components: { type: 'json', description: 'Page components' },
273+
actions: { type: 'json', description: 'Page actions' },
274+
canvas_actions: { type: 'json', description: 'Canvas actions' },
275+
variables: { type: 'json', description: 'Page variables' },
276+
media: { type: 'json', description: 'Page media' },
272277
} as const satisfies Record<string, OutputProperty>
273278

274279
/** Object category output properties */

apps/sim/tools/rippling/update_custom_page.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ export const ripplingUpdateCustomPageTool: ToolConfig<RipplingUpdateCustomPagePa
4444
created_at: (data.created_at as string) ?? null,
4545
updated_at: (data.updated_at as string) ?? null,
4646
name: (data.name as string) ?? null,
47+
components: data.components ?? [],
48+
actions: data.actions ?? [],
49+
canvas_actions: data.canvas_actions ?? [],
50+
variables: data.variables ?? [],
51+
media: data.media ?? null,
4752
},
4853
}
4954
},
@@ -52,5 +57,10 @@ export const ripplingUpdateCustomPageTool: ToolConfig<RipplingUpdateCustomPagePa
5257
created_at: { type: 'string', description: 'Creation date', optional: true },
5358
updated_at: { type: 'string', description: 'Update date', optional: true },
5459
name: { type: 'string', description: 'Name', optional: true },
60+
components: { type: 'json', description: 'Page components', optional: true },
61+
actions: { type: 'json', description: 'Page actions', optional: true },
62+
canvas_actions: { type: 'json', description: 'Canvas actions', optional: true },
63+
variables: { type: 'json', description: 'Page variables', optional: true },
64+
media: { type: 'json', description: 'Page media', optional: true },
5565
},
5666
}

apps/sim/tools/rippling/update_custom_setting.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,30 @@ export const ripplingUpdateCustomSettingTool: ToolConfig<RipplingUpdateCustomSet
4242
const data = await response.json()
4343
return {
4444
success: true,
45-
output: { id: (data.id as string) ?? '', data },
45+
output: {
46+
id: (data.id as string) ?? '',
47+
created_at: (data.created_at as string) ?? null,
48+
updated_at: (data.updated_at as string) ?? null,
49+
display_name: (data.display_name as string) ?? null,
50+
api_name: (data.api_name as string) ?? null,
51+
data_type: (data.data_type as string) ?? null,
52+
secret_value: (data.secret_value as string) ?? null,
53+
string_value: (data.string_value as string) ?? null,
54+
number_value: data.number_value ?? null,
55+
boolean_value: data.boolean_value ?? null,
56+
},
4657
}
4758
},
4859
outputs: {
4960
id: { type: 'string', description: 'Setting ID' },
50-
data: { type: 'json', description: 'Full setting data' },
61+
created_at: { type: 'string', description: 'Created timestamp', optional: true },
62+
updated_at: { type: 'string', description: 'Updated timestamp', optional: true },
63+
display_name: { type: 'string', description: 'Display name', optional: true },
64+
api_name: { type: 'string', description: 'API name', optional: true },
65+
data_type: { type: 'string', description: 'Data type', optional: true },
66+
secret_value: { type: 'string', description: 'Secret value', optional: true },
67+
string_value: { type: 'string', description: 'String value', optional: true },
68+
number_value: { type: 'number', description: 'Number value', optional: true },
69+
boolean_value: { type: 'boolean', description: 'Boolean value', optional: true },
5170
},
5271
}

0 commit comments

Comments
 (0)