@pushwoosh/rpc-gateway-ai-assistant 0.1.149 → 0.1.151

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/data.js CHANGED
@@ -198,6 +198,9 @@ export const data = {
198
198
  },
199
199
  "button": {
200
200
  "type": "pushwoosh.aibuilder.v1.ButtonStyles"
201
+ },
202
+ "divider": {
203
+ "type": "pushwoosh.aibuilder.v1.Divider"
201
204
  }
202
205
  }
203
206
  },
@@ -347,6 +350,23 @@ export const data = {
347
350
  }
348
351
  }
349
352
  },
353
+ "pushwoosh.aibuilder.v1.ListItem": {
354
+ "type": "I",
355
+ "fields": {
356
+ "text": {
357
+ "type": "string"
358
+ }
359
+ }
360
+ },
361
+ "pushwoosh.aibuilder.v1.List": {
362
+ "type": "I",
363
+ "fields": {
364
+ "items": {
365
+ "type": "pushwoosh.aibuilder.v1.ListItem",
366
+ "array": true
367
+ }
368
+ }
369
+ },
350
370
  "pushwoosh.aibuilder.v1.ContentItem": {
351
371
  "type": "I",
352
372
  "fields": {
@@ -355,13 +375,17 @@ export const data = {
355
375
  },
356
376
  "buttonGroup": {
357
377
  "type": "pushwoosh.aibuilder.v1.ButtonGroup"
378
+ },
379
+ "list": {
380
+ "type": "pushwoosh.aibuilder.v1.List"
358
381
  }
359
382
  },
360
383
  "oneofs": {
361
384
  "item": {
362
385
  "oneof": [
363
386
  "text",
364
- "buttonGroup"
387
+ "buttonGroup",
388
+ "list"
365
389
  ]
366
390
  }
367
391
  }
@@ -518,6 +542,32 @@ export const data = {
518
542
  }
519
543
  }
520
544
  },
545
+ "pushwoosh.aibuilder.v1.DividerStyle": {
546
+ "type": "E",
547
+ "values": [
548
+ "DIVIDER_STYLE_UNSPECIFIED",
549
+ "DIVIDER_STYLE_SOLID",
550
+ "DIVIDER_STYLE_DASHED",
551
+ "DIVIDER_STYLE_DOTTED"
552
+ ]
553
+ },
554
+ "pushwoosh.aibuilder.v1.Divider": {
555
+ "type": "I",
556
+ "fields": {
557
+ "thickness": {
558
+ "type": "number"
559
+ },
560
+ "color": {
561
+ "type": "string"
562
+ },
563
+ "style": {
564
+ "type": "pushwoosh.aibuilder.v1.DividerStyle"
565
+ },
566
+ "widthPercent": {
567
+ "type": "number"
568
+ }
569
+ }
570
+ },
521
571
  "pushwoosh.aibuilder.v1.AiBuilderBlock": {
522
572
  "type": "I",
523
573
  "fields": {
@@ -539,6 +589,9 @@ export const data = {
539
589
  "placeholder": {
540
590
  "type": "pushwoosh.aibuilder.v1.Placeholder"
541
591
  },
592
+ "divider": {
593
+ "type": "pushwoosh.aibuilder.v1.Divider"
594
+ },
542
595
  "styles": {
543
596
  "type": "pushwoosh.aibuilder.v1.BlockStyles",
544
597
  "optional": true
@@ -554,7 +607,8 @@ export const data = {
554
607
  "columns",
555
608
  "content",
556
609
  "group",
557
- "placeholder"
610
+ "placeholder",
611
+ "divider"
558
612
  ]
559
613
  }
560
614
  }
@@ -677,6 +731,255 @@ export const data = {
677
731
  }
678
732
  }
679
733
  },
