@amigo-ai/platform-sdk 0.11.2 → 0.12.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.
@@ -1961,6 +1961,26 @@ export interface paths {
1961
1961
  patch?: never;
1962
1962
  trace?: never;
1963
1963
  };
1964
+ "/v1/{workspace_id}/conversations/messages": {
1965
+ parameters: {
1966
+ query?: never;
1967
+ header?: never;
1968
+ path?: never;
1969
+ cookie?: never;
1970
+ };
1971
+ get?: never;
1972
+ put?: never;
1973
+ /**
1974
+ * Send a text message and receive the agent's response
1975
+ * @description Process a single text message through the agent and return the response synchronously. If `conversation_id` is omitted, a new conversation is created. If provided, the existing conversation is resumed from its frozen state (prior context and commitments are preserved). For real-time streaming, use the WebSocket endpoint at `ws /agent/text-stream`.
1976
+ */
1977
+ post: operations["send_message_v1__workspace_id__conversations_messages_post"];
1978
+ delete?: never;
1979
+ options?: never;
1980
+ head?: never;
1981
+ patch?: never;
1982
+ trace?: never;
1983
+ };
1964
1984
  "/v1/{workspace_id}/crm/companies": {
1965
1985
  parameters: {
1966
1986
  query?: never;
@@ -9941,6 +9961,152 @@ export interface components {
9941
9961
  /** Value */
9942
9962
  value: string | null;
9943
9963
  };
9964
+ /** ChannelEmailBouncedEvent */
9965
+ ChannelEmailBouncedEvent: {
9966
+ /**
9967
+ * Bounce Subtype
9968
+ * @default null
9969
+ */
9970
+ bounce_subtype?: string | null;
9971
+ /**
9972
+ * Bounce Type
9973
+ * @default null
9974
+ */
9975
+ bounce_type?: string | null;
9976
+ /** Email Id */
9977
+ email_id: string;
9978
+ /**
9979
+ * @description discriminator enum property added by openapi-typescript
9980
+ * @enum {string}
9981
+ */
9982
+ event_type: "channel.email_bounced";
9983
+ /** From Address */
9984
+ from_address: string;
9985
+ /** To Address */
9986
+ to_address: string;
9987
+ };
9988
+ /** ChannelEmailClickedEvent */
9989
+ ChannelEmailClickedEvent: {
9990
+ /** Email Id */
9991
+ email_id: string;
9992
+ /**
9993
+ * @description discriminator enum property added by openapi-typescript
9994
+ * @enum {string}
9995
+ */
9996
+ event_type: "channel.email_clicked";
9997
+ /** To Address */
9998
+ to_address: string;
9999
+ };
10000
+ /** ChannelEmailComplainedEvent */
10001
+ ChannelEmailComplainedEvent: {
10002
+ /** Email Id */
10003
+ email_id: string;
10004
+ /**
10005
+ * @description discriminator enum property added by openapi-typescript
10006
+ * @enum {string}
10007
+ */
10008
+ event_type: "channel.email_complained";
10009
+ /** From Address */
10010
+ from_address: string;
10011
+ /** To Address */
10012
+ to_address: string;
10013
+ };
10014
+ /** ChannelEmailDelayedEvent */
10015
+ ChannelEmailDelayedEvent: {
10016
+ /** Email Id */
10017
+ email_id: string;
10018
+ /**
10019
+ * @description discriminator enum property added by openapi-typescript
10020
+ * @enum {string}
10021
+ */
10022
+ event_type: "channel.email_delayed";
10023
+ /** From Address */
10024
+ from_address: string;
10025
+ /** To Address */
10026
+ to_address: string;
10027
+ };
10028
+ /** ChannelEmailDeliveredEvent */
10029
+ ChannelEmailDeliveredEvent: {
10030
+ /** Email Id */
10031
+ email_id: string;
10032
+ /**
10033
+ * @description discriminator enum property added by openapi-typescript
10034
+ * @enum {string}
10035
+ */
10036
+ event_type: "channel.email_delivered";
10037
+ /** From Address */
10038
+ from_address: string;
10039
+ /** To Address */
10040
+ to_address: string;
10041
+ };
10042
+ /** ChannelEmailOpenedEvent */
10043
+ ChannelEmailOpenedEvent: {
10044
+ /** Email Id */
10045
+ email_id: string;
10046
+ /**
10047
+ * @description discriminator enum property added by openapi-typescript
10048
+ * @enum {string}
10049
+ */
10050
+ event_type: "channel.email_opened";
10051
+ /** To Address */
10052
+ to_address: string;
10053
+ };
10054
+ /** ChannelEmailRejectedEvent */
10055
+ ChannelEmailRejectedEvent: {
10056
+ /** Email Id */
10057
+ email_id: string;
10058
+ /**
10059
+ * @description discriminator enum property added by openapi-typescript
10060
+ * @enum {string}
10061
+ */
10062
+ event_type: "channel.email_rejected";
10063
+ /** From Address */
10064
+ from_address: string;
10065
+ /** To Address */
10066
+ to_address: string;
10067
+ };
10068
+ /** ChannelEventRequest */
10069
+ ChannelEventRequest: {
10070
+ /**
10071
+ * Channel
10072
+ * @enum {string}
10073
+ */
10074
+ channel: "email" | "sms" | "voice";
10075
+ /** Data */
10076
+ data?: {
10077
+ [key: string]: unknown;
10078
+ };
10079
+ /** Email Id */
10080
+ email_id?: string | null;
10081
+ /** Event Type */
10082
+ event_type: string;
10083
+ /** From Address */
10084
+ from_address?: string | null;
10085
+ /**
10086
+ * Occurred At
10087
+ * Format: date-time
10088
+ */
10089
+ occurred_at: string;
10090
+ /** Phone Number */
10091
+ phone_number?: string | null;
10092
+ /**
10093
+ * Setup Id
10094
+ * Format: uuid
10095
+ */
10096
+ setup_id: string;
10097
+ /** To Address */
10098
+ to_address?: string | null;
10099
+ };
10100
+ /** ChannelEventResponse */
10101
+ ChannelEventResponse: {
10102
+ /** Event Id */
10103
+ event_id?: string | null;
10104
+ /**
10105
+ * Status
10106
+ * @enum {string}
10107
+ */
10108
+ status: "accepted" | "skipped";
10109
+ };
9944
10110
  /**
9945
10111
  * ChannelOverride
9946
10112
  * @description Per-channel behavior override for a state.
@@ -10726,6 +10892,16 @@ export interface components {
10726
10892
  /** Navigation Model */
10727
10893
  navigation_model?: string | null;
10728
10894
  };
10895
+ /** ConversationMessage */
10896
+ ConversationMessage: {
10897
+ /**
10898
+ * Role
10899
+ * @enum {string}
10900
+ */
10901
+ role: "agent" | "user" | "system";
10902
+ /** Text */
10903
+ text: string;
10904
+ };
10729
10905
  /**
10730
10906
  * ConversationSummary
10731
10907
  * @description Conversation flow metrics.
@@ -11322,6 +11498,7 @@ export interface components {
11322
11498
  * @enum {string}
11323
11499
  */
11324
11500
  environment?: "sandbox" | "production";
11501
+ escalation_policy?: components["schemas"]["EscalationPolicy"] | null;
11325
11502
  /**
11326
11503
  * Is Active
11327
11504
  * @default true
@@ -14008,6 +14185,34 @@ export interface components {
14008
14185
  */
14009
14186
  workspace_id: string;
14010
14187
  };
