@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/
|
|
1
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
2
|
import type { File, FileJson } from "./file_pb";
|
|
3
3
|
import type { Manifest, ManifestJson } from "./manifest_pb";
|
|
4
4
|
import type { Message } from "@bufbuild/protobuf";
|
|
@@ -68,7 +68,9 @@ export type UploadPluginRequestJson = {
|
|
|
68
68
|
* Describes the message mochabugapis.adapt.plugins.v1.UploadPluginRequest.
|
|
69
69
|
* Use `create(UploadPluginRequestSchema)` to create a new message.
|
|
70
70
|
*/
|
|
71
|
-
export declare const UploadPluginRequestSchema: GenMessage<UploadPluginRequest,
|
|
71
|
+
export declare const UploadPluginRequestSchema: GenMessage<UploadPluginRequest, {
|
|
72
|
+
jsonType: UploadPluginRequestJson;
|
|
73
|
+
}>;
|
|
72
74
|
/**
|
|
73
75
|
* The start message containing information about the files to be uploaded.
|
|
74
76
|
*
|
|
@@ -100,12 +102,31 @@ export type StartUpload = Message<"mochabugapis.adapt.plugins.v1.StartUpload"> &
|
|
|
100
102
|
* @generated from field: string executor_path = 4;
|
|
101
103
|
*/
|
|
102
104
|
executorPath: string;
|
|
105
|
+
/**
|
|
106
|
+
* Any additional wasm modules needed for the executor
|
|
107
|
+
*
|
|
108
|
+
* @generated from field: repeated string executor_wasm = 5;
|
|
109
|
+
*/
|
|
110
|
+
executorWasm: string[];
|
|
103
111
|
/**
|
|
104
112
|
* The configurator file path
|
|
105
113
|
*
|
|
106
|
-
* @generated from field: optional string configurator_path =
|
|
114
|
+
* @generated from field: optional string configurator_path = 6;
|
|
107
115
|
*/
|
|
108
116
|
configuratorPath?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Any additional wasm modules needed for the executor
|
|
119
|
+
*
|
|
120
|
+
* @generated from field: repeated string configurator_wasm = 7;
|
|
121
|
+
*/
|
|
122
|
+
configuratorWasm: string[];
|
|
123
|
+
/**
|
|
124
|
+
* Whether we should copy-over previous system settings (if any) to the new
|
|
125
|
+
* plugin.
|
|
126
|
+
*
|
|
127
|
+
* @generated from field: optional bool copy_system_settings = 8;
|
|
128
|
+
*/
|
|
129
|
+
copySystemSettings?: boolean;
|
|
109
130
|
};
|
|
110
131
|
/**
|
|
111
132
|
* The start message containing information about the files to be uploaded.
|
|
@@ -138,18 +159,39 @@ export type StartUploadJson = {
|
|
|
138
159
|
* @generated from field: string executor_path = 4;
|
|
139
160
|
*/
|
|
140
161
|
executorPath?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Any additional wasm modules needed for the executor
|
|
164
|
+
*
|
|
165
|
+
* @generated from field: repeated string executor_wasm = 5;
|
|
166
|
+
*/
|
|
167
|
+
executorWasm?: string[];
|
|
141
168
|
/**
|
|
142
169
|
* The configurator file path
|
|
143
170
|
*
|
|
144
|
-
* @generated from field: optional string configurator_path =
|
|
171
|
+
* @generated from field: optional string configurator_path = 6;
|
|
145
172
|
*/
|
|
146
173
|
configuratorPath?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Any additional wasm modules needed for the executor
|
|
176
|
+
*
|
|
177
|
+
* @generated from field: repeated string configurator_wasm = 7;
|
|
178
|
+
*/
|
|
179
|
+
configuratorWasm?: string[];
|
|
180
|
+
/**
|
|
181
|
+
* Whether we should copy-over previous system settings (if any) to the new
|
|
182
|
+
* plugin.
|
|
183
|
+
*
|
|
184
|
+
* @generated from field: optional bool copy_system_settings = 8;
|
|
185
|
+
*/
|
|
186
|
+
copySystemSettings?: boolean;
|
|
147
187
|
};
|
|
148
188
|
/**
|
|
149
189
|
* Describes the message mochabugapis.adapt.plugins.v1.StartUpload.
|
|
150
190
|
* Use `create(StartUploadSchema)` to create a new message.
|
|
151
191
|
*/
|
|
152
|
-
export declare const StartUploadSchema: GenMessage<StartUpload,
|
|
192
|
+
export declare const StartUploadSchema: GenMessage<StartUpload, {
|
|
193
|
+
jsonType: StartUploadJson;
|
|
194
|
+
}>;
|
|
153
195
|
/**
|
|
154
196
|
* UploadPluginResponse represents the response from the CreatePlugin streaming
|
|
155
197
|
* RPC. The server sends a single CreatePluginResponse after successfully
|
|
@@ -170,7 +212,9 @@ export type UploadPluginResponseJson = {};
|
|
|
170
212
|
* Describes the message mochabugapis.adapt.plugins.v1.UploadPluginResponse.
|
|
171
213
|
* Use `create(UploadPluginResponseSchema)` to create a new message.
|
|
172
214
|
*/
|
|
173
|
-
export declare const UploadPluginResponseSchema: GenMessage<UploadPluginResponse,
|
|
215
|
+
export declare const UploadPluginResponseSchema: GenMessage<UploadPluginResponse, {
|
|
216
|
+
jsonType: UploadPluginResponseJson;
|
|
217
|
+
}>;
|
|
174
218
|
/**
|
|
175
219
|
* PluginService provides a service for uploading a plugin.
|
|
176
220
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins_pb.d.ts","sourceRoot":"","sources":["../../../../../../src/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAKpF,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,OAAO,EAAE,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AC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,UAAU,CAAC,oBAAoB,EAAE;IAAC,QAAQ,EAAE,wBAAwB,CAAA;CAAC,CAClD,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC;IACrC;;;;;;;OAOG;IACH,YAAY,EAAE;QACZ,UAAU,EAAE,kBAAkB,CAAC;QAC/B,KAAK,EAAE,OAAO,yBAAyB,CAAC;QACxC,MAAM,EAAE,OAAO,0BAA0B,CAAC;KAC3C,CAAC;CACH,CAC2D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { GenFile, GenMessage } from "@bufbuild/protobuf/
|
|
1
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { GroupedDefinition, GroupedDefinitionJson, OneOfDefinition, OneOfDefinitionJson } from "./compound_services_pb";
|
|
3
|
+
import type { HttpProxyDefinition, HttpProxyDefinitionJson } from "./http_proxy_service_pb";
|
|
2
4
|
import type { Oauth2Definition, Oauth2DefinitionJson } from "./oauth2_service_pb";
|
|
3
|
-
import type { TlsDefinition, TlsDefinitionJson } from "./tls_service_pb";
|
|
4
5
|
import type { VariableDefinition, VariableDefinitionJson } from "./variable_service_pb";
|
|
5
6
|
import type { Message } from "@bufbuild/protobuf";
|
|
6
7
|
/**
|
|
@@ -8,7 +9,39 @@ import type { Message } from "@bufbuild/protobuf";
|
|
|
8
9
|
*/
|
|
9
10
|
export declare const file_mochabugapis_adapt_plugins_v1_service_definition: GenFile;
|
|
10
11
|
/**
|
|
11
|
-
* The service definition
|
|
12
|
+
* The service definition - a flat declaration of a service that can be referenced by bindings.
|
|
13
|
+
*
|
|
14
|
+
* ## Architecture Principle: Service Definitions Are Always Flat
|
|
15
|
+
*
|
|
16
|
+
* Service definitions exist ONLY at the Manifest.service_definitions level and are NEVER nested.
|
|
17
|
+
* Each definition has a unique name and a specific type (Variable, OAuth2, HTTP Proxy, Group, OneOf).
|
|
18
|
+
*
|
|
19
|
+
* ## Referencing from Service Lists
|
|
20
|
+
*
|
|
21
|
+
* Service lists (Manifest.system_services and Vertex.user_services) are string arrays that
|
|
22
|
+
* directly reference service definitions by name. Each string must match a ServiceDefinition's `name`.
|
|
23
|
+
*
|
|
24
|
+
* ## Service Types
|
|
25
|
+
*
|
|
26
|
+
* - **VariableDefinition**: JSON variable with schema validation
|
|
27
|
+
* - **Oauth2Definition**: OAuth2 authentication (various grant types)
|
|
28
|
+
* - **HttpProxyDefinition**: HTTP proxy with TLS and header injection
|
|
29
|
+
* - **GroupedDefinition**: References multiple other flat definitions as a group
|
|
30
|
+
* - **OneOfDefinition**: Allows user to choose one from multiple flat definitions
|
|
31
|
+
*
|
|
32
|
+
* ## Example
|
|
33
|
+
*
|
|
34
|
+
* ```protobuf
|
|
35
|
+
* // In Manifest.service_definitions
|
|
36
|
+
* [
|
|
37
|
+
* { name: "api_key", variable: { schema: {...} } },
|
|
38
|
+
* { name: "oauth", oauth2: { grant_type: AUTHORIZATION_CODE, ... } },
|
|
39
|
+
* { name: "proxy", http_proxy: { allowed_hosts: [...], ... } }
|
|
40
|
+
* ]
|
|
41
|
+
*
|
|
42
|
+
* // Referenced in service lists (strings matching service definition names)
|
|
43
|
+
* system_services: ["oauth"]
|
|
44
|
+
* ```
|
|
12
45
|
*
|
|
13
46
|
* @generated from message mochabugapis.adapt.plugins.v1.ServiceDefinition
|
|
14
47
|
*/
|
|
@@ -31,6 +64,21 @@ export type ServiceDefinition = Message<"mochabugapis.adapt.plugins.v1.ServiceDe
|
|
|
31
64
|
* @generated from field: optional string description = 3;
|
|
32
65
|
*/
|
|
33
66
|
description?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Whether this service is optional.
|
|
69
|
+
*
|
|
70
|
+
* If false (default):
|
|
71
|
+
* - User MUST configure this service during installation
|
|
72
|
+
* - Plugin can safely assume the service exists
|
|
73
|
+
*
|
|
74
|
+
* If true:
|
|
75
|
+
* - User MAY skip configuring this service
|
|
76
|
+
* - Plugin must handle the service being absent
|
|
77
|
+
* - Useful for optional features (analytics, monitoring, etc.)
|
|
78
|
+
*
|
|
79
|
+
* @generated from field: optional bool optional = 4;
|
|
80
|
+
*/
|
|
81
|
+
optional?: boolean;
|
|
34
82
|
/**
|
|
35
83
|
* The actual type of service that the definition is
|
|
36
84
|
*
|
|
@@ -40,18 +88,10 @@ export type ServiceDefinition = Message<"mochabugapis.adapt.plugins.v1.ServiceDe
|
|
|
40
88
|
/**
|
|
41
89
|
* Variable service containing arbitrary JSON
|
|
42
90
|
*
|
|
43
|
-
* @generated from field: mochabugapis.adapt.plugins.v1.VariableDefinition variable =
|
|
91
|
+
* @generated from field: mochabugapis.adapt.plugins.v1.VariableDefinition variable = 5;
|
|
44
92
|
*/
|
|
45
93
|
value: VariableDefinition;
|
|
46
94
|
case: "variable";
|
|
47
|
-
} | {
|
|
48
|
-
/**
|
|
49
|
-
* TLS service
|
|
50
|
-
*
|
|
51
|
-
* @generated from field: mochabugapis.adapt.plugins.v1.TlsDefinition tls = 5;
|
|
52
|
-
*/
|
|
53
|
-
value: TlsDefinition;
|
|
54
|
-
case: "tls";
|
|
55
95
|
} | {
|
|
56
96
|
/**
|
|
57
97
|
* An OAuth2 service
|
|
@@ -60,13 +100,69 @@ export type ServiceDefinition = Message<"mochabugapis.adapt.plugins.v1.ServiceDe
|
|
|
60
100
|
*/
|
|
61
101
|
value: Oauth2Definition;
|
|
62
102
|
case: "oauth2";
|
|
103
|
+
} | {
|
|
104
|
+
/**
|
|
105
|
+
* HTTP proxy service with TLS and header injection
|
|
106
|
+
*
|
|
107
|
+
* @generated from field: mochabugapis.adapt.plugins.v1.HttpProxyDefinition http_proxy = 7;
|
|
108
|
+
*/
|
|
109
|
+
value: HttpProxyDefinition;
|
|
110
|
+
case: "httpProxy";
|
|
111
|
+
} | {
|
|
112
|
+
/**
|
|
113
|
+
* A group definition, requiring it to be submitted as a group
|
|
114
|
+
*
|
|
115
|
+
* @generated from field: mochabugapis.adapt.plugins.v1.GroupedDefinition group = 8;
|
|
116
|
+
*/
|
|
117
|
+
value: GroupedDefinition;
|
|
118
|
+
case: "group";
|
|
119
|
+
} | {
|
|
120
|
+
/**
|
|
121
|
+
* A oneof definition, allowing one of several sub-definitions to be chosen
|
|
122
|
+
*
|
|
123
|
+
* @generated from field: mochabugapis.adapt.plugins.v1.OneOfDefinition oneof = 9;
|
|
124
|
+
*/
|
|
125
|
+
value: OneOfDefinition;
|
|
126
|
+
case: "oneof";
|
|
63
127
|
} | {
|
|
64
128
|
case: undefined;
|
|
65
129
|
value?: undefined;
|
|
66
130
|
};
|
|
67
131
|
};
|
|
68
132
|
/**
|
|
69
|
-
* The service definition
|
|
133
|
+
* The service definition - a flat declaration of a service that can be referenced by bindings.
|
|
134
|
+
*
|
|
135
|
+
* ## Architecture Principle: Service Definitions Are Always Flat
|
|
136
|
+
*
|
|
137
|
+
* Service definitions exist ONLY at the Manifest.service_definitions level and are NEVER nested.
|
|
138
|
+
* Each definition has a unique name and a specific type (Variable, OAuth2, HTTP Proxy, Group, OneOf).
|
|
139
|
+
*
|
|
140
|
+
* ## Referencing from Service Lists
|
|
141
|
+
*
|
|
142
|
+
* Service lists (Manifest.system_services and Vertex.user_services) are string arrays that
|
|
143
|
+
* directly reference service definitions by name. Each string must match a ServiceDefinition's `name`.
|
|
144
|
+
*
|
|
145
|
+
* ## Service Types
|
|
146
|
+
*
|
|
147
|
+
* - **VariableDefinition**: JSON variable with schema validation
|
|
148
|
+
* - **Oauth2Definition**: OAuth2 authentication (various grant types)
|
|
149
|
+
* - **HttpProxyDefinition**: HTTP proxy with TLS and header injection
|
|
150
|
+
* - **GroupedDefinition**: References multiple other flat definitions as a group
|
|
151
|
+
* - **OneOfDefinition**: Allows user to choose one from multiple flat definitions
|
|
152
|
+
*
|
|
153
|
+
* ## Example
|
|
154
|
+
*
|
|
155
|
+
* ```protobuf
|
|
156
|
+
* // In Manifest.service_definitions
|
|
157
|
+
* [
|
|
158
|
+
* { name: "api_key", variable: { schema: {...} } },
|
|
159
|
+
* { name: "oauth", oauth2: { grant_type: AUTHORIZATION_CODE, ... } },
|
|
160
|
+
* { name: "proxy", http_proxy: { allowed_hosts: [...], ... } }
|
|
161
|
+
* ]
|
|
162
|
+
*
|
|
163
|
+
* // Referenced in service lists (strings matching service definition names)
|
|
164
|
+
* system_services: ["oauth"]
|
|
165
|
+
* ```
|
|
70
166
|
*
|
|
71
167
|
* @generated from message mochabugapis.adapt.plugins.v1.ServiceDefinition
|
|
72
168
|
*/
|
|
@@ -90,27 +186,56 @@ export type ServiceDefinitionJson = {
|
|
|
90
186
|
*/
|
|
91
187
|
description?: string;
|
|
92
188
|
/**
|
|
93
|
-
*
|
|
189
|
+
* Whether this service is optional.
|
|
190
|
+
*
|
|
191
|
+
* If false (default):
|
|
192
|
+
* - User MUST configure this service during installation
|
|
193
|
+
* - Plugin can safely assume the service exists
|
|
94
194
|
*
|
|
95
|
-
*
|
|
195
|
+
* If true:
|
|
196
|
+
* - User MAY skip configuring this service
|
|
197
|
+
* - Plugin must handle the service being absent
|
|
198
|
+
* - Useful for optional features (analytics, monitoring, etc.)
|
|
199
|
+
*
|
|
200
|
+
* @generated from field: optional bool optional = 4;
|
|
96
201
|
*/
|
|
97
|
-
|
|
202
|
+
optional?: boolean;
|
|
98
203
|
/**
|
|
99
|
-
*
|
|
204
|
+
* Variable service containing arbitrary JSON
|
|
100
205
|
*
|
|
101
|
-
* @generated from field: mochabugapis.adapt.plugins.v1.
|
|
206
|
+
* @generated from field: mochabugapis.adapt.plugins.v1.VariableDefinition variable = 5;
|
|
102
207
|
*/
|
|
103
|
-
|
|
208
|
+
variable?: VariableDefinitionJson;
|
|
104
209
|
/**
|
|
105
210
|
* An OAuth2 service
|
|
106
211
|
*
|
|
107
212
|
* @generated from field: mochabugapis.adapt.plugins.v1.Oauth2Definition oauth2 = 6;
|
|
108
213
|
*/
|
|
109
214
|
oauth2?: Oauth2DefinitionJson;
|
|
215
|
+
/**
|
|
216
|
+
* HTTP proxy service with TLS and header injection
|
|
217
|
+
*
|
|
218
|
+
* @generated from field: mochabugapis.adapt.plugins.v1.HttpProxyDefinition http_proxy = 7;
|
|
219
|
+
*/
|
|
220
|
+
httpProxy?: HttpProxyDefinitionJson;
|
|
221
|
+
/**
|
|
222
|
+
* A group definition, requiring it to be submitted as a group
|
|
223
|
+
*
|
|
224
|
+
* @generated from field: mochabugapis.adapt.plugins.v1.GroupedDefinition group = 8;
|
|
225
|
+
*/
|
|
226
|
+
group?: GroupedDefinitionJson;
|
|
227
|
+
/**
|
|
228
|
+
* A oneof definition, allowing one of several sub-definitions to be chosen
|
|
229
|
+
*
|
|
230
|
+
* @generated from field: mochabugapis.adapt.plugins.v1.OneOfDefinition oneof = 9;
|
|
231
|
+
*/
|
|
232
|
+
oneof?: OneOfDefinitionJson;
|
|
110
233
|
};
|
|
111
234
|
/**
|
|
112
235
|
* Describes the message mochabugapis.adapt.plugins.v1.ServiceDefinition.
|
|
113
236
|
* Use `create(ServiceDefinitionSchema)` to create a new message.
|
|
114
237
|
*/
|
|
115
|
-
export declare const ServiceDefinitionSchema: GenMessage<ServiceDefinition,
|
|
238
|
+
export declare const ServiceDefinitionSchema: GenMessage<ServiceDefinition, {
|
|
239
|
+
jsonType: ServiceDefinitionJson;
|
|
240
|
+
}>;
|
|
116
241
|
//# sourceMappingURL=service_definition_pb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service_definition_pb.d.ts","sourceRoot":"","sources":["../../../../../../src/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"service_definition_pb.d.ts","sourceRoot":"","sources":["../../../../../../src/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.ts"],"names":[],"mappings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