@openlegion/platform 0.0.0-stage → 0.1.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.
Files changed (120) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +1189 -2
  3. package/dist/body.d.ts +9 -0
  4. package/dist/body.js +28 -0
  5. package/dist/chat-history.d.ts +53 -0
  6. package/dist/chat-history.js +11 -0
  7. package/dist/client.d.ts +217 -0
  8. package/dist/client.js +367 -0
  9. package/dist/core.d.ts +47 -0
  10. package/dist/core.js +1 -0
  11. package/dist/crypto.d.ts +25 -0
  12. package/dist/crypto.js +81 -0
  13. package/dist/errors.d.ts +111 -0
  14. package/dist/errors.js +134 -0
  15. package/dist/events.d.ts +131 -0
  16. package/dist/events.js +5 -0
  17. package/dist/generated/api.d.ts +5505 -0
  18. package/dist/generated/api.js +446 -0
  19. package/dist/handler.d.ts +201 -0
  20. package/dist/handler.js +682 -0
  21. package/dist/index.d.ts +24 -0
  22. package/dist/index.js +12 -0
  23. package/dist/kit-agents.d.ts +95 -0
  24. package/dist/kit-agents.js +280 -0
  25. package/dist/kit-codes.d.ts +279 -0
  26. package/dist/kit-codes.js +44 -0
  27. package/dist/kit-connections.d.ts +21 -0
  28. package/dist/kit-connections.js +189 -0
  29. package/dist/kit-files.d.ts +8 -0
  30. package/dist/kit-files.js +117 -0
  31. package/dist/kit-model-keys.d.ts +8 -0
  32. package/dist/kit-model-keys.js +86 -0
  33. package/dist/kit-threads.d.ts +3 -0
  34. package/dist/kit-threads.js +92 -0
  35. package/dist/kit-tools.d.ts +21 -0
  36. package/dist/kit-tools.js +47 -0
  37. package/dist/kit.d.ts +130 -0
  38. package/dist/kit.js +155 -0
  39. package/dist/mcp-server.d.ts +27 -0
  40. package/dist/mcp-server.js +166 -0
  41. package/dist/next.d.ts +24 -0
  42. package/dist/next.js +6 -0
  43. package/dist/ol-signed.d.ts +82 -0
  44. package/dist/ol-signed.js +115 -0
  45. package/dist/react/add-server.d.ts +90 -0
  46. package/dist/react/add-server.js +183 -0
  47. package/dist/react/agent-chat.d.ts +925 -0
  48. package/dist/react/agent-chat.js +1917 -0
  49. package/dist/react/agent-editor.d.ts +133 -0
  50. package/dist/react/agent-editor.js +222 -0
  51. package/dist/react/agent-kit.d.ts +160 -0
  52. package/dist/react/agent-kit.js +279 -0
  53. package/dist/react/agent-list.d.ts +247 -0
  54. package/dist/react/agent-list.js +248 -0
  55. package/dist/react/approval-card.d.ts +272 -0
  56. package/dist/react/approval-card.js +372 -0
  57. package/dist/react/artifact-card.d.ts +38 -0
  58. package/dist/react/artifact-card.js +39 -0
  59. package/dist/react/avatar.d.ts +21 -0
  60. package/dist/react/avatar.js +33 -0
  61. package/dist/react/card-ledger.d.ts +30 -0
  62. package/dist/react/card-ledger.js +49 -0
  63. package/dist/react/chat-timing.d.ts +121 -0
  64. package/dist/react/chat-timing.js +229 -0
  65. package/dist/react/computer-view.d.ts +309 -0
  66. package/dist/react/computer-view.js +543 -0
  67. package/dist/react/computer-viewer.d.ts +175 -0
  68. package/dist/react/computer-viewer.js +555 -0
  69. package/dist/react/computer-wire.d.ts +178 -0
  70. package/dist/react/computer-wire.js +244 -0
  71. package/dist/react/connect-button.d.ts +145 -0
  72. package/dist/react/connect-button.js +212 -0
  73. package/dist/react/connection-request.d.ts +16 -0
  74. package/dist/react/connection-request.js +18 -0
  75. package/dist/react/connections-list.d.ts +90 -0
  76. package/dist/react/connections-list.js +76 -0
  77. package/dist/react/errors.d.ts +250 -0
  78. package/dist/react/errors.js +146 -0
  79. package/dist/react/files.d.ts +41 -0
  80. package/dist/react/files.js +78 -0
  81. package/dist/react/index.d.ts +35 -0
  82. package/dist/react/index.js +26 -0
  83. package/dist/react/limit-words.d.ts +80 -0
  84. package/dist/react/limit-words.js +53 -0
  85. package/dist/react/markdown.d.ts +42 -0
  86. package/dist/react/markdown.js +56 -0
  87. package/dist/react/md-parse.d.ts +106 -0
  88. package/dist/react/md-parse.js +638 -0
  89. package/dist/react/model-keys-card.d.ts +94 -0
  90. package/dist/react/model-keys-card.js +123 -0
  91. package/dist/react/reload.d.ts +211 -0
  92. package/dist/react/reload.js +339 -0
  93. package/dist/react/reveal.d.ts +17 -0
  94. package/dist/react/reveal.js +22 -0
  95. package/dist/react/schedule-editor.d.ts +107 -0
  96. package/dist/react/schedule-editor.js +172 -0
  97. package/dist/react/schedule-time.d.ts +66 -0
  98. package/dist/react/schedule-time.js +90 -0
  99. package/dist/react/styles.css +1274 -0
  100. package/dist/react/transport.d.ts +49 -0
  101. package/dist/react/transport.js +380 -0
  102. package/dist/react/use-connections.d.ts +155 -0
  103. package/dist/react/use-connections.js +231 -0
  104. package/dist/react/use-model-keys.d.ts +47 -0
  105. package/dist/react/use-model-keys.js +57 -0
  106. package/dist/react/use-threads.d.ts +63 -0
  107. package/dist/react/use-threads.js +73 -0
  108. package/dist/react/vault-form.d.ts +92 -0
  109. package/dist/react/vault-form.js +151 -0
  110. package/dist/schema.d.ts +47 -0
  111. package/dist/schema.js +16 -0
  112. package/dist/secrets.d.ts +15 -0
  113. package/dist/secrets.js +18 -0
  114. package/dist/stream.d.ts +129 -0
  115. package/dist/stream.js +192 -0
  116. package/dist/testing.d.ts +33 -0
  117. package/dist/testing.js +40 -0
  118. package/dist/webhooks.d.ts +31 -0
  119. package/dist/webhooks.js +72 -0
  120. package/package.json +85 -3