14188
+ /**
14189
+ * EscalationPolicy
14190
+ * @description Per-service routing for engine-detected escalation triggers.
14191
+ *
14192
+ * Each trigger source maps to one EscalationAction. The three enumerated
14193
+ * fields below are the trigger_sources actually emitted by the agent-engine
14194
+ * today; new triggers can be added as fields without breaking back-compat.
14195
+ *
14196
+ * Partial policies are intentional: every field defaults to OperatorAction,
14197
+ * so a PUT body like ``{"context_window_exhaustion": {"type": "forward"}}``
14198
+ * overrides only that trigger and leaves the others on the operator default.
14199
+ * To opt the entire service back to today's behavior, set
14200
+ * ``Service.escalation_policy = None`` (caveat: the platform-api Service
14201
+ * update path uses ``exclude_none=True`` and currently has no clears-via-null
14202
+ * branch, so this requires a direct config edit; see follow-up issue).
14203
+ *
14204
+ * Resolution lookup is done against ``model_fields``: a trigger_source that
14205
+ * is not an enumerated field name falls through to OperatorAction, never
14206
+ * a non-Action Pydantic internal.
14207
+ */
14208
+ EscalationPolicy: {
14209
+ /** Context Window Exhaustion */
14210
+ context_window_exhaustion?: components["schemas"]["OperatorAction"] | components["schemas"]["ForwardAction"] | components["schemas"]["HangupAction"];
14211
+ /** Conversation Monitor */
14212
+ conversation_monitor?: components["schemas"]["OperatorAction"] | components["schemas"]["ForwardAction"] | components["schemas"]["HangupAction"];
14213
+ /** Risk Scorer */
14214
+ risk_scorer?: components["schemas"]["OperatorAction"] | components["schemas"]["ForwardAction"] | components["schemas"]["HangupAction"];
14215
+ };
14011
14216
  /** EscalationState */
