@daocloud-proto/ghippo 0.45.0-rc4 → 0.45.0-rc6
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/v1alpha1/webhook.pb.ts +62 -47
package/package.json
CHANGED
package/v1alpha1/webhook.pb.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
8
|
import * as GoogleProtobufStruct from "../google/protobuf/struct.pb"
|
|
9
|
+
import * as GoogleProtobufWrappers from "../google/protobuf/wrappers.pb"
|
|
9
10
|
|
|
10
11
|
export enum ResourceType {
|
|
11
12
|
resource_type_user = "resource_type_user",
|
|
@@ -47,18 +48,6 @@ export type WebhookEndpointConnectivityTestRequest = {
|
|
|
47
48
|
export type WebhookEndpointConnectivityTestResponse = {
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
export type ListWebhooksEndpointRequest = {
|
|
51
|
-
domain?: string
|
|
52
|
-
url?: string
|
|
53
|
-
pageSize?: number
|
|
54
|
-
page?: number
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type ListWebhooksEndpointResponse = {
|
|
58
|
-
items?: WebhookEndpointInfo[]
|
|
59
|
-
pagination?: Pagination
|
|
60
|
-
}
|
|
61
|
-
|
|
62
51
|
export type GproductWebhookEvents = {
|
|
63
52
|
name?: string
|
|
64
53
|
localizedName?: string
|
|
@@ -100,7 +89,7 @@ export type PublishWebhookEventRequest = {
|
|
|
100
89
|
export type PublishWebhookEventResponse = {
|
|
101
90
|
}
|
|
102
91
|
|
|
103
|
-
export type
|
|
92
|
+
export type WebhookEndpointEvent = {
|
|
104
93
|
id?: number
|
|
105
94
|
name?: string
|
|
106
95
|
domain?: string
|
|
@@ -113,6 +102,16 @@ export type WebhookEndpointInfo = {
|
|
|
113
102
|
updatedAt?: string
|
|
114
103
|
}
|
|
115
104
|
|
|
105
|
+
export type WebhookEndpointInfo = {
|
|
106
|
+
id?: number
|
|
107
|
+
name?: string
|
|
108
|
+
domain?: string
|
|
109
|
+
enabled?: boolean
|
|
110
|
+
endpoint?: string
|
|
111
|
+
createdAt?: string
|
|
112
|
+
updatedAt?: string
|
|
113
|
+
}
|
|
114
|
+
|
|
116
115
|
export type WebhookEndpointMethodConfig = {
|
|
117
116
|
method?: Method
|
|
118
117
|
headers?: string
|
|
@@ -138,23 +137,32 @@ export type CreateWebhookEndpointRequest = {
|
|
|
138
137
|
domain?: string
|
|
139
138
|
url?: string
|
|
140
139
|
gproducts?: WebhookEndpointGproductConfig[]
|
|
141
|
-
|
|
140
|
+
enabled?: boolean
|
|
142
141
|
}
|
|
143
142
|
|
|
144
143
|
export type CreateWebhookEndpointResponse = {
|
|
144
|
+
id?: string
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
export type
|
|
147
|
+
export type ListWebhookEndpointEventsRequest = {
|
|
148
148
|
id?: number
|
|
149
|
+
eventName?: string
|
|
150
|
+
gproduct?: string
|
|
151
|
+
objectName?: string
|
|
152
|
+
pageSize?: number
|
|
153
|
+
page?: number
|
|
149
154
|
}
|
|
150
155
|
|
|
151
|
-
export type
|
|
152
|
-
|
|
156
|
+
export type ListWebhookEndpointEventsResponse = {
|
|
157
|
+
items?: WebhookEndpointEventInfo[]
|
|
158
|
+
pagination?: Pagination
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
export type ListWebhookEndpointsRequest = {
|
|
156
162
|
domain?: string
|
|
157
163
|
url?: string
|
|
164
|
+
name?: string
|
|
165
|
+
enabled?: GoogleProtobufWrappers.BoolValue
|
|
158
166
|
pageSize?: number
|
|
159
167
|
page?: number
|
|
160
168
|
}
|
|
@@ -168,11 +176,9 @@ export type UpdateWebhookEndpointRequest = {
|
|
|
168
176
|
id?: number
|
|
169
177
|
name?: string
|
|
170
178
|
domain?: string
|
|
171
|
-
resourceType?: string
|
|
172
|
-
action?: string
|
|
173
179
|
url?: string
|
|
174
|
-
|
|
175
|
-
|
|
180
|
+
gproducts?: WebhookEndpointGproductConfig[]
|
|
181
|
+
enabled?: boolean
|
|
176
182
|
}
|
|
177
183
|
|
|
178
184
|
export type UpdateWebhookEndpointResponse = {
|
|
@@ -185,18 +191,13 @@ export type DeleteWebhookEndpointRequest = {
|
|
|
185
191
|
export type DeleteWebhookEndpointResponse = {
|
|
186
192
|
}
|
|
187
193
|
|
|
188
|
-
export type
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
action?: Action
|
|
194
|
-
url?: string
|
|
195
|
-
method?: Method
|
|
194
|
+
export type WebhookEndpointEventInfo = {
|
|
195
|
+
eventName?: string
|
|
196
|
+
objectName?: string
|
|
197
|
+
gproduct?: string
|
|
198
|
+
method?: string
|
|
196
199
|
headers?: string
|
|
197
|
-
|
|
198
|
-
createdAt?: string
|
|
199
|
-
updatedAt?: string
|
|
200
|
+
body?: string
|
|
200
201
|
}
|
|
201
202
|
|
|
202
203
|
export type Pagination = {
|
|
@@ -227,6 +228,20 @@ export type GetWebhookResponse = {
|
|
|
227
228
|
webhookInfo?: WebhookInfo
|
|
228
229
|
}
|
|
229
230
|
|
|
231
|
+
export type WebhookInfo = {
|
|
232
|
+
id?: number
|
|
233
|
+
name?: string
|
|
234
|
+
clientId?: string
|
|
235
|
+
resourceType?: ResourceType
|
|
236
|
+
action?: Action
|
|
237
|
+
url?: string
|
|
238
|
+
method?: Method
|
|
239
|
+
headers?: string
|
|
240
|
+
requestParameter?: string
|
|
241
|
+
createdAt?: string
|
|
242
|
+
updatedAt?: string
|
|
243
|
+
}
|
|
244
|
+
|
|
230
245
|
export type ListWebhooksByClientIdRequest = {
|
|
231
246
|
search?: string
|
|
232
247
|
pageSize?: number
|
|
@@ -303,21 +318,6 @@ export type ListWebhookRecordsByClientIdResponse = {
|
|
|
303
318
|
}
|
|
304
319
|
|
|
305
320
|
export class Webhook {
|
|
306
|
-
static CreateWebhookEndpoint(req: CreateWebhookEndpointRequest, initReq?: fm.InitReq): Promise<CreateWebhookEndpointResponse> {
|
|
307
|
-
return fm.fetchReq<CreateWebhookEndpointRequest, CreateWebhookEndpointResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
308
|
-
}
|
|
309
|
-
static GetWebhookEndpoint(req: GetWebhookEndpointRequest, initReq?: fm.InitReq): Promise<GetWebhookEndpointResponse> {
|
|
310
|
-
return fm.fetchReq<GetWebhookEndpointRequest, GetWebhookEndpointResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
311
|
-
}
|
|
312
|
-
static ListWebhookEndpoints(req: ListWebhookEndpointsRequest, initReq?: fm.InitReq): Promise<ListWebhookEndpointsResponse> {
|
|
313
|
-
return fm.fetchReq<ListWebhookEndpointsRequest, ListWebhookEndpointsResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
314
|
-
}
|
|
315
|
-
static UpdateWebhookEndpoint(req: UpdateWebhookEndpointRequest, initReq?: fm.InitReq): Promise<UpdateWebhookEndpointResponse> {
|
|
316
|
-
return fm.fetchReq<UpdateWebhookEndpointRequest, UpdateWebhookEndpointResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
317
|
-
}
|
|
318
|
-
static DeleteWebhookEndpoint(req: DeleteWebhookEndpointRequest, initReq?: fm.InitReq): Promise<DeleteWebhookEndpointResponse> {
|
|
319
|
-
return fm.fetchReq<DeleteWebhookEndpointRequest, DeleteWebhookEndpointResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
320
|
-
}
|
|
321
321
|
static CreateWebhook(req: CreateWebhookRequest, initReq?: fm.InitReq): Promise<CreateWebhookResponse> {
|
|
322
322
|
return fm.fetchReq<CreateWebhookRequest, CreateWebhookResponse>(`/apis/ghippo.io/v1alpha1/webhook`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
323
323
|
}
|
|
@@ -342,6 +342,21 @@ export class Webhook {
|
|
|
342
342
|
static PublishWebhookEvent(req: PublishWebhookEventRequest, initReq?: fm.InitReq): Promise<PublishWebhookEventResponse> {
|
|
343
343
|
return fm.fetchReq<PublishWebhookEventRequest, PublishWebhookEventResponse>(`/v1alpha1.webhook.Webhook/PublishWebhookEvent`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
344
344
|
}
|
|
345
|
+
static CreateWebhookEndpoint(req: CreateWebhookEndpointRequest, initReq?: fm.InitReq): Promise<CreateWebhookEndpointResponse> {
|
|
346
|
+
return fm.fetchReq<CreateWebhookEndpointRequest, CreateWebhookEndpointResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
347
|
+
}
|
|
348
|
+
static ListWebhookEndpointEvents(req: ListWebhookEndpointEventsRequest, initReq?: fm.InitReq): Promise<ListWebhookEndpointEventsResponse> {
|
|
349
|
+
return fm.fetchReq<ListWebhookEndpointEventsRequest, ListWebhookEndpointEventsResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint/${req["id"]}/events?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
350
|
+
}
|
|
351
|
+
static ListWebhookEndpoints(req: ListWebhookEndpointsRequest, initReq?: fm.InitReq): Promise<ListWebhookEndpointsResponse> {
|
|
352
|
+
return fm.fetchReq<ListWebhookEndpointsRequest, ListWebhookEndpointsResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoints?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
353
|
+
}
|
|
354
|
+
static UpdateWebhookEndpoint(req: UpdateWebhookEndpointRequest, initReq?: fm.InitReq): Promise<UpdateWebhookEndpointResponse> {
|
|
355
|
+
return fm.fetchReq<UpdateWebhookEndpointRequest, UpdateWebhookEndpointResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
356
|
+
}
|
|
357
|
+
static DeleteWebhookEndpoint(req: DeleteWebhookEndpointRequest, initReq?: fm.InitReq): Promise<DeleteWebhookEndpointResponse> {
|
|
358
|
+
return fm.fetchReq<DeleteWebhookEndpointRequest, DeleteWebhookEndpointResponse>(`/apis/ghippo.io/v1alpha1/webhook-endpoint/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
359
|
+
}
|
|
345
360
|
static ListGproductWebhookEvents(req: ListGproductWebhookEventsRequest, initReq?: fm.InitReq): Promise<ListGproductWebhookEventsResponse> {
|
|
346
361
|
return fm.fetchReq<ListGproductWebhookEventsRequest, ListGproductWebhookEventsResponse>(`/apis/ghippo.io/v1alpha1/gproduct-webhook-events?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
347
362
|
}
|