{"id":19420115,"url":"https://github.com/einride/protoc-gen-typescript-aip","last_synced_at":"2025-04-24T14:32:03.067Z","repository":{"id":37951239,"uuid":"362403056","full_name":"einride/protoc-gen-typescript-aip","owner":"einride","description":"Generates Typescript for gRPC APIs conforming to AIP https://aip.dev","archived":false,"fork":false,"pushed_at":"2024-12-16T20:36:06.000Z","size":2906,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-03T06:23:37.494Z","etag":null,"topics":["aip","protoc","typescript"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/einride.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-28T09:00:08.000Z","updated_at":"2024-10-12T04:58:04.000Z","dependencies_parsed_at":"2024-11-10T13:22:02.508Z","dependency_job_id":"5bb49fb4-f4ff-42d9-bac2-ffcf5e5779dd","html_url":"https://github.com/einride/protoc-gen-typescript-aip","commit_stats":{"total_commits":76,"total_committers":5,"mean_commits":15.2,"dds":0.368421052631579,"last_synced_commit":"133cba94146bf3d81e3de823d64fcee4f7e44fd9"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fprotoc-gen-typescript-aip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fprotoc-gen-typescript-aip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fprotoc-gen-typescript-aip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fprotoc-gen-typescript-aip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/einride","download_url":"https://codeload.github.com/einride/protoc-gen-typescript-aip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250643491,"owners_count":21464185,"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":["aip","protoc","typescript"],"created_at":"2024-11-10T13:21:11.164Z","updated_at":"2025-04-24T14:32:02.644Z","avatar_url":"https://github.com/einride.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protoc-gen-typescript-aip\n\nGenerates Typescript helpers for Protobuf APIs conforming to\n[AIP](https://aip.dev).\n\n### Install the plugin\n\n```bash\ngo get go.einride.tech/protoc-gen-typescript-aip\n```\n\nOr download a prebuilt binary from\n[releases](https://github.com/einride/protoc-gen-typescript-aip/releases).\n\n### Invocation\n\n#### protoc\n\n```bash\nprotoc \n  --typescript-aip_out [OUTPUT DIR] \\\n  [.proto files ...]\n```\n\n#### buf\n\n```yaml\nplugins:\n  - name: typescript-aip\n    out: [OUTPUT DIR]\n    strategy: all\n```\n\n### Configuration\n\n```\nfilename                Name of the file to generate the code to.\n                        Default: `index.ts`.\n\ninsertion_point         If non-empty, indicates that the named file should already exist,\n                        and the content here is to be inserted into that file at a defined \n                        insertion point. \n\nexclude_resource_definitions\n                        If set to true, resource names will not be generated for resource definitions\n                        in the file scope, only on messages. Default: false.\n```\n\n______________________________________________________________________\n\n## Features\n\n### Resource names\n\nGenerates helpers for working with resource names, based on\n[ResourceDescriptor](https://github.com/googleapis/googleapis/blob/master/google/api/resource.proto)\nannotations.\n\n#### Example\n\nA resource annotated with\n\n```proto\noption (google.api.resource) = {\n  type: \"account-example.einride.tech/User\"\n  pattern: \"tenants/{tenant}/users/{user}\"\n  singular: \"user\"\n  plural: \"users\"\n};\n```\n\ngenerates the following API\n\n```ts\n// Parsing a string:\nconst name = UserResourceName.parse(\"tenants/1/users/2\")\n\n// Getting variable segments:\nconsole.log(name.tenant);     // \"1\"\nconsole.log(name.user);       // \"2\"\n\n// Getting the string back:\nconsole.log(name.toString())  // \"tenants/1/users/2\"\n\n// Traversing the resource hierarchy:\nconst tenant = name.tenantResourceName();\nconsole.log(tenant.toString())  // \"tenants/1\"\n\n// Constructing the resource name from segments:\nconst name = UserResourceName.from(\"tenant\", \"user\")\nconsole.log(name.tenant)        // \"tenant\"\nconsole.log(name.user)          // \"user\"\nconsole.log(name.toString())    // \"tenants/tenant/users/user\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Fprotoc-gen-typescript-aip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feinride%2Fprotoc-gen-typescript-aip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Fprotoc-gen-typescript-aip/lists"}