{"id":25943464,"url":"https://github.com/tobitsoftware/chayns-uac-service","last_synced_at":"2026-04-19T07:39:16.677Z","repository":{"id":180137669,"uuid":"656557901","full_name":"TobitSoftware/chayns-uac-service","owner":"TobitSoftware","description":"Package for access uac service","archived":false,"fork":false,"pushed_at":"2025-02-17T17:16:17.000Z","size":166,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T18:28:41.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/TobitSoftware.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-06-21T07:27:27.000Z","updated_at":"2025-02-17T17:16:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0e503d7-995f-41d2-879c-a5a3e39798b6","html_url":"https://github.com/TobitSoftware/chayns-uac-service","commit_stats":null,"previous_names":["tobitsoftware/chayns-uac-service"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobitSoftware%2Fchayns-uac-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobitSoftware%2Fchayns-uac-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobitSoftware%2Fchayns-uac-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TobitSoftware%2Fchayns-uac-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TobitSoftware","download_url":"https://codeload.github.com/TobitSoftware/chayns-uac-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241801253,"owners_count":20022390,"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":"2025-03-04T07:16:47.497Z","updated_at":"2026-04-19T07:39:11.640Z","avatar_url":"https://github.com/TobitSoftware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## @chayns/uac-service\n\nWith this package Uac groups can be requested and edited. The package works in the frontend as well as in the node backend. In the background, the package uses protobuf for communication with the uac-service.\n\n### Installation in frontend projects\n\n1. Install package ```npm install @chayns/uac-service```\n2. Create instance of UacServiceClient (could be in separate js/ts file in your project)\n```js\nimport { getAccessToken, getLanguage, getSite, getUser } from 'chayns-api';\nexport const client = new UacServiceClient({\n    getToken: async () =\u003e ((await getAccessToken()).accessToken || \"\"),\n    getDefaultSiteId: () =\u003e getSite().id,\n    logger: logger, // your chayns logger instance\n    getDefaultPersonId: () =\u003e getUser()?.personId || \"\",\n    getLanguage: () =\u003e getLanguage().active\n});\n```\n\n### Installation in node projects\n\n1. Install package ```npm install @chayns/uac-service```\n2. Create instance of UacServiceClient (could be in separate js/ts file in your project)\n```js\nexport const client = new UacServiceClient({\n    getApiToken: async () =\u003e accessToken,\n    logger: logger, // your chayns logger instance\n});\n```\n\n### Usage in front and backend projects\n\nThese are just a few examples, there are many more functions. \n\n#### Create UserGroup\n```js\nconst { id } = await client.createUserGroup({ showName: 'test name', users:['GER-TDNKN'], description: 'Beschreibung'});\n```\n\n#### Get all usergroups from site\n```js\nconst result = await client.getUserGroups({ countUsers: true });\n```\n\n#### Get all users in group \n```js\nconst members = await client.getGroupMembers({ groupId: 1 });\n```\n\n#### Add user to group\n```js\nawait client.addUsersToGroup({ groupId: 1, members: [{personId: 'F69-1LT41'}] })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobitsoftware%2Fchayns-uac-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobitsoftware%2Fchayns-uac-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobitsoftware%2Fchayns-uac-service/lists"}