@ricsam/r5d-api 0.0.73 → 0.0.74
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/cjs/index.cjs +31 -1
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/index.mjs +31 -1
- package/dist/mjs/package.json +1 -1
- package/dist/types/index.d.ts +39 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -303,7 +303,37 @@ class R5dctlClient {
|
|
|
303
303
|
containerName: input.containerName,
|
|
304
304
|
window: input.window
|
|
305
305
|
}
|
|
306
|
-
})
|
|
306
|
+
}),
|
|
307
|
+
credentials: {
|
|
308
|
+
create: (name) => this.request({
|
|
309
|
+
method: "POST",
|
|
310
|
+
path: "/api/user/managed-vcluster/credentials",
|
|
311
|
+
body: { name }
|
|
312
|
+
}),
|
|
313
|
+
list: () => this.request({
|
|
314
|
+
method: "GET",
|
|
315
|
+
path: "/api/user/managed-vcluster/credentials"
|
|
316
|
+
}),
|
|
317
|
+
revoke: (credentialId) => this.request({
|
|
318
|
+
method: "DELETE",
|
|
319
|
+
path: `/api/user/managed-vcluster/credentials/${encodeURIComponent(credentialId)}`
|
|
320
|
+
})
|
|
321
|
+
},
|
|
322
|
+
trustedWorkflows: {
|
|
323
|
+
add: (input) => this.request({
|
|
324
|
+
method: "POST",
|
|
325
|
+
path: "/api/user/managed-vcluster/trusted-workflows",
|
|
326
|
+
body: input
|
|
327
|
+
}),
|
|
328
|
+
list: () => this.request({
|
|
329
|
+
method: "GET",
|
|
330
|
+
path: "/api/user/managed-vcluster/trusted-workflows"
|
|
331
|
+
}),
|
|
332
|
+
revoke: (workflowId) => this.request({
|
|
333
|
+
method: "DELETE",
|
|
334
|
+
path: `/api/user/managed-vcluster/trusted-workflows/${encodeURIComponent(workflowId)}`
|
|
335
|
+
})
|
|
336
|
+
}
|
|
307
337
|
};
|
|
308
338
|
projects = {
|
|
309
339
|
list: () => this.request({
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/index.mjs
CHANGED
|
@@ -279,7 +279,37 @@ class R5dctlClient {
|
|
|
279
279
|
containerName: input.containerName,
|
|
280
280
|
window: input.window
|
|
281
281
|
}
|
|
282
|
-
})
|
|
282
|
+
}),
|
|
283
|
+
credentials: {
|
|
284
|
+
create: (name) => this.request({
|
|
285
|
+
method: "POST",
|
|
286
|
+
path: "/api/user/managed-vcluster/credentials",
|
|
287
|
+
body: { name }
|
|
288
|
+
}),
|
|
289
|
+
list: () => this.request({
|
|
290
|
+
method: "GET",
|
|
291
|
+
path: "/api/user/managed-vcluster/credentials"
|
|
292
|
+
}),
|
|
293
|
+
revoke: (credentialId) => this.request({
|
|
294
|
+
method: "DELETE",
|
|
295
|
+
path: `/api/user/managed-vcluster/credentials/${encodeURIComponent(credentialId)}`
|
|
296
|
+
})
|
|
297
|
+
},
|
|
298
|
+
trustedWorkflows: {
|
|
299
|
+
add: (input) => this.request({
|
|
300
|
+
method: "POST",
|
|
301
|
+
path: "/api/user/managed-vcluster/trusted-workflows",
|
|
302
|
+
body: input
|
|
303
|
+
}),
|
|
304
|
+
list: () => this.request({
|
|
305
|
+
method: "GET",
|
|
306
|
+
path: "/api/user/managed-vcluster/trusted-workflows"
|
|
307
|
+
}),
|
|
308
|
+
revoke: (workflowId) => this.request({
|
|
309
|
+
method: "DELETE",
|
|
310
|
+
path: `/api/user/managed-vcluster/trusted-workflows/${encodeURIComponent(workflowId)}`
|
|
311
|
+
})
|
|
312
|
+
}
|
|
283
313
|
};
|
|
284
314
|
projects = {
|
|
285
315
|
list: () => this.request({
|
package/dist/mjs/package.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -316,6 +316,26 @@ export type R5dctlApiKey = {
|
|
|
316
316
|
createdAt: string;
|
|
317
317
|
lastUsedAt: string | null;
|
|
318
318
|
};
|
|
319
|
+
export type ManagedVClusterAccessCredential = {
|
|
320
|
+
id: string;
|
|
321
|
+
kind: "profile" | "github_actions";
|
|
322
|
+
name: string | null;
|
|
323
|
+
expiresAt: string | null;
|
|
324
|
+
lastUsedAt: string | null;
|
|
325
|
+
revokedAt: string | null;
|
|
326
|
+
createdAt: string;
|
|
327
|
+
};
|
|
328
|
+
export type ManagedVClusterTrustedWorkflow = {
|
|
329
|
+
id: string;
|
|
330
|
+
provider: "github";
|
|
331
|
+
repositoryId: string;
|
|
332
|
+
repository: string;
|
|
333
|
+
workflowPath: string;
|
|
334
|
+
role: "cluster_admin";
|
|
335
|
+
revokedAt: string | null;
|
|
336
|
+
createdAt: string;
|
|
337
|
+
updatedAt: string;
|
|
338
|
+
};
|
|
319
339
|
export type R5dctlProcessRunStatus = "starting" | "running" | "exited" | "cancelled" | "failed";
|
|
320
340
|
export type R5dctlProcessTarget = {
|
|
321
341
|
type: "project";
|
|
@@ -628,6 +648,25 @@ export declare class R5dctlClient {
|
|
|
628
648
|
containerName: string;
|
|
629
649
|
window?: "24h" | "7d";
|
|
630
650
|
}) => Promise<R5dctlK8sResourceHistory>;
|
|
651
|
+
credentials: {
|
|
652
|
+
create: (name: string) => Promise<ManagedVClusterAccessCredential & {
|
|
653
|
+
kubeconfig: string;
|
|
654
|
+
}>;
|
|
655
|
+
list: () => Promise<ManagedVClusterAccessCredential[]>;
|
|
656
|
+
revoke: (credentialId: string) => Promise<{
|
|
657
|
+
success: boolean;
|
|
658
|
+
}>;
|
|
659
|
+
};
|
|
660
|
+
trustedWorkflows: {
|
|
661
|
+
add: (input: {
|
|
662
|
+
repository: string;
|
|
663
|
+
workflowPath: string;
|
|
664
|
+
}) => Promise<ManagedVClusterTrustedWorkflow>;
|
|
665
|
+
list: () => Promise<ManagedVClusterTrustedWorkflow[]>;
|
|
666
|
+
revoke: (workflowId: string) => Promise<{
|
|
667
|
+
success: boolean;
|
|
668
|
+
}>;
|
|
669
|
+
};
|
|
631
670
|
};
|
|
632
671
|
readonly projects: {
|
|
633
672
|
list: () => Promise<R5dctlProject[]>;
|