@pushwoosh/rpc-gateway-ai-assistant 0.1.150 → 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 +249 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/pushwoosh_aibuilder_templates_v1.d.ts +150 -0
- package/pushwoosh_aibuilder_templates_v1.js +3 -0
package/data.js
CHANGED
|
@@ -731,6 +731,255 @@ export const data = {
|
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
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
|
+
},
|
|
734
983
|
"pushwoosh.aigen.v1.AiGenService": {
|
|
735
984
|
"type": "S",
|
|
736
985
|
"key": "aiGen",
|
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
|
@@ -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 = {};
|