@onesi/genesis 0.1.13 → 0.2.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.
Files changed (80) hide show
  1. package/README.md +1 -1
  2. package/dist/auto.d.ts +1010 -0
  3. package/dist/auto.js +125 -0
  4. package/dist/beacons.d.ts +42 -0
  5. package/dist/beacons.js +71 -0
  6. package/dist/blinds-owner-enrollment.d.ts +121 -0
  7. package/dist/blinds-owner-enrollment.js +23 -2
  8. package/dist/boxes.d.ts +1074 -0
  9. package/dist/boxes.js +338 -0
  10. package/dist/client.d.ts +3 -19947
  11. package/dist/client.js +127 -18
  12. package/dist/errors.d.ts +6 -0
  13. package/dist/errors.js +38 -3
  14. package/dist/flares.d.ts +32 -0
  15. package/dist/flares.js +5 -0
  16. package/dist/fleets.d.ts +32 -0
  17. package/dist/fleets.js +59 -6
  18. package/dist/flocks.d.ts +334 -1
  19. package/dist/flocks.js +85 -0
  20. package/dist/foundry.d.ts +429 -0
  21. package/dist/foundry.js +135 -0
  22. package/dist/garden.d.ts +754 -0
  23. package/dist/garden.js +76 -0
  24. package/dist/gateway.d.ts +365 -0
  25. package/dist/gateway.js +82 -0
  26. package/dist/gears.d.ts +121 -2
  27. package/dist/gears.js +24 -2
  28. package/dist/generated/operations.d.ts +3 -19948
  29. package/dist/generated/operations.js +64214 -13423
  30. package/dist/generated/schema.d.ts +85708 -17364
  31. package/dist/genesis.d.ts +9041 -1250
  32. package/dist/genesis.js +92 -25
  33. package/dist/genesis.openapi.json +133172 -31267
  34. package/dist/henry.d.ts +202 -1
  35. package/dist/henry.js +223 -0
  36. package/dist/hives-cells.d.ts +8 -3
  37. package/dist/hives-cells.js +17 -4
  38. package/dist/hives-environment.d.ts +9 -0
  39. package/dist/hives-environment.js +22 -0
  40. package/dist/hives-node.js +4 -1
  41. package/dist/hives-operations.d.ts +121 -3
  42. package/dist/hives-operations.js +2 -0
  43. package/dist/hives-platform.d.ts +149 -0
  44. package/dist/hives-platform.js +183 -0
  45. package/dist/hives-resources-transport.d.ts +7 -1
  46. package/dist/hives-resources-transport.js +10 -2
  47. package/dist/hives-sse.d.ts +24 -0
  48. package/dist/hives-sse.js +111 -0
  49. package/dist/hives-topics.d.ts +4 -3
  50. package/dist/hives-topics.js +9 -4
  51. package/dist/iam-directory.d.ts +8 -0
  52. package/dist/iam-directory.js +23 -0
  53. package/dist/iam.d.ts +397 -0
  54. package/dist/iam.js +92 -0
  55. package/dist/idempotency.d.ts +3 -0
  56. package/dist/idempotency.js +27 -0
  57. package/dist/index.d.ts +22 -6
  58. package/dist/index.js +19 -5
  59. package/dist/instances.d.ts +177 -2
  60. package/dist/instances.js +37 -5
  61. package/dist/minds-agent.d.ts +28 -0
  62. package/dist/minds-agent.js +53 -10
  63. package/dist/minds-engine.d.ts +394 -0
  64. package/dist/minds-engine.js +555 -0
  65. package/dist/minds.d.ts +109 -1
  66. package/dist/minds.js +49 -14
  67. package/dist/orgs.d.ts +405 -0
  68. package/dist/orgs.js +63 -0
  69. package/dist/redact.d.ts +37 -0
  70. package/dist/redact.js +330 -0
  71. package/dist/runner.d.ts +4 -0
  72. package/dist/runner.js +1 -0
  73. package/dist/scopes.d.ts +316 -0
  74. package/dist/scopes.js +40 -0
  75. package/dist/taps.d.ts +118 -0
  76. package/dist/taps.js +45 -0
  77. package/dist/traces.d.ts +574 -0
  78. package/dist/traces.js +97 -0
  79. package/dist/types.d.ts +12 -1
  80. package/package.json +1 -1
