@daocloud-proto/ghippo 0.5.1 → 0.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version": "0.5.1",
3
+ "version":"0.5.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -0,0 +1,65 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../fetch.pb"
8
+ export type ListMessagesRequest = {
9
+ isCount?: boolean
10
+ search?: string
11
+ read?: string
12
+ offset?: number
13
+ size?: number
14
+ }
15
+
16
+ export type ListMessagesResponse = {
17
+ total?: string
18
+ messages?: MessageInfo[]
19
+ }
20
+
21
+ export type MessageInfo = {
22
+ id?: number
23
+ type?: string
24
+ subject?: string
25
+ message?: string
26
+ read?: string
27
+ create_at?: string
28
+ }
29
+
30
+ export type GetMessageRequest = {
31
+ id?: number
32
+ }
33
+
34
+ export type GetMessageResponse = {
35
+ message?: MessageInfo
36
+ }
37
+
38
+ export type DeleteMessagesRequest = {
39
+ ids?: number[]
40
+ }
41
+
42
+ export type DeleteMessagesResponse = {
43
+ }
44
+
45
+ export type SetReadMessagesRequest = {
46
+ ids?: number[]
47
+ }
48
+
49
+ export type SetReadMessagesResponse = {
50
+ }
51
+
52
+ export class Message {
53
+ static ListMessages(req: ListMessagesRequest, initReq?: fm.InitReq): Promise<ListMessagesResponse> {
54
+ return fm.fetchReq<ListMessagesRequest, ListMessagesResponse>(`/apis/ghippo.io/v1alpha1/messages?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
55
+ }
56
+ static GetMessage(req: GetMessageRequest, initReq?: fm.InitReq): Promise<GetMessageResponse> {
57
+ return fm.fetchReq<GetMessageRequest, GetMessageResponse>(`/apis/ghippo.io/v1alpha1/messages/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
58
+ }
59
+ static DeleteMessages(req: DeleteMessagesRequest, initReq?: fm.InitReq): Promise<DeleteMessagesResponse> {
60
+ return fm.fetchReq<DeleteMessagesRequest, DeleteMessagesResponse>(`/apis/ghippo.io/v1alpha1/messages`, {...initReq, method: "DELETE"})
61
+ }
62
+ static SetReadMessages(req: SetReadMessagesRequest, initReq?: fm.InitReq): Promise<SetReadMessagesResponse> {
63
+ return fm.fetchReq<SetReadMessagesRequest, SetReadMessagesResponse>(`/apis/ghippo.io/v1alpha1/messages`, {...initReq, method: "PUT"})
64
+ }
65
+ }
@@ -0,0 +1,23 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../fetch.pb"
8
+ export type PublishMessageRequest = {
9
+ user_id?: string
10
+ type?: string
11
+ subject?: string
12
+ message?: string
13
+ message_uid?: string
14
+ }
15
+
16
+ export type PublishMessageResponse = {
17
+ }
18
+
19
+ export class Publish {
20
+ static PublishMessage(req: PublishMessageRequest, initReq?: fm.InitReq): Promise<PublishMessageResponse> {
21
+ return fm.fetchReq<PublishMessageRequest, PublishMessageResponse>(`/apis/ghippo.io/v1alpha1/publish/messages`, {...initReq, method: "POST", body: JSON.stringify(req)})
22
+ }
23
+ }