Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(robolly): add AI actions and output schemas (#16297)

Kishan Parmar714855ba180f
diff --git a/packages/pieces/community/robolly/package.json b/packages/pieces/community/robolly/package.json
index 373dcc7eb88..b894097e68a 100644
--- a/packages/pieces/community/robolly/package.json
+++ b/packages/pieces/community/robolly/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-robolly",
- "version": "0.2.0",
+ "version": "0.3.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
diff --git a/packages/pieces/community/robolly/src/index.ts b/packages/pieces/community/robolly/src/index.ts
index dbd11257125..2fbce9c5385 100644
--- a/packages/pieces/community/robolly/src/index.ts
+++ b/packages/pieces/community/robolly/src/index.ts
@@ -1,40 +1,24 @@
import { createCustomApiCallAction } from '@activepieces/pieces-common';
-import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
-import { PieceCategory } from '@activepieces/pieces-framework';
-import { generateImage } from './lib/actions/generate-image.action';
-
-const markdownDescription = `
-Follow these instructions to get your API Key:
-1. Visit the following website: https://robolly.com/dashboard/account/
-2. Once on the website, locate and copy your API Key.
-Please, take into consideration: We don't test your API Key validity in order to save you some generations, so make sure this is the correct one.
-`;
-
-export const robollyAuth = PieceAuth.SecretText({
- description: markdownDescription,
- displayName: 'API Key',
- required: true,
- validate: async () => {
- return {
- valid: true,
- };
- },
-});
+import { createPiece, PieceCategory } from '@activepieces/pieces-framework';
+import { robollyAiActions } from './lib/actions/ai';
+import { generateImageAction } from './lib/actions/generate-image';
+import { robollyAuth } from './lib/auth';
+import { robollyClient } from './lib/common/client';
export const robolly = createPiece({
displayName: 'Robolly',
- description:
- 'Robolly is the all‑in‑one service for personalized image, video & PDF generation with API',
+ description: 'Robolly is the all‑in‑one service for personalized image, video & PDF generation with API',
auth: robollyAuth,
- minimumSupportedRelease: '0.30.0',
+ minimumSupportedRelease: '0.88.2',
logoUrl: 'https://cdn.activepieces.com/pieces/robolly.png',
categories: [PieceCategory.MARKETING],
- authors: ["pfernandez98","kishanprmr","MoShizzle","abuaboud"],
+ authors: ['pfernandez98', 'kishanprmr', 'MoShizzle', 'abuaboud'],
actions: [
- generateImage,
+ generateImageAction,
+ ...robollyAiActions,
createCustomApiCallAction({
- baseUrl: () => 'https://api.robolly.com',
+ baseUrl: () => robollyClient.baseUrl(),
auth: robollyAuth,
authMapping: async (auth) => ({
Authorization: `Bearer ${auth}`,
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/create-hidden-render-link.ts b/packages/pieces/community/robolly/src/lib/actions/ai/create-hidden-render-link.ts
new file mode 100644
index 00000000000..296fab0bc33
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/create-hidden-render-link.ts
@@ -0,0 +1,58 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyAiProps } from '../../common/ai-props';
+import { robollyApi } from '../../common/api';
+import { robollyCreateHiddenRenderLinkOutputSchema } from '../../output-schemas';
+
+const RESERVED_KEYS = ['template', 'sig'];
+
+const formatOptions = [
+ { label: 'JPG', value: 'jpg' },
+ { label: 'PNG', value: 'png' },
+ { label: 'PDF', value: 'pdf' },
+];
+
+export const createHiddenRenderLinkAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_create_hidden_render_link',
+ outputSchema: robollyCreateHiddenRenderLinkOutputSchema,
+ displayName: 'Create Hidden Render Link',
+ description: 'Builds a signed render link that looks like a static file URL.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Builds a signed, static-looking render link for a template with the given element values, for embedding in public pages or emails. It sends no request; the template renders, and uses render credits, each time the link is opened. Use Render Template instead to render now and get the file URL.',
+ idempotent: true,
+ },
+ props: {
+ templateId: robollyAiProps.templateId({ required: true }),
+ format: Property.StaticDropdown({
+ displayName: 'Format',
+ description: 'The output format.',
+ required: true,
+ defaultValue: 'jpg',
+ options: { options: formatOptions },
+ }),
+ modifications: robollyAiProps.modifications({ required: false }),
+ },
+ async run({ auth, propsValue }) {
+ const reservedKeys = Object.keys(propsValue.modifications ?? {}).filter((key) =>
+ RESERVED_KEYS.includes(key),
+ );
+ if (reservedKeys.length > 0) {
+ throw new Error(
+ `"Modifications" can't include ${reservedKeys
+ .map((key) => `"${key}"`)
+ .join(' or ')}: the link sets the template from "Template ID" and signs itself.`,
+ );
+ }
+ return robollyApi.createHiddenRenderLink({
+ auth,
+ templateId: propsValue.templateId,
+ format: propsValue.format,
+ modifications: propsValue.modifications,
+ });
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/create-template.ts b/packages/pieces/community/robolly/src/lib/actions/ai/create-template.ts
new file mode 100644
index 00000000000..6c5ca892270
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/create-template.ts
@@ -0,0 +1,43 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyAiProps } from '../../common/ai-props';
+import { robollyApi } from '../../common/api';
+import { robollyCreateTemplateOutputSchema } from '../../output-schemas';
+
+export const createTemplateAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_create_template',
+ outputSchema: robollyCreateTemplateOutputSchema,
+ displayName: 'Create Template',
+ description: 'Creates a blank template in your Robolly account.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Creates a blank template (an empty canvas, no elements) in the Robolly account and returns it with its ID; elements are added in the Robolly editor. Each call creates another template, plans cap the number of templates, and the API offers no way to delete one.',
+ idempotent: false,
+ },
+ props: {
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The template name.',
+ required: true,
+ }),
+ ...robollyAiProps.templateFields(),
+ },
+ async run({ auth, propsValue }) {
+ return await robollyApi.createTemplate({
+ auth,
+ fields: {
+ name: propsValue.name,
+ artboardWidth: propsValue.artboardWidth,
+ artboardHeight: propsValue.artboardHeight,
+ backgroundColor: propsValue.backgroundColor,
+ path: propsValue.path,
+ renderFileName: propsValue.renderFileName,
+ disallowNotSigned: propsValue.disallowNotSigned,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/get-render.ts b/packages/pieces/community/robolly/src/lib/actions/ai/get-render.ts
new file mode 100644
index 00000000000..d6d2f4508b2
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/get-render.ts
@@ -0,0 +1,30 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyApi } from '../../common/api';
+import { robollyGetRenderOutputSchema } from '../../output-schemas';
+
+export const getRenderAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_get_render',
+ outputSchema: robollyGetRenderOutputSchema,
+ displayName: 'Get Render',
+ description: 'Gets one render by ID, with its status and file URL.',
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ 'Gets one render by ID with its status, file URL and preview URL. Use it to check a past render found with List Renders. Fails when no render has that ID.',
+ idempotent: true,
+ },
+ props: {
+ renderId: Property.ShortText({
+ displayName: 'Render ID',
+ description: 'The render ID, from List Renders.',
+ required: true,
+ }),
+ },
+ async run({ auth, propsValue }) {
+ return await robollyApi.getRender({ auth, renderId: propsValue.renderId });
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/index.ts b/packages/pieces/community/robolly/src/lib/actions/ai/index.ts
new file mode 100644
index 00000000000..00c21af8fc5
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/index.ts
@@ -0,0 +1,21 @@
+import { createHiddenRenderLinkAction } from './create-hidden-render-link';
+import { createTemplateAction } from './create-template';
+import { getRenderAction } from './get-render';
+import { listGalleryTemplatesAction } from './list-gallery-templates';
+import { listRendersAction } from './list-renders';
+import { listTemplateElementsAction } from './list-template-elements';
+import { listTemplatesAction } from './list-templates';
+import { renderTemplateAction } from './render-template';
+import { updateTemplateAction } from './update-template';
+
+export const robollyAiActions = [
+ listTemplatesAction,
+ listTemplateElementsAction,
+ listGalleryTemplatesAction,
+ createTemplateAction,
+ updateTemplateAction,
+ renderTemplateAction,
+ createHiddenRenderLinkAction,
+ getRenderAction,
+ listRendersAction,
+];
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/list-gallery-templates.ts b/packages/pieces/community/robolly/src/lib/actions/ai/list-gallery-templates.ts
new file mode 100644
index 00000000000..b8087c93bc5
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/list-gallery-templates.ts
@@ -0,0 +1,30 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyApi } from '../../common/api';
+import { robollyListGalleryTemplatesOutputSchema } from '../../output-schemas';
+
+export const listGalleryTemplatesAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_list_gallery_templates',
+ outputSchema: robollyListGalleryTemplatesOutputSchema,
+ displayName: 'List Gallery Templates',
+ description: "Lists Robolly's pre-built gallery templates.",
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ "Lists Robolly's pre-built gallery templates. These are designs offered by Robolly, not templates in the account; use List Templates for the account's own templates, which are the ones Render Template accepts. Pass paginationCursorNext from the previous page as the cursor to get the next page.",
+ idempotent: true,
+ },
+ props: {
+ cursor: Property.ShortText({
+ displayName: 'Cursor',
+ description: 'paginationCursorNext from the previous page.',
+ required: false,
+ }),
+ },
+ async run({ auth, propsValue }) {
+ return await robollyApi.listGalleryTemplates({ auth, cursor: propsValue.cursor });
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/list-renders.ts b/packages/pieces/community/robolly/src/lib/actions/ai/list-renders.ts
new file mode 100644
index 00000000000..056977a3dfa
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/list-renders.ts
@@ -0,0 +1,51 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyAiProps } from '../../common/ai-props';
+import { robollyApi } from '../../common/api';
+import { robollyListRendersOutputSchema } from '../../output-schemas';
+
+export const listRendersAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_list_renders',
+ outputSchema: robollyListRendersOutputSchema,
+ displayName: 'List Renders',
+ description: 'Lists past renders, newest first, 30 per page.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists past renders, newest first, up to 30 per page, optionally filtered by template, movie or cache hash. Pass paginationCursorNext from the previous page as the cursor to get the next page, with the same filters. Use Get Render for one render by ID.',
+ idempotent: true,
+ },
+ props: {
+ templateId: robollyAiProps.templateId({
+ required: false,
+ description: 'Only renders of this template. Use List Templates to find it.',
+ }),
+ movieId: Property.ShortText({
+ displayName: 'Movie ID',
+ description: 'Only renders with this movie ID.',
+ required: false,
+ }),
+ cacheHash: Property.ShortText({
+ displayName: 'Cache Hash',
+ description: 'Only the render with this cache hash.',
+ required: false,
+ }),
+ cursor: Property.ShortText({
+ displayName: 'Cursor',
+ description: 'paginationCursorNext from the previous page.',
+ required: false,
+ }),
+ },
+ async run({ auth, propsValue }) {
+ return await robollyApi.listRenders({
+ auth,
+ templateId: propsValue.templateId,
+ movieId: propsValue.movieId,
+ cacheHash: propsValue.cacheHash,
+ cursor: propsValue.cursor,
+ });
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/list-template-elements.ts b/packages/pieces/community/robolly/src/lib/actions/ai/list-template-elements.ts
new file mode 100644
index 00000000000..535f4bb4c75
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/list-template-elements.ts
@@ -0,0 +1,27 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyAiProps } from '../../common/ai-props';
+import { robollyApi } from '../../common/api';
+import { robollyListTemplateElementsOutputSchema } from '../../output-schemas';
+
+export const listTemplateElementsAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_list_template_elements',
+ outputSchema: robollyListTemplateElementsOutputSchema,
+ displayName: 'List Template Elements',
+ description: "Lists a template's elements and the modifications each one accepts.",
+ audience: 'ai',
+ classification: 'READ',
+ aiMetadata: {
+ description:
+ "Returns a template's element names with their types, the detailed modification keys each element accepts (e.g. title.textColor) and the value catalog for them. Call it before Render Template or Create Hidden Render Link to know which modification keys to send.",
+ idempotent: true,
+ },
+ props: {
+ templateId: robollyAiProps.templateId({ required: true }),
+ },
+ async run({ auth, propsValue }) {
+ return await robollyApi.getAcceptedModifications({ auth, templateId: propsValue.templateId });
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/list-templates.ts b/packages/pieces/community/robolly/src/lib/actions/ai/list-templates.ts
new file mode 100644
index 00000000000..435c427e17a
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/list-templates.ts
@@ -0,0 +1,25 @@
+import { createAction } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyApi } from '../../common/api';
+import { robollyListTemplatesOutputSchema } from '../../output-schemas';
+
+export const listTemplatesAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_list_templates',
+ outputSchema: robollyListTemplatesOutputSchema,
+ displayName: 'List Templates',
+ description: 'Lists the templates in your Robolly account.',
+ audience: 'ai',
+ classification: 'SEARCH',
+ aiMetadata: {
+ description:
+ 'Lists the templates in the Robolly account with their IDs and names. Use it to find the template ID that Render Template, Create Hidden Render Link, List Template Elements and Update Template need.',
+ idempotent: true,
+ },
+ props: {},
+ async run({ auth }) {
+ const templates = await robollyApi.listTemplates({ auth });
+ return { templates, count: templates.length };
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/render-template.ts b/packages/pieces/community/robolly/src/lib/actions/ai/render-template.ts
new file mode 100644
index 00000000000..8231a5e86f6
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/render-template.ts
@@ -0,0 +1,79 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyAiProps } from '../../common/ai-props';
+import { robollyApi } from '../../common/api';
+import { robollyRenderTemplateOutputSchema } from '../../output-schemas';
+
+const formatOptions = [
+ { label: 'JPG', value: 'jpg' },
+ { label: 'PNG', value: 'png' },
+ { label: 'PDF', value: 'pdf' },
+ { label: 'MP4', value: 'mp4' },
+];
+
+export const renderTemplateAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_render_template',
+ outputSchema: robollyRenderTemplateOutputSchema,
+ displayName: 'Render Template',
+ description: 'Renders a template as an image, PDF or MP4 and returns the file URL.',
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ 'Renders a Robolly template with the given element values and returns the rendered file URL. Get the template ID from List Templates and the modification keys from List Template Elements. Each call uses render credits.',
+ idempotent: false,
+ },
+ props: {
+ templateId: robollyAiProps.templateId({ required: true }),
+ format: Property.StaticDropdown({
+ displayName: 'Format',
+ description: 'The output format. MP4 only works for animated templates.',
+ required: true,
+ defaultValue: 'jpg',
+ options: { options: formatOptions },
+ }),
+ modifications: robollyAiProps.modifications({ required: false }),
+ scale: Property.Number({
+ displayName: 'Scale',
+ description: 'Output scale from 0.1 to 3. Defaults to 1.',
+ required: false,
+ }),
+ quality: Property.Number({
+ displayName: 'Quality',
+ description: 'Compression quality from 10 to 100, JPG only.',
+ required: false,
+ }),
+ dpi: Property.Number({
+ displayName: 'DPI',
+ description: 'DPI from 1 to 1200, JPG and PNG only.',
+ required: false,
+ }),
+ fps: Property.Number({
+ displayName: 'FPS',
+ description: 'Frames per second for MP4: 24, 30, 50 or 60.',
+ required: false,
+ }),
+ duration: Property.Number({
+ displayName: 'Duration',
+ description: 'Video length in milliseconds for MP4, up to 10000.',
+ required: false,
+ }),
+ },
+ async run({ auth, propsValue }) {
+ return await robollyApi.renderTemplateLink({
+ auth,
+ templateId: propsValue.templateId,
+ format: propsValue.format,
+ modifications: propsValue.modifications,
+ options: {
+ scale: propsValue.scale,
+ q: propsValue.quality,
+ dpi: propsValue.dpi,
+ fps: propsValue.fps,
+ duration: propsValue.duration,
+ },
+ });
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/ai/update-template.ts b/packages/pieces/community/robolly/src/lib/actions/ai/update-template.ts
new file mode 100644
index 00000000000..f9dc6a8c770
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/ai/update-template.ts
@@ -0,0 +1,46 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../../auth';
+import { robollyAiProps } from '../../common/ai-props';
+import { robollyApi } from '../../common/api';
+import { robollyUpdateTemplateOutputSchema } from '../../output-schemas';
+
+export const updateTemplateAction = createAction({
+ auth: robollyAuth,
+ name: 'robolly_update_template',
+ outputSchema: robollyUpdateTemplateOutputSchema,
+ displayName: 'Update Template',
+ description: "Updates a template's name and canvas settings.",
+ audience: 'ai',
+ classification: 'WRITE',
+ aiMetadata: {
+ description:
+ "Updates a template's name and canvas settings in the Robolly account, changing only the fields sent, and returns the template ID. Get the template ID from List Templates or Create Template.",
+ idempotent: true,
+ },
+ props: {
+ templateId: robollyAiProps.templateId({ required: true }),
+ name: Property.ShortText({
+ displayName: 'Name',
+ description: 'The new template name.',
+ required: false,
+ }),
+ ...robollyAiProps.templateFields(),
+ },
+ async run({ auth, propsValue }) {
+ await robollyApi.updateTemplate({
+ auth,
+ templateId: propsValue.templateId,
+ fields: {
+ name: propsValue.name,
+ artboardWidth: propsValue.artboardWidth,
+ artboardHeight: propsValue.artboardHeight,
+ backgroundColor: propsValue.backgroundColor,
+ path: propsValue.path,
+ renderFileName: propsValue.renderFileName,
+ disallowNotSigned: propsValue.disallowNotSigned,
+ },
+ });
+ return { success: true, templateId: propsValue.templateId };
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/actions/generate-image.action.ts b/packages/pieces/community/robolly/src/lib/actions/generate-image.action.ts
deleted file mode 100644
index 8225c32869e..00000000000
--- a/packages/pieces/community/robolly/src/lib/actions/generate-image.action.ts
+++ /dev/null
@@ -1,148 +0,0 @@
-/* eslint-disable @typescript-eslint/no-explicit-any */
-import { HttpMethod, httpClient } from "@activepieces/pieces-common";
-import { DynamicPropsValue, Property, createAction } from "@activepieces/pieces-framework";
-import { robollyAuth } from "../..";
-
-export const generateImage = createAction({
- description: 'Generate an image using Robolly',
- audience: 'both',
- aiMetadata: { description: 'Renders a personalized asset (JPG, PNG, or PDF, set via the format input) from a Robolly template by filling its template fields with the supplied values, plus any extra modifications. Use when an agent needs to produce a finished image/PDF from a design template; requires a template ID and the values for that template\'s accepted fields. Each call produces a new render and consumes a generation, so it is not idempotent.', idempotent: false },
- displayName: 'Generate Image',
- name: 'generate_image',
- classification: 'READ',
- auth: robollyAuth,
- props: {
- template_id: Property.Dropdown({
- auth: robollyAuth,
- displayName: 'Template',
- required: true,
- description: 'Select your template. (If you want to use Template ID. Click on the "(x)" above this field. Template ID can be found by opening a template and going to “Render”. Being there copy the template ID from the top right.)',
- refreshers: [],
- options: async ({ auth }) => {
- if (!auth) {
- return {
- disabled: true,
- placeholder: 'Enter your API key first',
- options: []
- };
- }
- try {
- const request = await httpClient.sendRequest({
- method: HttpMethod.GET,
- url: `https://api.robolly.com/v1/templates`,
- headers: {
- 'Authorization': `Bearer ${auth.secret_text}`
- }
- });
-
- return {
- disabled: false,
- options: request.body['templates'].map((template: any) => {
- return {
- label: template.name,
- value: template.id
- };
- })
- };
- } catch (error) {
- return {
- disabled: true,
- options: [],
- placeholder: "Couldn't load templates, API key is invalid"
- };
- }
- }
- }),
- format: Property.StaticDropdown({
- displayName: 'Format',
- required: true,
- description: 'The format of the image to generate.',
- defaultValue: 'jpg',
- options: {
- "options" : [
- {
- "label": "JPG",
- "value": 'jpg',
- },
- {
- "label": "PNG",
- "value": 'png',
- },
- {
- "label": "PDF",
- "value": 'pdf',
- }
- ]
- }
- }),
- fields: Property.DynamicProperties({
- auth: robollyAuth,
- displayName: 'Values',
- description: 'The values to apply to the fields in the template.',
- required: true,
- refreshers: ["template_id"],
- props: async ({ auth, template_id }) => {
- if (!auth) return {};
- if (!template_id) return {};
-
- const fields: DynamicPropsValue = {};
-
- const request = await httpClient.sendRequest({
- method: HttpMethod.GET,
- url: `https://api.robolly.com/v1/templates/${template_id}/accepted-modifications`,
- headers: {
- 'Authorization': `Bearer ${auth.secret_text}`
- }
- });
-
- request.body['acceptedModifications'].map((field: any) => {
- fields[field.key] = Property.ShortText({
- displayName: field.key,
- description: `Type: ${field.type}`,
- required: false
- })
- })
- return fields
- }
- }),
- modifications: Property.Object({
- displayName: 'Extra Modifications',
- description: 'The extra modifications to apply to the image. See "Detailed dynamic modifications" in https://robolly.com/docs/api-reference/',
- required: false,
-
- })
- },
- async run({ auth, propsValue }){
-
- const fields = propsValue.fields;
-
- const queryParams: Record<string, string> = {
- };
-
- queryParams['json'] = ""
-
- for (const key in propsValue.modifications) {
- const value = propsValue.modifications[key];
- queryParams[key as string] = value as string;
- }
-
- Object.keys(fields).forEach(k => {
- if (fields[k] !== '') {
- queryParams[k] = fields[k]
- }
- })
-
- const request = await httpClient.sendRequest({
- method: HttpMethod.GET,
- queryParams: queryParams,
- url: `https://api.robolly.com/templates/${propsValue.template_id}/render/${propsValue.format}`,
- headers: {
- 'Authorization': `Bearer ${auth.secret_text}`
- },
- body: propsValue.modifications
- });
-
-
- return request.body;
- }
-});
diff --git a/packages/pieces/community/robolly/src/lib/actions/generate-image.ts b/packages/pieces/community/robolly/src/lib/actions/generate-image.ts
new file mode 100644
index 00000000000..fe32ef18fce
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/actions/generate-image.ts
@@ -0,0 +1,55 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../auth';
+import { robollyApi } from '../common/api';
+import { robollyProps } from '../common/props';
+import { generateImageOutputSchema } from '../output-schemas';
+
+const formatOptions = [
+ { label: 'JPG', value: 'jpg' },
+ { label: 'PNG', value: 'png' },
+ { label: 'PDF', value: 'pdf' },
+];
+
+export const generateImageAction = createAction({
+ description: 'Generate an image using Robolly',
+ audience: 'human',
+ aiMetadata: {
+ description:
+ "Renders a personalized asset (JPG, PNG, or PDF, set via the format input) from a Robolly template by filling its template fields with the supplied values, plus any extra modifications. Use when an agent needs to produce a finished image/PDF from a design template; requires a template ID and the values for that template's accepted fields. Each call produces a new render and consumes a generation, so it is not idempotent.",
+ idempotent: false,
+ },
+ displayName: 'Generate Image',
+ name: 'generate_image',
+ outputSchema: generateImageOutputSchema,
+ classification: 'READ',
+ auth: robollyAuth,
+ props: {
+ template_id: robollyProps.templateId({ required: true }),
+ format: Property.StaticDropdown({
+ displayName: 'Format',
+ required: true,
+ description: 'The format of the image to generate.',
+ defaultValue: 'jpg',
+ options: {
+ options: formatOptions,
+ },
+ }),
+ fields: robollyProps.templateFields({ required: true }),
+ modifications: Property.Object({
+ displayName: 'Extra Modifications',
+ description:
+ 'The extra modifications to apply to the image. See "Detailed dynamic modifications" in https://robolly.com/docs/api-reference/',
+ required: false,
+ }),
+ },
+ async run({ auth, propsValue }) {
+ return await robollyApi.renderTemplate({
+ auth,
+ templateId: propsValue.template_id,
+ format: propsValue.format,
+ modifications: propsValue.modifications,
+ fields: propsValue.fields,
+ });
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/auth.ts b/packages/pieces/community/robolly/src/lib/auth.ts
new file mode 100644
index 00000000000..de01ca55286
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/auth.ts
@@ -0,0 +1,30 @@
+import { AppConnectionType, PieceAuth, tryCatch } from '@activepieces/pieces-framework';
+
+import { robollyApi } from './common/api';
+
+const markdownDescription = `
+To get your API key:
+1. Log in to [Robolly](https://robolly.com/dashboard/).
+2. Open your project and go to **API**.
+3. Copy the API key and paste it here.
+`;
+
+export const robollyAuth = PieceAuth.SecretText({
+ description: markdownDescription,
+ displayName: 'API Key',
+ required: true,
+ validate: async ({ auth }) => {
+ const { error } = await tryCatch(() =>
+ robollyApi.listTemplates({
+ auth: { type: AppConnectionType.SECRET_TEXT, secret_text: auth },
+ }),
+ );
+ if (error) {
+ return {
+ valid: false,
+ error: 'Invalid API key. Copy it again from your Robolly project → API.',
+ };
+ }
+ return { valid: true };
+ },
+});
diff --git a/packages/pieces/community/robolly/src/lib/common/ai-props.ts b/packages/pieces/community/robolly/src/lib/common/ai-props.ts
new file mode 100644
index 00000000000..7d0f89a8a86
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/common/ai-props.ts
@@ -0,0 +1,64 @@
+import { Property } from '@activepieces/pieces-framework';
+
+import type { PropParams } from './props';
+
+function templateId<R extends boolean>({
+ required,
+ displayName = 'Template ID',
+ description = 'The template ID, e.g. "6416bcbab241242aa0b22ecb". Use List Templates to find it.',
+}: PropParams<R>) {
+ return Property.ShortText({ displayName, description, required });
+}
+
+function modifications<R extends boolean>({
+ required,
+ displayName = 'Modifications',
+ description = 'Element values keyed by element name, e.g. {"title": "Hello", "image": "https://…/photo.jpg"}. Use "<element>.<property>" keys for detailed changes, e.g. {"title.textColor": "red"}. Use List Template Elements to get the keys.',
+}: PropParams<R>) {
+ return Property.Object({ displayName, description, required });
+}
+
+function templateFields() {
+ return {
+ artboardWidth: Property.Number({
+ displayName: 'Width',
+ description: 'Canvas width in pixels.',
+ required: false,
+ }),
+ artboardHeight: Property.Number({
+ displayName: 'Height',
+ description: 'Canvas height in pixels.',
+ required: false,
+ }),
+ backgroundColor: Property.ShortText({
+ displayName: 'Background Color',
+ description: 'Canvas background color as a CSS color, e.g. "rgb(27, 61, 166)" or "#1b3da6".',
+ required: false,
+ }),
+ path: Property.ShortText({
+ displayName: 'Folder Path',
+ description:
+ 'An existing folder in the Robolly dashboard to list the template under. Robolly rejects a folder that does not exist.',
+ required: false,
+ }),
+ renderFileName: Property.ShortText({
+ displayName: 'Render File Name',
+ description: 'The file name given to rendered files.',
+ required: false,
+ }),
+ disallowNotSigned: Property.StaticDropdown({
+ displayName: 'Require Signed Render Links',
+ description:
+ 'Yes rejects render links that have neither a signature nor an API key. Leave empty to keep the current setting.',
+ required: false,
+ options: {
+ options: [
+ { label: 'Yes', value: true },
+ { label: 'No', value: false },
+ ],
+ },
+ }),
+ };
+}
+
+export const robollyAiProps = { templateId, modifications, templateFields };
diff --git a/packages/pieces/community/robolly/src/lib/common/api.ts b/packages/pieces/community/robolly/src/lib/common/api.ts
new file mode 100644
index 00000000000..6c2588b3f56
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/common/api.ts
@@ -0,0 +1,254 @@
+import { createHmac } from 'node:crypto';
+
+import { HttpMethod, QueryParams } from '@activepieces/pieces-common';
+
+import { robollyClient } from './client';
+
+import type {
+ RobollyAcceptedModification,
+ RobollyAcceptedModificationsResponse,
+ RobollyAuthValue,
+ RobollyRender,
+ RobollyRendersPage,
+ RobollyTemplate,
+ RobollyTemplateFields,
+ RobollyTemplatesResponse,
+} from './types';
+
+async function listTemplates({ auth }: { auth: RobollyAuthValue }): Promise<RobollyTemplate[]> {
+ const response = await robollyClient.request<RobollyTemplatesResponse>({
+ auth,
+ method: HttpMethod.GET,
+ path: '/v1/templates',
+ });
+ return response.templates;
+}
+
+async function getAcceptedModifications({
+ auth,
+ templateId,
+}: {
+ auth: RobollyAuthValue;
+ templateId: string;
+}): Promise<RobollyAcceptedModificationsResponse> {
+ return await robollyClient.request<RobollyAcceptedModificationsResponse>({
+ auth,
+ method: HttpMethod.GET,
+ path: `/v1/templates/${templateId}/accepted-modifications`,
+ });
+}
+
+async function listAcceptedModifications({
+ auth,
+ templateId,
+}: {
+ auth: RobollyAuthValue;
+ templateId: string;
+}): Promise<RobollyAcceptedModification[]> {
+ const response = await getAcceptedModifications({ auth, templateId });
+ return response.acceptedModifications;
+}
+
+async function listGalleryTemplates({
+ auth,
+ cursor,
+}: {
+ auth: RobollyAuthValue;
+ cursor: string | undefined;
+}): Promise<unknown> {
+ return await robollyClient.request<unknown>({
+ auth,
+ method: HttpMethod.GET,
+ path: '/v1/templates-gallery',
+ query: toQuery({ values: { paginationCursorNext: cursor } }),
+ });
+}
+
+async function createTemplate({
+ auth,
+ fields,
+}: {
+ auth: RobollyAuthValue;
+ fields: RobollyTemplateFields & { name: string };
+}): Promise<unknown> {
+ return await robollyClient.request<unknown>({
+ auth,
+ method: HttpMethod.POST,
+ path: '/v1/templates',
+ body: definedOnly({ values: fields }),
+ });
+}
+
+async function updateTemplate({
+ auth,
+ templateId,
+ fields,
+}: {
+ auth: RobollyAuthValue;
+ templateId: string;
+ fields: RobollyTemplateFields;
+}): Promise<void> {
+ await robollyClient.request<unknown>({
+ auth,
+ method: HttpMethod.PATCH,
+ path: `/v1/templates/${templateId}`,
+ body: definedOnly({ values: fields }),
+ });
+}
+
+async function renderTemplate({
+ auth,
+ templateId,
+ format,
+ modifications,
+ fields,
+}: RenderTemplateParams): Promise<unknown> {
+ const query: QueryParams = {
+ json: '',
+ ...Object.fromEntries(
+ Object.entries(modifications ?? {}).map(([key, value]) => [key, String(value)]),
+ ),
+ ...Object.fromEntries(
+ Object.entries(fields)
+ .filter(([, value]) => value !== '')
+ .map(([key, value]) => [key, String(value)]),
+ ),
+ };
+ return await robollyClient.request<unknown>({
+ auth,
+ method: HttpMethod.GET,
+ path: `/templates/${templateId}/render/${format}`,
+ query,
+ body: modifications,
+ });
+}
+
+async function renderTemplateLink({
+ auth,
+ templateId,
+ format,
+ modifications,
+ options,
+}: RenderTemplateLinkParams): Promise<unknown> {
+ return await robollyClient.request<unknown>({
+ auth,
+ method: HttpMethod.GET,
+ path: `/templates/${templateId}/render.${format}`,
+ query: {
+ ...toQuery({ values: modifications ?? {} }),
+ ...toQuery({ values: options }),
+ json: '1',
+ },
+ });
+}
+
+function createHiddenRenderLink({
+ auth,
+ templateId,
+ format,
+ modifications,
+}: {
+ auth: RobollyAuthValue;
+ templateId: string;
+ format: string;
+ modifications: Record<string, unknown> | undefined;
+}): { url: string } {
+ const unsignedQuery = new URLSearchParams({
+ template: templateId,
+ ...toQuery({ values: modifications ?? {} }),
+ }).toString();
+ const sig = createHmac('sha256', auth.secret_text)
+ .update(`${templateId}:${format}:${unsignedQuery}`)
+ .digest('hex');
+ const query = `${unsignedQuery}&sig=${sig}`;
+ const encoded = Buffer.from(query, 'utf8').toString('base64url');
+ return { url: `${robollyClient.baseUrl()}/rd/${encoded}.${format}` };
+}
+
+async function listRenders({
+ auth,
+ renderId,
+ cursor,
+ templateId,
+ movieId,
+ cacheHash,
+}: {
+ auth: RobollyAuthValue;
+ renderId?: string;
+ cursor?: string;
+ templateId?: string;
+ movieId?: string;
+ cacheHash?: string;
+}): Promise<RobollyRendersPage> {
+ return await robollyClient.request<RobollyRendersPage>({
+ auth,
+ method: HttpMethod.GET,
+ path: '/v1/renders',
+ query: toQuery({
+ values: {
+ id: renderId,
+ paginationCursorNext: cursor,
+ filterTemplateIds: templateId,
+ filterMovieIds: movieId,
+ cacheHash,
+ },
+ }),
+ });
+}
+
+async function getRender({
+ auth,
+ renderId,
+}: {
+ auth: RobollyAuthValue;
+ renderId: string;
+}): Promise<RobollyRender> {
+ const page = await listRenders({ auth, renderId });
+ const render = (page.data ?? page.value ?? [])[0];
+ if (!render) {
+ throw new Error(`Render "${renderId}" was not found.`);
+ }
+ return render;
+}
+
+function definedOnly({ values }: { values: Record<string, unknown> }): Record<string, unknown> {
+ return Object.fromEntries(Object.entries(values).filter(([, value]) => value !== undefined));
+}
+
+function toQuery({ values }: { values: Record<string, unknown> }): QueryParams {
+ return Object.fromEntries(
+ Object.entries(values)
+ .filter(([, value]) => value !== undefined)
+ .map(([key, value]) => [key, String(value)]),
+ );
+}
+
+export const robollyApi = {
+ listTemplates,
+ getAcceptedModifications,
+ listAcceptedModifications,
+ listGalleryTemplates,
+ createTemplate,
+ updateTemplate,
+ renderTemplate,
+ renderTemplateLink,
+ createHiddenRenderLink,
+ listRenders,
+ getRender,
+};
+
+type RenderTemplateParams = {
+ auth: RobollyAuthValue;
+ templateId: string;
+ format: string;
+ modifications: Record<string, unknown> | undefined;
+ fields: Record<string, unknown>;
+};
+
+type RenderTemplateLinkParams = {
+ auth: RobollyAuthValue;
+ templateId: string;
+ format: string;
+ modifications: Record<string, unknown> | undefined;
+ options: { scale?: number; q?: number; dpi?: number; fps?: number; duration?: number };
+};
diff --git a/packages/pieces/community/robolly/src/lib/common/client.ts b/packages/pieces/community/robolly/src/lib/common/client.ts
new file mode 100644
index 00000000000..756c0d600f4
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/common/client.ts
@@ -0,0 +1,30 @@
+import { HttpMethod, httpClient, QueryParams } from '@activepieces/pieces-common';
+
+import type { RobollyAuthValue } from './types';
+
+function baseUrl(): string {
+ return 'https://api.robolly.com';
+}
+
+async function request<T>({ auth, method, path, query, body }: RequestParams): Promise<T> {
+ const response = await httpClient.sendRequest<T>({
+ method,
+ url: `${baseUrl()}${path}`,
+ headers: {
+ Authorization: `Bearer ${auth.secret_text}`,
+ },
+ queryParams: query,
+ body,
+ });
+ return response.body;
+}
+
+export const robollyClient = { baseUrl, request };
+
+type RequestParams = {
+ auth: RobollyAuthValue;
+ method: HttpMethod;
+ path: string;
+ query?: QueryParams;
+ body?: unknown;
+};
diff --git a/packages/pieces/community/robolly/src/lib/common/props.ts b/packages/pieces/community/robolly/src/lib/common/props.ts
new file mode 100644
index 00000000000..67f16718350
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/common/props.ts
@@ -0,0 +1,80 @@
+import {
+ DropdownState,
+ DynamicPropsValue,
+ Property,
+ tryCatch,
+} from '@activepieces/pieces-framework';
+
+import { robollyAuth } from '../auth';
+import { robollyApi } from './api';
+
+function templateId<R extends boolean>({
+ required,
+ displayName = 'Template',
+ description = 'Select your template. (If you want to use Template ID. Click on the "(x)" above this field. Template ID can be found by opening a template and going to “Render”. Being there copy the template ID from the top right.)',
+}: PropParams<R>) {
+ return Property.Dropdown({
+ auth: robollyAuth,
+ displayName,
+ description,
+ required,
+ refreshers: [],
+ options: async ({ auth }) => {
+ if (!auth) {
+ return disabledOptions({ placeholder: 'Enter your API key first' });
+ }
+ const { data: options, error } = await tryCatch(async () => {
+ const templates = await robollyApi.listTemplates({ auth });
+ return templates.map((template) => ({ label: template.name, value: template.id }));
+ });
+ if (error) {
+ return disabledOptions({ placeholder: "Couldn't load templates, API key is invalid" });
+ }
+ return { disabled: false, options };
+ },
+ });
+}
+
+function templateFields<R extends boolean>({
+ required,
+ displayName = 'Values',
+ description = 'The values to apply to the fields in the template.',
+}: PropParams<R>) {
+ return Property.DynamicProperties({
+ auth: robollyAuth,
+ displayName,
+ description,
+ required,
+ refreshers: ['template_id'],
+ props: async ({ auth, template_id }): Promise<DynamicPropsValue> => {
+ if (!auth) return {};
+ if (!template_id) return {};
+ const modifications = await robollyApi.listAcceptedModifications({
+ auth,
+ templateId: String(template_id),
+ });
+ return Object.fromEntries(
+ modifications.map((field) => [
+ field.key,
+ Property.ShortText({
+ displayName: field.key,
+ description: `Type: ${field.type}`,
+ required: false,
+ }),
+ ]),
+ );
+ },
+ });
+}
+
+function disabledOptions({ placeholder }: { placeholder: string }): DropdownState<never> {
+ return { disabled: true, options: [], placeholder };
+}
+
+export const robollyProps = { templateId, templateFields };
+
+export type PropParams<R extends boolean> = {
+ required: R;
+ displayName?: string;
+ description?: string;
+};
diff --git a/packages/pieces/community/robolly/src/lib/common/types.ts b/packages/pieces/community/robolly/src/lib/common/types.ts
new file mode 100644
index 00000000000..a102c27b4f1
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/common/types.ts
@@ -0,0 +1,34 @@
+import type { AppConnectionType } from '@activepieces/pieces-framework';
+
+export type RobollyAuthValue = { type: AppConnectionType.SECRET_TEXT; secret_text: string };
+
+export type RobollyTemplate = { id: string; name: string };
+export type RobollyAcceptedModification = { key: string; type: string };
+export type RobollyTemplatesResponse = { templates: RobollyTemplate[] };
+export type RobollyAcceptedModificationsResponse = {
+ acceptedModifications: RobollyAcceptedModification[];
+};
+export type RobollyRender = {
+ id: string;
+ status?: string;
+ templateId?: string;
+ file?: string;
+ preview?: string;
+ createdAt?: string;
+};
+export type RobollyRendersPage = {
+ hasMore?: boolean;
+ paginationCursorNext?: string | null;
+ paginationCursorPrevious?: string | null;
+ data?: RobollyRender[];
+ value?: RobollyRender[];
+};
+export type RobollyTemplateFields = {
+ name?: string;
+ artboardWidth?: number;
+ artboardHeight?: number;
+ backgroundColor?: string;
+ path?: string;
+ renderFileName?: string;
+ disallowNotSigned?: boolean;
+};
diff --git a/packages/pieces/community/robolly/src/lib/output-schemas.ts b/packages/pieces/community/robolly/src/lib/output-schemas.ts
new file mode 100644
index 00000000000..759326f3f72
--- /dev/null
+++ b/packages/pieces/community/robolly/src/lib/output-schemas.ts
@@ -0,0 +1,207 @@
+import { OutputSchema } from '@activepieces/pieces-framework';
+
+const renderResultFields: OutputSchema['fields'] = [
+ { key: 'status', label: 'Status' },
+ { key: 'url', label: 'File URL', format: 'url' },
+ { key: 'fileName', label: 'File Name' },
+ { key: 'self', label: 'Render Link', format: 'url' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+];
+
+const renderFields: OutputSchema['fields'] = [
+ { key: 'id', label: 'Render ID' },
+ { key: 'status', label: 'Status' },
+ { key: 'file', label: 'File URL', format: 'url' },
+ { key: 'preview', label: 'Preview', format: 'image' },
+ { key: 'templateId', label: 'Template ID' },
+ { key: 'organizationId', label: 'Organization ID' },
+ { key: 'renderSource', label: 'Render Source' },
+ { key: 'cacheHash', label: 'Cache Hash' },
+ {
+ key: 'modifications',
+ label: 'Modifications',
+ labelKey: 'target',
+ listItems: [
+ { key: 'target', label: 'Target' },
+ { key: 'value', label: 'Value' },
+ ],
+ },
+ { key: 'formatType', label: 'Format' },
+ { key: 'fileName', label: 'File Name' },
+ { key: 'size', label: 'Size', format: 'filesize' },
+ { key: 'width', label: 'Width', format: 'number' },
+ { key: 'height', label: 'Height', format: 'number' },
+ {
+ key: 'assetsLoaded',
+ label: 'Assets Loaded',
+ labelKey: 'name',
+ listItems: [
+ { key: 'name', label: 'Name' },
+ { key: 'duration', label: 'Load Time', format: 'duration' },
+ { key: 'state', label: 'State' },
+ ],
+ },
+ { key: 'hits', label: 'Hits', format: 'number' },
+ { key: 'renderCost', label: 'Render Cost (Credits)', format: 'number' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+];
+
+export const robollyUpdateTemplateOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'templateId', label: 'Template ID' },
+ ],
+};
+
+export const robollyCreateTemplateOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'Template ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'organizationId', label: 'Organization ID' },
+ { key: 'artboardWidth', label: 'Width', format: 'number' },
+ { key: 'artboardHeight', label: 'Height', format: 'number' },
+ { key: 'backgroundColor', label: 'Background Color' },
+ { key: 'renderFileName', label: 'Render File Name' },
+ { key: 'disallowNotSigned', label: 'Require Signed Render Links', format: 'boolean' },
+ { key: 'nodes', label: 'Elements' },
+ { key: 'modificationsPresets', label: 'Modification Presets' },
+ { key: 'previewState', label: 'Preview State' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'updatedAt', label: 'Updated At', format: 'datetime' },
+ ],
+};
+
+export const robollyListTemplateElementsOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'acceptedModifications',
+ label: 'Elements',
+ labelKey: 'key',
+ listItems: [
+ { key: 'key', label: 'Element Name' },
+ { key: 'elementType', label: 'Element Type' },
+ { key: 'type', label: 'Value Type' },
+ { key: 'detailedModificationKeys', label: 'Detailed Modification Keys' },
+ ],
+ },
+ { key: 'scope', label: 'Scope' },
+ {
+ key: 'baseModificationBehavior',
+ label: 'Base Modification Behavior',
+ dynamicKey: true,
+ },
+ {
+ key: 'detailedModifications',
+ label: 'Detailed Modifications',
+ children: [
+ { key: 'syntax', label: 'Syntax' },
+ { key: 'note', label: 'Note' },
+ { key: 'constraintsNote', label: 'Constraints Note' },
+ { key: 'arrayIndexPlaceholder', label: 'Array Index Placeholder' },
+ { key: 'keys', label: 'Property Keys' },
+ {
+ key: 'properties',
+ label: 'Properties',
+ dynamicKey: true,
+ },
+ {
+ key: 'examples',
+ label: 'Examples',
+ labelKey: 'key',
+ listItems: [
+ { key: 'key', label: 'Key' },
+ { key: 'value', label: 'Value' },
+ { key: 'description', label: 'Description' },
+ ],
+ },
+ ],
+ },
+ ],
+};
+
+export const robollyListGalleryTemplatesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'templates',
+ label: 'Templates',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'Template ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'tags', label: 'Tags' },
+ { key: 'artboardWidth', label: 'Width', format: 'number' },
+ { key: 'artboardHeight', label: 'Height', format: 'number' },
+ { key: 'backgroundColor', label: 'Background Color' },
+ { key: 'previewUrl', label: 'Preview', format: 'image' },
+ {
+ key: 'modificationsPresets',
+ label: 'Modification Presets',
+ labelKey: 'name',
+ listItems: [
+ { key: 'name', label: 'Name' },
+ { key: 'previewUrl', label: 'Preview', format: 'image' },
+ ],
+ },
+ ],
+ },
+ { key: 'hasMore', label: 'Has More', format: 'boolean' },
+ { key: 'paginationCursorNext', label: 'Next Page Cursor' },
+ ],
+};
+
+export const generateImageOutputSchema: OutputSchema = {
+ fields: renderResultFields,
+};
+
+export const robollyGetRenderOutputSchema: OutputSchema = {
+ fields: renderFields,
+};
+
+export const robollyCreateHiddenRenderLinkOutputSchema: OutputSchema = {
+ fields: [{ key: 'url', label: 'Hidden Render Link', format: 'url' }],
+};
+
+export const robollyRenderTemplateOutputSchema: OutputSchema = {
+ fields: renderResultFields,
+};
+
+export const robollyListRendersOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'value',
+ label: 'Renders',
+ labelKey: 'id',
+ listItems: renderFields,
+ },
+ { key: 'hasMore', label: 'Has More', format: 'boolean' },
+ { key: 'paginationCursorNext', label: 'Next Page Cursor' },
+ { key: 'paginationCursorPrevious', label: 'Previous Page Cursor' },
+ ],
+};
+
+export const robollyListTemplatesOutputSchema: OutputSchema = {
+ fields: [
+ {
+ key: 'templates',
+ label: 'Templates',
+ labelKey: 'name',
+ listItems: [
+ { key: 'id', label: 'Template ID' },
+ { key: 'name', label: 'Name' },
+ { key: 'path', label: 'Folder Path' },
+ { key: 'artboardWidth', label: 'Width', format: 'number' },
+ { key: 'artboardHeight', label: 'Height', format: 'number' },
+ { key: 'backgroundColor', label: 'Background Color' },
+ { key: 'renderFileName', label: 'Render File Name' },
+ { key: 'disallowNotSigned', label: 'Require Signed Render Links', format: 'boolean' },
+ { key: 'previewUrl', label: 'Preview', format: 'image' },
+ { key: 'previewState', label: 'Preview State' },
+ { key: 'previewUpdatedAt', label: 'Preview Updated At', format: 'datetime' },
+ { key: 'transition', label: 'Transition' },
+ { key: 'createdAt', label: 'Created At', format: 'datetime' },
+ { key: 'updatedAt', label: 'Updated At', format: 'datetime' },
+ ],
+ },
+ { key: 'count', label: 'Count', format: 'number' },
+ ],
+};