@honeyhive/control-plane-sdk 1.0.0 → 1.2.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.
@@ -51,6 +51,46 @@ export interface GetAlertRequest {
51
51
  alert_id: string;
52
52
  }
53
53
 
54
+ export interface CreateWorkspaceRequest {
55
+ /** @description The unique identifier of the virtual data plane the workspace is created in */
56
+ virtual_dataplane_id: string;
57
+ /** @description Workspace display name. Allowed characters are letters, digits, space, underscore, hyphen, apostrophe and ampersand. The name must contain at least one letter or digit, and must not start with a space. */
58
+ name: string;
59
+ /** @description Globally unique identifier for the workspace, letters, digits and underscores only. Omit it and the server derives one from the name with a random suffix appended. Supply it when the identifier has to match a value maintained outside HoneyHive, such as an identity provider group that grants access to this workspace. A slug already in use returns 409. */
60
+ slug?: string;
61
+ /** @description Workspace description */
62
+ description?: string;
63
+ /**
64
+ * Format: email
65
+ * @description Email of the user to grant the workspace-creator membership to (API key actors only). A signed-in user does not see the new workspace until their session refreshes, which happens on their next request to the control plane.
66
+ */
67
+ workspace_creator?: string;
68
+ }
69
+
70
+ export interface GetWorkspaceRequest {
71
+ /** @description The unique identifier of the workspace to retrieve */
72
+ workspace_id: string;
73
+ }
74
+
75
+ export interface UpdateWorkspaceRequest {
76
+ /** @description The unique identifier of the workspace to update */
77
+ workspace_id: string;
78
+ /** @description Workspace display name. Allowed characters are letters, digits, space, underscore, hyphen, apostrophe and ampersand. The name must contain at least one letter or digit, and must not start with a space. */
79
+ name?: string;
80
+ /** @description Workspace description */
81
+ description?: string;
82
+ }
83
+
84
+ export interface DeleteWorkspaceRequest {
85
+ /** @description The unique identifier of the workspace to delete */
86
+ workspace_id: string;
87
+ /**
88
+ * @description Archive the workspace even when it still has active projects, archiving those projects
89
+ * too. Without it, such a request fails with a 409 and no changes are made.
90
+ */
91
+ dangerously_delete_child_scopes?: boolean;
92
+ }
93
+
54
94
  export interface CreateProjectRequest {
55
95
  /** @description The unique identifier of the workspace the project is created in */
56
96
  workspace_id: string;
@@ -60,7 +100,7 @@ export interface CreateProjectRequest {
60
100
  description?: string;
61
101
  /**
62
102
  * Format: email
63
- * @description Email of the user to grant the project-creator membership to (API key actors only)
103
+ * @description Email of the user to grant the project-creator membership to (API key actors only). A signed-in user does not see the new project until their session refreshes, which happens on their next request to the control plane.
64
104
  */
65
105
  project_creator?: string;
66
106
  }
@@ -84,6 +124,45 @@ export interface DeleteProjectRequest {
84
124
  project_id: string;
85
125
  }
86
126
 
127
+ export interface CreateVirtualDataplaneRequest {
128
+ /** @description The unique identifier of the organization the virtual data plane is created in */
129
+ org_id: string;
130
+ /** @description Virtual dataplane display name. Allowed characters are letters, digits, space, underscore, hyphen, apostrophe and ampersand. The name must contain at least one letter or digit, and must not start with a space. */
131
+ name: string;
132
+ /** @description Globally unique identifier for the virtual dataplane, letters, digits and underscores only. Omit it and the server derives one from the name with a random suffix appended. A slug already in use returns 409. */
133
+ slug?: string;
134
+ /** @description Physical cluster to host this virtual dataplane. Omit to place it alongside the existing virtual dataplanes in this org; required when the org has none yet, or when its virtual dataplanes span more than one cluster. */
135
+ cluster_id?: string;
136
+ /**
137
+ * Format: email
138
+ * @description Email of the user to grant the dataplane-creator membership to (API key actors only). A signed-in user does not see the new dataplane until their session refreshes, which happens on their next request to the control plane.
139
+ */
140
+ dataplane_creator?: string;
141
+ }
142
+
143
+ export interface GetVirtualDataplaneRequest {
144
+ /** @description The unique identifier of the virtual data plane to retrieve */
145
+ virtual_dataplane_id: string;
146
+ }
147
+
148
+ export interface UpdateVirtualDataplaneRequest {
149
+ /** @description The unique identifier of the virtual data plane to update */
150
+ virtual_dataplane_id: string;
151
+ /** @description Virtual dataplane display name. Allowed characters are letters, digits, space, underscore, hyphen, apostrophe and ampersand. The name must contain at least one letter or digit, and must not start with a space. */
152
+ name?: string;
153
+ }
154
+
155
+ export interface DeleteVirtualDataplaneRequest {
156
+ /** @description The unique identifier of the virtual data plane to delete */
157
+ virtual_dataplane_id: string;
158
+ /**
159
+ * @description Archive the virtual data plane even when it still has active workspaces, archiving
160
+ * those workspaces and their projects too. Without it, such a request fails with a 409
161
+ * and no changes are made.
162
+ */
163
+ dangerously_delete_child_scopes?: boolean;
164
+ }
165
+
87
166
  // ---- Response types ----
88
167
 
89
168
  /**
@@ -114,6 +193,38 @@ export type GetAlertResponse = {
114
193
  data: AlertItem;
115
194
  };
116
195
 
196
+ /**
197
+ * @description The created workspace
198
+ */
199
+ export type CreateWorkspaceResponse = {
200
+ success: boolean;
201
+ data: WorkspaceItem;
202
+ };
203
+
204
+ /**
205
+ * @description A single workspace
206
+ */
207
+ export type GetWorkspaceResponse = {
208
+ success: boolean;
209
+ data: WorkspaceItem;
210
+ };
211
+
212
+ /**
213
+ * @description The updated workspace
214
+ */
215
+ export type UpdateWorkspaceResponse = {
216
+ success: boolean;
217
+ data: WorkspaceItem;
218
+ };
219
+
220
+ /**
221
+ * @description The deleted (archived) workspace. Descendants archived by the cascade are not listed.
222
+ */
223
+ export type DeleteWorkspaceResponse = {
224
+ success: boolean;
225
+ data: WorkspaceItem;
226
+ };
227
+
117
228
  /**
118
229
  * @description The created project
119
230
  */
@@ -146,6 +257,38 @@ export type DeleteProjectResponse = {
146
257
  data: ProjectItem;
147
258
  };
148
259
 
260
+ /**
261
+ * @description The created virtual dataplane
262
+ */
263
+ export type CreateVirtualDataplaneResponse = {
264
+ success: boolean;
265
+ data: VirtualDataplaneItem;
266
+ };
267
+
268
+ /**
269
+ * @description A single virtual dataplane
270
+ */
271
+ export type GetVirtualDataplaneResponse = {
272
+ success: boolean;
273
+ data: VirtualDataplaneItem;
274
+ };
275
+
276
+ /**
277
+ * @description The updated virtual dataplane
278
+ */
279
+ export type UpdateVirtualDataplaneResponse = {
280
+ success: boolean;
281
+ data: VirtualDataplaneItem;
282
+ };
283
+
284
+ /**
285
+ * @description The deleted (archived) virtual dataplane. Descendants archived by the cascade are not listed.
286
+ */
287
+ export type DeleteVirtualDataplaneResponse = {
288
+ success: boolean;
289
+ data: VirtualDataplaneItem;
290
+ };
291
+
149
292
  // ---- Internal types ----
150
293
  //
151
294
  // These types are not part of the public API surface (not re-exported
@@ -307,6 +450,34 @@ export type ProjectItem = {
307
450
  updated_at?: string | null;
308
451
  };
309
452
 
453
+ /**
454
+ * @description Virtual dataplane object
455
+ * @inline
456
+ */
457
+ export type VirtualDataplaneItem = {
458
+ id: string;
459
+ /** @description Virtual dataplane display name */
460
+ name: string;
461
+ /** @description Identifier of the physical cluster hosting this dataplane */
462
+ cluster_id: string;
463
+ created_at: string;
464
+ updated_at: string;
465
+ };
466
+
467
+ /**
468
+ * @description Workspace object
469
+ * @inline
470
+ */
471
+ export type WorkspaceItem = {
472
+ id: string;
473
+ /** @description Workspace display name */
474
+ name: string;
475
+ /** @description Workspace description */
476
+ description: string;
477
+ created_at: string;
478
+ updated_at?: string | null;
479
+ };
480
+
310
481
  /**
311
482
  * @inline
312
483
  */