@mochabug/adapt-sdk 0.1.1

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 (99) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +873 -0
  3. package/dist/api.d.ts +1605 -0
  4. package/dist/api.d.ts.map +1 -0
  5. package/dist/api.spec.d.ts +2 -0
  6. package/dist/api.spec.d.ts.map +1 -0
  7. package/dist/cjs/api.cjs +2 -0
  8. package/dist/cjs/api.cjs.map +7 -0
  9. package/dist/cjs/frontend.cjs +2 -0
  10. package/dist/cjs/frontend.cjs.map +7 -0
  11. package/dist/cjs/mime.cjs +2 -0
  12. package/dist/cjs/mime.cjs.map +7 -0
  13. package/dist/cjs/router.cjs +2 -0
  14. package/dist/cjs/router.cjs.map +7 -0
  15. package/dist/cjs/types.cjs +2 -0
  16. package/dist/cjs/types.cjs.map +7 -0
  17. package/dist/esm/api.mjs +2 -0
  18. package/dist/esm/api.mjs.map +7 -0
  19. package/dist/esm/frontend.mjs +2 -0
  20. package/dist/esm/frontend.mjs.map +7 -0
  21. package/dist/esm/mime.mjs +2 -0
  22. package/dist/esm/mime.mjs.map +7 -0
  23. package/dist/esm/router.mjs +2 -0
  24. package/dist/esm/router.mjs.map +7 -0
  25. package/dist/esm/types.mjs +1 -0
  26. package/dist/esm/types.mjs.map +7 -0
  27. package/dist/frontend.d.ts +10 -0
  28. package/dist/frontend.d.ts.map +1 -0
  29. package/dist/genproto/buf/validate/validate_pb.d.ts +8491 -0
  30. package/dist/genproto/buf/validate/validate_pb.d.ts.map +1 -0
  31. package/dist/genproto/google/api/annotations_pb.d.ts +14 -0
  32. package/dist/genproto/google/api/annotations_pb.d.ts.map +1 -0
  33. package/dist/genproto/google/api/client_pb.d.ts +1432 -0
  34. package/dist/genproto/google/api/client_pb.d.ts.map +1 -0
  35. package/dist/genproto/google/api/http_pb.d.ts +843 -0
  36. package/dist/genproto/google/api/http_pb.d.ts.map +1 -0
  37. package/dist/genproto/google/api/launch_stage_pb.d.ts +94 -0
  38. package/dist/genproto/google/api/launch_stage_pb.d.ts.map +1 -0
  39. package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.d.ts +1006 -0
  40. package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.d.ts.map +1 -0
  41. package/dist/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts +77 -0
  42. package/dist/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts.map +1 -0
  43. package/dist/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts +401 -0
  44. package/dist/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts.map +1 -0
  45. package/dist/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts +69 -0
  46. package/dist/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts.map +1 -0
  47. package/dist/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts +430 -0
  48. package/dist/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts.map +1 -0
  49. package/dist/genproto/mochabugapis/adapt/graph/signal_data_pb.d.ts +198 -0
  50. package/dist/genproto/mochabugapis/adapt/graph/signal_data_pb.d.ts.map +1 -0
  51. package/dist/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts +161 -0
  52. package/dist/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts.map +1 -0
  53. package/dist/genproto/mochabugapis/adapt/graph/signal_format_pb.d.ts +305 -0
  54. package/dist/genproto/mochabugapis/adapt/graph/signal_format_pb.d.ts.map +1 -0
  55. package/dist/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts +77 -0
  56. package/dist/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts.map +1 -0
  57. package/dist/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts +120 -0
  58. package/dist/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts.map +1 -0
  59. package/dist/genproto/mochabugapis/adapt/graph/vertex_metadata_pb.d.ts +99 -0
  60. package/dist/genproto/mochabugapis/adapt/graph/vertex_metadata_pb.d.ts.map +1 -0
  61. package/dist/genproto/mochabugapis/adapt/plugins/v1/compound_services_pb.d.ts +347 -0
  62. package/dist/genproto/mochabugapis/adapt/plugins/v1/compound_services_pb.d.ts.map +1 -0
  63. package/dist/genproto/mochabugapis/adapt/plugins/v1/file_pb.d.ts +64 -0
  64. package/dist/genproto/mochabugapis/adapt/plugins/v1/file_pb.d.ts.map +1 -0
  65. package/dist/genproto/mochabugapis/adapt/plugins/v1/http_proxy_service_pb.d.ts +1282 -0
  66. package/dist/genproto/mochabugapis/adapt/plugins/v1/http_proxy_service_pb.d.ts.map +1 -0
  67. package/dist/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.d.ts +388 -0
  68. package/dist/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.d.ts.map +1 -0
  69. package/dist/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.d.ts +805 -0
  70. package/dist/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.d.ts.map +1 -0
  71. package/dist/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts +238 -0
  72. package/dist/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts.map +1 -0
  73. package/dist/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.d.ts +241 -0
  74. package/dist/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.d.ts.map +1 -0
  75. package/dist/genproto/mochabugapis/adapt/plugins/v1/service_settings_pb.d.ts +539 -0
  76. package/dist/genproto/mochabugapis/adapt/plugins/v1/service_settings_pb.d.ts.map +1 -0
  77. package/dist/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts +190 -0
  78. package/dist/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts.map +1 -0
  79. package/dist/genproto/mochabugapis/adapt/plugins/v1/vertex_pb.d.ts +269 -0
  80. package/dist/genproto/mochabugapis/adapt/plugins/v1/vertex_pb.d.ts.map +1 -0
  81. package/dist/genproto/mochabugapis/adapt/runtime/v1/incoming_pb.d.ts +339 -0
  82. package/dist/genproto/mochabugapis/adapt/runtime/v1/incoming_pb.d.ts.map +1 -0
  83. package/dist/genproto/mochabugapis/adapt/runtime/v1/runtime_pb.d.ts +2721 -0
  84. package/dist/genproto/mochabugapis/adapt/runtime/v1/runtime_pb.d.ts.map +1 -0
  85. package/dist/genproto/mochabugapis/adapt/runtime/v1/store_pb.d.ts +872 -0
  86. package/dist/genproto/mochabugapis/adapt/runtime/v1/store_pb.d.ts.map +1 -0
  87. package/dist/grpcweb.d.ts +8 -0
  88. package/dist/grpcweb.d.ts.map +1 -0
  89. package/dist/mime.d.ts +11 -0
  90. package/dist/mime.d.ts.map +1 -0
  91. package/dist/router.d.ts +503 -0
  92. package/dist/router.d.ts.map +1 -0
  93. package/dist/router.spec.d.ts +2 -0
  94. package/dist/router.spec.d.ts.map +1 -0
  95. package/dist/signal-api.spec.d.ts +17 -0
  96. package/dist/signal-api.spec.d.ts.map +1 -0
  97. package/dist/types.d.ts +149 -0
  98. package/dist/types.d.ts.map +1 -0
  99. package/package.json +80 -0
