@api-client/core 0.19.8 → 0.19.9
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/build/src/modeling/ai/types.d.ts +4 -4
- package/build/src/modeling/ai/types.d.ts.map +1 -1
- package/build/src/modeling/ai/types.js.map +1 -1
- package/build/src/sdk/AiSdk.d.ts.map +1 -1
- package/build/src/sdk/AiSdk.js +2 -1
- package/build/src/sdk/AiSdk.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +9 -9
- package/package.json +1 -1
- package/src/modeling/ai/types.ts +4 -4
- package/src/sdk/AiSdk.ts +5 -4
|
@@ -42813,13 +42813,13 @@
|
|
|
42813
42813
|
"@id": "#219"
|
|
42814
42814
|
},
|
|
42815
42815
|
{
|
|
42816
|
-
"@id": "#
|
|
42816
|
+
"@id": "#213"
|
|
42817
42817
|
},
|
|
42818
42818
|
{
|
|
42819
|
-
"@id": "#
|
|
42819
|
+
"@id": "#216"
|
|
42820
42820
|
},
|
|
42821
42821
|
{
|
|
42822
|
-
"@id": "#
|
|
42822
|
+
"@id": "#210"
|
|
42823
42823
|
}
|
|
42824
42824
|
],
|
|
42825
42825
|
"doc:root": false,
|
|
@@ -44232,7 +44232,7 @@
|
|
|
44232
44232
|
"doc:ExternalDomainElement",
|
|
44233
44233
|
"doc:DomainElement"
|
|
44234
44234
|
],
|
|
44235
|
-
"doc:raw": "
|
|
44235
|
+
"doc:raw": "type: \"GENERAL\"\nvalue: \"www.company.be\"\n",
|
|
44236
44236
|
"core:mediaType": "application/yaml",
|
|
44237
44237
|
"sourcemaps:sources": [
|
|
44238
44238
|
{
|
|
@@ -44253,7 +44253,7 @@
|
|
|
44253
44253
|
"doc:ExternalDomainElement",
|
|
44254
44254
|
"doc:DomainElement"
|
|
44255
44255
|
],
|
|
44256
|
-
"doc:raw": "type:
|
|
44256
|
+
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '21'\nsubscriberNumber: '12.87.00'\nformatted: '+32-(0)21 302099'\n",
|
|
44257
44257
|
"core:mediaType": "application/yaml",
|
|
44258
44258
|
"sourcemaps:sources": [
|
|
44259
44259
|
{
|
|
@@ -44274,7 +44274,7 @@
|
|
|
44274
44274
|
"doc:ExternalDomainElement",
|
|
44275
44275
|
"doc:DomainElement"
|
|
44276
44276
|
],
|
|
44277
|
-
"doc:raw": "type: 'GENERAL'\
|
|
44277
|
+
"doc:raw": "-\n type: 'GENERAL'\n value: 'info@company.be'\n-\n type: 'IT_DEPT'\n value: 'it-service@company.be'\n",
|
|
44278
44278
|
"core:mediaType": "application/yaml",
|
|
44279
44279
|
"sourcemaps:sources": [
|
|
44280
44280
|
{
|
|
@@ -45116,17 +45116,17 @@
|
|
|
45116
45116
|
{
|
|
45117
45117
|
"@id": "#212/source-map/lexical/element_0",
|
|
45118
45118
|
"sourcemaps:element": "amf://id#212",
|
|
45119
|
-
"sourcemaps:value": "[(1,0)-(
|
|
45119
|
+
"sourcemaps:value": "[(1,0)-(3,0)]"
|
|
45120
45120
|
},
|
|
45121
45121
|
{
|
|
45122
45122
|
"@id": "#215/source-map/lexical/element_0",
|
|
45123
45123
|
"sourcemaps:element": "amf://id#215",
|
|
45124
|
-
"sourcemaps:value": "[(1,0)-(
|
|
45124
|
+
"sourcemaps:value": "[(1,0)-(6,0)]"
|
|
45125
45125
|
},
|
|
45126
45126
|
{
|
|
45127
45127
|
"@id": "#218/source-map/lexical/element_0",
|
|
45128
45128
|
"sourcemaps:element": "amf://id#218",
|
|
45129
|
-
"sourcemaps:value": "[(1,0)-(
|
|
45129
|
+
"sourcemaps:value": "[(1,0)-(7,0)]"
|
|
45130
45130
|
},
|
|
45131
45131
|
{
|
|
45132
45132
|
"@id": "#221/source-map/lexical/element_0",
|
package/package.json
CHANGED
package/src/modeling/ai/types.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { DomainPropertyType } from '../DataFormat.js'
|
|
|
5
5
|
import type { OnDeleteRule } from '../index.js'
|
|
6
6
|
import { SemanticType } from '../Semantics.js'
|
|
7
7
|
import type { AssociationTarget, PropertySchema } from '../types.js'
|
|
8
|
-
import type {
|
|
8
|
+
import type { AiModelMessageSchema, AiModelMessage, AiUserMessageSchema } from '../../models/AiMessage.js'
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* A copy of the `Type` enum from the `@google/genai` package.
|
|
@@ -206,11 +206,11 @@ export interface AiDomainDeltaResponse {
|
|
|
206
206
|
* received from the AI generation endpoint.
|
|
207
207
|
*/
|
|
208
208
|
export type AiStreamEvent =
|
|
209
|
-
| { event: 'user-message'; data:
|
|
210
|
-
| { event: 'agent-message'; data:
|
|
209
|
+
| { event: 'user-message'; data: AiUserMessageSchema }
|
|
210
|
+
| { event: 'agent-message'; data: AiModelMessageSchema }
|
|
211
211
|
| { event: 'thought-chunk'; data: string }
|
|
212
212
|
| { event: 'text-chunk'; data: string }
|
|
213
|
-
| { event: 'done'; data:
|
|
213
|
+
| { event: 'done'; data: AiModelMessageSchema }
|
|
214
214
|
| { event: 'error'; data: Exception }
|
|
215
215
|
| { event: 'session-updated'; data: AiSessionSchema }
|
|
216
216
|
|
package/src/sdk/AiSdk.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ContextListOptions, ContextListResult } from '../events/BaseEvents.js'
|
|
2
2
|
import { Exception } from '../exceptions/exception.js'
|
|
3
3
|
import type { AiStreamEvent } from '../modeling/ai/types.js'
|
|
4
|
-
import type {
|
|
4
|
+
import type { AiMessageSchema, AiModelMessageSchema, AiUserMessageSchema } from '../models/AiMessage.js'
|
|
5
5
|
import type { AiSessionApp, AiSessionSchema } from '../models/AiSession.js'
|
|
6
6
|
import { AiMessageKind, AiSessionKind } from '../models/kinds.js'
|
|
7
7
|
import { RouteBuilder } from './RouteBuilder.js'
|
|
@@ -95,9 +95,10 @@ export class AiSdk extends SdkBase {
|
|
|
95
95
|
|
|
96
96
|
switch (eventName) {
|
|
97
97
|
case 'user-message':
|
|
98
|
+
yield { event: eventName, data: eventData as AiUserMessageSchema }
|
|
99
|
+
break
|
|
98
100
|
case 'agent-message':
|
|
99
|
-
|
|
100
|
-
yield { event: eventName, data: eventData as AiMessage }
|
|
101
|
+
yield { event: eventName, data: eventData as AiModelMessageSchema }
|
|
101
102
|
break
|
|
102
103
|
case 'thought-chunk':
|
|
103
104
|
case 'text-chunk':
|
|
@@ -105,7 +106,7 @@ export class AiSdk extends SdkBase {
|
|
|
105
106
|
yield { event: eventName, data: eventData as string }
|
|
106
107
|
break
|
|
107
108
|
case 'done':
|
|
108
|
-
yield { event: eventName, data: eventData as
|
|
109
|
+
yield { event: eventName, data: eventData as AiModelMessageSchema }
|
|
109
110
|
return
|
|
110
111
|
case 'error':
|
|
111
112
|
yield { event: eventName, data: Exception.fromRawException(eventData, 'Failed to generate results') }
|