14012
14217
  EscalationState: {
14013
14218
  /** Agent Confidence */
@@ -15016,6 +15221,26 @@ export interface components {
15016
15221
  /** Templates */
15017
15222
  templates: components["schemas"]["FormTemplate-Input"][];
15018
15223
  };
15224
+ /**
15225
+ * ForwardAction
15226
+ * @description Cold-transfer the caller to the inbound phone number's configured
15227
+ * forwarding destination (set via `PUT /v1/{ws}/phone-numbers/{id}/forwarding`).
15228
+ *
15229
+ * No agent-side decision and no operator dashboard required — the engine
15230
+ * invokes the same forwarding callback used by the LLM-driven `forward_call`
15231
+ * tool, with no location override, which falls through to the static
15232
+ * `ForwardingMap` populated from the phone-number config.
15233
+ *
15234
+ * If forwarding is not configured for the inbound phone number, the
15235
+ * dispatcher falls back to the operator path (audit event + SSE only).
15236
+ */
15237
+ ForwardAction: {
15238
+ /**
15239
+ * @description discriminator enum property added by openapi-typescript
15240
+ * @enum {string}
15241
+ */
15242
+ type: "forward";
15243
+ };
15019
15244
  /** ForwardCallResolvedEvent */
15020
15245
  ForwardCallResolvedEvent: {
15021
15246
  /**
@@ -15354,6 +15579,17 @@ export interface components {
15354
15579
  /** Detail */
15355
15580
  detail?: components["schemas"]["ValidationError"][];
15356
15581
  };
15582
+ /**
15583
+ * HangupAction
15584
+ * @description End the call gracefully via the existing speaker-drain hangup path.
15585
+ */
15586
+ HangupAction: {
15587
+ /**
15588
+ * @description discriminator enum property added by openapi-typescript
15589
+ * @enum {string}
15590
+ */
15591
+ type: "hangup";
15592
+ };
15357
15593
  /**
15358
15594
  * HardEscalationRule
15359
15595
  * @description Non-negotiable escalation rule for healthcare compliance.
@@ -17101,6 +17337,18 @@ export interface components {
17101
17337
  */
17102
17338
  target_fields?: string[] | null;
17103
17339
  };
