@nacos-group/sdk-proto 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/package.json +21 -0
  2. package/src/ai/agentcapabilities.ts +104 -0
  3. package/src/ai/agentcard.ts +292 -0
  4. package/src/ai/agentcarddetailinfo.ts +308 -0
  5. package/src/ai/agentendpoint.ts +134 -0
  6. package/src/ai/agentextension.ts +152 -0
  7. package/src/ai/agentinterface.ts +93 -0
  8. package/src/ai/agentprovider.ts +75 -0
  9. package/src/ai/agentskill.ts +109 -0
  10. package/src/ai/ai_request.ts +608 -0
  11. package/src/ai/ai_response.ts +466 -0
  12. package/src/ai/argument.ts +58 -0
  13. package/src/ai/encryptobject.ts +142 -0
  14. package/src/ai/frontendpointconfig.ts +93 -0
  15. package/src/ai/icon.ts +87 -0
  16. package/src/ai/input.ts +120 -0
  17. package/src/ai/keyvalueinput.ts +200 -0
  18. package/src/ai/mcpendpointinfo.ts +87 -0
  19. package/src/ai/mcpendpointspec.ts +140 -0
  20. package/src/ai/mcpresourcespecification.ts +165 -0
  21. package/src/ai/mcpserverbasicinfo.ts +268 -0
  22. package/src/ai/mcpserverdetailinfo.ts +316 -0
  23. package/src/ai/mcpserverremoteserviceconfig.ts +88 -0
  24. package/src/ai/mcpserviceref.ts +87 -0
  25. package/src/ai/mcptool.ts +289 -0
  26. package/src/ai/mcptoolannotations.ts +93 -0
  27. package/src/ai/mcptoolmeta.ts +209 -0
  28. package/src/ai/mcptoolspecification.ts +250 -0
  29. package/src/ai/package.ts +142 -0
  30. package/src/ai/prompt.ts +96 -0
  31. package/src/ai/promptvariable.ts +81 -0
  32. package/src/ai/repository.ts +87 -0
  33. package/src/ai/securityscheme.ts +142 -0
  34. package/src/ai/serverversiondetail.ts +89 -0
  35. package/src/common/common.ts +1166 -0
  36. package/src/config/config_request.ts +887 -0
  37. package/src/config/config_response.ts +781 -0
  38. package/src/google/protobuf/struct.ts +415 -0
  39. package/src/index.ts +42 -0
  40. package/src/lock/lock.ts +264 -0
  41. package/src/naming/instance.ts +199 -0
  42. package/src/naming/naming_request.ts +768 -0
  43. package/src/naming/naming_response.ts +574 -0
  44. package/src/naming/serviceinfo.ts +130 -0
  45. package/tsconfig.json +11 -0
