@usestatemachines/sdk 0.4.0 → 0.6.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 (270) hide show
  1. package/README.md +177 -470
  2. package/agents/SKILL.md +38 -47
  3. package/agents/index.js +7 -7
  4. package/agents/llms.txt +49 -45
  5. package/agents/prompt.md +11 -11
  6. package/esm/extensions/client.d.ts +105 -116
  7. package/esm/extensions/client.js +162 -309
  8. package/esm/extensions/credentials.d.ts +13 -0
  9. package/esm/extensions/credentials.js +73 -0
  10. package/esm/extensions/environment.d.ts +25 -0
  11. package/esm/extensions/environment.js +1 -0
  12. package/esm/extensions/errors.d.ts +42 -75
  13. package/esm/extensions/errors.js +125 -110
  14. package/esm/extensions/index.d.ts +6 -11
  15. package/esm/extensions/index.js +2 -7
  16. package/esm/extensions/wait.d.ts +17 -18
  17. package/esm/extensions/wait.js +60 -56
  18. package/esm/extensions/yaml.d.ts +6 -0
  19. package/esm/extensions/yaml.js +137 -0
  20. package/esm/funcs/{catalog-release.d.ts → apps-list.d.ts} +1 -1
  21. package/esm/funcs/apps-list.js +91 -0
  22. package/esm/funcs/{credential-get.d.ts → apps-versions.d.ts} +1 -1
  23. package/esm/funcs/{workspaces-events.js → apps-versions.js} +6 -7
  24. package/esm/funcs/{environments-get-connection.d.ts → audit-events-list.d.ts} +1 -1
  25. package/esm/funcs/audit-events-list.js +93 -0
  26. package/esm/funcs/{workspaces-events.d.ts → environments-connect.d.ts} +1 -1
  27. package/esm/funcs/{environments-reveal.js → environments-connect.js} +7 -6
  28. package/esm/funcs/environments-create.d.ts +2 -1
  29. package/esm/funcs/environments-create.js +5 -10
  30. package/esm/funcs/{environments-events.d.ts → environments-delete.d.ts} +1 -1
  31. package/esm/funcs/{environments-stop.js → environments-delete.js} +8 -6
  32. package/esm/funcs/environments-get.d.ts +2 -1
  33. package/esm/funcs/environments-get.js +2 -1
  34. package/esm/funcs/environments-list.d.ts +1 -1
  35. package/esm/funcs/environments-list.js +11 -16
  36. package/esm/funcs/environments-pause.d.ts +12 -0
  37. package/esm/funcs/{environments-suspend.js → environments-pause.js} +7 -5
  38. package/esm/funcs/environments-resume.d.ts +2 -1
  39. package/esm/funcs/environments-resume.js +3 -1
  40. package/esm/funcs/environments-update.d.ts +12 -0
  41. package/esm/funcs/{get-environment-position.js → environments-update.js} +10 -8
  42. package/esm/funcs/me.d.ts +11 -0
  43. package/esm/funcs/{catalog-get.js → me.js} +5 -5
  44. package/esm/funcs/{catalog-get.d.ts → requests-body.d.ts} +1 -1
  45. package/esm/funcs/{environments-get-connection.js → requests-body.js} +8 -8
  46. package/esm/funcs/requests-get.d.ts +12 -0
  47. package/esm/funcs/{catalog-release.js → requests-get.js} +7 -6
  48. package/esm/funcs/{environments-stop.d.ts → requests-list.d.ts} +1 -1
  49. package/esm/funcs/{list-environment-history.js → requests-list.js} +15 -12
  50. package/esm/funcs/requests-stats.d.ts +12 -0
  51. package/esm/funcs/{environments-events.js → requests-stats.js} +15 -14
  52. package/esm/funcs/snapshots-create.d.ts +12 -0
  53. package/esm/funcs/{snapshots-capture.js → snapshots-create.js} +6 -11
  54. package/esm/funcs/snapshots-delete.d.ts +2 -1
  55. package/esm/funcs/snapshots-delete.js +2 -1
  56. package/esm/funcs/snapshots-get.d.ts +2 -1
  57. package/esm/funcs/snapshots-get.js +2 -1
  58. package/esm/funcs/snapshots-list.d.ts +1 -1
  59. package/esm/funcs/snapshots-list.js +9 -13
  60. package/esm/funcs/snapshots-update.d.ts +2 -1
  61. package/esm/funcs/snapshots-update.js +2 -1
  62. package/esm/funcs/workspaces-get.d.ts +2 -1
  63. package/esm/funcs/workspaces-get.js +2 -1
  64. package/esm/funcs/workspaces-list.d.ts +1 -1
  65. package/esm/funcs/workspaces-list.js +3 -1
  66. package/esm/lib/config.d.ts +3 -3
  67. package/esm/lib/config.js +3 -3
  68. package/esm/models/actor.d.ts +2 -3
  69. package/esm/models/actor.js +2 -3
  70. package/esm/models/{api-profile.d.ts → api.d.ts} +4 -4
  71. package/esm/models/{api-profile.js → api.js} +4 -5
  72. package/esm/models/app.d.ts +9 -1
  73. package/esm/models/app.js +7 -1
  74. package/esm/models/{event.d.ts → audit-event.d.ts} +6 -6
  75. package/esm/models/{event.js → audit-event.js} +7 -6
  76. package/esm/models/body-preview.d.ts +31 -0
  77. package/esm/models/body-preview.js +34 -0
  78. package/esm/models/create-environment.d.ts +51 -0
  79. package/esm/models/create-environment.js +35 -0
  80. package/esm/models/credentials.d.ts +31 -0
  81. package/esm/models/credentials.js +31 -0
  82. package/esm/models/environment-failure.d.ts +22 -0
  83. package/esm/models/environment-failure.js +25 -0
  84. package/esm/models/environment-status.d.ts +14 -0
  85. package/esm/models/environment-status.js +15 -0
  86. package/esm/models/environment.d.ts +27 -27
  87. package/esm/models/environment.js +28 -27
  88. package/esm/models/error.d.ts +38 -0
  89. package/esm/models/error.js +39 -0
  90. package/esm/models/errors/{error-response.d.ts → error.d.ts} +5 -5
  91. package/esm/models/errors/{error-response.js → error.js} +4 -4
  92. package/esm/models/errors/index.d.ts +1 -1
  93. package/esm/models/errors/index.js +1 -1
  94. package/esm/models/index.d.ts +17 -22
  95. package/esm/models/index.js +17 -22
  96. package/esm/models/me.d.ts +66 -0
  97. package/esm/models/me.js +75 -0
  98. package/esm/models/operations/create-credentials.d.ts +25 -0
  99. package/esm/models/operations/create-credentials.js +20 -0
  100. package/esm/models/operations/create-environment.d.ts +14 -0
  101. package/esm/models/operations/create-environment.js +18 -0
  102. package/esm/models/operations/create-snapshot.d.ts +25 -0
  103. package/esm/models/operations/create-snapshot.js +25 -0
  104. package/esm/models/operations/delete-environment.d.ts +13 -0
  105. package/esm/models/operations/delete-environment.js +17 -0
  106. package/esm/models/operations/delete-snapshot.d.ts +0 -12
  107. package/esm/models/operations/delete-snapshot.js +0 -9
  108. package/esm/models/operations/get-environment.d.ts +0 -12
  109. package/esm/models/operations/get-environment.js +0 -9
  110. package/esm/models/operations/get-request-body.d.ts +21 -0
  111. package/esm/models/operations/get-request-body.js +18 -0
  112. package/esm/models/operations/get-request-stats.d.ts +51 -0
  113. package/esm/models/operations/get-request-stats.js +40 -0
  114. package/esm/models/operations/get-request.d.ts +11 -0
  115. package/esm/models/operations/get-request.js +11 -0
  116. package/esm/models/operations/get-snapshot.d.ts +0 -12
  117. package/esm/models/operations/get-snapshot.js +0 -9
  118. package/esm/models/operations/get-workspace.d.ts +0 -12
  119. package/esm/models/operations/get-workspace.js +0 -9
  120. package/esm/models/operations/index.d.ts +13 -15
  121. package/esm/models/operations/index.js +13 -15
  122. package/esm/models/operations/list-apps.d.ts +26 -0
  123. package/esm/models/operations/list-apps.js +23 -0
  124. package/esm/models/operations/list-audit-events.d.ts +30 -0
  125. package/esm/models/operations/list-audit-events.js +25 -0
  126. package/esm/models/operations/list-environments.d.ts +6 -21
  127. package/esm/models/operations/list-environments.js +3 -16
  128. package/esm/models/operations/list-requests.d.ts +68 -0
  129. package/esm/models/operations/list-requests.js +53 -0
  130. package/esm/models/operations/list-snapshots.d.ts +8 -6
  131. package/esm/models/operations/list-snapshots.js +4 -3
  132. package/esm/models/operations/list-versions.d.ts +28 -0
  133. package/esm/models/operations/list-versions.js +24 -0
  134. package/esm/models/operations/list-workspaces.d.ts +8 -4
  135. package/esm/models/operations/list-workspaces.js +7 -4
  136. package/esm/models/operations/pause-environment.d.ts +13 -0
  137. package/esm/models/operations/pause-environment.js +17 -0
  138. package/esm/models/operations/resume-environment.d.ts +2 -12
  139. package/esm/models/operations/resume-environment.js +8 -11
  140. package/esm/models/operations/update-environment.d.ts +29 -0
  141. package/esm/models/operations/update-environment.js +20 -0
  142. package/esm/models/operations/update-snapshot.d.ts +0 -14
  143. package/esm/models/operations/update-snapshot.js +0 -10
  144. package/esm/models/permission.d.ts +17 -0
  145. package/esm/models/permission.js +18 -0
  146. package/esm/models/principal.d.ts +20 -0
  147. package/esm/models/principal.js +24 -0
  148. package/esm/models/request-detail.d.ts +39 -0
  149. package/esm/models/request-detail.js +38 -0
  150. package/esm/models/request-stats.d.ts +26 -0
  151. package/esm/models/request-stats.js +31 -0
  152. package/esm/models/request.d.ts +30 -0
  153. package/esm/models/request.js +34 -0
  154. package/esm/models/snapshot-status.d.ts +13 -0
  155. package/esm/models/snapshot-status.js +14 -0
  156. package/esm/models/snapshot.d.ts +47 -0
  157. package/esm/models/snapshot.js +54 -0
  158. package/esm/models/version.d.ts +27 -0
  159. package/esm/models/version.js +31 -0
  160. package/esm/models/workspace.d.ts +2 -4
  161. package/esm/models/workspace.js +2 -4
  162. package/esm/sdk/apps.d.ts +6 -0
  163. package/esm/sdk/apps.js +15 -0
  164. package/esm/sdk/audit-events.d.ts +5 -0
  165. package/esm/sdk/audit-events.js +11 -0
  166. package/esm/sdk/environments.d.ts +8 -9
  167. package/esm/sdk/environments.js +19 -23
  168. package/esm/sdk/requests.d.ts +9 -0
  169. package/esm/sdk/requests.js +23 -0
  170. package/esm/sdk/sdk.d.ts +11 -11
  171. package/esm/sdk/sdk.js +16 -23
  172. package/esm/sdk/snapshots.d.ts +6 -5
  173. package/esm/sdk/snapshots.js +7 -7
  174. package/esm/sdk/workspaces.d.ts +1 -2
  175. package/esm/sdk/workspaces.js +0 -4
  176. package/esm/types/smart-union.js +1 -2
  177. package/openapi.json +1630 -2380
  178. package/package.json +15 -13
  179. package/esm/extensions/apps.d.ts +0 -18
  180. package/esm/extensions/apps.js +0 -39
  181. package/esm/extensions/connection.d.ts +0 -42
  182. package/esm/extensions/connection.js +0 -133
  183. package/esm/extensions/running-environment.d.ts +0 -46
  184. package/esm/extensions/running-environment.js +0 -66
  185. package/esm/funcs/create-environment-definition.d.ts +0 -11
  186. package/esm/funcs/create-environment-definition.js +0 -94
  187. package/esm/funcs/credential-get.js +0 -76
  188. package/esm/funcs/environments-reveal.d.ts +0 -11
  189. package/esm/funcs/environments-suspend.d.ts +0 -11
  190. package/esm/funcs/get-environment-exchange.d.ts +0 -11
  191. package/esm/funcs/get-environment-exchange.js +0 -96
  192. package/esm/funcs/get-environment-position.d.ts +0 -11
  193. package/esm/funcs/list-environment-history.d.ts +0 -11
  194. package/esm/funcs/snapshots-capture.d.ts +0 -11
  195. package/esm/models/app-instance-snapshot.d.ts +0 -15
  196. package/esm/models/app-instance-snapshot.js +0 -19
  197. package/esm/models/catalog.d.ts +0 -12
  198. package/esm/models/catalog.js +0 -15
  199. package/esm/models/connection-secret.d.ts +0 -30
  200. package/esm/models/connection-secret.js +0 -31
  201. package/esm/models/connection.d.ts +0 -40
  202. package/esm/models/connection.js +0 -44
  203. package/esm/models/create-environment-input.d.ts +0 -39
  204. package/esm/models/create-environment-input.js +0 -25
  205. package/esm/models/credential-kind.d.ts +0 -9
  206. package/esm/models/credential-kind.js +0 -10
  207. package/esm/models/credential.d.ts +0 -48
  208. package/esm/models/credential.js +0 -44
  209. package/esm/models/environment-app.d.ts +0 -53
  210. package/esm/models/environment-app.js +0 -57
  211. package/esm/models/environment-exchange.d.ts +0 -116
  212. package/esm/models/environment-exchange.js +0 -126
  213. package/esm/models/environment-lifetime.d.ts +0 -10
  214. package/esm/models/environment-lifetime.js +0 -14
  215. package/esm/models/environment-position.d.ts +0 -25
  216. package/esm/models/environment-position.js +0 -32
  217. package/esm/models/environment-snapshot.d.ts +0 -40
  218. package/esm/models/environment-snapshot.js +0 -42
  219. package/esm/models/error-response.d.ts +0 -58
  220. package/esm/models/error-response.js +0 -60
  221. package/esm/models/event-page.d.ts +0 -11
  222. package/esm/models/event-page.js +0 -16
  223. package/esm/models/history-body.d.ts +0 -28
  224. package/esm/models/history-body.js +0 -33
  225. package/esm/models/history-cause.d.ts +0 -48
  226. package/esm/models/history-cause.js +0 -63
  227. package/esm/models/history-position.d.ts +0 -11
  228. package/esm/models/history-position.js +0 -15
  229. package/esm/models/history-transaction.d.ts +0 -16
  230. package/esm/models/history-transaction.js +0 -20
  231. package/esm/models/operations/capture-snapshot.d.ts +0 -41
  232. package/esm/models/operations/capture-snapshot.js +0 -36
  233. package/esm/models/operations/create-environment-definition.d.ts +0 -225
  234. package/esm/models/operations/create-environment-definition.js +0 -149
  235. package/esm/models/operations/create-environments.d.ts +0 -27
  236. package/esm/models/operations/create-environments.js +0 -27
  237. package/esm/models/operations/get-catalog.d.ts +0 -13
  238. package/esm/models/operations/get-catalog.js +0 -13
  239. package/esm/models/operations/get-connection.d.ts +0 -25
  240. package/esm/models/operations/get-connection.js +0 -21
  241. package/esm/models/operations/get-credential.d.ts +0 -13
  242. package/esm/models/operations/get-credential.js +0 -13
  243. package/esm/models/operations/get-environment-exchange.d.ts +0 -25
  244. package/esm/models/operations/get-environment-exchange.js +0 -21
  245. package/esm/models/operations/get-environment-position.d.ts +0 -23
  246. package/esm/models/operations/get-environment-position.js +0 -20
  247. package/esm/models/operations/get-release.d.ts +0 -23
  248. package/esm/models/operations/get-release.js +0 -20
  249. package/esm/models/operations/list-environment-events.d.ts +0 -15
  250. package/esm/models/operations/list-environment-events.js +0 -13
  251. package/esm/models/operations/list-environment-history.d.ts +0 -28
  252. package/esm/models/operations/list-environment-history.js +0 -24
  253. package/esm/models/operations/list-workspace-events.d.ts +0 -15
  254. package/esm/models/operations/list-workspace-events.js +0 -13
  255. package/esm/models/operations/reveal-connection.d.ts +0 -59
  256. package/esm/models/operations/reveal-connection.js +0 -55
  257. package/esm/models/operations/stop-environment.d.ts +0 -23
  258. package/esm/models/operations/stop-environment.js +0 -20
  259. package/esm/models/operations/suspend-environment.d.ts +0 -23
  260. package/esm/models/operations/suspend-environment.js +0 -20
  261. package/esm/models/release-actor.d.ts +0 -11
  262. package/esm/models/release-actor.js +0 -15
  263. package/esm/models/release.d.ts +0 -37
  264. package/esm/models/release.js +0 -39
  265. package/esm/sdk/catalog.d.ts +0 -6
  266. package/esm/sdk/catalog.js +0 -15
  267. package/esm/sdk/credential.d.ts +0 -5
  268. package/esm/sdk/credential.js +0 -11
  269. package/esm/types/discriminated-union.d.ts +0 -24
  270. package/esm/types/discriminated-union.js +0 -60
