@alis-build/alis-open-notifications-v1 1.12.0 → 1.14.0
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.
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js,json_types=true"
|
|
2
2
|
// @generated from file alis/open/notifications/v1/devices.proto (package alis.open.notifications.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
|
+
// Registers the devices users receive notifications on, and sends
|
|
6
|
+
// notifications to users through Firebase Cloud Messaging (FCM).
|
|
7
|
+
//
|
|
8
|
+
// - `DevicesService` manages `Device` resources
|
|
9
|
+
// (`users/{user}/devices/{device}`): a user's device and its device token.
|
|
10
|
+
// `RegisterDevice` registers a device by ID and token. The IAM RPCs take a
|
|
11
|
+
// device name as the resource.
|
|
12
|
+
// - `NotificationsService` sends FCM messages (title, body, and optional
|
|
13
|
+
// image, data payload and URI) to a user, one at a time or in a batch.
|
|
14
|
+
//
|
|
15
|
+
// Both services also expose `ValidateMessage` and `RetrieveRules` from
|
|
16
|
+
// `alis.open.validation.v1`.
|
|
17
|
+
|
|
5
18
|
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
6
19
|
import type { Message } from "@bufbuild/protobuf";
|
|
7
20
|
import type { EmptySchema, FieldMask, FieldMaskJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
|
|
@@ -16,60 +29,86 @@ import type { AddIamBindingsRequestSchema, RemoveIamBindingsRequestSchema } from
|
|
|
16
29
|
export declare const file_alis_open_notifications_v1_devices: GenFile;
|
|
17
30
|
|
|
18
31
|
/**
|
|
32
|
+
* A user's device that can receive notifications.
|
|
33
|
+
*
|
|
19
34
|
* @generated from message alis.open.notifications.v1.Device
|
|
20
35
|
*/
|
|
21
36
|
export declare type Device = Message<"alis.open.notifications.v1.Device"> & {
|
|
22
37
|
/**
|
|
38
|
+
* The resource name of the device.
|
|
39
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
40
|
+
*
|
|
23
41
|
* @generated from field: string name = 1;
|
|
24
42
|
*/
|
|
25
43
|
name: string;
|
|
26
44
|
|
|
27
45
|
/**
|
|
46
|
+
* Device token
|
|
47
|
+
*
|
|
28
48
|
* @generated from field: string token = 2;
|
|
29
49
|
*/
|
|
30
50
|
token: string;
|
|
31
51
|
|
|
32
52
|
/**
|
|
53
|
+
* ETag
|
|
54
|
+
*
|
|
33
55
|
* @generated from field: string etag = 97;
|
|
34
56
|
*/
|
|
35
57
|
etag: string;
|
|
36
58
|
|
|
37
59
|
/**
|
|
60
|
+
* Device creation time
|
|
61
|
+
*
|
|
38
62
|
* @generated from field: google.protobuf.Timestamp create_time = 98;
|
|
39
63
|
*/
|
|
40
64
|
createTime?: Timestamp | undefined;
|
|
41
65
|
|
|
42
66
|
/**
|
|
67
|
+
* Device update time
|
|
68
|
+
*
|
|
43
69
|
* @generated from field: google.protobuf.Timestamp update_time = 99;
|
|
44
70
|
*/
|
|
45
71
|
updateTime?: Timestamp | undefined;
|
|
46
72
|
};
|
|
47
73
|
|
|
48
74
|
/**
|
|
75
|
+
* A user's device that can receive notifications.
|
|
76
|
+
*
|
|
49
77
|
* @generated from message alis.open.notifications.v1.Device
|
|
50
78
|
*/
|
|
51
79
|
export declare type DeviceJson = {
|
|
52
80
|
/**
|
|
81
|
+
* The resource name of the device.
|
|
82
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
83
|
+
*
|
|
53
84
|
* @generated from field: string name = 1;
|
|
54
85
|
*/
|
|
55
86
|
name?: string;
|
|
56
87
|
|
|
57
88
|
/**
|
|
89
|
+
* Device token
|
|
90
|
+
*
|
|
58
91
|
* @generated from field: string token = 2;
|
|
59
92
|
*/
|
|
60
93
|
token?: string;
|
|
61
94
|
|
|
62
95
|
/**
|
|
96
|
+
* ETag
|
|
97
|
+
*
|
|
63
98
|
* @generated from field: string etag = 97;
|
|
64
99
|
*/
|
|
65
100
|
etag?: string;
|
|
66
101
|
|
|
67
102
|
/**
|
|
103
|
+
* Device creation time
|
|
104
|
+
*
|
|
68
105
|
* @generated from field: google.protobuf.Timestamp create_time = 98;
|
|
69
106
|
*/
|
|
70
107
|
createTime?: TimestampJson;
|
|
71
108
|
|
|
72
109
|
/**
|
|
110
|
+
* Device update time
|
|
111
|
+
*
|
|
73
112
|
* @generated from field: google.protobuf.Timestamp update_time = 99;
|
|
74
113
|
*/
|
|
75
114
|
updateTime?: TimestampJson;
|
|
@@ -82,20 +121,30 @@ export declare type DeviceJson = {
|
|
|
82
121
|
export declare const DeviceSchema: GenMessage<Device, {jsonType: DeviceJson}>;
|
|
83
122
|
|
|
84
123
|
/**
|
|
124
|
+
* Request message for the GetDevice method.
|
|
125
|
+
*
|
|
85
126
|
* @generated from message alis.open.notifications.v1.GetDeviceRequest
|
|
86
127
|
*/
|
|
87
128
|
export declare type GetDeviceRequest = Message<"alis.open.notifications.v1.GetDeviceRequest"> & {
|
|
88
129
|
/**
|
|
130
|
+
* The resource name of the device to get.
|
|
131
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
132
|
+
*
|
|
89
133
|
* @generated from field: string name = 1;
|
|
90
134
|
*/
|
|
91
135
|
name: string;
|
|
92
136
|
};
|
|
93
137
|
|
|
94
138
|
/**
|
|
139
|
+
* Request message for the GetDevice method.
|
|
140
|
+
*
|
|
95
141
|
* @generated from message alis.open.notifications.v1.GetDeviceRequest
|
|
96
142
|
*/
|
|
97
143
|
export declare type GetDeviceRequestJson = {
|
|
98
144
|
/**
|
|
145
|
+
* The resource name of the device to get.
|
|
146
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
147
|
+
*
|
|
99
148
|
* @generated from field: string name = 1;
|
|
100
149
|
*/
|
|
101
150
|
name?: string;
|
|
@@ -108,60 +157,90 @@ export declare type GetDeviceRequestJson = {
|
|
|
108
157
|
export declare const GetDeviceRequestSchema: GenMessage<GetDeviceRequest, {jsonType: GetDeviceRequestJson}>;
|
|
109
158
|
|
|
110
159
|
/**
|
|
160
|
+
* Request message for the ListDevices method.
|
|
161
|
+
*
|
|
111
162
|
* @generated from message alis.open.notifications.v1.ListDevicesRequest
|
|
112
163
|
*/
|
|
113
164
|
export declare type ListDevicesRequest = Message<"alis.open.notifications.v1.ListDevicesRequest"> & {
|
|
114
165
|
/**
|
|
166
|
+
* Parent user resource.
|
|
167
|
+
* Format: users/([a-z0-9-]{2,50})
|
|
168
|
+
*
|
|
115
169
|
* @generated from field: string parent = 1;
|
|
116
170
|
*/
|
|
117
171
|
parent: string;
|
|
118
172
|
|
|
119
173
|
/**
|
|
174
|
+
* The maximum number of devices to return.
|
|
175
|
+
* The service may return fewer than this value.
|
|
176
|
+
* If not specified, returns up to 100 devices.
|
|
177
|
+
*
|
|
120
178
|
* @generated from field: int32 page_size = 2;
|
|
121
179
|
*/
|
|
122
180
|
pageSize: number;
|
|
123
181
|
|
|
124
182
|
/**
|
|
183
|
+
* A page token, received from a previous ListDevices call.
|
|
184
|
+
*
|
|
125
185
|
* @generated from field: string page_token = 3;
|
|
126
186
|
*/
|
|
127
187
|
pageToken: string;
|
|
128
188
|
|
|
129
189
|
/**
|
|
190
|
+
* The fields to return in snake_case.
|
|
191
|
+
*
|
|
130
192
|
* @generated from field: google.protobuf.FieldMask read_mask = 4;
|
|
131
193
|
*/
|
|
132
194
|
readMask?: FieldMask | undefined;
|
|
133
195
|
|
|
134
196
|
/**
|
|
197
|
+
* An optional filter to apply to the list of devices.
|
|
198
|
+
*
|
|
135
199
|
* @generated from field: string filter = 5;
|
|
136
200
|
*/
|
|
137
201
|
filter: string;
|
|
138
202
|
};
|
|
139
203
|
|
|
140
204
|
/**
|
|
205
|
+
* Request message for the ListDevices method.
|
|
206
|
+
*
|
|
141
207
|
* @generated from message alis.open.notifications.v1.ListDevicesRequest
|
|
142
208
|
*/
|
|
143
209
|
export declare type ListDevicesRequestJson = {
|
|
144
210
|
/**
|
|
211
|
+
* Parent user resource.
|
|
212
|
+
* Format: users/([a-z0-9-]{2,50})
|
|
213
|
+
*
|
|
145
214
|
* @generated from field: string parent = 1;
|
|
146
215
|
*/
|
|
147
216
|
parent?: string;
|
|
148
217
|
|
|
149
218
|
/**
|
|
219
|
+
* The maximum number of devices to return.
|
|
220
|
+
* The service may return fewer than this value.
|
|
221
|
+
* If not specified, returns up to 100 devices.
|
|
222
|
+
*
|
|
150
223
|
* @generated from field: int32 page_size = 2;
|
|
151
224
|
*/
|
|
152
225
|
pageSize?: number;
|
|
153
226
|
|
|
154
227
|
/**
|
|
228
|
+
* A page token, received from a previous ListDevices call.
|
|
229
|
+
*
|
|
155
230
|
* @generated from field: string page_token = 3;
|
|
156
231
|
*/
|
|
157
232
|
pageToken?: string;
|
|
158
233
|
|
|
159
234
|
/**
|
|
235
|
+
* The fields to return in snake_case.
|
|
236
|
+
*
|
|
160
237
|
* @generated from field: google.protobuf.FieldMask read_mask = 4;
|
|
161
238
|
*/
|
|
162
239
|
readMask?: FieldMaskJson;
|
|
163
240
|
|
|
164
241
|
/**
|
|
242
|
+
* An optional filter to apply to the list of devices.
|
|
243
|
+
*
|
|
165
244
|
* @generated from field: string filter = 5;
|
|
166
245
|
*/
|
|
167
246
|
filter?: string;
|
|
@@ -174,30 +253,42 @@ export declare type ListDevicesRequestJson = {
|
|
|
174
253
|
export declare const ListDevicesRequestSchema: GenMessage<ListDevicesRequest, {jsonType: ListDevicesRequestJson}>;
|
|
175
254
|
|
|
176
255
|
/**
|
|
256
|
+
* Response message for the ListDevices method.
|
|
257
|
+
*
|
|
177
258
|
* @generated from message alis.open.notifications.v1.ListDevicesResponse
|
|
178
259
|
*/
|
|
179
260
|
export declare type ListDevicesResponse = Message<"alis.open.notifications.v1.ListDevicesResponse"> & {
|
|
180
261
|
/**
|
|
262
|
+
* The devices.
|
|
263
|
+
*
|
|
181
264
|
* @generated from field: repeated alis.open.notifications.v1.Device devices = 1;
|
|
182
265
|
*/
|
|
183
266
|
devices: Device[];
|
|
184
267
|
|
|
185
268
|
/**
|
|
269
|
+
* A token to retrieve the next page of results.
|
|
270
|
+
*
|
|
186
271
|
* @generated from field: string next_page_token = 2;
|
|
187
272
|
*/
|
|
188
273
|
nextPageToken: string;
|
|
189
274
|
};
|
|
190
275
|
|
|
191
276
|
/**
|
|
277
|
+
* Response message for the ListDevices method.
|
|
278
|
+
*
|
|
192
279
|
* @generated from message alis.open.notifications.v1.ListDevicesResponse
|
|
193
280
|
*/
|
|
194
281
|
export declare type ListDevicesResponseJson = {
|
|
195
282
|
/**
|
|
283
|
+
* The devices.
|
|
284
|
+
*
|
|
196
285
|
* @generated from field: repeated alis.open.notifications.v1.Device devices = 1;
|
|
197
286
|
*/
|
|
198
287
|
devices?: DeviceJson[];
|
|
199
288
|
|
|
200
289
|
/**
|
|
290
|
+
* A token to retrieve the next page of results.
|
|
291
|
+
*
|
|
201
292
|
* @generated from field: string next_page_token = 2;
|
|
202
293
|
*/
|
|
203
294
|
nextPageToken?: string;
|
|
@@ -210,20 +301,30 @@ export declare type ListDevicesResponseJson = {
|
|
|
210
301
|
export declare const ListDevicesResponseSchema: GenMessage<ListDevicesResponse, {jsonType: ListDevicesResponseJson}>;
|
|
211
302
|
|
|
212
303
|
/**
|
|
304
|
+
* Request message for the DeleteDevice method.
|
|
305
|
+
*
|
|
213
306
|
* @generated from message alis.open.notifications.v1.DeleteDeviceRequest
|
|
214
307
|
*/
|
|
215
308
|
export declare type DeleteDeviceRequest = Message<"alis.open.notifications.v1.DeleteDeviceRequest"> & {
|
|
216
309
|
/**
|
|
310
|
+
* The resource name of the device to delete.
|
|
311
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
312
|
+
*
|
|
217
313
|
* @generated from field: string name = 1;
|
|
218
314
|
*/
|
|
219
315
|
name: string;
|
|
220
316
|
};
|
|
221
317
|
|
|
222
318
|
/**
|
|
319
|
+
* Request message for the DeleteDevice method.
|
|
320
|
+
*
|
|
223
321
|
* @generated from message alis.open.notifications.v1.DeleteDeviceRequest
|
|
224
322
|
*/
|
|
225
323
|
export declare type DeleteDeviceRequestJson = {
|
|
226
324
|
/**
|
|
325
|
+
* The resource name of the device to delete.
|
|
326
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
327
|
+
*
|
|
227
328
|
* @generated from field: string name = 1;
|
|
228
329
|
*/
|
|
229
330
|
name?: string;
|
|
@@ -236,30 +337,46 @@ export declare type DeleteDeviceRequestJson = {
|
|
|
236
337
|
export declare const DeleteDeviceRequestSchema: GenMessage<DeleteDeviceRequest, {jsonType: DeleteDeviceRequestJson}>;
|
|
237
338
|
|
|
238
339
|
/**
|
|
340
|
+
* Request message for the RegisterDevice method.
|
|
341
|
+
*
|
|
239
342
|
* @generated from message alis.open.notifications.v1.RegisterDeviceRequest
|
|
240
343
|
*/
|
|
241
344
|
export declare type RegisterDeviceRequest = Message<"alis.open.notifications.v1.RegisterDeviceRequest"> & {
|
|
242
345
|
/**
|
|
346
|
+
* Device id.
|
|
347
|
+
*
|
|
348
|
+
* In the case of Web, this can be the Firebase Instance ID.
|
|
349
|
+
*
|
|
243
350
|
* @generated from field: string device_id = 1;
|
|
244
351
|
*/
|
|
245
352
|
deviceId: string;
|
|
246
353
|
|
|
247
354
|
/**
|
|
355
|
+
* Device token.
|
|
356
|
+
*
|
|
248
357
|
* @generated from field: string device_token = 2;
|
|
249
358
|
*/
|
|
250
359
|
deviceToken: string;
|
|
251
360
|
};
|
|
252
361
|
|
|
253
362
|
/**
|
|
363
|
+
* Request message for the RegisterDevice method.
|
|
364
|
+
*
|
|
254
365
|
* @generated from message alis.open.notifications.v1.RegisterDeviceRequest
|
|
255
366
|
*/
|
|
256
367
|
export declare type RegisterDeviceRequestJson = {
|
|
257
368
|
/**
|
|
369
|
+
* Device id.
|
|
370
|
+
*
|
|
371
|
+
* In the case of Web, this can be the Firebase Instance ID.
|
|
372
|
+
*
|
|
258
373
|
* @generated from field: string device_id = 1;
|
|
259
374
|
*/
|
|
260
375
|
deviceId?: string;
|
|
261
376
|
|
|
262
377
|
/**
|
|
378
|
+
* Device token.
|
|
379
|
+
*
|
|
263
380
|
* @generated from field: string device_token = 2;
|
|
264
381
|
*/
|
|
265
382
|
deviceToken?: string;
|
|
@@ -272,12 +389,16 @@ export declare type RegisterDeviceRequestJson = {
|
|
|
272
389
|
export declare const RegisterDeviceRequestSchema: GenMessage<RegisterDeviceRequest, {jsonType: RegisterDeviceRequestJson}>;
|
|
273
390
|
|
|
274
391
|
/**
|
|
392
|
+
* Response message for the RegisterDevice method.
|
|
393
|
+
*
|
|
275
394
|
* @generated from message alis.open.notifications.v1.RegisterDeviceResponse
|
|
276
395
|
*/
|
|
277
396
|
export declare type RegisterDeviceResponse = Message<"alis.open.notifications.v1.RegisterDeviceResponse"> & {
|
|
278
397
|
};
|
|
279
398
|
|
|
280
399
|
/**
|
|
400
|
+
* Response message for the RegisterDevice method.
|
|
401
|
+
*
|
|
281
402
|
* @generated from message alis.open.notifications.v1.RegisterDeviceResponse
|
|
282
403
|
*/
|
|
283
404
|
export declare type RegisterDeviceResponseJson = {
|
|
@@ -290,10 +411,15 @@ export declare type RegisterDeviceResponseJson = {
|
|
|
290
411
|
export declare const RegisterDeviceResponseSchema: GenMessage<RegisterDeviceResponse, {jsonType: RegisterDeviceResponseJson}>;
|
|
291
412
|
|
|
292
413
|
/**
|
|
414
|
+
* DevicesService provides RPCs for managing Device resources.
|
|
415
|
+
*
|
|
293
416
|
* @generated from service alis.open.notifications.v1.DevicesService
|
|
294
417
|
*/
|
|
295
418
|
export declare const DevicesService: GenService<{
|
|
296
419
|
/**
|
|
420
|
+
* Validates any proto message that is used directly or indirectly by this service.
|
|
421
|
+
* Most common use case is to validate request messages from a client-side application.
|
|
422
|
+
*
|
|
297
423
|
* @generated from rpc alis.open.notifications.v1.DevicesService.ValidateMessage
|
|
298
424
|
*/
|
|
299
425
|
validateMessage: {
|
|
@@ -302,6 +428,9 @@ export declare const DevicesService: GenService<{
|
|
|
302
428
|
output: typeof ValidateMessageResponseSchema;
|
|
303
429
|
},
|
|
304
430
|
/**
|
|
431
|
+
* Retrieves the validation rules for any proto message that is used directly or indirectly by this service.
|
|
432
|
+
* Serves as live auto-documentation of the validation rules in this service.
|
|
433
|
+
*
|
|
305
434
|
* @generated from rpc alis.open.notifications.v1.DevicesService.RetrieveRules
|
|
306
435
|
*/
|
|
307
436
|
retrieveRules: {
|
|
@@ -310,6 +439,11 @@ export declare const DevicesService: GenService<{
|
|
|
310
439
|
output: typeof RetrieveRulesResponseSchema;
|
|
311
440
|
},
|
|
312
441
|
/**
|
|
442
|
+
* Gets the IAM policy for a resource implemented in this service.
|
|
443
|
+
*
|
|
444
|
+
* Resource should be the fully qualified name of the device.
|
|
445
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
446
|
+
*
|
|
313
447
|
* @generated from rpc alis.open.notifications.v1.DevicesService.GetIamPolicy
|
|
314
448
|
*/
|
|
315
449
|
getIamPolicy: {
|
|
@@ -318,6 +452,11 @@ export declare const DevicesService: GenService<{
|
|
|
318
452
|
output: typeof PolicySchema;
|
|
319
453
|
},
|
|
320
454
|
/**
|
|
455
|
+
* Sets the IAM policy for a resource implemented in this service.
|
|
456
|
+
*
|
|
457
|
+
* Resource should be the fully qualified name of the device.
|
|
458
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
459
|
+
*
|
|
321
460
|
* @generated from rpc alis.open.notifications.v1.DevicesService.SetIamPolicy
|
|
322
461
|
*/
|
|
323
462
|
setIamPolicy: {
|
|
@@ -326,6 +465,11 @@ export declare const DevicesService: GenService<{
|
|
|
326
465
|
output: typeof PolicySchema;
|
|
327
466
|
},
|
|
328
467
|
/**
|
|
468
|
+
* Returns permissions that a caller has on the specified resource.
|
|
469
|
+
*
|
|
470
|
+
* Resource should be the fully qualified name of the device.
|
|
471
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
472
|
+
*
|
|
329
473
|
* @generated from rpc alis.open.notifications.v1.DevicesService.TestIamPermissions
|
|
330
474
|
*/
|
|
331
475
|
testIamPermissions: {
|
|
@@ -334,6 +478,11 @@ export declare const DevicesService: GenService<{
|
|
|
334
478
|
output: typeof TestIamPermissionsResponseSchema;
|
|
335
479
|
},
|
|
336
480
|
/**
|
|
481
|
+
* Adds principals or updates the roles existing principals have on an IAM Policy protected resource.
|
|
482
|
+
*
|
|
483
|
+
* Resource should be the fully qualified name of the device.
|
|
484
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
485
|
+
*
|
|
337
486
|
* @generated from rpc alis.open.notifications.v1.DevicesService.AddIamBindings
|
|
338
487
|
*/
|
|
339
488
|
addIamBindings: {
|
|
@@ -342,6 +491,11 @@ export declare const DevicesService: GenService<{
|
|
|
342
491
|
output: typeof PolicySchema;
|
|
343
492
|
},
|
|
344
493
|
/**
|
|
494
|
+
* Removes principals or some of the roles they have on an IAM Policy protected resource.
|
|
495
|
+
*
|
|
496
|
+
* Resource should be the fully qualified name of the device.
|
|
497
|
+
* Format: users/([a-z0-9-]{2,50})/devices/([a-zA-Z0-9-_]{2,50})
|
|
498
|
+
*
|
|
345
499
|
* @generated from rpc alis.open.notifications.v1.DevicesService.RemoveIamBindings
|
|
346
500
|
*/
|
|
347
501
|
removeIamBindings: {
|
|
@@ -350,6 +504,8 @@ export declare const DevicesService: GenService<{
|
|
|
350
504
|
output: typeof PolicySchema;
|
|
351
505
|
},
|
|
352
506
|
/**
|
|
507
|
+
* Registers a user's device.
|
|
508
|
+
*
|
|
353
509
|
* @generated from rpc alis.open.notifications.v1.DevicesService.RegisterDevice
|
|
354
510
|
*/
|
|
355
511
|
registerDevice: {
|
|
@@ -358,6 +514,8 @@ export declare const DevicesService: GenService<{
|
|
|
358
514
|
output: typeof RegisterDeviceResponseSchema;
|
|
359
515
|
},
|
|
360
516
|
/**
|
|
517
|
+
* Gets a device.
|
|
518
|
+
*
|
|
361
519
|
* @generated from rpc alis.open.notifications.v1.DevicesService.GetDevice
|
|
362
520
|
*/
|
|
363
521
|
getDevice: {
|
|
@@ -366,6 +524,8 @@ export declare const DevicesService: GenService<{
|
|
|
366
524
|
output: typeof DeviceSchema;
|
|
367
525
|
},
|
|
368
526
|
/**
|
|
527
|
+
* Lists devices.
|
|
528
|
+
*
|
|
369
529
|
* @generated from rpc alis.open.notifications.v1.DevicesService.ListDevices
|
|
370
530
|
*/
|
|
371
531
|
listDevices: {
|
|
@@ -374,6 +534,8 @@ export declare const DevicesService: GenService<{
|
|
|
374
534
|
output: typeof ListDevicesResponseSchema;
|
|
375
535
|
},
|
|
376
536
|
/**
|
|
537
|
+
* Deletes a device.
|
|
538
|
+
*
|
|
377
539
|
* @generated from rpc alis.open.notifications.v1.DevicesService.DeleteDevice
|
|
378
540
|
*/
|
|
379
541
|
deleteDevice: {
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js,json_types=true"
|
|
2
2
|
// @generated from file alis/open/notifications/v1/devices.proto (package alis.open.notifications.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
|
+
// Registers the devices users receive notifications on, and sends
|
|
6
|
+
// notifications to users through Firebase Cloud Messaging (FCM).
|
|
7
|
+
//
|
|
8
|
+
// - `DevicesService` manages `Device` resources
|
|
9
|
+
// (`users/{user}/devices/{device}`): a user's device and its device token.
|
|
10
|
+
// `RegisterDevice` registers a device by ID and token. The IAM RPCs take a
|
|
11
|
+
// device name as the resource.
|
|
12
|
+
// - `NotificationsService` sends FCM messages (title, body, and optional
|
|
13
|
+
// image, data payload and URI) to a user, one at a time or in a batch.
|
|
14
|
+
//
|
|
15
|
+
// Both services also expose `ValidateMessage` and `RetrieveRules` from
|
|
16
|
+
// `alis.open.validation.v1`.
|
|
17
|
+
|
|
5
18
|
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
6
19
|
import { file_alis_open_iam_v1_iam } from "@alis-build/alis-open-iam-v1/alis/open/iam/v1/iam_pb.js";
|
|
7
20
|
import { file_alis_open_validation_v1_validation } from "@alis-build/alis-open-validation-v1/alis/open/validation/v1/validation_pb.js";
|
|
@@ -65,6 +78,8 @@ export const RegisterDeviceResponseSchema = /*@__PURE__*/
|
|
|
65
78
|
messageDesc(file_alis_open_notifications_v1_devices, 6);
|
|
66
79
|
|
|
67
80
|
/**
|
|
81
|
+
* DevicesService provides RPCs for managing Device resources.
|
|
82
|
+
*
|
|
68
83
|
* @generated from service alis.open.notifications.v1.DevicesService
|
|
69
84
|
*/
|
|
70
85
|
export const DevicesService = /*@__PURE__*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js,json_types=true"
|
|
2
2
|
// @generated from file alis/open/notifications/v1/notifications.proto (package alis.open.notifications.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
@@ -13,14 +13,21 @@ import type { TestIamPermissionsRequestSchema, TestIamPermissionsResponseSchema
|
|
|
13
13
|
export declare const file_alis_open_notifications_v1_notifications: GenFile;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
+
* Request message for the SendFcmMessage method.
|
|
17
|
+
*
|
|
16
18
|
* @generated from message alis.open.notifications.v1.SendFcmMessageRequest
|
|
17
19
|
*/
|
|
18
20
|
export declare type SendFcmMessageRequest = Message<"alis.open.notifications.v1.SendFcmMessageRequest"> & {
|
|
19
21
|
/**
|
|
22
|
+
* The target of the message.
|
|
23
|
+
*
|
|
20
24
|
* @generated from oneof alis.open.notifications.v1.SendFcmMessageRequest.target
|
|
21
25
|
*/
|
|
22
26
|
target: {
|
|
23
27
|
/**
|
|
28
|
+
* The user to send the message to.
|
|
29
|
+
* Format: users/{userId}
|
|
30
|
+
*
|
|
24
31
|
* @generated from field: string user = 1;
|
|
25
32
|
*/
|
|
26
33
|
value: string;
|
|
@@ -28,61 +35,86 @@ export declare type SendFcmMessageRequest = Message<"alis.open.notifications.v1.
|
|
|
28
35
|
} | { case: undefined; value?: undefined };
|
|
29
36
|
|
|
30
37
|
/**
|
|
38
|
+
* The title of the message.
|
|
39
|
+
*
|
|
31
40
|
* @generated from field: string title = 3;
|
|
32
41
|
*/
|
|
33
42
|
title: string;
|
|
34
43
|
|
|
35
44
|
/**
|
|
45
|
+
* The body of the message.
|
|
46
|
+
*
|
|
36
47
|
* @generated from field: string body = 4;
|
|
37
48
|
*/
|
|
38
49
|
body: string;
|
|
39
50
|
|
|
40
51
|
/**
|
|
52
|
+
* An optional image to include in the message.
|
|
53
|
+
*
|
|
41
54
|
* @generated from field: string image = 5;
|
|
42
55
|
*/
|
|
43
56
|
image: string;
|
|
44
57
|
|
|
45
58
|
/**
|
|
59
|
+
* An optional data payload to include in the message.
|
|
60
|
+
*
|
|
46
61
|
* @generated from field: map<string, string> data = 6;
|
|
47
62
|
*/
|
|
48
63
|
data: { [key: string]: string };
|
|
49
64
|
|
|
50
65
|
/**
|
|
66
|
+
* An optional URL to send along with the message.
|
|
67
|
+
*
|
|
51
68
|
* @generated from field: string uri = 7;
|
|
52
69
|
*/
|
|
53
70
|
uri: string;
|
|
54
71
|
};
|
|
55
72
|
|
|
56
73
|
/**
|
|
74
|
+
* Request message for the SendFcmMessage method.
|
|
75
|
+
*
|
|
57
76
|
* @generated from message alis.open.notifications.v1.SendFcmMessageRequest
|
|
58
77
|
*/
|
|
59
78
|
export declare type SendFcmMessageRequestJson = {
|
|
60
79
|
/**
|
|
80
|
+
* The user to send the message to.
|
|
81
|
+
* Format: users/{userId}
|
|
82
|
+
*
|
|
61
83
|
* @generated from field: string user = 1;
|
|
62
84
|
*/
|
|
63
85
|
user?: string;
|
|
64
86
|
|
|
65
87
|
/**
|
|
88
|
+
* The title of the message.
|
|
89
|
+
*
|
|
66
90
|
* @generated from field: string title = 3;
|
|
67
91
|
*/
|
|
68
92
|
title?: string;
|
|
69
93
|
|
|
70
94
|
/**
|
|
95
|
+
* The body of the message.
|
|
96
|
+
*
|
|
71
97
|
* @generated from field: string body = 4;
|
|
72
98
|
*/
|
|
73
99
|
body?: string;
|
|
74
100
|
|
|
75
101
|
/**
|
|
102
|
+
* An optional image to include in the message.
|
|
103
|
+
*
|
|
76
104
|
* @generated from field: string image = 5;
|
|
77
105
|
*/
|
|
78
106
|
image?: string;
|
|
79
107
|
|
|
80
108
|
/**
|
|
109
|
+
* An optional data payload to include in the message.
|
|
110
|
+
*
|
|
81
111
|
* @generated from field: map<string, string> data = 6;
|
|
82
112
|
*/
|
|
83
113
|
data?: { [key: string]: string };
|
|
84
114
|
|
|
85
115
|
/**
|
|
116
|
+
* An optional URL to send along with the message.
|
|
117
|
+
*
|
|
86
118
|
* @generated from field: string uri = 7;
|
|
87
119
|
*/
|
|
88
120
|
uri?: string;
|
|
@@ -95,20 +127,28 @@ export declare type SendFcmMessageRequestJson = {
|
|
|
95
127
|
export declare const SendFcmMessageRequestSchema: GenMessage<SendFcmMessageRequest, {jsonType: SendFcmMessageRequestJson}>;
|
|
96
128
|
|
|
97
129
|
/**
|
|
130
|
+
* Response message for the SendFcmMessage method.
|
|
131
|
+
*
|
|
98
132
|
* @generated from message alis.open.notifications.v1.SendFcmMessageResponse
|
|
99
133
|
*/
|
|
100
134
|
export declare type SendFcmMessageResponse = Message<"alis.open.notifications.v1.SendFcmMessageResponse"> & {
|
|
101
135
|
/**
|
|
136
|
+
* Message IDs of the messages sent.
|
|
137
|
+
*
|
|
102
138
|
* @generated from field: repeated string message_ids = 1;
|
|
103
139
|
*/
|
|
104
140
|
messageIds: string[];
|
|
105
141
|
};
|
|
106
142
|
|
|
107
143
|
/**
|
|
144
|
+
* Response message for the SendFcmMessage method.
|
|
145
|
+
*
|
|
108
146
|
* @generated from message alis.open.notifications.v1.SendFcmMessageResponse
|
|
109
147
|
*/
|
|
110
148
|
export declare type SendFcmMessageResponseJson = {
|
|
111
149
|
/**
|
|
150
|
+
* Message IDs of the messages sent.
|
|
151
|
+
*
|
|
112
152
|
* @generated from field: repeated string message_ids = 1;
|
|
113
153
|
*/
|
|
114
154
|
messageIds?: string[];
|
|
@@ -121,20 +161,28 @@ export declare type SendFcmMessageResponseJson = {
|
|
|
121
161
|
export declare const SendFcmMessageResponseSchema: GenMessage<SendFcmMessageResponse, {jsonType: SendFcmMessageResponseJson}>;
|
|
122
162
|
|
|
123
163
|
/**
|
|
164
|
+
* Request message for the BatchSendFcmMessages method.
|
|
165
|
+
*
|
|
124
166
|
* @generated from message alis.open.notifications.v1.BatchSendFcmMessagesRequest
|
|
125
167
|
*/
|
|
126
168
|
export declare type BatchSendFcmMessagesRequest = Message<"alis.open.notifications.v1.BatchSendFcmMessagesRequest"> & {
|
|
127
169
|
/**
|
|
170
|
+
* The messages to send.
|
|
171
|
+
*
|
|
128
172
|
* @generated from field: repeated alis.open.notifications.v1.SendFcmMessageRequest requests = 1;
|
|
129
173
|
*/
|
|
130
174
|
requests: SendFcmMessageRequest[];
|
|
131
175
|
};
|
|
132
176
|
|
|
133
177
|
/**
|
|
178
|
+
* Request message for the BatchSendFcmMessages method.
|
|
179
|
+
*
|
|
134
180
|
* @generated from message alis.open.notifications.v1.BatchSendFcmMessagesRequest
|
|
135
181
|
*/
|
|
136
182
|
export declare type BatchSendFcmMessagesRequestJson = {
|
|
137
183
|
/**
|
|
184
|
+
* The messages to send.
|
|
185
|
+
*
|
|
138
186
|
* @generated from field: repeated alis.open.notifications.v1.SendFcmMessageRequest requests = 1;
|
|
139
187
|
*/
|
|
140
188
|
requests?: SendFcmMessageRequestJson[];
|
|
@@ -147,20 +195,28 @@ export declare type BatchSendFcmMessagesRequestJson = {
|
|
|
147
195
|
export declare const BatchSendFcmMessagesRequestSchema: GenMessage<BatchSendFcmMessagesRequest, {jsonType: BatchSendFcmMessagesRequestJson}>;
|
|
148
196
|
|
|
149
197
|
/**
|
|
198
|
+
* Response message for the BatchSendFcmMessages method.
|
|
199
|
+
*
|
|
150
200
|
* @generated from message alis.open.notifications.v1.BatchSendFcmMessagesResponse
|
|
151
201
|
*/
|
|
152
202
|
export declare type BatchSendFcmMessagesResponse = Message<"alis.open.notifications.v1.BatchSendFcmMessagesResponse"> & {
|
|
153
203
|
/**
|
|
204
|
+
* Message IDs of the messages sent.
|
|
205
|
+
*
|
|
154
206
|
* @generated from field: repeated string message_ids = 1;
|
|
155
207
|
*/
|
|
156
208
|
messageIds: string[];
|
|
157
209
|
};
|
|
158
210
|
|
|
159
211
|
/**
|
|
212
|
+
* Response message for the BatchSendFcmMessages method.
|
|
213
|
+
*
|
|
160
214
|
* @generated from message alis.open.notifications.v1.BatchSendFcmMessagesResponse
|
|
161
215
|
*/
|
|
162
216
|
export declare type BatchSendFcmMessagesResponseJson = {
|
|
163
217
|
/**
|
|
218
|
+
* Message IDs of the messages sent.
|
|
219
|
+
*
|
|
164
220
|
* @generated from field: repeated string message_ids = 1;
|
|
165
221
|
*/
|
|
166
222
|
messageIds?: string[];
|
|
@@ -173,10 +229,15 @@ export declare type BatchSendFcmMessagesResponseJson = {
|
|
|
173
229
|
export declare const BatchSendFcmMessagesResponseSchema: GenMessage<BatchSendFcmMessagesResponse, {jsonType: BatchSendFcmMessagesResponseJson}>;
|
|
174
230
|
|
|
175
231
|
/**
|
|
232
|
+
* NotificationsService provides RPCs for sending notifications to users or topics.
|
|
233
|
+
*
|
|
176
234
|
* @generated from service alis.open.notifications.v1.NotificationsService
|
|
177
235
|
*/
|
|
178
236
|
export declare const NotificationsService: GenService<{
|
|
179
237
|
/**
|
|
238
|
+
* Validates any proto message that is used directly or indirectly by this service.
|
|
239
|
+
* Most common use case is to validate request messages from a client-side application.
|
|
240
|
+
*
|
|
180
241
|
* @generated from rpc alis.open.notifications.v1.NotificationsService.ValidateMessage
|
|
181
242
|
*/
|
|
182
243
|
validateMessage: {
|
|
@@ -185,6 +246,9 @@ export declare const NotificationsService: GenService<{
|
|
|
185
246
|
output: typeof ValidateMessageResponseSchema;
|
|
186
247
|
},
|
|
187
248
|
/**
|
|
249
|
+
* Retrieves the validation rules for any proto message that is used directly or indirectly by this service.
|
|
250
|
+
* Serves as live auto-documentation of the validation rules in this service.
|
|
251
|
+
*
|
|
188
252
|
* @generated from rpc alis.open.notifications.v1.NotificationsService.RetrieveRules
|
|
189
253
|
*/
|
|
190
254
|
retrieveRules: {
|
|
@@ -193,6 +257,8 @@ export declare const NotificationsService: GenService<{
|
|
|
193
257
|
output: typeof RetrieveRulesResponseSchema;
|
|
194
258
|
},
|
|
195
259
|
/**
|
|
260
|
+
* Returns permissions that a caller has on the specified resource.
|
|
261
|
+
*
|
|
196
262
|
* @generated from rpc alis.open.notifications.v1.NotificationsService.TestIamPermissions
|
|
197
263
|
*/
|
|
198
264
|
testIamPermissions: {
|
|
@@ -201,6 +267,8 @@ export declare const NotificationsService: GenService<{
|
|
|
201
267
|
output: typeof TestIamPermissionsResponseSchema;
|
|
202
268
|
},
|
|
203
269
|
/**
|
|
270
|
+
* Sends a Firebase Cloud Messaging(FCM) message to a user or topic.
|
|
271
|
+
*
|
|
204
272
|
* @generated from rpc alis.open.notifications.v1.NotificationsService.SendFcmMessage
|
|
205
273
|
*/
|
|
206
274
|
sendFcmMessage: {
|
|
@@ -209,6 +277,8 @@ export declare const NotificationsService: GenService<{
|
|
|
209
277
|
output: typeof SendFcmMessageResponseSchema;
|
|
210
278
|
},
|
|
211
279
|
/**
|
|
280
|
+
* Sends a batch of Firebase Cloud Messaging(FCM) messages to users or topics.
|
|
281
|
+
*
|
|
212
282
|
* @generated from rpc alis.open.notifications.v1.NotificationsService.BatchSendFcmMessages
|
|
213
283
|
*/
|
|
214
284
|
batchSendFcmMessages: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js,json_types=true"
|
|
2
2
|
// @generated from file alis/open/notifications/v1/notifications.proto (package alis.open.notifications.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
@@ -41,6 +41,8 @@ export const BatchSendFcmMessagesResponseSchema = /*@__PURE__*/
|
|
|
41
41
|
messageDesc(file_alis_open_notifications_v1_notifications, 3);
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
+
* NotificationsService provides RPCs for sending notifications to users or topics.
|
|
45
|
+
*
|
|
44
46
|
* @generated from service alis.open.notifications.v1.NotificationsService
|
|
45
47
|
*/
|
|
46
48
|
export const NotificationsService = /*@__PURE__*/
|
package/package.json
CHANGED