734
+ "pushwoosh.aibuilder.templates.v1.AiBuilderTemplatesService": {
735
+ "type": "S",
736
+ "key": "aiBuilderTemplates",
737
+ "methods": {
738
+ "List": {
739
+ "request": "pushwoosh.aibuilder.templates.v1.ListRequest",
740
+ "response": "pushwoosh.aibuilder.templates.v1.ListResponse",
741
+ "method": "get",
742
+ "path": "/api/v1/applications/{application}/ai_builder_templates"
743
+ },
744
+ "Get": {
745
+ "request": "pushwoosh.aibuilder.templates.v1.GetRequest",
746
+ "response": "pushwoosh.aibuilder.templates.v1.GetResponse",
747
+ "method": "get",
748
+ "path": "/api/v1/applications/{application}/ai_builder_templates/{code}"
749
+ },
750
+ "Create": {
751
+ "request": "pushwoosh.aibuilder.templates.v1.CreateRequest",
752
+ "response": "pushwoosh.aibuilder.templates.v1.CreateResponse",
753
+ "method": "post",
754
+ "path": "/api/v1/applications/{application}/ai_builder_templates"
755
+ },
756
+ "Update": {
757
+ "request": "pushwoosh.aibuilder.templates.v1.UpdateRequest",
758
+ "response": "pushwoosh.aibuilder.templates.v1.UpdateResponse",
759
+ "method": "put",
760
+ "path": "/api/v1/applications/{application}/ai_builder_templates/{code}"
761
+ },
762
+ "Delete": {
763
+ "request": "pushwoosh.aibuilder.templates.v1.DeleteRequest",
764
+ "response": "pushwoosh.aibuilder.templates.v1.DeleteResponse",
765
+ "method": "delete",
766
+ "path": "/api/v1/applications/{application}/ai_builder_templates/{code}"
767
+ }
768
+ }
769
+ },
770
+ "pushwoosh.aibuilder.templates.v1.AiBuilderTemplate": {
771
+ "type": "I",
772
+ "fields": {
773
+ "code": {
774
+ "type": "string"
775
+ },
776
+ "name": {
777
+ "type": "string"
778
+ },
779
+ "description": {
780
+ "type": "string",
781
+ "optional": true
782
+ },
783
+ "template": {
784
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
785
+ },
786
+ "categories": {
787
+ "type": "string",
788
+ "array": true
789
+ },
790
+ "createdAt": {
791
+ "type": "Date"
792
+ },
793
+ "updatedAt": {
794
+ "type": "Date"
795
+ }
796
+ }
797
+ },
798
+ "pushwoosh.aibuilder.templates.v1.ListRequest.OrderBy": {
799
+ "type": "E",
800
+ "values": [
801
+ "UPDATED",
802
+ "NAME",
803
+ "CREATED"
804
+ ]
805
+ },
806
+ "pushwoosh.aibuilder.templates.v1.ListRequest.OrderDirection": {
807
+ "type": "E",
808
+ "values": [
809
+ "DESC",
810
+ "ASC"
811
+ ]
812
+ },
813
+ "pushwoosh.aibuilder.templates.v1.ListRequest": {
814
+ "type": "I",
815
+ "fields": {
816
+ "application": {
817
+ "type": "string"
818
+ },
819
+ "search": {
820
+ "type": "string"
821
+ },
822
+ "category": {
823
+ "type": "string",
824
+ "optional": true
825
+ },
826
+ "orderBy": {
827
+ "type": "pushwoosh.aibuilder.templates.v1.ListRequest.OrderBy"
828
+ },
829
+ "orderDirection": {
830
+ "type": "pushwoosh.aibuilder.templates.v1.ListRequest.OrderDirection"
831
+ },
832
+ "page": {
833
+ "type": "number"
834
+ },
835
+ "perPage": {
836
+ "type": "number"
837
+ }
838
+ }
839
+ },
840
+ "pushwoosh.aibuilder.templates.v1.ListResponse.ListItem": {
841
+ "type": "I",
842
+ "fields": {
843
+ "code": {
844
+ "type": "string"
845
+ },
846
+ "name": {
847
+ "type": "string"
848
+ },
849
+ "description": {
850
+ "type": "string",
851
+ "optional": true
852
+ },
853
+ "categories": {
854
+ "type": "string",
855
+ "array": true
856
+ },
857
+ "createdAt": {
858
+ "type": "Date"
859
+ },
860
+ "updatedAt": {
861
+ "type": "Date"
862
+ }
863
+ }
864
+ },
865
+ "pushwoosh.aibuilder.templates.v1.ListResponse": {
866
+ "type": "I",
867
+ "fields": {
868
+ "items": {
869
+ "type": "pushwoosh.aibuilder.templates.v1.ListResponse.ListItem",
870
+ "array": true
871
+ },
872
+ "page": {
873
+ "type": "number"
874
+ },
875
+ "perPage": {
876
+ "type": "number"
877
+ },
878
+ "totalPages": {
879
+ "type": "number"
880
+ },
881
+ "total": {
882
+ "type": "number"
883
+ }
884
+ }
885
+ },
886
+ "pushwoosh.aibuilder.templates.v1.GetRequest": {
887
+ "type": "I",
888
+ "fields": {
889
+ "application": {
890
+ "type": "string"
891
+ },
892
+ "code": {
893
+ "type": "string"
894
+ }
895
+ }
896
+ },
897
+ "pushwoosh.aibuilder.templates.v1.GetResponse": {
898
+ "type": "I",
899
+ "fields": {
900
+ "item": {
901
+ "type": "pushwoosh.aibuilder.templates.v1.AiBuilderTemplate"
902
+ }
903
+ }
904
+ },
905
+ "pushwoosh.aibuilder.templates.v1.CreateRequest": {
906
+ "type": "I",
907
+ "fields": {
908
+ "application": {
909
+ "type": "string"
910
+ },
911
+ "name": {
912
+ "type": "string"
913
+ },
914
+ "description": {
915
+ "type": "string",
916
+ "optional": true
917
+ },
918
+ "template": {
919
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
920
+ },
921
+ "categories": {
922
+ "type": "string",
923
+ "array": true
924
+ }
925
+ }
926
+ },
927
+ "pushwoosh.aibuilder.templates.v1.CreateResponse": {
928
+ "type": "I",
929
+ "fields": {
930
+ "code": {
931
+ "type": "string"
932
+ }
933
+ }
934
+ },
935
+ "pushwoosh.aibuilder.templates.v1.UpdateRequest": {
936
+ "type": "I",
937
+ "fields": {
938
+ "application": {
939
+ "type": "string"
940
+ },
941
+ "code": {
942
+ "type": "string"
943
+ },
944
+ "name": {
945
+ "type": "string",
946
+ "optional": true
947
+ },
948
+ "description": {
949
+ "type": "string",
950
+ "optional": true
951
+ },
952
+ "template": {
953
+ "type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
954
+ },
955
+ "updateCategories": {
956
+ "type": "boolean"
957
+ },
958
+ "categories": {
959
+ "type": "string",
960
+ "array": true
961
+ }
962
+ }
963
+ },
964
+ "pushwoosh.aibuilder.templates.v1.UpdateResponse": {
965
+ "type": "I",
966
+ "fields": {}
967
+ },
968
+ "pushwoosh.aibuilder.templates.v1.DeleteRequest": {
969
+ "type": "I",
970
+ "fields": {
971
+ "application": {
972
+ "type": "string"
973
+ },
974
+ "code": {
975
+ "type": "string"
976
+ }
977
+ }
978
+ },
979
+ "pushwoosh.aibuilder.templates.v1.DeleteResponse": {
980
+ "type": "I",
981
+ "fields": {}
982
+ },
680
983
  "pushwoosh.aigen.v1.AiGenService": {
681
984
  "type": "S",
682
985
  "key": "aiGen",
@@ -698,7 +1001,8 @@ export const data = {
698
1001
  "AI_GEN_BLOCK_TYPE_HINT_COLUMNS",
699
1002
  "AI_GEN_BLOCK_TYPE_HINT_CONTENT",
700
1003
  "AI_GEN_BLOCK_TYPE_HINT_GROUP",
701
- "AI_GEN_BLOCK_TYPE_HINT_PLACEHOLDER"
1004
+ "AI_GEN_BLOCK_TYPE_HINT_PLACEHOLDER",
1005
+ "AI_GEN_BLOCK_TYPE_HINT_DIVIDER"
702
1006
  ]
703
1007
  },
