@mochabug/adapt-web 0.0.1-beta

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.
Files changed (55) hide show
  1. package/dist/genproto/buf/validate/validate_pb.d.ts +4504 -0
  2. package/dist/genproto/buf/validate/validate_pb.js +422 -0
  3. package/dist/genproto/buf/validate/validate_pb.js.map +1 -0
  4. package/dist/genproto/google/api/annotations_pb.d.ts +13 -0
  5. package/dist/genproto/google/api/annotations_pb.js +27 -0
  6. package/dist/genproto/google/api/annotations_pb.js.map +1 -0
  7. package/dist/genproto/google/api/client_pb.d.ts +795 -0
  8. package/dist/genproto/google/api/client_pb.js +287 -0
  9. package/dist/genproto/google/api/client_pb.js.map +1 -0
  10. package/dist/genproto/google/api/http_pb.d.ts +440 -0
  11. package/dist/genproto/google/api/http_pb.js +34 -0
  12. package/dist/genproto/google/api/http_pb.js.map +1 -0
  13. package/dist/genproto/google/api/launch_stage_pb.d.ts +86 -0
  14. package/dist/genproto/google/api/launch_stage_pb.js +101 -0
  15. package/dist/genproto/google/api/launch_stage_pb.js.map +1 -0
  16. package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.d.ts +542 -0
  17. package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.js +157 -0
  18. package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.js.map +1 -0
  19. package/dist/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts +43 -0
  20. package/dist/genproto/mochabugapis/adapt/graph/exchange_pb.js +26 -0
  21. package/dist/genproto/mochabugapis/adapt/graph/exchange_pb.js.map +1 -0
  22. package/dist/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts +117 -0
  23. package/dist/genproto/mochabugapis/adapt/graph/jtd_schema_pb.js +25 -0
  24. package/dist/genproto/mochabugapis/adapt/graph/jtd_schema_pb.js.map +1 -0
  25. package/dist/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts +39 -0
  26. package/dist/genproto/mochabugapis/adapt/graph/receiver_pb.js +26 -0
  27. package/dist/genproto/mochabugapis/adapt/graph/receiver_pb.js.map +1 -0
  28. package/dist/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts +43 -0
  29. package/dist/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.js +26 -0
  30. package/dist/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.js.map +1 -0
  31. package/dist/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts +37 -0
  32. package/dist/genproto/mochabugapis/adapt/graph/transceiver_pb.js +26 -0
  33. package/dist/genproto/mochabugapis/adapt/graph/transceiver_pb.js.map +1 -0
  34. package/dist/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts +43 -0
  35. package/dist/genproto/mochabugapis/adapt/graph/transmitter_pb.js +26 -0
  36. package/dist/genproto/mochabugapis/adapt/graph/transmitter_pb.js.map +1 -0
  37. package/dist/genproto/mochabugapis/adapt/graph/vertex_config_pb.d.ts +62 -0
  38. package/dist/genproto/mochabugapis/adapt/graph/vertex_config_pb.js +28 -0
  39. package/dist/genproto/mochabugapis/adapt/graph/vertex_config_pb.js.map +1 -0
  40. package/dist/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts +815 -0
  41. package/dist/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.js +284 -0
  42. package/dist/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.js.map +1 -0
  43. package/dist/genproto/mochabugapis/adapt/runtime/v1/incoming_pb.d.ts +224 -0
  44. package/dist/genproto/mochabugapis/adapt/runtime/v1/incoming_pb.js +75 -0
  45. package/dist/genproto/mochabugapis/adapt/runtime/v1/incoming_pb.js.map +1 -0
  46. package/dist/genproto/mochabugapis/adapt/runtime/v1/runtime_pb.d.ts +1295 -0
  47. package/dist/genproto/mochabugapis/adapt/runtime/v1/runtime_pb.js +346 -0
  48. package/dist/genproto/mochabugapis/adapt/runtime/v1/runtime_pb.js.map +1 -0
  49. package/dist/genproto/mochabugapis/adapt/runtime/v1/store_pb.d.ts +530 -0
  50. package/dist/genproto/mochabugapis/adapt/runtime/v1/store_pb.js +225 -0
  51. package/dist/genproto/mochabugapis/adapt/runtime/v1/store_pb.js.map +1 -0
  52. package/dist/index.d.ts +29 -0
  53. package/dist/index.js +175 -0
  54. package/dist/index.js.map +1 -0
  55. package/package.json +37 -0
