@mochabug/adaptkit 1.0.0-rc.5 → 1.0.0-rc.51
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/README.md +50 -45
- package/assets/build.js +1 -1
- package/assets/configurator.main.tsx +8 -0
- package/assets/configurator_browser_none.main.ts +30 -0
- package/assets/configurator_browser_none.ssg.ts +64 -0
- package/assets/configurator_none.ts +14 -103
- package/assets/configurator_react.tsx +8 -8
- package/assets/executor.html +1 -1
- package/assets/executor.main.tsx +8 -0
- package/assets/executor_action.ts +4 -8
- package/assets/{executor_cron_trigger.ts → executor_action_cron.ts} +4 -8
- package/assets/executor_browser_none.main.ts +25 -0
- package/assets/executor_browser_none.ssg.ts +42 -0
- package/assets/executor_browser_none.ts +15 -83
- package/assets/executor_browser_none_cron.ts +55 -0
- package/assets/executor_browser_react.tsx +9 -13
- package/assets/executor_browser_react_cron.tsx +55 -0
- package/assets/{executor_external_trigger.ts → executor_external.ts} +8 -12
- package/assets/executor_external_cron.ts +45 -0
- package/assets/tsconf.json +1 -2
- package/bin/add.d.ts.map +1 -1
- package/bin/genproto/buf/validate/validate_pb.d.ts +1245 -547
- package/bin/genproto/buf/validate/validate_pb.d.ts.map +1 -1
- package/bin/genproto/google/api/annotations_pb.d.ts +1 -1
- package/bin/genproto/google/api/client_pb.d.ts +46 -16
- package/bin/genproto/google/api/client_pb.d.ts.map +1 -1
- package/bin/genproto/google/api/http_pb.d.ts +10 -4
- package/bin/genproto/google/api/http_pb.d.ts.map +1 -1
- package/bin/genproto/google/api/launch_stage_pb.d.ts +1 -1
- package/bin/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts +4 -2
- package/bin/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts +192 -16
- package/bin/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts +4 -2
- package/bin/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts +309 -53
- package/bin/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/graph/signal_data_pb.d.ts +198 -0
- package/bin/genproto/mochabugapis/adapt/graph/signal_data_pb.d.ts.map +1 -0
- package/bin/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts +101 -27
- package/bin/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/graph/signal_format_pb.d.ts +305 -0
- package/bin/genproto/mochabugapis/adapt/graph/signal_format_pb.d.ts.map +1 -0
- package/bin/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts +16 -2
- package/bin/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts +53 -8
- package/bin/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/graph/user_defined_exchange_options_pb.d.ts +353 -0
- package/bin/genproto/mochabugapis/adapt/graph/user_defined_exchange_options_pb.d.ts.map +1 -0
- package/bin/genproto/mochabugapis/adapt/graph/{vertex_config_pb.d.ts → vertex_metadata_pb.d.ts} +28 -23
- package/bin/genproto/mochabugapis/adapt/graph/vertex_metadata_pb.d.ts.map +1 -0
- package/bin/genproto/mochabugapis/adapt/plugins/v1/compound_services_pb.d.ts +347 -0
- package/bin/genproto/mochabugapis/adapt/plugins/v1/compound_services_pb.d.ts.map +1 -0
- package/bin/genproto/mochabugapis/adapt/plugins/v1/file_pb.d.ts +4 -2
- package/bin/genproto/mochabugapis/adapt/plugins/v1/file_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/http_proxy_service_pb.d.ts +1282 -0
- package/bin/genproto/mochabugapis/adapt/plugins/v1/http_proxy_service_pb.d.ts.map +1 -0
- package/bin/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.d.ts +188 -23
- package/bin/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.d.ts +129 -39
- package/bin/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts +50 -6
- package/bin/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.d.ts +145 -20
- package/bin/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/service_settings_pb.d.ts +539 -0
- package/bin/genproto/mochabugapis/adapt/plugins/v1/service_settings_pb.d.ts.map +1 -0
- package/bin/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts +134 -4
- package/bin/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts.map +1 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/vertex_pb.d.ts +92 -55
- package/bin/genproto/mochabugapis/adapt/plugins/v1/vertex_pb.d.ts.map +1 -1
- package/bin/index.d.ts +5 -0
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +709 -652
- package/bin/index.js.map +4 -4
- package/bin/init.d.ts.map +1 -1
- package/bin/oauth2.d.ts +1 -1
- package/bin/oauth2.d.ts.map +1 -1
- package/bin/publish.d.ts +4 -0
- package/bin/publish.d.ts.map +1 -1
- package/bin/utils.d.ts +4 -4
- package/bin/utils.d.ts.map +1 -1
- package/bin/vertices.d.ts +2 -2
- package/bin/vertices.d.ts.map +1 -1
- package/package.json +23 -18
- package/assets/license.md +0 -15
- package/bin/genproto/mochabugapis/adapt/graph/vertex_config_pb.d.ts.map +0 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/oneof_service_pb.d.ts +0 -92
- package/bin/genproto/mochabugapis/adapt/plugins/v1/oneof_service_pb.d.ts.map +0 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/service_binding_pb.d.ts +0 -134
- package/bin/genproto/mochabugapis/adapt/plugins/v1/service_binding_pb.d.ts.map +0 -1
- package/bin/genproto/mochabugapis/adapt/plugins/v1/tls_service_pb.d.ts +0 -159
- package/bin/genproto/mochabugapis/adapt/plugins/v1/tls_service_pb.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http_proxy_service_pb.d.ts","sourceRoot":"","sources":["../../../../../../src/genproto/mochabugapis/adapt/plugins/v1/http_proxy_service_pb.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGjF,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,qDAAqD,EAAE,OACytF,CAAC;AAE9xF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,mDAAmD,CAAC,GAAG;IAC/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,GAAG,CAAC,EAAE,aAAa,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,aAAa,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;KAAE,CAAC;CAClD,CAAC;AAEF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E,MAAM,GAAG,mBAAmB,CAAA;KAAE,CAAC;CAC1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAAe,EAAE;IAAC,QAAQ,EAAE,mBAAmB,CAAA;CAAC,CACxB,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,+CAA+C,CAAC,GAAG;IACvF;;;;;;;OAOG;IACH,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAAe,EAAE;IAAC,QAAQ,EAAE,mBAAmB,CAAA;CAAC,CACxB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { GenFile, GenMessage } from "@bufbuild/protobuf/
|
|
2
|
-
import type { ServiceBinding, ServiceBindingJson } from "./service_binding_pb";
|
|
1
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
3
2
|
import type { ServiceDefinition, ServiceDefinitionJson } from "./service_definition_pb";
|
|
4
3
|
import type { Vertex, VertexJson } from "./vertex_pb";
|
|
5
4
|
import type { Message } from "@bufbuild/protobuf";
|
|
@@ -10,8 +9,63 @@ export declare const file_mochabugapis_adapt_plugins_v1_manifest: GenFile;
|
|
|
10
9
|
/**
|
|
11
10
|
* Manifest describes a plugin and its properties.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* ## Architecture Overview
|
|
13
|
+
*
|
|
14
|
+
* A plugin consists of:
|
|
15
|
+
* 1. **Vertices**: The actual workflow nodes that users add to automation graphs
|
|
16
|
+
* 2. **Service Definitions**: Flat declarations of services (OAuth2, HTTP Proxy, Variables, Groups, OneOf)
|
|
17
|
+
* 3. **System Services**: String array referencing service definitions used at the plugin level
|
|
18
|
+
*
|
|
19
|
+
* ## Service Architecture
|
|
20
|
+
*
|
|
21
|
+
* **Service definitions are ALWAYS flat** - they exist at the top level of the manifest
|
|
22
|
+
* and are never nested within each other. This includes:
|
|
23
|
+
* - Oauth2Definition
|
|
24
|
+
* - HttpProxyDefinition
|
|
25
|
+
* - VariableDefinition
|
|
26
|
+
* - GroupedDefinition (references other flat definitions)
|
|
27
|
+
* - OneOfDefinition (references other flat definitions)
|
|
28
|
+
*
|
|
29
|
+
* **Services are referenced by name as strings**. Service lists are string arrays where each
|
|
30
|
+
* string must match a ServiceDefinition's `name`. Services exist at two levels:
|
|
31
|
+
* - `system_services`: Plugin-level services configured once for the entire plugin
|
|
32
|
+
* - `user_services` (in Vertex): Vertex-level services configured per vertex instance
|
|
33
|
+
*
|
|
34
|
+
* The `optional` field in ServiceDefinition controls whether a service must be configured:
|
|
35
|
+
* - `optional: false` (default): User MUST configure this service
|
|
36
|
+
* - `optional: true`: User MAY skip configuring this service
|
|
37
|
+
*
|
|
38
|
+
* ## Example Structure
|
|
39
|
+
*
|
|
40
|
+
* ```protobuf
|
|
41
|
+
* Manifest {
|
|
42
|
+
* name: "stripe_plugin"
|
|
43
|
+
* version: "1.0.0"
|
|
44
|
+
*
|
|
45
|
+
* // Flat service definitions at manifest level
|
|
46
|
+
* service_definitions: [
|
|
47
|
+
* { name: "stripe_oauth", oauth2: {...} },
|
|
48
|
+
* { name: "stripe_api", http_proxy: {...} },
|
|
49
|
+
* { name: "webhook_secret", variable: {...} }
|
|
50
|
+
* ]
|
|
51
|
+
*
|
|
52
|
+
* // System-level services (plugin-wide)
|
|
53
|
+
* // Each string references a service definition name
|
|
54
|
+
* system_services: ["stripe_oauth"]
|
|
55
|
+
*
|
|
56
|
+
* // Vertices with their own service references
|
|
57
|
+
* vertices: [
|
|
58
|
+
* {
|
|
59
|
+
* name: "CreatePayment",
|
|
60
|
+
* user_services: ["stripe_api", "webhook_secret"]
|
|
61
|
+
* }
|
|
62
|
+
* ]
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* ## Security Considerations
|
|
67
|
+
*
|
|
68
|
+
* The platform ensures that secrets and certificates are stored and transmitted securely.
|
|
15
69
|
*
|
|
16
70
|
* *** Plugin authors must also ensure that their implementations
|
|
17
71
|
* handle sensitive data appropriately! ***
|
|
@@ -95,27 +149,109 @@ export type Manifest = Message<"mochabugapis.adapt.plugins.v1.Manifest"> & {
|
|
|
95
149
|
*/
|
|
96
150
|
vertices: Vertex[];
|
|
97
151
|
/**
|
|
98
|
-
* 'service_definitions' are
|
|
99
|
-
*
|
|
152
|
+
* 'service_definitions' are flat service definitions that can be referenced by bindings.
|
|
153
|
+
*
|
|
154
|
+
* All service definitions exist at this top level - they are NEVER nested.
|
|
155
|
+
* Definitions can be referenced by:
|
|
156
|
+
* - system_services (plugin-level bindings)
|
|
157
|
+
* - user_services in vertices (vertex-level bindings)
|
|
158
|
+
*
|
|
159
|
+
* Each definition has a unique name used for referencing in bindings.
|
|
160
|
+
* Service types: OAuth2, HTTP Proxy, Variable, Group, OneOf.
|
|
100
161
|
*
|
|
101
162
|
* @generated from field: repeated mochabugapis.adapt.plugins.v1.ServiceDefinition service_definitions = 12;
|
|
102
163
|
*/
|
|
103
164
|
serviceDefinitions: ServiceDefinition[];
|
|
104
165
|
/**
|
|
105
|
-
* 'system_services' are
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
166
|
+
* 'system_services' are plugin-level services configured once for the entire plugin.
|
|
167
|
+
*
|
|
168
|
+
* System services are:
|
|
169
|
+
* - Configured by plugin administrators (via PostPluginSettings API)
|
|
170
|
+
* - Shared across all vertices in the plugin
|
|
171
|
+
* - Required to be configured before the plugin can be used (status = ACTIVE), unless marked optional
|
|
172
|
+
*
|
|
173
|
+
* This is a string array where each string directly references a ServiceDefinition by its name.
|
|
174
|
+
* Plugin code accesses these services using the referenced service name.
|
|
175
|
+
*
|
|
176
|
+
* The `optional` field in the ServiceDefinition controls whether configuration is required:
|
|
177
|
+
* - If ServiceDefinition.optional = false (default): MUST be configured
|
|
178
|
+
* - If ServiceDefinition.optional = true: MAY be skipped
|
|
179
|
+
*
|
|
180
|
+
* Example:
|
|
181
|
+
* service_definitions: [
|
|
182
|
+
* { name: "github_oauth", oauth2: {...} },
|
|
183
|
+
* { name: "analytics", oauth2: {...}, optional: true }
|
|
184
|
+
* ]
|
|
185
|
+
* system_services: ["github_oauth", "analytics"]
|
|
186
|
+
* Plugin code references: "github_oauth", "analytics"
|
|
187
|
+
*
|
|
188
|
+
* IMPORTANT: For OAuth2 CODE grant type services, the service definition name is used
|
|
189
|
+
* for callback URL generation.
|
|
109
190
|
*
|
|
110
|
-
* @generated from field: repeated
|
|
191
|
+
* @generated from field: repeated string system_services = 13;
|
|
111
192
|
*/
|
|
112
|
-
systemServices:
|
|
193
|
+
systemServices: string[];
|
|
113
194
|
};
|
|
114
195
|
/**
|
|
115
196
|
* Manifest describes a plugin and its properties.
|
|
116
197
|
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
198
|
+
* ## Architecture Overview
|
|
199
|
+
*
|
|
200
|
+
* A plugin consists of:
|
|
201
|
+
* 1. **Vertices**: The actual workflow nodes that users add to automation graphs
|
|
202
|
+
* 2. **Service Definitions**: Flat declarations of services (OAuth2, HTTP Proxy, Variables, Groups, OneOf)
|
|
203
|
+
* 3. **System Services**: String array referencing service definitions used at the plugin level
|
|
204
|
+
*
|
|
205
|
+
* ## Service Architecture
|
|
206
|
+
*
|
|
207
|
+
* **Service definitions are ALWAYS flat** - they exist at the top level of the manifest
|
|
208
|
+
* and are never nested within each other. This includes:
|
|
209
|
+
* - Oauth2Definition
|
|
210
|
+
* - HttpProxyDefinition
|
|
211
|
+
* - VariableDefinition
|
|
212
|
+
* - GroupedDefinition (references other flat definitions)
|
|
213
|
+
* - OneOfDefinition (references other flat definitions)
|
|
214
|
+
*
|
|
215
|
+
* **Services are referenced by name as strings**. Service lists are string arrays where each
|
|
216
|
+
* string must match a ServiceDefinition's `name`. Services exist at two levels:
|
|
217
|
+
* - `system_services`: Plugin-level services configured once for the entire plugin
|
|
218
|
+
* - `user_services` (in Vertex): Vertex-level services configured per vertex instance
|
|
219
|
+
*
|
|
220
|
+
* The `optional` field in ServiceDefinition controls whether a service must be configured:
|
|
221
|
+
* - `optional: false` (default): User MUST configure this service
|
|
222
|
+
* - `optional: true`: User MAY skip configuring this service
|
|
223
|
+
*
|
|
224
|
+
* ## Example Structure
|
|
225
|
+
*
|
|
226
|
+
* ```protobuf
|
|
227
|
+
* Manifest {
|
|
228
|
+
* name: "stripe_plugin"
|
|
229
|
+
* version: "1.0.0"
|
|
230
|
+
*
|
|
231
|
+
* // Flat service definitions at manifest level
|
|
232
|
+
* service_definitions: [
|
|
233
|
+
* { name: "stripe_oauth", oauth2: {...} },
|
|
234
|
+
* { name: "stripe_api", http_proxy: {...} },
|
|
235
|
+
* { name: "webhook_secret", variable: {...} }
|
|
236
|
+
* ]
|
|
237
|
+
*
|
|
238
|
+
* // System-level services (plugin-wide)
|
|
239
|
+
* // Each string references a service definition name
|
|
240
|
+
* system_services: ["stripe_oauth"]
|
|
241
|
+
*
|
|
242
|
+
* // Vertices with their own service references
|
|
243
|
+
* vertices: [
|
|
244
|
+
* {
|
|
245
|
+
* name: "CreatePayment",
|
|
246
|
+
* user_services: ["stripe_api", "webhook_secret"]
|
|
247
|
+
* }
|
|
248
|
+
* ]
|
|
249
|
+
* }
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* ## Security Considerations
|
|
253
|
+
*
|
|
254
|
+
* The platform ensures that secrets and certificates are stored and transmitted securely.
|
|
119
255
|
*
|
|
120
256
|
* *** Plugin authors must also ensure that their implementations
|
|
121
257
|
* handle sensitive data appropriately! ***
|
|
@@ -199,25 +335,54 @@ export type ManifestJson = {
|
|
|
199
335
|
*/
|
|
200
336
|
vertices?: VertexJson[];
|
|
201
337
|
/**
|
|
202
|
-
* 'service_definitions' are
|
|
203
|
-
*
|
|
338
|
+
* 'service_definitions' are flat service definitions that can be referenced by bindings.
|
|
339
|
+
*
|
|
340
|
+
* All service definitions exist at this top level - they are NEVER nested.
|
|
341
|
+
* Definitions can be referenced by:
|
|
342
|
+
* - system_services (plugin-level bindings)
|
|
343
|
+
* - user_services in vertices (vertex-level bindings)
|
|
344
|
+
*
|
|
345
|
+
* Each definition has a unique name used for referencing in bindings.
|
|
346
|
+
* Service types: OAuth2, HTTP Proxy, Variable, Group, OneOf.
|
|
204
347
|
*
|
|
205
348
|
* @generated from field: repeated mochabugapis.adapt.plugins.v1.ServiceDefinition service_definitions = 12;
|
|
206
349
|
*/
|
|
207
350
|
serviceDefinitions?: ServiceDefinitionJson[];
|
|
208
351
|
/**
|
|
209
|
-
* 'system_services' are
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
352
|
+
* 'system_services' are plugin-level services configured once for the entire plugin.
|
|
353
|
+
*
|
|
354
|
+
* System services are:
|
|
355
|
+
* - Configured by plugin administrators (via PostPluginSettings API)
|
|
356
|
+
* - Shared across all vertices in the plugin
|
|
357
|
+
* - Required to be configured before the plugin can be used (status = ACTIVE), unless marked optional
|
|
358
|
+
*
|
|
359
|
+
* This is a string array where each string directly references a ServiceDefinition by its name.
|
|
360
|
+
* Plugin code accesses these services using the referenced service name.
|
|
361
|
+
*
|
|
362
|
+
* The `optional` field in the ServiceDefinition controls whether configuration is required:
|
|
363
|
+
* - If ServiceDefinition.optional = false (default): MUST be configured
|
|
364
|
+
* - If ServiceDefinition.optional = true: MAY be skipped
|
|
365
|
+
*
|
|
366
|
+
* Example:
|
|
367
|
+
* service_definitions: [
|
|
368
|
+
* { name: "github_oauth", oauth2: {...} },
|
|
369
|
+
* { name: "analytics", oauth2: {...}, optional: true }
|
|
370
|
+
* ]
|
|
371
|
+
* system_services: ["github_oauth", "analytics"]
|
|
372
|
+
* Plugin code references: "github_oauth", "analytics"
|
|
373
|
+
*
|
|
374
|
+
* IMPORTANT: For OAuth2 CODE grant type services, the service definition name is used
|
|
375
|
+
* for callback URL generation.
|
|
213
376
|
*
|
|
214
|
-
* @generated from field: repeated
|
|
377
|
+
* @generated from field: repeated string system_services = 13;
|
|
215
378
|
*/
|
|
216
|
-
systemServices?:
|
|
379
|
+
systemServices?: string[];
|
|
217
380
|
};
|
|
218
381
|
/**
|
|
219
382
|
* Describes the message mochabugapis.adapt.plugins.v1.Manifest.
|
|
220
383
|
* Use `create(ManifestSchema)` to create a new message.
|
|
221
384
|
*/
|
|
222
|
-
export declare const ManifestSchema: GenMessage<Manifest,
|
|
385
|
+
export declare const ManifestSchema: GenMessage<Manifest, {
|
|
386
|
+
jsonType: ManifestJson;
|
|
387
|
+
}>;
|
|
223
388
|
//# sourceMappingURL=manifest_pb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest_pb.d.ts","sourceRoot":"","sources":["../../../../../../src/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"manifest_pb.d.ts","sourceRoot":"","sources":["../../../../../../src/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAExF,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;G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ErB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;IAExB;;;;;;;;;;;;OAYG;IACH,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,QAAQ,EAAE;IAAC,QAAQ,EAAE,YAAY,CAAA;CAAC,CACb,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
2
|
import type { File, FileJson } from "./file_pb";
|
|
3
3
|
import type { Message } from "@bufbuild/protobuf";
|
|
4
4
|
/**
|
|
@@ -18,7 +18,8 @@ export type Oauth2Definition = Message<"mochabugapis.adapt.plugins.v1.Oauth2Defi
|
|
|
18
18
|
*/
|
|
19
19
|
grantType: Oauth2GrantType;
|
|
20
20
|
/**
|
|
21
|
-
* The
|
|
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.
|
|
22
23
|
*
|
|
23
24
|
* @generated from field: repeated string scopes = 2;
|
|
24
25
|
*/
|
|
@@ -84,7 +85,8 @@ export type Oauth2DefinitionJson = {
|
|
|
84
85
|
*/
|
|
85
86
|
grantType?: Oauth2GrantTypeJson;
|
|
86
87
|
/**
|
|
87
|
-
* The
|
|
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.
|
|
88
90
|
*
|
|
89
91
|
* @generated from field: repeated string scopes = 2;
|
|
90
92
|
*/
|
|
@@ -141,7 +143,9 @@ export type Oauth2DefinitionJson = {
|
|
|
141
143
|
* Describes the message mochabugapis.adapt.plugins.v1.Oauth2Definition.
|
|
142
144
|
* Use `create(Oauth2DefinitionSchema)` to create a new message.
|
|
143
145
|
*/
|
|
144
|
-
export declare const Oauth2DefinitionSchema: GenMessage<Oauth2Definition,
|
|
146
|
+
export declare const Oauth2DefinitionSchema: GenMessage<Oauth2Definition, {
|
|
147
|
+
jsonType: Oauth2DefinitionJson;
|
|
148
|
+
}>;
|
|
145
149
|
/**
|
|
146
150
|
* The code grant type
|
|
147
151
|
* IMPORTANT: it has to be configured with refresh token in order to work correctly
|
|
@@ -157,24 +161,12 @@ export type Oauth2Code = Message<"mochabugapis.adapt.plugins.v1.Oauth2Code"> & {
|
|
|
157
161
|
* @generated from field: string auth_endpoint = 1;
|
|
158
162
|
*/
|
|
159
163
|
authEndpoint: string;
|
|
160
|
-
/**
|
|
161
|
-
* We need to know the issuer in order to validate the token
|
|
162
|
-
*
|
|
163
|
-
* @generated from field: string issuer = 2;
|
|
164
|
-
*/
|
|
165
|
-
issuer: string;
|
|
166
|
-
/**
|
|
167
|
-
* We also need the JWKs endpoint to validate the token
|
|
168
|
-
*
|
|
169
|
-
* @generated from field: string jwks_uri = 3;
|
|
170
|
-
*/
|
|
171
|
-
jwksUri: string;
|
|
172
164
|
/**
|
|
173
165
|
* Additional parameters used for the oauth2 login endpoint
|
|
174
166
|
* Do not include state or nonce here since we're generating them
|
|
175
167
|
* in the backend. All params will be encoded in the URL
|
|
176
168
|
*
|
|
177
|
-
* @generated from field: map<string, string> additional_params =
|
|
169
|
+
* @generated from field: map<string, string> additional_params = 2;
|
|
178
170
|
*/
|
|
179
171
|
additionalParams: {
|
|
180
172
|
[key: string]: string;
|
|
@@ -182,7 +174,7 @@ export type Oauth2Code = Message<"mochabugapis.adapt.plugins.v1.Oauth2Code"> & {
|
|
|
182
174
|
/**
|
|
183
175
|
* Whether or not to use the PKCE extension
|
|
184
176
|
*
|
|
185
|
-
* @generated from field: bool use_pkce =
|
|
177
|
+
* @generated from field: bool use_pkce = 3;
|
|
186
178
|
*/
|
|
187
179
|
usePkce: boolean;
|
|
188
180
|
};
|
|
@@ -201,24 +193,12 @@ export type Oauth2CodeJson = {
|
|
|
201
193
|
* @generated from field: string auth_endpoint = 1;
|
|
202
194
|
*/
|
|
203
195
|
authEndpoint?: string;
|
|
204
|
-
/**
|
|
205
|
-
* We need to know the issuer in order to validate the token
|
|
206
|
-
*
|
|
207
|
-
* @generated from field: string issuer = 2;
|
|
208
|
-
*/
|
|
209
|
-
issuer?: string;
|
|
210
|
-
/**
|
|
211
|
-
* We also need the JWKs endpoint to validate the token
|
|
212
|
-
*
|
|
213
|
-
* @generated from field: string jwks_uri = 3;
|
|
214
|
-
*/
|
|
215
|
-
jwksUri?: string;
|
|
216
196
|
/**
|
|
217
197
|
* Additional parameters used for the oauth2 login endpoint
|
|
218
198
|
* Do not include state or nonce here since we're generating them
|
|
219
199
|
* in the backend. All params will be encoded in the URL
|
|
220
200
|
*
|
|
221
|
-
* @generated from field: map<string, string> additional_params =
|
|
201
|
+
* @generated from field: map<string, string> additional_params = 2;
|
|
222
202
|
*/
|
|
223
203
|
additionalParams?: {
|
|
224
204
|
[key: string]: string;
|
|
@@ -226,7 +206,7 @@ export type Oauth2CodeJson = {
|
|
|
226
206
|
/**
|
|
227
207
|
* Whether or not to use the PKCE extension
|
|
228
208
|
*
|
|
229
|
-
* @generated from field: bool use_pkce =
|
|
209
|
+
* @generated from field: bool use_pkce = 3;
|
|
230
210
|
*/
|
|
231
211
|
usePkce?: boolean;
|
|
232
212
|
};
|
|
@@ -234,7 +214,9 @@ export type Oauth2CodeJson = {
|
|
|
234
214
|
* Describes the message mochabugapis.adapt.plugins.v1.Oauth2Code.
|
|
235
215
|
* Use `create(Oauth2CodeSchema)` to create a new message.
|
|
236
216
|
*/
|
|
237
|
-
export declare const Oauth2CodeSchema: GenMessage<Oauth2Code,
|
|
217
|
+
export declare const Oauth2CodeSchema: GenMessage<Oauth2Code, {
|
|
218
|
+
jsonType: Oauth2CodeJson;
|
|
219
|
+
}>;
|
|
238
220
|
/**
|
|
239
221
|
* The actual oauth2 config
|
|
240
222
|
*
|
|
@@ -358,7 +340,9 @@ export type Oauth2ConfigJson = {
|
|
|
358
340
|
* Describes the message mochabugapis.adapt.plugins.v1.Oauth2Config.
|
|
359
341
|
* Use `create(Oauth2ConfigSchema)` to create a new message.
|
|
360
342
|
*/
|
|
361
|
-
export declare const Oauth2ConfigSchema: GenMessage<Oauth2Config,
|
|
343
|
+
export declare const Oauth2ConfigSchema: GenMessage<Oauth2Config, {
|
|
344
|
+
jsonType: Oauth2ConfigJson;
|
|
345
|
+
}>;
|
|
362
346
|
/**
|
|
363
347
|
* Basic auth
|
|
364
348
|
*
|
|
@@ -389,7 +373,9 @@ export type BasicAuthJson = {
|
|
|
389
373
|
* Describes the message mochabugapis.adapt.plugins.v1.BasicAuth.
|
|
390
374
|
* Use `create(BasicAuthSchema)` to create a new message.
|
|
391
375
|
*/
|
|
392
|
-
export declare const BasicAuthSchema: GenMessage<BasicAuth,
|
|
376
|
+
export declare const BasicAuthSchema: GenMessage<BasicAuth, {
|
|
377
|
+
jsonType: BasicAuthJson;
|
|
378
|
+
}>;
|
|
393
379
|
/**
|
|
394
380
|
* Form auth
|
|
395
381
|
*
|
|
@@ -420,7 +406,9 @@ export type FormAuthJson = {
|
|
|
420
406
|
* Describes the message mochabugapis.adapt.plugins.v1.FormAuth.
|
|
421
407
|
* Use `create(FormAuthSchema)` to create a new message.
|
|
422
408
|
*/
|
|
423
|
-
export declare const FormAuthSchema: GenMessage<FormAuth,
|
|
409
|
+
export declare const FormAuthSchema: GenMessage<FormAuth, {
|
|
410
|
+
jsonType: FormAuthJson;
|
|
411
|
+
}>;
|
|
424
412
|
/**
|
|
425
413
|
* Private JWT auth
|
|
426
414
|
*
|
|
@@ -435,6 +423,13 @@ export type PrivateJWTAuth = Message<"mochabugapis.adapt.plugins.v1.PrivateJWTAu
|
|
|
435
423
|
* @generated from field: mochabugapis.adapt.plugins.v1.File private_key = 1;
|
|
436
424
|
*/
|
|
437
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;
|
|
438
433
|
};
|
|
439
434
|
/**
|
|
440
435
|
* Private JWT auth
|
|
@@ -450,12 +445,21 @@ export type PrivateJWTAuthJson = {
|
|
|
450
445
|
* @generated from field: mochabugapis.adapt.plugins.v1.File private_key = 1;
|
|
451
446
|
*/
|
|
452
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;
|
|
453
455
|
};
|
|
454
456
|
/**
|
|
455
457
|
* Describes the message mochabugapis.adapt.plugins.v1.PrivateJWTAuth.
|
|
456
458
|
* Use `create(PrivateJWTAuthSchema)` to create a new message.
|
|
457
459
|
*/
|
|
458
|
-
export declare const PrivateJWTAuthSchema: GenMessage<PrivateJWTAuth,
|
|
460
|
+
export declare const PrivateJWTAuthSchema: GenMessage<PrivateJWTAuth, {
|
|
461
|
+
jsonType: PrivateJWTAuthJson;
|
|
462
|
+
}>;
|
|
459
463
|
/**
|
|
460
464
|
* mTLS auth
|
|
461
465
|
*
|
|
@@ -486,6 +490,47 @@ export type MTLSAuth = Message<"mochabugapis.adapt.plugins.v1.MTLSAuth"> & {
|
|
|
486
490
|
* @generated from field: mochabugapis.adapt.plugins.v1.File ca_certificate = 3;
|
|
487
491
|
*/
|
|
488
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;
|
|
489
534
|
};
|
|
490
535
|
/**
|
|
491
536
|
* mTLS auth
|
|
@@ -517,12 +562,55 @@ export type MTLSAuthJson = {
|
|
|
517
562
|
* @generated from field: mochabugapis.adapt.plugins.v1.File ca_certificate = 3;
|
|
518
563
|
*/
|
|
519
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;
|
|
520
606
|
};
|
|
521
607
|
/**
|
|
522
608
|
* Describes the message mochabugapis.adapt.plugins.v1.MTLSAuth.
|
|
523
609
|
* Use `create(MTLSAuthSchema)` to create a new message.
|
|
524
610
|
*/
|
|
525
|
-
export declare const MTLSAuthSchema: GenMessage<MTLSAuth,
|
|
611
|
+
export declare const MTLSAuthSchema: GenMessage<MTLSAuth, {
|
|
612
|
+
jsonType: MTLSAuthJson;
|
|
613
|
+
}>;
|
|
526
614
|
/**
|
|
527
615
|
* SAML bearer auth
|
|
528
616
|
*
|
|
@@ -573,7 +661,9 @@ export type SAMLAuthJson = {
|
|
|
573
661
|
* Describes the message mochabugapis.adapt.plugins.v1.SAMLAuth.
|
|
574
662
|
* Use `create(SAMLAuthSchema)` to create a new message.
|
|
575
663
|
*/
|
|
576
|
-
export declare const SAMLAuthSchema: GenMessage<SAMLAuth,
|
|
664
|
+
export declare const SAMLAuthSchema: GenMessage<SAMLAuth, {
|
|
665
|
+
jsonType: SAMLAuthJson;
|
|
666
|
+
}>;
|
|
577
667
|
/**
|
|
578
668
|
* The algorithm used for signing JWT or SAML assertions
|
|
579
669
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth2_service_pb.d.ts","sourceRoot":"","sources":["../../../../../../src/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGjF,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,iDAAiD,EAAE,OAC+
|
|
1
|
+
{"version":3,"file":"oauth2_service_pb.d.ts","sourceRoot":"","sources":["../../../../../../src/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGjF,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,iDAAiD,EAAE,OAC+lJ,CAAC;AAEhqJ;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,gDAAgD,CAAC,GAAG;IACzF;;;;OAIG;IACH,SAAS,EAAE,eAAe,CAAC;IAE3B;;;;;OAKG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,EAAE,aAAa,CAAC;IAEpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;OAIG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAEhC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAEhC;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,EAAE,iBAAiB,CAAC;IAExB;;;;;OAKG;IACH,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