@mochabug/adaptkit 0.11.3 → 0.11.4
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.
|
@@ -255,71 +255,86 @@ export interface Manifest {
|
|
|
255
255
|
* @generated from protobuf field: optional string assets = 13;
|
|
256
256
|
*/
|
|
257
257
|
assets?: string;
|
|
258
|
+
/**
|
|
259
|
+
* 'cdn' is the URL of the plugin's CDN (content delivery network).
|
|
260
|
+
* The CDN is used to serve static assets, such as images, CSS, and JavaScript
|
|
261
|
+
* files. The files will be located on https://cdn.mochabug.com/adapt/plugins/<owner>/<plugin>/<version>/
|
|
262
|
+
*
|
|
263
|
+
* Restrictions:
|
|
264
|
+
* - Must be valid folder starting from the manifest.json file
|
|
265
|
+
* Security implications:
|
|
266
|
+
* - Should not contain sensitive information.
|
|
267
|
+
*
|
|
268
|
+
* @generated from protobuf field: optional string cdn = 14;
|
|
269
|
+
*/
|
|
270
|
+
cdn?: string;
|
|
258
271
|
/**
|
|
259
272
|
* 'vertices' is a list of vertices that constitute the plugin.
|
|
260
273
|
*
|
|
261
274
|
* Restrictions:
|
|
262
275
|
* - The count must be greater than 0 and less than or equal to 100.
|
|
263
276
|
*
|
|
264
|
-
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.Vertex vertices =
|
|
277
|
+
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.Vertex vertices = 15;
|
|
265
278
|
*/
|
|
266
279
|
vertices: Vertex[];
|
|
267
280
|
/**
|
|
268
|
-
*
|
|
281
|
+
* The plugin oauth2 services specifies oauth2 services that is required for the plugin.
|
|
282
|
+
* i.e. no user consent is needed
|
|
283
|
+
*
|
|
269
284
|
* OAuth2 parameters are specified in the platform, and the service name is
|
|
270
285
|
* used as an identifier to fetch the access token from the API.
|
|
271
286
|
* - Must have between 0 and 20 oauth2 services, inclusive.
|
|
272
287
|
*
|
|
273
|
-
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.
|
|
288
|
+
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.Oauth2Service plugin_oauth2 = 16;
|
|
274
289
|
*/
|
|
275
|
-
|
|
290
|
+
pluginOauth2: Oauth2Service[];
|
|
276
291
|
/**
|
|
277
|
-
* '
|
|
292
|
+
* 'plugin_variables' represents the variables required by the plugin.
|
|
278
293
|
* The platform ensures secure storage and transmission of variables.
|
|
294
|
+
* i.e. a plugin owner sets these variables and the plugin can use them
|
|
279
295
|
*
|
|
280
296
|
* Restrictions:
|
|
281
297
|
* - Must have between 0 and 20 variables, inclusive.
|
|
282
298
|
*
|
|
283
|
-
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.
|
|
299
|
+
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.VariableService plugin_variables = 17;
|
|
284
300
|
*/
|
|
285
|
-
|
|
301
|
+
pluginVariables: VariableService[];
|
|
286
302
|
/**
|
|
287
|
-
* '
|
|
303
|
+
* 'plugin_mtls' represents the mTLS (mutual TLS) certificates required by
|
|
288
304
|
* the plugin. The platform ensures secure storage and transmission of
|
|
289
305
|
* certificates.
|
|
306
|
+
* i.e. a plugin owner sets these certificates and the plugin can use them
|
|
290
307
|
*
|
|
291
308
|
* Restrictions:
|
|
292
309
|
* - Must have between 0 and 20 mtls services, inclusive.
|
|
293
310
|
*
|
|
294
|
-
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.MTLSService
|
|
311
|
+
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.MTLSService plugin_mtls = 18;
|
|
295
312
|
*/
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* 'cdn' is the URL of the plugin's CDN (content delivery network).
|
|
299
|
-
* The CDN is used to serve static assets, such as images, CSS, and JavaScript
|
|
300
|
-
* files. The files will be located on https://cdn.mochabug.com/adapt/plugins/<owner>/<plugin>/<version>/
|
|
301
|
-
*
|
|
302
|
-
* Restrictions:
|
|
303
|
-
* - Must be valid folder starting from the manifest.json file
|
|
304
|
-
* Security implications:
|
|
305
|
-
* - Should not contain sensitive information.
|
|
306
|
-
*
|
|
307
|
-
* @generated from protobuf field: optional string cdn = 18;
|
|
308
|
-
*/
|
|
309
|
-
cdn?: string;
|
|
313
|
+
pluginMtls: MTLSService[];
|
|
310
314
|
}
|
|
311
315
|
/**
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
+
* Vertex represents a graph vertex that defines a plugin.
|
|
317
|
+
* The ES module names and entry points follow a convention for the executor and
|
|
318
|
+
* configurators files:
|
|
319
|
+
* - export {<vertex-name>InternalConfigurator} for the internal endpoint of the
|
|
320
|
+
* vertex configurator
|
|
321
|
+
* - export {<vertex-name>ExternalConfigurator} for the external endpoint of the
|
|
322
|
+
* vertex configurator
|
|
323
|
+
* - export {<vertex-name>InternalExecutor} for the internal endpoint of the
|
|
324
|
+
* vertex executor
|
|
325
|
+
* - export {<vertex-name>ExternalExecutor} for the external endpoint of the
|
|
326
|
+
* vertex executor
|
|
316
327
|
*
|
|
317
|
-
*
|
|
328
|
+
*
|
|
329
|
+
* Note: Be aware of potential security implications when dealing with
|
|
330
|
+
* user-provided data, such as file paths, and ensure proper input validation
|
|
331
|
+
* and sanitization.
|
|
332
|
+
*
|
|
333
|
+
* @generated from protobuf message mochabugapis.adapt.plugins.v1.Vertex
|
|
318
334
|
*/
|
|
319
|
-
export interface
|
|
335
|
+
export interface Vertex {
|
|
320
336
|
/**
|
|
321
|
-
* 'name'
|
|
322
|
-
* It's used for referencing the specific mTLS configuration.
|
|
337
|
+
* 'name' represents the vertex name.
|
|
323
338
|
*
|
|
324
339
|
* Restrictions:
|
|
325
340
|
* - Must match the ECMA regex: ^[_$a-z][_$a-z0-9]*$
|
|
@@ -331,23 +346,22 @@ export interface MTLSService {
|
|
|
331
346
|
*/
|
|
332
347
|
name: string;
|
|
333
348
|
/**
|
|
334
|
-
* 'label' is
|
|
335
|
-
* service.
|
|
349
|
+
* 'label' is a human-friendly label shown in the UI.
|
|
336
350
|
*
|
|
337
351
|
* Restrictions:
|
|
338
352
|
* - Length must be greater than 0 and less than 25 characters.
|
|
339
353
|
* Security implications:
|
|
340
354
|
* - Should not contain sensitive information.
|
|
341
355
|
*
|
|
342
|
-
* @generated from protobuf field:
|
|
356
|
+
* @generated from protobuf field: string label = 2;
|
|
343
357
|
*/
|
|
344
|
-
label
|
|
358
|
+
label: string;
|
|
345
359
|
/**
|
|
346
|
-
* 'description' is
|
|
347
|
-
*
|
|
360
|
+
* 'description' is a human-friendly short description of the vertex displayed
|
|
361
|
+
* in UI.
|
|
348
362
|
*
|
|
349
363
|
* Restrictions:
|
|
350
|
-
* - Length must be less than 250 characters.
|
|
364
|
+
* - Length must be greater than 0 and less than 250 characters.
|
|
351
365
|
* Security implications:
|
|
352
366
|
* - Should not contain sensitive information.
|
|
353
367
|
*
|
|
@@ -355,142 +369,195 @@ export interface MTLSService {
|
|
|
355
369
|
*/
|
|
356
370
|
description?: string;
|
|
357
371
|
/**
|
|
358
|
-
*
|
|
359
|
-
*
|
|
372
|
+
* 'logo' is the file path to the vertex logo, which will be resized to a
|
|
373
|
+
* maximum of 40x40 pixels. Ensure that the logo files are from trusted
|
|
374
|
+
* sources to avoid security risks.
|
|
360
375
|
*
|
|
361
|
-
*
|
|
376
|
+
* Restrictions:
|
|
377
|
+
* - Must be a valid Unix file path.
|
|
378
|
+
* - Must match the ECMA regex: ^/[^/\0]*(/[^/\0]+)*[^/]$
|
|
379
|
+
* - Length must be less than 4096 characters.
|
|
380
|
+
* - Supported formats: GIF (.gif), JPEG (.jpg, .jpeg, .jfif, .pjpeg, .pjp),
|
|
381
|
+
* PNG (.png),
|
|
382
|
+
* SVG (.svg), WEBP (.webp), and AVIF (.avif).
|
|
383
|
+
*
|
|
384
|
+
* @generated from protobuf field: optional string logo = 4;
|
|
362
385
|
*/
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* OAuth2Service defines the OAuth2 configuration required for a plugin.
|
|
367
|
-
*
|
|
368
|
-
* @generated from protobuf message mochabugapis.adapt.plugins.v1.OAuth2Service
|
|
369
|
-
*/
|
|
370
|
-
export interface OAuth2Service {
|
|
386
|
+
logo?: string;
|
|
371
387
|
/**
|
|
372
|
-
* '
|
|
388
|
+
* 'type' specifies the type of the vertex.
|
|
373
389
|
*
|
|
374
390
|
* Restrictions:
|
|
375
|
-
* - Must
|
|
376
|
-
* - Length must be greater than 0 and less than 50 characters.
|
|
377
|
-
* Security implications:
|
|
378
|
-
* - Should not contain sensitive information.
|
|
391
|
+
* - Must not be VERTEX_TYPE_UNSPECIFIED.
|
|
379
392
|
*
|
|
380
|
-
* @generated from protobuf field:
|
|
393
|
+
* @generated from protobuf field: mochabugapis.adapt.plugins.v1.Vertex.VertexType type = 5;
|
|
381
394
|
*/
|
|
382
|
-
|
|
395
|
+
type: Vertex_VertexType;
|
|
383
396
|
/**
|
|
384
|
-
* '
|
|
397
|
+
* 'config' is an field that contains
|
|
398
|
+
* a Unix file path.
|
|
399
|
+
*
|
|
400
|
+
* Security implications:
|
|
401
|
+
* - Ensure that the file path points to a trusted location.
|
|
402
|
+
* - Validate and sanitize the JSON string before using it in your
|
|
403
|
+
* application.
|
|
385
404
|
*
|
|
386
|
-
*
|
|
405
|
+
* Restrictions:
|
|
406
|
+
* 1. a Unix file path:
|
|
407
|
+
* - Must match the ECMA regex: ^/[^/\0]*(/[^/\0]+)*[^/]$
|
|
408
|
+
* - Length must be less than 4096 characters.
|
|
409
|
+
* - Allowed format: .json
|
|
410
|
+
* 2. We always require a default config
|
|
411
|
+
* 3. plugin.cue#VertexConfig must validate the config
|
|
412
|
+
*
|
|
413
|
+
*
|
|
414
|
+
* @generated from protobuf field: string config = 6;
|
|
387
415
|
*/
|
|
388
|
-
|
|
416
|
+
config: string;
|
|
389
417
|
/**
|
|
390
|
-
* '
|
|
418
|
+
* 'configurator' is a field to indicate whether or not
|
|
419
|
+
* the vertex has a configurator
|
|
391
420
|
*
|
|
392
|
-
* @generated from protobuf field:
|
|
421
|
+
* @generated from protobuf field: bool configurator = 7;
|
|
393
422
|
*/
|
|
394
|
-
|
|
423
|
+
configurator: boolean;
|
|
395
424
|
/**
|
|
396
|
-
*
|
|
397
|
-
* service.
|
|
425
|
+
* The variables field represents a list of EnvironemntalVariable instances for user-defined environmental variables.
|
|
398
426
|
*
|
|
399
|
-
*
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
427
|
+
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.VariableService variables = 8;
|
|
428
|
+
*/
|
|
429
|
+
variables: VariableService[];
|
|
430
|
+
/**
|
|
431
|
+
* The mtls field contains a list of MTLSService instances for user-defined mTLS services.
|
|
403
432
|
*
|
|
404
|
-
* @generated from protobuf field:
|
|
433
|
+
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.MTLSService mtls = 9;
|
|
405
434
|
*/
|
|
406
|
-
|
|
435
|
+
mtls: MTLSService[];
|
|
407
436
|
/**
|
|
408
|
-
*
|
|
437
|
+
* The code_oauth2 field stores a list of bindings to the actual code flow definitions.
|
|
409
438
|
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
* Security implications:
|
|
413
|
-
* - Should not contain sensitive information.
|
|
439
|
+
* If any of the OAuth2 services referred to in these bindings are not configured and are not marked as 'optional'
|
|
440
|
+
* in their respective ServiceBinding, the plugin might not be able to properly authenticate and authorize its operations.
|
|
414
441
|
*
|
|
415
|
-
* @generated from protobuf field:
|
|
442
|
+
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.Oauth2CodeBinding code_oauth2 = 10;
|
|
416
443
|
*/
|
|
417
|
-
|
|
444
|
+
codeOauth2: Oauth2CodeBinding[];
|
|
445
|
+
/**
|
|
446
|
+
* It's required that the client credentials grant type is set on this service
|
|
447
|
+
*
|
|
448
|
+
* @generated from protobuf field: repeated mochabugapis.adapt.plugins.v1.Oauth2Service client_credentials_oauth2 = 11;
|
|
449
|
+
*/
|
|
450
|
+
clientCredentialsOauth2: Oauth2Service[];
|
|
418
451
|
}
|
|
419
452
|
/**
|
|
420
|
-
*
|
|
453
|
+
* VertexType represents the type of a vertex.
|
|
421
454
|
*
|
|
422
|
-
* @generated from protobuf enum mochabugapis.adapt.plugins.v1.
|
|
455
|
+
* @generated from protobuf enum mochabugapis.adapt.plugins.v1.Vertex.VertexType
|
|
423
456
|
*/
|
|
424
|
-
export declare enum
|
|
457
|
+
export declare enum Vertex_VertexType {
|
|
425
458
|
/**
|
|
426
|
-
*
|
|
459
|
+
* Unspecified type (default value, should not be used).
|
|
427
460
|
*
|
|
428
|
-
* @generated from protobuf enum value:
|
|
461
|
+
* @generated from protobuf enum value: VERTEX_TYPE_UNSPECIFIED = 0;
|
|
429
462
|
*/
|
|
430
463
|
UNSPECIFIED = 0,
|
|
431
464
|
/**
|
|
432
|
-
*
|
|
433
|
-
*
|
|
465
|
+
* Action type, available in all contexts and not exposed to the outside
|
|
466
|
+
* world. This type has a lower security risk.
|
|
467
|
+
*
|
|
468
|
+
* @generated from protobuf enum value: VERTEX_TYPE_ACTION = 1;
|
|
469
|
+
*/
|
|
470
|
+
ACTION = 1,
|
|
471
|
+
/**
|
|
472
|
+
* Browser type, available only in a browser context.
|
|
473
|
+
* The configuration always runs inside a browser context.
|
|
474
|
+
* Security implications: be cautious about potentially sensitive data
|
|
475
|
+
* exposure.
|
|
476
|
+
*
|
|
477
|
+
* @generated from protobuf enum value: VERTEX_TYPE_BROWSER = 2;
|
|
478
|
+
*/
|
|
479
|
+
BROWSER = 2,
|
|
480
|
+
/**
|
|
481
|
+
* CronTrigger type, available only in a trigger context.
|
|
482
|
+
* Triggered at specific intervals.
|
|
434
483
|
*
|
|
435
|
-
* @generated from protobuf enum value:
|
|
484
|
+
* @generated from protobuf enum value: VERTEX_TYPE_CRON_TRIGGER = 3;
|
|
436
485
|
*/
|
|
437
|
-
|
|
486
|
+
CRON_TRIGGER = 3,
|
|
438
487
|
/**
|
|
439
|
-
*
|
|
440
|
-
*
|
|
488
|
+
* ExternalTrigger type, available only in a trigger context.
|
|
489
|
+
* Accessible via a publicly routable address.
|
|
490
|
+
* Security implications: be cautious about exposing sensitive data or
|
|
491
|
+
* functionality.
|
|
441
492
|
*
|
|
442
|
-
* @generated from protobuf enum value:
|
|
493
|
+
* @generated from protobuf enum value: VERTEX_TYPE_EXTERNAL_TRIGGER = 4;
|
|
443
494
|
*/
|
|
444
|
-
|
|
495
|
+
EXTERNAL_TRIGGER = 4
|
|
445
496
|
}
|
|
446
497
|
/**
|
|
447
|
-
*
|
|
448
|
-
*
|
|
498
|
+
* MTLSService represents a mutual Transport Layer Security (mTLS) service
|
|
499
|
+
* configuration required by the plugin. mTLS provides secure communication
|
|
500
|
+
* between client and server by authenticating both parties and encrypting the
|
|
501
|
+
* communication.
|
|
449
502
|
*
|
|
450
|
-
* @generated from protobuf
|
|
503
|
+
* @generated from protobuf message mochabugapis.adapt.plugins.v1.MTLSService
|
|
451
504
|
*/
|
|
452
|
-
export
|
|
505
|
+
export interface MTLSService {
|
|
453
506
|
/**
|
|
454
|
-
*
|
|
507
|
+
* 'name' is the identifier of the mTLS service.
|
|
508
|
+
* It's used for referencing the specific mTLS configuration.
|
|
455
509
|
*
|
|
456
|
-
*
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
*
|
|
510
|
+
* Restrictions:
|
|
511
|
+
* - Must match the ECMA regex: ^[_$a-z][_$a-z0-9]*$
|
|
512
|
+
* - Length must be greater than 0 and less than 50 characters.
|
|
513
|
+
* Security implications:
|
|
514
|
+
* - Should not contain sensitive information.
|
|
461
515
|
*
|
|
462
|
-
* @generated from protobuf
|
|
516
|
+
* @generated from protobuf field: string name = 1;
|
|
463
517
|
*/
|
|
464
|
-
|
|
518
|
+
name: string;
|
|
465
519
|
/**
|
|
466
|
-
*
|
|
520
|
+
* 'label' is an optional short label describing the purpose of the mTLS
|
|
521
|
+
* service.
|
|
467
522
|
*
|
|
468
|
-
*
|
|
523
|
+
* Restrictions:
|
|
524
|
+
* - Length must be greater than 0 and less than 25 characters.
|
|
525
|
+
* Security implications:
|
|
526
|
+
* - Should not contain sensitive information.
|
|
527
|
+
*
|
|
528
|
+
* @generated from protobuf field: optional string label = 2;
|
|
469
529
|
*/
|
|
470
|
-
|
|
530
|
+
label?: string;
|
|
471
531
|
/**
|
|
472
|
-
*
|
|
532
|
+
* 'description' is an optional detailed description of the mTLS service and
|
|
533
|
+
* its usage within the plugin.
|
|
473
534
|
*
|
|
474
|
-
*
|
|
535
|
+
* Restrictions:
|
|
536
|
+
* - Length must be less than 250 characters.
|
|
537
|
+
* Security implications:
|
|
538
|
+
* - Should not contain sensitive information.
|
|
539
|
+
*
|
|
540
|
+
* @generated from protobuf field: optional string description = 3;
|
|
475
541
|
*/
|
|
476
|
-
|
|
542
|
+
description?: string;
|
|
477
543
|
/**
|
|
478
|
-
*
|
|
544
|
+
* Unset or false means the variable is required
|
|
545
|
+
* true means the mtls service is optional
|
|
479
546
|
*
|
|
480
|
-
* @generated from protobuf
|
|
547
|
+
* @generated from protobuf field: optional bool optional = 4;
|
|
481
548
|
*/
|
|
482
|
-
|
|
549
|
+
optional?: boolean;
|
|
483
550
|
}
|
|
484
551
|
/**
|
|
485
|
-
* A representation of
|
|
552
|
+
* A representation of a variable.
|
|
486
553
|
*
|
|
487
|
-
* This message represents
|
|
554
|
+
* This message represents a variable used within the hosting platform.
|
|
488
555
|
* Environmental variables are essential for configuring applications and services hosted on the platform.
|
|
489
556
|
* They store values that can be accessed by the application or service during runtime.
|
|
490
557
|
*
|
|
491
|
-
* @generated from protobuf message mochabugapis.adapt.plugins.v1.
|
|
558
|
+
* @generated from protobuf message mochabugapis.adapt.plugins.v1.VariableService
|
|
492
559
|
*/
|
|
493
|
-
export interface
|
|
560
|
+
export interface VariableService {
|
|
494
561
|
/**
|
|
495
562
|
* 'name' is the identifier of the variable, which is referenced where needed.
|
|
496
563
|
*
|
|
@@ -535,9 +602,9 @@ export interface EnvironmentalVariable {
|
|
|
535
602
|
* - TYPE_STRING: Indicates that the variable will hold a string value. Strings are commonly used for configuration settings.
|
|
536
603
|
* - TYPE_SWITCH: Indicates that the variable is a boolean value. It can have either true or false as its value.
|
|
537
604
|
*
|
|
538
|
-
* @generated from protobuf field: mochabugapis.adapt.plugins.v1.
|
|
605
|
+
* @generated from protobuf field: mochabugapis.adapt.plugins.v1.VariableService.Type type = 4;
|
|
539
606
|
*/
|
|
540
|
-
type:
|
|
607
|
+
type: VariableService_Type;
|
|
541
608
|
/**
|
|
542
609
|
* Unset or false means the variable is required
|
|
543
610
|
* true means the variable is optional
|
|
@@ -549,9 +616,9 @@ export interface EnvironmentalVariable {
|
|
|
549
616
|
/**
|
|
550
617
|
* The type of variable
|
|
551
618
|
*
|
|
552
|
-
* @generated from protobuf enum mochabugapis.adapt.plugins.v1.
|
|
619
|
+
* @generated from protobuf enum mochabugapis.adapt.plugins.v1.VariableService.Type
|
|
553
620
|
*/
|
|
554
|
-
export declare enum
|
|
621
|
+
export declare enum VariableService_Type {
|
|
555
622
|
/**
|
|
556
623
|
* The type is not specified. Invalid value
|
|
557
624
|
*
|
|
@@ -578,53 +645,13 @@ export declare enum EnvironmentalVariable_Type {
|
|
|
578
645
|
SWITCH = 3
|
|
579
646
|
}
|
|
580
647
|
/**
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* Each ServiceBinding instance denotes a requirement of a OAuth2Service.
|
|
584
|
-
* The binding points to the required service by its 'name' and indicates whether the service is 'optional' or required.
|
|
585
|
-
*
|
|
586
|
-
* @generated from protobuf message mochabugapis.adapt.plugins.v1.ServiceBinding
|
|
587
|
-
*/
|
|
588
|
-
export interface ServiceBinding {
|
|
589
|
-
/**
|
|
590
|
-
* The 'name' field specifies the name of the service to bind to. The name should match the 'name' field of
|
|
591
|
-
* the corresponding OAuth2Service.
|
|
592
|
-
*
|
|
593
|
-
* @generated from protobuf field: string name = 1;
|
|
594
|
-
*/
|
|
595
|
-
name: string;
|
|
596
|
-
/**
|
|
597
|
-
* The 'optional' field indicates whether the service binding is optional or required. If 'optional' is
|
|
598
|
-
* set to true, the service is not strictly required and the plugin can function without it. If 'optional'
|
|
599
|
-
* is set to false, the service is required and the plugin might fail if it is not properly configured.
|
|
600
|
-
*
|
|
601
|
-
* @generated from protobuf field: optional bool optional = 2;
|
|
602
|
-
*/
|
|
603
|
-
optional?: boolean;
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
606
|
-
* Vertex represents a graph vertex that defines a plugin.
|
|
607
|
-
* The ES module names and entry points follow a convention for the executor and
|
|
608
|
-
* configurators files:
|
|
609
|
-
* - export {<vertex-name>InternalConfigurator} for the internal endpoint of the
|
|
610
|
-
* vertex configurator
|
|
611
|
-
* - export {<vertex-name>ExternalConfigurator} for the external endpoint of the
|
|
612
|
-
* vertex configurator
|
|
613
|
-
* - export {<vertex-name>InternalExecutor} for the internal endpoint of the
|
|
614
|
-
* vertex executor
|
|
615
|
-
* - export {<vertex-name>ExternalExecutor} for the external endpoint of the
|
|
616
|
-
* vertex executor
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
* Note: Be aware of potential security implications when dealing with
|
|
620
|
-
* user-provided data, such as file paths, and ensure proper input validation
|
|
621
|
-
* and sanitization.
|
|
648
|
+
* Oauth2 related to user tokens
|
|
622
649
|
*
|
|
623
|
-
* @generated from protobuf message mochabugapis.adapt.plugins.v1.
|
|
650
|
+
* @generated from protobuf message mochabugapis.adapt.plugins.v1.Oauth2Service
|
|
624
651
|
*/
|
|
625
|
-
export interface
|
|
652
|
+
export interface Oauth2Service {
|
|
626
653
|
/**
|
|
627
|
-
* 'name'
|
|
654
|
+
* 'name' is the identifier for the OAuth2 service.
|
|
628
655
|
*
|
|
629
656
|
* Restrictions:
|
|
630
657
|
* - Must match the ECMA regex: ^[_$a-z][_$a-z0-9]*$
|
|
@@ -636,19 +663,19 @@ export interface Vertex {
|
|
|
636
663
|
*/
|
|
637
664
|
name: string;
|
|
638
665
|
/**
|
|
639
|
-
* 'label' is
|
|
666
|
+
* 'label' is an optional short label describing the purpose of the OAuth2
|
|
667
|
+
* service.
|
|
640
668
|
*
|
|
641
669
|
* Restrictions:
|
|
642
670
|
* - Length must be greater than 0 and less than 25 characters.
|
|
643
671
|
* Security implications:
|
|
644
672
|
* - Should not contain sensitive information.
|
|
645
673
|
*
|
|
646
|
-
* @generated from protobuf field: string label = 2;
|
|
674
|
+
* @generated from protobuf field: optional string label = 2;
|
|
647
675
|
*/
|
|
648
|
-
label
|
|
676
|
+
label?: string;
|
|
649
677
|
/**
|
|
650
|
-
* 'description' is a
|
|
651
|
-
* in UI.
|
|
678
|
+
* 'description' is a full description about the oauth2 and what it's used for
|
|
652
679
|
*
|
|
653
680
|
* Restrictions:
|
|
654
681
|
* - Length must be greater than 0 and less than 250 characters.
|
|
@@ -659,129 +686,169 @@ export interface Vertex {
|
|
|
659
686
|
*/
|
|
660
687
|
description?: string;
|
|
661
688
|
/**
|
|
662
|
-
*
|
|
663
|
-
* maximum of 40x40 pixels. Ensure that the logo files are from trusted
|
|
664
|
-
* sources to avoid security risks.
|
|
689
|
+
* Set if the grant type is a code flow
|
|
665
690
|
*
|
|
666
|
-
*
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
*
|
|
691
|
+
* @generated from protobuf field: optional mochabugapis.adapt.plugins.v1.Oauth2Code code = 4;
|
|
692
|
+
*/
|
|
693
|
+
code?: Oauth2Code;
|
|
694
|
+
/**
|
|
695
|
+
* Unset or false means the variable is required
|
|
696
|
+
* true means the variable is optional
|
|
697
|
+
* Ignored for code flows since they are always required
|
|
673
698
|
*
|
|
674
|
-
* @generated from protobuf field: optional
|
|
699
|
+
* @generated from protobuf field: optional bool optional = 5;
|
|
675
700
|
*/
|
|
676
|
-
|
|
701
|
+
optional?: boolean;
|
|
677
702
|
/**
|
|
678
|
-
*
|
|
703
|
+
* The required scopes
|
|
679
704
|
*
|
|
680
|
-
*
|
|
681
|
-
|
|
705
|
+
* @generated from protobuf field: repeated string scopes = 6;
|
|
706
|
+
*/
|
|
707
|
+
scopes: string[];
|
|
708
|
+
/**
|
|
709
|
+
* The required auth method
|
|
682
710
|
*
|
|
683
|
-
* @generated from protobuf field: mochabugapis.adapt.plugins.v1.
|
|
711
|
+
* @generated from protobuf field: mochabugapis.adapt.plugins.v1.Oauth2AuthType auth_method = 7;
|
|
684
712
|
*/
|
|
685
|
-
|
|
713
|
+
authMethod: Oauth2AuthType;
|
|
686
714
|
/**
|
|
687
|
-
*
|
|
688
|
-
* a Unix file path.
|
|
715
|
+
* Optional algorithm that is required if using private JWT auth
|
|
689
716
|
*
|
|
690
|
-
*
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
717
|
+
* @generated from protobuf field: optional mochabugapis.adapt.plugins.v1.PrivateJWTAlg alg = 8;
|
|
718
|
+
*/
|
|
719
|
+
alg?: PrivateJWTAlg;
|
|
720
|
+
/**
|
|
721
|
+
* Not required for user accounts
|
|
694
722
|
*
|
|
695
|
-
*
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
*
|
|
700
|
-
* 2. We always require a default config
|
|
701
|
-
* 3. plugin.cue#VertexConfig must validate the config
|
|
723
|
+
* @generated from protobuf field: optional string client_id = 9;
|
|
724
|
+
*/
|
|
725
|
+
clientId?: string;
|
|
726
|
+
/**
|
|
727
|
+
* The required token endpoint
|
|
702
728
|
*
|
|
729
|
+
* @generated from protobuf field: string token_endpoint = 10;
|
|
730
|
+
*/
|
|
731
|
+
tokenEndpoint: string;
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Represents a binding to a code service
|
|
735
|
+
*
|
|
736
|
+
* The binding points to the required service by its 'name' and indicates whether the service is 'optional' or required.
|
|
737
|
+
*
|
|
738
|
+
* @generated from protobuf message mochabugapis.adapt.plugins.v1.Oauth2CodeBinding
|
|
739
|
+
*/
|
|
740
|
+
export interface Oauth2CodeBinding {
|
|
741
|
+
/**
|
|
742
|
+
* The 'name' field specifies the name of the service to bind to. The name should match the 'name' field of
|
|
743
|
+
* the corresponding OAuth2Service.
|
|
703
744
|
*
|
|
704
|
-
* @generated from protobuf field: string
|
|
745
|
+
* @generated from protobuf field: string name = 1;
|
|
705
746
|
*/
|
|
706
|
-
|
|
747
|
+
name: string;
|
|
707
748
|
/**
|
|
708
|
-
* '
|
|
709
|
-
*
|
|
710
|
-
*
|
|
711
|
-
* vertex configurator
|
|
712
|
-
* - export {<vertex-name>ExternalConfigurator} for the external endpoint of the
|
|
713
|
-
* vertex configurator
|
|
749
|
+
* The 'optional' field indicates whether the service binding is optional or required. If 'optional' is
|
|
750
|
+
* set to true, the service is not strictly required and the plugin can function without it. If 'optional'
|
|
751
|
+
* is set to false, the service is required and the plugin might fail if it is not properly configured.
|
|
714
752
|
*
|
|
715
|
-
* @generated from protobuf field: bool
|
|
753
|
+
* @generated from protobuf field: optional bool optional = 2;
|
|
716
754
|
*/
|
|
717
|
-
|
|
755
|
+
optional?: boolean;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* The code grant type
|
|
759
|
+
* IMPORTANT: it has to be configured with refresh token in order to work correctly
|
|
760
|
+
* this is not needed for client credentials of course since we are owning the client
|
|
761
|
+
*
|
|
762
|
+
* @generated from protobuf message mochabugapis.adapt.plugins.v1.Oauth2Code
|
|
763
|
+
*/
|
|
764
|
+
export interface Oauth2Code {
|
|
718
765
|
/**
|
|
719
|
-
* The
|
|
766
|
+
* The auth endpoint (i.e. where it gets redirected for login)
|
|
720
767
|
*
|
|
721
|
-
* @generated from protobuf field:
|
|
768
|
+
* @generated from protobuf field: string auth_endpoint = 1;
|
|
722
769
|
*/
|
|
723
|
-
|
|
770
|
+
authEndpoint: string;
|
|
724
771
|
/**
|
|
725
|
-
*
|
|
772
|
+
* Use OIDC flow
|
|
773
|
+
* True if we're using the OpenID connect protocol
|
|
774
|
+
* False if we're using the standard OAuth2 protocolƒ
|
|
726
775
|
*
|
|
727
|
-
* @generated from protobuf field:
|
|
776
|
+
* @generated from protobuf field: bool use_oidc = 2;
|
|
728
777
|
*/
|
|
729
|
-
|
|
778
|
+
useOidc: boolean;
|
|
730
779
|
/**
|
|
731
|
-
*
|
|
780
|
+
* Additional parameters used for the oauth2 login endpoint
|
|
781
|
+
* Do not include state or nonce here since we're generating them
|
|
782
|
+
* in the backend
|
|
732
783
|
*
|
|
733
|
-
*
|
|
734
|
-
|
|
735
|
-
|
|
784
|
+
* @generated from protobuf field: map<string, string> additional_params = 3;
|
|
785
|
+
*/
|
|
786
|
+
additionalParams: {
|
|
787
|
+
[key: string]: string;
|
|
788
|
+
};
|
|
789
|
+
/**
|
|
790
|
+
* Whether or not to use the PKCE extension
|
|
736
791
|
*
|
|
737
|
-
* @generated from protobuf field:
|
|
792
|
+
* @generated from protobuf field: bool use_pkce = 4;
|
|
738
793
|
*/
|
|
739
|
-
|
|
794
|
+
usePkce: boolean;
|
|
740
795
|
}
|
|
741
796
|
/**
|
|
742
|
-
*
|
|
797
|
+
* The algorithm used for the signing
|
|
743
798
|
*
|
|
744
|
-
* @generated from protobuf enum mochabugapis.adapt.plugins.v1.
|
|
799
|
+
* @generated from protobuf enum mochabugapis.adapt.plugins.v1.PrivateJWTAlg
|
|
745
800
|
*/
|
|
746
|
-
export declare enum
|
|
801
|
+
export declare enum PrivateJWTAlg {
|
|
747
802
|
/**
|
|
748
|
-
*
|
|
803
|
+
* Unkown algorithm
|
|
749
804
|
*
|
|
750
|
-
* @generated from protobuf enum value:
|
|
805
|
+
* @generated from protobuf enum value: PRIVATE_JWT_ALG_UNSPECIFIED = 0;
|
|
806
|
+
*/
|
|
807
|
+
PRIVATE_JWT_ALG_UNSPECIFIED = 0,
|
|
808
|
+
/**
|
|
809
|
+
* RS256 algorithm
|
|
810
|
+
*
|
|
811
|
+
* @generated from protobuf enum value: PRIVATE_JWT_ALG_RS256 = 1;
|
|
812
|
+
*/
|
|
813
|
+
PRIVATE_JWT_ALG_RS256 = 1
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* The oauth2 auth type. It has to be specified in the manifest
|
|
817
|
+
* since user defined client credentials will not support changing the auth type on the fly
|
|
818
|
+
*
|
|
819
|
+
* @generated from protobuf enum mochabugapis.adapt.plugins.v1.Oauth2AuthType
|
|
820
|
+
*/
|
|
821
|
+
export declare enum Oauth2AuthType {
|
|
822
|
+
/**
|
|
823
|
+
* Not specified
|
|
824
|
+
*
|
|
825
|
+
* @generated from protobuf enum value: OAUTH2_AUTH_TYPE_UNSPECIFIED = 0;
|
|
751
826
|
*/
|
|
752
827
|
UNSPECIFIED = 0,
|
|
753
828
|
/**
|
|
754
|
-
*
|
|
755
|
-
* world. This type has a lower security risk.
|
|
829
|
+
* Use basic authentication
|
|
756
830
|
*
|
|
757
|
-
* @generated from protobuf enum value:
|
|
831
|
+
* @generated from protobuf enum value: OAUTH2_AUTH_TYPE_BASIC = 1;
|
|
758
832
|
*/
|
|
759
|
-
|
|
833
|
+
BASIC = 1,
|
|
760
834
|
/**
|
|
761
|
-
*
|
|
762
|
-
* The configuration always runs inside a browser context.
|
|
763
|
-
* Security implications: be cautious about potentially sensitive data
|
|
764
|
-
* exposure.
|
|
835
|
+
* Use form authentication
|
|
765
836
|
*
|
|
766
|
-
* @generated from protobuf enum value:
|
|
837
|
+
* @generated from protobuf enum value: OAUTH2_AUTH_TYPE_FORM = 2;
|
|
767
838
|
*/
|
|
768
|
-
|
|
839
|
+
FORM = 2,
|
|
769
840
|
/**
|
|
770
|
-
*
|
|
771
|
-
* Triggered at specific intervals.
|
|
841
|
+
* The private key
|
|
772
842
|
*
|
|
773
|
-
* @generated from protobuf enum value:
|
|
843
|
+
* @generated from protobuf enum value: OAUTH2_AUTH_TYPE_PRIVATE_KEY = 3;
|
|
774
844
|
*/
|
|
775
|
-
|
|
845
|
+
PRIVATE_KEY = 3,
|
|
776
846
|
/**
|
|
777
|
-
*
|
|
778
|
-
* Accessible via a publicly routable address.
|
|
779
|
-
* Security implications: be cautious about exposing sensitive data or
|
|
780
|
-
* functionality.
|
|
847
|
+
* The mtls auth
|
|
781
848
|
*
|
|
782
|
-
* @generated from protobuf enum value:
|
|
849
|
+
* @generated from protobuf enum value: OAUTH2_AUTH_TYPE_MTLS = 4;
|
|
783
850
|
*/
|
|
784
|
-
|
|
851
|
+
MTLS = 4
|
|
785
852
|
}
|
|
786
853
|
declare class UploadPluginRequest$Type extends MessageType<UploadPluginRequest> {
|
|
787
854
|
constructor();
|
|
@@ -823,6 +890,16 @@ declare class Manifest$Type extends MessageType<Manifest> {
|
|
|
823
890
|
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Manifest
|
|
824
891
|
*/
|
|
825
892
|
export declare const Manifest: Manifest$Type;
|
|
893
|
+
declare class Vertex$Type extends MessageType<Vertex> {
|
|
894
|
+
constructor();
|
|
895
|
+
create(value?: PartialMessage<Vertex>): Vertex;
|
|
896
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Vertex): Vertex;
|
|
897
|
+
internalBinaryWrite(message: Vertex, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Vertex
|
|
901
|
+
*/
|
|
902
|
+
export declare const Vertex: Vertex$Type;
|
|
826
903
|
declare class MTLSService$Type extends MessageType<MTLSService> {
|
|
827
904
|
constructor();
|
|
828
905
|
create(value?: PartialMessage<MTLSService>): MTLSService;
|
|
@@ -833,46 +910,47 @@ declare class MTLSService$Type extends MessageType<MTLSService> {
|
|
|
833
910
|
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.MTLSService
|
|
834
911
|
*/
|
|
835
912
|
export declare const MTLSService: MTLSService$Type;
|
|
836
|
-
declare class
|
|
913
|
+
declare class VariableService$Type extends MessageType<VariableService> {
|
|
837
914
|
constructor();
|
|
838
|
-
create(value?: PartialMessage<
|
|
839
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
840
|
-
internalBinaryWrite(message:
|
|
915
|
+
create(value?: PartialMessage<VariableService>): VariableService;
|
|
916
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VariableService): VariableService;
|
|
917
|
+
internalBinaryWrite(message: VariableService, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
841
918
|
}
|
|
842
919
|
/**
|
|
843
|
-
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.
|
|
920
|
+
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.VariableService
|
|
844
921
|
*/
|
|
845
|
-
export declare const
|
|
846
|
-
declare class
|
|
922
|
+
export declare const VariableService: VariableService$Type;
|
|
923
|
+
declare class Oauth2Service$Type extends MessageType<Oauth2Service> {
|
|
847
924
|
constructor();
|
|
848
|
-
create(value?: PartialMessage<
|
|
849
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
850
|
-
internalBinaryWrite(message:
|
|
925
|
+
create(value?: PartialMessage<Oauth2Service>): Oauth2Service;
|
|
926
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Oauth2Service): Oauth2Service;
|
|
927
|
+
internalBinaryWrite(message: Oauth2Service, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
851
928
|
}
|
|
852
929
|
/**
|
|
853
|
-
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.
|
|
930
|
+
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Oauth2Service
|
|
854
931
|
*/
|
|
855
|
-
export declare const
|
|
856
|
-
declare class
|
|
932
|
+
export declare const Oauth2Service: Oauth2Service$Type;
|
|
933
|
+
declare class Oauth2CodeBinding$Type extends MessageType<Oauth2CodeBinding> {
|
|
857
934
|
constructor();
|
|
858
|
-
create(value?: PartialMessage<
|
|
859
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
860
|
-
internalBinaryWrite(message:
|
|
935
|
+
create(value?: PartialMessage<Oauth2CodeBinding>): Oauth2CodeBinding;
|
|
936
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Oauth2CodeBinding): Oauth2CodeBinding;
|
|
937
|
+
internalBinaryWrite(message: Oauth2CodeBinding, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
861
938
|
}
|
|
862
939
|
/**
|
|
863
|
-
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.
|
|
940
|
+
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Oauth2CodeBinding
|
|
864
941
|
*/
|
|
865
|
-
export declare const
|
|
866
|
-
declare class
|
|
942
|
+
export declare const Oauth2CodeBinding: Oauth2CodeBinding$Type;
|
|
943
|
+
declare class Oauth2Code$Type extends MessageType<Oauth2Code> {
|
|
867
944
|
constructor();
|
|
868
|
-
create(value?: PartialMessage<
|
|
869
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
870
|
-
|
|
945
|
+
create(value?: PartialMessage<Oauth2Code>): Oauth2Code;
|
|
946
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Oauth2Code): Oauth2Code;
|
|
947
|
+
private binaryReadMap3;
|
|
948
|
+
internalBinaryWrite(message: Oauth2Code, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
871
949
|
}
|
|
872
950
|
/**
|
|
873
|
-
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.
|
|
951
|
+
* @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Oauth2Code
|
|
874
952
|
*/
|
|
875
|
-
export declare const
|
|
953
|
+
export declare const Oauth2Code: Oauth2Code$Type;
|
|
876
954
|
/**
|
|
877
955
|
* @generated ServiceType for protobuf service mochabugapis.adapt.plugins.v1.PluginService
|
|
878
956
|
*/
|