{"id":15427781,"url":"https://github.com/open-frames/types","last_synced_at":"2025-04-19T16:34:14.271Z","repository":{"id":221623394,"uuid":"754902110","full_name":"open-frames/types","owner":"open-frames","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-30T21:44:05.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-29T10:11:28.152Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/open-frames.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2024-02-09T01:25:35.000Z","updated_at":"2024-06-01T21:14:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1b63348-9848-4415-84e9-5e48383eed22","html_url":"https://github.com/open-frames/types","commit_stats":{"total_commits":20,"total_committers":4,"mean_commits":5.0,"dds":0.55,"last_synced_commit":"d85ce34245a3f6ade976925a34f559e99a6052cd"},"previous_names":["open-frames/types"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-frames%2Ftypes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-frames%2Ftypes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-frames%2Ftypes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-frames%2Ftypes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-frames","download_url":"https://codeload.github.com/open-frames/types/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249738800,"owners_count":21318504,"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":[],"created_at":"2024-10-01T18:01:29.331Z","updated_at":"2025-04-19T16:34:14.220Z","avatar_url":"https://github.com/open-frames.png","language":"TypeScript","readme":"# Open Frames Types\n\nA shared set of types for all Open Frames implementations\n\n## Usage\n\n```ts\nimport {\n  OpenFramesUntrustedData,\n  OpenFramesTrustedData,\n  OpenFramesRequest,\n  ValidationResponse,\n  RequestValidator,\n} from \"@open-frames/types\";\n\ntype RequestType = {\n  clientProtocol: \"test\";\n  untrustedData: OpenFramesUntrustedData \u0026 { foo: string };\n  trustedData: OpenFramesTrustedData;\n};\n\ntype ValidationResponseType = {\n  foo: string;\n};\n\nclass ExampleValidator\n  implements RequestValidator\u003cRequestType, ValidationResponseType, \"test\"\u003e\n{\n  readonly protocolIdentifier = \"test\";\n\n  minProtocolVersion(): string {\n    return `${this.protocolIdentifier}@VNext`;\n  }\n\n  isSupported(payload: OpenFramesRequest): payload is RequestType {\n    return true;\n  }\n\n  async validate(\n    payload: RequestType\n  ): Promise\u003c\n    ValidationResponse\u003cValidationResponseType, typeof this.protocolIdentifier\u003e\n  \u003e {\n    return {\n      isValid: true,\n      clientProtocol: payload.clientProtocol,\n      message: { foo: payload.untrustedData.foo },\n    };\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-frames%2Ftypes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-frames%2Ftypes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-frames%2Ftypes/lists"}