@amigo-ai/platform-sdk 0.6.0 → 0.7.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 +9 -0
- package/dist/core/utils.js +17 -6
- package/dist/core/utils.js.map +1 -1
- package/dist/index.cjs +63 -6
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +63 -6
- package/dist/index.mjs.map +3 -3
- package/dist/resources/metrics.js +37 -0
- package/dist/resources/metrics.js.map +1 -0
- package/dist/types/core/utils.d.ts +13 -10
- package/dist/types/core/utils.d.ts.map +1 -1
- package/dist/types/generated/api.d.ts +641 -29
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.cts +165 -0
- package/dist/types/index.d.cts.map +1 -0
- package/dist/types/index.d.ts +27 -8
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts +136 -0
- package/dist/types/resources/metrics.d.ts.map +1 -0
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/package.json +15 -9
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @amigo-ai/platform-sdk
|
|
3
|
+
*
|
|
4
|
+
* Official TypeScript SDK for the Amigo Platform API.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import { AmigoClient } from '@amigo-ai/platform-sdk'
|
|
9
|
+
*
|
|
10
|
+
* const client = new AmigoClient({
|
|
11
|
+
* apiKey: 'your-api-key',
|
|
12
|
+
* workspaceId: 'your-workspace-id',
|
|
13
|
+
* })
|
|
14
|
+
*
|
|
15
|
+
* const agents = await client.agents.list()
|
|
16
|
+
* console.log(agents.items)
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import type { FetchResponse, HeadersOptions } from 'openapi-fetch';
|
|
20
|
+
import type { MediaType, PathsWithMethod } from 'openapi-typescript-helpers';
|
|
21
|
+
import { type ClientHooks, type PlatformFetch } from './core/openapi-client.js';
|
|
22
|
+
import { type AmigoRequestOptions, type InitParam, type OperationFor, type ScopedRequestOptions } from './core/request-options.js';
|
|
23
|
+
import type { RetryOptions } from './core/retry.js';
|
|
24
|
+
import { WorkspacesResource } from './resources/workspaces.js';
|
|
25
|
+
import { ApiKeysResource } from './resources/api-keys.js';
|
|
26
|
+
import { AgentsResource } from './resources/agents.js';
|
|
27
|
+
import { SkillsResource } from './resources/skills.js';
|
|
28
|
+
import { ActionsResource } from './resources/actions.js';
|
|
29
|
+
import { OperatorsResource } from './resources/operators.js';
|
|
30
|
+
import { TriggersResource } from './resources/triggers.js';
|
|
31
|
+
import { ServicesResource } from './resources/services.js';
|
|
32
|
+
import { ContextGraphsResource } from './resources/context-graphs.js';
|
|
33
|
+
import { DataSourcesResource } from './resources/data-sources.js';
|
|
34
|
+
import { WorldResource } from './resources/world.js';
|
|
35
|
+
import { CallsResource } from './resources/calls.js';
|
|
36
|
+
import { PhoneNumbersResource } from './resources/phone-numbers.js';
|
|
37
|
+
import { IntegrationsResource } from './resources/integrations.js';
|
|
38
|
+
import { AnalyticsResource } from './resources/analytics.js';
|
|
39
|
+
import { SimulationsResource } from './resources/simulations.js';
|
|
40
|
+
import { MetricsResource } from './resources/metrics.js';
|
|
41
|
+
import { SettingsResource } from './resources/settings.js';
|
|
42
|
+
import { BillingResource } from './resources/billing.js';
|
|
43
|
+
import { MemoryResource } from './resources/memory.js';
|
|
44
|
+
import { PersonasResource } from './resources/personas.js';
|
|
45
|
+
import { ReviewQueueResource } from './resources/review-queue.js';
|
|
46
|
+
import { RecordingsResource } from './resources/recordings.js';
|
|
47
|
+
import { AuditResource } from './resources/audit.js';
|
|
48
|
+
import { WebhookDestinationsResource } from './resources/webhook-destinations.js';
|
|
49
|
+
import { SafetyResource } from './resources/safety.js';
|
|
50
|
+
import { ComplianceResource } from './resources/compliance.js';
|
|
51
|
+
import { FunctionsResource } from './resources/functions.js';
|
|
52
|
+
import type { paths } from './generated/api.js';
|
|
53
|
+
import type { MetricValue as MetricValueAlias } from './resources/metrics.js';
|
|
54
|
+
import { type AmigoResponse } from './core/utils.js';
|
|
55
|
+
export declare const DEFAULT_BASE_URL = "https://api.platform.amigo.ai";
|
|
56
|
+
type PlatformMethod = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch';
|
|
57
|
+
type EmptyOptions = Record<never, never>;
|
|
58
|
+
type PathForMethod<Method extends PlatformMethod> = Extract<PathsWithMethod<paths, Method>, string>;
|
|
59
|
+
type SuccessData<Operation extends Record<string | number, unknown>> = Extract<FetchResponse<Operation, EmptyOptions, MediaType>, {
|
|
60
|
+
error?: never;
|
|
61
|
+
}>['data'];
|
|
62
|
+
type IsNever<Value> = [Value] extends [never] ? true : false;
|
|
63
|
+
type DefinedSuccessData<Operation extends Record<string | number, unknown>> = Exclude<SuccessData<Operation>, undefined>;
|
|
64
|
+
type OperationResponse<Path extends keyof paths & string, Method extends PlatformMethod> = Method extends keyof paths[Path] ? paths[Path][Method] extends infer Operation extends Record<string | number, unknown> ? IsNever<SuccessData<Operation>> extends true ? never : [
|
|
65
|
+
DefinedSuccessData<Operation>
|
|
66
|
+
] extends [never] ? undefined : DefinedSuccessData<Operation> : never : never;
|
|
67
|
+
export interface AmigoClientConfig {
|
|
68
|
+
/** API key created via POST /v1/{workspace_id}/api-keys */
|
|
69
|
+
apiKey: string;
|
|
70
|
+
/** Workspace ID — all resource operations are scoped to this workspace */
|
|
71
|
+
workspaceId: string;
|
|
72
|
+
/**
|
|
73
|
+
* Override the base URL. Defaults to https://api.platform.amigo.ai
|
|
74
|
+
*
|
|
75
|
+
* For BFF proxy patterns (e.g., Next.js), point this at your proxy:
|
|
76
|
+
* ```ts
|
|
77
|
+
* new AmigoClient({ baseUrl: '/api/platform', ... })
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
baseUrl?: string;
|
|
81
|
+
/** Retry configuration for failed requests */
|
|
82
|
+
retry?: RetryOptions;
|
|
83
|
+
/** Convenience alias for retry count (same semantics as "number of retries") */
|
|
84
|
+
maxRetries?: number;
|
|
85
|
+
/** Default request timeout in milliseconds */
|
|
86
|
+
timeout?: number;
|
|
87
|
+
/** Additional headers sent with every request */
|
|
88
|
+
headers?: HeadersOptions;
|
|
89
|
+
/** Request lifecycle hooks for logging, tracing, or metrics */
|
|
90
|
+
hooks?: ClientHooks;
|
|
91
|
+
/**
|
|
92
|
+
* Custom fetch implementation.
|
|
93
|
+
*
|
|
94
|
+
* Use for BFF proxy routing, server-side cookie forwarding,
|
|
95
|
+
* or test mocking. When provided, all HTTP requests flow
|
|
96
|
+
* through this function instead of globalThis.fetch.
|
|
97
|
+
*/
|
|
98
|
+
fetch?: typeof globalThis.fetch;
|
|
99
|
+
}
|
|
100
|
+
export declare class AmigoClient {
|
|
101
|
+
readonly workspaceId: string;
|
|
102
|
+
readonly baseUrl: string;
|
|
103
|
+
readonly workspaces: WorkspacesResource;
|
|
104
|
+
readonly apiKeys: ApiKeysResource;
|
|
105
|
+
readonly agents: AgentsResource;
|
|
106
|
+
/** @deprecated Use `actions` instead */
|
|
107
|
+
readonly skills: SkillsResource;
|
|
108
|
+
readonly actions: ActionsResource;
|
|
109
|
+
readonly operators: OperatorsResource;
|
|
110
|
+
readonly triggers: TriggersResource;
|
|
111
|
+
readonly services: ServicesResource;
|
|
112
|
+
readonly contextGraphs: ContextGraphsResource;
|
|
113
|
+
readonly dataSources: DataSourcesResource;
|
|
114
|
+
readonly world: WorldResource;
|
|
115
|
+
readonly calls: CallsResource;
|
|
116
|
+
readonly phoneNumbers: PhoneNumbersResource;
|
|
117
|
+
readonly integrations: IntegrationsResource;
|
|
118
|
+
readonly analytics: AnalyticsResource;
|
|
119
|
+
readonly simulations: SimulationsResource;
|
|
120
|
+
readonly metrics: MetricsResource;
|
|
121
|
+
readonly settings: SettingsResource;
|
|
122
|
+
readonly billing: BillingResource;
|
|
123
|
+
readonly memory: MemoryResource;
|
|
124
|
+
readonly personas: PersonasResource;
|
|
125
|
+
readonly reviewQueue: ReviewQueueResource;
|
|
126
|
+
readonly recordings: RecordingsResource;
|
|
127
|
+
readonly audit: AuditResource;
|
|
128
|
+
readonly webhookDestinations: WebhookDestinationsResource;
|
|
129
|
+
readonly safety: SafetyResource;
|
|
130
|
+
readonly compliance: ComplianceResource;
|
|
131
|
+
readonly functions: FunctionsResource;
|
|
132
|
+
/** @internal — exposed for path-level type inference in GET/POST/PUT/etc. */
|
|
133
|
+
readonly api: PlatformFetch;
|
|
134
|
+
constructor(config: AmigoClientConfig);
|
|
135
|
+
withOptions(options: ScopedRequestOptions): AmigoClient;
|
|
136
|
+
GET<Path extends PathForMethod<'get'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'get'>>>): Promise<AmigoResponse<OperationResponse<Path, 'get'>>>;
|
|
137
|
+
POST<Path extends PathForMethod<'post'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'post'>>>): Promise<AmigoResponse<OperationResponse<Path, 'post'>>>;
|
|
138
|
+
PUT<Path extends PathForMethod<'put'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'put'>>>): Promise<AmigoResponse<OperationResponse<Path, 'put'>>>;
|
|
139
|
+
PATCH<Path extends PathForMethod<'patch'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'patch'>>>): Promise<AmigoResponse<OperationResponse<Path, 'patch'>>>;
|
|
140
|
+
DELETE<Path extends PathForMethod<'delete'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'delete'>>>): Promise<AmigoResponse<OperationResponse<Path, 'delete'>>>;
|
|
141
|
+
HEAD<Path extends PathForMethod<'head'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'head'>>>): Promise<AmigoResponse<OperationResponse<Path, 'head'>>>;
|
|
142
|
+
OPTIONS<Path extends PathForMethod<'options'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'options'>>>): Promise<AmigoResponse<OperationResponse<Path, 'options'>>>;
|
|
143
|
+
private static fromPlatformClient;
|
|
144
|
+
private static hydrate;
|
|
145
|
+
private resolveApiRequest;
|
|
146
|
+
}
|
|
147
|
+
export type { AmigoClientConfig as AmigoConfig };
|
|
148
|
+
export { AmigoError, BadRequestError, AuthenticationError, PermissionError, NotFoundError, ConflictError, ValidationError, RateLimitError, ServerError, ServiceUnavailableError, NetworkError, RequestTimeoutError, ParseError, ConfigurationError, isAmigoError, isNotFoundError, isRateLimitError, isAuthenticationError, isRequestTimeoutError, } from './core/errors.js';
|
|
149
|
+
export type { WorkspaceId, ApiKeyId, AgentId, PersonaId, SkillId, ActionId, ServiceId, ContextGraphId, CallId, PhoneNumberId, IntegrationId, EntityId, EventId, SimulationRunId, SimulationSessionId, FunctionId, DataSourceId, } from './core/branded-types.js';
|
|
150
|
+
export { workspaceId, apiKeyId, agentId, personaId, skillId, actionId, serviceId, contextGraphId, callId, phoneNumberId, integrationId, entityId, eventId, simulationRunId, simulationSessionId, functionId, dataSourceId, } from './core/branded-types.js';
|
|
151
|
+
export { paginate } from './core/utils.js';
|
|
152
|
+
export { buildLastResponse, extractRequestId } from './core/utils.js';
|
|
153
|
+
export type { PaginatedList, ListParams, LastResponseInfo, ResponseMetadata, WithResponseMetadata, AmigoResponse, } from './core/utils.js';
|
|
154
|
+
export type { AmigoRequestOptions, ScopedRequestOptions } from './core/request-options.js';
|
|
155
|
+
export type { RetryOptions } from './core/retry.js';
|
|
156
|
+
export { parseRateLimitHeaders } from './core/rate-limit.js';
|
|
157
|
+
export type { RateLimitInfo } from './core/rate-limit.js';
|
|
158
|
+
export { verifyWebhookSignature, parseWebhookEvent, WebhookVerificationError, } from './core/webhooks.js';
|
|
159
|
+
export type { WebhookEvent, WebhookVerificationOptions, ParseWebhookEventOptions, } from './core/webhooks.js';
|
|
160
|
+
export type { ClientHooks, RequestHookContext, ResponseHookContext, ErrorHookContext, } from './core/openapi-client.js';
|
|
161
|
+
export type { MetricCatalogEntry, MetricCatalogResponse, MetricListResponse, MetricValue, NumericalMetricValue, CategoricalMetricValue, BooleanMetricValue, MetricValuesParams, MetricTrendParams, } from './resources/metrics.js';
|
|
162
|
+
/** @deprecated Use `MetricValue` instead. */
|
|
163
|
+
export type MetricValueResponse = MetricValueAlias;
|
|
164
|
+
export type { paths, components, operations } from './generated/api.js';
|
|
165
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5E,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,gBAAgB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,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACrE,YAAY,EACV,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAC1F,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,YAAY,EACZ,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAA;AAEjC,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,wBAAwB,CAAA;AAC/B,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAA;AAGlD,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* console.log(agents.items)
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
import type {
|
|
19
|
+
import type { FetchResponse, HeadersOptions } from 'openapi-fetch';
|
|
20
|
+
import type { MediaType, PathsWithMethod } from 'openapi-typescript-helpers';
|
|
20
21
|
import { type ClientHooks, type PlatformFetch } from './core/openapi-client.js';
|
|
21
22
|
import { type AmigoRequestOptions, type InitParam, type OperationFor, type ScopedRequestOptions } from './core/request-options.js';
|
|
22
23
|
import type { RetryOptions } from './core/retry.js';
|
|
@@ -36,6 +37,7 @@ import { PhoneNumbersResource } from './resources/phone-numbers.js';
|
|
|
36
37
|
import { IntegrationsResource } from './resources/integrations.js';
|
|
37
38
|
import { AnalyticsResource } from './resources/analytics.js';
|
|
38
39
|
import { SimulationsResource } from './resources/simulations.js';
|
|
40
|
+
import { MetricsResource } from './resources/metrics.js';
|
|
39
41
|
import { SettingsResource } from './resources/settings.js';
|
|
40
42
|
import { BillingResource } from './resources/billing.js';
|
|
41
43
|
import { MemoryResource } from './resources/memory.js';
|
|
@@ -47,8 +49,21 @@ import { WebhookDestinationsResource } from './resources/webhook-destinations.js
|
|
|
47
49
|
import { SafetyResource } from './resources/safety.js';
|
|
48
50
|
import { ComplianceResource } from './resources/compliance.js';
|
|
49
51
|
import { FunctionsResource } from './resources/functions.js';
|
|
52
|
+
import type { paths } from './generated/api.js';
|
|
53
|
+
import type { MetricValue as MetricValueAlias } from './resources/metrics.js';
|
|
50
54
|
import { type AmigoResponse } from './core/utils.js';
|
|
51
55
|
export declare const DEFAULT_BASE_URL = "https://api.platform.amigo.ai";
|
|
56
|
+
type PlatformMethod = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch';
|
|
57
|
+
type EmptyOptions = Record<never, never>;
|
|
58
|
+
type PathForMethod<Method extends PlatformMethod> = Extract<PathsWithMethod<paths, Method>, string>;
|
|
59
|
+
type SuccessData<Operation extends Record<string | number, unknown>> = Extract<FetchResponse<Operation, EmptyOptions, MediaType>, {
|
|
60
|
+
error?: never;
|
|
61
|
+
}>['data'];
|
|
62
|
+
type IsNever<Value> = [Value] extends [never] ? true : false;
|
|
63
|
+
type DefinedSuccessData<Operation extends Record<string | number, unknown>> = Exclude<SuccessData<Operation>, undefined>;
|
|
64
|
+
type OperationResponse<Path extends keyof paths & string, Method extends PlatformMethod> = Method extends keyof paths[Path] ? paths[Path][Method] extends infer Operation extends Record<string | number, unknown> ? IsNever<SuccessData<Operation>> extends true ? never : [
|
|
65
|
+
DefinedSuccessData<Operation>
|
|
66
|
+
] extends [never] ? undefined : DefinedSuccessData<Operation> : never : never;
|
|
52
67
|
export interface AmigoClientConfig {
|
|
53
68
|
/** API key created via POST /v1/{workspace_id}/api-keys */
|
|
54
69
|
apiKey: string;
|
|
@@ -102,6 +117,7 @@ export declare class AmigoClient {
|
|
|
102
117
|
readonly integrations: IntegrationsResource;
|
|
103
118
|
readonly analytics: AnalyticsResource;
|
|
104
119
|
readonly simulations: SimulationsResource;
|
|
120
|
+
readonly metrics: MetricsResource;
|
|
105
121
|
readonly settings: SettingsResource;
|
|
106
122
|
readonly billing: BillingResource;
|
|
107
123
|
readonly memory: MemoryResource;
|
|
@@ -117,13 +133,13 @@ export declare class AmigoClient {
|
|
|
117
133
|
readonly api: PlatformFetch;
|
|
118
134
|
constructor(config: AmigoClientConfig);
|
|
119
135
|
withOptions(options: ScopedRequestOptions): AmigoClient;
|
|
120
|
-
GET<Path extends
|
|
121
|
-
POST<Path extends
|
|
122
|
-
PUT<Path extends
|
|
123
|
-
PATCH<Path extends
|
|
124
|
-
DELETE<Path extends
|
|
125
|
-
HEAD<Path extends
|
|
126
|
-
OPTIONS<Path extends
|
|
136
|
+
GET<Path extends PathForMethod<'get'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'get'>>>): Promise<AmigoResponse<OperationResponse<Path, 'get'>>>;
|
|
137
|
+
POST<Path extends PathForMethod<'post'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'post'>>>): Promise<AmigoResponse<OperationResponse<Path, 'post'>>>;
|
|
138
|
+
PUT<Path extends PathForMethod<'put'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'put'>>>): Promise<AmigoResponse<OperationResponse<Path, 'put'>>>;
|
|
139
|
+
PATCH<Path extends PathForMethod<'patch'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'patch'>>>): Promise<AmigoResponse<OperationResponse<Path, 'patch'>>>;
|
|
140
|
+
DELETE<Path extends PathForMethod<'delete'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'delete'>>>): Promise<AmigoResponse<OperationResponse<Path, 'delete'>>>;
|
|
141
|
+
HEAD<Path extends PathForMethod<'head'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'head'>>>): Promise<AmigoResponse<OperationResponse<Path, 'head'>>>;
|
|
142
|
+
OPTIONS<Path extends PathForMethod<'options'>>(path: Path, ...[init]: InitParam<AmigoRequestOptions<OperationFor<Path, 'options'>>>): Promise<AmigoResponse<OperationResponse<Path, 'options'>>>;
|
|
127
143
|
private static fromPlatformClient;
|
|
128
144
|
private static hydrate;
|
|
129
145
|
private resolveApiRequest;
|
|
@@ -142,5 +158,8 @@ export type { RateLimitInfo } from './core/rate-limit.js';
|
|
|
142
158
|
export { verifyWebhookSignature, parseWebhookEvent, WebhookVerificationError, } from './core/webhooks.js';
|
|
143
159
|
export type { WebhookEvent, WebhookVerificationOptions, ParseWebhookEventOptions, } from './core/webhooks.js';
|
|
144
160
|
export type { ClientHooks, RequestHookContext, ResponseHookContext, ErrorHookContext, } from './core/openapi-client.js';
|
|
161
|
+
export type { MetricCatalogEntry, MetricCatalogResponse, MetricListResponse, MetricValue, NumericalMetricValue, CategoricalMetricValue, BooleanMetricValue, MetricValuesParams, MetricTrendParams, } from './resources/metrics.js';
|
|
162
|
+
/** @deprecated Use `MetricValue` instead. */
|
|
163
|
+
export type MetricValueResponse = MetricValueAlias;
|
|
145
164
|
export type { paths, components, operations } from './generated/api.js';
|
|
146
165
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5E,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,oBAAo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,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAC1F,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,YAAY,EACZ,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAA;AAEjC,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,wBAAwB,CAAA;AAC/B,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAA;AAGlD,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../src/resources/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE,qBAAa,iBAAkB,SAAQ,uBAAuB;IACtD,IAAI;;;;
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../src/resources/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE,qBAAa,iBAAkB,SAAQ,uBAAuB;IACtD,IAAI;;;;0BAyD01wc,qBAAsB;;;;;;kBAAic,qBAAsB;;;;;IAjD30xc,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAAC;;sBAiDmywc,qBAAsB;;;;;;cAAic,qBAAsB;;;;IAxC30xc,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3C,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC;;;;;;IAS7E,UAAU;;;;;;;;;;;IAQV,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC;;;;;;;;IASjD,IAAI;;;;0BAQ01wc,qBAAsB;;;;;;kBAAic,qBAAsB;;;;;CADl1xc"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { components, operations } from '../generated/api.js';
|
|
2
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
3
|
+
export type MetricCatalogEntry = components['schemas']['MetricCatalogEntry'];
|
|
4
|
+
export type MetricCatalogResponse = components['schemas']['MetricCatalogResponse'];
|
|
5
|
+
export type MetricListResponse = components['schemas']['MetricListResponse'];
|
|
6
|
+
export type NumericalMetricValue = components['schemas']['NumericalMetricValueResponse'];
|
|
7
|
+
export type CategoricalMetricValue = components['schemas']['CategoricalMetricValueResponse'];
|
|
8
|
+
export type BooleanMetricValue = components['schemas']['BooleanMetricValueResponse'];
|
|
9
|
+
export type MetricValue = NumericalMetricValue | CategoricalMetricValue | BooleanMetricValue;
|
|
10
|
+
/** @deprecated Use `MetricValue` instead. */
|
|
11
|
+
export type MetricValueResponse = MetricValue;
|
|
12
|
+
export type MetricValuesParams = NonNullable<operations['get-metric-values']['parameters']['query']>;
|
|
13
|
+
export type MetricTrendParams = NonNullable<operations['get-metric-trend']['parameters']['query']>;
|
|
14
|
+
/**
|
|
15
|
+
* Metrics — computed metric catalog and typed metric values.
|
|
16
|
+
*/
|
|
17
|
+
export declare class MetricsResource extends WorkspaceScopedResource {
|
|
18
|
+
/** List the latest value for each metric in the workspace */
|
|
19
|
+
listLatest(): Promise<{
|
|
20
|
+
metrics: ({
|
|
21
|
+
avg_confidence?: number | null | undefined;
|
|
22
|
+
computed_at?: string | null | undefined;
|
|
23
|
+
event_count: number;
|
|
24
|
+
metric_key: string;
|
|
25
|
+
metric_type: "boolean";
|
|
26
|
+
period_end: string;
|
|
27
|
+
period_start: string;
|
|
28
|
+
unit?: string | null | undefined;
|
|
29
|
+
value: boolean | null;
|
|
30
|
+
} | {
|
|
31
|
+
avg_confidence?: number | null | undefined;
|
|
32
|
+
computed_at?: string | null | undefined;
|
|
33
|
+
event_count: number;
|
|
34
|
+
metric_key: string;
|
|
35
|
+
metric_type: "categorical";
|
|
36
|
+
period_end: string;
|
|
37
|
+
period_start: string;
|
|
38
|
+
unit?: string | null | undefined;
|
|
39
|
+
value: string | null;
|
|
40
|
+
} | {
|
|
41
|
+
avg_confidence?: number | null | undefined;
|
|
42
|
+
computed_at?: string | null | undefined;
|
|
43
|
+
event_count: number;
|
|
44
|
+
metric_key: string;
|
|
45
|
+
metric_type: "numerical";
|
|
46
|
+
period_end: string;
|
|
47
|
+
period_start: string;
|
|
48
|
+
unit?: string | null | undefined;
|
|
49
|
+
value: number | null;
|
|
50
|
+
})[];
|
|
51
|
+
} & import("../index.js").ResponseMetadata>;
|
|
52
|
+
/** List available built-in and custom metric definitions */
|
|
53
|
+
getCatalog(): Promise<{
|
|
54
|
+
metrics: {
|
|
55
|
+
builtin: boolean;
|
|
56
|
+
description?: string | null | undefined;
|
|
57
|
+
extraction_mode?: "static" | "ai_classify" | "ai_extract" | "ai_sentiment" | "ai_query" | "sql_expr" | undefined;
|
|
58
|
+
granularity?: "aggregate" | "per_entity" | undefined;
|
|
59
|
+
has_prompt?: boolean | undefined;
|
|
60
|
+
key: components["schemas"]["SlugString"];
|
|
61
|
+
metric_type: "numerical" | "categorical" | "boolean";
|
|
62
|
+
model_tier?: "free" | "fast" | "balanced" | "max" | "custom" | undefined;
|
|
63
|
+
name: components["schemas"]["NameString"];
|
|
64
|
+
unit?: string | null | undefined;
|
|
65
|
+
}[];
|
|
66
|
+
} & import("../index.js").ResponseMetadata>;
|
|
67
|
+
/** Get stored values for one metric key, optionally bounded by time range */
|
|
68
|
+
getValues(metricKey: string, params?: MetricValuesParams): Promise<{
|
|
69
|
+
metrics: ({
|
|
70
|
+
avg_confidence?: number | null | undefined;
|
|
71
|
+
computed_at?: string | null | undefined;
|
|
72
|
+
event_count: number;
|
|
73
|
+
metric_key: string;
|
|
74
|
+
metric_type: "boolean";
|
|
75
|
+
period_end: string;
|
|
76
|
+
period_start: string;
|
|
77
|
+
unit?: string | null | undefined;
|
|
78
|
+
value: boolean | null;
|
|
79
|
+
} | {
|
|
80
|
+
avg_confidence?: number | null | undefined;
|
|
81
|
+
computed_at?: string | null | undefined;
|
|
82
|
+
event_count: number;
|
|
83
|
+
metric_key: string;
|
|
84
|
+
metric_type: "categorical";
|
|
85
|
+
period_end: string;
|
|
86
|
+
period_start: string;
|
|
87
|
+
unit?: string | null | undefined;
|
|
88
|
+
value: string | null;
|
|
89
|
+
} | {
|
|
90
|
+
avg_confidence?: number | null | undefined;
|
|
91
|
+
computed_at?: string | null | undefined;
|
|
92
|
+
event_count: number;
|
|
93
|
+
metric_key: string;
|
|
94
|
+
metric_type: "numerical";
|
|
95
|
+
period_end: string;
|
|
96
|
+
period_start: string;
|
|
97
|
+
unit?: string | null | undefined;
|
|
98
|
+
value: number | null;
|
|
99
|
+
})[];
|
|
100
|
+
} & import("../index.js").ResponseMetadata>;
|
|
101
|
+
/** Get a recent time-series trend for one metric key */
|
|
102
|
+
getTrend(metricKey: string, params?: MetricTrendParams): Promise<{
|
|
103
|
+
metrics: ({
|
|
104
|
+
avg_confidence?: number | null | undefined;
|
|
105
|
+
computed_at?: string | null | undefined;
|
|
106
|
+
event_count: number;
|
|
107
|
+
metric_key: string;
|
|
108
|
+
metric_type: "boolean";
|
|
109
|
+
period_end: string;
|
|
110
|
+
period_start: string;
|
|
111
|
+
unit?: string | null | undefined;
|
|
112
|
+
value: boolean | null;
|
|
113
|
+
} | {
|
|
114
|
+
avg_confidence?: number | null | undefined;
|
|
115
|
+
computed_at?: string | null | undefined;
|
|
116
|
+
event_count: number;
|
|
117
|
+
metric_key: string;
|
|
118
|
+
metric_type: "categorical";
|
|
119
|
+
period_end: string;
|
|
120
|
+
period_start: string;
|
|
121
|
+
unit?: string | null | undefined;
|
|
122
|
+
value: string | null;
|
|
123
|
+
} | {
|
|
124
|
+
avg_confidence?: number | null | undefined;
|
|
125
|
+
computed_at?: string | null | undefined;
|
|
126
|
+
event_count: number;
|
|
127
|
+
metric_key: string;
|
|
128
|
+
metric_type: "numerical";
|
|
129
|
+
period_end: string;
|
|
130
|
+
period_start: string;
|
|
131
|
+
unit?: string | null | undefined;
|
|
132
|
+
value: number | null;
|
|
133
|
+
})[];
|
|
134
|
+
} & import("../index.js").ResponseMetadata>;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/resources/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAA;AAC5E,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAAC,CAAA;AAClF,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAA;AAC5E,MAAM,MAAM,oBAAoB,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;;;;;;;;;;;;;;+BAyC8qof,qBAAsB;;;;;;;;;;;sBAAmzG,qBAAsB;;;;;;;;;;;;;MAlCjlvf;IAED,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;uBAOE,UAAU,CAAC,SAAS,CAAC,CAAC,4BAA4B,CAAC;;;;;;;;;;;;;MAOzE;IAED,QAAQ,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAOK,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOtE;CACF"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amigo-ai/platform-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Official TypeScript SDK for the Amigo Platform API",
|
|
5
5
|
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
6
|
+
"access": "public",
|
|
7
|
+
"provenance": true
|
|
7
8
|
},
|
|
8
9
|
"keywords": [
|
|
9
10
|
"amigo",
|
|
@@ -27,8 +28,14 @@
|
|
|
27
28
|
"exports": {
|
|
28
29
|
".": {
|
|
29
30
|
"types": "./dist/types/index.d.ts",
|
|
30
|
-
"import":
|
|
31
|
-
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/types/index.d.ts",
|
|
33
|
+
"default": "./dist/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/types/index.d.cts",
|
|
37
|
+
"default": "./dist/index.cjs"
|
|
38
|
+
}
|
|
32
39
|
},
|
|
33
40
|
"./package.json": "./package.json"
|
|
34
41
|
},
|
|
@@ -46,7 +53,7 @@
|
|
|
46
53
|
"clean": "node scripts/clean.mjs",
|
|
47
54
|
"gen-types": "node scripts/gen-types.mjs",
|
|
48
55
|
"openapi:sync": "node scripts/sync-openapi.mjs",
|
|
49
|
-
"build": "npm run clean && npm run gen-types && npm run esbuild && tsc --project tsconfig.build.json",
|
|
56
|
+
"build": "npm run clean && npm run gen-types && npm run esbuild && tsc --project tsconfig.build.json && node scripts/prepare-cjs-types.mjs",
|
|
50
57
|
"esbuild": "node scripts/build.mjs",
|
|
51
58
|
"docs:api": "node scripts/gen-api-docs.mjs",
|
|
52
59
|
"docs:check": "node scripts/gen-api-docs.mjs --check",
|
|
@@ -59,6 +66,7 @@
|
|
|
59
66
|
"test": "vitest run --project unit",
|
|
60
67
|
"test:dist": "vitest run --project dist",
|
|
61
68
|
"test:tarball": "node scripts/test-tarball.mjs",
|
|
69
|
+
"test:reviewer": "python -m unittest scripts.pr_review.test_main",
|
|
62
70
|
"test:integration": "vitest run --project integration",
|
|
63
71
|
"test:all": "vitest run",
|
|
64
72
|
"test:watch": "vitest",
|
|
@@ -69,7 +77,8 @@
|
|
|
69
77
|
},
|
|
70
78
|
"sideEffects": false,
|
|
71
79
|
"dependencies": {
|
|
72
|
-
"openapi-fetch": "^0.17.0"
|
|
80
|
+
"openapi-fetch": "^0.17.0",
|
|
81
|
+
"openapi-typescript-helpers": "^0.1.0"
|
|
73
82
|
},
|
|
74
83
|
"devDependencies": {
|
|
75
84
|
"@eslint/js": "^9.0.0",
|
|
@@ -112,8 +121,5 @@
|
|
|
112
121
|
},
|
|
113
122
|
"engines": {
|
|
114
123
|
"node": ">=20.0.0"
|
|
115
|
-
},
|
|
116
|
-
"optionalDependencies": {
|
|
117
|
-
"@rollup/rollup-darwin-arm64": "^4.60.2"
|
|
118
124
|
}
|
|
119
125
|
}
|