704
1008
  "pushwoosh.aigen.v1.AiGenMode": {
package/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
+ import { AiBuilderTemplatesService as pushwoosh_aibuilder_templates_v1_AiBuilderTemplatesService } from './pushwoosh_aibuilder_templates_v1';
1
2
  import { AiGenService as pushwoosh_aigen_v1_AiGenService } from './pushwoosh_aigen_v1';
2
3
  import { AssistantService as pushwoosh_accounts_assistant_v1_AssistantService } from './pushwoosh_accounts_assistant_v1';
3
4
  export type API = {
5
+ aiBuilderTemplates: pushwoosh_aibuilder_templates_v1_AiBuilderTemplatesService;
4
6
  aiGen: pushwoosh_aigen_v1_AiGenService;
5
7
  assistant: pushwoosh_accounts_assistant_v1_AssistantService;
6
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.149",
3
+ "version": "0.1.151",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -0,0 +1,150 @@
1
+ import { RpcMethod } from './commonTypes';
2
+ import { AiBuilderDocument as pushwoosh_aibuilder_v1_AiBuilderDocument } from './pushwoosh_aibuilder_v1';
3
+ export type AiBuilderTemplatesService_List = RpcMethod<ListRequest, ListResponse>;
4
+ export type AiBuilderTemplatesService_Get = RpcMethod<GetRequest, GetResponse>;
5
+ export type AiBuilderTemplatesService_Create = RpcMethod<CreateRequest, CreateResponse>;
6
+ export type AiBuilderTemplatesService_Update = RpcMethod<UpdateRequest, UpdateResponse>;
7
+ export type AiBuilderTemplatesService_Delete = RpcMethod<DeleteRequest, DeleteResponse>;
8
+ /**
9
+ * AiBuilderTemplatesService is the CRUD surface for saved AI Builder
10
+ * templates. A template is a named, reusable AiBuilderDocument scoped to an
11
+ * application, optionally tagged with free-form categories.
12
+ *
13
+ * Addressing: templates are addressed by their string `code` only. The
14
+ * numeric primary key never crosses the wire. `code` is generated by the
15
+ * server on Create and returned in the response.
16
+ *
17
+ * Categories live in a separate table (one row per category string) and are
18
+ * surfaced here as a flat repeated string on the template. They are scoped to
19
+ * the application.
20
+ */
21
+ export interface AiBuilderTemplatesService {
22
+ /**
23
+ * List templates for an application, with search, category filter, sorting
24
+ * and pagination.
25
+ */
26
+ List: AiBuilderTemplatesService_List;
27
+ /** Get a single template by code. */
28
+ Get: AiBuilderTemplatesService_Get;
29
+ /** Create a new template. The server generates and returns its code. */
30
+ Create: AiBuilderTemplatesService_Create;
31
+ /** Update an existing template (PATCH semantics on scalar fields). */
32
+ Update: AiBuilderTemplatesService_Update;
33
+ /** Delete a template (also removes its category rows). */
34
+ Delete: AiBuilderTemplatesService_Delete;
35
+ }
36
+ /** AiBuilderTemplate is the full template as returned by Get. */
37
+ export type AiBuilderTemplate = {
38
+ /** Server-generated stable identifier. The numeric DB id is never exposed. */
39
+ code: string;
40
+ /** Human-readable name, unique within the application. */
41
+ name: string;
42
+ /** Optional free-form description. */
43
+ description?: string;
44
+ /** The template document itself. */
45
+ template: pushwoosh_aibuilder_v1_AiBuilderDocument;
46
+ /** Category tags attached to this template. Order is not significant. */
47
+ categories: string[];
48
+ /** Creation timestamp. */
49
+ createdAt: Date;
50
+ /** Last update timestamp. */
51
+ updatedAt: Date;
52
+ };
53
+ export type ListRequest_OrderBy = 'UPDATED' | 'NAME' | 'CREATED';
54
+ export type ListRequest_OrderDirection = 'DESC' | 'ASC';
55
+ export type ListRequest = {
56
+ /** Application code the templates belong to. */
57
+ application: string;
58
+ /** Search query, matched against name and code. */
59
+ search: string;
60
+ /** Optional category filter: only templates tagged with this category. */
61
+ category?: string;
62
+ /** Field to order results by. */
63
+ orderBy: ListRequest_OrderBy;
64
+ /** Order direction. */
65
+ orderDirection: ListRequest_OrderDirection;
66
+ /** Page number. Pagination starts from 0. */
67
+ page: number;
68
+ /** Number of items per page. */
69
+ perPage: number;
70
+ };
71
+ /**
72
+ * ListItem is a lightweight projection of a template for list views. The
73
+ * full template document is intentionally omitted; fetch it with Get.
74
+ */
75
+ export type ListResponse_ListItem = {
76
+ code: string;
77
+ name: string;
78
+ description?: string;
79
+ categories: string[];
80
+ createdAt: Date;
81
+ updatedAt: Date;
82
+ };
83
+ export type ListResponse = {
84
+ /** Templates for the current page. */
85
+ items: ListResponse_ListItem[];
86
+ /** Current page number. Pagination starts from 0. */
87
+ page: number;
88
+ /** Number of items per page. */
89
+ perPage: number;
90
+ /** Total number of pages. */
91
+ totalPages: number;
92
+ /** Total number of items across all pages. */
93
+ total: number;
94
+ };
95
+ export type GetRequest = {
96
+ /** Application code the template belongs to. */
97
+ application: string;
98
+ /** Template code. */
99
+ code: string;
100
+ };
101
+ export type GetResponse = {
102
+ item: AiBuilderTemplate;
103
+ };
104
+ export type CreateRequest = {
105
+ /** Application code the template will belong to. */
106
+ application: string;
107
+ /** Human-readable name, unique within the application. */
108
+ name: string;
109
+ /** Optional free-form description. */
110
+ description?: string;
111
+ /** The template document. */
112
+ template: pushwoosh_aibuilder_v1_AiBuilderDocument;
113
+ /** Category tags to attach. May be empty. */
114
+ categories: string[];
115
+ };
116
+ export type CreateResponse = {
117
+ /** Server-generated code of the created template. */
118
+ code: string;
119
+ };
120
+ export type UpdateRequest = {
121
+ /** Application code the template belongs to. */
122
+ application: string;
123
+ /** Code of the template to update. */
124
+ code: string;
125
+ /** New name. Only applied when set. */
126
+ name?: string;
127
+ /** New description. Only applied when set. */
128
+ description?: string;
129
+ /** New template document. Only applied when set (message presence). */
130
+ template: pushwoosh_aibuilder_v1_AiBuilderDocument;
131
+ /**
132
+ * Controls how categories is applied (PATCH semantics):
133
+ * - true → replace categories with the provided list
134
+ * (an empty list clears all categories).
135
+ * - false → leave categories untouched.
136
+ * Required because proto3 cannot distinguish an unset repeated field from
137
+ * one explicitly set to an empty list.
138
+ */
139
+ updateCategories: boolean;
140
+ /** New category tags. Only applied when update_categories is true. */
141
+ categories: string[];
142
+ };
143
+ export type UpdateResponse = {};
144
+ export type DeleteRequest = {
145
+ /** Application code the template belongs to. */
146
+ application: string;
147
+ /** Code of the template to delete. */
148
+ code: string;
149
+ };
150
+ export type DeleteResponse = {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};
@@ -221,6 +221,12 @@ export type DefaultStyles = {
221
221
  card: CardStyles;
222
222
  buttonGroup: ButtonGroupStyles;
223
223
  button: ButtonStyles;
224
+ /**
225
+ * Document-level default divider line config. Per-divider fields override
226
+ * these; unset here falls back to the renderer defaults (1px, scheme
227
+ * border, solid, 100%).
228
+ */
229
+ divider: Divider;
224
230
  };
225
231
  export type DocumentSettings = {
226
232
  width: number;
@@ -316,6 +322,22 @@ export type ButtonGroupStyles = {
316
322
  backgroundColor?: string;
317
323
  gap?: number;
318
324
  };
325
+ /**
326
+ * ListItem is one entry of a List. `text` carries the same inline-HTML
327
+ * subset as TextBlock.text (sanitised on render) so list entries can hold
328
+ * links / emphasis.
329
+ */
330
+ export type ListItem = {
331
+ text: string;
332
+ };
333
+ /**
334
+ * List is a simple list of short entries — features, benefits, steps,
335
+ * FAQ-style runs. Rendered as a <ul>; ordered/unordered is a styling concern
336
+ * (CSS), not modelled here.
337
+ */
338
+ export type List = {
339
+ items: ListItem[];
340
+ };
319
341
  export type ContentItem_item_text = {
320
342
  type: 'text';
321
343
  data: TextBlock;
@@ -324,7 +346,11 @@ export type ContentItem_item_buttonGroup = {
324
346
  type: 'buttonGroup';
325
347
  data: ButtonGroup;
326
348
  };
327
- export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup;
349
+ export type ContentItem_item_list = {
350
+ type: 'list';
351
+ data: List;
352
+ };
353
+ export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup | ContentItem_item_list;
328
354
  export type ContentItem = {
329
355
  item: ContentItem_item;
330
356
  };
@@ -455,6 +481,20 @@ export type Placeholder = {
455
481
  */
456
482
  prompt?: string;
457
483
  };
484
+ /** Line style for a Divider. UNSPECIFIED renders as solid. */
485
+ export type DividerStyle = 'DIVIDER_STYLE_UNSPECIFIED' | 'DIVIDER_STYLE_SOLID' | 'DIVIDER_STYLE_DASHED' | 'DIVIDER_STYLE_DOTTED';
486
+ /**
487
+ * Divider is a horizontal separator line between sections. It carries no copy
488
+ * — only line config. All fields are optional with sensible render defaults:
489
+ * thickness 0 → 1px, empty color → the scheme border colour, style
490
+ * UNSPECIFIED → solid, width_percent 0 → 100.
491
+ */
492
+ export type Divider = {
493
+ thickness: number;
494
+ color: string;
495
+ style: DividerStyle;
496
+ widthPercent: number;
497
+ };
458
498
  export type AiBuilderBlock_block_card = {
459
499
  type: 'card';
460
500
  data: AiBuilderCard;
@@ -475,7 +515,11 @@ export type AiBuilderBlock_block_placeholder = {
475
515
  type: 'placeholder';
476
516
  data: Placeholder;
477
517
  };
478
- export type AiBuilderBlock_block = AiBuilderBlock_block_card | AiBuilderBlock_block_columns | AiBuilderBlock_block_content | AiBuilderBlock_block_group | AiBuilderBlock_block_placeholder;
518
+ export type AiBuilderBlock_block_divider = {
519
+ type: 'divider';
520
+ data: Divider;
521
+ };
522
+ export type AiBuilderBlock_block = AiBuilderBlock_block_card | AiBuilderBlock_block_columns | AiBuilderBlock_block_content | AiBuilderBlock_block_group | AiBuilderBlock_block_placeholder | AiBuilderBlock_block_divider;
479
523
  export type AiBuilderBlock = {
480
524
  id: string;
481
525
  styles?: BlockStyles;
@@ -44,7 +44,13 @@ export type AiGenBlockTypeHint = 'AI_GEN_BLOCK_TYPE_HINT_UNSPECIFIED' | 'AI_GEN_
44
44
  * sees in <current_document> and the pipeline retargets the replace
45
45
  * to a real content kind before invoking the block generator.
46
46
  */
47
- | 'AI_GEN_BLOCK_TYPE_HINT_PLACEHOLDER';
47
+ | 'AI_GEN_BLOCK_TYPE_HINT_PLACEHOLDER'
48
+ /**
49
+ * Horizontal separator line between sections. The block generator is
50
+ * skipped — a divider carries no copy, only line config — so the
51
+ * pipeline synthesises a default Divider for it.
52
+ */
53
+ | 'AI_GEN_BLOCK_TYPE_HINT_DIVIDER';
48
54
  /**
49
55
  * AiGenMode selects the document-domain profile the generation pipeline
50
56
  * runs under: which block kinds are allowed, which Meta fields are