package/dist/auto.js ADDED
@@ -0,0 +1,125 @@
1
+ import { idempotencyHeaders, ifMatchHeaders } from './idempotency.js';
2
+ /** Auto, your organization's operating structure: orgs, mandates, spend actions, approvals, the org structure (units, positions with
3
+ * delegated authority, occupants, goals and scorecards), how the org operates (budgets, policies, cadences,
4
+ * succession and acting appointments), verifiable authority (the authority check with its signed receipt,
5
+ * AuthorityCredentials, token verification) and the decision ledger. Auto never runs or controls an agent.
6
+ * Updates, archives, appointments, vacancies, succession and acting changes take the `version` you read
7
+ * (sent as If-Match); a stale one is a 409. */
8
+ export function autoModule(client) {
9
+ return {
10
+ whoami: () => client.request('auto_whoami'),
11
+ orgs: {
12
+ list: (includeArchived) => client.request('auto_listOrgs', includeArchived === undefined ? {} : { include_archived: includeArchived }),
13
+ get: (org) => client.request('auto_getOrg', { org }),
14
+ create: (body) => client.request('auto_createOrg', { body }),
15
+ update: (org, version, body) => client.request('auto_updateOrg', { org, body }, { headers: ifMatchHeaders('auto_updateOrg', version) }),
16
+ archive: (org, version) => client.request('auto_archiveOrg', { org }, { headers: ifMatchHeaders('auto_archiveOrg', version) }),
17
+ mandates: (org) => client.request('auto_listMandates', { org }),
18
+ createMandate: (org, body) => client.request('auto_createMandate', { org, body }),
19
+ recordDecision: (org, body) => client.request('auto_recordDecision', { org, body }),
20
+ ledger: (org, page = {}) => client.request('auto_getLedger', { org, ...page }),
21
+ verifyLedger: (org) => client.request('auto_verifyLedger', { org }),
22
+ approvals: (org, status) => client.request('auto_listApprovals', status ? { org, status } : { org }),
23
+ units: (org, includeArchived) => client.request('auto_listUnits', includeArchived === undefined ? { org } : { org, include_archived: includeArchived }),
24
+ createUnit: (org, body) => client.request('auto_createUnit', { org, body }),
25
+ positions: (org, filter = {}) => client.request('auto_listPositions', { org, ...filter }),
26
+ createPosition: (org, body) => client.request('auto_createPosition', { org, body }),
27
+ chart: (org) => client.request('auto_getOrgChart', { org }),
28
+ goals: (org, positionId) => client.request('auto_listGoals', positionId ? { org, position_id: positionId } : { org }),
29
+ createGoal: (org, body) => client.request('auto_createGoal', { org, body }),
30
+ scorecard: (org) => client.request('auto_getOrgScorecard', { org }),
31
+ budgets: (org, filter = {}) => client.request('auto_listBudgets', { org, ...filter }),
32
+ createBudget: (org, body) => client.request('auto_createBudget', { org, body }),
33
+ policies: (org, includeArchived) => client.request('auto_listPolicies', includeArchived === undefined ? { org } : { org, include_archived: includeArchived }),
34
+ createPolicy: (org, body) => client.request('auto_createPolicy', { org, body }),
35
+ cadences: (org, filter = {}) => client.request('auto_listCadences', { org, ...filter }),
36
+ createCadence: (org, body) => client.request('auto_createCadence', { org, body }),
37
+ /** Active cadences due within `withinHours` (default 24, at most 744), overdue first, with who runs each. */
38
+ dueCadences: (org, withinHours) => client.request('auto_listDueCadences', withinHours === undefined ? { org } : { org, within_hours: withinHours }),
39
+ /** Vacancies, successors and single points of spend. */
40
+ continuity: (org) => client.request('auto_getOrgContinuity', { org }),
41
+ credentials: (org, positionId) => client.request('auto_listCredentials', positionId ? { org, position_id: positionId } : { org }),
42
+ },
43
+ units: {
44
+ get: (unit) => client.request('auto_getUnit', { unit }),
45
+ update: (unit, version, body) => client.request('auto_updateUnit', { unit, body }, { headers: ifMatchHeaders('auto_updateUnit', version) }),
46
+ archive: (unit, version) => client.request('auto_archiveUnit', { unit }, { headers: ifMatchHeaders('auto_archiveUnit', version) }),
47
+ },
48
+ /** Positions hold delegated authority; it only flows down the reporting line. */
49
+ positions: {
50
+ get: (position) => client.request('auto_getPosition', { position }),
51
+ update: (position, version, body) => client.request('auto_updatePosition', { position, body }, { headers: ifMatchHeaders('auto_updatePosition', version) }),
52
+ archive: (position, version) => client.request('auto_archivePosition', { position }, { headers: ifMatchHeaders('auto_archivePosition', version) }),
53
+ /** Fill the position or swap its occupant (a person, or a Henry, Fleets or Flocks agent that Auto only references). */
54
+ appoint: (position, version, body) => client.request('auto_appointOccupant', { position, body }, { headers: ifMatchHeaders('auto_appointOccupant', version) }),
55
+ vacate: (position, version) => client.request('auto_vacatePosition', { position }, { headers: ifMatchHeaders('auto_vacatePosition', version) }),
56
+ terms: (position) => client.request('auto_listPositionTerms', { position }),
57
+ scorecard: (position) => client.request('auto_getPositionScorecard', { position }),
58
+ /** Replace the ordered successor list (up to 5 positions; empty clears it). */
59
+ setSuccession: (position, version, body) => client.request('auto_setPositionSuccession', { position, body }, { headers: ifMatchHeaders('auto_setPositionSuccession', version) }),
60
+ /** Someone (the occupant of `from_position_id`, or the first filled successor) acts for the position. */
61
+ startActing: (position, version, body) => client.request('auto_startActing', { position, body }, { headers: ifMatchHeaders('auto_startActing', version) }),
62
+ endActing: (position, version, reason) => client.request('auto_endActing', reason === undefined ? { position } : { position, reason }, { headers: ifMatchHeaders('auto_endActing', version) }),
63
+ /** A signed AuthorityCredential (JWT) for the position's holder; the `token` is returned only here. */
64
+ issueCredential: (position, body = {}) => client.request('auto_issuePositionCredential', { position, body }),
65
+ },
66
+ /** "May this principal, in this position, do this?" Ledgered, never metered; `auto:read` alone gets a dry run. */
67
+ authority: {
68
+ /** With an idempotency key, a repeat returns the first answer (`idempotent_replay: true`) instead of counting spend twice. */
69
+ check: (body, options = {}) => client.request('auto_checkAuthority', { body }, { headers: idempotencyHeaders('auto_checkAuthority', options.idempotencyKey) }),
70
+ getCheck: (check) => client.request('auto_getAuthorityCheck', { check }),
71
+ /** Spend that was allowed but did not happen stops counting against limits and budgets. Once per check. */
72
+ release: (check, reason) => client.request('auto_releaseAuthorityCheck', { check, body: reason === undefined ? {} : { reason } }),
73
+ /** Check a receipt or an AuthorityCredential: Auto's signature, expiry and revocation. */
74
+ verify: (token) => client.request('auto_verifyAuthorityToken', { body: { token } }),
75
+ },
76
+ goals: {
77
+ get: (goal) => client.request('auto_getGoal', { goal }),
78
+ update: (goal, version, body) => client.request('auto_updateGoal', { goal, body }, { headers: ifMatchHeaders('auto_updateGoal', version) }),
79
+ archive: (goal, version) => client.request('auto_archiveGoal', { goal }, { headers: ifMatchHeaders('auto_archiveGoal', version) }),
80
+ measure: (goal, body) => client.request('auto_recordGoalMeasurement', { goal, body }),
81
+ },
82
+ /** Spend caps for a unit (and every unit below it) or the whole org, enforced by the authority check. */
83
+ budgets: {
84
+ get: (budget) => client.request('auto_getBudget', { budget }),
85
+ update: (budget, version, body) => client.request('auto_updateBudget', { budget, body }, { headers: ifMatchHeaders('auto_updateBudget', version) }),
86
+ archive: (budget, version) => client.request('auto_archiveBudget', { budget }, { headers: ifMatchHeaders('auto_archiveBudget', version) }),
87
+ },
88
+ /** Rules that tighten every authority check (deny, or escalate to a named position). */
89
+ policies: {
90
+ get: (policy) => client.request('auto_getPolicy', { policy }),
91
+ update: (policy, version, body) => client.request('auto_updatePolicy', { policy, body }, { headers: ifMatchHeaders('auto_updatePolicy', version) }),
92
+ archive: (policy, version) => client.request('auto_archivePolicy', { policy }, { headers: ifMatchHeaders('auto_archivePolicy', version) }),
93
+ },
94
+ /** The meetings, reviews and reports the org keeps. Auto keeps the schedule and the record; it never holds the meeting. */
95
+ cadences: {
96
+ get: (cadence) => client.request('auto_getCadence', { cadence }),
97
+ update: (cadence, version, body) => client.request('auto_updateCadence', { cadence, body }, { headers: ifMatchHeaders('auto_updateCadence', version) }),
98
+ archive: (cadence, version) => client.request('auto_archiveCadence', { cadence }, { headers: ifMatchHeaders('auto_archiveCadence', version) }),
99
+ occurrences: (cadence, limit) => client.request('auto_listCadenceOccurrences', limit === undefined ? { cadence } : { cadence, limit }),
100
+ /** Record that the occurrence was held or skipped; the cadence moves to its next slot. */
101
+ record: (cadence, body) => client.request('auto_recordCadenceOccurrence', { cadence, body }),
102
+ },
103
+ credentials: {
104
+ get: (credential) => client.request('auto_getCredential', { credential }),
105
+ /** Public (no credential sent): the status any verifier reads from a credential's `credentialStatus` URL. */
106
+ status: (credential) => client.request('auto_getCredentialStatus', { credential }),
107
+ revoke: (credential, reason) => client.request('auto_revokeCredential', { credential, body: reason === undefined ? {} : { reason } }),
108
+ },
109
+ /** Public (no credential sent): Auto's signing keys and DID document, to verify receipts and credentials offline. */
110
+ keys: {
111
+ jwks: () => client.request('auto_getJwks'),
112
+ did: () => client.request('auto_getDidDocument'),
113
+ },
114
+ mandates: {
115
+ get: (mandate) => client.request('auto_getMandate', { mandate }),
116
+ update: (mandate, version, body) => client.request('auto_updateMandate', { mandate, body }, { headers: ifMatchHeaders('auto_updateMandate', version) }),
117
+ archive: (mandate, version) => client.request('auto_archiveMandate', { mandate }, { headers: ifMatchHeaders('auto_archiveMandate', version) }),
118
+ propose: (mandate, body) => client.request('auto_proposeAction', { mandate, body }),
119
+ },
120
+ approvals: {
121
+ get: (approval) => client.request('auto_getApproval', { approval }),
122
+ decide: (approval, body) => client.request('auto_decideApproval', { approval, body }),
123
+ },
124
+ };
125
+ }
package/dist/beacons.d.ts CHANGED
@@ -4,6 +4,14 @@ type DashboardOptions = {
4
4
  signal?: AbortSignal;
5
5
  };