17340
+ /**
17341
+ * OperatorAction
17342
+ * @description Today's behavior — write escalation.requested + publish SSE, wait for a
17343
+ * human operator to join via the dashboard. No-op if no operators are staffed.
17344
+ */
17345
+ OperatorAction: {
17346
+ /**
17347
+ * @description discriminator enum property added by openapi-typescript
17348
+ * @enum {string}
17349
+ */
17350
+ type: "operator";
17351
+ };
17104
17352
  /**
17105
17353
  * OperatorIntelligenceSummary
17106
17354
  * @description Operator intervention summary.
@@ -20107,6 +20355,41 @@ export interface components {
20107
20355
  */
20108
20356
  status: "delivered" | "failed";
20109
20357
  };
20358
+ /** SendMessageRequest */
20359
+ SendMessageRequest: {
20360
+ /**
20361
+ * Conversation Id
20362
+ * @description Existing conversation ID to resume. Omit to start a new conversation.
20363
+ */
20364
+ conversation_id?: string | null;
20365
+ /**
20366
+ * Entity Id
20367
+ * @description Patient entity ID for context loading.
20368
+ */
20369
+ entity_id?: string | null;
20370
+ /**
20371
+ * Message
20372
+ * @description User message text
20373
+ */
20374
+ message: string;
20375
+ /**
20376
+ * Service Id
20377
+ * @description Agent service ID
20378
+ */
20379
+ service_id: string;
20380
+ };
20381
+ /** SendMessageResponse */
20382
+ SendMessageResponse: {
20383
+ /** Conversation Id */
20384
+ conversation_id: string;
20385
+ /** Messages */
20386
+ messages: components["schemas"]["ConversationMessage"][];
20387
+ /**
20388
+ * Status
20389
+ * @enum {string}
20390
+ */
20391
+ status: "active" | "completed" | "error";
20392
+ };
20110
20393
  /**
20111
20394
  * Service
20112
20395
  * @description A service links an agent + context graph + version sets.
@@ -20132,6 +20415,7 @@ export interface components {
20132
20415
  * @enum {string}
20133
20416
  */
20134
20417
  environment?: "sandbox" | "production";
20418
+ escalation_policy?: components["schemas"]["EscalationPolicy"] | null;
20135
20419
  /**
20136
20420
  * Hard Escalation Rules
20137
20421
  * @default []
@@ -20197,6 +20481,7 @@ export interface components {
20197
20481
  * @enum {string}
20198
20482
  */
20199
20483
  environment?: "sandbox" | "production";
20484
+ escalation_policy?: components["schemas"]["EscalationPolicy"] | null;
20200
20485
  /** Id */
20201
20486
  id: string;
20202
20487
  /** Is Active */