@@ -0,0 +1,446 @@
1
+ export const API_VERSION = "2026-12-01";
2
+ export const DEFAULT_BASE_URL = "https://api.openlegion.ai/platform/v1";
3
+ export const OPERATIONS = {
4
+ "workspaces.create": { method: "POST", path: "/workspaces", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
5
+ "workspaces.list": { method: "GET", path: "/workspaces", pathParams: [], query: ["external_ref", "status", "template", "created[gte]", "created[lt]", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
6
+ "workspaces.retrieve": { method: "GET", path: "/workspaces/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
7
+ "workspaces.update": { method: "POST", path: "/workspaces/{id}", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
8
+ "workspaces.delete": { method: "DELETE", path: "/workspaces/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
9
+ "workspaces.suspend": { method: "POST", path: "/workspaces/{id}/suspend", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
10
+ "workspaces.resume": { method: "POST", path: "/workspaces/{id}/resume", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
11
+ "workspaces.archive": { method: "POST", path: "/workspaces/{id}/archive", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
12
+ "workspaces.restore": { method: "POST", path: "/workspaces/{id}/restore", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
13
+ "templates.create": { method: "POST", path: "/templates", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
14
+ "templates.list": { method: "GET", path: "/templates", pathParams: [], query: ["limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
15
+ "templates.versions.create": { method: "POST", path: "/templates/{slug}/versions", pathParams: ["slug"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
16
+ "templates.versions.list": { method: "GET", path: "/templates/{slug}/versions", pathParams: ["slug"], query: ["limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
17
+ "templates.versions.retrieve": { method: "GET", path: "/templates/{slug}/versions/{version}", pathParams: ["slug", "version"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
18
+ "templates.promote": { method: "POST", path: "/templates/{slug}/promote", pathParams: ["slug"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
19
+ "connectors.create": { method: "POST", path: "/connectors", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
20
+ "connectors.list": { method: "GET", path: "/connectors", pathParams: [], query: ["limit", "starting_after"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
21
+ "connectors.retrieve": { method: "GET", path: "/connectors/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
22
+ "connectors.pin": { method: "POST", path: "/connectors/{id}/pin", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
23
+ "connectors.test": { method: "POST", path: "/connectors/{id}/test", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
24
+ "connectors.rotate_secret": { method: "POST", path: "/connectors/{id}/rotate_secret", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
25
+ "connectors.calls.list": { method: "GET", path: "/connectors/{id}/calls", pathParams: ["id"], query: ["limit", "starting_after"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
26
+ "connectors.pull_template": { method: "POST", path: "/connectors/{id}/pull_template", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
27
+ "workspaces.limits.update": { method: "POST", path: "/workspaces/{id}/limits", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
28
+ "workspaces.credit_grants.create": { method: "POST", path: "/workspaces/{id}/credit_grants", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
29
+ "workspaces.credit_grants.list": { method: "GET", path: "/workspaces/{id}/credit_grants", pathParams: ["id"], query: ["limit"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
30
+ "balance.retrieve": { method: "GET", path: "/balance", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
31
+ "balance_transactions.list": { method: "GET", path: "/balance_transactions", pathParams: [], query: ["limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
32
+ "usage.retrieve": { method: "GET", path: "/usage", pathParams: [], query: ["group_by", "from", "to"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
33
+ "billing.preview.retrieve": { method: "GET", path: "/billing/preview", pathParams: [], query: ["month"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
34
+ "billing.preview.workspaces.list": { method: "GET", path: "/billing/preview/workspaces", pathParams: [], query: ["month", "limit", "starting_after"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
35
+ "billing.account.retrieve": { method: "GET", path: "/billing/account", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
36
+ "billing.auto_reload.retrieve": { method: "GET", path: "/billing/auto_reload", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
37
+ "billing.auto_reload.update": { method: "POST", path: "/billing/auto_reload", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
38
+ "sessions.create": { method: "POST", path: "/sessions", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
39
+ "webhook_endpoints.create": { method: "POST", path: "/webhook_endpoints", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
40
+ "webhook_endpoints.list": { method: "GET", path: "/webhook_endpoints", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
41
+ "webhook_endpoints.retrieve": { method: "GET", path: "/webhook_endpoints/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
42
+ "webhook_endpoints.update": { method: "POST", path: "/webhook_endpoints/{id}", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
43
+ "webhook_endpoints.delete": { method: "DELETE", path: "/webhook_endpoints/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
44
+ "webhook_endpoints.rotate_secret": { method: "POST", path: "/webhook_endpoints/{id}/rotate_secret", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
45
+ "webhook_endpoints.test": { method: "POST", path: "/webhook_endpoints/{id}/test", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
46
+ "webhook_endpoints.deliveries.list": { method: "GET", path: "/webhook_endpoints/{id}/deliveries", pathParams: ["id"], query: ["status", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
47
+ "webhook_endpoints.deliveries.resend": { method: "POST", path: "/webhook_endpoints/{id}/deliveries/{delivery_id}/resend", pathParams: ["id", "delivery_id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
48
+ "events.list": { method: "GET", path: "/events", pathParams: [], query: ["type", "workspace", "created[gte]", "created[lt]", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
49
+ "events.retrieve": { method: "GET", path: "/events/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
50
+ "workspaces.exports.create": { method: "POST", path: "/workspaces/{id}/exports", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
51
+ "workspaces.exports.list": { method: "GET", path: "/workspaces/{id}/exports", pathParams: ["id"], query: ["limit"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
52
+ "workspaces.exports.retrieve": { method: "GET", path: "/workspaces/{id}/exports/{export_id}", pathParams: ["id", "export_id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
53
+ "subjects.delete": { method: "DELETE", path: "/subjects/{subject}", pathParams: ["subject"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
54
+ "org_audit_events.list": { method: "GET", path: "/org_audit_events", pathParams: [], query: ["action", "created[gte]", "created[lt]", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
55
+ "org_audit_events.retrieve": { method: "GET", path: "/org_audit_events/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
56
+ "keys.self.retrieve": { method: "GET", path: "/keys/self", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
57
+ "keys.self.revoke": { method: "POST", path: "/keys/self/revoke", pathParams: [], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
58
+ "dev_sessions.create": { method: "POST", path: "/dev_sessions", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
59
+ "dev_sessions.retrieve": { method: "GET", path: "/dev_sessions/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
60
+ "dev_sessions.delete": { method: "DELETE", path: "/dev_sessions/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
61
+ "dev_sessions.requests.list": { method: "GET", path: "/dev_sessions/{id}/requests", pathParams: ["id"], query: ["wait"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
62
+ "dev_sessions.requests.respond": { method: "POST", path: "/dev_sessions/{id}/requests/{request_id}/response", pathParams: ["id", "request_id"], query: [], body: false, idempotencyKey: true, workspace: false, session: false, paginated: false },
63
+ "device_authorizations.deploy": { method: "POST", path: "/device_authorizations/deploy", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
64
+ "connector_catalog.list": { method: "GET", path: "/connector_catalog", pathParams: [], query: ["source", "status", "category", "limit", "starting_after"], body: false, idempotencyKey: false, workspace: false, session: false, paginated: true },
65
+ "connector_catalog.retrieve": { method: "GET", path: "/connector_catalog/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
66
+ "connect_settings.retrieve": { method: "GET", path: "/connect_settings", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
67
+ "connect_settings.update": { method: "POST", path: "/connect_settings", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
68
+ "oauth_apps.create": { method: "POST", path: "/oauth_apps", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: false, session: false, paginated: false },
69
+ "oauth_apps.list": { method: "GET", path: "/oauth_apps", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
70
+ "oauth_apps.retrieve": { method: "GET", path: "/oauth_apps/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
71
+ "oauth_apps.delete": { method: "DELETE", path: "/oauth_apps/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
72
+ "onboarding.retrieve": { method: "GET", path: "/onboarding", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: false, session: false, paginated: false },
73
+ "agents.list": { method: "GET", path: "/agents", pathParams: [], query: ["limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
74
+ "agents.create": { method: "POST", path: "/agents", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
75
+ "agents.retrieve": { method: "GET", path: "/agents/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
76
+ "agents.update": { method: "POST", path: "/agents/{id}", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
77
+ "agents.delete": { method: "DELETE", path: "/agents/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
78
+ "agents.pause": { method: "POST", path: "/agents/{id}/pause", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: true, session: false, paginated: false },
79
+ "agents.resume": { method: "POST", path: "/agents/{id}/resume", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: true, session: false, paginated: false },
80
+ "template_agents.list": { method: "GET", path: "/template_agents", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
81
+ "threads.create": { method: "POST", path: "/threads", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
82
+ "threads.list": { method: "GET", path: "/threads", pathParams: [], query: ["agent", "archived", "unseen", "order", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
83
+ "threads.retrieve": { method: "GET", path: "/threads/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
84
+ "threads.update": { method: "POST", path: "/threads/{id}", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
85
+ "messages.list": { method: "GET", path: "/threads/{id}/messages", pathParams: ["id"], query: ["limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
86
+ "messages.create": { method: "POST", path: "/threads/{id}/messages", pathParams: ["id"], query: ["stream"], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
87
+ "runs.list": { method: "GET", path: "/runs", pathParams: [], query: ["agent", "thread", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
88
+ "runs.retrieve": { method: "GET", path: "/runs/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
89
+ "runs.cancel": { method: "POST", path: "/runs/{id}/cancel", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: true, session: false, paginated: false },
90
+ "runs.stream": { method: "GET", path: "/runs/{id}/stream", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
91
+ "runs.create": { method: "POST", path: "/agents/{id}/runs", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: false, paginated: false },
92
+ "actions.list": { method: "GET", path: "/actions", pathParams: [], query: ["agent", "run", "status", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
93
+ "actions.retrieve": { method: "GET", path: "/actions/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
94
+ "approvals.list": { method: "GET", path: "/approvals", pathParams: [], query: ["status", "agent", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
95
+ "approvals.retrieve": { method: "GET", path: "/approvals/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
96
+ "approvals.decide": { method: "POST", path: "/approvals/{id}/decide", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
97
+ "tasks.create": { method: "POST", path: "/tasks", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: true, session: false, paginated: false },
98
+ "tasks.list": { method: "GET", path: "/tasks", pathParams: [], query: ["agent", "status", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
99
+ "tasks.retrieve": { method: "GET", path: "/tasks/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
100
+ "artifacts.list": { method: "GET", path: "/artifacts", pathParams: [], query: ["thread", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
101
+ "artifacts.retrieve": { method: "GET", path: "/artifacts/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
102
+ "audit_events.list": { method: "GET", path: "/audit_events", pathParams: [], query: ["action", "agent", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: false, paginated: true },
103
+ "inbound_events.create": { method: "POST", path: "/inbound_events", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: true, session: false, paginated: false },
104
+ "agents.memory.list": { method: "GET", path: "/agents/{id}/memory", pathParams: ["id"], query: ["kind", "limit", "starting_after"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
105
+ "agents.memory.forget": { method: "DELETE", path: "/agents/{id}/memory/{memory_item_id}", pathParams: ["id", "memory_item_id"], query: [], body: false, idempotencyKey: false, workspace: true, session: false, paginated: false },
106
+ "agents.memory.reset": { method: "POST", path: "/agents/{id}/memory/reset", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: true, session: false, paginated: false },
107
+ "vault_items.create": { method: "POST", path: "/vault_items", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
108
+ "vault_items.list": { method: "GET", path: "/vault_items", pathParams: [], query: ["name", "kind", "agent", "limit", "starting_after", "ending_before", "ask[thread]", "ask[message]"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
109
+ "vault_items.retrieve": { method: "GET", path: "/vault_items/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
110
+ "vault_items.update": { method: "POST", path: "/vault_items/{id}", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
111
+ "vault_items.delete": { method: "DELETE", path: "/vault_items/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
112
+ "model_keys.list": { method: "GET", path: "/model_keys", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
113
+ "model_keys.create": { method: "POST", path: "/model_keys", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
114
+ "model_keys.delete": { method: "DELETE", path: "/model_keys/{vendor}", pathParams: ["vendor"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
115
+ "model_presets.list": { method: "GET", path: "/model_presets", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
116
+ "connections.list": { method: "GET", path: "/connections", pathParams: [], query: ["app", "status", "agent", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
117
+ "connections.apps": { method: "GET", path: "/connections/apps", pathParams: [], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
118
+ "connections.retrieve": { method: "GET", path: "/connections/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
119
+ "connections.update": { method: "POST", path: "/connections/{id}", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
120
+ "connections.delete": { method: "DELETE", path: "/connections/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
121
+ "connections.expire": { method: "POST", path: "/connections/{id}/expire", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: true, session: false, paginated: false },
122
+ "connect_sessions.create": { method: "POST", path: "/connect_sessions", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
123
+ "connect_sessions.retrieve": { method: "GET", path: "/connect_sessions/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
124
+ "schedules.list": { method: "GET", path: "/schedules", pathParams: [], query: ["agent", "status", "limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
125
+ "schedules.create": { method: "POST", path: "/schedules", pathParams: [], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
126
+ "schedules.retrieve": { method: "GET", path: "/schedules/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
127
+ "schedules.update": { method: "POST", path: "/schedules/{id}", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
128
+ "schedules.cancel": { method: "DELETE", path: "/schedules/{id}", pathParams: ["id"], query: [], body: false, idempotencyKey: false, workspace: true, session: true, paginated: false },
129
+ "schedules.pause": { method: "POST", path: "/schedules/{id}/pause", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: true, session: true, paginated: false },
130
+ "schedules.resume": { method: "POST", path: "/schedules/{id}/resume", pathParams: ["id"], query: [], body: false, idempotencyKey: true, workspace: true, session: true, paginated: false },
131
+ "files.create": { method: "POST", path: "/files", pathParams: [], query: ["thread", "name"], body: false, idempotencyKey: true, workspace: true, session: true, paginated: false },
132
+ "threads.seen": { method: "POST", path: "/threads/{id}/seen", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
133
+ "agents.summary": { method: "GET", path: "/agents/summary", pathParams: [], query: ["limit", "starting_after", "ending_before"], body: false, idempotencyKey: false, workspace: true, session: true, paginated: true },
134
+ "computer_sessions.viewer": { method: "POST", path: "/computer_sessions/{id}/viewer", pathParams: ["id"], query: [], body: true, idempotencyKey: true, workspace: true, session: true, paginated: false },
135
+ };
136
+ export function createResources(c) {
137
+ return {
138
+ workspaces: {
139
+ create: (body, options) => c.request("workspaces.create", [], body, options),
140
+ list: (query, options) => c.list("workspaces.list", [], query, options),
141
+ retrieve: (id, options) => c.request("workspaces.retrieve", [id], undefined, options),
142
+ update: (id, body, options) => c.request("workspaces.update", [id], body, options),
143
+ delete: (id, options) => c.request("workspaces.delete", [id], undefined, options),
144
+ suspend: (id, options) => c.request("workspaces.suspend", [id], undefined, options),
145
+ resume: (id, options) => c.request("workspaces.resume", [id], undefined, options),
146
+ archive: (id, options) => c.request("workspaces.archive", [id], undefined, options),
147
+ restore: (id, options) => c.request("workspaces.restore", [id], undefined, options),
148
+ limits: {
149
+ update: (id, body, options) => c.request("workspaces.limits.update", [id], body, options),
150
+ },
151
+ creditGrants: {
152
+ create: (id, body, options) => c.request("workspaces.credit_grants.create", [id], body, options),
153
+ list: (id, query, options) => c.request("workspaces.credit_grants.list", [id], query, options),
154
+ },
155
+ exports: {
156
+ create: (id, body, options) => c.request("workspaces.exports.create", [id], body, options),
157
+ list: (id, query, options) => c.request("workspaces.exports.list", [id], query, options),
158
+ retrieve: (id, exportId, options) => c.request("workspaces.exports.retrieve", [id, exportId], undefined, options),
159
+ },
160
+ },
161
+ templates: {
162
+ create: (body, options) => c.request("templates.create", [], body, options),
163
+ list: (query, options) => c.list("templates.list", [], query, options),
164
+ promote: (slug, body, options) => c.request("templates.promote", [slug], body, options),
165
+ versions: {
166
+ create: (slug, body, options) => c.request("templates.versions.create", [slug], body, options),
167
+ list: (slug, query, options) => c.list("templates.versions.list", [slug], query, options),
168
+ retrieve: (slug, version, options) => c.request("templates.versions.retrieve", [slug, version], undefined, options),
169
+ },
170
+ },
171
+ connectors: {
172
+ create: (body, options) => c.request("connectors.create", [], body, options),
173
+ list: (query, options) => c.list("connectors.list", [], query, options),
174
+ retrieve: (id, options) => c.request("connectors.retrieve", [id], undefined, options),
175
+ pin: (id, body, options) => c.request("connectors.pin", [id], body, options),
176
+ test: (id, options) => c.request("connectors.test", [id], undefined, options),
177
+ rotateSecret: (id, body, options) => c.request("connectors.rotate_secret", [id], body, options),
178
+ pullTemplate: (id, options) => c.request("connectors.pull_template", [id], undefined, options),
179
+ calls: {
180
+ list: (id, query, options) => c.list("connectors.calls.list", [id], query, options),
181
+ },
182
+ },
183
+ balance: {
184
+ retrieve: (options) => c.request("balance.retrieve", [], undefined, options),
185
+ },
186
+ balanceTransactions: {
187
+ list: (query, options) => c.list("balance_transactions.list", [], query, options),
188
+ },
189
+ usage: {
190
+ retrieve: (query, options) => c.request("usage.retrieve", [], query, options),
191
+ },
192
+ billing: {
193
+ preview: {
194
+ retrieve: (query, options) => c.request("billing.preview.retrieve", [], query, options),
195
+ workspaces: {
196
+ list: (query, options) => c.list("billing.preview.workspaces.list", [], query, options),
197
+ },
198
+ },
199
+ account: {
200
+ retrieve: (options) => c.request("billing.account.retrieve", [], undefined, options),
201
+ },
202
+ autoReload: {
203
+ retrieve: (options) => c.request("billing.auto_reload.retrieve", [], undefined, options),
204
+ update: (body, options) => c.request("billing.auto_reload.update", [], body, options),
205
+ },
206
+ },
207
+ sessions: {
208
+ create: (body, options) => c.request("sessions.create", [], body, options),
209
+ },
210
+ webhookEndpoints: {
211
+ create: (body, options) => c.request("webhook_endpoints.create", [], body, options),
212
+ list: (options) => c.request("webhook_endpoints.list", [], undefined, options),
213
+ retrieve: (id, options) => c.request("webhook_endpoints.retrieve", [id], undefined, options),
214
+ update: (id, body, options) => c.request("webhook_endpoints.update", [id], body, options),
215
+ delete: (id, options) => c.request("webhook_endpoints.delete", [id], undefined, options),
216
+ rotateSecret: (id, body, options) => c.request("webhook_endpoints.rotate_secret", [id], body, options),
217
+ test: (id, options) => c.request("webhook_endpoints.test", [id], undefined, options),
218
+ deliveries: {
219
+ list: (id, query, options) => c.list("webhook_endpoints.deliveries.list", [id], query, options),
220
+ resend: (id, deliveryId, options) => c.request("webhook_endpoints.deliveries.resend", [id, deliveryId], undefined, options),
221
+ },
222
+ },
223
+ events: {
224
+ list: (query, options) => c.list("events.list", [], query, options),
225
+ retrieve: (id, options) => c.request("events.retrieve", [id], undefined, options),
226
+ },
227
+ subjects: {
228
+ delete: (subject, options) => c.request("subjects.delete", [subject], undefined, options),
229
+ },
230
+ orgAuditEvents: {
231
+ list: (query, options) => c.list("org_audit_events.list", [], query, options),
232
+ retrieve: (id, options) => c.request("org_audit_events.retrieve", [id], undefined, options),
233
+ },
234
+ keys: {
235
+ self: {
236
+ retrieve: (options) => c.request("keys.self.retrieve", [], undefined, options),
237
+ revoke: (options) => c.request("keys.self.revoke", [], undefined, options),
238
+ },
239
+ },
240
+ devSessions: {
241
+ create: (body, options) => c.request("dev_sessions.create", [], body, options),
242
+ retrieve: (id, options) => c.request("dev_sessions.retrieve", [id], undefined, options),
243
+ delete: (id, options) => c.request("dev_sessions.delete", [id], undefined, options),
244
+ requests: {
245
+ list: (id, query, options) => c.request("dev_sessions.requests.list", [id], query, options),
246
+ },
247
+ },
248
+ deviceAuthorizations: {
249
+ deploy: (body, options) => c.request("device_authorizations.deploy", [], body, options),
250
+ },
251
+ connectorCatalog: {
252
+ list: (query, options) => c.list("connector_catalog.list", [], query, options),
253
+ retrieve: (id, options) => c.request("connector_catalog.retrieve", [id], undefined, options),
254
+ },
255
+ connectSettings: {
256
+ retrieve: (options) => c.request("connect_settings.retrieve", [], undefined, options),
257
+ update: (body, options) => c.request("connect_settings.update", [], body, options),
258
+ },
259
+ oauthApps: {
260
+ create: (body, options) => c.request("oauth_apps.create", [], body, options),
261
+ list: (options) => c.request("oauth_apps.list", [], undefined, options),
262
+ retrieve: (id, options) => c.request("oauth_apps.retrieve", [id], undefined, options),
263
+ delete: (id, options) => c.request("oauth_apps.delete", [id], undefined, options),
264
+ },
265
+ onboarding: {
266
+ retrieve: (options) => c.request("onboarding.retrieve", [], undefined, options),
267
+ },
268
+ agents: {
269
+ list: (query, options) => c.list("agents.list", [], query, options),
270
+ create: (body, options) => c.request("agents.create", [], body, options),
271
+ retrieve: (id, options) => c.request("agents.retrieve", [id], undefined, options),
272
+ update: (id, body, options) => c.request("agents.update", [id], body, options),
273
+ delete: (id, options) => c.request("agents.delete", [id], undefined, options),
274
+ pause: (id, options) => c.request("agents.pause", [id], undefined, options),
275
+ resume: (id, options) => c.request("agents.resume", [id], undefined, options),
276
+ summary: (query, options) => c.list("agents.summary", [], query, options),
277
+ memory: {
278
+ list: (id, query, options) => c.list("agents.memory.list", [id], query, options),
279
+ forget: (id, memoryItemId, options) => c.request("agents.memory.forget", [id, memoryItemId], undefined, options),
280
+ reset: (id, options) => c.request("agents.memory.reset", [id], undefined, options),
281
+ },
282
+ },
283
+ templateAgents: {
284
+ list: (options) => c.request("template_agents.list", [], undefined, options),
285
+ },
286
+ threads: {
287
+ create: (body, options) => c.request("threads.create", [], body, options),
288
+ list: (query, options) => c.list("threads.list", [], query, options),
289
+ retrieve: (id, options) => c.request("threads.retrieve", [id], undefined, options),
290
+ update: (id, body, options) => c.request("threads.update", [id], body, options),
291
+ seen: (id, body, options) => c.request("threads.seen", [id], body, options),
292
+ },
293
+ messages: {
294
+ list: (id, query, options) => c.list("messages.list", [id], query, options),
295
+ create: (id, body, options) => c.request("messages.create", [id], body, options),
296
+ },
297
+ runs: {
298
+ list: (query, options) => c.list("runs.list", [], query, options),
299
+ retrieve: (id, options) => c.request("runs.retrieve", [id], undefined, options),
300
+ cancel: (id, options) => c.request("runs.cancel", [id], undefined, options),
301
+ create: (id, body, options) => c.request("runs.create", [id], body, options),
302
+ },
303
+ actions: {
304
+ list: (query, options) => c.list("actions.list", [], query, options),
305
+ retrieve: (id, options) => c.request("actions.retrieve", [id], undefined, options),
306
+ },
307
+ approvals: {
308
+ list: (query, options) => c.list("approvals.list", [], query, options),
309
+ retrieve: (id, options) => c.request("approvals.retrieve", [id], undefined, options),
310
+ decide: (id, body, options) => c.request("approvals.decide", [id], body, options),
311
+ },
312
+ tasks: {
313
+ create: (body, options) => c.request("tasks.create", [], body, options),
314
+ list: (query, options) => c.list("tasks.list", [], query, options),
315
+ retrieve: (id, options) => c.request("tasks.retrieve", [id], undefined, options),
316
+ },
317
+ artifacts: {
318
+ list: (query, options) => c.list("artifacts.list", [], query, options),
319
+ retrieve: (id, options) => c.request("artifacts.retrieve", [id], undefined, options),
320
+ },
321
+ auditEvents: {
322
+ list: (query, options) => c.list("audit_events.list", [], query, options),
323
+ },
324
+ inboundEvents: {
325
+ create: (body, options) => c.request("inbound_events.create", [], body, options),
326
+ },
327
+ vaultItems: {
328
+ create: (body, options) => c.request("vault_items.create", [], body, options),
329
+ list: (query, options) => c.list("vault_items.list", [], query, options),
330
+ retrieve: (id, options) => c.request("vault_items.retrieve", [id], undefined, options),
331
+ update: (id, body, options) => c.request("vault_items.update", [id], body, options),
332
+ delete: (id, options) => c.request("vault_items.delete", [id], undefined, options),
333
+ },
334
+ modelKeys: {
335
+ list: (options) => c.request("model_keys.list", [], undefined, options),
336
+ create: (body, options) => c.request("model_keys.create", [], body, options),
337
+ delete: (vendor, options) => c.request("model_keys.delete", [vendor], undefined, options),
338
+ },
339
+ modelPresets: {
340
+ list: (options) => c.request("model_presets.list", [], undefined, options),
341
+ },
342
+ connections: {
343
+ list: (query, options) => c.list("connections.list", [], query, options),
344
+ apps: (options) => c.request("connections.apps", [], undefined, options),
345
+ retrieve: (id, options) => c.request("connections.retrieve", [id], undefined, options),
346
+ update: (id, body, options) => c.request("connections.update", [id], body, options),
347
+ delete: (id, options) => c.request("connections.delete", [id], undefined, options),
348
+ expire: (id, options) => c.request("connections.expire", [id], undefined, options),
349
+ },
350
+ connectSessions: {
351
+ create: (body, options) => c.request("connect_sessions.create", [], body, options),
352
+ retrieve: (id, options) => c.request("connect_sessions.retrieve", [id], undefined, options),
353
+ },
354
+ schedules: {
355
+ list: (query, options) => c.list("schedules.list", [], query, options),
356
+ create: (body, options) => c.request("schedules.create", [], body, options),
357
+ retrieve: (id, options) => c.request("schedules.retrieve", [id], undefined, options),
358
+ update: (id, body, options) => c.request("schedules.update", [id], body, options),
359
+ cancel: (id, options) => c.request("schedules.cancel", [id], undefined, options),
360
+ pause: (id, options) => c.request("schedules.pause", [id], undefined, options),
361
+ resume: (id, options) => c.request("schedules.resume", [id], undefined, options),
362
+ },
363
+ computerSessions: {
364
+ viewer: (id, body, options) => c.request("computer_sessions.viewer", [id], body, options),
365
+ },
366
+ };
367
+ }
368
+ export class GeneratedResources {
369
+ workspaces;
370
+ templates;
371
+ connectors;
372
+ balance;
373
+ balanceTransactions;
374
+ usage;
375
+ billing;
376
+ sessions;
377
+ webhookEndpoints;
378
+ events;
379
+ subjects;
380
+ orgAuditEvents;
381
+ keys;
382
+ devSessions;
383
+ deviceAuthorizations;
384
+ connectorCatalog;
385
+ connectSettings;
386
+ oauthApps;
387
+ onboarding;
388
+ agents;
389
+ templateAgents;
390
+ threads;
391
+ messages;
392
+ runs;
393
+ actions;
394
+ approvals;
395
+ tasks;
396
+ artifacts;
397
+ auditEvents;
398
+ inboundEvents;
399
+ vaultItems;
400
+ modelKeys;
401
+ modelPresets;
402
+ connections;
403
+ connectSessions;
404
+ schedules;
405
+ computerSessions;
406
+ constructor(caller) {
407
+ const r = createResources(caller);
408
+ this.workspaces = r.workspaces;
409
+ this.templates = r.templates;
410
+ this.connectors = r.connectors;
411
+ this.balance = r.balance;
412
+ this.balanceTransactions = r.balanceTransactions;
413
+ this.usage = r.usage;
414
+ this.billing = r.billing;
415
+ this.sessions = r.sessions;
416
+ this.webhookEndpoints = r.webhookEndpoints;
417
+ this.events = r.events;
418
+ this.subjects = r.subjects;
419
+ this.orgAuditEvents = r.orgAuditEvents;
420
+ this.keys = r.keys;
421
+ this.devSessions = r.devSessions;
422
+ this.deviceAuthorizations = r.deviceAuthorizations;
423
+ this.connectorCatalog = r.connectorCatalog;
424
+ this.connectSettings = r.connectSettings;
425
+ this.oauthApps = r.oauthApps;
426
+ this.onboarding = r.onboarding;
427
+ this.agents = r.agents;
428
+ this.templateAgents = r.templateAgents;
429
+ this.threads = r.threads;
430
+ this.messages = r.messages;
431
+ this.runs = r.runs;
432
+ this.actions = r.actions;
433
+ this.approvals = r.approvals;
434
+ this.tasks = r.tasks;
435
+ this.artifacts = r.artifacts;
436
+ this.auditEvents = r.auditEvents;
437
+ this.inboundEvents = r.inboundEvents;
438
+ this.vaultItems = r.vaultItems;
439
+ this.modelKeys = r.modelKeys;
440
+ this.modelPresets = r.modelPresets;
441
+ this.connections = r.connections;
442
+ this.connectSessions = r.connectSessions;
443
+ this.schedules = r.schedules;
444
+ this.computerSessions = r.computerSessions;
445
+ }
446
+ }