@mochabug/adaptkit 0.11.2 → 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.
package/bin/index.js CHANGED
@@ -43,150 +43,142 @@ import updateNotifier from 'update-notifier';
43
43
  // limitations under the License.
44
44
  //
45
45
  /**
46
- * GrantType represents the supported OAuth2 grant types.
47
- *
48
- * @generated from protobuf enum mochabugapis.adapt.plugins.v1.OAuth2Service.GrantType
49
- */
50
- var OAuth2Service_GrantType;
51
- (function (OAuth2Service_GrantType) {
52
- /**
53
- * GRANT_TYPE_UNSPECIFIED indicates an unspecified or invalid grant type.
54
- *
55
- * @generated from protobuf enum value: GRANT_TYPE_UNSPECIFIED = 0;
56
- */
57
- OAuth2Service_GrantType[OAuth2Service_GrantType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
58
- /**
59
- * GRANT_TYPE_CODE represents the authorization code grant type.
60
- * Access tokens are issued on a per-user basis.
61
- *
62
- * @generated from protobuf enum value: GRANT_TYPE_CODE = 1;
63
- */
64
- OAuth2Service_GrantType[OAuth2Service_GrantType["CODE"] = 1] = "CODE";
65
- /**
66
- * GRANT_TYPE_CLIENT_CREDENTIALS represents the client credentials grant
67
- * type. Access tokens are issued globally for the plugin.
68
- *
69
- * @generated from protobuf enum value: GRANT_TYPE_CLIENT_CREDENTIALS = 2;
70
- */
71
- OAuth2Service_GrantType[OAuth2Service_GrantType["CLIENT_CREDENTIALS"] = 2] = "CLIENT_CREDENTIALS";
72
- })(OAuth2Service_GrantType || (OAuth2Service_GrantType = {}));
73
- /**
74
- * The oauth2 auth type. It has to be specified in the manifest
75
- * since user defined client credentials will not support changing the auth type on the fly
46
+ * VertexType represents the type of a vertex.
76
47
  *
77
- * @generated from protobuf enum mochabugapis.adapt.plugins.v1.OAuth2Service.AuthType
48
+ * @generated from protobuf enum mochabugapis.adapt.plugins.v1.Vertex.VertexType
78
49
  */
79
- var OAuth2Service_AuthType;
80
- (function (OAuth2Service_AuthType) {
50
+ var Vertex_VertexType;
51
+ (function (Vertex_VertexType) {
81
52
  /**
82
- * Not specified
53
+ * Unspecified type (default value, should not be used).
83
54
  *
84
- * @generated from protobuf enum value: AUTH_TYPE_UNSPECIFIED = 0;
55
+ * @generated from protobuf enum value: VERTEX_TYPE_UNSPECIFIED = 0;
85
56
  */
86
- OAuth2Service_AuthType[OAuth2Service_AuthType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
57
+ Vertex_VertexType[Vertex_VertexType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
87
58
  /**
88
- * Use basic authentication
59
+ * Action type, available in all contexts and not exposed to the outside
60
+ * world. This type has a lower security risk.
89
61
  *
90
- * @generated from protobuf enum value: AUTH_TYPE_BASIC = 1;
62
+ * @generated from protobuf enum value: VERTEX_TYPE_ACTION = 1;
91
63
  */
92
- OAuth2Service_AuthType[OAuth2Service_AuthType["BASIC"] = 1] = "BASIC";
64
+ Vertex_VertexType[Vertex_VertexType["ACTION"] = 1] = "ACTION";
93
65
  /**
94
- * Use form authentication
66
+ * Browser type, available only in a browser context.
67
+ * The configuration always runs inside a browser context.
68
+ * Security implications: be cautious about potentially sensitive data
69
+ * exposure.
95
70
  *
96
- * @generated from protobuf enum value: AUTH_TYPE_FORM = 2;
71
+ * @generated from protobuf enum value: VERTEX_TYPE_BROWSER = 2;
97
72
  */
98
- OAuth2Service_AuthType[OAuth2Service_AuthType["FORM"] = 2] = "FORM";
73
+ Vertex_VertexType[Vertex_VertexType["BROWSER"] = 2] = "BROWSER";
99
74
  /**
100
- * The private key
75
+ * CronTrigger type, available only in a trigger context.
76
+ * Triggered at specific intervals.
101
77
  *
102
- * @generated from protobuf enum value: AUTH_TYPE_PRIVATE_KEY = 3;
78
+ * @generated from protobuf enum value: VERTEX_TYPE_CRON_TRIGGER = 3;
103
79
  */
104
- OAuth2Service_AuthType[OAuth2Service_AuthType["PRIVATE_KEY"] = 3] = "PRIVATE_KEY";
80
+ Vertex_VertexType[Vertex_VertexType["CRON_TRIGGER"] = 3] = "CRON_TRIGGER";
105
81
  /**
106
- * The mtls auth
82
+ * ExternalTrigger type, available only in a trigger context.
83
+ * Accessible via a publicly routable address.
84
+ * Security implications: be cautious about exposing sensitive data or
85
+ * functionality.
107
86
  *
108
- * @generated from protobuf enum value: AUTH_TYPE_MTLS = 4;
87
+ * @generated from protobuf enum value: VERTEX_TYPE_EXTERNAL_TRIGGER = 4;
109
88
  */
110
- OAuth2Service_AuthType[OAuth2Service_AuthType["MTLS"] = 4] = "MTLS";
111
- })(OAuth2Service_AuthType || (OAuth2Service_AuthType = {}));
89
+ Vertex_VertexType[Vertex_VertexType["EXTERNAL_TRIGGER"] = 4] = "EXTERNAL_TRIGGER";
90
+ })(Vertex_VertexType || (Vertex_VertexType = {}));
112
91
  /**
113
92
  * The type of variable
114
93
  *
115
- * @generated from protobuf enum mochabugapis.adapt.plugins.v1.EnvironmentalVariable.Type
94
+ * @generated from protobuf enum mochabugapis.adapt.plugins.v1.VariableService.Type
116
95
  */
117
- var EnvironmentalVariable_Type;
118
- (function (EnvironmentalVariable_Type) {
96
+ var VariableService_Type;
97
+ (function (VariableService_Type) {
119
98
  /**
120
99
  * The type is not specified. Invalid value
121
100
  *
122
101
  * @generated from protobuf enum value: TYPE_UNSPECIFIED = 0;
123
102
  */
124
- EnvironmentalVariable_Type[EnvironmentalVariable_Type["UNSPECIFIED"] = 0] = "UNSPECIFIED";
103
+ VariableService_Type[VariableService_Type["UNSPECIFIED"] = 0] = "UNSPECIFIED";
125
104
  /**
126
105
  * The variable will hold a secret
127
106
  *
128
107
  * @generated from protobuf enum value: TYPE_SECRET = 1;
129
108
  */
130
- EnvironmentalVariable_Type[EnvironmentalVariable_Type["SECRET"] = 1] = "SECRET";
109
+ VariableService_Type[VariableService_Type["SECRET"] = 1] = "SECRET";
131
110
  /**
132
111
  * The variable will hold a string
133
112
  *
134
113
  * @generated from protobuf enum value: TYPE_STRING = 2;
135
114
  */
136
- EnvironmentalVariable_Type[EnvironmentalVariable_Type["STRING"] = 2] = "STRING";
115
+ VariableService_Type[VariableService_Type["STRING"] = 2] = "STRING";
137
116
  /**
138
117
  * The variable is a boolean value
139
118
  *
140
119
  * @generated from protobuf enum value: TYPE_SWITCH = 3;
141
120
  */
142
- EnvironmentalVariable_Type[EnvironmentalVariable_Type["SWITCH"] = 3] = "SWITCH";
143
- })(EnvironmentalVariable_Type || (EnvironmentalVariable_Type = {}));
121
+ VariableService_Type[VariableService_Type["SWITCH"] = 3] = "SWITCH";
122
+ })(VariableService_Type || (VariableService_Type = {}));
144
123
  /**
145
- * VertexType represents the type of a vertex.
124
+ * The algorithm used for the signing
146
125
  *
147
- * @generated from protobuf enum mochabugapis.adapt.plugins.v1.Vertex.VertexType
126
+ * @generated from protobuf enum mochabugapis.adapt.plugins.v1.PrivateJWTAlg
148
127
  */
149
- var Vertex_VertexType;
150
- (function (Vertex_VertexType) {
128
+ var PrivateJWTAlg;
129
+ (function (PrivateJWTAlg) {
151
130
  /**
152
- * Unspecified type (default value, should not be used).
131
+ * Unkown algorithm
153
132
  *
154
- * @generated from protobuf enum value: VERTEX_TYPE_UNSPECIFIED = 0;
133
+ * @generated from protobuf enum value: PRIVATE_JWT_ALG_UNSPECIFIED = 0;
155
134
  */
156
- Vertex_VertexType[Vertex_VertexType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
135
+ PrivateJWTAlg[PrivateJWTAlg["PRIVATE_JWT_ALG_UNSPECIFIED"] = 0] = "PRIVATE_JWT_ALG_UNSPECIFIED";
157
136
  /**
158
- * Action type, available in all contexts and not exposed to the outside
159
- * world. This type has a lower security risk.
137
+ * RS256 algorithm
160
138
  *
161
- * @generated from protobuf enum value: VERTEX_TYPE_ACTION = 1;
139
+ * @generated from protobuf enum value: PRIVATE_JWT_ALG_RS256 = 1;
162
140
  */
163
- Vertex_VertexType[Vertex_VertexType["ACTION"] = 1] = "ACTION";
141
+ PrivateJWTAlg[PrivateJWTAlg["PRIVATE_JWT_ALG_RS256"] = 1] = "PRIVATE_JWT_ALG_RS256";
142
+ })(PrivateJWTAlg || (PrivateJWTAlg = {}));
143
+ /**
144
+ * The oauth2 auth type. It has to be specified in the manifest
145
+ * since user defined client credentials will not support changing the auth type on the fly
146
+ *
147
+ * @generated from protobuf enum mochabugapis.adapt.plugins.v1.Oauth2AuthType
148
+ */
149
+ var Oauth2AuthType;
150
+ (function (Oauth2AuthType) {
164
151
  /**
165
- * Browser type, available only in a browser context.
166
- * The configuration always runs inside a browser context.
167
- * Security implications: be cautious about potentially sensitive data
168
- * exposure.
152
+ * Not specified
169
153
  *
170
- * @generated from protobuf enum value: VERTEX_TYPE_BROWSER = 2;
154
+ * @generated from protobuf enum value: OAUTH2_AUTH_TYPE_UNSPECIFIED = 0;
171
155
  */
172
- Vertex_VertexType[Vertex_VertexType["BROWSER"] = 2] = "BROWSER";
156
+ Oauth2AuthType[Oauth2AuthType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
173
157
  /**
174
- * CronTrigger type, available only in a trigger context.
175
- * Triggered at specific intervals.
158
+ * Use basic authentication
176
159
  *
177
- * @generated from protobuf enum value: VERTEX_TYPE_CRON_TRIGGER = 3;
160
+ * @generated from protobuf enum value: OAUTH2_AUTH_TYPE_BASIC = 1;
178
161
  */
179
- Vertex_VertexType[Vertex_VertexType["CRON_TRIGGER"] = 3] = "CRON_TRIGGER";
162
+ Oauth2AuthType[Oauth2AuthType["BASIC"] = 1] = "BASIC";
180
163
  /**
181
- * ExternalTrigger type, available only in a trigger context.
182
- * Accessible via a publicly routable address.
183
- * Security implications: be cautious about exposing sensitive data or
184
- * functionality.
164
+ * Use form authentication
185
165
  *
186
- * @generated from protobuf enum value: VERTEX_TYPE_EXTERNAL_TRIGGER = 4;
166
+ * @generated from protobuf enum value: OAUTH2_AUTH_TYPE_FORM = 2;
187
167
  */
188
- Vertex_VertexType[Vertex_VertexType["EXTERNAL_TRIGGER"] = 4] = "EXTERNAL_TRIGGER";
189
- })(Vertex_VertexType || (Vertex_VertexType = {}));
168
+ Oauth2AuthType[Oauth2AuthType["FORM"] = 2] = "FORM";
169
+ /**
170
+ * The private key
171
+ *
172
+ * @generated from protobuf enum value: OAUTH2_AUTH_TYPE_PRIVATE_KEY = 3;
173
+ */
174
+ Oauth2AuthType[Oauth2AuthType["PRIVATE_KEY"] = 3] = "PRIVATE_KEY";
175
+ /**
176
+ * The mtls auth
177
+ *
178
+ * @generated from protobuf enum value: OAUTH2_AUTH_TYPE_MTLS = 4;
179
+ */
180
+ Oauth2AuthType[Oauth2AuthType["MTLS"] = 4] = "MTLS";
181
+ })(Oauth2AuthType || (Oauth2AuthType = {}));
190
182
  // @generated message type with reflection information, may provide speed optimized methods
191
183
  class UploadPluginRequest$Type extends MessageType {
192
184
  constructor() {
@@ -344,11 +336,11 @@ class Manifest$Type extends MessageType {
344
336
  { no: 11, name: "executors", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
345
337
  { no: 12, name: "configurators", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
346
338
  { no: 13, name: "assets", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
347
- { no: 14, name: "vertices", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Vertex },
348
- { no: 15, name: "oauth2", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => OAuth2Service },
349
- { no: 16, name: "variables", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => EnvironmentalVariable },
350
- { no: 17, name: "mtls", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => MTLSService },
351
- { no: 18, name: "cdn", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
339
+ { no: 14, name: "cdn", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
340
+ { no: 15, name: "vertices", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Vertex },
341
+ { no: 16, name: "plugin_oauth2", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Oauth2Service },
342
+ { no: 17, name: "plugin_variables", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => VariableService },
343
+ { no: 18, name: "plugin_mtls", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => MTLSService }
352
344
  ]);
353
345
  }
354
346
  create(value) {
@@ -360,9 +352,9 @@ class Manifest$Type extends MessageType {
360
352
  message.organization = "";
361
353
  message.executors = "";
362
354
  message.vertices = [];
363
- message.oauth2 = [];
364
- message.variables = [];
365
- message.mtls = [];
355
+ message.pluginOauth2 = [];
356
+ message.pluginVariables = [];
357
+ message.pluginMtls = [];
366
358
  if (value !== undefined)
367
359
  reflectionMergePartial(this, message, value);
368
360
  return message;
@@ -411,20 +403,20 @@ class Manifest$Type extends MessageType {
411
403
  case /* optional string assets */ 13:
412
404
  message.assets = reader.string();
413
405
  break;
414
- case /* repeated mochabugapis.adapt.plugins.v1.Vertex vertices */ 14:
415
- message.vertices.push(Vertex.internalBinaryRead(reader, reader.uint32(), options));
406
+ case /* optional string cdn */ 14:
407
+ message.cdn = reader.string();
416
408
  break;
417
- case /* repeated mochabugapis.adapt.plugins.v1.OAuth2Service oauth2 */ 15:
418
- message.oauth2.push(OAuth2Service.internalBinaryRead(reader, reader.uint32(), options));
409
+ case /* repeated mochabugapis.adapt.plugins.v1.Vertex vertices */ 15:
410
+ message.vertices.push(Vertex.internalBinaryRead(reader, reader.uint32(), options));
419
411
  break;
420
- case /* repeated mochabugapis.adapt.plugins.v1.EnvironmentalVariable variables */ 16:
421
- message.variables.push(EnvironmentalVariable.internalBinaryRead(reader, reader.uint32(), options));
412
+ case /* repeated mochabugapis.adapt.plugins.v1.Oauth2Service plugin_oauth2 */ 16:
413
+ message.pluginOauth2.push(Oauth2Service.internalBinaryRead(reader, reader.uint32(), options));
422
414
  break;
423
- case /* repeated mochabugapis.adapt.plugins.v1.MTLSService mtls */ 17:
424
- message.mtls.push(MTLSService.internalBinaryRead(reader, reader.uint32(), options));
415
+ case /* repeated mochabugapis.adapt.plugins.v1.VariableService plugin_variables */ 17:
416
+ message.pluginVariables.push(VariableService.internalBinaryRead(reader, reader.uint32(), options));
425
417
  break;
426
- case /* optional string cdn */ 18:
427
- message.cdn = reader.string();
418
+ case /* repeated mochabugapis.adapt.plugins.v1.MTLSService plugin_mtls */ 18:
419
+ message.pluginMtls.push(MTLSService.internalBinaryRead(reader, reader.uint32(), options));
428
420
  break;
429
421
  default:
430
422
  let u = options.readUnknownField;
@@ -477,21 +469,21 @@ class Manifest$Type extends MessageType {
477
469
  /* optional string assets = 13; */
478
470
  if (message.assets !== undefined)
479
471
  writer.tag(13, WireType.LengthDelimited).string(message.assets);
480
- /* repeated mochabugapis.adapt.plugins.v1.Vertex vertices = 14; */
481
- for (let i = 0; i < message.vertices.length; i++)
482
- Vertex.internalBinaryWrite(message.vertices[i], writer.tag(14, WireType.LengthDelimited).fork(), options).join();
483
- /* repeated mochabugapis.adapt.plugins.v1.OAuth2Service oauth2 = 15; */
484
- for (let i = 0; i < message.oauth2.length; i++)
485
- OAuth2Service.internalBinaryWrite(message.oauth2[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
486
- /* repeated mochabugapis.adapt.plugins.v1.EnvironmentalVariable variables = 16; */
487
- for (let i = 0; i < message.variables.length; i++)
488
- EnvironmentalVariable.internalBinaryWrite(message.variables[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
489
- /* repeated mochabugapis.adapt.plugins.v1.MTLSService mtls = 17; */
490
- for (let i = 0; i < message.mtls.length; i++)
491
- MTLSService.internalBinaryWrite(message.mtls[i], writer.tag(17, WireType.LengthDelimited).fork(), options).join();
492
- /* optional string cdn = 18; */
472
+ /* optional string cdn = 14; */
493
473
  if (message.cdn !== undefined)
494
- writer.tag(18, WireType.LengthDelimited).string(message.cdn);
474
+ writer.tag(14, WireType.LengthDelimited).string(message.cdn);
475
+ /* repeated mochabugapis.adapt.plugins.v1.Vertex vertices = 15; */
476
+ for (let i = 0; i < message.vertices.length; i++)
477
+ Vertex.internalBinaryWrite(message.vertices[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
478
+ /* repeated mochabugapis.adapt.plugins.v1.Oauth2Service plugin_oauth2 = 16; */
479
+ for (let i = 0; i < message.pluginOauth2.length; i++)
480
+ Oauth2Service.internalBinaryWrite(message.pluginOauth2[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
481
+ /* repeated mochabugapis.adapt.plugins.v1.VariableService plugin_variables = 17; */
482
+ for (let i = 0; i < message.pluginVariables.length; i++)
483
+ VariableService.internalBinaryWrite(message.pluginVariables[i], writer.tag(17, WireType.LengthDelimited).fork(), options).join();
484
+ /* repeated mochabugapis.adapt.plugins.v1.MTLSService plugin_mtls = 18; */
485
+ for (let i = 0; i < message.pluginMtls.length; i++)
486
+ MTLSService.internalBinaryWrite(message.pluginMtls[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();
495
487
  let u = options.writeUnknownFields;
496
488
  if (u !== false)
497
489
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -503,6 +495,131 @@ class Manifest$Type extends MessageType {
503
495
  */
504
496
  const Manifest = new Manifest$Type();
505
497
  // @generated message type with reflection information, may provide speed optimized methods
498
+ class Vertex$Type extends MessageType {
499
+ constructor() {
500
+ super("mochabugapis.adapt.plugins.v1.Vertex", [
501
+ { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
502
+ { no: 2, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
503
+ { no: 3, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
504
+ { no: 4, name: "logo", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
505
+ { no: 5, name: "type", kind: "enum", T: () => ["mochabugapis.adapt.plugins.v1.Vertex.VertexType", Vertex_VertexType, "VERTEX_TYPE_"] },
506
+ { no: 6, name: "config", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
507
+ { no: 7, name: "configurator", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
508
+ { no: 8, name: "variables", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => VariableService },
509
+ { no: 9, name: "mtls", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => MTLSService },
510
+ { no: 10, name: "code_oauth2", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Oauth2CodeBinding },
511
+ { no: 11, name: "client_credentials_oauth2", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Oauth2Service }
512
+ ]);
513
+ }
514
+ create(value) {
515
+ const message = globalThis.Object.create((this.messagePrototype));
516
+ message.name = "";
517
+ message.label = "";
518
+ message.type = 0;
519
+ message.config = "";
520
+ message.configurator = false;
521
+ message.variables = [];
522
+ message.mtls = [];
523
+ message.codeOauth2 = [];
524
+ message.clientCredentialsOauth2 = [];
525
+ if (value !== undefined)
526
+ reflectionMergePartial(this, message, value);
527
+ return message;
528
+ }
529
+ internalBinaryRead(reader, length, options, target) {
530
+ let message = target ?? this.create(), end = reader.pos + length;
531
+ while (reader.pos < end) {
532
+ let [fieldNo, wireType] = reader.tag();
533
+ switch (fieldNo) {
534
+ case /* string name */ 1:
535
+ message.name = reader.string();
536
+ break;
537
+ case /* string label */ 2:
538
+ message.label = reader.string();
539
+ break;
540
+ case /* optional string description */ 3:
541
+ message.description = reader.string();
542
+ break;
543
+ case /* optional string logo */ 4:
544
+ message.logo = reader.string();
545
+ break;
546
+ case /* mochabugapis.adapt.plugins.v1.Vertex.VertexType type */ 5:
547
+ message.type = reader.int32();
548
+ break;
549
+ case /* string config */ 6:
550
+ message.config = reader.string();
551
+ break;
552
+ case /* bool configurator */ 7:
553
+ message.configurator = reader.bool();
554
+ break;
555
+ case /* repeated mochabugapis.adapt.plugins.v1.VariableService variables */ 8:
556
+ message.variables.push(VariableService.internalBinaryRead(reader, reader.uint32(), options));
557
+ break;
558
+ case /* repeated mochabugapis.adapt.plugins.v1.MTLSService mtls */ 9:
559
+ message.mtls.push(MTLSService.internalBinaryRead(reader, reader.uint32(), options));
560
+ break;
561
+ case /* repeated mochabugapis.adapt.plugins.v1.Oauth2CodeBinding code_oauth2 */ 10:
562
+ message.codeOauth2.push(Oauth2CodeBinding.internalBinaryRead(reader, reader.uint32(), options));
563
+ break;
564
+ case /* repeated mochabugapis.adapt.plugins.v1.Oauth2Service client_credentials_oauth2 */ 11:
565
+ message.clientCredentialsOauth2.push(Oauth2Service.internalBinaryRead(reader, reader.uint32(), options));
566
+ break;
567
+ default:
568
+ let u = options.readUnknownField;
569
+ if (u === "throw")
570
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
571
+ let d = reader.skip(wireType);
572
+ if (u !== false)
573
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
574
+ }
575
+ }
576
+ return message;
577
+ }
578
+ internalBinaryWrite(message, writer, options) {
579
+ /* string name = 1; */
580
+ if (message.name !== "")
581
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
582
+ /* string label = 2; */
583
+ if (message.label !== "")
584
+ writer.tag(2, WireType.LengthDelimited).string(message.label);
585
+ /* optional string description = 3; */
586
+ if (message.description !== undefined)
587
+ writer.tag(3, WireType.LengthDelimited).string(message.description);
588
+ /* optional string logo = 4; */
589
+ if (message.logo !== undefined)
590
+ writer.tag(4, WireType.LengthDelimited).string(message.logo);
591
+ /* mochabugapis.adapt.plugins.v1.Vertex.VertexType type = 5; */
592
+ if (message.type !== 0)
593
+ writer.tag(5, WireType.Varint).int32(message.type);
594
+ /* string config = 6; */
595
+ if (message.config !== "")
596
+ writer.tag(6, WireType.LengthDelimited).string(message.config);
597
+ /* bool configurator = 7; */
598
+ if (message.configurator !== false)
599
+ writer.tag(7, WireType.Varint).bool(message.configurator);
600
+ /* repeated mochabugapis.adapt.plugins.v1.VariableService variables = 8; */
601
+ for (let i = 0; i < message.variables.length; i++)
602
+ VariableService.internalBinaryWrite(message.variables[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
603
+ /* repeated mochabugapis.adapt.plugins.v1.MTLSService mtls = 9; */
604
+ for (let i = 0; i < message.mtls.length; i++)
605
+ MTLSService.internalBinaryWrite(message.mtls[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
606
+ /* repeated mochabugapis.adapt.plugins.v1.Oauth2CodeBinding code_oauth2 = 10; */
607
+ for (let i = 0; i < message.codeOauth2.length; i++)
608
+ Oauth2CodeBinding.internalBinaryWrite(message.codeOauth2[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
609
+ /* repeated mochabugapis.adapt.plugins.v1.Oauth2Service client_credentials_oauth2 = 11; */
610
+ for (let i = 0; i < message.clientCredentialsOauth2.length; i++)
611
+ Oauth2Service.internalBinaryWrite(message.clientCredentialsOauth2[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
612
+ let u = options.writeUnknownFields;
613
+ if (u !== false)
614
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
615
+ return writer;
616
+ }
617
+ }
618
+ /**
619
+ * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Vertex
620
+ */
621
+ const Vertex = new Vertex$Type();
622
+ // @generated message type with reflection information, may provide speed optimized methods
506
623
  class MTLSService$Type extends MessageType {
507
624
  constructor() {
508
625
  super("mochabugapis.adapt.plugins.v1.MTLSService", [
@@ -571,21 +688,20 @@ class MTLSService$Type extends MessageType {
571
688
  */
572
689
  const MTLSService = new MTLSService$Type();
573
690
  // @generated message type with reflection information, may provide speed optimized methods
574
- class OAuth2Service$Type extends MessageType {
691
+ class VariableService$Type extends MessageType {
575
692
  constructor() {
576
- super("mochabugapis.adapt.plugins.v1.OAuth2Service", [
693
+ super("mochabugapis.adapt.plugins.v1.VariableService", [
577
694
  { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
578
- { no: 2, name: "grant_type", kind: "enum", T: () => ["mochabugapis.adapt.plugins.v1.OAuth2Service.GrantType", OAuth2Service_GrantType, "GRANT_TYPE_"] },
579
- { no: 3, name: "auth_type", kind: "enum", T: () => ["mochabugapis.adapt.plugins.v1.OAuth2Service.AuthType", OAuth2Service_AuthType, "AUTH_TYPE_"] },
580
- { no: 4, name: "label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
581
- { no: 5, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
695
+ { no: 2, name: "label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
696
+ { no: 3, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
697
+ { no: 4, name: "type", kind: "enum", T: () => ["mochabugapis.adapt.plugins.v1.VariableService.Type", VariableService_Type, "TYPE_"] },
698
+ { no: 5, name: "optional", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
582
699
  ]);
583
700
  }
584
701
  create(value) {
585
702
  const message = globalThis.Object.create((this.messagePrototype));
586
703
  message.name = "";
587
- message.grantType = 0;
588
- message.authType = 0;
704
+ message.type = 0;
589
705
  if (value !== undefined)
590
706
  reflectionMergePartial(this, message, value);
591
707
  return message;
@@ -598,18 +714,18 @@ class OAuth2Service$Type extends MessageType {
598
714
  case /* string name */ 1:
599
715
  message.name = reader.string();
600
716
  break;
601
- case /* mochabugapis.adapt.plugins.v1.OAuth2Service.GrantType grant_type */ 2:
602
- message.grantType = reader.int32();
603
- break;
604
- case /* mochabugapis.adapt.plugins.v1.OAuth2Service.AuthType auth_type */ 3:
605
- message.authType = reader.int32();
606
- break;
607
- case /* optional string label */ 4:
717
+ case /* optional string label */ 2:
608
718
  message.label = reader.string();
609
719
  break;
610
- case /* optional string description */ 5:
720
+ case /* optional string description */ 3:
611
721
  message.description = reader.string();
612
722
  break;
723
+ case /* mochabugapis.adapt.plugins.v1.VariableService.Type type */ 4:
724
+ message.type = reader.int32();
725
+ break;
726
+ case /* optional bool optional */ 5:
727
+ message.optional = reader.bool();
728
+ break;
613
729
  default:
614
730
  let u = options.readUnknownField;
615
731
  if (u === "throw")
@@ -625,18 +741,18 @@ class OAuth2Service$Type extends MessageType {
625
741
  /* string name = 1; */
626
742
  if (message.name !== "")
627
743
  writer.tag(1, WireType.LengthDelimited).string(message.name);
628
- /* mochabugapis.adapt.plugins.v1.OAuth2Service.GrantType grant_type = 2; */
629
- if (message.grantType !== 0)
630
- writer.tag(2, WireType.Varint).int32(message.grantType);
631
- /* mochabugapis.adapt.plugins.v1.OAuth2Service.AuthType auth_type = 3; */
632
- if (message.authType !== 0)
633
- writer.tag(3, WireType.Varint).int32(message.authType);
634
- /* optional string label = 4; */
744
+ /* optional string label = 2; */
635
745
  if (message.label !== undefined)
636
- writer.tag(4, WireType.LengthDelimited).string(message.label);
637
- /* optional string description = 5; */
746
+ writer.tag(2, WireType.LengthDelimited).string(message.label);
747
+ /* optional string description = 3; */
638
748
  if (message.description !== undefined)
639
- writer.tag(5, WireType.LengthDelimited).string(message.description);
749
+ writer.tag(3, WireType.LengthDelimited).string(message.description);
750
+ /* mochabugapis.adapt.plugins.v1.VariableService.Type type = 4; */
751
+ if (message.type !== 0)
752
+ writer.tag(4, WireType.Varint).int32(message.type);
753
+ /* optional bool optional = 5; */
754
+ if (message.optional !== undefined)
755
+ writer.tag(5, WireType.Varint).bool(message.optional);
640
756
  let u = options.writeUnknownFields;
641
757
  if (u !== false)
642
758
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -644,24 +760,31 @@ class OAuth2Service$Type extends MessageType {
644
760
  }
645
761
  }
646
762
  /**
647
- * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.OAuth2Service
763
+ * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.VariableService
648
764
  */
649
- const OAuth2Service = new OAuth2Service$Type();
765
+ const VariableService = new VariableService$Type();
650
766
  // @generated message type with reflection information, may provide speed optimized methods
651
- class EnvironmentalVariable$Type extends MessageType {
767
+ class Oauth2Service$Type extends MessageType {
652
768
  constructor() {
653
- super("mochabugapis.adapt.plugins.v1.EnvironmentalVariable", [
769
+ super("mochabugapis.adapt.plugins.v1.Oauth2Service", [
654
770
  { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
655
771
  { no: 2, name: "label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
656
772
  { no: 3, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
657
- { no: 4, name: "type", kind: "enum", T: () => ["mochabugapis.adapt.plugins.v1.EnvironmentalVariable.Type", EnvironmentalVariable_Type, "TYPE_"] },
658
- { no: 5, name: "optional", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
773
+ { no: 4, name: "code", kind: "message", T: () => Oauth2Code },
774
+ { no: 5, name: "optional", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
775
+ { no: 6, name: "scopes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
776
+ { no: 7, name: "auth_method", kind: "enum", T: () => ["mochabugapis.adapt.plugins.v1.Oauth2AuthType", Oauth2AuthType, "OAUTH2_AUTH_TYPE_"] },
777
+ { no: 8, name: "alg", kind: "enum", opt: true, T: () => ["mochabugapis.adapt.plugins.v1.PrivateJWTAlg", PrivateJWTAlg] },
778
+ { no: 9, name: "client_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
779
+ { no: 10, name: "token_endpoint", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
659
780
  ]);
660
781
  }
661
782
  create(value) {
662
783
  const message = globalThis.Object.create((this.messagePrototype));
663
784
  message.name = "";
664
- message.type = 0;
785
+ message.scopes = [];
786
+ message.authMethod = 0;
787
+ message.tokenEndpoint = "";
665
788
  if (value !== undefined)
666
789
  reflectionMergePartial(this, message, value);
667
790
  return message;
@@ -680,12 +803,27 @@ class EnvironmentalVariable$Type extends MessageType {
680
803
  case /* optional string description */ 3:
681
804
  message.description = reader.string();
682
805
  break;
683
- case /* mochabugapis.adapt.plugins.v1.EnvironmentalVariable.Type type */ 4:
684
- message.type = reader.int32();
806
+ case /* optional mochabugapis.adapt.plugins.v1.Oauth2Code code */ 4:
807
+ message.code = Oauth2Code.internalBinaryRead(reader, reader.uint32(), options, message.code);
685
808
  break;
686
809
  case /* optional bool optional */ 5:
687
810
  message.optional = reader.bool();
688
811
  break;
812
+ case /* repeated string scopes */ 6:
813
+ message.scopes.push(reader.string());
814
+ break;
815
+ case /* mochabugapis.adapt.plugins.v1.Oauth2AuthType auth_method */ 7:
816
+ message.authMethod = reader.int32();
817
+ break;
818
+ case /* optional mochabugapis.adapt.plugins.v1.PrivateJWTAlg alg */ 8:
819
+ message.alg = reader.int32();
820
+ break;
821
+ case /* optional string client_id */ 9:
822
+ message.clientId = reader.string();
823
+ break;
824
+ case /* string token_endpoint */ 10:
825
+ message.tokenEndpoint = reader.string();
826
+ break;
689
827
  default:
690
828
  let u = options.readUnknownField;
691
829
  if (u === "throw")
@@ -707,12 +845,27 @@ class EnvironmentalVariable$Type extends MessageType {
707
845
  /* optional string description = 3; */
708
846
  if (message.description !== undefined)
709
847
  writer.tag(3, WireType.LengthDelimited).string(message.description);
710
- /* mochabugapis.adapt.plugins.v1.EnvironmentalVariable.Type type = 4; */
711
- if (message.type !== 0)
712
- writer.tag(4, WireType.Varint).int32(message.type);
848
+ /* optional mochabugapis.adapt.plugins.v1.Oauth2Code code = 4; */
849
+ if (message.code)
850
+ Oauth2Code.internalBinaryWrite(message.code, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
713
851
  /* optional bool optional = 5; */
714
852
  if (message.optional !== undefined)
715
853
  writer.tag(5, WireType.Varint).bool(message.optional);
854
+ /* repeated string scopes = 6; */
855
+ for (let i = 0; i < message.scopes.length; i++)
856
+ writer.tag(6, WireType.LengthDelimited).string(message.scopes[i]);
857
+ /* mochabugapis.adapt.plugins.v1.Oauth2AuthType auth_method = 7; */
858
+ if (message.authMethod !== 0)
859
+ writer.tag(7, WireType.Varint).int32(message.authMethod);
860
+ /* optional mochabugapis.adapt.plugins.v1.PrivateJWTAlg alg = 8; */
861
+ if (message.alg !== undefined)
862
+ writer.tag(8, WireType.Varint).int32(message.alg);
863
+ /* optional string client_id = 9; */
864
+ if (message.clientId !== undefined)
865
+ writer.tag(9, WireType.LengthDelimited).string(message.clientId);
866
+ /* string token_endpoint = 10; */
867
+ if (message.tokenEndpoint !== "")
868
+ writer.tag(10, WireType.LengthDelimited).string(message.tokenEndpoint);
716
869
  let u = options.writeUnknownFields;
717
870
  if (u !== false)
718
871
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -720,13 +873,13 @@ class EnvironmentalVariable$Type extends MessageType {
720
873
  }
721
874
  }
722
875
  /**
723
- * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.EnvironmentalVariable
876
+ * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Oauth2Service
724
877
  */
725
- const EnvironmentalVariable = new EnvironmentalVariable$Type();
878
+ const Oauth2Service = new Oauth2Service$Type();
726
879
  // @generated message type with reflection information, may provide speed optimized methods
727
- class ServiceBinding$Type extends MessageType {
880
+ class Oauth2CodeBinding$Type extends MessageType {
728
881
  constructor() {
729
- super("mochabugapis.adapt.plugins.v1.ServiceBinding", [
882
+ super("mochabugapis.adapt.plugins.v1.Oauth2CodeBinding", [
730
883
  { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
731
884
  { no: 2, name: "optional", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
732
885
  ]);
@@ -774,35 +927,25 @@ class ServiceBinding$Type extends MessageType {
774
927
  }
775
928
  }
776
929
  /**
777
- * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.ServiceBinding
930
+ * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Oauth2CodeBinding
778
931
  */
779
- const ServiceBinding = new ServiceBinding$Type();
932
+ const Oauth2CodeBinding = new Oauth2CodeBinding$Type();
780
933
  // @generated message type with reflection information, may provide speed optimized methods
781
- class Vertex$Type extends MessageType {
934
+ class Oauth2Code$Type extends MessageType {
782
935
  constructor() {
783
- super("mochabugapis.adapt.plugins.v1.Vertex", [
784
- { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
785
- { no: 2, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
786
- { no: 3, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
787
- { no: 4, name: "logo", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
788
- { no: 5, name: "type", kind: "enum", T: () => ["mochabugapis.adapt.plugins.v1.Vertex.VertexType", Vertex_VertexType, "VERTEX_TYPE_"] },
789
- { no: 6, name: "config", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
790
- { no: 7, name: "configurator", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
791
- { no: 8, name: "variables", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => EnvironmentalVariable },
792
- { no: 9, name: "mtls", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => MTLSService },
793
- { no: 10, name: "oauth2", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ServiceBinding }
936
+ super("mochabugapis.adapt.plugins.v1.Oauth2Code", [
937
+ { no: 1, name: "auth_endpoint", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
938
+ { no: 2, name: "use_oidc", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
939
+ { no: 3, name: "additional_params", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
940
+ { no: 4, name: "use_pkce", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
794
941
  ]);
795
942
  }
796
943
  create(value) {
797
944
  const message = globalThis.Object.create((this.messagePrototype));
798
- message.name = "";
799
- message.label = "";
800
- message.type = 0;
801
- message.config = "";
802
- message.configurator = false;
803
- message.variables = [];
804
- message.mtls = [];
805
- message.oauth2 = [];
945
+ message.authEndpoint = "";
946
+ message.useOidc = false;
947
+ message.additionalParams = {};
948
+ message.usePkce = false;
806
949
  if (value !== undefined)
807
950
  reflectionMergePartial(this, message, value);
808
951
  return message;
@@ -812,35 +955,17 @@ class Vertex$Type extends MessageType {
812
955
  while (reader.pos < end) {
813
956
  let [fieldNo, wireType] = reader.tag();
814
957
  switch (fieldNo) {
815
- case /* string name */ 1:
816
- message.name = reader.string();
817
- break;
818
- case /* string label */ 2:
819
- message.label = reader.string();
820
- break;
821
- case /* optional string description */ 3:
822
- message.description = reader.string();
823
- break;
824
- case /* optional string logo */ 4:
825
- message.logo = reader.string();
826
- break;
827
- case /* mochabugapis.adapt.plugins.v1.Vertex.VertexType type */ 5:
828
- message.type = reader.int32();
829
- break;
830
- case /* string config */ 6:
831
- message.config = reader.string();
832
- break;
833
- case /* bool configurator */ 7:
834
- message.configurator = reader.bool();
958
+ case /* string auth_endpoint */ 1:
959
+ message.authEndpoint = reader.string();
835
960
  break;
836
- case /* repeated mochabugapis.adapt.plugins.v1.EnvironmentalVariable variables */ 8:
837
- message.variables.push(EnvironmentalVariable.internalBinaryRead(reader, reader.uint32(), options));
961
+ case /* bool use_oidc */ 2:
962
+ message.useOidc = reader.bool();
838
963
  break;
839
- case /* repeated mochabugapis.adapt.plugins.v1.MTLSService mtls */ 9:
840
- message.mtls.push(MTLSService.internalBinaryRead(reader, reader.uint32(), options));
964
+ case /* map<string, string> additional_params */ 3:
965
+ this.binaryReadMap3(message.additionalParams, reader, options);
841
966
  break;
842
- case /* repeated mochabugapis.adapt.plugins.v1.ServiceBinding oauth2 */ 10:
843
- message.oauth2.push(ServiceBinding.internalBinaryRead(reader, reader.uint32(), options));
967
+ case /* bool use_pkce */ 4:
968
+ message.usePkce = reader.bool();
844
969
  break;
845
970
  default:
846
971
  let u = options.readUnknownField;
@@ -853,37 +978,35 @@ class Vertex$Type extends MessageType {
853
978
  }
854
979
  return message;
855
980
  }
981
+ binaryReadMap3(map, reader, options) {
982
+ let len = reader.uint32(), end = reader.pos + len, key, val;
983
+ while (reader.pos < end) {
984
+ let [fieldNo, wireType] = reader.tag();
985
+ switch (fieldNo) {
986
+ case 1:
987
+ key = reader.string();
988
+ break;
989
+ case 2:
990
+ val = reader.string();
991
+ break;
992
+ default: throw new globalThis.Error("unknown map entry field for field mochabugapis.adapt.plugins.v1.Oauth2Code.additional_params");
993
+ }
994
+ }
995
+ map[key ?? ""] = val ?? "";
996
+ }
856
997
  internalBinaryWrite(message, writer, options) {
857
- /* string name = 1; */
858
- if (message.name !== "")
859
- writer.tag(1, WireType.LengthDelimited).string(message.name);
860
- /* string label = 2; */
861
- if (message.label !== "")
862
- writer.tag(2, WireType.LengthDelimited).string(message.label);
863
- /* optional string description = 3; */
864
- if (message.description !== undefined)
865
- writer.tag(3, WireType.LengthDelimited).string(message.description);
866
- /* optional string logo = 4; */
867
- if (message.logo !== undefined)
868
- writer.tag(4, WireType.LengthDelimited).string(message.logo);
869
- /* mochabugapis.adapt.plugins.v1.Vertex.VertexType type = 5; */
870
- if (message.type !== 0)
871
- writer.tag(5, WireType.Varint).int32(message.type);
872
- /* string config = 6; */
873
- if (message.config !== "")
874
- writer.tag(6, WireType.LengthDelimited).string(message.config);
875
- /* bool configurator = 7; */
876
- if (message.configurator !== false)
877
- writer.tag(7, WireType.Varint).bool(message.configurator);
878
- /* repeated mochabugapis.adapt.plugins.v1.EnvironmentalVariable variables = 8; */
879
- for (let i = 0; i < message.variables.length; i++)
880
- EnvironmentalVariable.internalBinaryWrite(message.variables[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
881
- /* repeated mochabugapis.adapt.plugins.v1.MTLSService mtls = 9; */
882
- for (let i = 0; i < message.mtls.length; i++)
883
- MTLSService.internalBinaryWrite(message.mtls[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
884
- /* repeated mochabugapis.adapt.plugins.v1.ServiceBinding oauth2 = 10; */
885
- for (let i = 0; i < message.oauth2.length; i++)
886
- ServiceBinding.internalBinaryWrite(message.oauth2[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
998
+ /* string auth_endpoint = 1; */
999
+ if (message.authEndpoint !== "")
1000
+ writer.tag(1, WireType.LengthDelimited).string(message.authEndpoint);
1001
+ /* bool use_oidc = 2; */
1002
+ if (message.useOidc !== false)
1003
+ writer.tag(2, WireType.Varint).bool(message.useOidc);
1004
+ /* map<string, string> additional_params = 3; */
1005
+ for (let k of globalThis.Object.keys(message.additionalParams))
1006
+ writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.additionalParams[k]).join();
1007
+ /* bool use_pkce = 4; */
1008
+ if (message.usePkce !== false)
1009
+ writer.tag(4, WireType.Varint).bool(message.usePkce);
887
1010
  let u = options.writeUnknownFields;
888
1011
  if (u !== false)
889
1012
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -891,9 +1014,9 @@ class Vertex$Type extends MessageType {
891
1014
  }
892
1015
  }
893
1016
  /**
894
- * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Vertex
1017
+ * @generated MessageType for protobuf message mochabugapis.adapt.plugins.v1.Oauth2Code
895
1018
  */
896
- const Vertex = new Vertex$Type();
1019
+ const Oauth2Code = new Oauth2Code$Type();
897
1020
  /**
898
1021
  * @generated ServiceType for protobuf service mochabugapis.adapt.plugins.v1.PluginService
899
1022
  */
@@ -987,7 +1110,8 @@ function addVertex(cwd, name, type, hasConfigurator, existingVertices) {
987
1110
  config: path.join('src', name, 'config.json'),
988
1111
  configurator: hasConfigurator,
989
1112
  mtls: [],
990
- oauth2: [],
1113
+ codeOauth2: [],
1114
+ clientCredentialsOauth2: [],
991
1115
  variables: []
992
1116
  };
993
1117
  // Write the new task
@@ -1253,9 +1377,9 @@ async function init(dir) {
1253
1377
  vertices: [vertex],
1254
1378
  assets: 'assets',
1255
1379
  executors: 'dist/executors.js',
1256
- variables: [],
1257
- oauth2: [],
1258
- mtls: []
1380
+ pluginVariables: [],
1381
+ pluginOauth2: [],
1382
+ pluginMtls: []
1259
1383
  };
1260
1384
  if (!vertex.config) {
1261
1385
  throw new Error('This cannot happen');
@@ -1862,7 +1986,7 @@ async function handleEmulate(host, cmd) {
1862
1986
  }
1863
1987
  async function main() {
1864
1988
  const notifier = updateNotifier({
1865
- pkg: JSON.parse('{"name":"@mochabug/adaptkit","version":"0.11.2"}')
1989
+ pkg: JSON.parse('{"name":"@mochabug/adaptkit","version":"0.11.4"}')
1866
1990
  });
1867
1991
  notifier.notify({ isGlobal: true, defer: false });
1868
1992
  program