6
6
  type PolicyConfig = OperationInput<'beacons_updateDashboardPolicy'>['body']['config'];
7
+ /** Configuration-record families Genesis admits (beacons-api native_resources.rs). */
8
+ export declare const BEACONS_RESOURCE_FAMILIES: readonly ["gateways", "private-gateways", "sims"];
9
+ export type BeaconsResourceFamily = typeof BEACONS_RESOURCE_FAMILIES[number];
10
+ type ResourceCreate = OperationInput<'beacons_createDashboardResource'>['body'];
11
+ type ResourceUpdate = OperationInput<'beacons_updateDashboardResource'>['body'];
12
+ /** Platforms with a Beacons agent client profile; the gateway and Beacons admit only these. */
13
+ export declare const BEACONS_CLIENT_PLATFORMS: readonly ["linux", "macos", "windows", "ios", "android"];
14
+ export type BeaconsClientPlatform = typeof BEACONS_CLIENT_PLATFORMS[number];
7
15
  /** Beacons uses the authenticated Genesis organization; never supply an org header. */
8
16
  export declare function beaconsModule(client: GenesisClient): {
9
17
  fleets: {
@@ -19,6 +27,26 @@ export declare function beaconsModule(client: GenesisClient): {
19
27
  peers: (id: string, options?: DashboardOptions) => Promise<{
20
28
  data: import("./index.js").components["schemas"]["Beacons.DashboardPeer"][];
21
29
  }>;
30
+ /** One peer's tunnel config: other live peers' public keys; never a private key. */
31
+ wireguardConfig: (id: string, peerId: string, options?: DashboardOptions) => Promise<{
32
+ data: import("./index.js").components["schemas"]["Beacons.DashboardWireguardConfig"];
33
+ }>;
34
+ /** One fleet in the current selection; 404 when it is outside it. */
35
+ get: (id: string, options?: DashboardOptions) => Promise<{
36
+ data: import("./index.js").components["schemas"]["Beacons.DashboardFleet"];
37
+ }>;
38
+ /** Mesh DNS map: one A record per live peer. */
39
+ dns: (id: string, options?: DashboardOptions) => Promise<{
40
+ data: import("./index.js").components["schemas"]["Beacons.DashboardDnsMap"];
41
+ }>;
42
+ /** Mesh discovery map: live peers' public keys and routes, DNS, signal and relay map. */
43
+ discovery: (id: string, options?: DashboardOptions) => Promise<{
44
+ data: import("./index.js").components["schemas"]["Beacons.DashboardDiscoveryMap"];
45
+ }>;
46
+ /** beacons-agent profile for one platform: API origin, DNS suffix and command line. */
47
+ clientProfile: (id: string, platform: BeaconsClientPlatform, options?: DashboardOptions) => Promise<{
48
+ data: import("./index.js").components["schemas"]["Beacons.DashboardClientProfile"];
49
+ }>;
22
50
  policy: {
23
51
  get: (id: string, options?: DashboardOptions) => Promise<{
24
52
  data: {
@@ -40,6 +68,20 @@ export declare function beaconsModule(client: GenesisClient): {
40
68
  };
41
69
  }>;
42
70
  };
71
+ /** Fleet configuration records (gateways, private-gateways, sims). Configuration only: nothing is provisioned or connected. */
72
+ resources: {
73
+ list: (id: string, kind: BeaconsResourceFamily, options?: DashboardOptions) => Promise<{
74
+ data: import("./index.js").components["schemas"]["Beacons.DashboardResource"][];
75
+ }>;
76
+ /** Not idempotent: a retry after an interrupted response creates a second record. */
77
+ create: (id: string, kind: BeaconsResourceFamily, body: ResourceCreate, options?: DashboardOptions) => Promise<{
78
+ data: import("./index.js").components["schemas"]["Beacons.DashboardResource"];
79
+ }>;
80
+ update: (id: string, kind: BeaconsResourceFamily, resourceId: string, body: ResourceUpdate, options?: DashboardOptions) => Promise<{
81
+ data: import("./index.js").components["schemas"]["Beacons.DashboardResource"];
82
+ }>;
83
+ delete: (id: string, kind: BeaconsResourceFamily, resourceId: string, options?: DashboardOptions) => Promise<void>;
84
+ };
43
85
  /** Reuse the same request ID and body after an interrupted response. Creates metadata only. */
44
86
  provision: (requestId: string, body?: {
45
87
  name?: string;
package/dist/beacons.js CHANGED
@@ -37,6 +37,45 @@ function policyInput(config) {
37
37
  return { config: { device_enrollment: mode,
38
38
  ...(limit === undefined ? {} : { max_devices: limit }) } };
39
39
  }
40
+ /** Configuration-record families Genesis admits (beacons-api native_resources.rs). */
41
+ export const BEACONS_RESOURCE_FAMILIES = ['gateways', 'private-gateways', 'sims'];
42
+ const RESOURCE_STATUS = ['active', 'inactive', 'disabled', 'pending'];
43
+ function family(value, operationId) {
44
+ if (!BEACONS_RESOURCE_FAMILIES.includes(value))
45
+ invalidDashboard(operationId);
46
+ return value;
47
+ }
48
+ function plainObject(value) {
49
+ return !!value && typeof value === 'object' && !Array.isArray(value);
50
+ }
51
+ /** A shallow snapshot of the documented fields; the receiver validates every value. */
52
+ function resourceBody(value, operationId, create) {
53
+ if (!plainObject(value))
54
+ invalidDashboard(operationId);
55
+ const keys = Object.keys(value);
56
+ if (keys.some(key => !['name', 'status', 'config'].includes(key)) || (create ? keys.length !== 3 : keys.length === 0))
57
+ invalidDashboard(operationId);
58
+ const out = {};
59
+ if (Object.hasOwn(value, 'name')) {
60
+ if (typeof value.name !== 'string')
61
+ invalidDashboard(operationId);
62
+ const name = value.name.trim();
63
+ if (!name || new TextEncoder().encode(name).length > 128 || /[\u0000-\u001f\u007f-\u009f]/.test(name))
64
+ invalidDashboard(operationId);
65
+ out.name = name;
66
+ }
67
+ if (Object.hasOwn(value, 'status')) {
68
+ if (typeof value.status !== 'string' || !RESOURCE_STATUS.includes(value.status))
69
+ invalidDashboard(operationId);
70
+ out.status = value.status;
71
+ }
72
+ if (Object.hasOwn(value, 'config')) {
73
+ if (!plainObject(value.config) || Object.values(value.config).some(v => v === null || v === undefined))
74
+ invalidDashboard(operationId);
75
+ out.config = JSON.parse(JSON.stringify(value.config));
76
+ }
77
+ return out;
78
+ }
40
79
  function provisioningInput(requestId, body) {
41
80
  if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(requestId)
42
81
  || requestId === '00000000-0000-0000-0000-000000000000'
@@ -48,6 +87,8 @@ function provisioningInput(requestId, body) {
48
87
  }
49
88
  return body.name === undefined ? {} : { name: body.name };
50
89
  }
90
+ /** Platforms with a Beacons agent client profile; the gateway and Beacons admit only these. */
91
+ export const BEACONS_CLIENT_PLATFORMS = ['linux', 'macos', 'windows', 'ios', 'android'];
51
92
  /** Beacons uses the authenticated Genesis organization; never supply an org header. */
52
93
  export function beaconsModule(client) {
53
94
  return {
@@ -56,11 +97,41 @@ export function beaconsModule(client) {
56
97
  list: (options = {}) => client.request('beacons_listDashboardFleets', {}, options),
57
98
  update: (id, body, options = {}) => client.request('beacons_updateDashboardFleet', { fleet_id: fleetId(id, 'beacons_updateDashboardFleet'), body: renameInput(body) }, options),
58
99
  peers: (id, options = {}) => client.request('beacons_listDashboardPeers', { fleet_id: fleetId(id, 'beacons_listDashboardPeers') }, options),
100
+ /** One peer's tunnel config: other live peers' public keys; never a private key. */
101
+ wireguardConfig: (id, peerId, options = {}) => client.request('beacons_getDashboardPeerWireguardConfig', { fleet_id: fleetId(id, 'beacons_getDashboardPeerWireguardConfig'),
102
+ peer_id: fleetId(peerId, 'beacons_getDashboardPeerWireguardConfig') }, options),
103
+ /** One fleet in the current selection; 404 when it is outside it. */
104
+ get: (id, options = {}) => client.request('beacons_getDashboardFleet', { fleet_id: fleetId(id, 'beacons_getDashboardFleet') }, options),
105
+ /** Mesh DNS map: one A record per live peer. */
106
+ dns: (id, options = {}) => client.request('beacons_getDashboardFleetDns', { fleet_id: fleetId(id, 'beacons_getDashboardFleetDns') }, options),
107
+ /** Mesh discovery map: live peers' public keys and routes, DNS, signal and relay map. */
108
+ discovery: (id, options = {}) => client.request('beacons_getDashboardFleetDiscovery', { fleet_id: fleetId(id, 'beacons_getDashboardFleetDiscovery') }, options),
109
+ /** beacons-agent profile for one platform: API origin, DNS suffix and command line. */
110
+ clientProfile: (id, platform, options = {}) => {
111
+ const op = 'beacons_getDashboardClientProfile';
112
+ if (!BEACONS_CLIENT_PLATFORMS.includes(platform))
113
+ invalidDashboard(op);
114
+ return client.request(op, { fleet_id: fleetId(id, op), platform }, options);
115
+ },
59
116
  policy: {
60
117
  get: (id, options = {}) => client.request('beacons_getDashboardPolicy', { fleet_id: fleetId(id, 'beacons_getDashboardPolicy') }, options),
61
118
  /** Future device admissions only; this never grants IAM rights or revokes an existing peer. */
62
119
  update: (id, config, options = {}) => client.request('beacons_updateDashboardPolicy', { fleet_id: fleetId(id, 'beacons_updateDashboardPolicy'), body: policyInput(config) }, options),
63
120
  },
121
+ /** Fleet configuration records (gateways, private-gateways, sims). Configuration only: nothing is provisioned or connected. */
122
+ resources: {
123
+ list: (id, kind, options = {}) => client.request('beacons_listDashboardResources', { fleet_id: fleetId(id, 'beacons_listDashboardResources'),
124
+ family: family(kind, 'beacons_listDashboardResources') }, options),
125
+ /** Not idempotent: a retry after an interrupted response creates a second record. */
126
+ create: (id, kind, body, options = {}) => client.request('beacons_createDashboardResource', { fleet_id: fleetId(id, 'beacons_createDashboardResource'),
127
+ family: family(kind, 'beacons_createDashboardResource'), body: resourceBody(body, 'beacons_createDashboardResource', true) }, options),
128
+ update: (id, kind, resourceId, body, options = {}) => client.request('beacons_updateDashboardResource', { fleet_id: fleetId(id, 'beacons_updateDashboardResource'),
129
+ family: family(kind, 'beacons_updateDashboardResource'), resource_id: fleetId(resourceId, 'beacons_updateDashboardResource'),
130
+ body: resourceBody(body, 'beacons_updateDashboardResource', false) }, options),
131
+ delete: (id, kind, resourceId, options = {}) => client.request('beacons_deleteDashboardResource', { fleet_id: fleetId(id, 'beacons_deleteDashboardResource'),
132
+ family: family(kind, 'beacons_deleteDashboardResource'), resource_id: fleetId(resourceId, 'beacons_deleteDashboardResource') }, options)
133
+ .then(() => undefined),
134
+ },
64
135
  /** Reuse the same request ID and body after an interrupted response. Creates metadata only. */
65
136
  provision: (requestId, body = {}) => client.request('beacons_provisionBridgeFleet', { body: provisioningInput(requestId, body) }, { headers: { 'idempotency-key': requestId } }),
66
137
  },
@@ -30,6 +30,13 @@ export declare function blindsModule(client: GenesisClient): {
30
30
  signal?: AbortSignal;
31
31
  idempotencyKey?: string;
32
32
  }) => Promise<unknown>;
33
+ /** Revoke every credential in the selected organization. Bulk and irreversible. */
34
+ revokeAll: (init?: {
35
+ signal?: AbortSignal;
36
+ idempotencyKey?: string;
37
+ }) => Promise<{
38
+ revoked: number;
39
+ }>;
33
40
  };
34
41
  oauth: {
35
42
  connections: (init?: {
@@ -38,6 +45,108 @@ export declare function blindsModule(client: GenesisClient): {
38
45
  connections: import("./index.js").components["schemas"]["Blinds.OAuthConnection"][];
39
46
  total: number;
40
47
  }>;
48
+ /** Catalog providers that use OAuth 2.0. */
49
+ providers: (query?: {
50
+ q?: string;
51
+ category?: string;
52
+ limit?: number;
53
+ offset?: number;
54
+ }, init?: {
55
+ signal?: AbortSignal;
56
+ }) => Promise<{
57
+ providers: import("./index.js").components["schemas"]["Blinds.ProviderSummary"][];
58
+ total: number;
59
+ limit: number;
60
+ offset: number;
61
+ }>;
62
+ };
63
+ /** What a credential can be bound to: auth mode and allowed destination domains. */
64
+ providers: {
65
+ list: (query?: {
66
+ q?: string;
67
+ category?: string;
68
+ limit?: number;
69
+ offset?: number;
70
+ } & {
71
+ auth_mode?: string;
72
+ }, init?: {
73
+ signal?: AbortSignal;
74
+ }) => Promise<{
75
+ providers: import("./index.js").components["schemas"]["Blinds.ProviderSummary"][];
76
+ total: number;
77
+ limit: number;
78
+ offset: number;
79
+ }>;
80
+ get: (slug: string, init?: {
81
+ signal?: AbortSignal;
82
+ }) => Promise<{
83
+ provider: import("./index.js").components["schemas"]["Blinds.ProviderSummary"];
84
+ oauth2?: {
85
+ authorization_url?: string;
86
+ token_url?: string;
87
+ refresh_url?: string | null;
88
+ revocation_url?: string | null;
89
+ default_scopes?: string[];
90
+ scopes_separator?: string;
91
+ supports_refresh?: boolean;
92
+ supports_pkce?: boolean;
93
+ pkce_method?: string | null;
94
+ } | null;
95
+ api_key?: {
96
+ placement?: string;
97
+ key_name?: string;
98
+ prefix?: string | null;
99
+ } | null;
100
+ destination: {
101
+ allowed_domains?: string[];
102
+ allow_subdomains?: boolean;
103
+ require_tls?: boolean;
104
+ allowed_ports?: number[];
105
+ };
106
+ auth_header_template?: Record<string, never> | null;
107
+ }>;
108
+ };
109
+ settings: {
110
+ get: (init?: {
111
+ signal?: AbortSignal;
112
+ }) => Promise<{
113
+ consent_policy: "never" | "per_variable" | "per_delegate";
114
+ dashboard_notifications: boolean;
115
+ email_notifications: boolean;
116
+ slack_notifications: boolean;
117
+ updated_at: string;
118
+ }>;
119
+ update: (body: OperationInput<"blinds_updateSettings">["body"], init?: {
120
+ signal?: AbortSignal;
121
+ idempotencyKey?: string;
122
+ }) => Promise<{
123
+ consent_policy: "never" | "per_variable" | "per_delegate";
124
+ dashboard_notifications: boolean;
125
+ email_notifications: boolean;
126
+ slack_notifications: boolean;
127
+ updated_at: string;
128
+ }>;
129
+ };
130
+ agents: (init?: {
131
+ signal?: AbortSignal;
132
+ }) => Promise<{
133
+ agents: import("./index.js").components["schemas"]["Blinds.AgentSummary"][];
134
+ }>;
135
+ alerts: (init?: {
136
+ signal?: AbortSignal;
137
+ }) => Promise<{
138
+ events: import("./index.js").components["schemas"]["Blinds.ActivityEvent"][];
139
+ }>;
140
+ /** The receipt for a mutation, by the Idempotency-Key it was sent with. Read it after an uncertain outcome; never replay. */
141
+ operations: {
142
+ get: (operation_id: string, init?: {
143
+ signal?: AbortSignal;
144
+ }) => Promise<{
145
+ operation_id: string;
146
+ state: "pending" | "completed";
147
+ response_status?: number | null;
148
+ response?: unknown;
149
+ }>;
41
150
  };
42
151
  consent: {
43
152
  pending: (init?: {
@@ -94,6 +203,18 @@ export declare function blindsModule(client: GenesisClient): {
94
203
  }) => Promise<{
95
204
  events: import("./index.js").components["schemas"]["Blinds.ActivityEvent"][];
96
205
  }>;
206
+ /** One HTTPS call made by Blinds under a delegation the caller holds; {{VARIABLE}} templates are filled server side and values never leave Blinds. Never retried. */
207
+ proxy: (body: OperationInput<"blinds_proxyRequest">["body"], init?: {
208
+ signal?: AbortSignal;
209
+ idempotencyKey?: string;
210
+ }) => Promise<{
211
+ status: number;
212
+ headers: {
213
+ [key: string]: string;
214
+ };
215
+ body: string;
216
+ request_id: string;
217
+ }>;
97
218
  ownerEnrollment: {
98
219
  reserve: (body: OperationInput<"blinds_ownerReserve">["body"], init?: {
99
220
  signal?: AbortSignal;
@@ -103,7 +103,7 @@ export async function blindsOwnerTransport(options) {
103
103
  }
104
104
  export function blindsModule(client) {
105
105
  const write = (id, input, init = {}) => client.request(id, { ...input, ...(init.idempotencyKey ? { idempotency_key: init.idempotencyKey } : {}) }, { signal: init.signal });
106
- const read = (id, init = {}) => client.request(id, {}, init);
106
+ const read = (id, init = {}, input = {}) => client.request(id, input, init);
107
107
  return {
108
108
  credentials: {
109
109
  /** Variable names only; values never leave Blinds. */
@@ -111,8 +111,27 @@ export function blindsModule(client) {
111
111
  /** Connect a static credential. The value is KMS-encrypted and never returned. */
112
112
  store: (body, init) => write('blinds_storeCredential', { body }, init),
113
113
  revoke: (variable, init) => write('blinds_deleteCredential', { variable }, init),
114
+ /** Revoke every credential in the selected organization. Bulk and irreversible. */
115
+ revokeAll: (init) => write('blinds_revokeAllCredentials', { all: 'true' }, init),
114
116
  },
115
- oauth: { connections: (init) => read('blinds_listOAuthConnections', init) },
117
+ oauth: {
118
+ connections: (init) => read('blinds_listOAuthConnections', init),
119
+ /** Catalog providers that use OAuth 2.0. */
120
+ providers: (query = {}, init) => read('blinds_listOAuthProviders', init, query),
121
+ },
122
+ /** What a credential can be bound to: auth mode and allowed destination domains. */
123
+ providers: {
124
+ list: (query = {}, init) => read('blinds_listProviders', init, query),
125
+ get: (slug, init) => read('blinds_getProvider', init, { slug }),
126
+ },
127
+ settings: {
128
+ get: (init) => read('blinds_getSettings', init),
129
+ update: (body, init) => write('blinds_updateSettings', { body }, init),
130
+ },
131
+ agents: (init) => read('blinds_listAgents', init),
132
+ alerts: (init) => read('blinds_listAlerts', init),
133
+ /** The receipt for a mutation, by the Idempotency-Key it was sent with. Read it after an uncertain outcome; never replay. */
134
+ operations: { get: (operation_id, init) => read('blinds_getOperation', init, { operation_id }) },
116
135
  consent: {
117
136
  pending: (init) => read('blinds_listPendingConsent', init),
118
137
  records: (init) => read('blinds_listConsentRecords', init),
@@ -126,6 +145,8 @@ export function blindsModule(client) {
126
145
  revoke: (delegate_id, init) => write('blinds_revokeDelegate', { delegate_id }, init),
127
146
  },
128
147
  activity: (init) => read('blinds_listActivity', init),
148
+ /** One HTTPS call made by Blinds under a delegation the caller holds; {{VARIABLE}} templates are filled server side and values never leave Blinds. Never retried. */
149
+ proxy: (body, init) => write('blinds_proxyRequest', { body }, init),
129
150
  ownerEnrollment: {
130
151
  reserve: (body, init = {}) => client.request('blinds_ownerReserve', { body }, init),
131
152
  sign: (body, init = {}) => client.request('blinds_ownerSign', { body }, init),