@@ -0,0 +1,815 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
2
+ import type { Message } from "@bufbuild/protobuf";
3
+ /**
4
+ * Describes the file mochabugapis/adapt/plugins/v1/plugins.proto.
5
+ */
6
+ export declare const file_mochabugapis_adapt_plugins_v1_plugins: GenFile;
7
+ /**
8
+ * UploadPluginRequest represents a single request in the CreatePlugin streaming
9
+ * RPC. The client sends a series of UploadPluginRequest messages containing
10
+ * plugin data, starting with a manifest and followed by one or more files.
11
+ *
12
+ * @generated from message mochabugapis.adapt.plugins.v1.UploadPluginRequest
13
+ */
14
+ export type UploadPluginRequest = Message<"mochabugapis.adapt.plugins.v1.UploadPluginRequest"> & {
15
+ /**
16
+ * 'data' is a oneof field that holds either a manifest or a file for the
17
+ * plugin.
18
+ *
19
+ * @generated from oneof mochabugapis.adapt.plugins.v1.UploadPluginRequest.data
20
+ */
21
+ data: {
22
+ /**
23
+ * 'manifest' is the Manifest describing the plugin.
24
+ * It must be the first message in the stream.
25
+ *
26
+ * @generated from field: mochabugapis.adapt.plugins.v1.Manifest manifest = 1;
27
+ */
28
+ value: Manifest;
29
+ case: "manifest";
30
+ } | {
31
+ /**
32
+ * 'file' is a File contained within the plugin.
33
+ * It follows the manifest in the stream.
34
+ *
35
+ * @generated from field: mochabugapis.adapt.plugins.v1.File file = 2;
36
+ */
37
+ value: File;
38
+ case: "file";
39
+ } | {
40
+ case: undefined;
41
+ value?: undefined;
42
+ };
43
+ };
44
+ /**
45
+ * Describes the message mochabugapis.adapt.plugins.v1.UploadPluginRequest.
46
+ * Use `create(UploadPluginRequestSchema)` to create a new message.
47
+ */
48
+ export declare const UploadPluginRequestSchema: GenMessage<UploadPluginRequest>;
49
+ /**
50
+ * UploadPluginResponse represents the response from the CreatePlugin streaming
51
+ * RPC. The server sends a single CreatePluginResponse after successfully
52
+ * processing all UploadPluginResponse messages from the client.
53
+ *
54
+ * @generated from message mochabugapis.adapt.plugins.v1.UploadPluginResponse
55
+ */
56
+ export type UploadPluginResponse = Message<"mochabugapis.adapt.plugins.v1.UploadPluginResponse"> & {};
57
+ /**
58
+ * Describes the message mochabugapis.adapt.plugins.v1.UploadPluginResponse.
59
+ * Use `create(UploadPluginResponseSchema)` to create a new message.
60
+ */
61
+ export declare const UploadPluginResponseSchema: GenMessage<UploadPluginResponse>;
62
+ /**
63
+ * File represents a file within a plugin package.
64
+ *
65
+ * @generated from message mochabugapis.adapt.plugins.v1.File
66
+ */
67
+ export type File = Message<"mochabugapis.adapt.plugins.v1.File"> & {
68
+ /**
69
+ * 'path' is the local file path relative to the manifest.json folder.
70
+ *
71
+ * @generated from field: string path = 1;
72
+ */
73
+ path: string;
74
+ /**
75
+ * 'data' contains the actual binary file data.
76
+ *
77
+ * @generated from field: bytes data = 2;
78
+ */
79
+ data: Uint8Array;
80
+ };
81
+ /**
82
+ * Describes the message mochabugapis.adapt.plugins.v1.File.
83
+ * Use `create(FileSchema)` to create a new message.
84
+ */
85
+ export declare const FileSchema: GenMessage<File>;
86
+ /**
87
+ * Manifest describes a plugin and its properties.
88
+ *
89
+ * Security considerations: The platform ensures that secrets and certificates
90
+ * are stored and transmitted securely.
91
+ *
92
+ * *** Plugin authors must also ensure that their implementations
93
+ * handle sensitive data appropriately! ***
94
+ *
95
+ * @generated from message mochabugapis.adapt.plugins.v1.Manifest
96
+ */
97
+ export type Manifest = Message<"mochabugapis.adapt.plugins.v1.Manifest"> & {
98
+ /**
99
+ * 'name' is the alpha-numeric identifier of the plugin. Must be conform to a ES variable name
100
+ *
101
+ * @generated from field: string name = 1;
102
+ */
103
+ name: string;
104
+ /**
105
+ * 'version' is the plugin's version, following SemVer 2.0: https://semver.org/
106
+ *
107
+ * @generated from field: string version = 2;
108
+ */
109
+ version: string;
110
+ /**
111
+ * 'label' is a human-friendly label displayed in the UI.
112
+ *
113
+ * @generated from field: string label = 3;
114
+ */
115
+ label: string;
116
+ /**
117
+ * 'description' is a short, human-friendly description displayed in the UI.
118
+ *
119
+ * @generated from field: string description = 4;
120
+ */
121
+ description: string;
122
+ /**
123
+ * 'organization' is the id of the organization the user belongs to.
124
+ *
125
+ * @generated from field: string organization = 5;
126
+ */
127
+ organization: string;
128
+ /**
129
+ * 'homepage' is the plugin's homepage URL.
130
+ *
131
+ * @generated from field: optional string homepage = 6;
132
+ */
133
+ homepage?: string;
134
+ /**
135
+ * 'repository' is the plugin's repository URL.
136
+ *
137
+ * @generated from field: optional string repository = 7;
138
+ */
139
+ repository?: string;
140
+ /**
141
+ * 'bugs' is the URL or email for reporting bugs.
142
+ *
143
+ * @generated from field: optional string bugs = 8;
144
+ */
145
+ bugs?: string;
146
+ /**
147
+ * 'author' is the name of the plugin's author.
148
+ *
149
+ * @generated from field: optional string author = 9;
150
+ */
151
+ author?: string;
152
+ /**
153
+ * 'logo' is an optional path to the plugin logo.
154
+ * The logo will be resized to a maximum of 80x80 pixels.
155
+ * - Supported file formats:
156
+ * - GIF: .gif
157
+ * - JPEG: .jpg, .jpeg, .jfif, .pjpeg, .pjp
158
+ * - PNG: .png
159
+ * - SVG: .svg
160
+ * - WEBP: .webp
161
+ * - AVIF: .avif
162
+ *
163
+ * @generated from field: optional string logo = 10;
164
+ */
165
+ logo?: string;
166
+ /**
167
+ * 'executors' is the path to the executor ES module file.
168
+ *
169
+ * @generated from field: string executors = 11;
170
+ */
171
+ executors: string;
172
+ /**
173
+ * 'configurators' is an optional path to the configurator ES module file.
174
+ *
175
+ * @generated from field: optional string configurators = 12;
176
+ */
177
+ configurators?: string;
178
+ /**
179
+ * 'assets' is an optional directory containing all static assets
180
+ * available to the plugin.
181
+ *
182
+ * @generated from field: optional string assets = 13;
183
+ */
184
+ assets?: string;
185
+ /**
186
+ * 'cdn' is the URL of the plugin's CDN (content delivery network).
187
+ * The CDN is used to serve static assets, such as images, CSS, and JavaScript
188
+ * files. The files will be located on https://cdn.mochabug.com/adapt/plugins/<owner>/<plugin>/<version>/
189
+ *
190
+ * @generated from field: optional string cdn = 14;
191
+ */
192
+ cdn?: string;
193
+ /**
194
+ * 'vertices' is a list of vertices that constitute the plugin.
195
+ *
196
+ * @generated from field: repeated mochabugapis.adapt.plugins.v1.Vertex vertices = 15;
197
+ */
198
+ vertices: Vertex[];
199
+ /**
200
+ * The plugin oauth2 services specifies oauth2 services that is required for the plugin.
201
+ * The client_id must be set for ALL oauth services here
202
+ *
203
+ * @generated from field: repeated mochabugapis.adapt.plugins.v1.Oauth2Service plugin_oauth2 = 16;
204
+ */
205
+ pluginOauth2: Oauth2Service[];
206
+ /**
207
+ * 'plugin_variables' represents the variables required by the plugin.
208
+ * The platform ensures secure storage and transmission of variables.
209
+ * i.e. a plugin owner sets these variables and the plugin can use them
210
+ *
211
+ * @generated from field: repeated mochabugapis.adapt.plugins.v1.VariableService plugin_variables = 17;
212
+ */
213
+ pluginVariables: VariableService[];
214
+ /**
215
+ * 'plugin_mtls' represents the mTLS (mutual TLS) certificates required by
216
+ * the plugin. The platform ensures secure storage and transmission of
217
+ * certificates.
218
+ * i.e. a plugin owner sets these certificates and the plugin can use them
219
+ *
220
+ * @generated from field: repeated mochabugapis.adapt.plugins.v1.MTLSService plugin_mtls = 18;
221
+ */
222
+ pluginMtls: MTLSService[];
223
+ };
224
+ /**
225
+ * Describes the message mochabugapis.adapt.plugins.v1.Manifest.
226
+ * Use `create(ManifestSchema)` to create a new message.
227
+ */
228
+ export declare const ManifestSchema: GenMessage<Manifest>;
229
+ /**
230
+ * Vertex represents a graph vertex that defines a plugin.
231
+ * Note: Be aware of potential security implications when dealing with
232
+ * user-provided data, such as file paths, and ensure proper input validation
233
+ * and sanitization.
234
+ *
235
+ * @generated from message mochabugapis.adapt.plugins.v1.Vertex
236
+ */
237
+ export type Vertex = Message<"mochabugapis.adapt.plugins.v1.Vertex"> & {
238
+ /**
239
+ * 'name' represents the vertex name.
240
+ *
241
+ * @generated from field: string name = 1;
242
+ */
243
+ name: string;
244
+ /**
245
+ * 'label' is a human-friendly label displayed in the UI.
246
+ *
247
+ * @generated from field: string label = 2;
248
+ */
249
+ label: string;
250
+ /**
251
+ * 'description' is a human-friendly short description of the vertex displayed
252
+ * in UI.
253
+ *
254
+ * @generated from field: optional string description = 3;
255
+ */
256
+ description?: string;
257
+ /**
258
+ * 'logo' is the file path to the vertex logo, which will be resized to a
259
+ * maximum of 40x40 pixels. Ensure that the logo files are from trusted
260
+ * sources to avoid security risks.
261
+ * - Supported file formats:
262
+ * - GIF: .gif
263
+ * - JPEG: .jpg, .jpeg, .jfif, .pjpeg, .pjp
264
+ * - PNG: .png
265
+ * - SVG: .svg
266
+ * - WEBP: .webp
267
+ * - AVIF: .avif
268
+ *
269
+ * @generated from field: optional string logo = 4;
270
+ */
271
+ logo?: string;
272
+ /**
273
+ * 'type' specifies the type of the vertex.
274
+ *
275
+ * @generated from field: mochabugapis.adapt.plugins.v1.Vertex.VertexType type = 5;
276
+ */
277
+ type: Vertex_VertexType;
278
+ /**
279
+ * 'config' is an field that contains a Unix file path.
280
+ * Restrictions:
281
+ *
282
+ *
283
+ * @generated from field: string config = 6;
284
+ */
285
+ config: string;
286
+ /**
287
+ * 'configurator' is a field to indicate whether or not
288
+ * the vertex has a configurator
289
+ *
290
+ * @generated from field: bool configurator = 7;
291
+ */
292
+ configurator: boolean;
293
+ /**
294
+ * The variables required by the vertex
295
+ *
296
+ * @generated from field: repeated mochabugapis.adapt.plugins.v1.VariableService variables = 8;
297
+ */
298
+ variables: VariableService[];
299
+ /**
300
+ * The mtls field contains a list of MTLSService instances for user-defined mTLS services.
301
+ *
302
+ * @generated from field: repeated mochabugapis.adapt.plugins.v1.MTLSService mtls = 9;
303
+ */
304
+ mtls: MTLSService[];
305
+ /**
306
+ * The code_oauth2 field stores a list of bindings to the actual code flow definitions.
307
+ *
308
+ * If any of the OAuth2 services referred to in these bindings are not configured and are not marked as 'optional'
309
+ * in their respective ServiceBinding, the plugin might not be able to properly authenticate and authorize its operations.
310
+ *
311
+ * @generated from field: repeated mochabugapis.adapt.plugins.v1.Oauth2CodeBinding code_oauth2 = 10;
312
+ */
313
+ codeOauth2: Oauth2CodeBinding[];
314
+ /**
315
+ * client_id must not be set, and code must not be set. It's only for user defined service accounts
316
+ *
317
+ * @generated from field: repeated mochabugapis.adapt.plugins.v1.Oauth2Service oauth2 = 11;
318
+ */
319
+ oauth2: Oauth2Service[];
320
+ };
321
+ /**
322
+ * Describes the message mochabugapis.adapt.plugins.v1.Vertex.
323
+ * Use `create(VertexSchema)` to create a new message.
324
+ */
325
+ export declare const VertexSchema: GenMessage<Vertex>;
326
+ /**
327
+ * VertexType represents the type of a vertex.
328
+ *
329
+ * @generated from enum mochabugapis.adapt.plugins.v1.Vertex.VertexType
330
+ */
331
+ export declare enum Vertex_VertexType {
332
+ /**
333
+ * Unspecified type (default value, should not be used).
334
+ *
335
+ * @generated from enum value: VERTEX_TYPE_UNSPECIFIED = 0;
336
+ */
337
+ UNSPECIFIED = 0,
338
+ /**
339
+ * Action type, available in all contexts and not exposed to the outside
340
+ * world. This type has a lower security risk.
341
+ *
342
+ * @generated from enum value: VERTEX_TYPE_ACTION = 1;
343
+ */
344
+ ACTION = 1,
345
+ /**
346
+ * Browser type, available only in a browser context.
347
+ * The configuration always runs inside a browser context.
348
+ * Security implications: be cautious about potentially sensitive data
349
+ * exposure.
350
+ *
351
+ * @generated from enum value: VERTEX_TYPE_BROWSER = 2;
352
+ */
353
+ BROWSER = 2,
354
+ /**
355
+ * CronTrigger type, available only in a trigger context.
356
+ * Triggered at specific intervals.
357
+ *
358
+ * @generated from enum value: VERTEX_TYPE_CRON_TRIGGER = 3;
359
+ */
360
+ CRON_TRIGGER = 3,
361
+ /**
362
+ * ExternalTrigger type, available only in a trigger context.
363
+ * Accessible via a publicly routable address.
364
+ * Security implications: be cautious about exposing sensitive data or
365
+ * functionality.
366
+ *
367
+ * @generated from enum value: VERTEX_TYPE_EXTERNAL_TRIGGER = 4;
368
+ */
369
+ EXTERNAL_TRIGGER = 4
370
+ }
371
+ /**
372
+ * Describes the enum mochabugapis.adapt.plugins.v1.Vertex.VertexType.
373
+ */
374
+ export declare const Vertex_VertexTypeSchema: GenEnum<Vertex_VertexType>;
375
+ /**
376
+ * MTLSService represents a mutual Transport Layer Security (mTLS) service
377
+ * configuration required by the plugin. mTLS provides secure communication
378
+ * between client and server by authenticating both parties and encrypting the
379
+ * communication.
380
+ *
381
+ * @generated from message mochabugapis.adapt.plugins.v1.MTLSService
382
+ */
383
+ export type MTLSService = Message<"mochabugapis.adapt.plugins.v1.MTLSService"> & {
384
+ /**
385
+ * 'name' is the identifier of the mTLS service.
386
+ * It's used for referencing the specific mTLS configuration.
387
+ *
388
+ * @generated from field: string name = 1;
389
+ */
390
+ name: string;
391
+ /**
392
+ * 'label' is an optional short label describing the purpose of the mTLS
393
+ * service.
394
+ *
395
+ * Restrictions:
396
+ * - Length must be greater than 0 and less than 25 characters.
397
+ * Security implications:
398
+ * - Should not contain sensitive information.
399
+ *
400
+ * @generated from field: optional string label = 2;
401
+ */
402
+ label?: string;
403
+ /**
404
+ * 'description' is an optional detailed description of the mTLS service and
405
+ * its usage within the plugin.
406
+ *
407
+ * @generated from field: optional string description = 3;
408
+ */
409
+ description?: string;
410
+ /**
411
+ * Unset or false means the variable is required
412
+ * true means the mtls service is optional
413
+ *
414
+ * @generated from field: optional bool optional = 4;
415
+ */
416
+ optional?: boolean;
417
+ };
418
+ /**
419
+ * Describes the message mochabugapis.adapt.plugins.v1.MTLSService.
420
+ * Use `create(MTLSServiceSchema)` to create a new message.
421
+ */
422
+ export declare const MTLSServiceSchema: GenMessage<MTLSService>;
423
+ /**
424
+ * A representation of a variable.
425
+ *
426
+ * This message represents a variable used within the hosting platform.
427
+ * Variables are essential for configuring applications and services hosted on the platform.
428
+ * They store values that can be accessed by the application or service during runtime.
429
+ *
430
+ * @generated from message mochabugapis.adapt.plugins.v1.VariableService
431
+ */
432
+ export type VariableService = Message<"mochabugapis.adapt.plugins.v1.VariableService"> & {
433
+ /**
434
+ * 'name' is the identifier of the variable, which is referenced where needed.
435
+ *
436
+ * @generated from field: string name = 1;
437
+ */
438
+ name: string;
439
+ /**
440
+ * 'label' is a short, human-readable label describing the purpose of the variable.
441
+ *
442
+ * @generated from field: optional string label = 2;
443
+ */
444
+ label?: string;
445
+ /**
446
+ * 'description' is a detailed description of the variable and its use.
447
+ *
448
+ * @generated from field: optional string description = 3;
449
+ */
450
+ description?: string;
451
+ /**
452
+ * The 'type' field specifies the data type of the environmental variable.
453
+ *
454
+ * @generated from field: mochabugapis.adapt.plugins.v1.VariableService.Type type = 4;
455
+ */
456
+ type: VariableService_Type;
457
+ /**
458
+ * Unset or false means the variable is required
459
+ * true means the variable is optional
460
+ *
461
+ * @generated from field: optional bool optional = 5;
462
+ */
463
+ optional?: boolean;
464
+ };
465
+ /**
466
+ * Describes the message mochabugapis.adapt.plugins.v1.VariableService.
467
+ * Use `create(VariableServiceSchema)` to create a new message.
468
+ */
469
+ export declare const VariableServiceSchema: GenMessage<VariableService>;
470
+ /**
471
+ * The type of variable
472
+ *
473
+ * @generated from enum mochabugapis.adapt.plugins.v1.VariableService.Type
474
+ */
475
+ export declare enum VariableService_Type {
476
+ /**
477
+ * The type is not specified. Invalid value
478
+ *
479
+ * @generated from enum value: TYPE_UNSPECIFIED = 0;
480
+ */
481
+ UNSPECIFIED = 0,
482
+ /**
483
+ * The variable will hold a secret
484
+ *
485
+ * @generated from enum value: TYPE_SECRET = 1;
486
+ */
487
+ SECRET = 1,
488
+ /**
489
+ * The variable will hold a string
490
+ *
491
+ * @generated from enum value: TYPE_STRING = 2;
492
+ */
493
+ STRING = 2,
494
+ /**
495
+ * The variable is a boolean value (a string either "true" or "false")
496
+ *
497
+ * @generated from enum value: TYPE_SWITCH = 3;
498
+ */
499
+ SWITCH = 3
500
+ }
501
+ /**
502
+ * Describes the enum mochabugapis.adapt.plugins.v1.VariableService.Type.
503
+ */
504
+ export declare const VariableService_TypeSchema: GenEnum<VariableService_Type>;
505
+ /**
506
+ * OAuth2 service configuration
507
+ *
508
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2Service
509
+ */
510
+ export type Oauth2Service = Message<"mochabugapis.adapt.plugins.v1.Oauth2Service"> & {
511
+ /**
512
+ * 'name' is the identifier for the OAuth2 service.
513
+ *
514
+ * @generated from field: string name = 1;
515
+ */
516
+ name: string;
517
+ /**
518
+ * 'label' is an optional short label describing the OAuth2 service.
519
+ *
520
+ * @generated from field: optional string label = 2;
521
+ */
522
+ label?: string;
523
+ /**
524
+ * 'description' provides a full description of the OAuth2 service.
525
+ *
526
+ * @generated from field: optional string description = 3;
527
+ */
528
+ description?: string;
529
+ /**
530
+ * The OAuth2 grant type to be used.
531
+ *
532
+ * @generated from field: mochabugapis.adapt.plugins.v1.Oauth2GrantType grant_type = 4;
533
+ */
534
+ grantType: Oauth2GrantType;
535
+ /**
536
+ * The required scopes.
537
+ *
538
+ * @generated from field: repeated string scopes = 5;
539
+ */
540
+ scopes: string[];
541
+ /**
542
+ * The client authentication method.
543
+ * REQUIRED when grant_type is:
544
+ * - OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE
545
+ * - OAUTH2_GRANT_TYPE_CLIENT_CREDENTIALS
546
+ *
547
+ * MUST NOT be set when grant_type is:
548
+ * - OAUTH2_GRANT_TYPE_JWT_BEARER
549
+ * - OAUTH2_GRANT_TYPE_SAML2_BEARER
550
+ *
551
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.Oauth2AuthType auth_method = 6;
552
+ */
553
+ authMethod?: Oauth2AuthType;
554
+ /**
555
+ * Algorithm used for signing assertions.
556
+ * REQUIRED when:
557
+ * - grant_type is OAUTH2_GRANT_TYPE_JWT_BEARER
558
+ * - grant_type is OAUTH2_GRANT_TYPE_SAML2_BEARER
559
+ * - auth_method is OAUTH2_AUTH_TYPE_PRIVATE_KEY_JWT
560
+ * - auth_method is OAUTH2_AUTH_TYPE_SAML2_BEARER
561
+ *
562
+ * MUST NOT be set otherwise.
563
+ *
564
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.PrivateKeyAlg alg = 7;
565
+ */
566
+ alg?: PrivateKeyAlg;
567
+ /**
568
+ * Client ID.
569
+ * This is required when used as plugin_oauth2, but not onto a vertex => oauth2
570
+ *
571
+ * @generated from field: optional string client_id = 8;
572
+ */
573
+ clientId?: string;
574
+ /**
575
+ * The token endpoint URL.
576
+ *
577
+ * @generated from field: string token_endpoint = 9;
578
+ */
579
+ tokenEndpoint: string;
580
+ /**
581
+ * Configuration specific to the Authorization Code grant type.
582
+ * REQUIRED when grant_type is OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE.
583
+ * MUST NOT be set otherwise.
584
+ *
585
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.Oauth2Code code = 10;
586
+ */
587
+ code?: Oauth2Code;
588
+ /**
589
+ * Indicates if the OAuth2 service is optional.
590
+ * This cannot be set to true in case of OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE
591
+ *
592
+ * @generated from field: optional bool optional = 11;
593
+ */
594
+ optional?: boolean;
595
+ };
596
+ /**
597
+ * Describes the message mochabugapis.adapt.plugins.v1.Oauth2Service.
598
+ * Use `create(Oauth2ServiceSchema)` to create a new message.
599
+ */
600
+ export declare const Oauth2ServiceSchema: GenMessage<Oauth2Service>;
601
+ /**
602
+ * Represents a binding to a code service
603
+ *
604
+ * The binding points to the required service by its 'name' and indicates whether the service is 'optional' or required.
605
+ *
606
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2CodeBinding
607
+ */
608
+ export type Oauth2CodeBinding = Message<"mochabugapis.adapt.plugins.v1.Oauth2CodeBinding"> & {
609
+ /**
610
+ * The 'name' field specifies the name of the service to bind to. The name should match the 'name' field of
611
+ * the corresponding OAuth2Service.
612
+ *
613
+ * @generated from field: string name = 1;
614
+ */
615
+ name: string;
616
+ /**
617
+ * The 'optional' field indicates whether the service binding is optional or required. If 'optional' is
618
+ * set to true, the service is not strictly required and the plugin can function without it. If 'optional'
619
+ * is set to false, the service is required and the plugin might fail if it is not properly configured.
620
+ *
621
+ * @generated from field: optional bool optional = 2;
622
+ */
623
+ optional?: boolean;
624
+ };
625
+ /**
626
+ * Describes the message mochabugapis.adapt.plugins.v1.Oauth2CodeBinding.
627
+ * Use `create(Oauth2CodeBindingSchema)` to create a new message.
628
+ */
629
+ export declare const Oauth2CodeBindingSchema: GenMessage<Oauth2CodeBinding>;
630
+ /**
631
+ * The code grant type
632
+ * IMPORTANT: it has to be configured with refresh token in order to work correctly
633
+ * this is not needed for client credentials of course since we are owning the client
634
+ * WE ONLY SUPPORT OIDC since we need the sub claim to distinguish between different users
635
+ *
636
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2Code
637
+ */
638
+ export type Oauth2Code = Message<"mochabugapis.adapt.plugins.v1.Oauth2Code"> & {
639
+ /**
640
+ * The auth endpoint (i.e. where it gets redirected for login)
641
+ *
642
+ * @generated from field: string auth_endpoint = 1;
643
+ */
644
+ authEndpoint: string;
645
+ /**
646
+ * We need to know the issuer in order to validate the token
647
+ *
648
+ * @generated from field: string issuer = 2;
649
+ */
650
+ issuer: string;
651
+ /**
652
+ * We also need the JWKs endpoint to validate the token
653
+ *
654
+ * @generated from field: string jwks_uri = 3;
655
+ */
656
+ jwksUri: string;
657
+ /**
658
+ * Additional parameters used for the oauth2 login endpoint
659
+ * Do not include state or nonce here since we're generating them
660
+ * in the backend. All params will be encoded in the URL
661
+ *
662
+ * @generated from field: map<string, string> additional_params = 4;
663
+ */
664
+ additionalParams: {
665
+ [key: string]: string;
666
+ };
667
+ /**
668
+ * Whether or not to use the PKCE extension
669
+ *
670
+ * @generated from field: bool use_pkce = 5;
671
+ */
672
+ usePkce: boolean;
673
+ };
674
+ /**
675
+ * Describes the message mochabugapis.adapt.plugins.v1.Oauth2Code.
676
+ * Use `create(Oauth2CodeSchema)` to create a new message.
677
+ */
678
+ export declare const Oauth2CodeSchema: GenMessage<Oauth2Code>;
679
+ /**
680
+ * The algorithm used for signing JWT or SAML assertions
681
+ *
682
+ * @generated from enum mochabugapis.adapt.plugins.v1.PrivateKeyAlg
683
+ */
684
+ export declare enum PrivateKeyAlg {
685
+ /**
686
+ * Unknown algorithm (invalid)
687
+ *
688
+ * @generated from enum value: PRIVATE_KEY_ALG_UNSPECIFIED = 0;
689
+ */
690
+ UNSPECIFIED = 0,
691
+ /**
692
+ * RS256 algorithm
693
+ *
694
+ * @generated from enum value: PRIVATE_KEY_ALG_RS256 = 1;
695
+ */
696
+ RS256 = 1
697
+ }
698
+ /**
699
+ * Describes the enum mochabugapis.adapt.plugins.v1.PrivateKeyAlg.
700
+ */
701
+ export declare const PrivateKeyAlgSchema: GenEnum<PrivateKeyAlg>;
702
+ /**
703
+ * The OAuth2 grant type
704
+ *
705
+ * @generated from enum mochabugapis.adapt.plugins.v1.Oauth2GrantType
706
+ */
707
+ export declare enum Oauth2GrantType {
708
+ /**
709
+ * Not specified (invalid)
710
+ *
711
+ * @generated from enum value: OAUTH2_GRANT_TYPE_UNSPECIFIED = 0;
712
+ */
713
+ UNSPECIFIED = 0,
714
+ /**
715
+ * Authorization Code Grant
716
+ * grant_type=authorization_code
717
+ *
718
+ * @generated from enum value: OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE = 1;
719
+ */
720
+ AUTHORIZATION_CODE = 1,
721
+ /**
722
+ * Client Credentials Grant
723
+ * grant_type=client_credentials
724
+ *
725
+ * @generated from enum value: OAUTH2_GRANT_TYPE_CLIENT_CREDENTIALS = 2;
726
+ */
727
+ CLIENT_CREDENTIALS = 2,
728
+ /**
729
+ * JWT Bearer Assertion Grant
730
+ * grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
731
+ *
732
+ * @generated from enum value: OAUTH2_GRANT_TYPE_JWT_BEARER = 3;
733
+ */
734
+ JWT_BEARER = 3,
735
+ /**
736
+ * SAML 2.0 Bearer Assertion Grant
737
+ * grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer
738
+ *
739
+ * @generated from enum value: OAUTH2_GRANT_TYPE_SAML2_BEARER = 4;
740
+ */
741
+ SAML2_BEARER = 4
742
+ }
743
+ /**
744
+ * Describes the enum mochabugapis.adapt.plugins.v1.Oauth2GrantType.
745
+ */
746
+ export declare const Oauth2GrantTypeSchema: GenEnum<Oauth2GrantType>;
747
+ /**
748
+ * The OAuth2 client authentication method
749
+ *
750
+ * @generated from enum mochabugapis.adapt.plugins.v1.Oauth2AuthType
751
+ */
752
+ export declare enum Oauth2AuthType {
753
+ /**
754
+ * Not specified (invalid)
755
+ *
756
+ * @generated from enum value: OAUTH2_AUTH_TYPE_UNSPECIFIED = 0;
757
+ */
758
+ UNSPECIFIED = 0,
759
+ /**
760
+ * Basic Authentication (client ID and secret in Authorization header)
761
+ *
762
+ * @generated from enum value: OAUTH2_AUTH_TYPE_BASIC = 1;
763
+ */
764
+ BASIC = 1,
765
+ /**
766
+ * Form Authentication (client ID and secret in form body)
767
+ *
768
+ * @generated from enum value: OAUTH2_AUTH_TYPE_FORM = 2;
769
+ */
770
+ FORM = 2,
771
+ /**
772
+ * Private Key JWT Authentication
773
+ * client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
774
+ *
775
+ * @generated from enum value: OAUTH2_AUTH_TYPE_PRIVATE_KEY_JWT = 3;
776
+ */
777
+ PRIVATE_KEY_JWT = 3,
778
+ /**
779
+ * Mutual TLS Authentication
780
+ *
781
+ * @generated from enum value: OAUTH2_AUTH_TYPE_MTLS = 4;
782
+ */
783
+ MTLS = 4,
784
+ /**
785
+ * SAML 2.0 Bearer Assertion for Client Authentication
786
+ * client_assertion_type=urn:ietf:params:oauth:client-assertion-type:saml2-bearer
787
+ *
788
+ * @generated from enum value: OAUTH2_AUTH_TYPE_SAML2_BEARER = 5;
789
+ */
790
+ SAML2_BEARER = 5
791
+ }
792
+ /**
793
+ * Describes the enum mochabugapis.adapt.plugins.v1.Oauth2AuthType.
794
+ */
795
+ export declare const Oauth2AuthTypeSchema: GenEnum<Oauth2AuthType>;
796
+ /**
797
+ * PluginService provides a service for uploading a plugin.
798
+ *
799
+ * @generated from service mochabugapis.adapt.plugins.v1.PluginService
800
+ */
801
+ export declare const PluginService: GenService<{
802
+ /**
803
+ * UploadPlugin is a streaming RPC method that allows uploading a plugin in
804
+ * chunks. The client can send multiple UploadPluginRequest messages, and the
805
+ * server will respond with a single UploadPluginResponse after processing all
806
+ * requests.
807
+ *
808
+ * @generated from rpc mochabugapis.adapt.plugins.v1.PluginService.UploadPlugin
809
+ */
810
+ uploadPlugin: {
811
+ methodKind: "client_streaming";
812
+ input: typeof UploadPluginRequestSchema;
813
+ output: typeof UploadPluginResponseSchema;
814
+ };
815
+ }>;