@amigo-ai/platform-sdk 0.103.0 → 0.104.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.
- package/api.md +3 -12
- package/dist/index.cjs +38 -72
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -72
- package/dist/index.mjs.map +3 -3
- package/dist/resources/audit.js +34 -3
- package/dist/resources/audit.js.map +1 -1
- package/dist/types/generated/api.d.ts +1646 -1012
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.cts +0 -5
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/actions.d.ts +1 -2
- package/dist/types/resources/actions.d.ts.map +1 -1
- package/dist/types/resources/agents.d.ts +2 -4
- package/dist/types/resources/agents.d.ts.map +1 -1
- package/dist/types/resources/api-keys.d.ts +1 -2
- package/dist/types/resources/api-keys.d.ts.map +1 -1
- package/dist/types/resources/audit.d.ts +93 -18
- package/dist/types/resources/audit.d.ts.map +1 -1
- package/dist/types/resources/billing.d.ts +1 -2
- package/dist/types/resources/billing.d.ts.map +1 -1
- package/dist/types/resources/context-graphs.d.ts +2 -4
- package/dist/types/resources/context-graphs.d.ts.map +1 -1
- package/dist/types/resources/data-sources.d.ts +1 -2
- package/dist/types/resources/data-sources.d.ts.map +1 -1
- package/dist/types/resources/external-integrations.d.ts +1 -1
- package/dist/types/resources/external-integrations.d.ts.map +1 -1
- package/dist/types/resources/intake.d.ts.map +1 -1
- package/dist/types/resources/integrations.d.ts +1 -0
- package/dist/types/resources/integrations.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts +4 -8
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/pipeline.d.ts +2 -4
- package/dist/types/resources/pipeline.d.ts.map +1 -1
- package/dist/types/resources/services.d.ts +6 -2
- package/dist/types/resources/services.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/skills.d.ts +1 -2
- package/dist/types/resources/skills.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts +2 -4
- package/dist/types/resources/surfaces.d.ts.map +1 -1
- package/dist/types/resources/triggers.d.ts +2 -4
- package/dist/types/resources/triggers.d.ts.map +1 -1
- package/dist/types/resources/workspaces.d.ts +1 -2
- package/dist/types/resources/workspaces.d.ts.map +1 -1
- package/dist/types/resources/world.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/resources/use-cases.js +0 -58
- package/dist/resources/use-cases.js.map +0 -1
- package/dist/types/resources/use-cases.d.ts +0 -33
- package/dist/types/resources/use-cases.d.ts.map +0 -1
package/api.md
CHANGED
|
@@ -411,7 +411,9 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
411
411
|
- `getPhiAccess`
|
|
412
412
|
- `getPhiAccessAutoPaging`
|
|
413
413
|
- `createExport`
|
|
414
|
-
- `
|
|
414
|
+
- `getExport`
|
|
415
|
+
- `listMyAuditEvents`
|
|
416
|
+
- `listPlatformAuditEvents`
|
|
415
417
|
- `getEntityAccessLog`
|
|
416
418
|
- `getEntityAccessLogAutoPaging`
|
|
417
419
|
|
|
@@ -577,15 +579,4 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
577
579
|
- `delete`
|
|
578
580
|
- `invoke`
|
|
579
581
|
|
|
580
|
-
### `useCases`
|
|
581
|
-
|
|
582
|
-
- `list`
|
|
583
|
-
- `listOwned`
|
|
584
|
-
- `getOwnership`
|
|
585
|
-
- `assignOwnership`
|
|
586
|
-
- `releaseOwnership`
|
|
587
|
-
- `getServiceBinding`
|
|
588
|
-
- `bindToService`
|
|
589
|
-
- `unbindFromService`
|
|
590
|
-
|
|
591
582
|
### `api`
|
package/dist/index.cjs
CHANGED
|
@@ -62,7 +62,6 @@ __export(index_exports, {
|
|
|
62
62
|
TTS_PROVIDERS: () => TTS_PROVIDERS,
|
|
63
63
|
TokenManager: () => TokenManager,
|
|
64
64
|
TokensResource: () => TokensResource,
|
|
65
|
-
UseCasesResource: () => UseCasesResource,
|
|
66
65
|
VOICE_SESSION_PROVIDERS: () => VOICE_SESSION_PROVIDERS,
|
|
67
66
|
ValidationError: () => ValidationError,
|
|
68
67
|
WebhookVerificationError: () => WebhookVerificationError,
|
|
@@ -3787,10 +3786,45 @@ var AuditResource = class extends WorkspaceScopedResource {
|
|
|
3787
3786
|
})
|
|
3788
3787
|
);
|
|
3789
3788
|
}
|
|
3790
|
-
|
|
3789
|
+
/**
|
|
3790
|
+
* Poll an async audit export by its statement ID.
|
|
3791
|
+
*
|
|
3792
|
+
* `createExport` returns a `statement_id`; exports run asynchronously against
|
|
3793
|
+
* Databricks and resolve to presigned result chunks. Poll this until
|
|
3794
|
+
* `status` is terminal.
|
|
3795
|
+
*/
|
|
3796
|
+
async getExport(statementId) {
|
|
3791
3797
|
return extractData(
|
|
3792
|
-
await this.client.GET("/v1/{workspace_id}/audit/
|
|
3793
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
3798
|
+
await this.client.GET("/v1/{workspace_id}/audit/export/{statement_id}", {
|
|
3799
|
+
params: { path: { workspace_id: this.workspaceId, statement_id: statementId } }
|
|
3800
|
+
})
|
|
3801
|
+
);
|
|
3802
|
+
}
|
|
3803
|
+
/**
|
|
3804
|
+
* List the authenticated identity's own audit events.
|
|
3805
|
+
*
|
|
3806
|
+
* Account-scoped (`GET /v1/audit-log/me`): the caller's own actions across
|
|
3807
|
+
* every workspace they belong to. Not workspace-scoped — the bound
|
|
3808
|
+
* `workspaceId` is not sent.
|
|
3809
|
+
*/
|
|
3810
|
+
async listMyAuditEvents(params) {
|
|
3811
|
+
return extractData(
|
|
3812
|
+
await this.client.GET("/v1/audit-log/me", {
|
|
3813
|
+
params: { query: params }
|
|
3814
|
+
})
|
|
3815
|
+
);
|
|
3816
|
+
}
|
|
3817
|
+
/**
|
|
3818
|
+
* List audit events across all workspaces (platform-admin scope).
|
|
3819
|
+
*
|
|
3820
|
+
* Cross-workspace (`GET /v1/audit-log/platform`): omit `workspace_id` for the
|
|
3821
|
+
* full platform feed, or pass it to filter to one workspace. Not
|
|
3822
|
+
* workspace-scoped — the bound `workspaceId` is not sent.
|
|
3823
|
+
*/
|
|
3824
|
+
async listPlatformAuditEvents(params) {
|
|
3825
|
+
return extractData(
|
|
3826
|
+
await this.client.GET("/v1/audit-log/platform", {
|
|
3827
|
+
params: { query: params }
|
|
3794
3828
|
})
|
|
3795
3829
|
);
|
|
3796
3830
|
}
|
|
@@ -5588,71 +5622,6 @@ var WorkspaceDataQueriesResource = class extends WorkspaceScopedResource {
|
|
|
5588
5622
|
}
|
|
5589
5623
|
};
|
|
5590
5624
|
|
|
5591
|
-
// src/resources/use-cases.ts
|
|
5592
|
-
var UseCasesResource = class extends WorkspaceScopedResource {
|
|
5593
|
-
/** List use cases in the workspace, optionally filtered by entity/channel/setup. */
|
|
5594
|
-
async list(params) {
|
|
5595
|
-
return extractData(
|
|
5596
|
-
await this.client.GET("/v1/{workspace_id}/use-cases", {
|
|
5597
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
5598
|
-
})
|
|
5599
|
-
);
|
|
5600
|
-
}
|
|
5601
|
-
/** List channel-manager use case IDs owned by the current workspace. */
|
|
5602
|
-
async listOwned() {
|
|
5603
|
-
return extractData(
|
|
5604
|
-
await this.client.GET("/v1/{workspace_id}/use-cases/ownership", {
|
|
5605
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
5606
|
-
})
|
|
5607
|
-
);
|
|
5608
|
-
}
|
|
5609
|
-
/** Return this workspace's ownership record for a use case. Throws NotFoundError if unowned. */
|
|
5610
|
-
async getOwnership(useCaseId) {
|
|
5611
|
-
return extractData(
|
|
5612
|
-
await this.client.GET("/v1/{workspace_id}/use-cases/{use_case_id}/ownership", {
|
|
5613
|
-
params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
|
|
5614
|
-
})
|
|
5615
|
-
);
|
|
5616
|
-
}
|
|
5617
|
-
/** Claim ownership of a channel-manager use case for this workspace. */
|
|
5618
|
-
async assignOwnership(useCaseId) {
|
|
5619
|
-
return extractData(
|
|
5620
|
-
await this.client.PUT("/v1/{workspace_id}/use-cases/{use_case_id}/ownership", {
|
|
5621
|
-
params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
|
|
5622
|
-
})
|
|
5623
|
-
);
|
|
5624
|
-
}
|
|
5625
|
-
/** Release this workspace's ownership of a use case after unbinding services. */
|
|
5626
|
-
async releaseOwnership(useCaseId) {
|
|
5627
|
-
await this.client.DELETE("/v1/{workspace_id}/use-cases/{use_case_id}/ownership", {
|
|
5628
|
-
params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
|
|
5629
|
-
});
|
|
5630
|
-
}
|
|
5631
|
-
/** Return the service currently bound to a use case. Throws NotFoundError if unbound. */
|
|
5632
|
-
async getServiceBinding(useCaseId) {
|
|
5633
|
-
return extractData(
|
|
5634
|
-
await this.client.GET("/v1/{workspace_id}/use-cases/{use_case_id}/service-binding", {
|
|
5635
|
-
params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
|
|
5636
|
-
})
|
|
5637
|
-
);
|
|
5638
|
-
}
|
|
5639
|
-
/** Bind or rebind a use case to the platform service that should handle its traffic. */
|
|
5640
|
-
async bindToService(useCaseId, body) {
|
|
5641
|
-
return extractData(
|
|
5642
|
-
await this.client.PUT("/v1/{workspace_id}/use-cases/{use_case_id}/service-binding", {
|
|
5643
|
-
params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } },
|
|
5644
|
-
body
|
|
5645
|
-
})
|
|
5646
|
-
);
|
|
5647
|
-
}
|
|
5648
|
-
/** Release a use case from its currently bound platform service. */
|
|
5649
|
-
async unbindFromService(useCaseId) {
|
|
5650
|
-
await this.client.DELETE("/v1/{workspace_id}/use-cases/{use_case_id}/service-binding", {
|
|
5651
|
-
params: { path: { workspace_id: this.workspaceId, use_case_id: useCaseId } }
|
|
5652
|
-
});
|
|
5653
|
-
}
|
|
5654
|
-
};
|
|
5655
|
-
|
|
5656
5625
|
// src/core/branded-types.ts
|
|
5657
5626
|
var workspaceId = (id) => id;
|
|
5658
5627
|
var apiKeyId = (id) => id;
|
|
@@ -6380,8 +6349,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
6380
6349
|
workspaceDatabase;
|
|
6381
6350
|
/** Workspace data queries — Lakebase-backed query tool registry */
|
|
6382
6351
|
workspaceDataQueries;
|
|
6383
|
-
/** Channel use cases and service bindings */
|
|
6384
|
-
useCases;
|
|
6385
6352
|
/** @internal — exposed for path-level type inference in GET/POST/PUT/etc. */
|
|
6386
6353
|
api;
|
|
6387
6354
|
constructor(config) {
|
|
@@ -6500,7 +6467,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
6500
6467
|
mutable.sessions = new SessionsResource(client, workspaceId2);
|
|
6501
6468
|
mutable.workspaceDatabase = new WorkspaceDatabaseResource(client, workspaceId2);
|
|
6502
6469
|
mutable.workspaceDataQueries = new WorkspaceDataQueriesResource(client, workspaceId2);
|
|
6503
|
-
mutable.useCases = new UseCasesResource(client, workspaceId2);
|
|
6504
6470
|
}
|
|
6505
6471
|
async resolveApiRequest(path, method, init) {
|
|
6506
6472
|
const { baseClient, options } = resolveScopedPlatformClient(this.api);
|