-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
135 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
import {BaseCollection} from "./base_collection.js"; | ||
import {PermissionTemplate} from "../models/permission_template.js"; | ||
import type {TeamOnly} from "../types/index.js"; | ||
import type {PaginatedResult} from "../interfaces/index.js"; | ||
|
||
import type { PaginatedResult } from "../interfaces/index.js"; | ||
import { PermissionTemplate } from "../models/permission_template.js"; | ||
import type { TeamOnly } from "../types/index.js"; | ||
import { BaseCollection } from "./base_collection.js"; | ||
|
||
export class PermissionTemplates extends BaseCollection { | ||
protected static prefixURI = "teams/{!:team_id}/roles"; | ||
protected static elementClass = PermissionTemplate; | ||
protected static rootElementName = "roles" | ||
protected static prefixURI = "teams/{!:team_id}/roles"; | ||
protected static elementClass = PermissionTemplate; | ||
protected static rootElementName = "roles"; | ||
|
||
list( | ||
request_params: TeamOnly, | ||
): Promise<PaginatedResult<PermissionTemplate>> { | ||
return this.doList(request_params); | ||
} | ||
} | ||
list(request_params: TeamOnly): Promise<PaginatedResult<PermissionTemplate>> { | ||
return this.doList(request_params); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,80 @@ | ||
{ | ||
"roles": [ | ||
{ | ||
"id": 1, | ||
"role": "Localisation management", | ||
"permissions": [ | ||
"activity", | ||
"branches_main_modify", | ||
"branches_create", | ||
"branches_merge", | ||
"statistics", | ||
"tasks", | ||
"contributors", | ||
"settings", | ||
"manage_languages", | ||
"download", | ||
"upload", | ||
"glossary_delete", | ||
"glossary_edit", | ||
"manage_keys", | ||
"screenshots", | ||
"custom_status_modify" | ||
], | ||
"description": "Manage project settings, contributors and tasks", | ||
"tag": "Full access", | ||
"tagColor": "green", | ||
"doesEnableAllReadOnlyLanguages": true | ||
}, | ||
{ | ||
"id": 2, | ||
"role": "Developer", | ||
"permissions": [ | ||
"activity", | ||
"branches_main_modify", | ||
"branches_create", | ||
"download", | ||
"upload", | ||
"manage_keys", | ||
"screenshots" | ||
], | ||
"description": "Create keys, upload and download content", | ||
"tag": "Advanced", | ||
"tagColor": "cyan", | ||
"doesEnableAllReadOnlyLanguages": true | ||
}, | ||
{ | ||
"id": 3, | ||
"role": "Content creator", | ||
"permissions": [ | ||
"activity", | ||
"manage_keys", | ||
"manage_languages", | ||
"screenshots", | ||
"branches_main_modify" | ||
], | ||
"description": "Create, translate and edit keys, manage screenshots", | ||
"tag": "Advanced", | ||
"tagColor": "cyan", | ||
"doesEnableAllReadOnlyLanguages": true | ||
}, | ||
{ | ||
"id": 4, | ||
"role": "Reviewer", | ||
"permissions": [ | ||
"branches_main_modify", | ||
"review", | ||
"custom_status_modify" | ||
], | ||
"description": "Translate keys, control key statuses", | ||
"tag": "Basic", | ||
"tagColor": "grey", | ||
"doesEnableAllReadOnlyLanguages": false | ||
}, | ||
{ | ||
"id": 5, | ||
"role": "Translator", | ||
"permissions": [ | ||
"branches_main_modify" | ||
], | ||
"description": "Translate keys", | ||
"tag": "Basic", | ||
"tagColor": "grey", | ||
"doesEnableAllReadOnlyLanguages": false | ||
} | ||
] | ||
} | ||
"roles": [ | ||
{ | ||
"id": 1, | ||
"role": "Localisation management", | ||
"permissions": [ | ||
"activity", | ||
"branches_main_modify", | ||
"branches_create", | ||
"branches_merge", | ||
"statistics", | ||
"tasks", | ||
"contributors", | ||
"settings", | ||
"manage_languages", | ||
"download", | ||
"upload", | ||
"glossary_delete", | ||
"glossary_edit", | ||
"manage_keys", | ||
"screenshots", | ||
"custom_status_modify" | ||
], | ||
"description": "Manage project settings, contributors and tasks", | ||
"tag": "Full access", | ||
"tagColor": "green", | ||
"doesEnableAllReadOnlyLanguages": true | ||
}, | ||
{ | ||
"id": 2, | ||
"role": "Developer", | ||
"permissions": [ | ||
"activity", | ||
"branches_main_modify", | ||
"branches_create", | ||
"download", | ||
"upload", | ||
"manage_keys", | ||
"screenshots" | ||
], | ||
"description": "Create keys, upload and download content", | ||
"tag": "Advanced", | ||
"tagColor": "cyan", | ||
"doesEnableAllReadOnlyLanguages": true | ||
}, | ||
{ | ||
"id": 3, | ||
"role": "Content creator", | ||
"permissions": [ | ||
"activity", | ||
"manage_keys", | ||
"manage_languages", | ||
"screenshots", | ||
"branches_main_modify" | ||
], | ||
"description": "Create, translate and edit keys, manage screenshots", | ||
"tag": "Advanced", | ||
"tagColor": "cyan", | ||
"doesEnableAllReadOnlyLanguages": true | ||
}, | ||
{ | ||
"id": 4, | ||
"role": "Reviewer", | ||
"permissions": ["branches_main_modify", "review", "custom_status_modify"], | ||
"description": "Translate keys, control key statuses", | ||
"tag": "Basic", | ||
"tagColor": "grey", | ||
"doesEnableAllReadOnlyLanguages": false | ||
}, | ||
{ | ||
"id": 5, | ||
"role": "Translator", | ||
"permissions": ["branches_main_modify"], | ||
"description": "Translate keys", | ||
"tag": "Basic", | ||
"tagColor": "grey", | ||
"doesEnableAllReadOnlyLanguages": false | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { defineConfig } from 'tsup'; | ||
import { defineConfig } from "tsup"; | ||
|
||
export default defineConfig({ | ||
entry: ['src/main.ts'], | ||
outDir: 'dist', | ||
format: ['esm'], | ||
dts: true, | ||
splitting: false, | ||
shims: true, | ||
sourcemap: true, | ||
clean: true, | ||
entry: ["src/main.ts"], | ||
outDir: "dist", | ||
format: ["esm"], | ||
dts: true, | ||
splitting: false, | ||
shims: true, | ||
sourcemap: true, | ||
clean: true, | ||
}); |