@lifesi/genesis 0.1.1 → 0.1.3
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/beacons.d.ts +46 -0
- package/dist/beacons.js +20 -0
- package/dist/client.d.ts +7669 -1635
- package/dist/client.js +54 -5
- package/dist/dials.d.ts +171 -1
- package/dist/dials.js +40 -0
- package/dist/fleets.d.ts +109 -1
- package/dist/fleets.js +89 -1
- package/dist/flocks.d.ts +73 -0
- package/dist/flocks.js +22 -0
- package/dist/generated/operations.d.ts +7669 -1635
- package/dist/generated/operations.js +9193 -1691
- package/dist/generated/schema.d.ts +16979 -5698
- package/dist/genesis.d.ts +795 -13
- package/dist/genesis.js +21 -0
- package/dist/genesis.openapi.json +23483 -7599
- package/dist/henry.d.ts +7 -0
- package/dist/henry.js +23 -0
- package/dist/hives-cells.d.ts +127 -0
- package/dist/hives-cells.js +151 -0
- package/dist/hives-environment.d.ts +28 -0
- package/dist/hives-environment.js +58 -0
- package/dist/hives-functions.d.ts +1 -1
- package/dist/hives-functions.js +3 -1
- package/dist/hives-marketplace.d.ts +128 -0
- package/dist/hives-marketplace.js +187 -0
- package/dist/hives-node.js +2 -0
- package/dist/hives-operations.d.ts +304 -0
- package/dist/hives-operations.js +39 -0
- package/dist/hives-queues.d.ts +121 -0
- package/dist/hives-queues.js +106 -0
- package/dist/hives-resources-transport.d.ts +18 -0
- package/dist/hives-resources-transport.js +165 -0
- package/dist/hives-runtimes.d.ts +34 -0
- package/dist/hives-runtimes.js +32 -0
- package/dist/hives-volumes.d.ts +64 -0
- package/dist/hives-volumes.js +117 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +3 -0
- package/dist/runner-grant.d.ts +10 -0
- package/dist/runner-grant.js +133 -0
- package/dist/runner.d.ts +16 -0
- package/dist/runner.js +4 -0
- package/package.json +6 -1
package/dist/flocks.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { GenesisClient } from './client.js';
|
|
2
|
+
import type { OperationInput } from './types.js';
|
|
3
|
+
/** Org scope comes from the LifeID credential verified by the gateway. */
|
|
4
|
+
export declare function flocksModule(client: GenesisClient): {
|
|
5
|
+
readiness: {
|
|
6
|
+
get: () => Promise<{
|
|
7
|
+
node_enrollment_available: boolean;
|
|
8
|
+
reason_code?: "node_credential_issuer_unavailable";
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
nodes: {
|
|
12
|
+
list: () => Promise<{
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
nickname: string;
|
|
16
|
+
platform: string;
|
|
17
|
+
cpu_count: number;
|
|
18
|
+
state: "enrolled" | "revoked";
|
|
19
|
+
last_seen_at: number;
|
|
20
|
+
enrolled_at: number;
|
|
21
|
+
}[]>;
|
|
22
|
+
rename: (id: string, nickname: string) => Promise<{
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
nickname: string;
|
|
26
|
+
platform: string;
|
|
27
|
+
cpu_count: number;
|
|
28
|
+
state: "enrolled" | "revoked";
|
|
29
|
+
last_seen_at: number;
|
|
30
|
+
enrolled_at: number;
|
|
31
|
+
}>;
|
|
32
|
+
revoke: (id: string) => Promise<{
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
nickname: string;
|
|
36
|
+
platform: string;
|
|
37
|
+
cpu_count: number;
|
|
38
|
+
state: "enrolled" | "revoked";
|
|
39
|
+
last_seen_at: number;
|
|
40
|
+
enrolled_at: number;
|
|
41
|
+
}>;
|
|
42
|
+
heartbeat: (id: string, nodeBinding: string) => Promise<{
|
|
43
|
+
accepted: boolean;
|
|
44
|
+
}>;
|
|
45
|
+
enroll: (body: OperationInput<"flocks_enrollNode">["body"]) => Promise<{
|
|
46
|
+
node: import("./index.js").components["schemas"]["Flocks.Node"];
|
|
47
|
+
node_binding: string;
|
|
48
|
+
heartbeat_interval_seconds: number;
|
|
49
|
+
}>;
|
|
50
|
+
activate: (id: string, body: OperationInput<"flocks_activateNode">["body"]) => Promise<{
|
|
51
|
+
node: import("./index.js").components["schemas"]["Flocks.Node"];
|
|
52
|
+
activated: boolean;
|
|
53
|
+
}>;
|
|
54
|
+
rotateCredential: (id: string, body: OperationInput<"flocks_rotateNodeCredential">["body"]) => Promise<{
|
|
55
|
+
accepted: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
};
|
|
58
|
+
joinTokens: {
|
|
59
|
+
exchange: (body: OperationInput<"flocks_exchangeJoinToken">["body"]) => Promise<{
|
|
60
|
+
node_id: string;
|
|
61
|
+
organization_id: string;
|
|
62
|
+
credential_id: string;
|
|
63
|
+
credential_value: string;
|
|
64
|
+
scopes: "flocks:node"[];
|
|
65
|
+
expires_at: string;
|
|
66
|
+
node_nonce_hash?: string;
|
|
67
|
+
}>;
|
|
68
|
+
create: (ttlSeconds?: number) => Promise<{
|
|
69
|
+
token: string;
|
|
70
|
+
expires_at: number;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
};
|
package/dist/flocks.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Org scope comes from the LifeID credential verified by the gateway. */
|
|
2
|
+
export function flocksModule(client) {
|
|
3
|
+
const nodePath = (id) => ({ id });
|
|
4
|
+
return {
|
|
5
|
+
readiness: {
|
|
6
|
+
get: () => client.request('flocks_getEnrollmentReadiness'),
|
|
7
|
+
},
|
|
8
|
+
nodes: {
|
|
9
|
+
list: () => client.request('flocks_listNodes'),
|
|
10
|
+
rename: (id, nickname) => client.request('flocks_renameNode', { ...nodePath(id), body: { nickname } }),
|
|
11
|
+
revoke: (id) => client.request('flocks_revokeNode', nodePath(id)),
|
|
12
|
+
heartbeat: (id, nodeBinding) => client.request('flocks_heartbeatNode', { ...nodePath(id), body: { node_binding: nodeBinding } }),
|
|
13
|
+
enroll: (body) => client.request('flocks_enrollNode', { body }),
|
|
14
|
+
activate: (id, body) => client.request('flocks_activateNode', { id, body }),
|
|
15
|
+
rotateCredential: (id, body) => client.request('flocks_rotateNodeCredential', { id, body }),
|
|
16
|
+
},
|
|
17
|
+
joinTokens: {
|
|
18
|
+
exchange: (body) => client.request('flocks_exchangeJoinToken', { body }),
|
|
19
|
+
create: (ttlSeconds = 600) => client.request('flocks_createJoinToken', { body: { ttl_seconds: ttlSeconds } }),
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|