@terrantula/sdk 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/dist/{audit-export-DweJuhQT.d.mts → audit-export-D7OoXu9m.d.mts} +16 -1
- package/dist/{audit-export-DweJuhQT.d.ts → audit-export-D7OoXu9m.d.ts} +16 -1
- package/dist/{chunk-WQORVQWY.mjs → chunk-H6TVESFB.mjs} +35 -6
- package/dist/index.d.mts +274 -277
- package/dist/index.d.ts +274 -277
- package/dist/index.js +35 -6
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +227 -94
- package/dist/local.d.ts +227 -94
- package/dist/local.js +35 -6
- package/dist/local.mjs +1 -1
- package/package.json +3 -3
|
@@ -70,6 +70,21 @@ interface AdminMetricsOverview {
|
|
|
70
70
|
activeSessions: number;
|
|
71
71
|
mauApprox: number;
|
|
72
72
|
}
|
|
73
|
+
interface AdminGitHubInstallation {
|
|
74
|
+
id: string;
|
|
75
|
+
/** Stringified GitHub installation ID (bigint → text from the DB). */
|
|
76
|
+
githubInstallationId: string;
|
|
77
|
+
githubOrgLogin: string;
|
|
78
|
+
status: string;
|
|
79
|
+
grantedReposCount: number;
|
|
80
|
+
installedAt: string;
|
|
81
|
+
lastEventAt: string;
|
|
82
|
+
orgName: string | null;
|
|
83
|
+
orgSlug: string | null;
|
|
84
|
+
}
|
|
85
|
+
interface AdminGitHubInstallationListResponse {
|
|
86
|
+
data: AdminGitHubInstallation[];
|
|
87
|
+
}
|
|
73
88
|
|
|
74
89
|
type SnapshotOp = 'created' | 'updated' | 'deleted' | 'unchanged' | 'failed';
|
|
75
90
|
|
|
@@ -111,4 +126,4 @@ interface TestConnectionResponse {
|
|
|
111
126
|
error?: string;
|
|
112
127
|
}
|
|
113
128
|
|
|
114
|
-
export { type AuditExportConfigResponse as A, type ExportCatalogResult as E, type SnapshotOp as S, type TokenSource as T, type SchemaFn as a, type TestConnectionResponse as b, type AuditExportRunResponse as c, type AdminAuditListResponse as d, type AdminOrgListResponse as e, type AdminOrgDetail as f, type AdminSuspendResponse as g, type AdminMetricsOverview as h, type
|
|
129
|
+
export { type AuditExportConfigResponse as A, type ExportCatalogResult as E, type SnapshotOp as S, type TokenSource as T, type SchemaFn as a, type TestConnectionResponse as b, type AuditExportRunResponse as c, type AdminAuditListResponse as d, type AdminOrgListResponse as e, type AdminOrgDetail as f, type AdminSuspendResponse as g, type AdminMetricsOverview as h, type AdminGitHubInstallationListResponse as i, type AdminAuditEvent as j, type AdminGitHubInstallation as k, type AdminOrgMember as l, type AdminOrgProject as m, type AdminOrgSummary as n, TerrantulaError as o, withSchema as w };
|
|
@@ -70,6 +70,21 @@ interface AdminMetricsOverview {
|
|
|
70
70
|
activeSessions: number;
|
|
71
71
|
mauApprox: number;
|
|
72
72
|
}
|
|
73
|
+
interface AdminGitHubInstallation {
|
|
74
|
+
id: string;
|
|
75
|
+
/** Stringified GitHub installation ID (bigint → text from the DB). */
|
|
76
|
+
githubInstallationId: string;
|
|
77
|
+
githubOrgLogin: string;
|
|
78
|
+
status: string;
|
|
79
|
+
grantedReposCount: number;
|
|
80
|
+
installedAt: string;
|
|
81
|
+
lastEventAt: string;
|
|
82
|
+
orgName: string | null;
|
|
83
|
+
orgSlug: string | null;
|
|
84
|
+
}
|
|
85
|
+
interface AdminGitHubInstallationListResponse {
|
|
86
|
+
data: AdminGitHubInstallation[];
|
|
87
|
+
}
|
|
73
88
|
|
|
74
89
|
type SnapshotOp = 'created' | 'updated' | 'deleted' | 'unchanged' | 'failed';
|
|
75
90
|
|
|
@@ -111,4 +126,4 @@ interface TestConnectionResponse {
|
|
|
111
126
|
error?: string;
|
|
112
127
|
}
|
|
113
128
|
|
|
114
|
-
export { type AuditExportConfigResponse as A, type ExportCatalogResult as E, type SnapshotOp as S, type TokenSource as T, type SchemaFn as a, type TestConnectionResponse as b, type AuditExportRunResponse as c, type AdminAuditListResponse as d, type AdminOrgListResponse as e, type AdminOrgDetail as f, type AdminSuspendResponse as g, type AdminMetricsOverview as h, type
|
|
129
|
+
export { type AuditExportConfigResponse as A, type ExportCatalogResult as E, type SnapshotOp as S, type TokenSource as T, type SchemaFn as a, type TestConnectionResponse as b, type AuditExportRunResponse as c, type AdminAuditListResponse as d, type AdminOrgListResponse as e, type AdminOrgDetail as f, type AdminSuspendResponse as g, type AdminMetricsOverview as h, type AdminGitHubInstallationListResponse as i, type AdminAuditEvent as j, type AdminGitHubInstallation as k, type AdminOrgMember as l, type AdminOrgProject as m, type AdminOrgSummary as n, TerrantulaError as o, withSchema as w };
|
|
@@ -954,13 +954,23 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
954
954
|
)
|
|
955
955
|
},
|
|
956
956
|
projects: {
|
|
957
|
+
list: withSchema(
|
|
958
|
+
z8.object({
|
|
959
|
+
orgId: z8.string().describe("Organization ID"),
|
|
960
|
+
projectId: z8.string().describe("Project ID")
|
|
961
|
+
}),
|
|
962
|
+
(params) => call(
|
|
963
|
+
cloud.orgs[":orgId"].projects[":projectId"]["github-repos"].$get({
|
|
964
|
+
param: params
|
|
965
|
+
})
|
|
966
|
+
)
|
|
967
|
+
),
|
|
957
968
|
linkRepo: withSchema(
|
|
958
969
|
z8.object({
|
|
959
970
|
orgId: z8.string().describe("Organization ID"),
|
|
960
971
|
projectId: z8.string().describe("Project ID"),
|
|
961
|
-
installationId: z8.string().describe("
|
|
962
|
-
|
|
963
|
-
name: z8.string().describe("GitHub repo name")
|
|
972
|
+
installationId: z8.string().describe("github_installations.id (UUID)"),
|
|
973
|
+
repoFullName: z8.string().describe('GitHub repo "owner/name"')
|
|
964
974
|
}),
|
|
965
975
|
(params) => {
|
|
966
976
|
const { orgId, projectId, ...body } = params;
|
|
@@ -976,11 +986,10 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
976
986
|
z8.object({
|
|
977
987
|
orgId: z8.string().describe("Organization ID"),
|
|
978
988
|
projectId: z8.string().describe("Project ID"),
|
|
979
|
-
|
|
980
|
-
name: z8.string().describe("GitHub repo name")
|
|
989
|
+
id: z8.string().describe("project_github_repos.id (UUID) \u2014 returned by linkRepo")
|
|
981
990
|
}),
|
|
982
991
|
(params) => call(
|
|
983
|
-
cloud.orgs[":orgId"].projects[":projectId"]["github-repos"][":
|
|
992
|
+
cloud.orgs[":orgId"].projects[":projectId"]["github-repos"][":id"].$delete({
|
|
984
993
|
param: params
|
|
985
994
|
})
|
|
986
995
|
)
|
|
@@ -1632,6 +1641,26 @@ function createAdminClient(baseUrl, hcOpts) {
|
|
|
1632
1641
|
await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
|
|
1633
1642
|
)
|
|
1634
1643
|
)
|
|
1644
|
+
},
|
|
1645
|
+
integrations: {
|
|
1646
|
+
githubInstallations: {
|
|
1647
|
+
/**
|
|
1648
|
+
* GET /admin/integrations/github-installations
|
|
1649
|
+
* Cross-tenant list of all GitHub App installations with status,
|
|
1650
|
+
* granted-repo count, and last lifecycle event timestamp.
|
|
1651
|
+
* Requires super-admin.
|
|
1652
|
+
*/
|
|
1653
|
+
list: withSchema(
|
|
1654
|
+
z18.object({}),
|
|
1655
|
+
async () => callRaw2(
|
|
1656
|
+
await rawRequest2(
|
|
1657
|
+
baseUrl,
|
|
1658
|
+
hcOpts,
|
|
1659
|
+
"/admin/integrations/github-installations"
|
|
1660
|
+
)
|
|
1661
|
+
)
|
|
1662
|
+
)
|
|
1663
|
+
}
|
|
1635
1664
|
}
|
|
1636
1665
|
};
|
|
1637
1666
|
}
|