@daocloud-proto/skoala 0.21.2-77 → 0.21.2-79
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 +1 -1
- package/api/skoala/v1alpha1/book.pb.ts +0 -100
package/package.json
CHANGED
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
9
|
-
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
-
|
|
11
|
-
export enum Status {
|
|
12
|
-
TAKEDOWN = "TAKEDOWN",
|
|
13
|
-
ONSHELF = "ONSHELF",
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type GetBookReq = {
|
|
17
|
-
uid?: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type GetBookReply = {
|
|
21
|
-
uid?: string
|
|
22
|
-
name?: string
|
|
23
|
-
author?: string
|
|
24
|
-
status?: Status
|
|
25
|
-
isPublished?: boolean
|
|
26
|
-
publishedAt?: GoogleProtobufTimestamp.Timestamp
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type ListBookReq = {
|
|
30
|
-
pageNum?: number
|
|
31
|
-
pageSize?: number
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type ListBookReplyBook = {
|
|
35
|
-
uid?: string
|
|
36
|
-
name?: string
|
|
37
|
-
author?: string
|
|
38
|
-
status?: Status
|
|
39
|
-
isPublished?: boolean
|
|
40
|
-
publishedAt?: GoogleProtobufTimestamp.Timestamp
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type ListBookReply = {
|
|
44
|
-
results?: ListBookReplyBook[]
|
|
45
|
-
totalCount?: number
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export type CreateBookReq = {
|
|
49
|
-
name?: string
|
|
50
|
-
author?: string
|
|
51
|
-
status?: Status
|
|
52
|
-
isPublished?: boolean
|
|
53
|
-
publishedAt?: GoogleProtobufTimestamp.Timestamp
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type CreateBookReply = {
|
|
57
|
-
uid?: string
|
|
58
|
-
name?: string
|
|
59
|
-
author?: string
|
|
60
|
-
status?: Status
|
|
61
|
-
isPublished?: boolean
|
|
62
|
-
publishedAt?: GoogleProtobufTimestamp.Timestamp
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export type UpdateBookReq = {
|
|
66
|
-
uid?: string
|
|
67
|
-
author?: string
|
|
68
|
-
status?: Status
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export type UpdateBookRely = {
|
|
72
|
-
uid?: string
|
|
73
|
-
name?: string
|
|
74
|
-
author?: string
|
|
75
|
-
status?: Status
|
|
76
|
-
isPublished?: boolean
|
|
77
|
-
publishedAt?: GoogleProtobufTimestamp.Timestamp
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export type DeleteBookReq = {
|
|
81
|
-
uid?: string
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export class Book {
|
|
85
|
-
static Get(req: GetBookReq, initReq?: fm.InitReq): Promise<GetBookReply> {
|
|
86
|
-
return fm.fetchReq<GetBookReq, GetBookReply>(`/v1alpha1/books/${req["uid"]}?${fm.renderURLSearchParams(req, ["uid"])}`, {...initReq, method: "GET"})
|
|
87
|
-
}
|
|
88
|
-
static List(req: ListBookReq, initReq?: fm.InitReq): Promise<ListBookReply> {
|
|
89
|
-
return fm.fetchReq<ListBookReq, ListBookReply>(`/v1alpha1/books?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
90
|
-
}
|
|
91
|
-
static Create(req: CreateBookReq, initReq?: fm.InitReq): Promise<CreateBookReply> {
|
|
92
|
-
return fm.fetchReq<CreateBookReq, CreateBookReply>(`/v1alpha1/books`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
93
|
-
}
|
|
94
|
-
static Update(req: UpdateBookReq, initReq?: fm.InitReq): Promise<UpdateBookRely> {
|
|
95
|
-
return fm.fetchReq<UpdateBookReq, UpdateBookRely>(`/v1alpha1/books/${req["uid"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
96
|
-
}
|
|
97
|
-
static Delete(req: DeleteBookReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
98
|
-
return fm.fetchReq<DeleteBookReq, GoogleProtobufEmpty.Empty>(`/v1alpha1/books/${req["uid"]}`, {...initReq, method: "DELETE"})
|
|
99
|
-
}
|
|
100
|
-
}
|