@chisquare-tech/origine-ngx-apps-code 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chisquare-tech/origine-ngx-apps-code",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Origine's Code module screens: repositories, files, commits, branches, pull requests and review, repository settings.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,6 +54,8 @@ interface Repo {
54
54
  empty: boolean;
55
55
  capabilities: string[];
56
56
  readOnly?: boolean;
57
+ /** The caller's collaborator permission on this repository (read, write or maintain), if any. */
58
+ collaborator?: string;
57
59
  createdAt?: string;
58
60
  }
59
61
  interface GitPerson {
@@ -175,6 +177,15 @@ interface Ref {
175
177
  merged: boolean;
176
178
  canDelete: boolean;
177
179
  }
180
+ /** A repository collaborator (DEV-06): access beyond the project role, for one repository. */
181
+ interface Collaborator {
182
+ repoId: string;
183
+ userId: string;
184
+ permission: 'read' | 'write' | 'maintain';
185
+ projectRole: string;
186
+ addedBy: string;
187
+ createdAt: string;
188
+ }
178
189
  /** A file on a release (DEV-15). */
179
190
  interface ReleaseAsset {
180
191
  id: string;
@@ -411,6 +422,9 @@ declare class CodeApi {
411
422
  }): Observable<FileDiff>;
412
423
  compare(project: string, name: string, base: string, head: string): Observable<Comparison>;
413
424
  refs(project: string, name: string, kind?: 'branch' | 'tag', q?: string): Observable<Ref[]>;
425
+ collaborators(project: string, name: string): Observable<Collaborator[]>;
426
+ setCollaborator(project: string, name: string, userId: string, permission: string): Observable<Collaborator>;
427
+ removeCollaborator(project: string, name: string, userId: string): Observable<unknown>;
414
428
  createTag(project: string, name: string, tag: string, target: string): Observable<Ref>;
415
429
  deleteTag(project: string, name: string, tag: string): Observable<unknown>;
416
430
  releases(project: string, name: string): Observable<Release[]>;
@@ -524,6 +538,8 @@ declare abstract class RepoPage {
524
538
  protected readonly people: _angular_core.Signal<People>;
525
539
  protected readonly canWrite: _angular_core.Signal<boolean>;
526
540
  protected readonly canAdmin: _angular_core.Signal<boolean>;
541
+ /** Repository settings short of a rename, the visibility and deletion: Maintainers, and maintain collaborators. */
542
+ protected readonly canMaintain: _angular_core.Signal<boolean>;
527
543
  protected readonly canProtect: _angular_core.Signal<boolean>;
528
544
  constructor();
529
545
  /** Called with the repository once it has loaded (and again after it changes). */
@@ -1006,6 +1022,18 @@ declare class RepoSettingsPage extends RepoPage {
1006
1022
  hint: string;
1007
1023
  }[];
1008
1024
  constructor();
1025
+ protected readonly collabs: _angular_core.WritableSignal<Collaborator[]>;
1026
+ protected readonly perms: {
1027
+ id: string;
1028
+ label: string;
1029
+ }[];
1030
+ protected readonly addable: _angular_core.Signal<_chisquare_tech_origine_ngx_apps_code.CodePerson[]>;
1031
+ protected newCollab: string;
1032
+ protected newPerm: string;
1033
+ protected roleLabel(r: string): string;
1034
+ private loadCollabs;
1035
+ protected setCollab(userId: string, permission: string, adding?: boolean): void;
1036
+ protected removeCollab(userId: string): void;
1009
1037
  protected onRepo(r: Repo): void;
1010
1038
  protected go(s: Section): void;
1011
1039
  protected max0(n: number): number;
@@ -1071,4 +1099,4 @@ declare class ReleasesPage extends RepoPage {
1071
1099
  }
1072
1100
 
1073
1101
  export { BranchesPage, CodeApi, CodeHost, CommitPage, CommitsPage, CurrentRepo, CurrentRepoPage, DiffView, FilePage, NewRepoPage, People, PullPage, PullsPage, RefPicker, ReleasesPage, RepoHomePage, RepoPage, RepoSettingsPage, ReposPage, TOKEN_CSS, ago, apiMessage, checkDot, copy, dayLabel, initials, langColour, pair, shortDate, size };
1074
- export type { BlameHunk, Blob, CheckStatus, CodePerson, CodeProject, Commit, CommitDetail, Comparison, DiffHunk, DiffLine, Entry, FileChange, FileDiff, Gate, GateRow, GitPerson, Language, LineComment, NewComment, PRComment, Protection, Pull, PullBrief, Ref, Release, ReleaseAsset, ReleaseInput, Repo, Review, ReviewBrief, SplitRow, Thread, ThreadReply, Timeline, Tree };
1102
+ export type { BlameHunk, Blob, CheckStatus, CodePerson, CodeProject, Collaborator, Commit, CommitDetail, Comparison, DiffHunk, DiffLine, Entry, FileChange, FileDiff, Gate, GateRow, GitPerson, Language, LineComment, NewComment, PRComment, Protection, Pull, PullBrief, Ref, Release, ReleaseAsset, ReleaseInput, Repo, Review, ReviewBrief, SplitRow, Thread, ThreadReply, Timeline, Tree };