{"id":20597765,"url":"https://github.com/triggerdotdev/api-reference","last_synced_at":"2025-04-15T00:16:10.113Z","repository":{"id":200709096,"uuid":"706112555","full_name":"triggerdotdev/api-reference","owner":"triggerdotdev","description":"This repository provides job code samples that use either SDKs or the fetch method to interact with external APIs and Trigger.dev. ","archived":false,"fork":false,"pushed_at":"2024-02-15T15:44:23.000Z","size":320,"stargazers_count":7,"open_issues_count":1,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-15T00:15:54.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://trigger.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/triggerdotdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-17T10:25:37.000Z","updated_at":"2024-09-19T09:39:49.000Z","dependencies_parsed_at":"2023-12-20T07:24:30.465Z","dependency_job_id":"18209753-944d-4030-9d6a-814cf640993d","html_url":"https://github.com/triggerdotdev/api-reference","commit_stats":null,"previous_names":["triggerdotdev/api-reference"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triggerdotdev%2Fapi-reference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triggerdotdev%2Fapi-reference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triggerdotdev%2Fapi-reference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triggerdotdev%2Fapi-reference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triggerdotdev","download_url":"https://codeload.github.com/triggerdotdev/api-reference/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981268,"owners_count":21193147,"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":["hacktoberfest"],"created_at":"2024-11-16T08:23:54.279Z","updated_at":"2025-04-15T00:16:10.092Z","avatar_url":"https://github.com/triggerdotdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/a45d1fa2-0ae8-4a39-4409-f4f934bfae00/public\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/3f5ad4c1-c4c8-4277-b622-290e7f37bd00/public\"\u003e\n  \u003cimg alt=\"Trigger.dev logo\" src=\"https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/a45d1fa2-0ae8-4a39-4409-f4f934bfae00/public\"\u003e\n\u003c/picture\u003e\n\n---\n\n# Trigger.dev API references\n\nThis repository provides job code samples that use either SDKs or the `fetch` method to interact with external APIs and Trigger.dev. Refer to these examples if you're working with APIs that don't have an official Trigger.dev integration yet.\n\nFor a full list of our official supported integrations please refer to [our integration docs](https://trigger.dev/docs/integrations/introduction):\n\n## About Trigger.dev\n\nTrigger.dev is a framework for creating long-running Jobs directly in your Next.js app with API integrations, webhooks, scheduling and delays. You can reliably run Jobs that wouldn’t normally work in serverless environments (like Vercel) because of timeouts.\n\n## Jobs in this repo:\n\nThese jobs can be run locally using the `@trigger.dev/cli` and `@trigger.dev/express` packages.\n\n## Setup: how to use this repo\n\nYou will need to create a `.env` file. You can duplicate the contents of `.env.example` file and set your local (Dev 'server') `TRIGGER_API_KEY` value. You can find your API key in your project's integrations page [in the app](https://cloud.trigger.dev). Add other API keys as needed.\n\n### Install packages\n\nFirst, install the packages:\n\n```sh\nnpm i\n```\n\n### Running a job\n\nEach file in `src` is either a Job or a separate set of jobs that can be run separately. For example, the `src/cronScheduledBasic.ts` file can be run with:\n\n```sh\nnpm run github\n```\n\nThis will open up a local server using `express` on port 8080. Then in a \u003cu\u003eseparate terminal window\u003c/u\u003e you can run the `@trigger.dev/cli dev` command:\n\n```sh\nnpm run dev:trigger\n```\n\n### Contributors guide\n\nYou can add a new file to `src` with it's own `TriggerClient` and set of jobs (e.g. `src/events.ts`)\n\n```ts\nimport { TriggerClient, eventTrigger } from \"@trigger.dev/sdk\";\nimport { createExpressServer } from \"@trigger.dev/express\";\nimport { z } from \"zod\";\n\nexport const client = new TriggerClient({ id: \"api-reference\" });\n\nclient.defineJob({\n  id: \"example-job\",\n  name: \"Example Job\",\n  version: \"1.0.0\",\n  trigger: eventTrigger({\n    name: \"example.one\",\n  }),\n  run: async (payload, io, ctx) =\u003e {},\n});\n\ncreateExpressServer(client);\n```\n\nThen add a new script in [`package.json`](./package.json):\n\n```json\n{\n  \"scripts\": {\n    \"events\": \"nodemon --watch src/events.ts -r tsconfig-paths/register -r dotenv/config src/events.ts\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriggerdotdev%2Fapi-reference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriggerdotdev%2Fapi-reference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriggerdotdev%2Fapi-reference/lists"}