@@ -0,0 +1,805 @@
1
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { File, FileJson } from "./file_pb";
3
+ import type { Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file mochabugapis/adapt/plugins/v1/oauth2_service.proto.
6
+ */
7
+ export declare const file_mochabugapis_adapt_plugins_v1_oauth2_service: GenFile;
8
+ /**
9
+ * OAuth2 service configuration
10
+ *
11
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2Definition
12
+ */
13
+ export type Oauth2Definition = Message<"mochabugapis.adapt.plugins.v1.Oauth2Definition"> & {
14
+ /**
15
+ * The OAuth2 grant type to be used.
16
+ *
17
+ * @generated from field: mochabugapis.adapt.plugins.v1.Oauth2GrantType grant_type = 1;
18
+ */
19
+ grantType: Oauth2GrantType;
20
+ /**
21
+ * The requested scopes (OPTIONAL per RFC 6749 Section 3.3).
22
+ * If omitted, the authorization server will use a pre-defined default or fail.
23
+ *
24
+ * @generated from field: repeated string scopes = 2;
25
+ */
26
+ scopes: string[];
27
+ /**
28
+ * The client authentication method.
29
+ * REQUIRED when grant_type is:
30
+ * - OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE
31
+ * - OAUTH2_GRANT_TYPE_CLIENT_CREDENTIALS
32
+ *
33
+ * MUST NOT be set when grant_type is:
34
+ * - OAUTH2_GRANT_TYPE_JWT_BEARER
35
+ * - OAUTH2_GRANT_TYPE_SAML2_BEARER
36
+ *
37
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.Oauth2AuthType auth_method = 3;
38
+ */
39
+ authMethod?: Oauth2AuthType;
40
+ /**
41
+ * Algorithm used for signing assertions.
42
+ * REQUIRED when:
43
+ * - grant_type is OAUTH2_GRANT_TYPE_JWT_BEARER
44
+ * - grant_type is OAUTH2_GRANT_TYPE_SAML2_BEARER
45
+ * - auth_method is OAUTH2_AUTH_TYPE_PRIVATE_KEY_JWT
46
+ * - auth_method is OAUTH2_AUTH_TYPE_SAML2_BEARER
47
+ *
48
+ * MUST NOT be set otherwise.
49
+ *
50
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.PrivateKeyAlg alg = 4;
51
+ */
52
+ alg?: PrivateKeyAlg;
53
+ /**
54
+ * Client ID.
55
+ * This is required when used as plugin_oauth2, but not onto a vertex => oauth2
56
+ *
57
+ * @generated from field: optional string client_id = 5;
58
+ */
59
+ clientId?: string;
60
+ /**
61
+ * The token endpoint URL.
62
+ *
63
+ * @generated from field: string token_endpoint = 6;
64
+ */
65
+ tokenEndpoint: string;
66
+ /**
67
+ * Configuration specific to the Authorization Code grant type.
68
+ * REQUIRED when grant_type is OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE.
69
+ * MUST NOT be set otherwise.
70
+ *
71
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.Oauth2Code code = 7;
72
+ */
73
+ code?: Oauth2Code;
74
+ };
75
+ /**
76
+ * OAuth2 service configuration
77
+ *
78
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2Definition
79
+ */
80
+ export type Oauth2DefinitionJson = {
81
+ /**
82
+ * The OAuth2 grant type to be used.
83
+ *
84
+ * @generated from field: mochabugapis.adapt.plugins.v1.Oauth2GrantType grant_type = 1;
85
+ */
86
+ grantType?: Oauth2GrantTypeJson;
87
+ /**
88
+ * The requested scopes (OPTIONAL per RFC 6749 Section 3.3).
89
+ * If omitted, the authorization server will use a pre-defined default or fail.
90
+ *
91
+ * @generated from field: repeated string scopes = 2;
92
+ */
93
+ scopes?: string[];
94
+ /**
95
+ * The client authentication method.
96
+ * REQUIRED when grant_type is:
97
+ * - OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE
98
+ * - OAUTH2_GRANT_TYPE_CLIENT_CREDENTIALS
99
+ *
100
+ * MUST NOT be set when grant_type is:
101
+ * - OAUTH2_GRANT_TYPE_JWT_BEARER
102
+ * - OAUTH2_GRANT_TYPE_SAML2_BEARER
103
+ *
104
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.Oauth2AuthType auth_method = 3;
105
+ */
106
+ authMethod?: Oauth2AuthTypeJson;
107
+ /**
108
+ * Algorithm used for signing assertions.
109
+ * REQUIRED when:
110
+ * - grant_type is OAUTH2_GRANT_TYPE_JWT_BEARER
111
+ * - grant_type is OAUTH2_GRANT_TYPE_SAML2_BEARER
112
+ * - auth_method is OAUTH2_AUTH_TYPE_PRIVATE_KEY_JWT
113
+ * - auth_method is OAUTH2_AUTH_TYPE_SAML2_BEARER
114
+ *
115
+ * MUST NOT be set otherwise.
116
+ *
117
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.PrivateKeyAlg alg = 4;
118
+ */
119
+ alg?: PrivateKeyAlgJson;
120
+ /**
121
+ * Client ID.
122
+ * This is required when used as plugin_oauth2, but not onto a vertex => oauth2
123
+ *
124
+ * @generated from field: optional string client_id = 5;
125
+ */
126
+ clientId?: string;
127
+ /**
128
+ * The token endpoint URL.
129
+ *
130
+ * @generated from field: string token_endpoint = 6;
131
+ */
132
+ tokenEndpoint?: string;
133
+ /**
134
+ * Configuration specific to the Authorization Code grant type.
135
+ * REQUIRED when grant_type is OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE.
136
+ * MUST NOT be set otherwise.
137
+ *
138
+ * @generated from field: optional mochabugapis.adapt.plugins.v1.Oauth2Code code = 7;
139
+ */
140
+ code?: Oauth2CodeJson;
141
+ };
142
+ /**
143
+ * Describes the message mochabugapis.adapt.plugins.v1.Oauth2Definition.
144
+ * Use `create(Oauth2DefinitionSchema)` to create a new message.
145
+ */
146
+ export declare const Oauth2DefinitionSchema: GenMessage<Oauth2Definition, {
147
+ jsonType: Oauth2DefinitionJson;
148
+ }>;
149
+ /**
150
+ * The code grant type
151
+ * IMPORTANT: it has to be configured with refresh token in order to work correctly
152
+ * this is not needed for client credentials of course since we are owning the client
153
+ * WE ONLY SUPPORT OIDC since we need the sub claim to distinguish between different users
154
+ *
155
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2Code
156
+ */
157
+ export type Oauth2Code = Message<"mochabugapis.adapt.plugins.v1.Oauth2Code"> & {
158
+ /**
159
+ * The auth endpoint (i.e. where it gets redirected for login)
160
+ *
161
+ * @generated from field: string auth_endpoint = 1;
162
+ */
163
+ authEndpoint: string;
164
+ /**
165
+ * Additional parameters used for the oauth2 login endpoint
166
+ * Do not include state or nonce here since we're generating them
167
+ * in the backend. All params will be encoded in the URL
168
+ *
169
+ * @generated from field: map<string, string> additional_params = 2;
170
+ */
171
+ additionalParams: {
172
+ [key: string]: string;
173
+ };
174
+ /**
175
+ * Whether or not to use the PKCE extension
176
+ *
177
+ * @generated from field: bool use_pkce = 3;
178
+ */
179
+ usePkce: boolean;
180
+ };
181
+ /**
182
+ * The code grant type
183
+ * IMPORTANT: it has to be configured with refresh token in order to work correctly
184
+ * this is not needed for client credentials of course since we are owning the client
185
+ * WE ONLY SUPPORT OIDC since we need the sub claim to distinguish between different users
186
+ *
187
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2Code
188
+ */
189
+ export type Oauth2CodeJson = {
190
+ /**
191
+ * The auth endpoint (i.e. where it gets redirected for login)
192
+ *
193
+ * @generated from field: string auth_endpoint = 1;
194
+ */
195
+ authEndpoint?: string;
196
+ /**
197
+ * Additional parameters used for the oauth2 login endpoint
198
+ * Do not include state or nonce here since we're generating them
199
+ * in the backend. All params will be encoded in the URL
200
+ *
201
+ * @generated from field: map<string, string> additional_params = 2;
202
+ */
203
+ additionalParams?: {
204
+ [key: string]: string;
205
+ };
206
+ /**
207
+ * Whether or not to use the PKCE extension
208
+ *
209
+ * @generated from field: bool use_pkce = 3;
210
+ */
211
+ usePkce?: boolean;
212
+ };
213
+ /**
214
+ * Describes the message mochabugapis.adapt.plugins.v1.Oauth2Code.
215
+ * Use `create(Oauth2CodeSchema)` to create a new message.
216
+ */
217
+ export declare const Oauth2CodeSchema: GenMessage<Oauth2Code, {
218
+ jsonType: Oauth2CodeJson;
219
+ }>;
220
+ /**
221
+ * The actual oauth2 config
222
+ *
223
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2Config
224
+ */
225
+ export type Oauth2Config = Message<"mochabugapis.adapt.plugins.v1.Oauth2Config"> & {
226
+ /**
227
+ * The client id, required for client credentials on vertices only
228
+ *
229
+ * @generated from field: optional string client_id = 1;
230
+ */
231
+ clientId?: string;
232
+ /**
233
+ * The auth method is required to be set
234
+ *
235
+ * @generated from oneof mochabugapis.adapt.plugins.v1.Oauth2Config.auth_method
236
+ */
237
+ authMethod: {
238
+ /**
239
+ * Use basic authentication for the client
240
+ *
241
+ * @generated from field: mochabugapis.adapt.plugins.v1.BasicAuth basic_auth = 2;
242
+ */
243
+ value: BasicAuth;
244
+ case: "basicAuth";
245
+ } | {
246
+ /**
247
+ * Use form authentication for the client
248
+ *
249
+ * @generated from field: mochabugapis.adapt.plugins.v1.FormAuth form_auth = 3;
250
+ */
251
+ value: FormAuth;
252
+ case: "formAuth";
253
+ } | {
254
+ /**
255
+ * Use private JWT authentication for the client
256
+ *
257
+ * @generated from field: mochabugapis.adapt.plugins.v1.PrivateJWTAuth private_jwt_auth = 4;
258
+ */
259
+ value: PrivateJWTAuth;
260
+ case: "privateJwtAuth";
261
+ } | {
262
+ /**
263
+ * Use mTLS authentication for the client
264
+ *
265
+ * @generated from field: mochabugapis.adapt.plugins.v1.MTLSAuth mtls_auth = 5;
266
+ */
267
+ value: MTLSAuth;
268
+ case: "mtlsAuth";
269
+ } | {
270
+ /**
271
+ * Use SAML bearer authentication for the client
272
+ *
273
+ * @generated from field: mochabugapis.adapt.plugins.v1.SAMLAuth saml_auth = 6;
274
+ */
275
+ value: SAMLAuth;
276
+ case: "samlAuth";
277
+ } | {
278
+ /**
279
+ * In case we have code flow with consent
280
+ *
281
+ * @generated from field: bool consent = 7;
282
+ */
283
+ value: boolean;
284
+ case: "consent";
285
+ } | {
286
+ case: undefined;
287
+ value?: undefined;
288
+ };
289
+ };
290
+ /**
291
+ * The actual oauth2 config
292
+ *
293
+ * @generated from message mochabugapis.adapt.plugins.v1.Oauth2Config
294
+ */
295
+ export type Oauth2ConfigJson = {
296
+ /**
297
+ * The client id, required for client credentials on vertices only
298
+ *
299
+ * @generated from field: optional string client_id = 1;
300
+ */
301
+ clientId?: string;
302
+ /**
303
+ * Use basic authentication for the client
304
+ *
305
+ * @generated from field: mochabugapis.adapt.plugins.v1.BasicAuth basic_auth = 2;
306
+ */
307
+ basicAuth?: BasicAuthJson;
308
+ /**
309
+ * Use form authentication for the client
310
+ *
311
+ * @generated from field: mochabugapis.adapt.plugins.v1.FormAuth form_auth = 3;
312
+ */
313
+ formAuth?: FormAuthJson;
314
+ /**
315
+ * Use private JWT authentication for the client
316
+ *
317
+ * @generated from field: mochabugapis.adapt.plugins.v1.PrivateJWTAuth private_jwt_auth = 4;
318
+ */
319
+ privateJwtAuth?: PrivateJWTAuthJson;
320
+ /**
321
+ * Use mTLS authentication for the client
322
+ *
323
+ * @generated from field: mochabugapis.adapt.plugins.v1.MTLSAuth mtls_auth = 5;
324
+ */
325
+ mtlsAuth?: MTLSAuthJson;
326
+ /**
327
+ * Use SAML bearer authentication for the client
328
+ *
329
+ * @generated from field: mochabugapis.adapt.plugins.v1.SAMLAuth saml_auth = 6;
330
+ */
331
+ samlAuth?: SAMLAuthJson;
332
+ /**
333
+ * In case we have code flow with consent
334
+ *
335
+ * @generated from field: bool consent = 7;
336
+ */
337
+ consent?: boolean;
338
+ };
339
+ /**
340
+ * Describes the message mochabugapis.adapt.plugins.v1.Oauth2Config.
341
+ * Use `create(Oauth2ConfigSchema)` to create a new message.
342
+ */
343
+ export declare const Oauth2ConfigSchema: GenMessage<Oauth2Config, {
344
+ jsonType: Oauth2ConfigJson;
345
+ }>;
346
+ /**
347
+ * Basic auth
348
+ *
349
+ * @generated from message mochabugapis.adapt.plugins.v1.BasicAuth
350
+ */
351
+ export type BasicAuth = Message<"mochabugapis.adapt.plugins.v1.BasicAuth"> & {
352
+ /**
353
+ * The password
354
+ *
355
+ * @generated from field: string client_secret = 1;
356
+ */
357
+ clientSecret: string;
358
+ };
359
+ /**
360
+ * Basic auth
361
+ *
362
+ * @generated from message mochabugapis.adapt.plugins.v1.BasicAuth
363
+ */
364
+ export type BasicAuthJson = {
365
+ /**
366
+ * The password
367
+ *
368
+ * @generated from field: string client_secret = 1;
369
+ */
370
+ clientSecret?: string;
371
+ };
372
+ /**
373
+ * Describes the message mochabugapis.adapt.plugins.v1.BasicAuth.
374
+ * Use `create(BasicAuthSchema)` to create a new message.
375
+ */
376
+ export declare const BasicAuthSchema: GenMessage<BasicAuth, {
377
+ jsonType: BasicAuthJson;
378
+ }>;
379
+ /**
380
+ * Form auth
381
+ *
382
+ * @generated from message mochabugapis.adapt.plugins.v1.FormAuth
383
+ */
384
+ export type FormAuth = Message<"mochabugapis.adapt.plugins.v1.FormAuth"> & {
385
+ /**
386
+ * The password
387
+ *
388
+ * @generated from field: string client_secret = 1;
389
+ */
390
+ clientSecret: string;
391
+ };
392
+ /**
393
+ * Form auth
394
+ *
395
+ * @generated from message mochabugapis.adapt.plugins.v1.FormAuth
396
+ */
397
+ export type FormAuthJson = {
398
+ /**
399
+ * The password
400
+ *
401
+ * @generated from field: string client_secret = 1;
402
+ */
403
+ clientSecret?: string;
404
+ };
405
+ /**
406
+ * Describes the message mochabugapis.adapt.plugins.v1.FormAuth.
407
+ * Use `create(FormAuthSchema)` to create a new message.
408
+ */
409
+ export declare const FormAuthSchema: GenMessage<FormAuth, {
410
+ jsonType: FormAuthJson;
411
+ }>;
412
+ /**
413
+ * Private JWT auth
414
+ *
415
+ * @generated from message mochabugapis.adapt.plugins.v1.PrivateJWTAuth
416
+ */
417
+ export type PrivateJWTAuth = Message<"mochabugapis.adapt.plugins.v1.PrivateJWTAuth"> & {
418
+ /**
419
+ * The private key in PEM format
420
+ * The content of the file must be PEM format after decoding
421
+ * The content must contain a PRIVATE KEY block
422
+ *
423
+ * @generated from field: mochabugapis.adapt.plugins.v1.File private_key = 1;
424
+ */
425
+ privateKey?: File;
426
+ /**
427
+ * Optional subject for impersonation
428
+ * If not provided, the client_id will be used as the subject
429
+ *
430
+ * @generated from field: optional string subject = 2;
431
+ */
432
+ subject?: string;
433
+ };
434
+ /**
435
+ * Private JWT auth
436
+ *
437
+ * @generated from message mochabugapis.adapt.plugins.v1.PrivateJWTAuth
438
+ */
439
+ export type PrivateJWTAuthJson = {
440
+ /**
441
+ * The private key in PEM format
442
+ * The content of the file must be PEM format after decoding
443
+ * The content must contain a PRIVATE KEY block
444
+ *
445
+ * @generated from field: mochabugapis.adapt.plugins.v1.File private_key = 1;
446
+ */
447
+ privateKey?: FileJson;
448
+ /**
449
+ * Optional subject for impersonation
450
+ * If not provided, the client_id will be used as the subject
451
+ *
452
+ * @generated from field: optional string subject = 2;
453
+ */
454
+ subject?: string;
455
+ };
456
+ /**
457
+ * Describes the message mochabugapis.adapt.plugins.v1.PrivateJWTAuth.
458
+ * Use `create(PrivateJWTAuthSchema)` to create a new message.
459
+ */
460
+ export declare const PrivateJWTAuthSchema: GenMessage<PrivateJWTAuth, {
461
+ jsonType: PrivateJWTAuthJson;
462
+ }>;
463
+ /**
464
+ * mTLS auth
465
+ *
466
+ * @generated from message mochabugapis.adapt.plugins.v1.MTLSAuth
467
+ */
468
+ export type MTLSAuth = Message<"mochabugapis.adapt.plugins.v1.MTLSAuth"> & {
469
+ /**
470
+ * The certificate in PEM format
471
+ * The content of the file must be PEM format after decoding
472
+ * If a certificate chain is presented. The server certificate must be the first one
473
+ *
474
+ * @generated from field: mochabugapis.adapt.plugins.v1.File certificate = 1;
475
+ */
476
+ certificate?: File;
477
+ /**
478
+ * The private key in PEM format
479
+ * The content of the file must be PEM format after decoding
480
+ * The content must contain a PRIVATE KEY block
481
+ *
482
+ * @generated from field: mochabugapis.adapt.plugins.v1.File private_key = 2;
483
+ */
484
+ privateKey?: File;
485
+ /**
486
+ * The CA certificate in PEM format. Trusted server authority file
487
+ * The content of the file must be PEM format after decoding
488
+ * The content must contain a CERTIFICATE block
489
+ *
490
+ * @generated from field: mochabugapis.adapt.plugins.v1.File ca_certificate = 3;
491
+ */
492
+ caCertificate?: File;
493
+ /**
494
+ * The expected hostname for certificate verification (SNI - Server Name Indication).
495
+ *
496
+ * If present, the client will:
497
+ * 1. Send this hostname in the TLS SNI extension during the handshake
498
+ * 2. Verify that the server's certificate authenticates this specific hostname
499
+ *
500
+ * If not provided:
501
+ * - The hostname is derived from the target upstream address
502
+ * - For IP addresses, certificate verification may fail unless the cert includes the IP as a SAN
503
+ *
504
+ * ## Use Cases
505
+ *
506
+ * 1. **IP-based connections with hostname certificates:**
507
+ * - Upstream address: 192.168.1.100:443
508
+ * - certificate_host: "api.example.com"
509
+ * - Server presents cert for api.example.com
510
+ *
511
+ * 2. **Load balancers or proxies:**
512
+ * - Upstream address: lb.internal:443
513
+ * - certificate_host: "api.example.com"
514
+ * - Verify against the public hostname, not internal LB name
515
+ *
516
+ * 3. **Shared hosting / Virtual hosting:**
517
+ * - Multiple services on same IP, different certs via SNI
518
+ * - Server selects correct certificate based on SNI hostname
519
+ *
520
+ * ## Certificate Verification
521
+ *
522
+ * The server certificate must contain this hostname in either:
523
+ * - Common Name (CN) field
524
+ * - Subject Alternative Name (SAN) extension
525
+ *
526
+ * ## Format
527
+ *
528
+ * Must be a valid hostname (DNS name), not an IP address.
529
+ * Examples: "api.example.com", "service.internal", "*.example.com" (for wildcard matching)
530
+ *
531
+ * @generated from field: optional string certificate_host = 4;
532
+ */
533
+ certificateHost?: string;
534
+ };
535
+ /**
536
+ * mTLS auth
537
+ *
538
+ * @generated from message mochabugapis.adapt.plugins.v1.MTLSAuth
539
+ */
540
+ export type MTLSAuthJson = {
541
+ /**
542
+ * The certificate in PEM format
543
+ * The content of the file must be PEM format after decoding
544
+ * If a certificate chain is presented. The server certificate must be the first one
545
+ *
546
+ * @generated from field: mochabugapis.adapt.plugins.v1.File certificate = 1;
547
+ */
548
+ certificate?: FileJson;
549
+ /**
550
+ * The private key in PEM format
551
+ * The content of the file must be PEM format after decoding
552
+ * The content must contain a PRIVATE KEY block
553
+ *
554
+ * @generated from field: mochabugapis.adapt.plugins.v1.File private_key = 2;
555
+ */
556
+ privateKey?: FileJson;
557
+ /**
558
+ * The CA certificate in PEM format. Trusted server authority file
559
+ * The content of the file must be PEM format after decoding
560
+ * The content must contain a CERTIFICATE block
561
+ *
562
+ * @generated from field: mochabugapis.adapt.plugins.v1.File ca_certificate = 3;
563
+ */
564
+ caCertificate?: FileJson;
565
+ /**
566
+ * The expected hostname for certificate verification (SNI - Server Name Indication).
567
+ *
568
+ * If present, the client will:
569
+ * 1. Send this hostname in the TLS SNI extension during the handshake
570
+ * 2. Verify that the server's certificate authenticates this specific hostname
571
+ *
572
+ * If not provided:
573
+ * - The hostname is derived from the target upstream address
574
+ * - For IP addresses, certificate verification may fail unless the cert includes the IP as a SAN
575
+ *
576
+ * ## Use Cases
577
+ *
578
+ * 1. **IP-based connections with hostname certificates:**
579
+ * - Upstream address: 192.168.1.100:443
580
+ * - certificate_host: "api.example.com"
581
+ * - Server presents cert for api.example.com
582
+ *
583
+ * 2. **Load balancers or proxies:**
584
+ * - Upstream address: lb.internal:443
585
+ * - certificate_host: "api.example.com"
586
+ * - Verify against the public hostname, not internal LB name
587
+ *
588
+ * 3. **Shared hosting / Virtual hosting:**
589
+ * - Multiple services on same IP, different certs via SNI
590
+ * - Server selects correct certificate based on SNI hostname
591
+ *
592
+ * ## Certificate Verification
593
+ *
594
+ * The server certificate must contain this hostname in either:
595
+ * - Common Name (CN) field
596
+ * - Subject Alternative Name (SAN) extension
597
+ *
598
+ * ## Format
599
+ *
600
+ * Must be a valid hostname (DNS name), not an IP address.
601
+ * Examples: "api.example.com", "service.internal", "*.example.com" (for wildcard matching)
602
+ *
603
+ * @generated from field: optional string certificate_host = 4;
604
+ */
605
+ certificateHost?: string;
606
+ };
607
+ /**
608
+ * Describes the message mochabugapis.adapt.plugins.v1.MTLSAuth.
609
+ * Use `create(MTLSAuthSchema)` to create a new message.
610
+ */
611
+ export declare const MTLSAuthSchema: GenMessage<MTLSAuth, {
612
+ jsonType: MTLSAuthJson;
613
+ }>;
614
+ /**
615
+ * SAML bearer auth
616
+ *
617
+ * @generated from message mochabugapis.adapt.plugins.v1.SAMLAuth
618
+ */
619
+ export type SAMLAuth = Message<"mochabugapis.adapt.plugins.v1.SAMLAuth"> & {
620
+ /**
621
+ * The private key in PEM format
622
+ * The content of the file must be PEM format after decoding
623
+ * The content must contain a PRIVATE KEY block
624
+ *
625
+ * @generated from field: mochabugapis.adapt.plugins.v1.File private_key = 1;
626
+ */
627
+ privateKey?: File;
628
+ /**
629
+ * The certificate in PEM format
630
+ * The content of the file must be PEM format after decoding
631
+ * If a certificate chain is presented. The server certificate must be the first one
632
+ *
633
+ * @generated from field: mochabugapis.adapt.plugins.v1.File certificate = 2;
634
+ */
635
+ certificate?: File;
636
+ };
637
+ /**
638
+ * SAML bearer auth
639
+ *
640
+ * @generated from message mochabugapis.adapt.plugins.v1.SAMLAuth
641
+ */
642
+ export type SAMLAuthJson = {
643
+ /**
644
+ * The private key in PEM format
645
+ * The content of the file must be PEM format after decoding
646
+ * The content must contain a PRIVATE KEY block
647
+ *
648
+ * @generated from field: mochabugapis.adapt.plugins.v1.File private_key = 1;
649
+ */
650
+ privateKey?: FileJson;
651
+ /**
652
+ * The certificate in PEM format
653
+ * The content of the file must be PEM format after decoding
654
+ * If a certificate chain is presented. The server certificate must be the first one
655
+ *
656
+ * @generated from field: mochabugapis.adapt.plugins.v1.File certificate = 2;
657
+ */
658
+ certificate?: FileJson;
659
+ };
660
+ /**
661
+ * Describes the message mochabugapis.adapt.plugins.v1.SAMLAuth.
662
+ * Use `create(SAMLAuthSchema)` to create a new message.
663
+ */
664
+ export declare const SAMLAuthSchema: GenMessage<SAMLAuth, {
665
+ jsonType: SAMLAuthJson;
666
+ }>;
667
+ /**
668
+ * The algorithm used for signing JWT or SAML assertions
669
+ *
670
+ * @generated from enum mochabugapis.adapt.plugins.v1.PrivateKeyAlg
671
+ */
672
+ export declare enum PrivateKeyAlg {
673
+ /**
674
+ * Unknown algorithm (invalid)
675
+ *
676
+ * @generated from enum value: PRIVATE_KEY_ALG_UNSPECIFIED = 0;
677
+ */
678
+ UNSPECIFIED = 0,
679
+ /**
680
+ * RS256 algorithm
681
+ *
682
+ * @generated from enum value: PRIVATE_KEY_ALG_RS256 = 1;
683
+ */
684
+ RS256 = 1
685
+ }
686
+ /**
687
+ * The algorithm used for signing JWT or SAML assertions
688
+ *
689
+ * @generated from enum mochabugapis.adapt.plugins.v1.PrivateKeyAlg
690
+ */
691
+ export type PrivateKeyAlgJson = "PRIVATE_KEY_ALG_UNSPECIFIED" | "PRIVATE_KEY_ALG_RS256";
692
+ /**
693
+ * Describes the enum mochabugapis.adapt.plugins.v1.PrivateKeyAlg.
694
+ */
695
+ export declare const PrivateKeyAlgSchema: GenEnum<PrivateKeyAlg, PrivateKeyAlgJson>;
696
+ /**
697
+ * The OAuth2 grant type
698
+ *
699
+ * @generated from enum mochabugapis.adapt.plugins.v1.Oauth2GrantType
700
+ */
701
+ export declare enum Oauth2GrantType {
702
+ /**
703
+ * Not specified (invalid)
704
+ *
705
+ * @generated from enum value: OAUTH2_GRANT_TYPE_UNSPECIFIED = 0;
706
+ */
707
+ UNSPECIFIED = 0,
708
+ /**
709
+ * Authorization Code Grant
710
+ * grant_type=authorization_code
711
+ *
712
+ * @generated from enum value: OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE = 1;
713
+ */
714
+ AUTHORIZATION_CODE = 1,
715
+ /**
716
+ * Client Credentials Grant
717
+ * grant_type=client_credentials
718
+ *
719
+ * @generated from enum value: OAUTH2_GRANT_TYPE_CLIENT_CREDENTIALS = 2;
720
+ */
721
+ CLIENT_CREDENTIALS = 2,
722
+ /**
723
+ * JWT Bearer Assertion Grant
724
+ * grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
725
+ *
726
+ * @generated from enum value: OAUTH2_GRANT_TYPE_JWT_BEARER = 3;
727
+ */
728
+ JWT_BEARER = 3,
729
+ /**
730
+ * SAML 2.0 Bearer Assertion Grant
731
+ * grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer
732
+ *
733
+ * @generated from enum value: OAUTH2_GRANT_TYPE_SAML2_BEARER = 4;
734
+ */
735
+ SAML2_BEARER = 4
736
+ }
737
+ /**
738
+ * The OAuth2 grant type
739
+ *
740
+ * @generated from enum mochabugapis.adapt.plugins.v1.Oauth2GrantType
741
+ */
742
+ export type Oauth2GrantTypeJson = "OAUTH2_GRANT_TYPE_UNSPECIFIED" | "OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE" | "OAUTH2_GRANT_TYPE_CLIENT_CREDENTIALS" | "OAUTH2_GRANT_TYPE_JWT_BEARER" | "OAUTH2_GRANT_TYPE_SAML2_BEARER";
743
+ /**
744
+ * Describes the enum mochabugapis.adapt.plugins.v1.Oauth2GrantType.
745
+ */
746
+ export declare const Oauth2GrantTypeSchema: GenEnum<Oauth2GrantType, Oauth2GrantTypeJson>;
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
+ * client_secret_basic
762
+ *
763
+ * @generated from enum value: OAUTH2_AUTH_TYPE_BASIC = 1;
764
+ */
765
+ BASIC = 1,
766
+ /**
767
+ * Form Authentication (client ID and secret in form body)
768
+ * client_secret_post
769
+ *
770
+ * @generated from enum value: OAUTH2_AUTH_TYPE_FORM = 2;
771
+ */
772
+ FORM = 2,
773
+ /**
774
+ * Private Key JWT Authentication
775
+ * client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
776
+ *
777
+ * @generated from enum value: OAUTH2_AUTH_TYPE_PRIVATE_KEY_JWT = 3;
778
+ */
779
+ PRIVATE_KEY_JWT = 3,
780
+ /**
781
+ * Mutual TLS Authentication
782
+ * tls_client_auth / self_signed_tls_client_auth
783
+ *
784
+ * @generated from enum value: OAUTH2_AUTH_TYPE_MTLS = 4;
785
+ */
786
+ MTLS = 4,
787
+ /**
788
+ * SAML 2.0 Bearer Assertion for Client Authentication
789
+ * client_assertion_type=urn:ietf:params:oauth:client-assertion-type:saml2-bearer
790
+ *
791
+ * @generated from enum value: OAUTH2_AUTH_TYPE_SAML2_BEARER = 5;
792
+ */
793
+ SAML2_BEARER = 5
794
+ }
795
+ /**
796
+ * The OAuth2 client authentication method
797
+ *
798
+ * @generated from enum mochabugapis.adapt.plugins.v1.Oauth2AuthType
799
+ */
800
+ export type Oauth2AuthTypeJson = "OAUTH2_AUTH_TYPE_UNSPECIFIED" | "OAUTH2_AUTH_TYPE_BASIC" | "OAUTH2_AUTH_TYPE_FORM" | "OAUTH2_AUTH_TYPE_PRIVATE_KEY_JWT" | "OAUTH2_AUTH_TYPE_MTLS" | "OAUTH2_AUTH_TYPE_SAML2_BEARER";
801
+ /**
802
+ * Describes the enum mochabugapis.adapt.plugins.v1.Oauth2AuthType.
803
+ */
804
+ export declare const Oauth2AuthTypeSchema: GenEnum<Oauth2AuthType, Oauth2AuthTypeJson>;
805
+ //# sourceMappingURL=oauth2_service_pb.d.ts.map