@onesi/genesis 0.2.1 → 0.2.2

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.
@@ -4,9 +4,14 @@ import type { OperationInput } from './types.js';
4
4
  * and project, or an org API key whose binding selects them. `create` needs a stable idempotency
5
5
  * key (8-128 printable ASCII characters): reuse it to retry and the same instance is returned.
6
6
  * `delete` runs the instance's stop action (an optional key makes the stop one replayable
7
- * operation); Omega's native stop deletes the deployment. Ids are Omega deployment UUIDs. */
7
+ * operation); Omega's native stop deletes the deployment. Ids are Omega deployment UUIDs.
8
+ * Rigs, Panes and Shells `list` leave out ended instances (cancelled, terminated, failed or
9
+ * succeeded; orphaned counts as active) unless given
10
+ * `{ include: 'ended' }`; `get` returns an ended instance either way, with its status. */
8
11
  export declare function rigsModule(client: GenesisClient): {
9
- list: () => Promise<{
12
+ list: (options?: {
13
+ include?: "ended";
14
+ }) => Promise<{
10
15
  product: "rigs";
11
16
  instances: import("./index.js").components["schemas"]["Rigs.Instance"][];
12
17
  }>;
@@ -60,7 +65,9 @@ export declare function rigsModule(client: GenesisClient): {
60
65
  }>;
61
66
  };
62
67
  export declare function panesModule(client: GenesisClient): {
63
- list: () => Promise<{
68
+ list: (options?: {
69
+ include?: "ended";
70
+ }) => Promise<{
64
71
  product: "panes";
65
72
  instances: import("./index.js").components["schemas"]["Panes.Instance"][];
66
73
  } & {
@@ -123,7 +130,9 @@ export declare function panesModule(client: GenesisClient): {
123
130
  screenshot: (id: string, artifactId: string) => Promise<unknown>;
124
131
  };
125
132
  export declare function shellsModule(client: GenesisClient): {
126
- list: () => Promise<{
133
+ list: (options?: {
134
+ include?: "ended";
135
+ }) => Promise<{
127
136
  product: "shells";
128
137
  instances: import("./index.js").components["schemas"]["Shells.Instance"][];
129
138
  } & {
package/dist/instances.js CHANGED
@@ -3,10 +3,13 @@ import { idempotencyHeaders } from './idempotency.js';
3
3
  * and project, or an org API key whose binding selects them. `create` needs a stable idempotency
4
4
  * key (8-128 printable ASCII characters): reuse it to retry and the same instance is returned.
5
5
  * `delete` runs the instance's stop action (an optional key makes the stop one replayable
6
- * operation); Omega's native stop deletes the deployment. Ids are Omega deployment UUIDs. */
6
+ * operation); Omega's native stop deletes the deployment. Ids are Omega deployment UUIDs.
7
+ * Rigs, Panes and Shells `list` leave out ended instances (cancelled, terminated, failed or
8
+ * succeeded; orphaned counts as active) unless given
9
+ * `{ include: 'ended' }`; `get` returns an ended instance either way, with its status. */
7
10
  export function rigsModule(client) {
8
11
  return {
9
- list: () => client.request('rigs_listRigs'),
12
+ list: (options = {}) => client.request('rigs_listRigs', options.include ? { include: options.include } : {}),
10
13
  get: (id) => client.request('rigs_getRig', { id }),
11
14
  create: (body, idempotencyKey) => client.request('rigs_createRig', { body }, { headers: idempotencyHeaders('rigs_createRig', idempotencyKey) }),
12
15
  delete: (id, idempotencyKey) => client.request('rigs_deleteRig', { id }, { headers: idempotencyHeaders('rigs_deleteRig', idempotencyKey) }),
@@ -17,7 +20,7 @@ export function rigsModule(client) {
17
20
  }
18
21
  export function panesModule(client) {
19
22
  return {
20
- list: () => client.request('panes_listPanes'),
23
+ list: (options = {}) => client.request('panes_listPanes', options.include ? { include: options.include } : {}),
21
24
  get: (id) => client.request('panes_getPane', { id }),
22
25
  create: (body, idempotencyKey) => client.request('panes_createPane', { body }, { headers: idempotencyHeaders('panes_createPane', idempotencyKey) }),
23
26
  delete: (id, idempotencyKey) => client.request('panes_deletePane', { id }, { headers: idempotencyHeaders('panes_deletePane', idempotencyKey) }),
@@ -30,7 +33,7 @@ export function panesModule(client) {
30
33
  }
31
34
  export function shellsModule(client) {
32
35
  return {
33
- list: () => client.request('shells_listShells'),
36
+ list: (options = {}) => client.request('shells_listShells', options.include ? { include: options.include } : {}),
34
37
  get: (id) => client.request('shells_getShell', { id }),
35
38
  create: (body, idempotencyKey) => client.request('shells_createShell', { body }, { headers: idempotencyHeaders('shells_createShell', idempotencyKey) }),
36
39
  delete: (id, idempotencyKey) => client.request('shells_deleteShell', { id }, { headers: idempotencyHeaders('shells_deleteShell', idempotencyKey) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesi/genesis",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/l1felabs/genesis-api.git",