@x12i/kinedrop 0.1.1 → 0.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.
Files changed (3) hide show
  1. package/index.d.ts +24 -7
  2. package/index.mjs +5 -4
  3. package/package.json +1 -4
package/index.d.ts CHANGED
@@ -26,15 +26,26 @@ export function keyroxIssuer(value: string): string;
26
26
  export function keyroxRequest(issuer: string, path: '/oauth/register' | '/oauth/device' | '/oauth/token' | '/oauth/revoke', body: URLSearchParams | Record<string, unknown>, options?: {fetchImpl?: typeof globalThis.fetch; signal?: AbortSignal; timeoutMs?:number}): Promise<{ok:boolean; status:number; data:Record<string, unknown>}>;
27
27
  export interface RequestOptions { idempotencyKey?: string; dryRun?: boolean; signal?: AbortSignal; timeoutMs?: number; /** Adapter marker that applies stricter human-only action restrictions. */ surface?:'mcp' }
28
28
  export interface Organization { id: string; name: string; createdAt: string }
29
- export interface WorkspaceTarget { app: string; env: string; route: string | null; environmentId?: string; releaseTarget?: boolean }
29
+ export interface WorkspaceRoute { app: string; env: 'staging' | 'production'; route: string }
30
+ export interface WorkspaceEnrollmentPlan {
31
+ name: string; workspaceKey: string; kind: 'staging' | 'production'; administratorSubject: string;
32
+ identityBinding: { organizationId: string | null; workspaceId: string | null };
33
+ targets: { app: string; route: string }[];
34
+ }
35
+ export interface WorkspaceCheck { verified: boolean }
30
36
  export interface WorkspaceEnrollment {
31
- operationId: string; workspaceId: string; enrollmentKey: string; name: string; stage: 'staging' | 'production'; status: 'planned' | 'applied';
32
- administrator: { subject: string }; keyrox: { organizationId: string; workspaceId: string };
33
- binding: { host: 'hs-2'; station: string; network: string }; targets: WorkspaceTarget[];
34
- checks: { tenantState: { verified: boolean }; route: { verified: boolean; published: boolean }; identityMapping: { verified: boolean }; serviceAttachments: { verified: boolean; isolated: boolean; binding: { host: 'hs-2'; station: string; network: string }; items: Array<{ id: string; service: string; name: string; status?: string }> } };
37
+ id: string; status: 'planned' | 'applied'; workspaceId: string; name: string; workspaceKey: string;
38
+ kind: 'staging' | 'production'; administratorSubject: string;
39
+ identityBinding: { organizationId: string | null; workspaceId: string | null };
40
+ targets: WorkspaceRoute[];
41
+ verification: { tenantState: WorkspaceCheck; route: WorkspaceCheck; identityMapping: WorkspaceCheck; serviceAttachments: WorkspaceCheck & { attachments: Record<string, string>[] } };
35
42
  createdAt: string; updatedAt: string;
36
43
  }
37
- export interface WorkspaceInventory { organizationId: string; workspaceId: string | null; name: string; enrollmentKey: string | null; targets: WorkspaceTarget[]; serviceBindings: Array<{ id: string; service: string; name: string; status?: string }> }
44
+ export interface WorkspaceInventory {
45
+ workspaceId: string; name: string; administratorSubject: string | null;
46
+ applications: { name: string; environments: { name: string; kind: string; route: string | null; domain: string; activeReleaseId: string | null }[] }[];
47
+ serviceAttachments: Record<string, string>[];
48
+ }
38
49
  export interface Resource {
39
50
  id: string; name: string; service: string; status: string; backend: string;
40
51
  topology: Topology; createdAt: string; [key: string]: unknown;
@@ -289,7 +300,13 @@ export class KineDropClient {
289
300
  search:{query(id:string,input:Record<string,unknown>,options?:RequestOptions):Promise<BackendResult>;createIndex(id:string,input:Record<string,unknown>,options?:RequestOptions):Promise<BackendResult>;insert(id:string,input:Record<string,unknown>,options?:RequestOptions):Promise<BackendResult>};
290
301
  analytics:{query(id:string,input:Record<string,unknown>,options?:RequestOptions):Promise<BackendResult>;createTable(id:string,input:Record<string,unknown>,options?:RequestOptions):Promise<BackendResult>;ingest(id:string,input:Record<string,unknown>,options?:RequestOptions):Promise<BackendResult>};
291
302
  orgs: {list(): Promise<List<Organization>>; create(data: string | {name: string}, options?: RequestOptions): Promise<Organization>};
292
- workspaces: { plan(input: Record<string, unknown>, options?: RequestOptions): Promise<WorkspaceEnrollment>; apply(input: Record<string, unknown>, options?: RequestOptions): Promise<WorkspaceEnrollment>; inspect(operationId: string, options?: RequestOptions): Promise<WorkspaceEnrollment>; inventory(orgId?: string): Promise<WorkspaceInventory> };
303
+ workspaces: {
304
+ list(): Promise<List<WorkspaceEnrollment>>;
305
+ plan(input: WorkspaceEnrollmentPlan, options?: RequestOptions): Promise<WorkspaceEnrollment>;
306
+ apply(id: string, options?: RequestOptions): Promise<WorkspaceEnrollment>;
307
+ inspect(id: string): Promise<WorkspaceEnrollment>;
308
+ inventory(): Promise<WorkspaceInventory>;
309
+ };
293
310
  resources: {
294
311
  list(): Promise<List<Resource>>;
295
312
  create(service: string, data: {name: string; topology?: Topology; resilience?: ResilienceSettings; [key: string]: unknown}, options?: RequestOptions): Promise<Resource>;
package/index.mjs CHANGED
@@ -97,10 +97,11 @@ export class KineDropClient {
97
97
  create: (data, options) => this.request('POST', '/v1/orgs', typeof data === 'string' ? { name: data } : data, options),
98
98
  };
99
99
  this.workspaces = {
100
- plan: (input, options) => this.request('POST', '/v1/workspace-enrollments/plans', input, options),
101
- apply: (input, options) => this.request('POST', '/v1/workspace-enrollments', input, options),
102
- inspect: (operationId, options) => this.request('GET', '/v1/workspace-enrollments/' + segment(operationId), undefined, options),
103
- inventory: (orgId = this.orgId) => this.request('GET', '/v1/orgs/' + segment(orgId) + '/inventory'),
100
+ list: () => this.request('GET', '/v1/workspace-enrollments'),
101
+ plan: (input, options) => this.request('POST', '/v1/workspace-enrollments', input, options),
102
+ apply: (id, options) => this.request('POST', '/v1/workspace-enrollments/' + segment(id) + '/apply', {}, options),
103
+ inspect: id => this.request('GET', '/v1/workspace-enrollments/' + segment(id)),
104
+ inventory: () => this.request('GET', this.orgPath('/workspace-inventory')),
104
105
  };
105
106
  this.resources = {
106
107
  list: () => this.request('GET', this.orgPath('/resources')),
package/package.json CHANGED
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/kinedrop",
3
- "version": "0.1.1",
4
- "license": "UNLICENSED",
5
- "repository": { "type": "git", "url": "git+https://github.com/kinedrop/kinedrop.git", "directory": "packages/kinedrop-sdk" },
6
- "publishConfig": { "access": "public" },
3
+ "version": "0.2.0",
7
4
  "type": "module",
8
5
  "description": "KineDrop control-plane client for Node.js 24 and modern browsers",
9
6
  "exports": {