@pushwoosh/rpc-gateway-ai-assistant 0.1.205 → 0.1.208

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/commonTypes.d.ts CHANGED
@@ -1,4 +1,12 @@
1
1
  export type Duration = number;
2
+ /** Arbitrary JSON value (google.protobuf.Value). */
3
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
4
+ [key: string]: JsonValue;
5
+ };
6
+ /** Arbitrary JSON object (google.protobuf.Struct). */
7
+ export type JsonObject = {
8
+ [key: string]: JsonValue;
9
+ };
2
10
  export type RpcMethod<Req, Res> = ((request: Req) => Promise<Res>) & {
3
11
  safe(request: Req): Promise<[{
4
12
  error: unknown;
package/data.js CHANGED
@@ -1581,10 +1581,10 @@ export const data = {
1581
1581
  "type": "I",
1582
1582
  "fields": {
1583
1583
  "editorConfig": {
1584
- "type": "object"
1584
+ "type": "JsonObject"
1585
1585
  },
1586
1586
  "localizationData": {
1587
- "type": "object"
1587
+ "type": "JsonObject"
1588
1588
  },
1589
1589
  "language": {
1590
1590
  "type": "string"
@@ -1862,9 +1862,21 @@ export const data = {
1862
1862
  "STREAM_EVENT_TOOL_USE_RESULT",
1863
1863
  "STREAM_EVENT_TOOL_USE_DELTA",
1864
1864
  "STREAM_EVENT_THINKING_DELTA",
1865
- "STREAM_EVENT_SUGGESTED_ACTIONS"
1865
+ "STREAM_EVENT_SUGGESTED_ACTIONS",
1866
+ "STREAM_EVENT_RELOAD_VIEW"
1866
1867
  ]
1867
1868
  },
1869
+ "pushwoosh.accounts.assistant.v1.ReloadView": {
1870
+ "type": "I",
1871
+ "fields": {
1872
+ "entity": {
1873
+ "type": "string"
1874
+ },
1875
+ "code": {
1876
+ "type": "string"
1877
+ }
1878
+ }
1879
+ },
1868
1880
  "pushwoosh.accounts.assistant.v1.ToolInfo": {
1869
1881
  "type": "I",
1870
1882
  "fields": {
@@ -1926,6 +1938,9 @@ export const data = {
1926
1938
  "actions": {
1927
1939
  "type": "pushwoosh.accounts.assistant.v1.SuggestedAction",
1928
1940
  "array": true
1941
+ },
1942
+ "reloadView": {
1943
+ "type": "pushwoosh.accounts.assistant.v1.ReloadView"
1929
1944
  }
1930
1945
  }
1931
1946
  },
@@ -2315,7 +2330,7 @@ export const data = {
2315
2330
  "optional": true
2316
2331
  },
2317
2332
  "template": {
2318
- "type": "object"
2333
+ "type": "JsonObject"
2319
2334
  },
2320
2335
  "categories": {
2321
2336
  "type": "string",
@@ -2450,7 +2465,7 @@ export const data = {
2450
2465
  "optional": true
2451
2466
  },
2452
2467
  "template": {
2453
- "type": "object"
2468
+ "type": "JsonObject"
2454
2469
  },
2455
2470
  "categories": {
2456
2471
  "type": "string",
@@ -2484,7 +2499,7 @@ export const data = {
2484
2499
  "optional": true
2485
2500
  },
2486
2501
  "template": {
2487
- "type": "object"
2502
+ "type": "JsonObject"
2488
2503
  },
2489
2504
  "updateCategories": {
2490
2505
  "type": "boolean"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.205",
3
+ "version": "0.1.208",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -149,7 +149,20 @@ export type StreamEventType = 'STREAM_EVENT_UNSPECIFIED' | 'STREAM_EVENT_MESSAGE
149
149
  /** Chain of Thoughts thinking content */
150
150
  | 'STREAM_EVENT_THINKING_DELTA'
151
151
  /** Model-proposed follow-up actions for the user */
152
- | 'STREAM_EVENT_SUGGESTED_ACTIONS';
152
+ | 'STREAM_EVENT_SUGGESTED_ACTIONS'
153
+ /** An assistant tool call mutated data an open view may be showing — reload it. See ReloadView. */
154
+ | 'STREAM_EVENT_RELOAD_VIEW';
155
+ /**
156
+ * ReloadView tells the frontend that a tool call mutated data, so an open
157
+ * view showing it should re-fetch (views listen for a "reload-view" event on
158
+ * spaContext.eventBus; currently only web popup pages do).
159
+ * entity: "form-web-popup" | "form-web-popups-content" | "list-web-popups".
160
+ * code is the entity code for form-* views, empty for list-* views.
161
+ */
162
+ export type ReloadView = {
163
+ entity: string;
164
+ code: string;
165
+ };
153
166
  /** Tool information for tool use events */
154
167
  export type ToolInfo = {
155
168
  name: string;
@@ -175,6 +188,8 @@ export type InferenceResponse = {
175
188
  usage: UsageInfo;
176
189
  /** Set on STREAM_EVENT_SUGGESTED_ACTIONS */
177
190
  actions: SuggestedAction[];
191
+ /** Set on STREAM_EVENT_RELOAD_VIEW */
192
+ reloadView: ReloadView;
178
193
  };
179
194
  export type GetConsentRequest = {
180
195
  application: string;
@@ -1,4 +1,4 @@
1
- import { RpcMethod } from './commonTypes';
1
+ import { RpcMethod, JsonObject } from './commonTypes';
2
2
  import { AiBuilderDocument as pushwoosh_aibuilder_v1_AiBuilderDocument } from './pushwoosh_aibuilder_v1';
3
3
  import { DocumentSettings as pushwoosh_aibuilder_v1_DocumentSettings } from './pushwoosh_aibuilder_v1';
4
4
  import { TextVariantStyle as pushwoosh_aibuilder_v1_TextVariantStyle } from './pushwoosh_aibuilder_v1';
@@ -561,7 +561,7 @@ export type AiGenConvertUnlayerRequest = {
561
561
  * The Unlayer design JSON (EmailContent.Unlayer.editor_config): the
562
562
  * object carrying body.rows[].columns[].contents[]. Required.
563
563
  */
564
- editorConfig: object;
564
+ editorConfig: JsonObject;
565
565
  /**
566
566
  * Unlayer localization placeholders. Accepts either the per-language
567
567
  * map {"<lang>": {"<path>": "<value>"}} stored alongside the design in
@@ -570,7 +570,7 @@ export type AiGenConvertUnlayerRequest = {
570
570
  * {{path|type|fallback}} tokens during conversion. Optional — without
571
571
  * it tokens resolve to their inline fallbacks.
572
572
  */
573
- localizationData: object;
573
+ localizationData: JsonObject;
574
574
  /**
575
575
  * Language key to resolve localized values with when localization_data
576
576
  * is per-language. Empty → "default", falling back to the first
@@ -1,4 +1,4 @@
1
- import { RpcMethod } from './commonTypes';
1
+ import { RpcMethod, JsonObject } from './commonTypes';
2
2
  export type TemplatesService_List = RpcMethod<ListRequest, ListResponse>;
3
3
  export type TemplatesService_Get = RpcMethod<GetRequest, GetResponse>;
4
4
  export type TemplatesService_Create = RpcMethod<CreateRequest, CreateResponse>;
@@ -46,7 +46,7 @@ export type Template = {
46
46
  * The template document itself: any valid JSON object, opaque to this
47
47
  * service.
48
48
  */
49
- template: object;
49
+ template: JsonObject;
50
50
  /** Category tags attached to this template. Order is not significant. */
51
51
  categories: string[];
52
52
  /** Creation timestamp. */
@@ -113,7 +113,7 @@ export type CreateRequest = {
113
113
  /** Optional free-form description. */
114
114
  description?: string;
115
115
  /** The template document: any valid JSON object. */
116
- template: object;
116
+ template: JsonObject;
117
117
  /** Category tags to attach. May be empty. */
118
118
  categories: string[];
119
119
  };
@@ -134,7 +134,7 @@ export type UpdateRequest = {
134
134
  * New template document (any valid JSON object). Only applied when set
135
135
  * (message presence).
136
136
  */
137
- template: object;
137
+ template: JsonObject;
138
138
  /**
139
139
  * Controls how categories is applied (PATCH semantics):
140
140
  * - true → replace categories with the provided list