declastruct-github 1.0.7 → 1.1.1
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/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 +4 -0
- package/dist/contract/sdks/index.js +9 -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 +126 -0
- package/dist/domain.objects/DeclaredGithubAppPermissions.js +12 -0
- package/dist/domain.objects/DeclaredGithubAppPermissions.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/DeclaredGithubRepoConfig.d.ts +0 -4
- package/dist/domain.objects/DeclaredGithubRepoConfig.js.map +1 -1
- package/dist/domain.objects/DeclastructGithubProvider.d.ts +4 -0
- package/dist/domain.operations/app/castToDeclaredGithubApp.d.ts +12 -0
- package/dist/domain.operations/app/castToDeclaredGithubApp.js +133 -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/provider/getDeclastructGithubProvider.js +4 -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 +5 -5
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ContextLogTrail } from 'simple-log-methods';
|
|
2
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
3
|
+
import { DeclaredGithubApp } from '../../domain.objects/DeclaredGithubApp';
|
|
4
|
+
/**
|
|
5
|
+
* .what = declastruct DAO for GitHub App resources
|
|
6
|
+
* .why = wraps app operations to conform to declastruct interface with helpful errors
|
|
7
|
+
*/
|
|
8
|
+
export declare const DeclaredGithubAppDao: import("declastruct").DeclastructDaoWoutRef<typeof DeclaredGithubApp, ContextGithubApi & ContextLogTrail>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubAppDao = void 0;
|
|
4
|
+
const declastruct_1 = require("declastruct");
|
|
5
|
+
const DeclaredGithubApp_1 = require("../../domain.objects/DeclaredGithubApp");
|
|
6
|
+
const getOneApp_1 = require("../../domain.operations/app/getOneApp");
|
|
7
|
+
const setApp_1 = require("../../domain.operations/app/setApp");
|
|
8
|
+
/**
|
|
9
|
+
* .what = declastruct DAO for GitHub App resources
|
|
10
|
+
* .why = wraps app operations to conform to declastruct interface with helpful errors
|
|
11
|
+
*/
|
|
12
|
+
exports.DeclaredGithubAppDao = (0, declastruct_1.genDeclastructDao)({
|
|
13
|
+
dobj: DeclaredGithubApp_1.DeclaredGithubApp,
|
|
14
|
+
get: {
|
|
15
|
+
one: {
|
|
16
|
+
byUnique: async (input, context) => {
|
|
17
|
+
return (0, getOneApp_1.getOneApp)({ by: { unique: input } }, context);
|
|
18
|
+
},
|
|
19
|
+
byPrimary: null,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
set: {
|
|
23
|
+
finsert: async (input, context) => {
|
|
24
|
+
return (0, setApp_1.setApp)({ finsert: input }, context);
|
|
25
|
+
},
|
|
26
|
+
upsert: async (input, context) => {
|
|
27
|
+
return (0, setApp_1.setApp)({ upsert: input }, context);
|
|
28
|
+
},
|
|
29
|
+
delete: null,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=DeclaredGithubAppDao.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeclaredGithubAppDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubAppDao.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAIhD,8EAA2E;AAC3E,qEAAkE;AAClE,+DAA4D;AAE5D;;;GAGG;AACU,QAAA,oBAAoB,GAAG,IAAA,+BAAiB,EAGnD;IACA,IAAI,EAAE,qCAAiB;IACvB,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,qBAAS,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACvD,CAAC;YACD,SAAS,EAAE,IAAI;SAChB;KACF;IACD,GAAG,EAAE;QACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAChC,OAAO,IAAA,eAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAC/B,OAAO,IAAA,eAAM,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,MAAM,EAAE,IAAI;KACb;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ContextLogTrail } from 'simple-log-methods';
|
|
2
|
+
import type { ContextGithubApi } from '../../domain.objects/ContextGithubApi';
|
|
3
|
+
import { DeclaredGithubAppInstallation } from '../../domain.objects/DeclaredGithubAppInstallation';
|
|
4
|
+
/**
|
|
5
|
+
* .what = declastruct DAO for GitHub App installation resources
|
|
6
|
+
* .why = wraps installation operations to conform to declastruct interface with helpful errors
|
|
7
|
+
* .note = delete is null because API deletion requires App JWT; use deleteAppInstallation directly for helpful error with uninstall URL
|
|
8
|
+
*/
|
|
9
|
+
export declare const DeclaredGithubAppInstallationDao: import("declastruct").DeclastructDaoWoutRef<typeof DeclaredGithubAppInstallation, ContextGithubApi & ContextLogTrail>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeclaredGithubAppInstallationDao = void 0;
|
|
4
|
+
const declastruct_1 = require("declastruct");
|
|
5
|
+
const DeclaredGithubAppInstallation_1 = require("../../domain.objects/DeclaredGithubAppInstallation");
|
|
6
|
+
const getOneAppInstallation_1 = require("../../domain.operations/appInstallation/getOneAppInstallation");
|
|
7
|
+
const setAppInstallation_1 = require("../../domain.operations/appInstallation/setAppInstallation");
|
|
8
|
+
/**
|
|
9
|
+
* .what = declastruct DAO for GitHub App installation resources
|
|
10
|
+
* .why = wraps installation operations to conform to declastruct interface with helpful errors
|
|
11
|
+
* .note = delete is null because API deletion requires App JWT; use deleteAppInstallation directly for helpful error with uninstall URL
|
|
12
|
+
*/
|
|
13
|
+
exports.DeclaredGithubAppInstallationDao = (0, declastruct_1.genDeclastructDao)({
|
|
14
|
+
dobj: DeclaredGithubAppInstallation_1.DeclaredGithubAppInstallation,
|
|
15
|
+
get: {
|
|
16
|
+
one: {
|
|
17
|
+
byUnique: async (input, context) => {
|
|
18
|
+
return (0, getOneAppInstallation_1.getOneAppInstallation)({ by: { unique: input } }, context);
|
|
19
|
+
},
|
|
20
|
+
byPrimary: null,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
set: {
|
|
24
|
+
finsert: async (input, context) => {
|
|
25
|
+
return (0, setAppInstallation_1.setAppInstallation)({ finsert: input }, context);
|
|
26
|
+
},
|
|
27
|
+
upsert: async (input, context) => {
|
|
28
|
+
return (0, setAppInstallation_1.setAppInstallation)({ upsert: input }, context);
|
|
29
|
+
},
|
|
30
|
+
delete: null,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=DeclaredGithubAppInstallationDao.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeclaredGithubAppInstallationDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubAppInstallationDao.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAIhD,sGAAmG;AACnG,yGAAsG;AACtG,mGAAgG;AAEhG;;;;GAIG;AACU,QAAA,gCAAgC,GAAG,IAAA,+BAAiB,EAG/D;IACA,IAAI,EAAE,6DAA6B;IACnC,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,6CAAqB,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACnE,CAAC;YACD,SAAS,EAAE,IAAI;SAChB;KACF;IACD,GAAG,EAAE;QACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAChC,OAAO,IAAA,uCAAkB,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAC/B,OAAO,IAAA,uCAAkB,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QACxD,CAAC;QACD,MAAM,EAAE,IAAI;KACb;CACF,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ exports.DeclaredGithubBranchDao = new declastruct_1.DeclastructDao({
|
|
|
19
19
|
byUnique: async (input, context) => {
|
|
20
20
|
return (0, getBranch_1.getBranch)({ by: { unique: input } }, context);
|
|
21
21
|
},
|
|
22
|
-
byPrimary:
|
|
22
|
+
byPrimary: undefined,
|
|
23
23
|
byRef: async (input, context) => {
|
|
24
24
|
if ((0, domain_objects_1.isRefByUnique)({ of: DeclaredGithubBranch_1.DeclaredGithubBranch })(input))
|
|
25
25
|
return (0, getBranch_1.getBranch)({ by: { unique: input } }, context);
|
|
@@ -27,8 +27,8 @@ exports.DeclaredGithubBranchDao = new declastruct_1.DeclastructDao({
|
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
ref: {
|
|
30
|
-
byPrimary:
|
|
31
|
-
byUnique:
|
|
30
|
+
byPrimary: undefined,
|
|
31
|
+
byUnique: undefined,
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
set: {
|
|
@@ -38,7 +38,7 @@ exports.DeclaredGithubBranchDao = new declastruct_1.DeclastructDao({
|
|
|
38
38
|
upsert: async (input, context) => {
|
|
39
39
|
return (0, setBranch_1.setBranch)({ upsert: input }, context);
|
|
40
40
|
},
|
|
41
|
-
delete:
|
|
41
|
+
delete: undefined,
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
44
|
//# sourceMappingURL=DeclaredGithubBranchDao.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclaredGithubBranchDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubBranchDao.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,mDAA+C;AAC/C,mDAAyD;AAIzD,oFAAiF;AACjF,wEAAqE;AACrE,wEAAqE;AAErE;;;;GAIG;AACU,QAAA,uBAAuB,GAAG,IAAI,4BAAc,CAGvD;IACA,IAAI,EAAE,2CAAoB;IAC1B,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,qBAAS,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACvD,CAAC;YACD,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"DeclaredGithubBranchDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubBranchDao.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,mDAA+C;AAC/C,mDAAyD;AAIzD,oFAAiF;AACjF,wEAAqE;AACrE,wEAAqE;AAErE;;;;GAIG;AACU,QAAA,uBAAuB,GAAG,IAAI,4BAAc,CAGvD;IACA,IAAI,EAAE,2CAAoB;IAC1B,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,qBAAS,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACvD,CAAC;YACD,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBAC9B,IAAI,IAAA,8BAAa,EAAC,EAAE,EAAE,EAAE,2CAAoB,EAAE,CAAC,CAAC,KAAK,CAAC;oBACpD,OAAO,IAAA,qBAAS,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBACvD,wCAAuB,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YACnE,CAAC;SACF;QACD,GAAG,EAAE;YACH,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,SAAS;SACpB;KACF;IACD,GAAG,EAAE;QACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAChC,OAAO,IAAA,qBAAS,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAC/B,OAAO,IAAA,qBAAS,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;QACD,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -18,7 +18,7 @@ exports.DeclaredGithubBranchProtectionDao = new declastruct_1.DeclastructDao({
|
|
|
18
18
|
byUnique: async (input, context) => {
|
|
19
19
|
return (0, getBranchProtection_1.getBranchProtection)({ by: { unique: input } }, context);
|
|
20
20
|
},
|
|
21
|
-
byPrimary:
|
|
21
|
+
byPrimary: undefined,
|
|
22
22
|
byRef: async (input, context) => {
|
|
23
23
|
if ((0, domain_objects_1.isRefByUnique)({ of: DeclaredGithubBranchProtection_1.DeclaredGithubBranchProtection })(input))
|
|
24
24
|
return (0, getBranchProtection_1.getBranchProtection)({ by: { unique: input } }, context);
|
|
@@ -26,8 +26,8 @@ exports.DeclaredGithubBranchProtectionDao = new declastruct_1.DeclastructDao({
|
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
ref: {
|
|
29
|
-
byPrimary:
|
|
30
|
-
byUnique:
|
|
29
|
+
byPrimary: undefined,
|
|
30
|
+
byUnique: undefined,
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
set: {
|
|
@@ -37,7 +37,7 @@ exports.DeclaredGithubBranchProtectionDao = new declastruct_1.DeclastructDao({
|
|
|
37
37
|
upsert: async (input, context) => {
|
|
38
38
|
return (0, setBranchProtection_1.setBranchProtection)({ upsert: input }, context);
|
|
39
39
|
},
|
|
40
|
-
delete:
|
|
40
|
+
delete: undefined,
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
//# sourceMappingURL=DeclaredGithubBranchProtectionDao.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclaredGithubBranchProtectionDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubBranchProtectionDao.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,mDAA+C;AAC/C,mDAAyD;AAIzD,wGAAqG;AACrG,sGAAmG;AACnG,sGAAmG;AAEnG;;;GAGG;AACU,QAAA,iCAAiC,GAAG,IAAI,4BAAc,CAGjE;IACA,IAAI,EAAE,+DAA8B;IACpC,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,yCAAmB,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACjE,CAAC;YACD,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"DeclaredGithubBranchProtectionDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubBranchProtectionDao.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,mDAA+C;AAC/C,mDAAyD;AAIzD,wGAAqG;AACrG,sGAAmG;AACnG,sGAAmG;AAEnG;;;GAGG;AACU,QAAA,iCAAiC,GAAG,IAAI,4BAAc,CAGjE;IACA,IAAI,EAAE,+DAA8B;IACpC,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,yCAAmB,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACjE,CAAC;YACD,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBAC9B,IAAI,IAAA,8BAAa,EAAC,EAAE,EAAE,EAAE,+DAA8B,EAAE,CAAC,CAAC,KAAK,CAAC;oBAC9D,OAAO,IAAA,yCAAmB,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBACjE,wCAAuB,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YACnE,CAAC;SACF;QACD,GAAG,EAAE;YACH,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,SAAS;SACpB;KACF;IACD,GAAG,EAAE;QACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAChC,OAAO,IAAA,yCAAmB,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAC/B,OAAO,IAAA,yCAAmB,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -18,7 +18,7 @@ exports.DeclaredGithubRepoConfigDao = new declastruct_1.DeclastructDao({
|
|
|
18
18
|
byUnique: async (input, context) => {
|
|
19
19
|
return (0, getRepoConfig_1.getRepoConfig)({ by: { unique: input } }, context);
|
|
20
20
|
},
|
|
21
|
-
byPrimary:
|
|
21
|
+
byPrimary: undefined,
|
|
22
22
|
byRef: async (input, context) => {
|
|
23
23
|
if ((0, domain_objects_1.isRefByUnique)({ of: DeclaredGithubRepoConfig_1.DeclaredGithubRepoConfig })(input))
|
|
24
24
|
return (0, getRepoConfig_1.getRepoConfig)({ by: { unique: input } }, context);
|
|
@@ -26,8 +26,8 @@ exports.DeclaredGithubRepoConfigDao = new declastruct_1.DeclastructDao({
|
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
ref: {
|
|
29
|
-
byPrimary:
|
|
30
|
-
byUnique:
|
|
29
|
+
byPrimary: undefined,
|
|
30
|
+
byUnique: undefined,
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
set: {
|
|
@@ -37,7 +37,7 @@ exports.DeclaredGithubRepoConfigDao = new declastruct_1.DeclastructDao({
|
|
|
37
37
|
upsert: async (input, context) => {
|
|
38
38
|
return (0, setRepoConfig_1.setRepoConfig)({ upsert: input }, context);
|
|
39
39
|
},
|
|
40
|
-
delete:
|
|
40
|
+
delete: undefined,
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
//# sourceMappingURL=DeclaredGithubRepoConfigDao.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclaredGithubRepoConfigDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubRepoConfigDao.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,mDAA+C;AAC/C,mDAAyD;AAIzD,4FAAyF;AACzF,oFAAiF;AACjF,oFAAiF;AAEjF;;;GAGG;AACU,QAAA,2BAA2B,GAAG,IAAI,4BAAc,CAG3D;IACA,IAAI,EAAE,mDAAwB;IAC9B,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,6BAAa,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YAC3D,CAAC;YACD,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"DeclaredGithubRepoConfigDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubRepoConfigDao.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,mDAA+C;AAC/C,mDAAyD;AAIzD,4FAAyF;AACzF,oFAAiF;AACjF,oFAAiF;AAEjF;;;GAGG;AACU,QAAA,2BAA2B,GAAG,IAAI,4BAAc,CAG3D;IACA,IAAI,EAAE,mDAAwB;IAC9B,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,6BAAa,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YAC3D,CAAC;YACD,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBAC9B,IAAI,IAAA,8BAAa,EAAC,EAAE,EAAE,EAAE,mDAAwB,EAAE,CAAC,CAAC,KAAK,CAAC;oBACxD,OAAO,IAAA,6BAAa,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBAC3D,wCAAuB,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YACnE,CAAC;SACF;QACD,GAAG,EAAE;YACH,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,SAAS;SACpB;KACF;IACD,GAAG,EAAE;QACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAChC,OAAO,IAAA,6BAAa,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAC/B,OAAO,IAAA,6BAAa,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;QACD,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -18,7 +18,7 @@ exports.DeclaredGithubRepoDao = new declastruct_1.DeclastructDao({
|
|
|
18
18
|
byUnique: async (input, context) => {
|
|
19
19
|
return (0, getRepo_1.getRepo)({ by: { unique: input } }, context);
|
|
20
20
|
},
|
|
21
|
-
byPrimary:
|
|
21
|
+
byPrimary: undefined,
|
|
22
22
|
byRef: async (input, context) => {
|
|
23
23
|
if ((0, domain_objects_1.isRefByUnique)({ of: DeclaredGithubRepo_1.DeclaredGithubRepo })(input))
|
|
24
24
|
return (0, getRepo_1.getRepo)({ by: { unique: input } }, context);
|
|
@@ -26,8 +26,8 @@ exports.DeclaredGithubRepoDao = new declastruct_1.DeclastructDao({
|
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
ref: {
|
|
29
|
-
byPrimary:
|
|
30
|
-
byUnique:
|
|
29
|
+
byPrimary: undefined,
|
|
30
|
+
byUnique: undefined,
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
set: {
|
|
@@ -37,7 +37,7 @@ exports.DeclaredGithubRepoDao = new declastruct_1.DeclastructDao({
|
|
|
37
37
|
upsert: async (input, context) => {
|
|
38
38
|
return (0, setRepo_1.setRepo)({ upsert: input }, context);
|
|
39
39
|
},
|
|
40
|
-
delete:
|
|
40
|
+
delete: undefined,
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
//# sourceMappingURL=DeclaredGithubRepoDao.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclaredGithubRepoDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubRepoDao.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,mDAA+C;AAC/C,mDAAyD;AAIzD,gFAA6E;AAC7E,kEAA+D;AAC/D,kEAA+D;AAE/D;;;GAGG;AACU,QAAA,qBAAqB,GAAG,IAAI,4BAAc,CAGrD;IACA,IAAI,EAAE,uCAAkB;IACxB,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,iBAAO,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACrD,CAAC;YACD,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"DeclaredGithubRepoDao.js","sourceRoot":"","sources":["../../../src/access/daos/DeclaredGithubRepoDao.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,mDAA+C;AAC/C,mDAAyD;AAIzD,gFAA6E;AAC7E,kEAA+D;AAC/D,kEAA+D;AAE/D;;;GAGG;AACU,QAAA,qBAAqB,GAAG,IAAI,4BAAc,CAGrD;IACA,IAAI,EAAE,uCAAkB;IACxB,GAAG,EAAE;QACH,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACjC,OAAO,IAAA,iBAAO,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACrD,CAAC;YACD,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBAC9B,IAAI,IAAA,8BAAa,EAAC,EAAE,EAAE,EAAE,uCAAkB,EAAE,CAAC,CAAC,KAAK,CAAC;oBAClD,OAAO,IAAA,iBAAO,EAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBACrD,wCAAuB,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YACnE,CAAC;SACF;QACD,GAAG,EAAE;YACH,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,SAAS;SACpB;KACF;IACD,GAAG,EAAE;QACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAChC,OAAO,IAAA,iBAAO,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YAC/B,OAAO,IAAA,iBAAO,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
* .what = public SDK exports for declastruct-github package
|
|
3
3
|
* .why = enables consumers to use the declastruct provider interface and domain objects
|
|
4
4
|
*/
|
|
5
|
+
export { DeclaredGithubApp } from '../../domain.objects/DeclaredGithubApp';
|
|
6
|
+
export { DeclaredGithubAppInstallation } from '../../domain.objects/DeclaredGithubAppInstallation';
|
|
7
|
+
export type { DeclaredGithubAppPermissions } from '../../domain.objects/DeclaredGithubAppPermissions';
|
|
5
8
|
export { DeclaredGithubBranch } from '../../domain.objects/DeclaredGithubBranch';
|
|
6
9
|
export { DeclaredGithubBranchProtection } from '../../domain.objects/DeclaredGithubBranchProtection';
|
|
10
|
+
export { DeclaredGithubOwner } from '../../domain.objects/DeclaredGithubOwner';
|
|
7
11
|
export { DeclaredGithubRepo } from '../../domain.objects/DeclaredGithubRepo';
|
|
8
12
|
export { DeclaredGithubRepoConfig } from '../../domain.objects/DeclaredGithubRepoConfig';
|
|
9
13
|
export type { DeclastructGithubProvider } from '../../domain.objects/DeclastructGithubProvider';
|
|
@@ -4,17 +4,23 @@
|
|
|
4
4
|
* .why = enables consumers to use the declastruct provider interface and domain objects
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.getDeclastructGithubProvider = exports.DeclaredGithubRepoConfig = exports.DeclaredGithubRepo = exports.DeclaredGithubBranchProtection = exports.DeclaredGithubBranch = void 0;
|
|
7
|
+
exports.getDeclastructGithubProvider = exports.DeclaredGithubRepoConfig = exports.DeclaredGithubRepo = exports.DeclaredGithubOwner = exports.DeclaredGithubBranchProtection = exports.DeclaredGithubBranch = exports.DeclaredGithubAppInstallation = exports.DeclaredGithubApp = void 0;
|
|
8
|
+
// domain objects - apps
|
|
9
|
+
var DeclaredGithubApp_1 = require("../../domain.objects/DeclaredGithubApp");
|
|
10
|
+
Object.defineProperty(exports, "DeclaredGithubApp", { enumerable: true, get: function () { return DeclaredGithubApp_1.DeclaredGithubApp; } });
|
|
11
|
+
var DeclaredGithubAppInstallation_1 = require("../../domain.objects/DeclaredGithubAppInstallation");
|
|
12
|
+
Object.defineProperty(exports, "DeclaredGithubAppInstallation", { enumerable: true, get: function () { return DeclaredGithubAppInstallation_1.DeclaredGithubAppInstallation; } });
|
|
13
|
+
// domain objects - repos
|
|
8
14
|
var DeclaredGithubBranch_1 = require("../../domain.objects/DeclaredGithubBranch");
|
|
9
15
|
Object.defineProperty(exports, "DeclaredGithubBranch", { enumerable: true, get: function () { return DeclaredGithubBranch_1.DeclaredGithubBranch; } });
|
|
10
16
|
var DeclaredGithubBranchProtection_1 = require("../../domain.objects/DeclaredGithubBranchProtection");
|
|
11
17
|
Object.defineProperty(exports, "DeclaredGithubBranchProtection", { enumerable: true, get: function () { return DeclaredGithubBranchProtection_1.DeclaredGithubBranchProtection; } });
|
|
12
|
-
|
|
18
|
+
var DeclaredGithubOwner_1 = require("../../domain.objects/DeclaredGithubOwner");
|
|
19
|
+
Object.defineProperty(exports, "DeclaredGithubOwner", { enumerable: true, get: function () { return DeclaredGithubOwner_1.DeclaredGithubOwner; } });
|
|
13
20
|
var DeclaredGithubRepo_1 = require("../../domain.objects/DeclaredGithubRepo");
|
|
14
21
|
Object.defineProperty(exports, "DeclaredGithubRepo", { enumerable: true, get: function () { return DeclaredGithubRepo_1.DeclaredGithubRepo; } });
|
|
15
22
|
var DeclaredGithubRepoConfig_1 = require("../../domain.objects/DeclaredGithubRepoConfig");
|
|
16
23
|
Object.defineProperty(exports, "DeclaredGithubRepoConfig", { enumerable: true, get: function () { return DeclaredGithubRepoConfig_1.DeclaredGithubRepoConfig; } });
|
|
17
|
-
// provider
|
|
18
24
|
var getDeclastructGithubProvider_1 = require("../../domain.operations/provider/getDeclastructGithubProvider");
|
|
19
25
|
Object.defineProperty(exports, "getDeclastructGithubProvider", { enumerable: true, get: function () { return getDeclastructGithubProvider_1.getDeclastructGithubProvider; } });
|
|
20
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/sdks/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kFAAiF;AAAxE,4HAAA,oBAAoB,OAAA;AAC7B,sGAAqG;AAA5F,gJAAA,8BAA8B,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/sdks/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wBAAwB;AACxB,4EAA2E;AAAlE,sHAAA,iBAAiB,OAAA;AAC1B,oGAAmG;AAA1F,8IAAA,6BAA6B,OAAA;AAEtC,yBAAyB;AACzB,kFAAiF;AAAxE,4HAAA,oBAAoB,OAAA;AAC7B,sGAAqG;AAA5F,gJAAA,8BAA8B,OAAA;AACvC,gFAA+E;AAAtE,0HAAA,mBAAmB,OAAA;AAC5B,8EAA6E;AAApE,wHAAA,kBAAkB,OAAA;AAC3B,0FAAyF;AAAhF,oIAAA,wBAAwB,OAAA;AAIjC,8GAA6G;AAApG,4IAAA,4BAA4B,OAAA"}
|
|
@@ -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,126 @@
|
|
|
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 secrets
|
|
102
|
+
*/
|
|
103
|
+
secrets?: GithubAppPermissionLevel | null;
|
|
104
|
+
/**
|
|
105
|
+
* .what = project management
|
|
106
|
+
*/
|
|
107
|
+
projects?: GithubAppPermissionLevel | null;
|
|
108
|
+
/**
|
|
109
|
+
* .what = runner infrastructure (self-hosted runners)
|
|
110
|
+
*/
|
|
111
|
+
selfHostedRunners?: GithubAppPermissionLevel | null;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* .what = a declarative structure which represents a GitHub App's permissions
|
|
115
|
+
* .why = enables type-safe permission configuration for GitHub Apps following declastruct patterns
|
|
116
|
+
*/
|
|
117
|
+
export interface DeclaredGithubAppPermissions {
|
|
118
|
+
repository: DeclaredGithubAppRepositoryPermissions | null;
|
|
119
|
+
organization: DeclaredGithubAppOrganizationPermissions | null;
|
|
120
|
+
}
|
|
121
|
+
export declare class DeclaredGithubAppPermissions extends DomainLiteral<DeclaredGithubAppPermissions> implements DeclaredGithubAppPermissions {
|
|
122
|
+
static nested: {
|
|
123
|
+
repository: typeof DomainLiteral;
|
|
124
|
+
organization: typeof DomainLiteral;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
@@ -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;AAkJ/C,MAAa,4BACX,SAAQ,8BAA2C;;AADrD,oEAQC;AAJe,mCAAM,GAAG;IACrB,UAAU,EAAE,8BAAa;IACzB,YAAY,EAAE,8BAAa;CAC5B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DomainLiteral } from 'domain-objects';
|
|
2
|
+
/**
|
|
3
|
+
* .what = a declarative structure representing a GitHub owner (organization or user)
|
|
4
|
+
* .why = provides a reusable type for owner references across GitHub domain objects
|
|
5
|
+
*/
|
|
6
|
+
export interface DeclaredGithubOwner {
|
|
7
|
+
/**
|
|
8
|
+
* .what = the type of owner
|
|
9
|
+
*/
|
|
10
|
+
type: 'organization' | 'user';
|
|
11
|
+
/**
|
|
12
|
+
* .what = the login/slug of the owner
|
|
13
|
+
*/
|
|
14
|
+
slug: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class DeclaredGithubOwner extends DomainLiteral<DeclaredGithubOwner> implements DeclaredGithubOwner {
|
|
17
|
+
}
|