declastruct-github 1.0.7 → 1.2.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/dist/access/daos/DeclaredGithubAppDao.d.ts +8 -0
- package/dist/access/daos/DeclaredGithubAppDao.js +32 -0
- package/dist/access/daos/DeclaredGithubAppDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubAppInstallationDao.d.ts +9 -0
- package/dist/access/daos/DeclaredGithubAppInstallationDao.js +33 -0
- package/dist/access/daos/DeclaredGithubAppInstallationDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubBranchDao.js +4 -4
- package/dist/access/daos/DeclaredGithubBranchDao.js.map +1 -1
- package/dist/access/daos/DeclaredGithubBranchProtectionDao.js +4 -4
- package/dist/access/daos/DeclaredGithubBranchProtectionDao.js.map +1 -1
- package/dist/access/daos/DeclaredGithubOrgDao.d.ts +10 -0
- package/dist/access/daos/DeclaredGithubOrgDao.js +44 -0
- package/dist/access/daos/DeclaredGithubOrgDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubOrgMemberPrivilegesDao.d.ts +10 -0
- package/dist/access/daos/DeclaredGithubOrgMemberPrivilegesDao.js +44 -0
- package/dist/access/daos/DeclaredGithubOrgMemberPrivilegesDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubOrgSecretDao.d.ts +10 -0
- package/dist/access/daos/DeclaredGithubOrgSecretDao.js +47 -0
- package/dist/access/daos/DeclaredGithubOrgSecretDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubOrgVariableDao.d.ts +9 -0
- package/dist/access/daos/DeclaredGithubOrgVariableDao.js +46 -0
- package/dist/access/daos/DeclaredGithubOrgVariableDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubRepoConfigDao.js +4 -4
- package/dist/access/daos/DeclaredGithubRepoConfigDao.js.map +1 -1
- package/dist/access/daos/DeclaredGithubRepoDao.js +4 -4
- package/dist/access/daos/DeclaredGithubRepoDao.js.map +1 -1
- package/dist/contract/sdks/index.d.ts +8 -0
- package/dist/contract/sdks/index.js +18 -3
- package/dist/contract/sdks/index.js.map +1 -1
- package/dist/domain.objects/DeclaredGithubApp.d.ts +75 -0
- package/dist/domain.objects/DeclaredGithubApp.js +16 -0
- package/dist/domain.objects/DeclaredGithubApp.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubAppInstallation.d.ts +61 -0
- package/dist/domain.objects/DeclaredGithubAppInstallation.js +16 -0
- package/dist/domain.objects/DeclaredGithubAppInstallation.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubAppPermissions.d.ts +130 -0
- package/dist/domain.objects/DeclaredGithubAppPermissions.js +12 -0
- package/dist/domain.objects/DeclaredGithubAppPermissions.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOrg.d.ts +59 -0
- package/dist/domain.objects/DeclaredGithubOrg.js +15 -0
- package/dist/domain.objects/DeclaredGithubOrg.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOrgMemberPrivileges.d.ts +85 -0
- package/dist/domain.objects/DeclaredGithubOrgMemberPrivileges.js +13 -0
- package/dist/domain.objects/DeclaredGithubOrgMemberPrivileges.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOrgSecret.d.ts +63 -0
- package/dist/domain.objects/DeclaredGithubOrgSecret.js +14 -0
- package/dist/domain.objects/DeclaredGithubOrgSecret.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOrgVariable.d.ts +54 -0
- package/dist/domain.objects/DeclaredGithubOrgVariable.js +13 -0
- package/dist/domain.objects/DeclaredGithubOrgVariable.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubOwner.d.ts +17 -0
- package/dist/domain.objects/DeclaredGithubOwner.js +8 -0
- package/dist/domain.objects/DeclaredGithubOwner.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubRepo.d.ts +1 -0
- package/dist/domain.objects/DeclaredGithubRepo.js +1 -0
- package/dist/domain.objects/DeclaredGithubRepo.js.map +1 -1
- package/dist/domain.objects/DeclaredGithubRepoConfig.d.ts +0 -4
- package/dist/domain.objects/DeclaredGithubRepoConfig.js.map +1 -1
- package/dist/domain.objects/DeclastructGithubProvider.d.ts +12 -0
- package/dist/domain.operations/app/castToDeclaredGithubApp.d.ts +12 -0
- package/dist/domain.operations/app/castToDeclaredGithubApp.js +134 -0
- package/dist/domain.operations/app/castToDeclaredGithubApp.js.map +1 -0
- package/dist/domain.operations/app/getOneApp.d.ts +15 -0
- package/dist/domain.operations/app/getOneApp.js +67 -0
- package/dist/domain.operations/app/getOneApp.js.map +1 -0
- package/dist/domain.operations/app/setApp.d.ts +13 -0
- package/dist/domain.operations/app/setApp.js +77 -0
- package/dist/domain.operations/app/setApp.js.map +1 -0
- package/dist/domain.operations/appInstallation/castToDeclaredGithubAppInstallation.d.ts +19 -0
- package/dist/domain.operations/appInstallation/castToDeclaredGithubAppInstallation.js +61 -0
- package/dist/domain.operations/appInstallation/castToDeclaredGithubAppInstallation.js.map +1 -0
- package/dist/domain.operations/appInstallation/deleteAppInstallation.d.ts +11 -0
- package/dist/domain.operations/appInstallation/deleteAppInstallation.js +30 -0
- package/dist/domain.operations/appInstallation/deleteAppInstallation.js.map +1 -0
- package/dist/domain.operations/appInstallation/getOneAppInstallation.d.ts +15 -0
- package/dist/domain.operations/appInstallation/getOneAppInstallation.js +92 -0
- package/dist/domain.operations/appInstallation/getOneAppInstallation.js.map +1 -0
- package/dist/domain.operations/appInstallation/setAppInstallation.d.ts +13 -0
- package/dist/domain.operations/appInstallation/setAppInstallation.js +131 -0
- package/dist/domain.operations/appInstallation/setAppInstallation.js.map +1 -0
- package/dist/domain.operations/branch/setBranch.js +19 -10
- package/dist/domain.operations/branch/setBranch.js.map +1 -1
- package/dist/domain.operations/context/hasContextWithAppToken.d.ts +6 -0
- package/dist/domain.operations/context/hasContextWithAppToken.js +15 -0
- package/dist/domain.operations/context/hasContextWithAppToken.js.map +1 -0
- package/dist/domain.operations/context/hasContextWithPatToken.d.ts +6 -0
- package/dist/domain.operations/context/hasContextWithPatToken.js +17 -0
- package/dist/domain.operations/context/hasContextWithPatToken.js.map +1 -0
- package/dist/domain.operations/org/castToDeclaredGithubOrg.d.ts +12 -0
- package/dist/domain.operations/org/castToDeclaredGithubOrg.js +29 -0
- package/dist/domain.operations/org/castToDeclaredGithubOrg.js.map +1 -0
- package/dist/domain.operations/org/getOneOrg.d.ts +14 -0
- package/dist/domain.operations/org/getOneOrg.js +31 -0
- package/dist/domain.operations/org/getOneOrg.js.map +1 -0
- package/dist/domain.operations/org/setOrg.d.ts +17 -0
- package/dist/domain.operations/org/setOrg.js +50 -0
- package/dist/domain.operations/org/setOrg.js.map +1 -0
- package/dist/domain.operations/orgMemberPrivileges/castToDeclaredGithubOrgMemberPrivileges.d.ts +15 -0
- package/dist/domain.operations/orgMemberPrivileges/castToDeclaredGithubOrgMemberPrivileges.js +47 -0
- package/dist/domain.operations/orgMemberPrivileges/castToDeclaredGithubOrgMemberPrivileges.js.map +1 -0
- package/dist/domain.operations/orgMemberPrivileges/getOneOrgMemberPrivileges.d.ts +14 -0
- package/dist/domain.operations/orgMemberPrivileges/getOneOrgMemberPrivileges.js +36 -0
- package/dist/domain.operations/orgMemberPrivileges/getOneOrgMemberPrivileges.js.map +1 -0
- package/dist/domain.operations/orgMemberPrivileges/setOrgMemberPrivileges.d.ts +16 -0
- package/dist/domain.operations/orgMemberPrivileges/setOrgMemberPrivileges.js +64 -0
- package/dist/domain.operations/orgMemberPrivileges/setOrgMemberPrivileges.js.map +1 -0
- package/dist/domain.operations/orgSecret/castToDeclaredGithubOrgSecret.d.ts +17 -0
- package/dist/domain.operations/orgSecret/castToDeclaredGithubOrgSecret.js +28 -0
- package/dist/domain.operations/orgSecret/castToDeclaredGithubOrgSecret.js.map +1 -0
- package/dist/domain.operations/orgSecret/delOrgSecret.d.ts +11 -0
- package/dist/domain.operations/orgSecret/delOrgSecret.js +27 -0
- package/dist/domain.operations/orgSecret/delOrgSecret.js.map +1 -0
- package/dist/domain.operations/orgSecret/getAllOrgSecrets.d.ts +14 -0
- package/dist/domain.operations/orgSecret/getAllOrgSecrets.js +27 -0
- package/dist/domain.operations/orgSecret/getAllOrgSecrets.js.map +1 -0
- package/dist/domain.operations/orgSecret/getOneOrgSecret.d.ts +15 -0
- package/dist/domain.operations/orgSecret/getOneOrgSecret.js +35 -0
- package/dist/domain.operations/orgSecret/getOneOrgSecret.js.map +1 -0
- package/dist/domain.operations/orgSecret/setOrgSecret.d.ts +17 -0
- package/dist/domain.operations/orgSecret/setOrgSecret.js +123 -0
- package/dist/domain.operations/orgSecret/setOrgSecret.js.map +1 -0
- package/dist/domain.operations/orgVariable/castToDeclaredGithubOrgVariable.d.ts +16 -0
- package/dist/domain.operations/orgVariable/castToDeclaredGithubOrgVariable.js +26 -0
- package/dist/domain.operations/orgVariable/castToDeclaredGithubOrgVariable.js.map +1 -0
- package/dist/domain.operations/orgVariable/delOrgVariable.d.ts +11 -0
- package/dist/domain.operations/orgVariable/delOrgVariable.js +27 -0
- package/dist/domain.operations/orgVariable/delOrgVariable.js.map +1 -0
- package/dist/domain.operations/orgVariable/getAllOrgVariables.d.ts +13 -0
- package/dist/domain.operations/orgVariable/getAllOrgVariables.js +28 -0
- package/dist/domain.operations/orgVariable/getAllOrgVariables.js.map +1 -0
- package/dist/domain.operations/orgVariable/getOneOrgVariable.d.ts +14 -0
- package/dist/domain.operations/orgVariable/getOneOrgVariable.js +34 -0
- package/dist/domain.operations/orgVariable/getOneOrgVariable.js.map +1 -0
- package/dist/domain.operations/orgVariable/setOrgVariable.d.ts +12 -0
- package/dist/domain.operations/orgVariable/setOrgVariable.js +69 -0
- package/dist/domain.operations/orgVariable/setOrgVariable.js.map +1 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.js +13 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.js.map +1 -1
- package/dist/domain.operations/repo/getRepos.js +22 -5
- package/dist/domain.operations/repo/getRepos.js.map +1 -1
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.js +0 -1
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.js.map +1 -1
- package/dist/domain.operations/repoConfig/setRepoConfig.js +0 -1
- package/dist/domain.operations/repoConfig/setRepoConfig.js.map +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { UniDateTime } from '@ehmpathy/uni-time';
|
|
2
|
+
import { DomainEntity } from 'domain-objects';
|
|
3
|
+
import { DeclaredGithubAppPermissions } from './DeclaredGithubAppPermissions';
|
|
4
|
+
import { DeclaredGithubOwner } from './DeclaredGithubOwner';
|
|
5
|
+
/**
|
|
6
|
+
* .what = a declarative structure which represents a GitHub App
|
|
7
|
+
* .why = enables declarative management of GitHub Apps following declastruct patterns
|
|
8
|
+
*/
|
|
9
|
+
export interface DeclaredGithubApp {
|
|
10
|
+
/**
|
|
11
|
+
* .what = GitHub's internal app ID
|
|
12
|
+
* .note = is @metadata -> may be undefined
|
|
13
|
+
*/
|
|
14
|
+
id?: number;
|
|
15
|
+
/**
|
|
16
|
+
* .what = when the app was created
|
|
17
|
+
* .note = is @metadata -> may be undefined
|
|
18
|
+
*/
|
|
19
|
+
createdAt?: UniDateTime;
|
|
20
|
+
/**
|
|
21
|
+
* .what = when the app was last updated
|
|
22
|
+
* .note = is @metadata -> may be undefined
|
|
23
|
+
*/
|
|
24
|
+
updatedAt?: UniDateTime;
|
|
25
|
+
/**
|
|
26
|
+
* .what = organization or user that owns the app
|
|
27
|
+
*/
|
|
28
|
+
owner: DeclaredGithubOwner;
|
|
29
|
+
/**
|
|
30
|
+
* .what = URL-friendly name of the app
|
|
31
|
+
* .note = used in URLs like github.com/apps/{slug}
|
|
32
|
+
*/
|
|
33
|
+
slug: string;
|
|
34
|
+
/**
|
|
35
|
+
* .what = display name of the app
|
|
36
|
+
* .note = null if not set
|
|
37
|
+
*/
|
|
38
|
+
name: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* .what = description of what the app does
|
|
41
|
+
* .note = null if not set
|
|
42
|
+
*/
|
|
43
|
+
description: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* .what = whether the app is public (anyone can install) or private (only owner can install)
|
|
46
|
+
* .note = defaults to false (private)
|
|
47
|
+
*/
|
|
48
|
+
public: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* .what = granular permission mappings for the app
|
|
51
|
+
*/
|
|
52
|
+
permissions: DeclaredGithubAppPermissions;
|
|
53
|
+
/**
|
|
54
|
+
* .what = webhook event subscriptions
|
|
55
|
+
* .note = empty array if no events subscribed
|
|
56
|
+
*/
|
|
57
|
+
events: string[];
|
|
58
|
+
/**
|
|
59
|
+
* .what = external homepage URL
|
|
60
|
+
*/
|
|
61
|
+
homepageUrl: string;
|
|
62
|
+
/**
|
|
63
|
+
* .what = webhook URL for receiving events
|
|
64
|
+
* .note = null if not set
|
|
65
|
+
*/
|
|
66
|
+
webhookUrl: string | null;
|
|
67
|
+
}
|
|
68
|
+
export declare class DeclaredGithubApp extends DomainEntity<DeclaredGithubApp> implements DeclaredGithubApp {
|
|
69
|
+
static primary: readonly ["id"];
|
|
70
|
+
static unique: readonly ["owner", "slug"];
|
|
71
|
+
static nested: {
|
|
72
|
+
owner: typeof DeclaredGithubOwner;
|
|
73
|
+
permissions: typeof DeclaredGithubAppPermissions;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubApp = void 0;
|
|
4
|
+
const domain_objects_1 = require("domain-objects");
|
|
5
|
+
const DeclaredGithubAppPermissions_1 = require("./DeclaredGithubAppPermissions");
|
|
6
|
+
const DeclaredGithubOwner_1 = require("./DeclaredGithubOwner");
|
|
7
|
+
class DeclaredGithubApp extends domain_objects_1.DomainEntity {
|
|
8
|
+
}
|
|
9
|
+
exports.DeclaredGithubApp = DeclaredGithubApp;
|
|
10
|
+
DeclaredGithubApp.primary = ['id'];
|
|
11
|
+
DeclaredGithubApp.unique = ['owner', 'slug'];
|
|
12
|
+
DeclaredGithubApp.nested = {
|
|
13
|
+
owner: DeclaredGithubOwner_1.DeclaredGithubOwner,
|
|
14
|
+
permissions: DeclaredGithubAppPermissions_1.DeclaredGithubAppPermissions,
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=DeclaredGithubApp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeclaredGithubApp.js","sourceRoot":"","sources":["../../src/domain.objects/DeclaredGithubApp.ts"],"names":[],"mappings":";;;AACA,mDAA8C;AAC9C,iFAA8E;AAC9E,+DAA4D;AA6E5D,MAAa,iBACX,SAAQ,6BAA+B;;AADzC,8CAUC;AANe,yBAAO,GAAG,CAAC,IAAI,CAAU,CAAC;AAC1B,wBAAM,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AACpC,wBAAM,GAAG;IACrB,KAAK,EAAE,yCAAmB;IAC1B,WAAW,EAAE,2DAA4B;CAC1C,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { UniDateTime } from '@ehmpathy/uni-time';
|
|
2
|
+
import { DomainEntity, RefByUnique } from 'domain-objects';
|
|
3
|
+
import type { DeclaredGithubApp } from './DeclaredGithubApp';
|
|
4
|
+
import { DeclaredGithubOwner } from './DeclaredGithubOwner';
|
|
5
|
+
/**
|
|
6
|
+
* .what = a declarative structure which represents a GitHub App installation
|
|
7
|
+
* .why = enables declarative management of GitHub App installations following declastruct patterns
|
|
8
|
+
*/
|
|
9
|
+
export interface DeclaredGithubAppInstallation {
|
|
10
|
+
/**
|
|
11
|
+
* .what = GitHub's internal installation ID
|
|
12
|
+
* .note = is @metadata -> may be undefined
|
|
13
|
+
*/
|
|
14
|
+
id?: number;
|
|
15
|
+
/**
|
|
16
|
+
* .what = when the installation was created
|
|
17
|
+
* .note = is @metadata -> may be undefined
|
|
18
|
+
*/
|
|
19
|
+
createdAt?: UniDateTime;
|
|
20
|
+
/**
|
|
21
|
+
* .what = when the installation was last updated
|
|
22
|
+
* .note = is @metadata -> may be undefined
|
|
23
|
+
*/
|
|
24
|
+
updatedAt?: UniDateTime;
|
|
25
|
+
/**
|
|
26
|
+
* .what = reference to the GitHub App this installation belongs to
|
|
27
|
+
*/
|
|
28
|
+
app: RefByUnique<typeof DeclaredGithubApp>;
|
|
29
|
+
/**
|
|
30
|
+
* .what = where this app was installed to
|
|
31
|
+
*/
|
|
32
|
+
target: DeclaredGithubOwner;
|
|
33
|
+
/**
|
|
34
|
+
* .what = whether the installation has access to all repos or selected repos
|
|
35
|
+
* .note = defaults to 'all'
|
|
36
|
+
*/
|
|
37
|
+
repositorySelection: 'all' | 'selected';
|
|
38
|
+
/**
|
|
39
|
+
* .what = list of repository names the installation has access to
|
|
40
|
+
* .note = only applicable when repositorySelection is 'selected'; null otherwise
|
|
41
|
+
*/
|
|
42
|
+
repositories: string[] | null;
|
|
43
|
+
/**
|
|
44
|
+
* .what = whether the installation is suspended
|
|
45
|
+
* .note = is @metadata -> may be undefined
|
|
46
|
+
*/
|
|
47
|
+
suspended?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export declare class DeclaredGithubAppInstallation extends DomainEntity<DeclaredGithubAppInstallation> implements DeclaredGithubAppInstallation {
|
|
50
|
+
static primary: readonly ["id"];
|
|
51
|
+
static unique: readonly ["app", "target"];
|
|
52
|
+
static readonly: readonly ["suspended"];
|
|
53
|
+
static nested: {
|
|
54
|
+
app: {
|
|
55
|
+
new (props: RefByUnique<typeof DeclaredGithubApp, any, any, any>): RefByUnique<typeof DeclaredGithubApp, any, any, any>;
|
|
56
|
+
build<TDobj extends import("domain-objects").Refable<TShape, TPrimary, TUnique>, TShape extends import("domain-objects/dist/reference/Refable").DomainObjectShape = any, TPrimary extends readonly string[] = any, TUnique extends readonly string[] = any>(props: RefByUnique<TDobj, TShape, TPrimary, TUnique>): RefByUnique<TDobj, TShape, TPrimary, TUnique>;
|
|
57
|
+
as<TDobj_1 extends import("domain-objects").Refable<TShape_1, TPrimary_1, TUnique_1>, TShape_1 extends import("domain-objects/dist/reference/Refable").DomainObjectShape = any, TPrimary_1 extends readonly string[] = any, TUnique_1 extends readonly string[] = any>(props: RefByUnique<TDobj_1, TShape_1, TPrimary_1, TUnique_1>): RefByUnique<TDobj_1, TShape_1, TPrimary_1, TUnique_1>;
|
|
58
|
+
};
|
|
59
|
+
target: typeof DeclaredGithubOwner;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubAppInstallation = void 0;
|
|
4
|
+
const domain_objects_1 = require("domain-objects");
|
|
5
|
+
const DeclaredGithubOwner_1 = require("./DeclaredGithubOwner");
|
|
6
|
+
class DeclaredGithubAppInstallation extends domain_objects_1.DomainEntity {
|
|
7
|
+
}
|
|
8
|
+
exports.DeclaredGithubAppInstallation = DeclaredGithubAppInstallation;
|
|
9
|
+
DeclaredGithubAppInstallation.primary = ['id'];
|
|
10
|
+
DeclaredGithubAppInstallation.unique = ['app', 'target'];
|
|
11
|
+
DeclaredGithubAppInstallation.readonly = ['suspended'];
|
|
12
|
+
DeclaredGithubAppInstallation.nested = {
|
|
13
|
+
app: (domain_objects_1.RefByUnique),
|
|
14
|
+
target: DeclaredGithubOwner_1.DeclaredGithubOwner,
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=DeclaredGithubAppInstallation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeclaredGithubAppInstallation.js","sourceRoot":"","sources":["../../src/domain.objects/DeclaredGithubAppInstallation.ts"],"names":[],"mappings":";;;AACA,mDAA2D;AAG3D,+DAA4D;AAsD5D,MAAa,6BACX,SAAQ,6BAA2C;;AADrD,sEAWC;AAPe,qCAAO,GAAG,CAAC,IAAI,CAAU,CAAC;AAC1B,oCAAM,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAU,CAAC;AACpC,sCAAQ,GAAG,CAAC,WAAW,CAAU,CAAC;AAClC,oCAAM,GAAG;IACrB,GAAG,EAAE,CAAA,4BAAqC,CAAA;IAC1C,MAAM,EAAE,yCAAmB;CAC5B,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { DomainLiteral } from 'domain-objects';
|
|
2
|
+
/**
|
|
3
|
+
* .what = permission levels for GitHub App capabilities
|
|
4
|
+
* .why = enables type-safe declaration of granular permissions for GitHub Apps
|
|
5
|
+
*/
|
|
6
|
+
export type GithubAppPermissionLevel = 'read' | 'write' | 'admin';
|
|
7
|
+
/**
|
|
8
|
+
* .what = repository-level permissions for GitHub Apps
|
|
9
|
+
* .why = scopes permissions explicitly to repository resources
|
|
10
|
+
*/
|
|
11
|
+
export interface DeclaredGithubAppRepositoryPermissions {
|
|
12
|
+
/**
|
|
13
|
+
* .what = push code and manage file operations
|
|
14
|
+
*/
|
|
15
|
+
contents?: GithubAppPermissionLevel | null;
|
|
16
|
+
/**
|
|
17
|
+
* .what = manage code review processes (pull requests)
|
|
18
|
+
*/
|
|
19
|
+
pullRequests?: GithubAppPermissionLevel | null;
|
|
20
|
+
/**
|
|
21
|
+
* .what = handle issue tracking and labels
|
|
22
|
+
*/
|
|
23
|
+
issues?: GithubAppPermissionLevel | null;
|
|
24
|
+
/**
|
|
25
|
+
* .what = control workflow permissions and artifacts
|
|
26
|
+
*/
|
|
27
|
+
actions?: GithubAppPermissionLevel | null;
|
|
28
|
+
/**
|
|
29
|
+
* .what = manage repo settings, branch protection, and security settings
|
|
30
|
+
* .note = nuclear option! can delete/rename/transfer repos unless org restricts this to owners
|
|
31
|
+
*/
|
|
32
|
+
administration?: GithubAppPermissionLevel | null;
|
|
33
|
+
/**
|
|
34
|
+
* .what = basic repository information
|
|
35
|
+
* .note = implicit read access for most operations
|
|
36
|
+
*/
|
|
37
|
+
metadata?: 'read' | null;
|
|
38
|
+
/**
|
|
39
|
+
* .what = oversee release management
|
|
40
|
+
*/
|
|
41
|
+
deployments?: GithubAppPermissionLevel | null;
|
|
42
|
+
/**
|
|
43
|
+
* .what = manage status reports (checks)
|
|
44
|
+
*/
|
|
45
|
+
checks?: GithubAppPermissionLevel | null;
|
|
46
|
+
/**
|
|
47
|
+
* .what = review and manage security alerts (code scanning)
|
|
48
|
+
*/
|
|
49
|
+
codeScanning?: GithubAppPermissionLevel | null;
|
|
50
|
+
/**
|
|
51
|
+
* .what = handle repository-specific credentials (secrets)
|
|
52
|
+
*/
|
|
53
|
+
secrets?: GithubAppPermissionLevel | null;
|
|
54
|
+
/**
|
|
55
|
+
* .what = access or edit Actions files in the .github/workflows directory
|
|
56
|
+
*/
|
|
57
|
+
workflows?: GithubAppPermissionLevel | null;
|
|
58
|
+
/**
|
|
59
|
+
* .what = manage repository environments
|
|
60
|
+
*/
|
|
61
|
+
environments?: GithubAppPermissionLevel | null;
|
|
62
|
+
/**
|
|
63
|
+
* .what = manage repository pages
|
|
64
|
+
*/
|
|
65
|
+
pages?: GithubAppPermissionLevel | null;
|
|
66
|
+
/**
|
|
67
|
+
* .what = manage repository packages
|
|
68
|
+
*/
|
|
69
|
+
packages?: GithubAppPermissionLevel | null;
|
|
70
|
+
/**
|
|
71
|
+
* .what = manage repository webhooks
|
|
72
|
+
*/
|
|
73
|
+
hooks?: GithubAppPermissionLevel | null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* .what = organization-level permissions for GitHub Apps
|
|
77
|
+
* .why = scopes permissions explicitly to organization resources
|
|
78
|
+
*/
|
|
79
|
+
export interface DeclaredGithubAppOrganizationPermissions {
|
|
80
|
+
/**
|
|
81
|
+
* .what = org-level administration
|
|
82
|
+
*/
|
|
83
|
+
administration?: GithubAppPermissionLevel | null;
|
|
84
|
+
/**
|
|
85
|
+
* .what = manage invitations, memberships, and team assignments
|
|
86
|
+
*/
|
|
87
|
+
members?: GithubAppPermissionLevel | null;
|
|
88
|
+
/**
|
|
89
|
+
* .what = create schemas and manage property values (custom properties)
|
|
90
|
+
*/
|
|
91
|
+
customProperties?: GithubAppPermissionLevel | null;
|
|
92
|
+
/**
|
|
93
|
+
* .what = control user blocks
|
|
94
|
+
*/
|
|
95
|
+
userBlocking?: GithubAppPermissionLevel | null;
|
|
96
|
+
/**
|
|
97
|
+
* .what = configure organization event notifications (webhooks)
|
|
98
|
+
*/
|
|
99
|
+
hooks?: GithubAppPermissionLevel | null;
|
|
100
|
+
/**
|
|
101
|
+
* .what = organization-wide actions secrets
|
|
102
|
+
*/
|
|
103
|
+
actionsSecrets?: GithubAppPermissionLevel | null;
|
|
104
|
+
/**
|
|
105
|
+
* .what = organization-wide actions variables
|
|
106
|
+
*/
|
|
107
|
+
actionsVariables?: GithubAppPermissionLevel | null;
|
|
108
|
+
/**
|
|
109
|
+
* .what = project management
|
|
110
|
+
*/
|
|
111
|
+
projects?: GithubAppPermissionLevel | null;
|
|
112
|
+
/**
|
|
113
|
+
* .what = runner infrastructure (self-hosted runners)
|
|
114
|
+
*/
|
|
115
|
+
selfHostedRunners?: GithubAppPermissionLevel | null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* .what = a declarative structure which represents a GitHub App's permissions
|
|
119
|
+
* .why = enables type-safe permission configuration for GitHub Apps following declastruct patterns
|
|
120
|
+
*/
|
|
121
|
+
export interface DeclaredGithubAppPermissions {
|
|
122
|
+
repository: DeclaredGithubAppRepositoryPermissions | null;
|
|
123
|
+
organization: DeclaredGithubAppOrganizationPermissions | null;
|
|
124
|
+
}
|
|
125
|
+
export declare class DeclaredGithubAppPermissions extends DomainLiteral<DeclaredGithubAppPermissions> implements DeclaredGithubAppPermissions {
|
|
126
|
+
static nested: {
|
|
127
|
+
repository: typeof DomainLiteral;
|
|
128
|
+
organization: typeof DomainLiteral;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubAppPermissions = void 0;
|
|
4
|
+
const domain_objects_1 = require("domain-objects");
|
|
5
|
+
class DeclaredGithubAppPermissions extends domain_objects_1.DomainLiteral {
|
|
6
|
+
}
|
|
7
|
+
exports.DeclaredGithubAppPermissions = DeclaredGithubAppPermissions;
|
|
8
|
+
DeclaredGithubAppPermissions.nested = {
|
|
9
|
+
repository: domain_objects_1.DomainLiteral,
|
|
10
|
+
organization: domain_objects_1.DomainLiteral,
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=DeclaredGithubAppPermissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeclaredGithubAppPermissions.js","sourceRoot":"","sources":["../../src/domain.objects/DeclaredGithubAppPermissions.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAuJ/C,MAAa,4BACX,SAAQ,8BAA2C;;AADrD,oEAQC;AAJe,mCAAM,GAAG;IACrB,UAAU,EAAE,8BAAa;IACzB,YAAY,EAAE,8BAAa;CAC5B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { UniDateTime } from '@ehmpathy/uni-time';
|
|
2
|
+
import { DomainEntity } from 'domain-objects';
|
|
3
|
+
/**
|
|
4
|
+
* .what = a declarative structure which represents GitHub Organization profile
|
|
5
|
+
* .why = enables declarative management of org profile settings
|
|
6
|
+
*/
|
|
7
|
+
export interface DeclaredGithubOrg {
|
|
8
|
+
/**
|
|
9
|
+
* .what = GitHub's internal org ID
|
|
10
|
+
* .note = is @metadata -> may be undefined
|
|
11
|
+
*/
|
|
12
|
+
id?: number;
|
|
13
|
+
/**
|
|
14
|
+
* .what = when the org was created
|
|
15
|
+
* .note = is @metadata -> may be undefined
|
|
16
|
+
*/
|
|
17
|
+
createdAt?: UniDateTime;
|
|
18
|
+
/**
|
|
19
|
+
* .what = when the org was last updated
|
|
20
|
+
* .note = is @metadata -> may be undefined
|
|
21
|
+
*/
|
|
22
|
+
updatedAt?: UniDateTime;
|
|
23
|
+
/**
|
|
24
|
+
* .what = organization login/handle
|
|
25
|
+
* .note = e.g., 'ehmpathy'
|
|
26
|
+
*/
|
|
27
|
+
login: string;
|
|
28
|
+
/**
|
|
29
|
+
* .what = display name of the organization (shown on profile)
|
|
30
|
+
* .note = null if not set (falls back to login in UI)
|
|
31
|
+
*/
|
|
32
|
+
name: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* .what = organization description
|
|
35
|
+
* .note = null if not set
|
|
36
|
+
*/
|
|
37
|
+
description: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* .what = billing email address (write-only)
|
|
40
|
+
* .note = if undefined, existing value is kept unchanged
|
|
41
|
+
*/
|
|
42
|
+
billingEmail?: string;
|
|
43
|
+
/**
|
|
44
|
+
* .what = whether 2FA is required for all members
|
|
45
|
+
* .note = is @metadata -> read-only
|
|
46
|
+
*/
|
|
47
|
+
twoFactorRequirementEnabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* .what = count of public repos
|
|
50
|
+
* .note = is @metadata -> read-only
|
|
51
|
+
*/
|
|
52
|
+
publicRepos?: number;
|
|
53
|
+
}
|
|
54
|
+
export declare class DeclaredGithubOrg extends DomainEntity<DeclaredGithubOrg> implements DeclaredGithubOrg {
|
|
55
|
+
static primary: readonly ["id"];
|
|
56
|
+
static unique: readonly ["login"];
|
|
57
|
+
static readonly: readonly ["twoFactorRequirementEnabled", "publicRepos"];
|
|
58
|
+
static writeonly: readonly ["billingEmail"];
|
|
59
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubOrg = void 0;
|
|
4
|
+
const domain_objects_1 = require("domain-objects");
|
|
5
|
+
class DeclaredGithubOrg extends domain_objects_1.DomainEntity {
|
|
6
|
+
}
|
|
7
|
+
exports.DeclaredGithubOrg = DeclaredGithubOrg;
|
|
8
|
+
DeclaredGithubOrg.primary = ['id'];
|
|
9
|
+
DeclaredGithubOrg.unique = ['login'];
|
|
10
|
+
DeclaredGithubOrg.readonly = [
|
|
11
|
+
'twoFactorRequirementEnabled',
|
|
12
|
+
'publicRepos',
|
|
13
|
+
];
|
|
14
|
+
DeclaredGithubOrg.writeonly = ['billingEmail'];
|
|
15
|
+
//# sourceMappingURL=DeclaredGithubOrg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeclaredGithubOrg.js","sourceRoot":"","sources":["../../src/domain.objects/DeclaredGithubOrg.ts"],"names":[],"mappings":";;;AACA,mDAA8C;AAkE9C,MAAa,iBACX,SAAQ,6BAA+B;;AADzC,8CAWC;AAPe,yBAAO,GAAG,CAAC,IAAI,CAAU,CAAC;AAC1B,wBAAM,GAAG,CAAC,OAAO,CAAU,CAAC;AAC5B,0BAAQ,GAAG;IACvB,6BAA6B;IAC7B,aAAa;CACL,CAAC;AACG,2BAAS,GAAG,CAAC,cAAc,CAAU,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { UniDateTime } from '@ehmpathy/uni-time';
|
|
2
|
+
import { DomainEntity, RefByUnique } from 'domain-objects';
|
|
3
|
+
import type { DeclaredGithubOrg } from './DeclaredGithubOrg';
|
|
4
|
+
/**
|
|
5
|
+
* .what = a declarative structure which represents GitHub Organization member privileges
|
|
6
|
+
* .why = enables declarative management of what org members are allowed to do
|
|
7
|
+
* .note = KEY SECURITY RESOURCE - controls what non-owners can do
|
|
8
|
+
*/
|
|
9
|
+
export interface DeclaredGithubOrgMemberPrivileges {
|
|
10
|
+
/**
|
|
11
|
+
* .what = when the settings were last updated
|
|
12
|
+
* .note = is @metadata -> may be undefined
|
|
13
|
+
*/
|
|
14
|
+
updatedAt?: UniDateTime;
|
|
15
|
+
/**
|
|
16
|
+
* .what = reference to the organization
|
|
17
|
+
*/
|
|
18
|
+
org: RefByUnique<typeof DeclaredGithubOrg>;
|
|
19
|
+
/**
|
|
20
|
+
* .what = whether non-admin members can create repositories
|
|
21
|
+
*/
|
|
22
|
+
membersCanCreateRepositories: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* .what = whether members can create PUBLIC repositories
|
|
25
|
+
* .note = only applies if membersCanCreateRepositories is true
|
|
26
|
+
*/
|
|
27
|
+
membersCanCreatePublicRepositories: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* .what = whether members can create PRIVATE repositories
|
|
30
|
+
* .note = only applies if membersCanCreateRepositories is true
|
|
31
|
+
*/
|
|
32
|
+
membersCanCreatePrivateRepositories: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* .what = whether members can create INTERNAL repositories
|
|
35
|
+
* .note = only available for enterprise orgs; null if not enterprise
|
|
36
|
+
*/
|
|
37
|
+
membersCanCreateInternalRepositories: boolean | null;
|
|
38
|
+
/**
|
|
39
|
+
* .what = whether members with admin permissions can DELETE or TRANSFER repositories
|
|
40
|
+
* .note = KEY SECURITY SETTING - false means only org owners can delete/transfer
|
|
41
|
+
* .note = GitHub default is true (DANGEROUS)
|
|
42
|
+
*/
|
|
43
|
+
membersCanDeleteRepositories: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* .what = whether members with admin permissions can change repository VISIBILITY
|
|
46
|
+
* .note = KEY SECURITY SETTING - false means only org owners can change visibility
|
|
47
|
+
* .note = GitHub default is true (DANGEROUS)
|
|
48
|
+
*/
|
|
49
|
+
membersCanChangeRepoVisibility: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* .what = whether members can fork private repositories
|
|
52
|
+
*/
|
|
53
|
+
membersCanForkPrivateRepositories: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* .what = whether members can invite outside collaborators
|
|
56
|
+
*/
|
|
57
|
+
membersCanInviteOutsideCollaborators: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* .what = whether members can create GitHub Pages sites
|
|
60
|
+
*/
|
|
61
|
+
membersCanCreatePages: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* .what = whether members can create public GitHub Pages sites
|
|
64
|
+
*/
|
|
65
|
+
membersCanCreatePublicPages: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* .what = whether members can create private GitHub Pages sites
|
|
68
|
+
*/
|
|
69
|
+
membersCanCreatePrivatePages: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* .what = default permission level for new repos
|
|
72
|
+
*/
|
|
73
|
+
defaultRepositoryPermission: 'read' | 'write' | 'admin' | 'none';
|
|
74
|
+
}
|
|
75
|
+
export declare class DeclaredGithubOrgMemberPrivileges extends DomainEntity<DeclaredGithubOrgMemberPrivileges> implements DeclaredGithubOrgMemberPrivileges {
|
|
76
|
+
static unique: readonly ["org"];
|
|
77
|
+
static readonly: readonly ["updatedAt"];
|
|
78
|
+
static nested: {
|
|
79
|
+
org: {
|
|
80
|
+
new (props: RefByUnique<typeof DeclaredGithubOrg, any, any, any>): RefByUnique<typeof DeclaredGithubOrg, any, any, any>;
|
|
81
|
+
build<TDobj extends import("domain-objects").Refable<TShape, TPrimary, TUnique>, TShape extends import("domain-objects/dist/reference/Refable").DomainObjectShape = any, TPrimary extends readonly string[] = any, TUnique extends readonly string[] = any>(props: RefByUnique<TDobj, TShape, TPrimary, TUnique>): RefByUnique<TDobj, TShape, TPrimary, TUnique>;
|
|
82
|
+
as<TDobj_1 extends import("domain-objects").Refable<TShape_1, TPrimary_1, TUnique_1>, TShape_1 extends import("domain-objects/dist/reference/Refable").DomainObjectShape = any, TPrimary_1 extends readonly string[] = any, TUnique_1 extends readonly string[] = any>(props: RefByUnique<TDobj_1, TShape_1, TPrimary_1, TUnique_1>): RefByUnique<TDobj_1, TShape_1, TPrimary_1, TUnique_1>;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubOrgMemberPrivileges = void 0;
|
|
4
|
+
const domain_objects_1 = require("domain-objects");
|
|
5
|
+
class DeclaredGithubOrgMemberPrivileges extends domain_objects_1.DomainEntity {
|
|
6
|
+
}
|
|
7
|
+
exports.DeclaredGithubOrgMemberPrivileges = DeclaredGithubOrgMemberPrivileges;
|
|
8
|
+
DeclaredGithubOrgMemberPrivileges.unique = ['org'];
|
|
9
|
+
DeclaredGithubOrgMemberPrivileges.readonly = ['updatedAt'];
|
|
10
|
+
DeclaredGithubOrgMemberPrivileges.nested = {
|
|
11
|
+
org: (domain_objects_1.RefByUnique),
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=DeclaredGithubOrgMemberPrivileges.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeclaredGithubOrgMemberPrivileges.js","sourceRoot":"","sources":["../../src/domain.objects/DeclaredGithubOrgMemberPrivileges.ts"],"names":[],"mappings":";;;AACA,mDAA2D;AAyG3D,MAAa,iCACX,SAAQ,6BAA+C;;AADzD,8EASC;AALe,wCAAM,GAAG,CAAC,KAAK,CAAU,CAAC;AAC1B,0CAAQ,GAAG,CAAC,WAAW,CAAU,CAAC;AAClC,wCAAM,GAAG;IACrB,GAAG,EAAE,CAAA,4BAAqC,CAAA;CAC3C,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { UniDateTime } from '@ehmpathy/uni-time';
|
|
2
|
+
import { DomainEntity, RefByUnique } from 'domain-objects';
|
|
3
|
+
import type { DeclaredGithubOrg } from './DeclaredGithubOrg';
|
|
4
|
+
/**
|
|
5
|
+
* .what = a declarative structure representing a GitHub Organization secret
|
|
6
|
+
* .why = enables declarative management of org-level GitHub Actions secrets
|
|
7
|
+
*
|
|
8
|
+
* WRITE-ONLY PATTERN:
|
|
9
|
+
* - Secret values are NEVER readable via API
|
|
10
|
+
* - On read: only metadata (name, visibility, created_at) is returned
|
|
11
|
+
* - On write: value must be encrypted with org public key before sending
|
|
12
|
+
* - If value is undefined: existing secret is kept unchanged (shows [KEEP])
|
|
13
|
+
* - If value is provided: secret is created/updated with new encrypted value
|
|
14
|
+
*/
|
|
15
|
+
export interface DeclaredGithubOrgSecret {
|
|
16
|
+
/**
|
|
17
|
+
* .what = reference to the organization
|
|
18
|
+
*/
|
|
19
|
+
org: RefByUnique<typeof DeclaredGithubOrg>;
|
|
20
|
+
/**
|
|
21
|
+
* .what = secret name
|
|
22
|
+
* .note = must be unique per org
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* .what = secret value (write-only)
|
|
27
|
+
* .note = if undefined, existing secret is kept unchanged
|
|
28
|
+
* .note = value is encrypted before being sent to API
|
|
29
|
+
*/
|
|
30
|
+
value?: string;
|
|
31
|
+
/**
|
|
32
|
+
* .what = visibility scope for the secret
|
|
33
|
+
* .note = 'all' = all repos, 'private' = private repos only, 'selected' = specific repos
|
|
34
|
+
*/
|
|
35
|
+
visibility: 'all' | 'private' | 'selected';
|
|
36
|
+
/**
|
|
37
|
+
* .what = repository names when visibility is 'selected'
|
|
38
|
+
* .note = only repo names, not full owner/repo format
|
|
39
|
+
*/
|
|
40
|
+
selectedRepositoryNames?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* .what = when the secret was created
|
|
43
|
+
* .note = is @metadata -> may be undefined
|
|
44
|
+
*/
|
|
45
|
+
createdAt?: UniDateTime;
|
|
46
|
+
/**
|
|
47
|
+
* .what = when the secret was last updated
|
|
48
|
+
* .note = is @metadata -> may be undefined
|
|
49
|
+
*/
|
|
50
|
+
updatedAt?: UniDateTime;
|
|
51
|
+
}
|
|
52
|
+
export declare class DeclaredGithubOrgSecret extends DomainEntity<DeclaredGithubOrgSecret> implements DeclaredGithubOrgSecret {
|
|
53
|
+
static unique: readonly ["org", "name"];
|
|
54
|
+
static readonly: readonly ["createdAt", "updatedAt"];
|
|
55
|
+
static writeonly: readonly ["value"];
|
|
56
|
+
static nested: {
|
|
57
|
+
org: {
|
|
58
|
+
new (props: RefByUnique<typeof DeclaredGithubOrg, any, any, any>): RefByUnique<typeof DeclaredGithubOrg, any, any, any>;
|
|
59
|
+
build<TDobj extends import("domain-objects").Refable<TShape, TPrimary, TUnique>, TShape extends import("domain-objects/dist/reference/Refable").DomainObjectShape = any, TPrimary extends readonly string[] = any, TUnique extends readonly string[] = any>(props: RefByUnique<TDobj, TShape, TPrimary, TUnique>): RefByUnique<TDobj, TShape, TPrimary, TUnique>;
|
|
60
|
+
as<TDobj_1 extends import("domain-objects").Refable<TShape_1, TPrimary_1, TUnique_1>, TShape_1 extends import("domain-objects/dist/reference/Refable").DomainObjectShape = any, TPrimary_1 extends readonly string[] = any, TUnique_1 extends readonly string[] = any>(props: RefByUnique<TDobj_1, TShape_1, TPrimary_1, TUnique_1>): RefByUnique<TDobj_1, TShape_1, TPrimary_1, TUnique_1>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubOrgSecret = void 0;
|
|
4
|
+
const domain_objects_1 = require("domain-objects");
|
|
5
|
+
class DeclaredGithubOrgSecret extends domain_objects_1.DomainEntity {
|
|
6
|
+
}
|
|
7
|
+
exports.DeclaredGithubOrgSecret = DeclaredGithubOrgSecret;
|
|
8
|
+
DeclaredGithubOrgSecret.unique = ['org', 'name'];
|
|
9
|
+
DeclaredGithubOrgSecret.readonly = ['createdAt', 'updatedAt'];
|
|
10
|
+
DeclaredGithubOrgSecret.writeonly = ['value'];
|
|
11
|
+
DeclaredGithubOrgSecret.nested = {
|
|
12
|
+
org: (domain_objects_1.RefByUnique),
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=DeclaredGithubOrgSecret.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeclaredGithubOrgSecret.js","sourceRoot":"","sources":["../../src/domain.objects/DeclaredGithubOrgSecret.ts"],"names":[],"mappings":";;;AACA,mDAA2D;AA2D3D,MAAa,uBACX,SAAQ,6BAAqC;;AAD/C,0DAUC;AANe,8BAAM,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAC;AAClC,gCAAQ,GAAG,CAAC,WAAW,EAAE,WAAW,CAAU,CAAC;AAC/C,iCAAS,GAAG,CAAC,OAAO,CAAU,CAAC;AAC/B,8BAAM,GAAG;IACrB,GAAG,EAAE,CAAA,4BAAqC,CAAA;CAC3C,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { UniDateTime } from '@ehmpathy/uni-time';
|
|
2
|
+
import { DomainEntity, RefByUnique } from 'domain-objects';
|
|
3
|
+
import type { DeclaredGithubOrg } from './DeclaredGithubOrg';
|
|
4
|
+
/**
|
|
5
|
+
* .what = a declarative structure representing a GitHub Organization variable
|
|
6
|
+
* .why = enables declarative management of org-level GitHub Actions variables
|
|
7
|
+
*/
|
|
8
|
+
export interface DeclaredGithubOrgVariable {
|
|
9
|
+
/**
|
|
10
|
+
* .what = reference to the organization
|
|
11
|
+
*/
|
|
12
|
+
org: RefByUnique<typeof DeclaredGithubOrg>;
|
|
13
|
+
/**
|
|
14
|
+
* .what = variable name
|
|
15
|
+
* .note = must be unique per org
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* .what = variable value
|
|
20
|
+
* .note = stored in plain text (not encrypted)
|
|
21
|
+
*/
|
|
22
|
+
value: string;
|
|
23
|
+
/**
|
|
24
|
+
* .what = visibility scope for the variable
|
|
25
|
+
* .note = 'all' = all repos, 'private' = private repos only, 'selected' = specific repos
|
|
26
|
+
*/
|
|
27
|
+
visibility: 'all' | 'private' | 'selected';
|
|
28
|
+
/**
|
|
29
|
+
* .what = repository names when visibility is 'selected'
|
|
30
|
+
* .note = only repo names, not full owner/repo format
|
|
31
|
+
*/
|
|
32
|
+
selectedRepositoryNames?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* .what = when the variable was created
|
|
35
|
+
* .note = is @metadata -> may be undefined
|
|
36
|
+
*/
|
|
37
|
+
createdAt?: UniDateTime;
|
|
38
|
+
/**
|
|
39
|
+
* .what = when the variable was last updated
|
|
40
|
+
* .note = is @metadata -> may be undefined
|
|
41
|
+
*/
|
|
42
|
+
updatedAt?: UniDateTime;
|
|
43
|
+
}
|
|
44
|
+
export declare class DeclaredGithubOrgVariable extends DomainEntity<DeclaredGithubOrgVariable> implements DeclaredGithubOrgVariable {
|
|
45
|
+
static unique: readonly ["org", "name"];
|
|
46
|
+
static readonly: readonly ["createdAt", "updatedAt"];
|
|
47
|
+
static nested: {
|
|
48
|
+
org: {
|
|
49
|
+
new (props: RefByUnique<typeof DeclaredGithubOrg, any, any, any>): RefByUnique<typeof DeclaredGithubOrg, any, any, any>;
|
|
50
|
+
build<TDobj extends import("domain-objects").Refable<TShape, TPrimary, TUnique>, TShape extends import("domain-objects/dist/reference/Refable").DomainObjectShape = any, TPrimary extends readonly string[] = any, TUnique extends readonly string[] = any>(props: RefByUnique<TDobj, TShape, TPrimary, TUnique>): RefByUnique<TDobj, TShape, TPrimary, TUnique>;
|
|
51
|
+
as<TDobj_1 extends import("domain-objects").Refable<TShape_1, TPrimary_1, TUnique_1>, TShape_1 extends import("domain-objects/dist/reference/Refable").DomainObjectShape = any, TPrimary_1 extends readonly string[] = any, TUnique_1 extends readonly string[] = any>(props: RefByUnique<TDobj_1, TShape_1, TPrimary_1, TUnique_1>): RefByUnique<TDobj_1, TShape_1, TPrimary_1, TUnique_1>;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubOrgVariable = void 0;
|
|
4
|
+
const domain_objects_1 = require("domain-objects");
|
|
5
|
+
class DeclaredGithubOrgVariable extends domain_objects_1.DomainEntity {
|
|
6
|
+
}
|
|
7
|
+
exports.DeclaredGithubOrgVariable = DeclaredGithubOrgVariable;
|
|
8
|
+
DeclaredGithubOrgVariable.unique = ['org', 'name'];
|
|
9
|
+
DeclaredGithubOrgVariable.readonly = ['createdAt', 'updatedAt'];
|
|
10
|
+
DeclaredGithubOrgVariable.nested = {
|
|
11
|
+
org: (domain_objects_1.RefByUnique),
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=DeclaredGithubOrgVariable.js.map
|