{"id":22794245,"url":"https://github.com/rowyio/rowyactions","last_synced_at":"2025-04-18T23:42:53.747Z","repository":{"id":44507213,"uuid":"340534231","full_name":"rowyio/RowyActions","owner":"rowyio","description":"starter repo for managing Rowy actions columns (cloud functions)","archived":false,"fork":false,"pushed_at":"2022-02-10T06:57:24.000Z","size":350,"stargazers_count":10,"open_issues_count":2,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-12T16:13:13.576Z","etag":null,"topics":["cloudfunctions","firebase","gcp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rowyio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-20T01:39:53.000Z","updated_at":"2024-07-30T09:41:40.000Z","dependencies_parsed_at":"2022-08-26T14:04:15.415Z","dependency_job_id":null,"html_url":"https://github.com/rowyio/RowyActions","commit_stats":null,"previous_names":["shamsmosowi/firetableactions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowyio%2FRowyActions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowyio%2FRowyActions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowyio%2FRowyActions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rowyio%2FRowyActions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rowyio","download_url":"https://codeload.github.com/rowyio/RowyActions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249565262,"owners_count":21292427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudfunctions","firebase","gcp"],"created_at":"2024-12-12T04:07:44.590Z","updated_at":"2025-04-18T23:42:53.722Z","avatar_url":"https://github.com/rowyio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rowy Actions\n\n\nThis package provides a firebase cloud functions project with a callable cloud function wrapper that handles role permission and the required fields validation for [Rowy](https://github.com/rowyio/rowy) action columns.\n\n## Installation\n\n```\nyarn add rowy-actions\n```\n\n## Usage\n\nThis library can be used as an alternative to directly using [functions.https.onCall](https://firebase.google.com/docs/reference/functions/providers_https_#oncall) function to deploy a callable cloud functions for use in [Rowy](https://github.com/rowyio/rowy) [action fields](https://github.com/rowyio/rowy/wiki/Field-Types).\nIt can be installed and used in an existing firebase cloud functions project\n\n```javascript \n// import and intialize firebase admin SDK\nimport * as admin from \"firebase-admin\";\nadmin.initializeApp();\n\n\nimport callableAction from \"rowy-actions\";\nexport const ExampleCallableAction = callableAction(async ({row, callableData, context}) =\u003e{\n  const {ref, column, schemaDocPath, action} = callableData;\n  console.log({\n    row, // docSnapshot of the called column\n    context, // callable context contains data such as the time and the user running the action\n    ref, // contains document id and other references related to the row\n    column, // contains key of the action column\n    schemaDocPath, // table schema Doc Path\n    action, // latest action state\n  });\n\n  // switch statement can be used to perform different processes based on the state of the action cell\n  switch (action) {\n    case \"run\":\n    case \"undo\":\n    case \"redo\":\n    default:\n      break;\n  }\n\n  return {\n    success: true, // return if the operation was success\n    message: \"hello world\", // message shown in snackbar on Rowy after the completion of action\n    cellStatus: \"greeted\", // optional cell label, to indicate the latest state of the cell/row\n    newState: \"redo\", // \"redo\" | \"undo\" | \"disabled\" are options set the behavior of action button next time it runs\n  };\n});\n\n\n```\n\n\n\n\n## Demo\n\nTo experiment with this package you can clone this repo then modify the example [here](https://github.com/rowyio/RowyActions/blob/master/functions/src/index.ts).\n\n```\ngit clone https://github.com/rowyio/RowyActions\ncd RowyActions/functions\nyarn install\nfirebase deploy --only functions --project [projectId]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frowyio%2Frowyactions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frowyio%2Frowyactions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frowyio%2Frowyactions/lists"}