@pidgr/proto 0.36.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.
@@ -0,0 +1,374 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
2
+ // @generated from file pidgr/v1/device.proto (package pidgr.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
8
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
9
+ import type { Platform } from "./common_pb";
10
+ import { file_pidgr_v1_common } from "./common_pb";
11
+ import type { Message } from "@bufbuild/protobuf";
12
+
13
+ /**
14
+ * Describes the file pidgr/v1/device.proto.
15
+ */
16
+ export const file_pidgr_v1_device: GenFile = /*@__PURE__*/
17
+ fileDesc("ChVwaWRnci92MS9kZXZpY2UucHJvdG8SCHBpZGdyLnYxItUBCgZEZXZpY2USEQoJZGV2aWNlX2lkGAEgASgJEg8KB3VzZXJfaWQYAiABKAkSJAoIcGxhdGZvcm0YAyABKA4yEi5waWRnci52MS5QbGF0Zm9ybRISCgpwdXNoX3Rva2VuGAQgASgJEg4KBmFjdGl2ZRgFIAEoCBItCglsYXN0X3NlZW4YBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmNyZWF0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIsgBCg1EZXZpY2VTdW1tYXJ5EhEKCWRldmljZV9pZBgBIAEoCRIPCgd1c2VyX2lkGAIgASgJEiQKCHBsYXRmb3JtGAMgASgOMhIucGlkZ3IudjEuUGxhdGZvcm0SDgoGYWN0aXZlGAQgASgIEi0KCWxhc3Rfc2VlbhgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLg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mljZXNSZXNwb25zZUI2WjRnaXRodWIuY29tL3BpZGdyL3BpZGdyLXByb3RvL2dlbi9nby9waWRnci92MTtwaWRncnYxYgZwcm90bzM", [file_google_protobuf_timestamp, file_pidgr_v1_common]);
18
+
19
+ /**
20
+ * A registered device that can receive push notifications.
21
+ * INTERNAL: This message is for server-side use only. Use DeviceSummary for API responses.
22
+ *
23
+ * @generated from message pidgr.v1.Device
24
+ */
25
+ export type Device = Message<"pidgr.v1.Device"> & {
26
+ /**
27
+ * Unique identifier for this device.
28
+ * Constraints: UUID format (36 characters).
29
+ *
30
+ * @generated from field: string device_id = 1;
31
+ */
32
+ deviceId: string;
33
+
34
+ /**
35
+ * ID of the user who owns this device.
36
+ * Constraints: UUID format (36 characters).
37
+ *
38
+ * @generated from field: string user_id = 2;
39
+ */
40
+ userId: string;
41
+
42
+ /**
43
+ * Mobile platform (iOS or Android).
44
+ *
45
+ * @generated from field: pidgr.v1.Platform platform = 3;
46
+ */
47
+ platform: Platform;
48
+
49
+ /**
50
+ * Push token used to send notifications to this device.
51
+ *
52
+ * @generated from field: string push_token = 4;
53
+ */
54
+ pushToken: string;
55
+
56
+ /**
57
+ * Whether the device is currently active and eligible for push delivery.
58
+ *
59
+ * @generated from field: bool active = 5;
60
+ */
61
+ active: boolean;
62
+
63
+ /**
64
+ * Timestamp of the last activity from this device.
65
+ *
66
+ * @generated from field: google.protobuf.Timestamp last_seen = 6;
67
+ */
68
+ lastSeen?: Timestamp;
69
+
70
+ /**
71
+ * Timestamp when the device was first registered.
72
+ *
73
+ * @generated from field: google.protobuf.Timestamp created_at = 7;
74
+ */
75
+ createdAt?: Timestamp;
76
+ };
77
+
78
+ /**
79
+ * Describes the message pidgr.v1.Device.
80
+ * Use `create(DeviceSchema)` to create a new message.
81
+ */
82
+ export const DeviceSchema: GenMessage<Device> = /*@__PURE__*/
83
+ messageDesc(file_pidgr_v1_device, 0);
84
+
85
+ /**
86
+ * A device summary safe for API responses — excludes sensitive push_token.
87
+ *
88
+ * @generated from message pidgr.v1.DeviceSummary
89
+ */
90
+ export type DeviceSummary = Message<"pidgr.v1.DeviceSummary"> & {
91
+ /**
92
+ * Unique identifier for this device.
93
+ *
94
+ * @generated from field: string device_id = 1;
95
+ */
96
+ deviceId: string;
97
+
98
+ /**
99
+ * ID of the user who owns this device.
100
+ *
101
+ * @generated from field: string user_id = 2;
102
+ */
103
+ userId: string;
104
+
105
+ /**
106
+ * Mobile platform (iOS or Android).
107
+ *
108
+ * @generated from field: pidgr.v1.Platform platform = 3;
109
+ */
110
+ platform: Platform;
111
+
112
+ /**
113
+ * Whether the device is currently active and eligible for push delivery.
114
+ *
115
+ * @generated from field: bool active = 4;
116
+ */
117
+ active: boolean;
118
+
119
+ /**
120
+ * Timestamp of the last activity from this device.
121
+ *
122
+ * @generated from field: google.protobuf.Timestamp last_seen = 5;
123
+ */
124
+ lastSeen?: Timestamp;
125
+
126
+ /**
127
+ * Timestamp when the device was first registered.
128
+ *
129
+ * @generated from field: google.protobuf.Timestamp created_at = 6;
130
+ */
131
+ createdAt?: Timestamp;
132
+ };
133
+
134
+ /**
135
+ * Describes the message pidgr.v1.DeviceSummary.
136
+ * Use `create(DeviceSummarySchema)` to create a new message.
137
+ */
138
+ export const DeviceSummarySchema: GenMessage<DeviceSummary> = /*@__PURE__*/
139
+ messageDesc(file_pidgr_v1_device, 1);
140
+
141
+ /**
142
+ * Request to register a device for push notifications.
143
+ *
144
+ * @generated from message pidgr.v1.RegisterRequest
145
+ */
146
+ export type RegisterRequest = Message<"pidgr.v1.RegisterRequest"> & {
147
+ /**
148
+ * Client-generated unique device identifier.
149
+ * Constraints: UUID format (36 characters).
150
+ *
151
+ * @generated from field: string device_id = 1;
152
+ */
153
+ deviceId: string;
154
+
155
+ /**
156
+ * Mobile platform of the device.
157
+ *
158
+ * @generated from field: pidgr.v1.Platform platform = 2;
159
+ */
160
+ platform: Platform;
161
+
162
+ /**
163
+ * Push token obtained from the push notification provider on the client.
164
+ * Constraints: Max length 4096 characters.
165
+ *
166
+ * @generated from field: string push_token = 3;
167
+ */
168
+ pushToken: string;
169
+ };
170
+
171
+ /**
172
+ * Describes the message pidgr.v1.RegisterRequest.
173
+ * Use `create(RegisterRequestSchema)` to create a new message.
174
+ */
175
+ export const RegisterRequestSchema: GenMessage<RegisterRequest> = /*@__PURE__*/
176
+ messageDesc(file_pidgr_v1_device, 2);
177
+
178
+ /**
179
+ * Response after registering a device.
180
+ *
181
+ * @generated from message pidgr.v1.RegisterResponse
182
+ */
183
+ export type RegisterResponse = Message<"pidgr.v1.RegisterResponse"> & {
184
+ /**
185
+ * The registered device summary (excludes push_token).
186
+ *
187
+ * @generated from field: pidgr.v1.DeviceSummary device = 1;
188
+ */
189
+ device?: DeviceSummary;
190
+ };
191
+
192
+ /**
193
+ * Describes the message pidgr.v1.RegisterResponse.
194
+ * Use `create(RegisterResponseSchema)` to create a new message.
195
+ */
196
+ export const RegisterResponseSchema: GenMessage<RegisterResponse> = /*@__PURE__*/
197
+ messageDesc(file_pidgr_v1_device, 3);
198
+
199
+ /**
200
+ * Request to deactivate a device, stopping push notifications.
201
+ *
202
+ * @generated from message pidgr.v1.DeactivateRequest
203
+ */
204
+ export type DeactivateRequest = Message<"pidgr.v1.DeactivateRequest"> & {
205
+ /**
206
+ * ID of the device to deactivate.
207
+ * Constraints: UUID format (36 characters).
208
+ *
209
+ * @generated from field: string device_id = 1;
210
+ */
211
+ deviceId: string;
212
+ };
213
+
214
+ /**
215
+ * Describes the message pidgr.v1.DeactivateRequest.
216
+ * Use `create(DeactivateRequestSchema)` to create a new message.
217
+ */
218
+ export const DeactivateRequestSchema: GenMessage<DeactivateRequest> = /*@__PURE__*/
219
+ messageDesc(file_pidgr_v1_device, 4);
220
+
221
+ /**
222
+ * Response after deactivating a device.
223
+ *
224
+ * @generated from message pidgr.v1.DeactivateResponse
225
+ */
226
+ export type DeactivateResponse = Message<"pidgr.v1.DeactivateResponse"> & {
227
+ /**
228
+ * Whether the device was successfully deactivated.
229
+ *
230
+ * @generated from field: bool success = 1;
231
+ */
232
+ success: boolean;
233
+ };
234
+
235
+ /**
236
+ * Describes the message pidgr.v1.DeactivateResponse.
237
+ * Use `create(DeactivateResponseSchema)` to create a new message.
238
+ */
239
+ export const DeactivateResponseSchema: GenMessage<DeactivateResponse> = /*@__PURE__*/
240
+ messageDesc(file_pidgr_v1_device, 5);
241
+
242
+ /**
243
+ * Request to list all devices for the authenticated user.
244
+ *
245
+ * @generated from message pidgr.v1.ListDevicesRequest
246
+ */
247
+ export type ListDevicesRequest = Message<"pidgr.v1.ListDevicesRequest"> & {
248
+ };
249
+
250
+ /**
251
+ * Describes the message pidgr.v1.ListDevicesRequest.
252
+ * Use `create(ListDevicesRequestSchema)` to create a new message.
253
+ */
254
+ export const ListDevicesRequestSchema: GenMessage<ListDevicesRequest> = /*@__PURE__*/
255
+ messageDesc(file_pidgr_v1_device, 6);
256
+
257
+ /**
258
+ * Response containing all devices for the user.
259
+ *
260
+ * @generated from message pidgr.v1.ListDevicesResponse
261
+ */
262
+ export type ListDevicesResponse = Message<"pidgr.v1.ListDevicesResponse"> & {
263
+ /**
264
+ * List of devices registered to the authenticated user.
265
+ *
266
+ * @generated from field: repeated pidgr.v1.DeviceSummary devices = 1;
267
+ */
268
+ devices: DeviceSummary[];
269
+ };
270
+
271
+ /**
272
+ * Describes the message pidgr.v1.ListDevicesResponse.
273
+ * Use `create(ListDevicesResponseSchema)` to create a new message.
274
+ */
275
+ export const ListDevicesResponseSchema: GenMessage<ListDevicesResponse> = /*@__PURE__*/
276
+ messageDesc(file_pidgr_v1_device, 7);
277
+
278
+ /**
279
+ * Request to list devices for a specific member (admin use).
280
+ *
281
+ * @generated from message pidgr.v1.ListMemberDevicesRequest
282
+ */
283
+ export type ListMemberDevicesRequest = Message<"pidgr.v1.ListMemberDevicesRequest"> & {
284
+ /**
285
+ * ID of the user whose devices to list.
286
+ * Constraints: UUID format (36 characters).
287
+ *
288
+ * @generated from field: string user_id = 1;
289
+ */
290
+ userId: string;
291
+ };
292
+
293
+ /**
294
+ * Describes the message pidgr.v1.ListMemberDevicesRequest.
295
+ * Use `create(ListMemberDevicesRequestSchema)` to create a new message.
296
+ */
297
+ export const ListMemberDevicesRequestSchema: GenMessage<ListMemberDevicesRequest> = /*@__PURE__*/
298
+ messageDesc(file_pidgr_v1_device, 8);
299
+
300
+ /**
301
+ * Response containing all devices for the specified member.
302
+ *
303
+ * @generated from message pidgr.v1.ListMemberDevicesResponse
304
+ */
305
+ export type ListMemberDevicesResponse = Message<"pidgr.v1.ListMemberDevicesResponse"> & {
306
+ /**
307
+ * List of devices registered to the specified user.
308
+ *
309
+ * @generated from field: repeated pidgr.v1.DeviceSummary devices = 1;
310
+ */
311
+ devices: DeviceSummary[];
312
+ };
313
+
314
+ /**
315
+ * Describes the message pidgr.v1.ListMemberDevicesResponse.
316
+ * Use `create(ListMemberDevicesResponseSchema)` to create a new message.
317
+ */
318
+ export const ListMemberDevicesResponseSchema: GenMessage<ListMemberDevicesResponse> = /*@__PURE__*/
319
+ messageDesc(file_pidgr_v1_device, 9);
320
+
321
+ /**
322
+ * Manages push notification device registration.
323
+ * Used by the mobile app to register push tokens and manage device lifecycle.
324
+ *
325
+ * @generated from service pidgr.v1.DeviceService
326
+ */
327
+ export const DeviceService: GenService<{
328
+ /**
329
+ * Register a device with its push token for receiving notifications.
330
+ * Authorization: Authenticated user (own devices only).
331
+ *
332
+ * @generated from rpc pidgr.v1.DeviceService.Register
333
+ */
334
+ register: {
335
+ methodKind: "unary";
336
+ input: typeof RegisterRequestSchema;
337
+ output: typeof RegisterResponseSchema;
338
+ },
339
+ /**
340
+ * Deactivate a device, preventing further push notifications.
341
+ * Authorization: Authenticated user (own devices only).
342
+ *
343
+ * @generated from rpc pidgr.v1.DeviceService.Deactivate
344
+ */
345
+ deactivate: {
346
+ methodKind: "unary";
347
+ input: typeof DeactivateRequestSchema;
348
+ output: typeof DeactivateResponseSchema;
349
+ },
350
+ /**
351
+ * List all devices registered to the authenticated user.
352
+ * Authorization: Authenticated user (own devices only).
353
+ *
354
+ * @generated from rpc pidgr.v1.DeviceService.ListDevices
355
+ */
356
+ listDevices: {
357
+ methodKind: "unary";
358
+ input: typeof ListDevicesRequestSchema;
359
+ output: typeof ListDevicesResponseSchema;
360
+ },
361
+ /**
362
+ * List all devices for a specific organization member.
363
+ * Authorization: Requires MEMBERS_READ permission.
364
+ *
365
+ * @generated from rpc pidgr.v1.DeviceService.ListMemberDevices
366
+ */
367
+ listMemberDevices: {
368
+ methodKind: "unary";
369
+ input: typeof ListMemberDevicesRequestSchema;
370
+ output: typeof ListMemberDevicesResponseSchema;
371
+ },
372
+ }> = /*@__PURE__*/
373
+ serviceDesc(file_pidgr_v1_device, 0);
374
+