@dtkt/protoform 0.0.0-stage → 0.1.0
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/LICENSE +202 -0
- package/README.md +221 -2
- package/dist/base.d.ts +19 -0
- package/dist/comments.d.ts +9 -0
- package/dist/components/enum.d.ts +24 -0
- package/dist/components/field.d.ts +16 -0
- package/dist/components/frame.d.ts +6 -0
- package/dist/components/group.d.ts +25 -0
- package/dist/components/hooks.d.ts +18 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/components/index.js +14 -0
- package/dist/components/list.d.ts +7 -0
- package/dist/components/map.d.ts +7 -0
- package/dist/components/message.d.ts +17 -0
- package/dist/components/oneof.d.ts +8 -0
- package/dist/components/protoform.d.ts +20 -0
- package/dist/components/scalar.d.ts +34 -0
- package/dist/components/select.d.ts +1 -0
- package/dist/components/submit.d.ts +8 -0
- package/dist/components/wkt.d.ts +20 -0
- package/dist/context-DSrebuNf.js +1024 -0
- package/dist/element.d.ts +23 -0
- package/dist/enum.d.ts +17 -0
- package/dist/env.d.ts +28 -0
- package/dist/favicon.ico +0 -0
- package/dist/field.d.ts +17 -0
- package/dist/gen/dtkt/protoform/v1beta1/protoform_pb.d.ts +463 -0
- package/dist/gen/dtkt/protoform/v1beta1/protoform_pb.js +6 -0
- package/dist/gen/google/api/field_behavior_pb.d.ts +133 -0
- package/dist/gen/google/api/field_behavior_pb.js +5 -0
- package/dist/icons.svg +24 -0
- package/dist/kit/bare.d.ts +3 -0
- package/dist/kit/context.d.ts +56 -0
- package/dist/kit/index.d.ts +4 -0
- package/dist/kit/index.js +1 -0
- package/dist/kit/tailwind/index.d.ts +7 -0
- package/dist/kit/tailwind/index.js +327 -0
- package/dist/kit/types.d.ts +126 -0
- package/dist/list.d.ts +29 -0
- package/dist/main.d.ts +13 -0
- package/dist/main.js +3 -0
- package/dist/map.d.ts +36 -0
- package/dist/message.d.ts +61 -0
- package/dist/oneof.d.ts +27 -0
- package/dist/path.d.ts +8 -0
- package/dist/protoform-DmMJ7LSw.js +835 -0
- package/dist/providers/env.d.ts +4 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +11 -0
- package/dist/providers/ui.d.ts +13 -0
- package/dist/scalar.d.ts +30 -0
- package/dist/store.d.ts +29 -0
- package/dist/styles.css +2 -0
- package/dist/ui-DGND0oTu.js +32 -0
- package/dist/wellknown.d.ts +10 -0
- package/package.json +141 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DescField, DescOneof, ScalarType } from '@bufbuild/protobuf';
|
|
2
|
+
import { FieldElement } from './gen/dtkt/protoform/v1beta1/protoform_pb';
|
|
3
|
+
import { Commentable } from './comments';
|
|
4
|
+
export declare class Element {
|
|
5
|
+
readonly proto: FieldElement;
|
|
6
|
+
readonly valid: boolean;
|
|
7
|
+
readonly hidden: boolean;
|
|
8
|
+
/** Whether a `(buf.validate.field).required` rule applies. */
|
|
9
|
+
readonly required: boolean;
|
|
10
|
+
/** Explicit description or proto comments; empty if the field is undocumented. */
|
|
11
|
+
readonly documented: string;
|
|
12
|
+
constructor(desc: DescField | DescOneof);
|
|
13
|
+
type(): FieldElement["type"];
|
|
14
|
+
title(): string;
|
|
15
|
+
description(): string;
|
|
16
|
+
}
|
|
17
|
+
export declare function isIdentifier(desc: DescField): boolean;
|
|
18
|
+
export declare function isOutputOnly(desc: DescField): boolean;
|
|
19
|
+
/** Returns the (cached) Element for a descriptor; fields are re-created on every render. */
|
|
20
|
+
export declare function elementFor(desc: DescField | DescOneof): Element;
|
|
21
|
+
export declare function getFieldDescription(desc: DescField): string;
|
|
22
|
+
export declare function getProtoDescription(desc: Commentable, multiline?: boolean): string;
|
|
23
|
+
export declare function getScalarTypeName(scalarType: ScalarType): string;
|
package/dist/enum.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DescField, DescEnum, EnumShape } from '@bufbuild/protobuf';
|
|
2
|
+
import { BaseField } from './base';
|
|
3
|
+
export type EnumFieldDesc = Extract<DescField, {
|
|
4
|
+
fieldKind: "enum";
|
|
5
|
+
}>;
|
|
6
|
+
export declare class EnumField extends BaseField<EnumFieldDesc> {
|
|
7
|
+
get(): number;
|
|
8
|
+
set(value: number): void;
|
|
9
|
+
/** Accepts a value name (`FOO_BAR`) or number. */
|
|
10
|
+
parse(value: string): void;
|
|
11
|
+
toString(): string;
|
|
12
|
+
}
|
|
13
|
+
export declare function parseEnum<Desc extends DescEnum>(descEnum: Desc, value: string): EnumShape<Desc> | undefined;
|
|
14
|
+
export declare function formatEnum<Desc extends DescEnum>(descEnum: Desc, value: EnumShape<Desc>, trimPrefix?: boolean): string;
|
|
15
|
+
/** A human-friendly label: `CONNECTION_STATE_NOT_READY` -> `Not ready`. */
|
|
16
|
+
export declare function enumLabel<Desc extends DescEnum>(descEnum: Desc, value: EnumShape<Desc>): string;
|
|
17
|
+
export declare function allEnumValues<Desc extends DescEnum>(descEnum: Desc): EnumShape<Desc>[];
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Registry } from '@bufbuild/protobuf';
|
|
3
|
+
import { Transport } from '@connectrpc/connect';
|
|
4
|
+
import { Validator } from '@bufbuild/protovalidate';
|
|
5
|
+
export declare const defaultRegistry: import('@bufbuild/protobuf').MutableRegistry;
|
|
6
|
+
export declare const defaultValidator: Validator;
|
|
7
|
+
export declare function createDefaultValidator(registry?: Registry): Validator;
|
|
8
|
+
export declare function createDefaultTransport(registry?: Registry): Transport;
|
|
9
|
+
export type EnvOptions = {
|
|
10
|
+
registry?: Registry;
|
|
11
|
+
validator?: Validator;
|
|
12
|
+
transport?: Transport;
|
|
13
|
+
/** Limits which message types can be chosen for `google.protobuf.Any` fields. */
|
|
14
|
+
anyTypeFilter?: (typeName: string) => boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare class Env {
|
|
17
|
+
readonly registry: Registry;
|
|
18
|
+
readonly anyTypeFilter: (typeName: string) => boolean;
|
|
19
|
+
private _transport?;
|
|
20
|
+
private _validator?;
|
|
21
|
+
constructor({ registry, validator, transport, anyTypeFilter }?: EnvOptions);
|
|
22
|
+
/** Created on first use so importing the library has no side effects. */
|
|
23
|
+
get transport(): Transport;
|
|
24
|
+
/** Created on first use so importing the library has no side effects. */
|
|
25
|
+
get validator(): Validator;
|
|
26
|
+
}
|
|
27
|
+
export declare const EnvContext: React.Context<Env>;
|
|
28
|
+
export declare const useEnv: () => Env;
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/dist/field.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DescField } from '@bufbuild/protobuf';
|
|
2
|
+
import { Violation } from '@bufbuild/protovalidate';
|
|
3
|
+
import { Element } from './element';
|
|
4
|
+
import { Message } from './message';
|
|
5
|
+
export interface Field {
|
|
6
|
+
readonly parent: Message;
|
|
7
|
+
readonly desc: DescField;
|
|
8
|
+
readonly elem: Element;
|
|
9
|
+
/** Location of the field in the message, e.g. `items[0].name`. */
|
|
10
|
+
readonly path: string;
|
|
11
|
+
readonly errors: Violation[];
|
|
12
|
+
/** Validation violations plus local input errors (e.g. unparsable numbers). */
|
|
13
|
+
errorMessages(): string[];
|
|
14
|
+
toString(): string;
|
|
15
|
+
parse(value: string): void;
|
|
16
|
+
}
|
|
17
|
+
export declare function createField(parent: Message, desc: DescField): Field;
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
import { GenExtension, GenFile, GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
2
|
+
import { Message } from '@bufbuild/protobuf';
|
|
3
|
+
import { FieldOptions } from '@bufbuild/protobuf/wkt';
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file dtkt/protoform/v1beta1/protoform.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_dtkt_protoform_v1beta1_protoform: GenFile;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @generated from message dtkt.protoform.v1beta1.FieldElement
|
|
11
|
+
*/
|
|
12
|
+
export declare type FieldElement = Message<"dtkt.protoform.v1beta1.FieldElement"> & {
|
|
13
|
+
/**
|
|
14
|
+
* @generated from field: optional string title = 1;
|
|
15
|
+
*/
|
|
16
|
+
title?: string | undefined;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @generated from field: optional string description = 2;
|
|
20
|
+
*/
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @generated from field: optional bool hidden = 3;
|
|
25
|
+
*/
|
|
26
|
+
hidden?: boolean | undefined;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @generated from oneof dtkt.protoform.v1beta1.FieldElement.type
|
|
30
|
+
*/
|
|
31
|
+
type: {
|
|
32
|
+
/**
|
|
33
|
+
* @generated from field: dtkt.protoform.v1beta1.ConfirmElement confirm = 4;
|
|
34
|
+
*/
|
|
35
|
+
value: ConfirmElement;
|
|
36
|
+
case: "confirm";
|
|
37
|
+
} | {
|
|
38
|
+
/**
|
|
39
|
+
* @generated from field: dtkt.protoform.v1beta1.InputElement input = 5;
|
|
40
|
+
*/
|
|
41
|
+
value: InputElement;
|
|
42
|
+
case: "input";
|
|
43
|
+
} | {
|
|
44
|
+
/**
|
|
45
|
+
* @generated from field: dtkt.protoform.v1beta1.FileElement file = 6;
|
|
46
|
+
*/
|
|
47
|
+
value: FileElement;
|
|
48
|
+
case: "file";
|
|
49
|
+
} | {
|
|
50
|
+
/**
|
|
51
|
+
* @generated from field: dtkt.protoform.v1beta1.SelectElement select = 7;
|
|
52
|
+
*/
|
|
53
|
+
value: SelectElement;
|
|
54
|
+
case: "select";
|
|
55
|
+
} | {
|
|
56
|
+
/**
|
|
57
|
+
* @generated from field: dtkt.protoform.v1beta1.MultiSelectElement multi_select = 8;
|
|
58
|
+
*/
|
|
59
|
+
value: MultiSelectElement;
|
|
60
|
+
case: "multiSelect";
|
|
61
|
+
} | { case: undefined; value?: undefined };
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @generated from message dtkt.protoform.v1beta1.FieldElement
|
|
66
|
+
*/
|
|
67
|
+
export declare type FieldElementValid = Message<"dtkt.protoform.v1beta1.FieldElement"> & {
|
|
68
|
+
/**
|
|
69
|
+
* @generated from field: optional string title = 1;
|
|
70
|
+
*/
|
|
71
|
+
title?: string | undefined;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @generated from field: optional string description = 2;
|
|
75
|
+
*/
|
|
76
|
+
description?: string | undefined;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @generated from field: optional bool hidden = 3;
|
|
80
|
+
*/
|
|
81
|
+
hidden?: boolean | undefined;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @generated from oneof dtkt.protoform.v1beta1.FieldElement.type
|
|
85
|
+
*/
|
|
86
|
+
type: {
|
|
87
|
+
/**
|
|
88
|
+
* @generated from field: dtkt.protoform.v1beta1.ConfirmElement confirm = 4;
|
|
89
|
+
*/
|
|
90
|
+
value: ConfirmElementValid;
|
|
91
|
+
case: "confirm";
|
|
92
|
+
} | {
|
|
93
|
+
/**
|
|
94
|
+
* @generated from field: dtkt.protoform.v1beta1.InputElement input = 5;
|
|
95
|
+
*/
|
|
96
|
+
value: InputElementValid;
|
|
97
|
+
case: "input";
|
|
98
|
+
} | {
|
|
99
|
+
/**
|
|
100
|
+
* @generated from field: dtkt.protoform.v1beta1.FileElement file = 6;
|
|
101
|
+
*/
|
|
102
|
+
value: FileElementValid;
|
|
103
|
+
case: "file";
|
|
104
|
+
} | {
|
|
105
|
+
/**
|
|
106
|
+
* @generated from field: dtkt.protoform.v1beta1.SelectElement select = 7;
|
|
107
|
+
*/
|
|
108
|
+
value: SelectElementValid;
|
|
109
|
+
case: "select";
|
|
110
|
+
} | {
|
|
111
|
+
/**
|
|
112
|
+
* @generated from field: dtkt.protoform.v1beta1.MultiSelectElement multi_select = 8;
|
|
113
|
+
*/
|
|
114
|
+
value: MultiSelectElementValid;
|
|
115
|
+
case: "multiSelect";
|
|
116
|
+
} | { case: undefined; value?: undefined };
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Describes the message dtkt.protoform.v1beta1.FieldElement.
|
|
121
|
+
* Use `create(FieldElementSchema)` to create a new message.
|
|
122
|
+
*/
|
|
123
|
+
export declare const FieldElementSchema: GenMessage<FieldElement, {validType: FieldElementValid}>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Confirm element (approve/decline)
|
|
127
|
+
*
|
|
128
|
+
* @generated from message dtkt.protoform.v1beta1.ConfirmElement
|
|
129
|
+
*/
|
|
130
|
+
export declare type ConfirmElement = Message<"dtkt.protoform.v1beta1.ConfirmElement"> & {
|
|
131
|
+
/**
|
|
132
|
+
* @generated from field: string approve = 1;
|
|
133
|
+
*/
|
|
134
|
+
approve: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @generated from field: string decline = 2;
|
|
138
|
+
*/
|
|
139
|
+
decline: string;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @generated from field: bool default_selected = 3;
|
|
143
|
+
*/
|
|
144
|
+
defaultSelected: boolean;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export declare type ConfirmElementValid = ConfirmElement;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Describes the message dtkt.protoform.v1beta1.ConfirmElement.
|
|
151
|
+
* Use `create(ConfirmElementSchema)` to create a new message.
|
|
152
|
+
*/
|
|
153
|
+
export declare const ConfirmElementSchema: GenMessage<ConfirmElement, {validType: ConfirmElementValid}>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Input element with multi-line text option
|
|
157
|
+
*
|
|
158
|
+
* @generated from message dtkt.protoform.v1beta1.InputElement
|
|
159
|
+
*/
|
|
160
|
+
export declare type InputElement = Message<"dtkt.protoform.v1beta1.InputElement"> & {
|
|
161
|
+
/**
|
|
162
|
+
* @generated from field: optional bool multiline_text = 1;
|
|
163
|
+
*/
|
|
164
|
+
multilineText?: boolean | undefined;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export declare type InputElementValid = InputElement;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Describes the message dtkt.protoform.v1beta1.InputElement.
|
|
171
|
+
* Use `create(InputElementSchema)` to create a new message.
|
|
172
|
+
*/
|
|
173
|
+
export declare const InputElementSchema: GenMessage<InputElement, {validType: InputElementValid}>;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* File element
|
|
177
|
+
*
|
|
178
|
+
* @generated from message dtkt.protoform.v1beta1.FileElement
|
|
179
|
+
*/
|
|
180
|
+
export declare type FileElement = Message<"dtkt.protoform.v1beta1.FileElement"> & {
|
|
181
|
+
/**
|
|
182
|
+
* @generated from field: repeated string allowed_types = 2;
|
|
183
|
+
*/
|
|
184
|
+
allowedTypes: string[];
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export declare type FileElementValid = FileElement;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Describes the message dtkt.protoform.v1beta1.FileElement.
|
|
191
|
+
* Use `create(FileElementSchema)` to create a new message.
|
|
192
|
+
*/
|
|
193
|
+
export declare const FileElementSchema: GenMessage<FileElement, {validType: FileElementValid}>;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Select element
|
|
197
|
+
*
|
|
198
|
+
* @generated from message dtkt.protoform.v1beta1.SelectElement
|
|
199
|
+
*/
|
|
200
|
+
export declare type SelectElement = Message<"dtkt.protoform.v1beta1.SelectElement"> & {
|
|
201
|
+
/**
|
|
202
|
+
* A fully-qualified method name to call at runtime to retrieve options for
|
|
203
|
+
* this select element. The method must return a message containing a repeated
|
|
204
|
+
* field to be used as the options for this select element.
|
|
205
|
+
*
|
|
206
|
+
* @generated from field: string method_name = 1;
|
|
207
|
+
*/
|
|
208
|
+
methodName: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Name of a repeated field within the method's response whose value defines
|
|
212
|
+
* the select element's options.
|
|
213
|
+
*
|
|
214
|
+
* @generated from field: string response_field = 2;
|
|
215
|
+
*/
|
|
216
|
+
responseField: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* CEL expression to extract the label for each select element option.
|
|
220
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
221
|
+
* will be available as `this` in the CEL expression context.
|
|
222
|
+
*
|
|
223
|
+
* @generated from field: string label_expr = 3;
|
|
224
|
+
*/
|
|
225
|
+
labelExpr: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Optional CEL expression to extract the value for each select element option.
|
|
229
|
+
* The resolved expression value must match the field type this option is
|
|
230
|
+
* applied to.
|
|
231
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
232
|
+
* will be available as `this` in the CEL expression context.
|
|
233
|
+
* Default: resolved list item value (dynamic).
|
|
234
|
+
*
|
|
235
|
+
* @generated from field: optional string value_expr = 4;
|
|
236
|
+
*/
|
|
237
|
+
valueExpr?: string | undefined;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Optional CEL expression to filter options returned by method response by
|
|
241
|
+
* only including options for which `filter_expr` returns `true`.
|
|
242
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
243
|
+
* will be available as `this` in the CEL expression context.
|
|
244
|
+
*
|
|
245
|
+
* @generated from field: optional string filter_expr = 5;
|
|
246
|
+
*/
|
|
247
|
+
filterExpr?: string | undefined;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* When defined, `filter_expr` is defined, and the method request contains a
|
|
251
|
+
* `filter (string)` field, set its value to `filter_expr`.
|
|
252
|
+
*
|
|
253
|
+
* @generated from field: optional bool use_filter_field = 6;
|
|
254
|
+
*/
|
|
255
|
+
useFilterField?: boolean | undefined;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Select element
|
|
260
|
+
*
|
|
261
|
+
* @generated from message dtkt.protoform.v1beta1.SelectElement
|
|
262
|
+
*/
|
|
263
|
+
export declare type SelectElementValid = Message<"dtkt.protoform.v1beta1.SelectElement"> & {
|
|
264
|
+
/**
|
|
265
|
+
* A fully-qualified method name to call at runtime to retrieve options for
|
|
266
|
+
* this select element. The method must return a message containing a repeated
|
|
267
|
+
* field to be used as the options for this select element.
|
|
268
|
+
*
|
|
269
|
+
* @generated from field: string method_name = 1;
|
|
270
|
+
*/
|
|
271
|
+
methodName: string;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Name of a repeated field within the method's response whose value defines
|
|
275
|
+
* the select element's options.
|
|
276
|
+
*
|
|
277
|
+
* @generated from field: string response_field = 2;
|
|
278
|
+
*/
|
|
279
|
+
responseField: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* CEL expression to extract the label for each select element option.
|
|
283
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
284
|
+
* will be available as `this` in the CEL expression context.
|
|
285
|
+
*
|
|
286
|
+
* @generated from field: string label_expr = 3;
|
|
287
|
+
*/
|
|
288
|
+
labelExpr: string;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Optional CEL expression to extract the value for each select element option.
|
|
292
|
+
* The resolved expression value must match the field type this option is
|
|
293
|
+
* applied to.
|
|
294
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
295
|
+
* will be available as `this` in the CEL expression context.
|
|
296
|
+
* Default: resolved list item value (dynamic).
|
|
297
|
+
*
|
|
298
|
+
* @generated from field: optional string value_expr = 4;
|
|
299
|
+
*/
|
|
300
|
+
valueExpr?: string | undefined;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Optional CEL expression to filter options returned by method response by
|
|
304
|
+
* only including options for which `filter_expr` returns `true`.
|
|
305
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
306
|
+
* will be available as `this` in the CEL expression context.
|
|
307
|
+
*
|
|
308
|
+
* @generated from field: optional string filter_expr = 5;
|
|
309
|
+
*/
|
|
310
|
+
filterExpr?: string | undefined;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* When defined, `filter_expr` is defined, and the method request contains a
|
|
314
|
+
* `filter (string)` field, set its value to `filter_expr`.
|
|
315
|
+
*
|
|
316
|
+
* @generated from field: optional bool use_filter_field = 6;
|
|
317
|
+
*/
|
|
318
|
+
useFilterField?: boolean | undefined;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Describes the message dtkt.protoform.v1beta1.SelectElement.
|
|
323
|
+
* Use `create(SelectElementSchema)` to create a new message.
|
|
324
|
+
*/
|
|
325
|
+
export declare const SelectElementSchema: GenMessage<SelectElement, {validType: SelectElementValid}>;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Multi-select element
|
|
329
|
+
*
|
|
330
|
+
* @generated from message dtkt.protoform.v1beta1.MultiSelectElement
|
|
331
|
+
*/
|
|
332
|
+
export declare type MultiSelectElement = Message<"dtkt.protoform.v1beta1.MultiSelectElement"> & {
|
|
333
|
+
/**
|
|
334
|
+
* A fully-qualified method name to call at runtime to retrieve options for
|
|
335
|
+
* this select element. The method must return a message containing a repeated
|
|
336
|
+
* field to be used as the options for this select element.
|
|
337
|
+
*
|
|
338
|
+
* @generated from field: string method_name = 1;
|
|
339
|
+
*/
|
|
340
|
+
methodName: string;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Name of a repeated field within the method's response whose value defines
|
|
344
|
+
* the select element's options.
|
|
345
|
+
*
|
|
346
|
+
* @generated from field: string response_field = 2;
|
|
347
|
+
*/
|
|
348
|
+
responseField: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* CEL expression to extract the label for each select element option.
|
|
352
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
353
|
+
* will be available as `this` in the CEL expression context.
|
|
354
|
+
*
|
|
355
|
+
* @generated from field: string label_expr = 3;
|
|
356
|
+
*/
|
|
357
|
+
labelExpr: string;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Optional CEL expression to extract the value for each select element option.
|
|
361
|
+
* The resolved expression value must match the field type this option is
|
|
362
|
+
* applied to.
|
|
363
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
364
|
+
* will be available as `this` in the CEL expression context.
|
|
365
|
+
* Default: resolved list item value (dynamic).
|
|
366
|
+
*
|
|
367
|
+
* @generated from field: optional string value_expr = 4;
|
|
368
|
+
*/
|
|
369
|
+
valueExpr?: string | undefined;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Optional CEL expression to filter options returned by method response by
|
|
373
|
+
* only including options for which `filter_expr` returns `true`.
|
|
374
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
375
|
+
* will be available as `this` in the CEL expression context.
|
|
376
|
+
*
|
|
377
|
+
* @generated from field: optional string filter_expr = 5;
|
|
378
|
+
*/
|
|
379
|
+
filterExpr?: string | undefined;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* When defined, `filter_expr` is defined, and the method request contains a
|
|
383
|
+
* `filter (string)` field, set its value to `filter_expr`.
|
|
384
|
+
*
|
|
385
|
+
* @generated from field: optional bool use_filter_field = 6;
|
|
386
|
+
*/
|
|
387
|
+
useFilterField?: boolean | undefined;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Multi-select element
|
|
392
|
+
*
|
|
393
|
+
* @generated from message dtkt.protoform.v1beta1.MultiSelectElement
|
|
394
|
+
*/
|
|
395
|
+
export declare type MultiSelectElementValid = Message<"dtkt.protoform.v1beta1.MultiSelectElement"> & {
|
|
396
|
+
/**
|
|
397
|
+
* A fully-qualified method name to call at runtime to retrieve options for
|
|
398
|
+
* this select element. The method must return a message containing a repeated
|
|
399
|
+
* field to be used as the options for this select element.
|
|
400
|
+
*
|
|
401
|
+
* @generated from field: string method_name = 1;
|
|
402
|
+
*/
|
|
403
|
+
methodName: string;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Name of a repeated field within the method's response whose value defines
|
|
407
|
+
* the select element's options.
|
|
408
|
+
*
|
|
409
|
+
* @generated from field: string response_field = 2;
|
|
410
|
+
*/
|
|
411
|
+
responseField: string;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* CEL expression to extract the label for each select element option.
|
|
415
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
416
|
+
* will be available as `this` in the CEL expression context.
|
|
417
|
+
*
|
|
418
|
+
* @generated from field: string label_expr = 3;
|
|
419
|
+
*/
|
|
420
|
+
labelExpr: string;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Optional CEL expression to extract the value for each select element option.
|
|
424
|
+
* The resolved expression value must match the field type this option is
|
|
425
|
+
* applied to.
|
|
426
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
427
|
+
* will be available as `this` in the CEL expression context.
|
|
428
|
+
* Default: resolved list item value (dynamic).
|
|
429
|
+
*
|
|
430
|
+
* @generated from field: optional string value_expr = 4;
|
|
431
|
+
*/
|
|
432
|
+
valueExpr?: string | undefined;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Optional CEL expression to filter options returned by method response by
|
|
436
|
+
* only including options for which `filter_expr` returns `true`.
|
|
437
|
+
* Each list item within the resolved `response_field` of the method's response
|
|
438
|
+
* will be available as `this` in the CEL expression context.
|
|
439
|
+
*
|
|
440
|
+
* @generated from field: optional string filter_expr = 5;
|
|
441
|
+
*/
|
|
442
|
+
filterExpr?: string | undefined;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* When defined, `filter_expr` is defined, and the method request contains a
|
|
446
|
+
* `filter (string)` field, set its value to `filter_expr`.
|
|
447
|
+
*
|
|
448
|
+
* @generated from field: optional bool use_filter_field = 6;
|
|
449
|
+
*/
|
|
450
|
+
useFilterField?: boolean | undefined;
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Describes the message dtkt.protoform.v1beta1.MultiSelectElement.
|
|
455
|
+
* Use `create(MultiSelectElementSchema)` to create a new message.
|
|
456
|
+
*/
|
|
457
|
+
export declare const MultiSelectElementSchema: GenMessage<MultiSelectElement, {validType: MultiSelectElementValid}>;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* @generated from extension: optional dtkt.protoform.v1beta1.FieldElement field = 50000;
|
|
461
|
+
*/
|
|
462
|
+
export declare const field: GenExtension<FieldOptions, FieldElement>;
|
|
463
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { file_google_protobuf_descriptor as e } from "@bufbuild/protobuf/wkt";
|
|
2
|
+
import { extDesc as t, fileDesc as n, messageDesc as r } from "@bufbuild/protobuf/codegenv2";
|
|
3
|
+
import { file_buf_validate_validate as i } from "@bufbuild/protovalidate/gen/buf/validate/validate_pb.js";
|
|
4
|
+
// lib/gen/dtkt/protoform/v1beta1/protoform_pb.js
|
|
5
|
+
var a = /*@__PURE__*/ n("CiZkdGt0L3Byb3RvZm9ybS92MWJldGExL3Byb3RvZm9ybS5wcm90bxIWZHRrdC5wcm90b2Zvcm0udjFiZXRhMSKiAwoMRmllbGRFbGVtZW50EhIKBXRpdGxlGAEgASgJSAGIAQESGAoLZGVzY3JpcHRpb24YAiABKAlIAogBARITCgZoaWRkZW4YAyABKAhIA4gBARI5Cgdjb25maXJtGAQgASgLMiYuZHRrdC5wcm90b2Zvcm0udjFiZXRhMS5Db25maXJtRWxlbWVudEgAEjUKBWlucHV0GAUgASgLMiQuZHRrdC5wcm90b2Zvcm0udjFiZXRhMS5JbnB1dEVsZW1lbnRIABIzCgRmaWxlGAYgASgLMiMuZHRrdC5wcm90b2Zvcm0udjFiZXRhMS5GaWxlRWxlbWVudEgAEjcKBnNlbGVjdBgHIAEoCzIlLmR0a3QucHJvdG9mb3JtLnYxYmV0YTEuU2VsZWN0RWxlbWVudEgAEkIKDG11bHRpX3NlbGVjdBgIIAEoCzIqLmR0a3QucHJvdG9mb3JtLnYxYmV0YTEuTXVsdGlTZWxlY3RFbGVtZW50SABCBgoEdHlwZUIICgZfdGl0bGVCDgoMX2Rlc2NyaXB0aW9uQgkKB19oaWRkZW4iTAoOQ29uZmlybUVsZW1lbnQSDwoHYXBwcm92ZRgBIAEoCRIPCgdkZWNsaW5lGAIgASgJEhgKEGRlZmF1bHRfc2VsZWN0ZWQYAyABKAgiPgoMSW5wdXRFbGVtZW50EhsKDm11bHRpbGluZV90ZXh0GAEgASgISACIAQFCEQoPX211bHRpbGluZV90ZXh0IiQKC0ZpbGVFbGVtZW50EhUKDWFsbG93ZWRfdHlwZXMYAiADKAki2wIKDVNlbGVjdEVsZW1lbnQSPwoLbWV0aG9kX25hbWUYASABKAlCKrpIJ8gBAXIikgIfZHRrdC5leGFtcGxlLkdyZWV0U2VydmljZS5HcmVldBIrCg5yZXNwb25zZV9maWVsZBgCIAEoCUITukgQyAEBcguSAghtZXNzYWdlcxIoCgpsYWJlbF9leHByGAMgASgJQhS6SBHIAQFyDJICCXRoaXMudGV4dBIoCgp2YWx1ZV9leHByGAQgASgJQg+6SAxyCpICB3RoaXMuaWRIAIgBARI1CgtmaWx0ZXJfZXhwchgFIAEoCUIbukgYchaSAhNzaXplKHRoaXMudGV4dCkgPiAwSAGIAQESHQoQdXNlX2ZpbHRlcl9maWVsZBgGIAEoCEgCiAEBQg0KC192YWx1ZV9leHByQg4KDF9maWx0ZXJfZXhwckITChFfdXNlX2ZpbHRlcl9maWVsZCLgAgoSTXVsdGlTZWxlY3RFbGVtZW50Ej8KC21ldGhvZF9uYW1lGAEgASgJQiq6SCfIAQFyIpICH2R0a3QuZXhhbXBsZS5HcmVldFNlcnZpY2UuR3JlZXQSKwoOcmVzcG9uc2VfZmllbGQYAiABKAlCE7pIEMgBAXILkgIIbWVzc2FnZXMSKAoKbGFiZWxfZXhwchgDIAEoCUIUukgRyAEBcgySAgl0aGlzLnRleHQSKAoKdmFsdWVfZXhwchgEIAEoCUIPukgMcgqSAgd0aGlzLmlkSACIAQESNQoLZmlsdGVyX2V4cHIYBSABKAlCG7pIGHIWkgITc2l6ZSh0aGlzLnRleHQpID4gMEgBiAEBEh0KEHVzZV9maWx0ZXJfZmllbGQYBiABKAhIAogBAUINCgtfdmFsdWVfZXhwckIOCgxfZmlsdGVyX2V4cHJCEwoRX3VzZV9maWx0ZXJfZmllbGQ6XgoFZmllbGQSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGNCGAyABKAsyJC5kdGt0LnByb3RvZm9ybS52MWJldGExLkZpZWxkRWxlbWVudFIFZmllbGSIAQFCRVpDZ2l0aHViLmNvbS9kYXRha2l0LWRldi9kdGt0LXNkay9zZGstZ28vcHJvdG8vZHRrdC9wcm90b2Zvcm0vdjFiZXRhMWIGcHJvdG8z", [i, e]), o = /*@__PURE__*/ r(a, 0), s = /*@__PURE__*/ r(a, 1), c = /*@__PURE__*/ r(a, 2), l = /*@__PURE__*/ r(a, 3), u = /*@__PURE__*/ r(a, 4), d = /*@__PURE__*/ r(a, 5), f = /*@__PURE__*/ t(a, 0);
|
|
6
|
+
export { s as ConfirmElementSchema, o as FieldElementSchema, l as FileElementSchema, c as InputElementSchema, d as MultiSelectElementSchema, u as SelectElementSchema, f as field, a as file_dtkt_protoform_v1beta1_protoform };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { GenEnum, GenExtension, GenFile } from '@bufbuild/protobuf/codegenv2';
|
|
2
|
+
import { FieldOptions } from '@bufbuild/protobuf/wkt';
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file google/api/field_behavior.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_google_api_field_behavior: GenFile;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* An indicator of the behavior of a given field (for example, that a field
|
|
10
|
+
* is required in requests, or given as output but ignored as input).
|
|
11
|
+
* This **does not** change the behavior in protocol buffers itself; it only
|
|
12
|
+
* denotes the behavior and may affect how API tooling handles the field.
|
|
13
|
+
*
|
|
14
|
+
* Note: This enum **may** receive new values in the future.
|
|
15
|
+
*
|
|
16
|
+
* @generated from enum google.api.FieldBehavior
|
|
17
|
+
*/
|
|
18
|
+
export enum FieldBehavior {
|
|
19
|
+
/**
|
|
20
|
+
* Conventional default for enums. Do not use this.
|
|
21
|
+
*
|
|
22
|
+
* @generated from enum value: FIELD_BEHAVIOR_UNSPECIFIED = 0;
|
|
23
|
+
*/
|
|
24
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0,
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Specifically denotes a field as optional.
|
|
28
|
+
* While all fields in protocol buffers are optional, this may be specified
|
|
29
|
+
* for emphasis if appropriate.
|
|
30
|
+
*
|
|
31
|
+
* @generated from enum value: OPTIONAL = 1;
|
|
32
|
+
*/
|
|
33
|
+
OPTIONAL = 1,
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Denotes a field as required.
|
|
37
|
+
* This indicates that the field **must** be provided as part of the request,
|
|
38
|
+
* and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
|
39
|
+
*
|
|
40
|
+
* @generated from enum value: REQUIRED = 2;
|
|
41
|
+
*/
|
|
42
|
+
REQUIRED = 2,
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Denotes a field as output only.
|
|
46
|
+
* This indicates that the field is provided in responses, but including the
|
|
47
|
+
* field in a request does nothing (the server *must* ignore it and
|
|
48
|
+
* *must not* throw an error as a result of the field's presence).
|
|
49
|
+
*
|
|
50
|
+
* @generated from enum value: OUTPUT_ONLY = 3;
|
|
51
|
+
*/
|
|
52
|
+
OUTPUT_ONLY = 3,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Denotes a field as input only.
|
|
56
|
+
* This indicates that the field is provided in requests, and the
|
|
57
|
+
* corresponding field is not included in output.
|
|
58
|
+
*
|
|
59
|
+
* @generated from enum value: INPUT_ONLY = 4;
|
|
60
|
+
*/
|
|
61
|
+
INPUT_ONLY = 4,
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Denotes a field as immutable.
|
|
65
|
+
* This indicates that the field may be set once in a request to create a
|
|
66
|
+
* resource, but may not be changed thereafter.
|
|
67
|
+
*
|
|
68
|
+
* @generated from enum value: IMMUTABLE = 5;
|
|
69
|
+
*/
|
|
70
|
+
IMMUTABLE = 5,
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Denotes that a (repeated) field is an unordered list.
|
|
74
|
+
* This indicates that the service may provide the elements of the list
|
|
75
|
+
* in any arbitrary order, rather than the order the user originally
|
|
76
|
+
* provided. Additionally, the list's order may or may not be stable.
|
|
77
|
+
*
|
|
78
|
+
* @generated from enum value: UNORDERED_LIST = 6;
|
|
79
|
+
*/
|
|
80
|
+
UNORDERED_LIST = 6,
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Denotes that this field returns a non-empty default value if not set.
|
|
84
|
+
* This indicates that if the user provides the empty value in a request,
|
|
85
|
+
* a non-empty value will be returned. The user will not be aware of what
|
|
86
|
+
* non-empty value to expect.
|
|
87
|
+
*
|
|
88
|
+
* @generated from enum value: NON_EMPTY_DEFAULT = 7;
|
|
89
|
+
*/
|
|
90
|
+
NON_EMPTY_DEFAULT = 7,
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Denotes that the field in a resource (a message annotated with
|
|
94
|
+
* google.api.resource) is used in the resource name to uniquely identify the
|
|
95
|
+
* resource. For AIP-compliant APIs, this should only be applied to the
|
|
96
|
+
* `name` field on the resource.
|
|
97
|
+
*
|
|
98
|
+
* This behavior should not be applied to references to other resources within
|
|
99
|
+
* the message.
|
|
100
|
+
*
|
|
101
|
+
* The identifier field of resources often have different field behavior
|
|
102
|
+
* depending on the request it is embedded in (e.g. for Create methods name
|
|
103
|
+
* is optional and unused, while for Update methods it is required). Instead
|
|
104
|
+
* of method-specific annotations, only `IDENTIFIER` is required.
|
|
105
|
+
*
|
|
106
|
+
* @generated from enum value: IDENTIFIER = 8;
|
|
107
|
+
*/
|
|
108
|
+
IDENTIFIER = 8,
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Describes the enum google.api.FieldBehavior.
|
|
113
|
+
*/
|
|
114
|
+
export declare const FieldBehaviorSchema: GenEnum<FieldBehavior>;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* A designation of a specific field behavior (required, output only, etc.)
|
|
118
|
+
* in protobuf messages.
|
|
119
|
+
*
|
|
120
|
+
* Examples:
|
|
121
|
+
*
|
|
122
|
+
* string name = 1 [(google.api.field_behavior) = REQUIRED];
|
|
123
|
+
* State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
124
|
+
* google.protobuf.Duration ttl = 1
|
|
125
|
+
* [(google.api.field_behavior) = INPUT_ONLY];
|
|
126
|
+
* google.protobuf.Timestamp expire_time = 1
|
|
127
|
+
* [(google.api.field_behavior) = OUTPUT_ONLY,
|
|
128
|
+
* (google.api.field_behavior) = IMMUTABLE];
|
|
129
|
+
*
|
|
130
|
+
* @generated from extension: repeated google.api.FieldBehavior field_behavior = 1052;
|
|
131
|
+
*/
|
|
132
|
+
export declare const field_behavior: GenExtension<FieldOptions, FieldBehavior[]>;
|
|
133
|
+
|