@amigo-ai/sdk 1.1.0 → 1.1.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.
@@ -26,21 +26,30 @@ export declare class AmigoError extends Error {
26
26
  */
27
27
  toJSON(): Record<string, unknown>;
28
28
  }
29
+ type AmigoErrorOptions = NonNullable<ConstructorParameters<typeof AmigoError>[1]>;
29
30
  export declare class BadRequestError extends AmigoError {
31
+ constructor(message: string, options?: AmigoErrorOptions);
30
32
  }
31
33
  export declare class AuthenticationError extends AmigoError {
34
+ constructor(message: string, options?: AmigoErrorOptions);
32
35
  }
33
36
  export declare class PermissionError extends AmigoError {
37
+ constructor(message: string, options?: AmigoErrorOptions);
34
38
  }
35
39
  export declare class NotFoundError extends AmigoError {
40
+ constructor(message: string, options?: AmigoErrorOptions);
36
41
  }
37
42
  export declare class ConflictError extends AmigoError {
43
+ constructor(message: string, options?: AmigoErrorOptions);
38
44
  }
39
45
  export declare class RateLimitError extends AmigoError {
46
+ constructor(message: string, options?: AmigoErrorOptions);
40
47
  }
41
48
  export declare class ServerError extends AmigoError {
49
+ constructor(message: string, options?: AmigoErrorOptions);
42
50
  }
43
51
  export declare class ServiceUnavailableError extends ServerError {
52
+ constructor(message: string, options?: AmigoErrorOptions);
44
53
  }
45
54
  export declare class ConfigurationError extends AmigoError {
46
55
  readonly field?: string | undefined;
@@ -48,7 +57,7 @@ export declare class ConfigurationError extends AmigoError {
48
57
  }
49
58
  export declare class ValidationError extends BadRequestError {
50
59
  fieldErrors?: Record<string, string> | undefined;
51
- constructor(msg: string, fieldErrors?: Record<string, string> | undefined);
60
+ constructor(msg: string, optionsOrFieldErrors?: AmigoErrorOptions | Record<string, string>, fieldErrors?: Record<string, string> | undefined);
52
61
  }
53
62
  export declare class NetworkError extends AmigoError {
54
63
  readonly originalError?: Error | undefined;
@@ -69,3 +78,4 @@ export declare class ParseError extends AmigoError {
69
78
  export declare function isAmigoError(error: unknown): error is AmigoError;
70
79
  export declare function createApiError(response: Response, body?: unknown): AmigoError;
71
80
  export declare function createErrorMiddleware(): Middleware;
81
+ export {};
@@ -15,6 +15,7 @@ import { PlatformSessionResource } from './resources/sessions';
15
15
  import { SkillResource } from './resources/skills';
16
16
  import { WorkspaceResource } from './resources/workspaces';
17
17
  import type { WorkspaceId } from './core/branded-types';
18
+ import type { components as PlatformComponents } from '../generated/platform-api-types';
18
19
  export interface PlatformClientConfig {
19
20
  /** Platform API key or JWT. */
20
21
  apiKey: string;
@@ -55,5 +56,20 @@ export type { PlatformFetch, PlatformWebSocketConstructor };
55
56
  export type { ServerSentEvent } from '../core/utils';
56
57
  export { AmigoError, BadRequestError, AuthenticationError, PermissionError, NotFoundError, ConflictError, RateLimitError, ServerError, ServiceUnavailableError, ConfigurationError, ValidationError, NetworkError, ParseError, isAmigoError, } from '../core/errors';
57
58
  export type { components, operations, paths } from '../generated/platform-api-types';
59
+ export type CallSummary = PlatformComponents['schemas']['CallSummary'];
60
+ export type CallDetail = PlatformComponents['schemas']['CallDetailResponse'];
61
+ export type CallTurn = PlatformComponents['schemas']['Turn'];
62
+ export type CallToolCall = PlatformComponents['schemas']['ToolCall'];
63
+ export type PlaybackTimeline = PlatformComponents['schemas']['PlaybackTimeline'];
64
+ export type TimelineActor = PlatformComponents['schemas']['TimelineActor'];
65
+ export type TimelineLaneDefinition = PlatformComponents['schemas']['TimelineLaneDefinition'];
66
+ export type TimelineSegment = PlatformComponents['schemas']['TimelineSegment'];
67
+ export type TimelineTimebase = PlatformComponents['schemas']['TimelineTimebase'];
68
+ export type TurnTimeline = PlatformComponents['schemas']['TurnTimeline'];
69
+ export type TimelineSegmentType = TimelineSegment['type'];
70
+ export type TimelineLane = TimelineSegment['lane'];
71
+ export type TimelineTrack = NonNullable<TimelineSegment['track']>;
72
+ export type TimelineActorKind = TimelineActor['kind'];
73
+ export type TimelineActorRole = TimelineActor['role'];
58
74
  export type { CallSid, ContextGraphId, DataSourceId, EntityId, IntegrationId, MonitorConceptId, OperatorId, PhoneNumberId, PlatformAgentId, PlatformApiKeyId, PlatformConversationId, PlatformServiceId, ReviewItemId, SkillId, TaskId, UnificationRuleId, WorkspaceId, } from './core/branded-types';
59
75
  export { callSid, contextGraphId, dataSourceId, entityId, integrationId, monitorConceptId, operatorId, phoneNumberId, platformAgentId, platformApiKeyId, platformConversationId, platformServiceId, reviewItemId, skillId, taskId, unificationRuleId, workspaceId, } from './core/branded-types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amigo-ai/sdk",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Official TypeScript SDK for the Amigo classic and Platform APIs",
5
5
  "keywords": [
6
6
  "amigo",