@@ -0,0 +1,250 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v5.28.3
5
+ // source: ai/mcptoolspecification.proto
6
+
7
+ /* eslint-disable */
8
+ import { EncryptObject } from "./encryptobject";
9
+ import { McpTool } from "./mcptool";
10
+ import { McpToolMeta } from "./mcptoolmeta";
11
+ import { McpSecurityScheme } from "./securityscheme";
12
+
13
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
14
+
15
+ /**
16
+ * metadata.type = "McpToolSpecification"
17
+ * Flattened from: McpToolSpecification
18
+ */
19
+ export interface McpToolSpecification {
20
+ specificationType: string;
21
+ encryptData: EncryptObject | undefined;
22
+ tools: McpTool[];
23
+ toolsMeta: { [key: string]: McpToolMeta };
24
+ securitySchemes: McpSecurityScheme[];
25
+ extensions: { [key: string]: any | undefined };
26
+ }
27
+
28
+ export interface McpToolSpecification_ToolsMetaEntry {
29
+ key: string;
30
+ value: McpToolMeta | undefined;
31
+ }
32
+
33
+ export interface McpToolSpecification_ExtensionsEntry {
34
+ key: string;
35
+ value: any | undefined;
36
+ }
37
+
38
+ function createBaseMcpToolSpecification(): McpToolSpecification {
39
+ return {
40
+ specificationType: "",
41
+ encryptData: undefined,
42
+ tools: [],
43
+ toolsMeta: {},
44
+ securitySchemes: [],
45
+ extensions: {},
46
+ };
47
+ }
48
+
49
+ export const McpToolSpecification: MessageFns<McpToolSpecification> = {
50
+ fromJSON(object: any): McpToolSpecification {
51
+ return {
52
+ specificationType: isSet(object.specificationType) ? globalThis.String(object.specificationType) : "",
53
+ encryptData: isSet(object.encryptData) ? EncryptObject.fromJSON(object.encryptData) : undefined,
54
+ tools: globalThis.Array.isArray(object?.tools) ? object.tools.map((e: any) => McpTool.fromJSON(e)) : [],
55
+ toolsMeta: isObject(object.toolsMeta)
56
+ ? (globalThis.Object.entries(object.toolsMeta) as [string, any][]).reduce(
57
+ (acc: { [key: string]: McpToolMeta }, [key, value]: [string, any]) => {
58
+ acc[key] = McpToolMeta.fromJSON(value);
59
+ return acc;
60
+ },
61
+ {},
62
+ )
63
+ : {},
64
+ securitySchemes: globalThis.Array.isArray(object?.securitySchemes)
65
+ ? object.securitySchemes.map((e: any) => McpSecurityScheme.fromJSON(e))
66
+ : [],
67
+ extensions: isObject(object.extensions)
68
+ ? (globalThis.Object.entries(object.extensions) as [string, any][]).reduce(
69
+ (acc: { [key: string]: any | undefined }, [key, value]: [string, any]) => {
70
+ acc[key] = value as any | undefined;
71
+ return acc;
72
+ },
73
+ {},
74
+ )
75
+ : {},
76
+ };
77
+ },
78
+
79
+ toJSON(message: McpToolSpecification): unknown {
80
+ const obj: any = {};
81
+ if (message.specificationType !== "") {
82
+ obj.specificationType = message.specificationType;
83
+ }
84
+ if (message.encryptData !== undefined) {
85
+ obj.encryptData = EncryptObject.toJSON(message.encryptData);
86
+ }
87
+ if (message.tools?.length) {
88
+ obj.tools = message.tools.map((e) => McpTool.toJSON(e));
89
+ }
90
+ if (message.toolsMeta) {
91
+ const entries = globalThis.Object.entries(message.toolsMeta) as [string, McpToolMeta][];
92
+ if (entries.length > 0) {
93
+ obj.toolsMeta = {};
94
+ entries.forEach(([k, v]) => {
95
+ obj.toolsMeta[k] = McpToolMeta.toJSON(v);
96
+ });
97
+ }
98
+ }
99
+ if (message.securitySchemes?.length) {
100
+ obj.securitySchemes = message.securitySchemes.map((e) => McpSecurityScheme.toJSON(e));
101
+ }
102
+ if (message.extensions) {
103
+ const entries = globalThis.Object.entries(message.extensions) as [string, any | undefined][];
104
+ if (entries.length > 0) {
105
+ obj.extensions = {};
106
+ entries.forEach(([k, v]) => {
107
+ obj.extensions[k] = v;
108
+ });
109
+ }
110
+ }
111
+ return obj;
112
+ },
113
+
114
+ create<I extends Exact<DeepPartial<McpToolSpecification>, I>>(base?: I): McpToolSpecification {
115
+ return McpToolSpecification.fromPartial(base ?? ({} as any));
116
+ },
117
+ fromPartial<I extends Exact<DeepPartial<McpToolSpecification>, I>>(object: I): McpToolSpecification {
118
+ const message = createBaseMcpToolSpecification();
119
+ message.specificationType = object.specificationType ?? "";
120
+ message.encryptData = (object.encryptData !== undefined && object.encryptData !== null)
121
+ ? EncryptObject.fromPartial(object.encryptData)
122
+ : undefined;
123
+ message.tools = object.tools?.map((e) => McpTool.fromPartial(e)) || [];
124
+ message.toolsMeta = (globalThis.Object.entries(object.toolsMeta ?? {}) as [string, McpToolMeta][]).reduce(
125
+ (acc: { [key: string]: McpToolMeta }, [key, value]: [string, McpToolMeta]) => {
126
+ if (value !== undefined) {
127
+ acc[key] = McpToolMeta.fromPartial(value);
128
+ }
129
+ return acc;
130
+ },
131
+ {},
132
+ );
133
+ message.securitySchemes = object.securitySchemes?.map((e) => McpSecurityScheme.fromPartial(e)) || [];
134
+ message.extensions = (globalThis.Object.entries(object.extensions ?? {}) as [string, any | undefined][]).reduce(
135
+ (acc: { [key: string]: any | undefined }, [key, value]: [string, any | undefined]) => {
136
+ if (value !== undefined) {
137
+ acc[key] = value;
138
+ }
139
+ return acc;
140
+ },
141
+ {},
142
+ );
143
+ return message;
144
+ },
145
+ };
146
+
147
+ function createBaseMcpToolSpecification_ToolsMetaEntry(): McpToolSpecification_ToolsMetaEntry {
148
+ return { key: "", value: undefined };
149
+ }
150
+
151
+ export const McpToolSpecification_ToolsMetaEntry: MessageFns<McpToolSpecification_ToolsMetaEntry> = {
152
+ fromJSON(object: any): McpToolSpecification_ToolsMetaEntry {
153
+ return {
154
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
155
+ value: isSet(object.value) ? McpToolMeta.fromJSON(object.value) : undefined,
156
+ };
157
+ },
158
+
159
+ toJSON(message: McpToolSpecification_ToolsMetaEntry): unknown {
160
+ const obj: any = {};
161
+ if (message.key !== "") {
162
+ obj.key = message.key;
163
+ }
164
+ if (message.value !== undefined) {
165
+ obj.value = McpToolMeta.toJSON(message.value);
166
+ }
167
+ return obj;
168
+ },
169
+
170
+ create<I extends Exact<DeepPartial<McpToolSpecification_ToolsMetaEntry>, I>>(
171
+ base?: I,
172
+ ): McpToolSpecification_ToolsMetaEntry {
173
+ return McpToolSpecification_ToolsMetaEntry.fromPartial(base ?? ({} as any));
174
+ },
175
+ fromPartial<I extends Exact<DeepPartial<McpToolSpecification_ToolsMetaEntry>, I>>(
176
+ object: I,
177
+ ): McpToolSpecification_ToolsMetaEntry {
178
+ const message = createBaseMcpToolSpecification_ToolsMetaEntry();
179
+ message.key = object.key ?? "";
180
+ message.value = (object.value !== undefined && object.value !== null)
181
+ ? McpToolMeta.fromPartial(object.value)
182
+ : undefined;
183
+ return message;
184
+ },
185
+ };
186
+
187
+ function createBaseMcpToolSpecification_ExtensionsEntry(): McpToolSpecification_ExtensionsEntry {
188
+ return { key: "", value: undefined };
189
+ }
190
+
191
+ export const McpToolSpecification_ExtensionsEntry: MessageFns<McpToolSpecification_ExtensionsEntry> = {
192
+ fromJSON(object: any): McpToolSpecification_ExtensionsEntry {
193
+ return {
194
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
195
+ value: isSet(object?.value) ? object.value : undefined,
196
+ };
197
+ },
198
+
199
+ toJSON(message: McpToolSpecification_ExtensionsEntry): unknown {
200
+ const obj: any = {};
201
+ if (message.key !== "") {
202
+ obj.key = message.key;
203
+ }
204
+ if (message.value !== undefined) {
205
+ obj.value = message.value;
206
+ }
207
+ return obj;
208
+ },
209
+
210
+ create<I extends Exact<DeepPartial<McpToolSpecification_ExtensionsEntry>, I>>(
211
+ base?: I,
212
+ ): McpToolSpecification_ExtensionsEntry {
213
+ return McpToolSpecification_ExtensionsEntry.fromPartial(base ?? ({} as any));
214
+ },
215
+ fromPartial<I extends Exact<DeepPartial<McpToolSpecification_ExtensionsEntry>, I>>(
216
+ object: I,
217
+ ): McpToolSpecification_ExtensionsEntry {
218
+ const message = createBaseMcpToolSpecification_ExtensionsEntry();
219
+ message.key = object.key ?? "";
220
+ message.value = object.value ?? undefined;
221
+ return message;
222
+ },
223
+ };
224
+
225
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
226
+
227
+ type DeepPartial<T> = T extends Builtin ? T
228
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
229
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
230
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
231
+ : Partial<T>;
232
+
233
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
234
+ type Exact<P, I extends P> = P extends Builtin ? P
235
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
236
+
237
+ function isObject(value: any): boolean {
238
+ return typeof value === "object" && value !== null;
239
+ }
240
+
241
+ function isSet(value: any): boolean {
242
+ return value !== null && value !== undefined;
243
+ }
244
+
245
+ interface MessageFns<T> {
246
+ fromJSON(object: any): T;
247
+ toJSON(message: T): unknown;
248
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
249
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
250
+ }
@@ -0,0 +1,142 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v5.28.3
5
+ // source: ai/package.proto
6
+
7
+ /* eslint-disable */
8
+ import { Argument } from "./argument";
9
+ import { KeyValueInput } from "./keyvalueinput";
10
+
11
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
12
+
13
+ /**
14
+ * metadata.type = "Package"
15
+ * Flattened from: Package
16
+ */
17
+ export interface Package {
18
+ registryType: string;
19
+ registryBaseUrl: string;
20
+ identifier: string;
21
+ version: string;
22
+ fileSha256: string;
23
+ runtimeHint: string;
24
+ runtimeArguments: Argument[];
25
+ packageArguments: Argument[];
26
+ environmentVariables: KeyValueInput[];
27
+ transport: any | undefined;
28
+ }
29
+
30
+ function createBasePackage(): Package {
31
+ return {
32
+ registryType: "",
33
+ registryBaseUrl: "",
34
+ identifier: "",
35
+ version: "",
36
+ fileSha256: "",
37
+ runtimeHint: "",
38
+ runtimeArguments: [],
39
+ packageArguments: [],
40
+ environmentVariables: [],
41
+ transport: undefined,
42
+ };
43
+ }
44
+
45
+ export const Package: MessageFns<Package> = {
46
+ fromJSON(object: any): Package {
47
+ return {
48
+ registryType: isSet(object.registryType) ? globalThis.String(object.registryType) : "",
49
+ registryBaseUrl: isSet(object.registryBaseUrl) ? globalThis.String(object.registryBaseUrl) : "",
50
+ identifier: isSet(object.identifier) ? globalThis.String(object.identifier) : "",
51
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
52
+ fileSha256: isSet(object.fileSha256) ? globalThis.String(object.fileSha256) : "",
53
+ runtimeHint: isSet(object.runtimeHint) ? globalThis.String(object.runtimeHint) : "",
54
+ runtimeArguments: globalThis.Array.isArray(object?.runtimeArguments)
55
+ ? object.runtimeArguments.map((e: any) => Argument.fromJSON(e))
56
+ : [],
57
+ packageArguments: globalThis.Array.isArray(object?.packageArguments)
58
+ ? object.packageArguments.map((e: any) => Argument.fromJSON(e))
59
+ : [],
60
+ environmentVariables: globalThis.Array.isArray(object?.environmentVariables)
61
+ ? object.environmentVariables.map((e: any) => KeyValueInput.fromJSON(e))
62
+ : [],
63
+ transport: isSet(object?.transport) ? object.transport : undefined,
64
+ };
65
+ },
66
+
67
+ toJSON(message: Package): unknown {
68
+ const obj: any = {};
69
+ if (message.registryType !== "") {
70
+ obj.registryType = message.registryType;
71
+ }
72
+ if (message.registryBaseUrl !== "") {
73
+ obj.registryBaseUrl = message.registryBaseUrl;
74
+ }
75
+ if (message.identifier !== "") {
76
+ obj.identifier = message.identifier;
77
+ }
78
+ if (message.version !== "") {
79
+ obj.version = message.version;
80
+ }
81
+ if (message.fileSha256 !== "") {
82
+ obj.fileSha256 = message.fileSha256;
83
+ }
84
+ if (message.runtimeHint !== "") {
85
+ obj.runtimeHint = message.runtimeHint;
86
+ }
87
+ if (message.runtimeArguments?.length) {
88
+ obj.runtimeArguments = message.runtimeArguments.map((e) => Argument.toJSON(e));
89
+ }
90
+ if (message.packageArguments?.length) {
91
+ obj.packageArguments = message.packageArguments.map((e) => Argument.toJSON(e));
92
+ }
93
+ if (message.environmentVariables?.length) {
94
+ obj.environmentVariables = message.environmentVariables.map((e) => KeyValueInput.toJSON(e));
95
+ }
96
+ if (message.transport !== undefined) {
97
+ obj.transport = message.transport;
98
+ }
99
+ return obj;
100
+ },
101
+
102
+ create<I extends Exact<DeepPartial<Package>, I>>(base?: I): Package {
103
+ return Package.fromPartial(base ?? ({} as any));
104
+ },
105
+ fromPartial<I extends Exact<DeepPartial<Package>, I>>(object: I): Package {
106
+ const message = createBasePackage();
107
+ message.registryType = object.registryType ?? "";
108
+ message.registryBaseUrl = object.registryBaseUrl ?? "";
109
+ message.identifier = object.identifier ?? "";
110
+ message.version = object.version ?? "";
111
+ message.fileSha256 = object.fileSha256 ?? "";
112
+ message.runtimeHint = object.runtimeHint ?? "";
113
+ message.runtimeArguments = object.runtimeArguments?.map((e) => Argument.fromPartial(e)) || [];
114
+ message.packageArguments = object.packageArguments?.map((e) => Argument.fromPartial(e)) || [];
115
+ message.environmentVariables = object.environmentVariables?.map((e) => KeyValueInput.fromPartial(e)) || [];
116
+ message.transport = object.transport ?? undefined;
117
+ return message;
118
+ },
119
+ };
120
+
121
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
122
+
123
+ type DeepPartial<T> = T extends Builtin ? T
124
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
125
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
126
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
127
+ : Partial<T>;
128
+
129
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
130
+ type Exact<P, I extends P> = P extends Builtin ? P
131
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
132
+
133
+ function isSet(value: any): boolean {
134
+ return value !== null && value !== undefined;
135
+ }
136
+
137
+ interface MessageFns<T> {
138
+ fromJSON(object: any): T;
139
+ toJSON(message: T): unknown;
140
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
141
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
142
+ }
@@ -0,0 +1,96 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v5.28.3
5
+ // source: ai/prompt.proto
6
+
7
+ /* eslint-disable */
8
+ import { PromptVariable } from "./promptvariable";
9
+
10
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
11
+
12
+ /**
13
+ * metadata.type = "Prompt"
14
+ * Flattened from: Prompt
15
+ */
16
+ export interface Prompt {
17
+ promptKey: string;
18
+ version: string;
19
+ template: string;
20
+ md5: string;
21
+ variables: PromptVariable[];
22
+ }
23
+
24
+ function createBasePrompt(): Prompt {
25
+ return { promptKey: "", version: "", template: "", md5: "", variables: [] };
26
+ }
27
+
28
+ export const Prompt: MessageFns<Prompt> = {
29
+ fromJSON(object: any): Prompt {
30
+ return {
31
+ promptKey: isSet(object.promptKey) ? globalThis.String(object.promptKey) : "",
32
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
33
+ template: isSet(object.template) ? globalThis.String(object.template) : "",
34
+ md5: isSet(object.md5) ? globalThis.String(object.md5) : "",
35
+ variables: globalThis.Array.isArray(object?.variables)
36
+ ? object.variables.map((e: any) => PromptVariable.fromJSON(e))
37
+ : [],
38
+ };
39
+ },
40
+
41
+ toJSON(message: Prompt): unknown {
42
+ const obj: any = {};
43
+ if (message.promptKey !== "") {
44
+ obj.promptKey = message.promptKey;
45
+ }
46
+ if (message.version !== "") {
47
+ obj.version = message.version;
48
+ }
49
+ if (message.template !== "") {
50
+ obj.template = message.template;
51
+ }
52
+ if (message.md5 !== "") {
53
+ obj.md5 = message.md5;
54
+ }
55
+ if (message.variables?.length) {
56
+ obj.variables = message.variables.map((e) => PromptVariable.toJSON(e));
57
+ }
58
+ return obj;
59
+ },
60
+
61
+ create<I extends Exact<DeepPartial<Prompt>, I>>(base?: I): Prompt {
62
+ return Prompt.fromPartial(base ?? ({} as any));
63
+ },
64
+ fromPartial<I extends Exact<DeepPartial<Prompt>, I>>(object: I): Prompt {
65
+ const message = createBasePrompt();
66
+ message.promptKey = object.promptKey ?? "";
67
+ message.version = object.version ?? "";
68
+ message.template = object.template ?? "";
69
+ message.md5 = object.md5 ?? "";
70
+ message.variables = object.variables?.map((e) => PromptVariable.fromPartial(e)) || [];
71
+ return message;
72
+ },
73
+ };
74
+
75
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
76
+
77
+ type DeepPartial<T> = T extends Builtin ? T
78
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
79
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
80
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
81
+ : Partial<T>;
82
+
83
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
84
+ type Exact<P, I extends P> = P extends Builtin ? P
85
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
86
+
87
+ function isSet(value: any): boolean {
88
+ return value !== null && value !== undefined;
89
+ }
90
+
91
+ interface MessageFns<T> {
92
+ fromJSON(object: any): T;
93
+ toJSON(message: T): unknown;
94
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
95
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
96
+ }
@@ -0,0 +1,81 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v5.28.3
5
+ // source: ai/promptvariable.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
10
+
11
+ /**
12
+ * metadata.type = "PromptVariable"
13
+ * Flattened from: PromptVariable
14
+ */
15
+ export interface PromptVariable {
16
+ name: string;
17
+ defaultValue: string;
18
+ description: string;
19
+ }
20
+
21
+ function createBasePromptVariable(): PromptVariable {
22
+ return { name: "", defaultValue: "", description: "" };
23
+ }
24
+
25
+ export const PromptVariable: MessageFns<PromptVariable> = {
26
+ fromJSON(object: any): PromptVariable {
27
+ return {
28
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
29
+ defaultValue: isSet(object.defaultValue) ? globalThis.String(object.defaultValue) : "",
30
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
31
+ };
32
+ },
33
+
34
+ toJSON(message: PromptVariable): unknown {
35
+ const obj: any = {};
36
+ if (message.name !== "") {
37
+ obj.name = message.name;
38
+ }
39
+ if (message.defaultValue !== "") {
40
+ obj.defaultValue = message.defaultValue;
41
+ }
42
+ if (message.description !== "") {
43
+ obj.description = message.description;
44
+ }
45
+ return obj;
46
+ },
47
+
48
+ create<I extends Exact<DeepPartial<PromptVariable>, I>>(base?: I): PromptVariable {
49
+ return PromptVariable.fromPartial(base ?? ({} as any));
50
+ },
51
+ fromPartial<I extends Exact<DeepPartial<PromptVariable>, I>>(object: I): PromptVariable {
52
+ const message = createBasePromptVariable();
53
+ message.name = object.name ?? "";
54
+ message.defaultValue = object.defaultValue ?? "";
55
+ message.description = object.description ?? "";
56
+ return message;
57
+ },
58
+ };
59
+
60
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
61
+
62
+ type DeepPartial<T> = T extends Builtin ? T
63
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
64
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
65
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
66
+ : Partial<T>;
67
+
68
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
69
+ type Exact<P, I extends P> = P extends Builtin ? P
70
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
71
+
72
+ function isSet(value: any): boolean {
73
+ return value !== null && value !== undefined;
74
+ }
75
+
76
+ interface MessageFns<T> {
77
+ fromJSON(object: any): T;
78
+ toJSON(message: T): unknown;
79
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
80
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
81
+ }
@@ -0,0 +1,87 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v5.28.3
5
+ // source: ai/repository.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ /** Auto-generated by proto-generator. DO NOT EDIT. */
10
+
11
+ /**
12
+ * metadata.type = "Repository"
13
+ * Flattened from: Repository
14
+ */
15
+ export interface Repository {
16
+ url: string;
17
+ source: string;
18
+ id: string;
19
+ subfolder: string;
20
+ }
21
+
22
+ function createBaseRepository(): Repository {
23
+ return { url: "", source: "", id: "", subfolder: "" };
24
+ }
25
+
26
+ export const Repository: MessageFns<Repository> = {
27
+ fromJSON(object: any): Repository {
28
+ return {
29
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
30
+ source: isSet(object.source) ? globalThis.String(object.source) : "",
31
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
32
+ subfolder: isSet(object.subfolder) ? globalThis.String(object.subfolder) : "",
33
+ };
34
+ },
35
+
36
+ toJSON(message: Repository): unknown {
37
+ const obj: any = {};
38
+ if (message.url !== "") {
39
+ obj.url = message.url;
40
+ }
41
+ if (message.source !== "") {
42
+ obj.source = message.source;
43
+ }
44
+ if (message.id !== "") {
45
+ obj.id = message.id;
46
+ }
47
+ if (message.subfolder !== "") {
48
+ obj.subfolder = message.subfolder;
49
+ }
50
+ return obj;
51
+ },
52
+
53
+ create<I extends Exact<DeepPartial<Repository>, I>>(base?: I): Repository {
54
+ return Repository.fromPartial(base ?? ({} as any));
55
+ },
56
+ fromPartial<I extends Exact<DeepPartial<Repository>, I>>(object: I): Repository {
57
+ const message = createBaseRepository();
58
+ message.url = object.url ?? "";
59
+ message.source = object.source ?? "";
60
+ message.id = object.id ?? "";
61
+ message.subfolder = object.subfolder ?? "";
62
+ return message;
63
+ },
64
+ };
65
+
66
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
67
+
68
+ type DeepPartial<T> = T extends Builtin ? T
69
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
70
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
71
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
72
+ : Partial<T>;
73
+
74
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
75
+ type Exact<P, I extends P> = P extends Builtin ? P
76
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
77
+
78
+ function isSet(value: any): boolean {
79
+ return value !== null && value !== undefined;
80
+ }
81
+
82
+ interface MessageFns<T> {
83
+ fromJSON(object: any): T;
84
+ toJSON(message: T): unknown;
85
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
86
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
87
+ }