@@ -1,16 +1,7 @@
1
1
  import * as z from "zod/v4-mini";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdk-validation-error.js";
4
- import * as models from "../index.js";
5
2
  export type GetSnapshotRequest = {
6
3
  snapshotId: string;
7
4
  };
8
- /**
9
- * Environment snapshot and its app instance snapshots
10
- */
11
- export type GetSnapshotResponse = {
12
- data: models.EnvironmentSnapshot;
13
- };
14
5
  /** @internal */
15
6
  export type GetSnapshotRequest$Outbound = {
16
7
  snapshotId: string;
@@ -18,6 +9,3 @@ export type GetSnapshotRequest$Outbound = {
18
9
  /** @internal */
19
10
  export declare const GetSnapshotRequest$outboundSchema: z.ZodMiniType<GetSnapshotRequest$Outbound, GetSnapshotRequest>;
20
11
  export declare function getSnapshotRequestToJSON(getSnapshotRequest: GetSnapshotRequest): string;
21
- /** @internal */
22
- export declare const GetSnapshotResponse$inboundSchema: z.ZodMiniType<GetSnapshotResponse, unknown>;
23
- export declare function getSnapshotResponseFromJSON(jsonString: string): SafeParseResult<GetSnapshotResponse, SDKValidationError>;
@@ -2,8 +2,6 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
  import * as z from "zod/v4-mini";
5
- import { safeParse } from "../../lib/schemas.js";
6
- import * as models from "../index.js";
7
5
  /** @internal */
8
6
  export const GetSnapshotRequest$outboundSchema = z.object({
9
7
  snapshotId: z.string(),
@@ -11,10 +9,3 @@ export const GetSnapshotRequest$outboundSchema = z.object({
11
9
  export function getSnapshotRequestToJSON(getSnapshotRequest) {
12
10
  return JSON.stringify(GetSnapshotRequest$outboundSchema.parse(getSnapshotRequest));
13
11
  }
14
- /** @internal */
15
- export const GetSnapshotResponse$inboundSchema = z.object({
16
- data: models.EnvironmentSnapshot$inboundSchema,
17
- });
18
- export function getSnapshotResponseFromJSON(jsonString) {
19
- return safeParse(jsonString, (x) => GetSnapshotResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSnapshotResponse' from JSON`);
20
- }
@@ -1,16 +1,7 @@
1
1
  import * as z from "zod/v4-mini";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdk-validation-error.js";
4
- import * as models from "../index.js";
5
2
  export type GetWorkspaceRequest = {
6
3
  workspaceId: string;
7
4
  };
8
- /**
9
- * Workspace
10
- */
11
- export type GetWorkspaceResponse = {
12
- data: models.Workspace;
13
- };
14
5
  /** @internal */
15
6
  export type GetWorkspaceRequest$Outbound = {
16
7
  workspaceId: string;
@@ -18,6 +9,3 @@ export type GetWorkspaceRequest$Outbound = {
18
9
  /** @internal */
19
10
  export declare const GetWorkspaceRequest$outboundSchema: z.ZodMiniType<GetWorkspaceRequest$Outbound, GetWorkspaceRequest>;
20
11
  export declare function getWorkspaceRequestToJSON(getWorkspaceRequest: GetWorkspaceRequest): string;
21
- /** @internal */
22
- export declare const GetWorkspaceResponse$inboundSchema: z.ZodMiniType<GetWorkspaceResponse, unknown>;
23
- export declare function getWorkspaceResponseFromJSON(jsonString: string): SafeParseResult<GetWorkspaceResponse, SDKValidationError>;
@@ -2,8 +2,6 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
  import * as z from "zod/v4-mini";
5
- import { safeParse } from "../../lib/schemas.js";
6
- import * as models from "../index.js";
7
5
  /** @internal */
8
6
  export const GetWorkspaceRequest$outboundSchema = z.object({
9
7
  workspaceId: z.string(),
@@ -11,10 +9,3 @@ export const GetWorkspaceRequest$outboundSchema = z.object({
11
9
  export function getWorkspaceRequestToJSON(getWorkspaceRequest) {
12
10
  return JSON.stringify(GetWorkspaceRequest$outboundSchema.parse(getWorkspaceRequest));
13
11
  }
14
- /** @internal */
15
- export const GetWorkspaceResponse$inboundSchema = z.object({
16
- data: models.Workspace$inboundSchema,
17
- });
18
- export function getWorkspaceResponseFromJSON(jsonString) {
19
- return safeParse(jsonString, (x) => GetWorkspaceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetWorkspaceResponse' from JSON`);
20
- }
@@ -1,24 +1,22 @@
1
- export * from "./capture-snapshot.js";
2
- export * from "./create-environment-definition.js";
3
- export * from "./create-environments.js";
1
+ export * from "./create-credentials.js";
2
+ export * from "./create-environment.js";
3
+ export * from "./create-snapshot.js";
4
+ export * from "./delete-environment.js";
4
5
  export * from "./delete-snapshot.js";
5
- export * from "./get-catalog.js";
6
- export * from "./get-connection.js";
7
- export * from "./get-credential.js";
8
- export * from "./get-environment-exchange.js";
9
- export * from "./get-environment-position.js";
10
6
  export * from "./get-environment.js";
11
- export * from "./get-release.js";
7
+ export * from "./get-request-body.js";
8
+ export * from "./get-request-stats.js";
9
+ export * from "./get-request.js";
12
10
  export * from "./get-snapshot.js";
13
11
  export * from "./get-workspace.js";
14
- export * from "./list-environment-events.js";
15
- export * from "./list-environment-history.js";
12
+ export * from "./list-apps.js";
13
+ export * from "./list-audit-events.js";
16
14
  export * from "./list-environments.js";
15
+ export * from "./list-requests.js";
17
16
  export * from "./list-snapshots.js";
18
- export * from "./list-workspace-events.js";
17
+ export * from "./list-versions.js";
19
18
  export * from "./list-workspaces.js";
19
+ export * from "./pause-environment.js";
20
20
  export * from "./resume-environment.js";
21
- export * from "./reveal-connection.js";
22
- export * from "./stop-environment.js";
23
- export * from "./suspend-environment.js";
21
+ export * from "./update-environment.js";
24
22
  export * from "./update-snapshot.js";
@@ -1,27 +1,25 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- export * from "./capture-snapshot.js";
5
- export * from "./create-environment-definition.js";
6
- export * from "./create-environments.js";
4
+ export * from "./create-credentials.js";
5
+ export * from "./create-environment.js";
6
+ export * from "./create-snapshot.js";
7
+ export * from "./delete-environment.js";
7
8
  export * from "./delete-snapshot.js";
8
- export * from "./get-catalog.js";
9
- export * from "./get-connection.js";
10
- export * from "./get-credential.js";
11
- export * from "./get-environment-exchange.js";
12
- export * from "./get-environment-position.js";
13
9
  export * from "./get-environment.js";
14
- export * from "./get-release.js";
10
+ export * from "./get-request-body.js";
11
+ export * from "./get-request-stats.js";
12
+ export * from "./get-request.js";
15
13
  export * from "./get-snapshot.js";
16
14
  export * from "./get-workspace.js";
17
- export * from "./list-environment-events.js";
18
- export * from "./list-environment-history.js";
15
+ export * from "./list-apps.js";
16
+ export * from "./list-audit-events.js";
19
17
  export * from "./list-environments.js";
18
+ export * from "./list-requests.js";
20
19
  export * from "./list-snapshots.js";
21
- export * from "./list-workspace-events.js";
20
+ export * from "./list-versions.js";
22
21
  export * from "./list-workspaces.js";
22
+ export * from "./pause-environment.js";
23
23
  export * from "./resume-environment.js";
24
- export * from "./reveal-connection.js";
25
- export * from "./stop-environment.js";
26
- export * from "./suspend-environment.js";
24
+ export * from "./update-environment.js";
27
25
  export * from "./update-snapshot.js";
@@ -0,0 +1,26 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
4
+ import * as models from "../index.js";
5
+ export type ListAppsRequest = {
6
+ limit?: number | undefined;
7
+ cursor?: string | undefined;
8
+ };
9
+ /**
10
+ * The apps an environment can run
11
+ */
12
+ export type ListAppsResponse = {
13
+ data: Array<models.App>;
14
+ nextCursor: string | null;
15
+ };
16
+ /** @internal */
17
+ export type ListAppsRequest$Outbound = {
18
+ limit: number;
19
+ cursor?: string | undefined;
20
+ };
21
+ /** @internal */
22
+ export declare const ListAppsRequest$outboundSchema: z.ZodMiniType<ListAppsRequest$Outbound, ListAppsRequest>;
23
+ export declare function listAppsRequestToJSON(listAppsRequest: ListAppsRequest): string;
24
+ /** @internal */
25
+ export declare const ListAppsResponse$inboundSchema: z.ZodMiniType<ListAppsResponse, unknown>;
26
+ export declare function listAppsResponseFromJSON(jsonString: string): SafeParseResult<ListAppsResponse, SDKValidationError>;
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4-mini";
5
+ import { safeParse } from "../../lib/schemas.js";
6
+ import * as types from "../../types/primitives.js";
7
+ import * as models from "../index.js";
8
+ /** @internal */
9
+ export const ListAppsRequest$outboundSchema = z.object({
10
+ limit: z._default(z.int(), 50),
11
+ cursor: z.optional(z.string()),
12
+ });
13
+ export function listAppsRequestToJSON(listAppsRequest) {
14
+ return JSON.stringify(ListAppsRequest$outboundSchema.parse(listAppsRequest));
15
+ }
16
+ /** @internal */
17
+ export const ListAppsResponse$inboundSchema = z.object({
18
+ data: z.array(models.App$inboundSchema),
19
+ nextCursor: types.nullable(types.string()),
20
+ });
21
+ export function listAppsResponseFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => ListAppsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAppsResponse' from JSON`);
23
+ }
@@ -0,0 +1,30 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
4
+ import * as models from "../index.js";
5
+ export type ListAuditEventsRequest = {
6
+ limit?: number | undefined;
7
+ cursor?: string | undefined;
8
+ workspaceId?: string | undefined;
9
+ environmentId?: string | undefined;
10
+ };
11
+ /**
12
+ * A workspace's or an environment's audit events, newest first
13
+ */
14
+ export type ListAuditEventsResponse = {
15
+ data: Array<models.AuditEvent>;
16
+ nextCursor: string | null;
17
+ };
18
+ /** @internal */
19
+ export type ListAuditEventsRequest$Outbound = {
20
+ limit: number;
21
+ cursor?: string | undefined;
22
+ workspaceId?: string | undefined;
23
+ environmentId?: string | undefined;
24
+ };
25
+ /** @internal */
26
+ export declare const ListAuditEventsRequest$outboundSchema: z.ZodMiniType<ListAuditEventsRequest$Outbound, ListAuditEventsRequest>;
27
+ export declare function listAuditEventsRequestToJSON(listAuditEventsRequest: ListAuditEventsRequest): string;
28
+ /** @internal */
29
+ export declare const ListAuditEventsResponse$inboundSchema: z.ZodMiniType<ListAuditEventsResponse, unknown>;
30
+ export declare function listAuditEventsResponseFromJSON(jsonString: string): SafeParseResult<ListAuditEventsResponse, SDKValidationError>;
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4-mini";
5
+ import { safeParse } from "../../lib/schemas.js";
6
+ import * as types from "../../types/primitives.js";
7
+ import * as models from "../index.js";
8
+ /** @internal */
9
+ export const ListAuditEventsRequest$outboundSchema = z.object({
10
+ limit: z._default(z.int(), 50),
11
+ cursor: z.optional(z.string()),
12
+ workspaceId: z.optional(z.string()),
13
+ environmentId: z.optional(z.string()),
14
+ });
15
+ export function listAuditEventsRequestToJSON(listAuditEventsRequest) {
16
+ return JSON.stringify(ListAuditEventsRequest$outboundSchema.parse(listAuditEventsRequest));
17
+ }
18
+ /** @internal */
19
+ export const ListAuditEventsResponse$inboundSchema = z.object({
20
+ data: z.array(models.AuditEvent$inboundSchema),
21
+ nextCursor: types.nullable(types.string()),
22
+ });
23
+ export function listAuditEventsResponseFromJSON(jsonString) {
24
+ return safeParse(jsonString, (x) => ListAuditEventsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListAuditEventsResponse' from JSON`);
25
+ }
@@ -1,23 +1,15 @@
1
1
  import * as z from "zod/v4-mini";
2
- import { ClosedEnum } from "../../types/enums.js";
3
2
  import { Result as SafeParseResult } from "../../types/fp.js";
4
3
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
5
4
  import * as models from "../index.js";
6
- export declare const Status: {
7
- readonly Live: "live";
8
- readonly Ended: "ended";
9
- readonly All: "all";
10
- };
11
- export type Status = ClosedEnum<typeof Status>;
12
- export type Label = string | Array<string>;
13
5
  export type ListEnvironmentsRequest = {
14
- workspaceId: string;
15
6
  limit?: number | undefined;
16
7
  cursor?: string | undefined;
17
- status?: Status | undefined;
8
+ workspaceId?: string | undefined;
9
+ status?: Array<models.EnvironmentStatus> | undefined;
18
10
  snapshotId?: string | undefined;
19
11
  search?: string | undefined;
20
- label?: string | Array<string> | undefined;
12
+ label?: Array<string> | undefined;
21
13
  };
22
14
  /**
23
15
  * The workspace's environments, newest first
@@ -27,21 +19,14 @@ export type ListEnvironmentsResponse = {
27
19
  nextCursor: string | null;
28
20
  };
29
21
  /** @internal */
30
- export declare const Status$outboundSchema: z.ZodMiniEnum<typeof Status>;
31
- /** @internal */
32
- export type Label$Outbound = string | Array<string>;
33
- /** @internal */
34
- export declare const Label$outboundSchema: z.ZodMiniType<Label$Outbound, Label>;
35
- export declare function labelToJSON(label: Label): string;
36
- /** @internal */
37
22
  export type ListEnvironmentsRequest$Outbound = {
38
- workspaceId: string;
39
23
  limit: number;
40
24
  cursor?: string | undefined;
41
- status: string;
25
+ workspaceId?: string | undefined;
26
+ status?: Array<string> | undefined;
42
27
  snapshotId?: string | undefined;
43
28
  search?: string | undefined;
44
- label?: string | Array<string> | undefined;
29
+ label?: Array<string> | undefined;
45
30
  };
46
31
  /** @internal */
47
32
  export declare const ListEnvironmentsRequest$outboundSchema: z.ZodMiniType<ListEnvironmentsRequest$Outbound, ListEnvironmentsRequest>;
@@ -4,29 +4,16 @@
4
4
  import * as z from "zod/v4-mini";
5
5
  import { safeParse } from "../../lib/schemas.js";
6
6
  import * as types from "../../types/primitives.js";
7
- import { smartUnion } from "../../types/smart-union.js";
8
7
  import * as models from "../index.js";
9
- export const Status = {
10
- Live: "live",
11
- Ended: "ended",
12
- All: "all",
13
- };
14
- /** @internal */
15
- export const Status$outboundSchema = z.enum(Status);
16
- /** @internal */
17
- export const Label$outboundSchema = smartUnion([z.string(), z.array(z.string())]);
18
- export function labelToJSON(label) {
19
- return JSON.stringify(Label$outboundSchema.parse(label));
20
- }
21
8
  /** @internal */
22
9
  export const ListEnvironmentsRequest$outboundSchema = z.object({
23
- workspaceId: z.string(),
24
10
  limit: z._default(z.int(), 50),
25
11
  cursor: z.optional(z.string()),
26
- status: z._default(Status$outboundSchema, "all"),
12
+ workspaceId: z.optional(z.string()),
13
+ status: z.optional(z.array(models.EnvironmentStatus$outboundSchema)),
27
14
  snapshotId: z.optional(z.string()),
28
15
  search: z.optional(z.string()),
29
- label: z.optional(smartUnion([z.string(), z.array(z.string())])),
16
+ label: z.optional(z.array(z.string())),
30
17
  });
31
18
  export function listEnvironmentsRequestToJSON(listEnvironmentsRequest) {
32
19
  return JSON.stringify(ListEnvironmentsRequest$outboundSchema.parse(listEnvironmentsRequest));
@@ -0,0 +1,68 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { ClosedEnum } from "../../types/enums.js";
3
+ import { Result as SafeParseResult } from "../../types/fp.js";
4
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
5
+ import * as models from "../index.js";
6
+ export declare const ListRequestsMethod: {
7
+ readonly Get: "GET";
8
+ readonly Head: "HEAD";
9
+ readonly Post: "POST";
10
+ readonly Put: "PUT";
11
+ readonly Patch: "PATCH";
12
+ readonly Delete: "DELETE";
13
+ readonly Options: "OPTIONS";
14
+ readonly Connect: "CONNECT";
15
+ readonly Trace: "TRACE";
16
+ };
17
+ export type ListRequestsMethod = ClosedEnum<typeof ListRequestsMethod>;
18
+ export declare const ListRequestsStatusClass: {
19
+ readonly Twoxx: "2xx";
20
+ readonly Threexx: "3xx";
21
+ readonly Fourxx: "4xx";
22
+ readonly Fivexx: "5xx";
23
+ };
24
+ export type ListRequestsStatusClass = ClosedEnum<typeof ListRequestsStatusClass>;
25
+ export type ListRequestsRequest = {
26
+ limit?: number | undefined;
27
+ cursor?: string | undefined;
28
+ environmentId: string;
29
+ app?: string | undefined;
30
+ method?: ListRequestsMethod | undefined;
31
+ responseStatus?: number | undefined;
32
+ statusClass?: ListRequestsStatusClass | undefined;
33
+ writesOnly?: boolean | undefined;
34
+ search?: string | undefined;
35
+ from?: Date | undefined;
36
+ to?: Date | undefined;
37
+ };
38
+ /**
39
+ * Calls the gateway recorded for an environment, newest first; recording is best effort
40
+ */
41
+ export type ListRequestsResponse = {
42
+ data: Array<models.RequestT>;
43
+ nextCursor: string | null;
44
+ };
45
+ /** @internal */
46
+ export declare const ListRequestsMethod$outboundSchema: z.ZodMiniEnum<typeof ListRequestsMethod>;
47
+ /** @internal */
48
+ export declare const ListRequestsStatusClass$outboundSchema: z.ZodMiniEnum<typeof ListRequestsStatusClass>;
49
+ /** @internal */
50
+ export type ListRequestsRequest$Outbound = {
51
+ limit: number;
52
+ cursor?: string | undefined;
53
+ environmentId: string;
54
+ app?: string | undefined;
55
+ method?: string | undefined;
56
+ responseStatus?: number | undefined;
57
+ statusClass?: string | undefined;
58
+ writesOnly?: boolean | undefined;
59
+ search?: string | undefined;
60
+ from?: string | undefined;
61
+ to?: string | undefined;
62
+ };
63
+ /** @internal */
64
+ export declare const ListRequestsRequest$outboundSchema: z.ZodMiniType<ListRequestsRequest$Outbound, ListRequestsRequest>;
65
+ export declare function listRequestsRequestToJSON(listRequestsRequest: ListRequestsRequest): string;
66
+ /** @internal */
67
+ export declare const ListRequestsResponse$inboundSchema: z.ZodMiniType<ListRequestsResponse, unknown>;
68
+ export declare function listRequestsResponseFromJSON(jsonString: string): SafeParseResult<ListRequestsResponse, SDKValidationError>;
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4-mini";
5
+ import { safeParse } from "../../lib/schemas.js";
6
+ import * as types from "../../types/primitives.js";
7
+ import * as models from "../index.js";
8
+ export const ListRequestsMethod = {
9
+ Get: "GET",
10
+ Head: "HEAD",
11
+ Post: "POST",
12
+ Put: "PUT",
13
+ Patch: "PATCH",
14
+ Delete: "DELETE",
15
+ Options: "OPTIONS",
16
+ Connect: "CONNECT",
17
+ Trace: "TRACE",
18
+ };
19
+ export const ListRequestsStatusClass = {
20
+ Twoxx: "2xx",
21
+ Threexx: "3xx",
22
+ Fourxx: "4xx",
23
+ Fivexx: "5xx",
24
+ };
25
+ /** @internal */
26
+ export const ListRequestsMethod$outboundSchema = z.enum(ListRequestsMethod);
27
+ /** @internal */
28
+ export const ListRequestsStatusClass$outboundSchema = z.enum(ListRequestsStatusClass);
29
+ /** @internal */
30
+ export const ListRequestsRequest$outboundSchema = z.object({
31
+ limit: z._default(z.int(), 50),
32
+ cursor: z.optional(z.string()),
33
+ environmentId: z.string(),
34
+ app: z.optional(z.string()),
35
+ method: z.optional(ListRequestsMethod$outboundSchema),
36
+ responseStatus: z.optional(z.int()),
37
+ statusClass: z.optional(ListRequestsStatusClass$outboundSchema),
38
+ writesOnly: z.optional(z.boolean()),
39
+ search: z.optional(z.string()),
40
+ from: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
41
+ to: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
42
+ });
43
+ export function listRequestsRequestToJSON(listRequestsRequest) {
44
+ return JSON.stringify(ListRequestsRequest$outboundSchema.parse(listRequestsRequest));
45
+ }
46
+ /** @internal */
47
+ export const ListRequestsResponse$inboundSchema = z.object({
48
+ data: z.array(models.RequestT$inboundSchema),
49
+ nextCursor: types.nullable(types.string()),
50
+ });
51
+ export function listRequestsResponseFromJSON(jsonString) {
52
+ return safeParse(jsonString, (x) => ListRequestsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListRequestsResponse' from JSON`);
53
+ }
@@ -3,24 +3,26 @@ import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
4
4
  import * as models from "../index.js";
5
5
  export type ListSnapshotsRequest = {
6
- workspaceId: string;
7
6
  limit?: number | undefined;
8
7
  cursor?: string | undefined;
9
- sourceEnvironmentId?: string | undefined;
8
+ workspaceId?: string | undefined;
9
+ environmentId?: string | undefined;
10
+ status?: Array<models.SnapshotStatus> | undefined;
10
11
  };
11
12
  /**
12
- * Workspace environment snapshots, newest first
13
+ * The workspace's snapshots, newest first
13
14
  */
14
15
  export type ListSnapshotsResponse = {
15
- data: Array<models.EnvironmentSnapshot>;
16
+ data: Array<models.Snapshot>;
16
17
  nextCursor: string | null;
17
18
  };
18
19
  /** @internal */
19
20
  export type ListSnapshotsRequest$Outbound = {
20
- workspaceId: string;
21
21
  limit: number;
22
22
  cursor?: string | undefined;
23
- sourceEnvironmentId?: string | undefined;
23
+ workspaceId?: string | undefined;
24
+ environmentId?: string | undefined;
25
+ status?: Array<string> | undefined;
24
26
  };
25
27
  /** @internal */
26
28
  export declare const ListSnapshotsRequest$outboundSchema: z.ZodMiniType<ListSnapshotsRequest$Outbound, ListSnapshotsRequest>;
@@ -7,17 +7,18 @@ import * as types from "../../types/primitives.js";
7
7
  import * as models from "../index.js";
8
8
  /** @internal */
9
9
  export const ListSnapshotsRequest$outboundSchema = z.object({
10
- workspaceId: z.string(),
11
10
  limit: z._default(z.int(), 50),
12
11
  cursor: z.optional(z.string()),
13
- sourceEnvironmentId: z.optional(z.string()),
12
+ workspaceId: z.optional(z.string()),
13
+ environmentId: z.optional(z.string()),
14
+ status: z.optional(z.array(models.SnapshotStatus$outboundSchema)),
14
15
  });
15
16
  export function listSnapshotsRequestToJSON(listSnapshotsRequest) {
16
17
  return JSON.stringify(ListSnapshotsRequest$outboundSchema.parse(listSnapshotsRequest));
17
18
  }
18
19
  /** @internal */
19
20
  export const ListSnapshotsResponse$inboundSchema = z.object({
20
- data: z.array(models.EnvironmentSnapshot$inboundSchema),
21
+ data: z.array(models.Snapshot$inboundSchema),
21
22
  nextCursor: types.nullable(types.string()),
22
23
  });
23
24
  export function listSnapshotsResponseFromJSON(jsonString) {
@@ -0,0 +1,28 @@
1
+ import * as z from "zod/v4-mini";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
4
+ import * as models from "../index.js";
5
+ export type ListVersionsRequest = {
6
+ appId: string;
7
+ limit?: number | undefined;
8
+ cursor?: string | undefined;
9
+ };
10
+ /**
11
+ * The app's published versions, newest first
12
+ */
13
+ export type ListVersionsResponse = {
14
+ data: Array<models.Version>;
15
+ nextCursor: string | null;
16
+ };
17
+ /** @internal */
18
+ export type ListVersionsRequest$Outbound = {
19
+ appId: string;
20
+ limit: number;
21
+ cursor?: string | undefined;
22
+ };
23
+ /** @internal */
24
+ export declare const ListVersionsRequest$outboundSchema: z.ZodMiniType<ListVersionsRequest$Outbound, ListVersionsRequest>;
25
+ export declare function listVersionsRequestToJSON(listVersionsRequest: ListVersionsRequest): string;
26
+ /** @internal */
27
+ export declare const ListVersionsResponse$inboundSchema: z.ZodMiniType<ListVersionsResponse, unknown>;
28
+ export declare function listVersionsResponseFromJSON(jsonString: string): SafeParseResult<ListVersionsResponse, SDKValidationError>;
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4-mini";
5
+ import { safeParse } from "../../lib/schemas.js";
6
+ import * as types from "../../types/primitives.js";
7
+ import * as models from "../index.js";
8
+ /** @internal */
9
+ export const ListVersionsRequest$outboundSchema = z.object({
10
+ appId: z.string(),
11
+ limit: z._default(z.int(), 50),
12
+ cursor: z.optional(z.string()),
13
+ });
14
+ export function listVersionsRequestToJSON(listVersionsRequest) {
15
+ return JSON.stringify(ListVersionsRequest$outboundSchema.parse(listVersionsRequest));
16
+ }
17
+ /** @internal */
18
+ export const ListVersionsResponse$inboundSchema = z.object({
19
+ data: z.array(models.Version$inboundSchema),
20
+ nextCursor: types.nullable(types.string()),
21
+ });
22
+ export function listVersionsResponseFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => ListVersionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListVersionsResponse' from JSON`);
24
+ }
@@ -4,24 +4,28 @@ import { Result as SafeParseResult } from "../../types/fp.js";
4
4
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
5
5
  import * as models from "../index.js";
6
6
  export declare const Archived: {
7
- readonly Exclude: "exclude";
8
- readonly Include: "include";
9
- readonly Only: "only";
7
+ readonly True: "true";
8
+ readonly False: "false";
10
9
  };
11
10
  export type Archived = ClosedEnum<typeof Archived>;
12
11
  export type ListWorkspacesRequest = {
12
+ limit?: number | undefined;
13
+ cursor?: string | undefined;
13
14
  archived?: Archived | undefined;
14
15
  };
15
16
  /**
16
- * The current organization's workspaces
17
+ * The organization's workspaces; an API key sees its own
17
18
  */
18
19
  export type ListWorkspacesResponse = {
19
20
  data: Array<models.Workspace>;
21
+ nextCursor: string | null;
20
22
  };
21
23
  /** @internal */
22
24
  export declare const Archived$outboundSchema: z.ZodMiniEnum<typeof Archived>;
23
25
  /** @internal */
24
26
  export type ListWorkspacesRequest$Outbound = {
27
+ limit: number;
28
+ cursor?: string | undefined;
25
29
  archived: string;
26
30
  };
27
31
  /** @internal */