@@ -23445,6 +23730,7 @@ export interface components {
23445
23730
  description?: components["schemas"]["DescriptionString"] | null;
23446
23731
  /** Environment */
23447
23732
  environment?: ("sandbox" | "production") | null;
23733
+ escalation_policy?: components["schemas"]["EscalationPolicy"] | null;
23448
23734
  /** Is Active */
23449
23735
  is_active?: boolean | null;
23450
23736
  /** Keyterms */
@@ -24537,6 +24823,47 @@ export interface components {
24537
24823
  */
24538
24824
  workspace_id: string;
24539
24825
  };
24826
+ /** WorkspaceInvitationAcceptedEvent */
24827
+ WorkspaceInvitationAcceptedEvent: {
24828
+ /** Entity Id */
24829
+ entity_id: string;
24830
+ /**
24831
+ * @description discriminator enum property added by openapi-typescript
24832
+ * @enum {string}
24833
+ */
24834
+ event_type: "workspace.invitation_accepted";
24835
+ /** Role */
24836
+ role: string;
24837
+ };
24838
+ /** WorkspaceInvitationSentEvent */
24839
+ WorkspaceInvitationSentEvent: {
24840
+ /**
24841
+ * @description discriminator enum property added by openapi-typescript
24842
+ * @enum {string}
24843
+ */
24844
+ event_type: "workspace.invitation_sent";
24845
+ /** Invitation Id */
24846
+ invitation_id: string;
24847
+ /**
24848
+ * Resent
24849
+ * @default false
24850
+ */
24851
+ resent?: boolean;
24852
+ /** Role */
24853
+ role: string;
24854
+ };
24855
+ /** WorkspaceMemberAddedEvent */
24856
+ WorkspaceMemberAddedEvent: {
24857
+ /** Entity Id */
24858
+ entity_id: string;
24859
+ /**
24860
+ * @description discriminator enum property added by openapi-typescript
24861
+ * @enum {string}
24862
+ */
24863
+ event_type: "workspace.member_added";
24864
+ /** Role */
24865
+ role: string;
24866
+ };
24540
24867
  /** WorkspaceResponse */
24541
24868
  WorkspaceResponse: {
24542
24869
  /** Backend Org Id */
@@ -24566,7 +24893,7 @@ export interface components {
24566
24893
  */
24567
24894
  updated_at: string;
24568
24895
  };
24569
- WorkspaceSSEEvent: components["schemas"]["CallStartedEvent"] | components["schemas"]["CallEndedEvent"] | components["schemas"]["CallEscalatedEvent"] | components["schemas"]["EncounterUpdatedEvent"] | components["schemas"]["NarrativeUpdatedEvent"] | components["schemas"]["ReviewSubmittedEvent"] | components["schemas"]["SimulationTurnStoredEvent"] | components["schemas"]["SurfaceCreatedEvent"] | components["schemas"]["SurfaceDeliveredEvent"] | components["schemas"]["SurfaceUpdatedEvent"] | components["schemas"]["SurfaceArchivedEvent"] | components["schemas"]["SurfaceReshapedEvent"] | components["schemas"]["SurfaceSubmittedEvent"] | components["schemas"]["SurfaceFieldSavedEvent"] | components["schemas"]["SurfaceOpenedEvent"] | components["schemas"]["SurfacePendingReviewEvent"] | components["schemas"]["SurfaceReviewApprovedEvent"] | components["schemas"]["SurfaceReviewRejectedEvent"] | components["schemas"]["TextStartedEvent"] | components["schemas"]["TextCompletedEvent"] | components["schemas"]["TriggerFiredEvent"] | components["schemas"]["TriggerCompletedEvent"] | components["schemas"]["TriggerFailedEvent"] | components["schemas"]["PipelineSyncCompletedEvent"] | components["schemas"]["PipelineErrorEvent"] | components["schemas"]["OperatorRegisteredEvent"] | components["schemas"]["OperatorStatusChangedEvent"] | components["schemas"]["OperatorProfileUpdatedEvent"] | components["schemas"]["OperatorJoinedCallEvent"] | components["schemas"]["OperatorLeftCallEvent"] | components["schemas"]["OperatorModeChangedEvent"] | components["schemas"]["OperatorWrapUpEvent"];
24896
+ WorkspaceSSEEvent: components["schemas"]["CallStartedEvent"] | components["schemas"]["CallEndedEvent"] | components["schemas"]["CallEscalatedEvent"] | components["schemas"]["EncounterUpdatedEvent"] | components["schemas"]["NarrativeUpdatedEvent"] | components["schemas"]["ReviewSubmittedEvent"] | components["schemas"]["SimulationTurnStoredEvent"] | components["schemas"]["SurfaceCreatedEvent"] | components["schemas"]["SurfaceDeliveredEvent"] | components["schemas"]["SurfaceUpdatedEvent"] | components["schemas"]["SurfaceArchivedEvent"] | components["schemas"]["SurfaceReshapedEvent"] | components["schemas"]["SurfaceSubmittedEvent"] | components["schemas"]["SurfaceFieldSavedEvent"] | components["schemas"]["SurfaceOpenedEvent"] | components["schemas"]["SurfacePendingReviewEvent"] | components["schemas"]["SurfaceReviewApprovedEvent"] | components["schemas"]["SurfaceReviewRejectedEvent"] | components["schemas"]["TextStartedEvent"] | components["schemas"]["TextCompletedEvent"] | components["schemas"]["TriggerFiredEvent"] | components["schemas"]["TriggerCompletedEvent"] | components["schemas"]["TriggerFailedEvent"] | components["schemas"]["PipelineSyncCompletedEvent"] | components["schemas"]["PipelineErrorEvent"] | components["schemas"]["OperatorRegisteredEvent"] | components["schemas"]["OperatorStatusChangedEvent"] | components["schemas"]["OperatorProfileUpdatedEvent"] | components["schemas"]["OperatorJoinedCallEvent"] | components["schemas"]["OperatorLeftCallEvent"] | components["schemas"]["OperatorModeChangedEvent"] | components["schemas"]["OperatorWrapUpEvent"] | components["schemas"]["WorkspaceMemberAddedEvent"] | components["schemas"]["WorkspaceInvitationSentEvent"] | components["schemas"]["WorkspaceInvitationAcceptedEvent"] | components["schemas"]["ChannelEmailDeliveredEvent"] | components["schemas"]["ChannelEmailBouncedEvent"] | components["schemas"]["ChannelEmailComplainedEvent"] | components["schemas"]["ChannelEmailRejectedEvent"] | components["schemas"]["ChannelEmailDelayedEvent"] | components["schemas"]["ChannelEmailOpenedEvent"] | components["schemas"]["ChannelEmailClickedEvent"];
24570
24897
  /** WorldDashboardResponse */
24571
24898
  WorldDashboardResponse: {
24572
24899
  /** Avg Confidence */
@@ -29605,6 +29932,41 @@ export interface operations {
29605
29932
  };
29606
29933
  };
29607
29934
  };
29935
+ send_message_v1__workspace_id__conversations_messages_post: {
29936
+ parameters: {
29937
+ query?: never;
29938
+ header?: never;
29939
+ path: {
29940
+ workspace_id: string;
29941
+ };
29942
+ cookie?: never;
29943
+ };
29944
+ requestBody: {
29945
+ content: {
29946
+ "application/json": components["schemas"]["SendMessageRequest"];
29947
+ };
29948
+ };
29949
+ responses: {
29950
+ /** @description Successful Response */
29951
+ 200: {
29952
+ headers: {
29953
+ [name: string]: unknown;
29954
+ };
29955
+ content: {
29956
+ "application/json": components["schemas"]["SendMessageResponse"];
29957
+ };
29958
+ };
29959
+ /** @description Validation Error */
29960
+ 422: {
29961
+ headers: {
29962
+ [name: string]: unknown;
29963
+ };
29964
+ content: {
29965
+ "application/json": components["schemas"]["HTTPValidationError"];
29966
+ };
29967
+ };
29968
+ };
29969
+ };
29608
29970
  "crm-company-search": {
29609
29971
  parameters: {
29610
29972
  query?: {
@@ -31800,6 +32162,20 @@ export interface operations {
31800
32162
  q?: string | null;
31801
32163
  /** @description Scope to data source */
31802
32164
  data_source_id?: string | null;
32165
+ /** @description Slot status (e.g. 'free', 'busy') */
32166
+ status?: string | null;
32167
+ /** @description Start date YYYY-MM-DD (filters slots on or after this date) */
32168
+ date?: string | null;
32169
+ /** @description Number of days forward from date (default 7) */
32170
+ days?: number;
32171
+ /** @description Provider name (partial match, e.g. 'Woloski') */
32172
+ provider?: string | null;
32173
+ /** @description Specialty (partial match, e.g. 'Psychiatry') */
32174
+ specialty?: string | null;
32175
+ /** @description Visit/service type name (partial match, e.g. 'Follow-up') */
32176
+ service_type?: string | null;
32177
+ /** @description Facility ID */
32178
+ facility_id?: string | null;
31803
32179
  limit?: number;
31804
32180
  offset?: number;
31805
32181
  };