@stainless-api/docs-search 0.1.0-beta.4 → 0.1.0-beta.40
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/dist/context.d.ts +1 -2
- package/dist/context.js +30 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +50 -49
- package/dist/indexer.d.ts +35 -0
- package/dist/{indexer-DBU0POrK.js → indexer.js} +10 -9
- package/dist/mcp.d.ts +3 -7
- package/dist/mcp.js +2 -4
- package/dist/providers/algolia.d.ts +3 -4
- package/dist/providers/algolia.js +81 -4
- package/dist/providers/fuse.d.ts +2 -3
- package/dist/providers/fuse.js +3 -5
- package/dist/providers/pagefind.d.ts +1 -1
- package/dist/providers/pagefind.js +19 -3
- package/dist/providers/walker.d.ts +2 -3
- package/dist/providers/walker.js +3 -5
- package/dist/types-O3Jwo7Us.d.ts +1604 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +34 -3
- package/package.json +20 -16
- package/dist/algolia-BOY-OcxU.js +0 -83
- package/dist/context-CBTWkDal.js +0 -32
- package/dist/pagefind-Dcn-gjDe.js +0 -15
- package/dist/types-BhJLoaNF.js +0 -35
- package/dist/types-Gg968wOz.d.ts +0 -91
|
@@ -0,0 +1,1604 @@
|
|
|
1
|
+
import { DocsLanguage } from "@stainless-api/docs-ui/routing";
|
|
2
|
+
import { Code } from "@pkg/plada/src/core";
|
|
3
|
+
|
|
4
|
+
//#region ../sdk-json/index.d.ts
|
|
5
|
+
declare type Operation = AddOperation<any> | RemoveOperation | ReplaceOperation<any> | MoveOperation | CopyOperation | TestOperation<any> | GetOperation<any>;
|
|
6
|
+
interface BaseOperation {
|
|
7
|
+
path: string;
|
|
8
|
+
}
|
|
9
|
+
interface AddOperation<T> extends BaseOperation {
|
|
10
|
+
op: 'add';
|
|
11
|
+
value: T;
|
|
12
|
+
}
|
|
13
|
+
interface RemoveOperation extends BaseOperation {
|
|
14
|
+
op: 'remove';
|
|
15
|
+
}
|
|
16
|
+
interface ReplaceOperation<T> extends BaseOperation {
|
|
17
|
+
op: 'replace';
|
|
18
|
+
value: T;
|
|
19
|
+
}
|
|
20
|
+
interface MoveOperation extends BaseOperation {
|
|
21
|
+
op: 'move';
|
|
22
|
+
from: string;
|
|
23
|
+
}
|
|
24
|
+
interface CopyOperation extends BaseOperation {
|
|
25
|
+
op: 'copy';
|
|
26
|
+
from: string;
|
|
27
|
+
}
|
|
28
|
+
interface TestOperation<T> extends BaseOperation {
|
|
29
|
+
op: 'test';
|
|
30
|
+
value: T;
|
|
31
|
+
}
|
|
32
|
+
interface GetOperation<T> extends BaseOperation {
|
|
33
|
+
op: '_get';
|
|
34
|
+
value: T;
|
|
35
|
+
}
|
|
36
|
+
type Primitive$2 = null | undefined | string | number | boolean | symbol | bigint;
|
|
37
|
+
type BuiltIns = Primitive$2 | void | Date | RegExp;
|
|
38
|
+
type NonRecursiveType = BuiltIns | Function | (new (...arguments_: any[]) => unknown);
|
|
39
|
+
type SimplifyDeep<Type, ExcludeType = never> = ConditionalSimplifyDeep<Type, ExcludeType | NonRecursiveType | Set<unknown> | Map<unknown, unknown>, object>;
|
|
40
|
+
type ConditionalSimplifyDeep<Type, ExcludeType = never, IncludeType = unknown> = Type extends ExcludeType ? Type : Type extends IncludeType ? { [TypeKey in keyof Type]: ConditionalSimplifyDeep<Type[TypeKey], ExcludeType, IncludeType> } : Type;
|
|
41
|
+
type HeaderObject = ParameterBaseObject;
|
|
42
|
+
type ParameterBaseObject = {
|
|
43
|
+
description?: string;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
deprecated?: boolean;
|
|
46
|
+
allowEmptyValue?: boolean;
|
|
47
|
+
style?: string;
|
|
48
|
+
explode?: boolean;
|
|
49
|
+
allowReserved?: boolean;
|
|
50
|
+
schema?: SchemaObject;
|
|
51
|
+
example?: unknown;
|
|
52
|
+
examples?: {
|
|
53
|
+
[media: string]: ExampleObject;
|
|
54
|
+
};
|
|
55
|
+
content?: {
|
|
56
|
+
[media: string]: MediaTypeObject;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
type PropertiesObject = {
|
|
60
|
+
[name: string]: SchemaObject;
|
|
61
|
+
};
|
|
62
|
+
type SchemaListObject = Array< /* ReferenceObject | */SchemaObject>;
|
|
63
|
+
type SchemaPrimitiveType = 'null' | 'boolean' | 'number' | 'string' | 'integer';
|
|
64
|
+
type NonArraySchemaObjectType = SchemaPrimitiveType | 'object' | 'binary-response' | 'unknown';
|
|
65
|
+
type SchemaObjectType = NonArraySchemaObjectType | 'array';
|
|
66
|
+
interface SchemaObject {
|
|
67
|
+
type?: SchemaObjectType | Array<SchemaObjectType>;
|
|
68
|
+
title?: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
format?: string;
|
|
71
|
+
default?: any;
|
|
72
|
+
multipleOf?: number;
|
|
73
|
+
maximum?: number;
|
|
74
|
+
exclusiveMaximum?: boolean | number;
|
|
75
|
+
minimum?: number;
|
|
76
|
+
exclusiveMinimum?: boolean | number;
|
|
77
|
+
maxLength?: number;
|
|
78
|
+
minLength?: number;
|
|
79
|
+
pattern?: string;
|
|
80
|
+
additionalProperties?: boolean | /* ReferenceObject | */SchemaObject;
|
|
81
|
+
maxItems?: number;
|
|
82
|
+
minItems?: number;
|
|
83
|
+
uniqueItems?: boolean;
|
|
84
|
+
maxProperties?: number;
|
|
85
|
+
minProperties?: number;
|
|
86
|
+
required?: string[];
|
|
87
|
+
enum?: unknown[];
|
|
88
|
+
const?: any;
|
|
89
|
+
properties?: PropertiesObject;
|
|
90
|
+
allOf?: SchemaListObject;
|
|
91
|
+
anyOf?: SchemaListObject;
|
|
92
|
+
oneOf?: SchemaListObject;
|
|
93
|
+
items?: SchemaObject;
|
|
94
|
+
nullable?: boolean;
|
|
95
|
+
discriminator?: DiscriminatorObject;
|
|
96
|
+
readOnly?: boolean;
|
|
97
|
+
writeOnly?: boolean;
|
|
98
|
+
example?: any;
|
|
99
|
+
examples?: any[];
|
|
100
|
+
deprecated?: boolean;
|
|
101
|
+
$ref?: string;
|
|
102
|
+
[key: `x-${string}`]: unknown;
|
|
103
|
+
[key: `_x-${string}`]: unknown;
|
|
104
|
+
}
|
|
105
|
+
type DiscriminatorObject = {
|
|
106
|
+
propertyName: string;
|
|
107
|
+
mapping?: {
|
|
108
|
+
[value: string]: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
type ExampleObject = {
|
|
112
|
+
summary?: string;
|
|
113
|
+
description?: string;
|
|
114
|
+
value?: unknown;
|
|
115
|
+
externalValue?: string;
|
|
116
|
+
};
|
|
117
|
+
type EncodingsObject = {
|
|
118
|
+
[media: string]: EncodingObject;
|
|
119
|
+
};
|
|
120
|
+
interface MediaTypeObject {
|
|
121
|
+
schema?: SchemaObject;
|
|
122
|
+
nullable?: boolean;
|
|
123
|
+
example?: any;
|
|
124
|
+
examples?: {
|
|
125
|
+
[media: string]: ExampleObject;
|
|
126
|
+
};
|
|
127
|
+
encoding?: EncodingsObject;
|
|
128
|
+
}
|
|
129
|
+
type EncodingObject = {
|
|
130
|
+
contentType?: string;
|
|
131
|
+
headers?: HeadersObject;
|
|
132
|
+
style?: string;
|
|
133
|
+
explode?: boolean;
|
|
134
|
+
allowReserved?: boolean;
|
|
135
|
+
};
|
|
136
|
+
type ResponseContentObject = {
|
|
137
|
+
[media: string]: MediaTypeObject;
|
|
138
|
+
};
|
|
139
|
+
type HeadersObject = {
|
|
140
|
+
[key: string]: HeaderObject;
|
|
141
|
+
};
|
|
142
|
+
type SupportedLanguage = 'node' | 'typescript' | 'python' | 'go' | 'java' | 'kotlin' | 'ruby' | 'terraform' | 'cli' | 'php' | 'csharp' | 'sql' | 'http' | 'openapi';
|
|
143
|
+
interface Config {
|
|
144
|
+
docs: {
|
|
145
|
+
title?: string | undefined;
|
|
146
|
+
favicon?: string | undefined;
|
|
147
|
+
logo_icon?: string | undefined;
|
|
148
|
+
search?: {
|
|
149
|
+
algolia?: {
|
|
150
|
+
app_id: string;
|
|
151
|
+
index_name: string;
|
|
152
|
+
search_key: string;
|
|
153
|
+
} | undefined;
|
|
154
|
+
} | undefined;
|
|
155
|
+
description?: string | undefined;
|
|
156
|
+
languages?: SupportedLanguage[] | undefined;
|
|
157
|
+
snippets?: {
|
|
158
|
+
exclude_languages?: string[] | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
show_security?: boolean | undefined;
|
|
161
|
+
show_readme?: boolean | undefined;
|
|
162
|
+
base_path?: string | undefined;
|
|
163
|
+
navigation?: unknown;
|
|
164
|
+
pages?: Record<string, string> | undefined;
|
|
165
|
+
resources?: {
|
|
166
|
+
title: string;
|
|
167
|
+
children: string[];
|
|
168
|
+
}[] | undefined;
|
|
169
|
+
} | undefined;
|
|
170
|
+
}
|
|
171
|
+
type InternalDiagnosticLevel = 'fatal' | 'internal_error' | 'error' | 'warning' | 'note';
|
|
172
|
+
type DiagnosticLevel = Exclude<InternalDiagnosticLevel, 'internal_error'>;
|
|
173
|
+
type AutoFixOp = SimplifyDeep<{
|
|
174
|
+
file: 'config';
|
|
175
|
+
} & Operation>;
|
|
176
|
+
type DiagnosticInfo = {
|
|
177
|
+
code: string;
|
|
178
|
+
level: InternalDiagnosticLevel;
|
|
179
|
+
ignored: boolean;
|
|
180
|
+
message: string;
|
|
181
|
+
messageHtml: string;
|
|
182
|
+
more: string | {
|
|
183
|
+
raw: string;
|
|
184
|
+
} | null;
|
|
185
|
+
link: string;
|
|
186
|
+
endpoint: string | null;
|
|
187
|
+
language: SupportedLanguage | null;
|
|
188
|
+
customer: string | null;
|
|
189
|
+
location: string | null;
|
|
190
|
+
stainlessPath: string | null;
|
|
191
|
+
oasRef: string | null;
|
|
192
|
+
configRef: string | null;
|
|
193
|
+
autoFixPlan: AutoFixOp[] | null;
|
|
194
|
+
trace?: string;
|
|
195
|
+
};
|
|
196
|
+
type DiagnosticExport = DiagnosticInfo & {
|
|
197
|
+
level: DiagnosticLevel;
|
|
198
|
+
};
|
|
199
|
+
type SDKSchemaReference = never;
|
|
200
|
+
type SDKSchemaType = string;
|
|
201
|
+
type SDKPropertySchemaReference<T = never> = never;
|
|
202
|
+
type HttpDeclaration = HttpDeclFunction | HttpDeclProperty | HttpDeclTypeAlias | HttpDeclReference | ErrorDecl;
|
|
203
|
+
type HttpDeclFunction = BaseDeclaration & {
|
|
204
|
+
kind: 'HttpDeclFunction';
|
|
205
|
+
ident: HttpIdentifier;
|
|
206
|
+
qualified?: string;
|
|
207
|
+
returns?: HttpType;
|
|
208
|
+
paramsChildren?: Record<string, ID[]>;
|
|
209
|
+
bodyParamsChildren?: Record<string, ID[]>;
|
|
210
|
+
responseChildren?: ID[];
|
|
211
|
+
};
|
|
212
|
+
type HttpDeclProperty = BaseDeclaration & {
|
|
213
|
+
kind: 'HttpDeclProperty';
|
|
214
|
+
key: string;
|
|
215
|
+
docstring?: string;
|
|
216
|
+
title?: string;
|
|
217
|
+
location?: string;
|
|
218
|
+
type: HttpType;
|
|
219
|
+
constraints?: Constraints;
|
|
220
|
+
default?: unknown;
|
|
221
|
+
examples?: unknown[];
|
|
222
|
+
optional?: boolean;
|
|
223
|
+
nullable?: boolean;
|
|
224
|
+
declare?: boolean;
|
|
225
|
+
schemaType?: SchemaType;
|
|
226
|
+
modelPath?: string;
|
|
227
|
+
childrenParentSchema?: SchemaType;
|
|
228
|
+
children?: ID[];
|
|
229
|
+
};
|
|
230
|
+
type HttpDeclTypeAlias = BaseDeclaration & {
|
|
231
|
+
kind: 'HttpDeclTypeAlias';
|
|
232
|
+
docstring?: string;
|
|
233
|
+
ident: HttpIdentifier;
|
|
234
|
+
typeParameters?: HttpTypeParameter[];
|
|
235
|
+
type: HttpType;
|
|
236
|
+
children?: ID[];
|
|
237
|
+
};
|
|
238
|
+
type HttpTypeParameter = {
|
|
239
|
+
kind: 'HttpTypeParameter';
|
|
240
|
+
name: HttpIdentifier;
|
|
241
|
+
constraint?: HttpType;
|
|
242
|
+
default?: HttpType;
|
|
243
|
+
};
|
|
244
|
+
type HttpIdentifier = string;
|
|
245
|
+
type HttpDeclReference = BaseDeclaration & {
|
|
246
|
+
kind: 'HttpDeclReference';
|
|
247
|
+
docstring?: string;
|
|
248
|
+
type: HttpType;
|
|
249
|
+
children?: ID[];
|
|
250
|
+
};
|
|
251
|
+
type HttpType = HttpTypeReference | HttpTypeObject | HttpTypeArray | HttpTypeString | HttpTypeNumber | HttpTypeBoolean | HttpTypeNull | HttpTypeUndefined | HttpTypeBinary | HttpTypeUnknown | HttpTypeLiteral | HttpTypeUnion | HttpTypeIntersection;
|
|
252
|
+
type HttpTypeReference = BaseType & {
|
|
253
|
+
kind: 'HttpTypeReference';
|
|
254
|
+
ident: HttpIdentifier;
|
|
255
|
+
typeParameters?: HttpType[];
|
|
256
|
+
$ref?: ID;
|
|
257
|
+
};
|
|
258
|
+
type HttpTypeObject = BaseType & {
|
|
259
|
+
kind: 'HttpTypeObject';
|
|
260
|
+
members: {
|
|
261
|
+
ident: HttpIdentifier;
|
|
262
|
+
optional?: boolean;
|
|
263
|
+
}[];
|
|
264
|
+
};
|
|
265
|
+
type HttpTypeArray = BaseType & {
|
|
266
|
+
kind: 'HttpTypeArray';
|
|
267
|
+
elementType: HttpType;
|
|
268
|
+
};
|
|
269
|
+
type HttpTypeUnion = BaseType & {
|
|
270
|
+
kind: 'HttpTypeUnion';
|
|
271
|
+
types: HttpType[];
|
|
272
|
+
};
|
|
273
|
+
type HttpTypeIntersection = BaseType & {
|
|
274
|
+
kind: 'HttpTypeIntersection';
|
|
275
|
+
types: HttpType[];
|
|
276
|
+
};
|
|
277
|
+
type HttpTypeLiteral = BaseType & {
|
|
278
|
+
kind: 'HttpTypeLiteral';
|
|
279
|
+
literal: string | boolean | number;
|
|
280
|
+
};
|
|
281
|
+
type HttpTypeString = BaseType & {
|
|
282
|
+
kind: 'HttpTypeString';
|
|
283
|
+
};
|
|
284
|
+
type HttpTypeNumber = BaseType & {
|
|
285
|
+
kind: 'HttpTypeNumber';
|
|
286
|
+
};
|
|
287
|
+
type HttpTypeBoolean = BaseType & {
|
|
288
|
+
kind: 'HttpTypeBoolean';
|
|
289
|
+
};
|
|
290
|
+
type HttpTypeNull = BaseType & {
|
|
291
|
+
kind: 'HttpTypeNull';
|
|
292
|
+
};
|
|
293
|
+
type HttpTypeUndefined = BaseType & {
|
|
294
|
+
kind: 'HttpTypeUndefined';
|
|
295
|
+
};
|
|
296
|
+
type HttpTypeBinary = BaseType & {
|
|
297
|
+
kind: 'HttpTypeBinary';
|
|
298
|
+
contentType: string[];
|
|
299
|
+
};
|
|
300
|
+
type HttpTypeUnknown = BaseType & {
|
|
301
|
+
kind: 'HttpTypeUnknown';
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Base declaration types for CLI command AST
|
|
305
|
+
*/
|
|
306
|
+
type CLIDeclaration = CLICommand | CLIFlag | CLISchemaProperty | CLIStdin | CLIFunction | ErrorDecl;
|
|
307
|
+
/**
|
|
308
|
+
* Represents a command in a CLI environment
|
|
309
|
+
*/
|
|
310
|
+
type CLICommand = BaseDeclaration & {
|
|
311
|
+
kind: 'CLICommand';
|
|
312
|
+
invocation: string[];
|
|
313
|
+
name: string;
|
|
314
|
+
arguments?: CLIArgument[];
|
|
315
|
+
options?: CLIFlag[];
|
|
316
|
+
stdin?: CLIStdin;
|
|
317
|
+
background?: boolean;
|
|
318
|
+
subshell?: boolean;
|
|
319
|
+
workingDir?: string;
|
|
320
|
+
children?: ID[];
|
|
321
|
+
paramsChildren?: ID[];
|
|
322
|
+
responseChildren?: ID[];
|
|
323
|
+
ident: string;
|
|
324
|
+
qualified?: string;
|
|
325
|
+
docstring?: string;
|
|
326
|
+
parameters?: unknown[];
|
|
327
|
+
responseType?: HttpType;
|
|
328
|
+
};
|
|
329
|
+
/**
|
|
330
|
+
* Represents a command argument
|
|
331
|
+
*/
|
|
332
|
+
type CLIArgument = {
|
|
333
|
+
kind: 'CLIArgument';
|
|
334
|
+
value: string;
|
|
335
|
+
quoted?: boolean;
|
|
336
|
+
docstring?: string;
|
|
337
|
+
quoteType?: 'single' | 'double' | 'backtick';
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* Represents a command line flag --foo
|
|
341
|
+
*/
|
|
342
|
+
type CLIFlag = BaseDeclaration & {
|
|
343
|
+
kind: 'CLIFlag';
|
|
344
|
+
name?: string;
|
|
345
|
+
enabled?: boolean;
|
|
346
|
+
ident: string;
|
|
347
|
+
flag?: string | {
|
|
348
|
+
name: string;
|
|
349
|
+
};
|
|
350
|
+
title?: string;
|
|
351
|
+
docstring?: string;
|
|
352
|
+
optional?: boolean;
|
|
353
|
+
type?: HttpType;
|
|
354
|
+
constraints?: unknown;
|
|
355
|
+
schemaType?: string;
|
|
356
|
+
modelPath?: string;
|
|
357
|
+
childrenParentSchema?: unknown;
|
|
358
|
+
children?: ID[];
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* Represents a CLI property (for return values/response fields)
|
|
362
|
+
*/
|
|
363
|
+
type CLISchemaProperty = BaseDeclaration & {
|
|
364
|
+
kind: 'CLISchemaProperty';
|
|
365
|
+
name: string;
|
|
366
|
+
ident: string;
|
|
367
|
+
type?: HttpType;
|
|
368
|
+
docstring?: string;
|
|
369
|
+
optional?: boolean;
|
|
370
|
+
constraints?: unknown;
|
|
371
|
+
schemaType?: string;
|
|
372
|
+
children?: ID[];
|
|
373
|
+
childrenParentSchema?: unknown;
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* Represents data piped in to stdin
|
|
377
|
+
*/
|
|
378
|
+
type CLIStdin = BaseDeclaration & {
|
|
379
|
+
kind: 'CLIStdin';
|
|
380
|
+
text: string;
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Represents a shell function
|
|
384
|
+
*/
|
|
385
|
+
type CLIFunction = BaseDeclaration & {
|
|
386
|
+
kind: 'CLIFunction';
|
|
387
|
+
name: string;
|
|
388
|
+
body: CLICommand[];
|
|
389
|
+
parameters?: string[];
|
|
390
|
+
description?: string;
|
|
391
|
+
docstring?: string;
|
|
392
|
+
children?: ID[];
|
|
393
|
+
};
|
|
394
|
+
type CSharpDeclaration = CSharpDeclFunction | CSharpDeclType | CSharpDeclProperty | CSharpDeclConst | CSharpDeclReference | ErrorDecl;
|
|
395
|
+
type CSharpDeclFunction = BaseDeclaration & {
|
|
396
|
+
kind: 'CSharpDeclFunction';
|
|
397
|
+
ident: CSharpIdentifier;
|
|
398
|
+
qualified?: string;
|
|
399
|
+
docstring?: string;
|
|
400
|
+
async?: boolean;
|
|
401
|
+
parameters: CSharpFunctionParameter[];
|
|
402
|
+
returnType?: CSharpType;
|
|
403
|
+
paramsChildren?: ID[];
|
|
404
|
+
responseChildren?: ID[];
|
|
405
|
+
};
|
|
406
|
+
type CSharpFunctionParameter = {
|
|
407
|
+
kind: 'CSharpFunctionParameter';
|
|
408
|
+
ident: CSharpIdentifier;
|
|
409
|
+
typeAnnotation: CSharpType;
|
|
410
|
+
hasDefault: boolean;
|
|
411
|
+
};
|
|
412
|
+
type CSharpDeclType = BaseDeclaration & {
|
|
413
|
+
kind: 'CSharpDeclType';
|
|
414
|
+
docstring?: string;
|
|
415
|
+
ident: CSharpIdentifier;
|
|
416
|
+
type: CSharpType;
|
|
417
|
+
children?: ID[];
|
|
418
|
+
};
|
|
419
|
+
type CSharpIdentifier = string;
|
|
420
|
+
type CSharpDeclProperty = BaseDeclaration & {
|
|
421
|
+
kind: 'CSharpDeclProperty';
|
|
422
|
+
docstring?: string;
|
|
423
|
+
title?: string;
|
|
424
|
+
ident: CSharpIdentifier;
|
|
425
|
+
type: CSharpType;
|
|
426
|
+
optional?: boolean;
|
|
427
|
+
nullable?: boolean;
|
|
428
|
+
examples?: unknown[];
|
|
429
|
+
schemaType?: SchemaType;
|
|
430
|
+
modelPath?: string;
|
|
431
|
+
childrenParentSchema?: SchemaType;
|
|
432
|
+
children?: ID[];
|
|
433
|
+
};
|
|
434
|
+
type CSharpDeclConst = BaseDeclaration & {
|
|
435
|
+
kind: 'CSharpDeclConst';
|
|
436
|
+
docstring?: string;
|
|
437
|
+
ident: CSharpIdentifier;
|
|
438
|
+
type: CSharpType;
|
|
439
|
+
value: boolean | string | number;
|
|
440
|
+
};
|
|
441
|
+
type CSharpDeclReference = BaseDeclaration & {
|
|
442
|
+
kind: 'CSharpDeclReference';
|
|
443
|
+
docstring?: string;
|
|
444
|
+
type: CSharpType;
|
|
445
|
+
schemaType?: SchemaType;
|
|
446
|
+
children?: ID[];
|
|
447
|
+
};
|
|
448
|
+
type CSharpType = CSharpTypeReference | CSharpTypeClass | CSharpTypeUnion | CSharpTypeEnum | CSharpTypeBoolean | CSharpTypeFloat | CSharpTypeDouble | CSharpTypeInt | CSharpTypeLong | CSharpTypeString | CSharpTypeConstant;
|
|
449
|
+
type CSharpTypeReference = BaseType & {
|
|
450
|
+
kind: 'CSharpTypeReference';
|
|
451
|
+
typeName: CSharpIdentifier;
|
|
452
|
+
typeParameters?: CSharpType[];
|
|
453
|
+
nullable?: boolean;
|
|
454
|
+
$ref?: string;
|
|
455
|
+
};
|
|
456
|
+
type CSharpTypeClass = BaseType & {
|
|
457
|
+
kind: 'CSharpTypeClass';
|
|
458
|
+
};
|
|
459
|
+
type CSharpTypeUnion = BaseType & {
|
|
460
|
+
kind: 'CSharpTypeUnion';
|
|
461
|
+
};
|
|
462
|
+
type CSharpTypeEnum = BaseType & {
|
|
463
|
+
kind: 'CSharpTypeEnum';
|
|
464
|
+
};
|
|
465
|
+
type CSharpTypeBoolean = BaseType & {
|
|
466
|
+
kind: 'CSharpTypeBoolean';
|
|
467
|
+
};
|
|
468
|
+
type CSharpTypeFloat = BaseType & {
|
|
469
|
+
kind: 'CSharpTypeFloat';
|
|
470
|
+
};
|
|
471
|
+
type CSharpTypeDouble = BaseType & {
|
|
472
|
+
kind: 'CSharpTypeDouble';
|
|
473
|
+
};
|
|
474
|
+
type CSharpTypeInt = BaseType & {
|
|
475
|
+
kind: 'CSharpTypeInt';
|
|
476
|
+
};
|
|
477
|
+
type CSharpTypeLong = BaseType & {
|
|
478
|
+
kind: 'CSharpTypeLong';
|
|
479
|
+
};
|
|
480
|
+
type CSharpTypeString = BaseType & {
|
|
481
|
+
kind: 'CSharpTypeString';
|
|
482
|
+
};
|
|
483
|
+
type CSharpTypeConstant = BaseType & {
|
|
484
|
+
kind: 'CSharpTypeConstant';
|
|
485
|
+
value: string;
|
|
486
|
+
};
|
|
487
|
+
type JavaDeclaration = JavaDeclFunction | JavaDeclType | JavaDeclProperty | JavaDeclConst | JavaDeclReference | ErrorDecl;
|
|
488
|
+
type JavaDeclFunction = BaseDeclaration & {
|
|
489
|
+
kind: 'JavaDeclFunction';
|
|
490
|
+
ident: JavaIdentifier;
|
|
491
|
+
qualified?: string;
|
|
492
|
+
docstring?: string;
|
|
493
|
+
async?: boolean;
|
|
494
|
+
parameters: JavaFunctionParameter[];
|
|
495
|
+
returnType?: JavaType;
|
|
496
|
+
paramsChildren?: ID[];
|
|
497
|
+
responseChildren?: ID[];
|
|
498
|
+
};
|
|
499
|
+
type JavaFunctionParameter = {
|
|
500
|
+
kind: 'JavaFunctionParameter';
|
|
501
|
+
ident: JavaIdentifier;
|
|
502
|
+
typeAnnotation: JavaType;
|
|
503
|
+
hasDefault: boolean;
|
|
504
|
+
};
|
|
505
|
+
type JavaDeclType = BaseDeclaration & {
|
|
506
|
+
kind: 'JavaDeclType';
|
|
507
|
+
docstring?: string;
|
|
508
|
+
ident: JavaIdentifier;
|
|
509
|
+
type: JavaType;
|
|
510
|
+
children?: ID[];
|
|
511
|
+
};
|
|
512
|
+
type JavaIdentifier = string;
|
|
513
|
+
type JavaDeclProperty = BaseDeclaration & {
|
|
514
|
+
kind: 'JavaDeclProperty';
|
|
515
|
+
docstring?: string;
|
|
516
|
+
title?: string;
|
|
517
|
+
ident: JavaIdentifier;
|
|
518
|
+
type: JavaType;
|
|
519
|
+
optional?: boolean;
|
|
520
|
+
examples?: unknown[];
|
|
521
|
+
schemaType?: SchemaType;
|
|
522
|
+
modelPath?: string;
|
|
523
|
+
childrenParentSchema?: SchemaType;
|
|
524
|
+
children?: ID[];
|
|
525
|
+
};
|
|
526
|
+
type JavaDeclConst = BaseDeclaration & {
|
|
527
|
+
kind: 'JavaDeclConst';
|
|
528
|
+
docstring?: string;
|
|
529
|
+
ident: JavaIdentifier;
|
|
530
|
+
type: JavaType;
|
|
531
|
+
value: boolean | string | number;
|
|
532
|
+
};
|
|
533
|
+
type JavaDeclReference = BaseDeclaration & {
|
|
534
|
+
kind: 'JavaDeclReference';
|
|
535
|
+
docstring?: string;
|
|
536
|
+
type: JavaType;
|
|
537
|
+
schemaType?: SchemaType;
|
|
538
|
+
children?: ID[];
|
|
539
|
+
};
|
|
540
|
+
type JavaType = JavaTypeReference | JavaTypeClass | JavaTypeUnion | JavaTypeEnum | JavaTypeVoid | JavaTypeBoolean | JavaTypeDouble | JavaTypeLong | JavaTypeString | JavaTypeConstant;
|
|
541
|
+
type JavaTypeReference = BaseType & {
|
|
542
|
+
kind: 'JavaTypeReference';
|
|
543
|
+
typeName: JavaIdentifier;
|
|
544
|
+
typeParameters?: JavaType[];
|
|
545
|
+
$ref?: string;
|
|
546
|
+
};
|
|
547
|
+
type JavaTypeClass = BaseType & {
|
|
548
|
+
kind: 'JavaTypeClass';
|
|
549
|
+
};
|
|
550
|
+
type JavaTypeUnion = BaseType & {
|
|
551
|
+
kind: 'JavaTypeUnion';
|
|
552
|
+
};
|
|
553
|
+
type JavaTypeEnum = BaseType & {
|
|
554
|
+
kind: 'JavaTypeEnum';
|
|
555
|
+
};
|
|
556
|
+
type JavaTypeVoid = BaseType & {
|
|
557
|
+
kind: 'JavaTypeVoid';
|
|
558
|
+
};
|
|
559
|
+
type JavaTypeBoolean = BaseType & {
|
|
560
|
+
kind: 'JavaTypeBoolean';
|
|
561
|
+
};
|
|
562
|
+
type JavaTypeDouble = BaseType & {
|
|
563
|
+
kind: 'JavaTypeDouble';
|
|
564
|
+
};
|
|
565
|
+
type JavaTypeLong = BaseType & {
|
|
566
|
+
kind: 'JavaTypeLong';
|
|
567
|
+
};
|
|
568
|
+
type JavaTypeString = BaseType & {
|
|
569
|
+
kind: 'JavaTypeString';
|
|
570
|
+
};
|
|
571
|
+
type JavaTypeConstant = BaseType & {
|
|
572
|
+
kind: 'JavaTypeConstant';
|
|
573
|
+
value: string;
|
|
574
|
+
};
|
|
575
|
+
type PhpIdentifier = string;
|
|
576
|
+
type PhpDeclaration = PhpDeclMethod | PhpDeclParam | PhpDeclClass | PhpDeclClassProperty | PhpDeclAssocArray | PhpDeclAssocArrayProperty | PhpDeclEnum | PhpDeclReference | ErrorDecl;
|
|
577
|
+
type PhpDeclMethod = BaseDeclaration & {
|
|
578
|
+
kind: 'PhpDeclMethod';
|
|
579
|
+
ident: PhpIdentifier;
|
|
580
|
+
parameters: PhpMethodParameter[];
|
|
581
|
+
returnType?: PhpType;
|
|
582
|
+
qualified?: string;
|
|
583
|
+
docstring?: string;
|
|
584
|
+
paramsChildren?: ID[];
|
|
585
|
+
responseChildren?: ID[];
|
|
586
|
+
};
|
|
587
|
+
type PhpMethodParameter = {
|
|
588
|
+
kind: 'PhpMethodParameter';
|
|
589
|
+
ident: PhpIdentifier;
|
|
590
|
+
typeAnnotation: PhpType;
|
|
591
|
+
optional: boolean;
|
|
592
|
+
hasDefault?: boolean;
|
|
593
|
+
};
|
|
594
|
+
type PhpDeclReference = BaseDeclaration & {
|
|
595
|
+
kind: 'PhpDeclReference';
|
|
596
|
+
docstring?: string;
|
|
597
|
+
type: PhpType;
|
|
598
|
+
scope?: 'class' | '@phpstan-type';
|
|
599
|
+
children?: ID[];
|
|
600
|
+
};
|
|
601
|
+
type PhpDeclParam = BaseDeclaration & {
|
|
602
|
+
kind: 'PhpDeclParam';
|
|
603
|
+
ident: PhpIdentifier;
|
|
604
|
+
type: PhpType;
|
|
605
|
+
optional: boolean;
|
|
606
|
+
isPositional: boolean;
|
|
607
|
+
default?: unknown;
|
|
608
|
+
examples?: unknown[];
|
|
609
|
+
oasRef?: string;
|
|
610
|
+
modelPath?: string;
|
|
611
|
+
docstring?: string;
|
|
612
|
+
deprecated?: string | boolean;
|
|
613
|
+
children?: ID[];
|
|
614
|
+
};
|
|
615
|
+
/** For PHPStan array definitions. */
|
|
616
|
+
type PhpDeclAssocArrayProperty = BaseDeclaration & {
|
|
617
|
+
kind: 'PhpDeclAssocArrayProperty';
|
|
618
|
+
ident: PhpIdentifier;
|
|
619
|
+
type: PhpType;
|
|
620
|
+
optional: boolean;
|
|
621
|
+
oasRef?: string;
|
|
622
|
+
modelPath?: string;
|
|
623
|
+
docstring?: string;
|
|
624
|
+
deprecated?: string | boolean;
|
|
625
|
+
children?: ID[];
|
|
626
|
+
};
|
|
627
|
+
type PhpDeclClassProperty = BaseDeclaration & {
|
|
628
|
+
kind: 'PhpDeclClassProperty';
|
|
629
|
+
ident: PhpIdentifier;
|
|
630
|
+
type: PhpType;
|
|
631
|
+
nullable: boolean;
|
|
632
|
+
docstring?: string;
|
|
633
|
+
default?: string;
|
|
634
|
+
examples?: unknown[];
|
|
635
|
+
deprecated?: string | boolean;
|
|
636
|
+
modelPath?: string;
|
|
637
|
+
children?: ID[];
|
|
638
|
+
};
|
|
639
|
+
type PhpDeclEnum = BaseDeclaration & {
|
|
640
|
+
kind: 'PhpDeclEnum';
|
|
641
|
+
ident: PhpIdentifier;
|
|
642
|
+
members: {
|
|
643
|
+
case: PhpIdentifier;
|
|
644
|
+
backingType?: 'string' | 'int';
|
|
645
|
+
value?: string | number;
|
|
646
|
+
}[];
|
|
647
|
+
};
|
|
648
|
+
type PhpDeclClass = BaseDeclaration & {
|
|
649
|
+
kind: 'PhpDeclClass';
|
|
650
|
+
ident: PhpIdentifier;
|
|
651
|
+
docstring?: string;
|
|
652
|
+
children?: ID[];
|
|
653
|
+
};
|
|
654
|
+
type PhpDeclAssocArray = BaseDeclaration & {
|
|
655
|
+
kind: 'PhpDeclAssocArray';
|
|
656
|
+
ident: PhpIdentifier;
|
|
657
|
+
type: PhpType;
|
|
658
|
+
children?: ID[];
|
|
659
|
+
};
|
|
660
|
+
type PhpType = SDKJSONPhpType<string>;
|
|
661
|
+
type SDKJSONPhpIdentifier<T extends Code = string> = T;
|
|
662
|
+
type SDKJSONPhpType<T extends Code = string> = PhpTypeReference<T> | PhpTypeMapArray<T> | PhpTypeListArray<T> | PhpTypeUnion<T> | PhpTypeLiteral | PhpTypeString | PhpTypeFloat | PhpTypeInt | PhpTypeBool | PhpTypeNull | PhpTypeMixed | PhpTypeDatetime | PhpTypeComplexBuiltin;
|
|
663
|
+
type PhpTypeReference<T extends Code = string> = BaseType & {
|
|
664
|
+
kind: 'PhpTypeReference';
|
|
665
|
+
typeName: SDKJSONPhpIdentifier<T>;
|
|
666
|
+
$ref?: ID | string;
|
|
667
|
+
typeParameters?: PhpType[];
|
|
668
|
+
};
|
|
669
|
+
type PhpTypeMapArray<T extends Code = string> = BaseType & {
|
|
670
|
+
kind: 'PhpTypeMapArray';
|
|
671
|
+
elementType: SDKJSONPhpType<T>;
|
|
672
|
+
};
|
|
673
|
+
type PhpTypeListArray<T extends Code = string> = BaseType & {
|
|
674
|
+
kind: 'PhpTypeListArray';
|
|
675
|
+
elementType: SDKJSONPhpType<T>;
|
|
676
|
+
};
|
|
677
|
+
type PhpTypeUnion<T extends Code = string> = BaseType & {
|
|
678
|
+
kind: 'PhpTypeUnion';
|
|
679
|
+
types: SDKJSONPhpType<T>[];
|
|
680
|
+
};
|
|
681
|
+
type PhpTypeLiteral = BaseType & {
|
|
682
|
+
kind: 'PhpTypeLiteral';
|
|
683
|
+
literal: string | boolean | number;
|
|
684
|
+
};
|
|
685
|
+
type PhpTypeString = BaseType & {
|
|
686
|
+
kind: 'PhpTypeString';
|
|
687
|
+
};
|
|
688
|
+
type PhpTypeFloat = BaseType & {
|
|
689
|
+
kind: 'PhpTypeFloat';
|
|
690
|
+
};
|
|
691
|
+
type PhpTypeInt = BaseType & {
|
|
692
|
+
kind: 'PhpTypeInt';
|
|
693
|
+
};
|
|
694
|
+
type PhpTypeBool = BaseType & {
|
|
695
|
+
kind: 'PhpTypeBool';
|
|
696
|
+
};
|
|
697
|
+
type PhpTypeNull = BaseType & {
|
|
698
|
+
kind: 'PhpTypeNull';
|
|
699
|
+
};
|
|
700
|
+
type PhpTypeMixed = BaseType & {
|
|
701
|
+
kind: 'PhpTypeMixed';
|
|
702
|
+
};
|
|
703
|
+
type PhpTypeDatetime = BaseType & {
|
|
704
|
+
kind: 'PhpTypeDatetime';
|
|
705
|
+
};
|
|
706
|
+
type PhpTypeComplexBuiltin = BaseType & {
|
|
707
|
+
kind: 'PhpTypeComplexBuiltin';
|
|
708
|
+
typeName: 'resource' | 'callable' | 'class-string' | 'array' | 'object';
|
|
709
|
+
};
|
|
710
|
+
type PythonDeclaration = PythonDeclFunction | PythonDeclClass | PythonDeclType | PythonDeclProperty | PythonDeclReference | ErrorDecl;
|
|
711
|
+
type PythonDeclFunction = BaseDeclaration & {
|
|
712
|
+
kind: 'PythonDeclFunction';
|
|
713
|
+
ident: PythonIdentifier;
|
|
714
|
+
qualified?: string;
|
|
715
|
+
docstring?: string;
|
|
716
|
+
async?: boolean;
|
|
717
|
+
generics?: PythonGenericParameter[];
|
|
718
|
+
parameters: PythonFunctionParameter[];
|
|
719
|
+
returns?: PythonType;
|
|
720
|
+
paramsChildren?: ID[];
|
|
721
|
+
responseChildren?: ID[];
|
|
722
|
+
};
|
|
723
|
+
type PythonFunctionParameter = {
|
|
724
|
+
kind: 'PythonFunctionParameter';
|
|
725
|
+
ident: PythonIdentifier;
|
|
726
|
+
type: PythonType;
|
|
727
|
+
optional?: boolean;
|
|
728
|
+
};
|
|
729
|
+
type PythonGenericParameter = {
|
|
730
|
+
kind: 'PythonTypeParameter';
|
|
731
|
+
name: string;
|
|
732
|
+
constraint?: PythonType;
|
|
733
|
+
};
|
|
734
|
+
type PythonDeclClass = BaseDeclaration & {
|
|
735
|
+
kind: 'PythonDeclClass';
|
|
736
|
+
docstring?: string;
|
|
737
|
+
ident: PythonIdentifier;
|
|
738
|
+
generics?: PythonGenericParameter[];
|
|
739
|
+
children?: ID[];
|
|
740
|
+
};
|
|
741
|
+
type PythonDeclType = BaseDeclaration & {
|
|
742
|
+
kind: 'PythonDeclType';
|
|
743
|
+
docstring?: string;
|
|
744
|
+
ident: PythonIdentifier;
|
|
745
|
+
generics?: PythonGenericParameter[];
|
|
746
|
+
type: PythonType;
|
|
747
|
+
childrenParentSchema?: SchemaType;
|
|
748
|
+
children?: ID[];
|
|
749
|
+
};
|
|
750
|
+
type PythonIdentifier = string;
|
|
751
|
+
type PythonLiteral = {
|
|
752
|
+
kind: 'PythonLiteral';
|
|
753
|
+
value: string | number | boolean;
|
|
754
|
+
};
|
|
755
|
+
type PythonDeclProperty = BaseDeclaration & {
|
|
756
|
+
kind: 'PythonDeclProperty';
|
|
757
|
+
docstring?: string;
|
|
758
|
+
title?: string;
|
|
759
|
+
ident: PythonIdentifier;
|
|
760
|
+
type: PythonType;
|
|
761
|
+
constraints?: Constraints;
|
|
762
|
+
optional?: boolean;
|
|
763
|
+
default?: unknown;
|
|
764
|
+
examples?: unknown[];
|
|
765
|
+
schemaType?: SchemaType;
|
|
766
|
+
modelPath?: string;
|
|
767
|
+
childrenParentSchema?: SchemaType;
|
|
768
|
+
children?: ID[];
|
|
769
|
+
};
|
|
770
|
+
type PythonDeclReference = BaseDeclaration & {
|
|
771
|
+
kind: 'PythonDeclReference';
|
|
772
|
+
docstring?: string;
|
|
773
|
+
type: PythonType;
|
|
774
|
+
children?: ID[];
|
|
775
|
+
};
|
|
776
|
+
type PythonType = PythonTypeReference | PythonTypeClass | PythonTypeArray | PythonTypeMap | PythonTypeString | PythonTypeFloat | PythonTypeInt | PythonTypeBool | PythonTypeAny | PythonTypeUnknown | PythonTypeLiteral;
|
|
777
|
+
type PythonTypeReference = BaseType & {
|
|
778
|
+
kind: 'PythonTypeReference';
|
|
779
|
+
typeName: PythonIdentifier;
|
|
780
|
+
typeParameters?: PythonType[];
|
|
781
|
+
schemaType?: SchemaType;
|
|
782
|
+
$ref?: string;
|
|
783
|
+
};
|
|
784
|
+
type PythonTypeClass = BaseType & {
|
|
785
|
+
kind: 'PythonTypeClass';
|
|
786
|
+
body: {
|
|
787
|
+
ident: PythonIdentifier;
|
|
788
|
+
type: PythonType;
|
|
789
|
+
}[];
|
|
790
|
+
};
|
|
791
|
+
type PythonTypeArray = BaseType & {
|
|
792
|
+
kind: 'PythonTypeArray';
|
|
793
|
+
elementType: PythonType;
|
|
794
|
+
};
|
|
795
|
+
type PythonTypeMap = BaseType & {
|
|
796
|
+
kind: 'PythonTypeMap';
|
|
797
|
+
indexType: PythonType;
|
|
798
|
+
itemType: PythonType;
|
|
799
|
+
};
|
|
800
|
+
type PythonTypeString = BaseType & {
|
|
801
|
+
kind: 'PythonTypeString';
|
|
802
|
+
};
|
|
803
|
+
type PythonTypeFloat = BaseType & {
|
|
804
|
+
kind: 'PythonTypeFloat';
|
|
805
|
+
};
|
|
806
|
+
type PythonTypeInt = BaseType & {
|
|
807
|
+
kind: 'PythonTypeInt';
|
|
808
|
+
};
|
|
809
|
+
type PythonTypeBool = BaseType & {
|
|
810
|
+
kind: 'PythonTypeBool';
|
|
811
|
+
};
|
|
812
|
+
type PythonTypeAny = BaseType & {
|
|
813
|
+
kind: 'PythonTypeAny';
|
|
814
|
+
};
|
|
815
|
+
type PythonTypeUnknown = BaseType & {
|
|
816
|
+
kind: 'PythonTypeUnknown';
|
|
817
|
+
};
|
|
818
|
+
type PythonTypeLiteral = BaseType & {
|
|
819
|
+
kind: 'PythonTypeLiteral';
|
|
820
|
+
literal: PythonLiteral;
|
|
821
|
+
};
|
|
822
|
+
type RubyDeclaration = RubyDeclFunction | RubyDeclClass | RubyDeclProperty | RubyDeclTypeAlias | RubyDeclReference | ErrorDecl;
|
|
823
|
+
type RubyDeclFunction = BaseDeclaration & {
|
|
824
|
+
kind: 'RubyDeclFunction';
|
|
825
|
+
ident: RubyIdentifier;
|
|
826
|
+
args: RubyFunctionArgument[];
|
|
827
|
+
qualified?: string;
|
|
828
|
+
returns?: RubyType;
|
|
829
|
+
paramsChildren?: ID[];
|
|
830
|
+
bodyParamsChildren?: Record<string, ID[]>;
|
|
831
|
+
responseChildren?: ID[];
|
|
832
|
+
};
|
|
833
|
+
type RubyFunctionArgument = {
|
|
834
|
+
kind: 'RubyFunctionArgument';
|
|
835
|
+
ident: RubyIdentifier;
|
|
836
|
+
optional: boolean;
|
|
837
|
+
type: RubyType;
|
|
838
|
+
};
|
|
839
|
+
type RubyDeclProperty = BaseDeclaration & {
|
|
840
|
+
kind: 'RubyDeclProperty';
|
|
841
|
+
ident: string;
|
|
842
|
+
docstring?: string;
|
|
843
|
+
title?: string;
|
|
844
|
+
location?: string;
|
|
845
|
+
type: RubyType;
|
|
846
|
+
constraints?: Constraints;
|
|
847
|
+
optional?: boolean;
|
|
848
|
+
examples?: unknown[];
|
|
849
|
+
schemaType?: SchemaType;
|
|
850
|
+
modelPath?: string;
|
|
851
|
+
childrenParentSchema?: SchemaType;
|
|
852
|
+
children?: ID[];
|
|
853
|
+
};
|
|
854
|
+
type RubyDeclClass = BaseDeclaration & {
|
|
855
|
+
kind: 'RubyDeclClass';
|
|
856
|
+
ident: string;
|
|
857
|
+
docstring?: string;
|
|
858
|
+
type: RubyType;
|
|
859
|
+
optional?: boolean;
|
|
860
|
+
children?: ID[];
|
|
861
|
+
};
|
|
862
|
+
type RubyDeclTypeAlias = BaseDeclaration & {
|
|
863
|
+
kind: 'RubyDeclTypeAlias';
|
|
864
|
+
docstring?: string;
|
|
865
|
+
ident: RubyIdentifier;
|
|
866
|
+
typeParameters?: RubyTypeParameter[];
|
|
867
|
+
type: RubyType;
|
|
868
|
+
children?: ID[];
|
|
869
|
+
};
|
|
870
|
+
type RubyTypeParameter = {
|
|
871
|
+
kind: 'RubyTypeParameter';
|
|
872
|
+
name: RubyIdentifier;
|
|
873
|
+
constraint?: RubyType;
|
|
874
|
+
default?: RubyType;
|
|
875
|
+
};
|
|
876
|
+
type RubyIdentifier = string;
|
|
877
|
+
type RubyDeclReference = BaseDeclaration & {
|
|
878
|
+
kind: 'RubyDeclReference';
|
|
879
|
+
docstring?: string;
|
|
880
|
+
type: RubyType;
|
|
881
|
+
children?: ID[];
|
|
882
|
+
};
|
|
883
|
+
type RubyType = RubyTypeReference | RubyTypeObject | RubyTypeArray | RubyTypeMap | RubyTypeString | RubyTypeInteger | RubyTypeFloat | RubyTypeBoolean | RubyTypeNull | RubyTypeBinary | RubyTypeUnknown | RubyTypeLiteral | RubyTypeUnion | RubyTypeIntersection | RubyTypeBuiltinClass;
|
|
884
|
+
type RubyTypeReference = BaseType & {
|
|
885
|
+
kind: 'RubyTypeReference';
|
|
886
|
+
ident: RubyIdentifier;
|
|
887
|
+
typeParameters?: RubyType[];
|
|
888
|
+
schemaType?: SchemaType;
|
|
889
|
+
$ref?: ID;
|
|
890
|
+
};
|
|
891
|
+
type RubyTypeObject = BaseType & {
|
|
892
|
+
kind: 'RubyTypeObject';
|
|
893
|
+
members: {
|
|
894
|
+
ident: RubyIdentifier;
|
|
895
|
+
optional?: boolean;
|
|
896
|
+
}[];
|
|
897
|
+
};
|
|
898
|
+
type RubyTypeMap = BaseType & {
|
|
899
|
+
kind: 'RubyTypeMap';
|
|
900
|
+
indexType: RubyType;
|
|
901
|
+
itemType: RubyType;
|
|
902
|
+
};
|
|
903
|
+
type RubyTypeArray = BaseType & {
|
|
904
|
+
kind: 'RubyTypeArray';
|
|
905
|
+
elementType: RubyType;
|
|
906
|
+
};
|
|
907
|
+
type RubyTypeUnion = BaseType & {
|
|
908
|
+
kind: 'RubyTypeUnion';
|
|
909
|
+
types: RubyType[];
|
|
910
|
+
};
|
|
911
|
+
type RubyTypeIntersection = BaseType & {
|
|
912
|
+
kind: 'RubyTypeIntersection';
|
|
913
|
+
types: RubyType[];
|
|
914
|
+
};
|
|
915
|
+
type RubyTypeLiteral = BaseType & {
|
|
916
|
+
kind: 'RubyTypeLiteral';
|
|
917
|
+
literal: string | boolean | number;
|
|
918
|
+
};
|
|
919
|
+
type RubyTypeBuiltinClass = BaseType & {
|
|
920
|
+
kind: 'RubyTypeBuiltinClass';
|
|
921
|
+
className: string;
|
|
922
|
+
};
|
|
923
|
+
type RubyTypeString = BaseType & {
|
|
924
|
+
kind: 'RubyTypeString';
|
|
925
|
+
};
|
|
926
|
+
type RubyTypeInteger = BaseType & {
|
|
927
|
+
kind: 'RubyTypeInteger';
|
|
928
|
+
};
|
|
929
|
+
type RubyTypeFloat = BaseType & {
|
|
930
|
+
kind: 'RubyTypeFloat';
|
|
931
|
+
};
|
|
932
|
+
type RubyTypeBoolean = BaseType & {
|
|
933
|
+
kind: 'RubyTypeBoolean';
|
|
934
|
+
};
|
|
935
|
+
type RubyTypeNull = BaseType & {
|
|
936
|
+
kind: 'RubyTypeNull';
|
|
937
|
+
};
|
|
938
|
+
type RubyTypeBinary = BaseType & {
|
|
939
|
+
kind: 'RubyTypeBinary';
|
|
940
|
+
contentType: string[];
|
|
941
|
+
};
|
|
942
|
+
type RubyTypeUnknown = BaseType & {
|
|
943
|
+
kind: 'RubyTypeUnknown';
|
|
944
|
+
};
|
|
945
|
+
type PrimitiveNumberProps$1 = {
|
|
946
|
+
oneof?: (number | bigint)[];
|
|
947
|
+
default: number | bigint | null;
|
|
948
|
+
minimum: number | bigint | null;
|
|
949
|
+
maximum: number | bigint | null;
|
|
950
|
+
};
|
|
951
|
+
type Primitive$1 = {
|
|
952
|
+
category: 'primitive';
|
|
953
|
+
schemaRef?: SDKSchemaReference;
|
|
954
|
+
} & ({
|
|
955
|
+
type: 'Bool';
|
|
956
|
+
default: boolean | null;
|
|
957
|
+
} | ({
|
|
958
|
+
type: 'Float64';
|
|
959
|
+
} & PrimitiveNumberProps$1) | ({
|
|
960
|
+
type: 'Int64';
|
|
961
|
+
} & PrimitiveNumberProps$1) | ({
|
|
962
|
+
type: 'Number';
|
|
963
|
+
} & PrimitiveNumberProps$1) | {
|
|
964
|
+
type: 'Time';
|
|
965
|
+
default: string | null;
|
|
966
|
+
} | {
|
|
967
|
+
type: 'String';
|
|
968
|
+
oneof?: string[];
|
|
969
|
+
default: string | null;
|
|
970
|
+
});
|
|
971
|
+
type Dynamic$1 = {
|
|
972
|
+
category: 'dynamic';
|
|
973
|
+
type: 'Dynamic';
|
|
974
|
+
schemaRef?: SDKSchemaReference;
|
|
975
|
+
allowedSubtypes: Primitive$1['type'][];
|
|
976
|
+
};
|
|
977
|
+
type Unknown$1 = {
|
|
978
|
+
category: 'unknown';
|
|
979
|
+
type: 'unknown';
|
|
980
|
+
schemaRef?: SDKSchemaReference;
|
|
981
|
+
};
|
|
982
|
+
type Collection$1 = {
|
|
983
|
+
category: 'collection';
|
|
984
|
+
type: 'List' | 'Map' | 'Set';
|
|
985
|
+
elementType: AttributeType$1;
|
|
986
|
+
schemaRef?: SDKSchemaReference;
|
|
987
|
+
};
|
|
988
|
+
type Nested$1 = {
|
|
989
|
+
category: 'nested';
|
|
990
|
+
type: 'ListNested' | 'MapNested' | 'SetNested' | 'SingleNested';
|
|
991
|
+
attributes: TerraformAttribute[];
|
|
992
|
+
schemaRef?: SDKSchemaReference;
|
|
993
|
+
modelTypeName: string;
|
|
994
|
+
validators: TerraformValidators;
|
|
995
|
+
};
|
|
996
|
+
type AttributeType$1 = Nested$1 | Collection$1 | Dynamic$1 | Primitive$1 | Unknown$1;
|
|
997
|
+
/**
|
|
998
|
+
* required: The value must be practitioner configured to an eventually known value (not null),
|
|
999
|
+
* otherwise the framework will automatically raise an error diagnostic for the missing value.
|
|
1000
|
+
*
|
|
1001
|
+
* optional: The value may be practitioner configured to a known value or null.
|
|
1002
|
+
*
|
|
1003
|
+
* computed: The value will be set in provider logic and any practitioner configuration causes
|
|
1004
|
+
* the framework to automatically raise an error diagnostic for the unexpected configuration value.
|
|
1005
|
+
*
|
|
1006
|
+
* computed_optional: The value may be practitioner configured or the value may be set in
|
|
1007
|
+
* provider logic when the practitioner configuration is null.
|
|
1008
|
+
*/
|
|
1009
|
+
type Configurability = 'required' | 'optional' | 'computed' | 'computed_optional';
|
|
1010
|
+
type TerraformSchemaType = 'resource' | 'provider' | 'datasource';
|
|
1011
|
+
type PathExpr$1 = Readonly<{
|
|
1012
|
+
path: string;
|
|
1013
|
+
container?: Collection$1['type'] | Nested$1['type'];
|
|
1014
|
+
}>;
|
|
1015
|
+
type PathExpression$1 = readonly PathExpr$1[];
|
|
1016
|
+
type TerraformAttribute = {
|
|
1017
|
+
name: string;
|
|
1018
|
+
description?: string;
|
|
1019
|
+
configurability: Configurability;
|
|
1020
|
+
configurabilityOverride: boolean;
|
|
1021
|
+
property?: SDKPropertySchemaReference;
|
|
1022
|
+
type: AttributeType$1;
|
|
1023
|
+
idProperty?: boolean;
|
|
1024
|
+
requiresReplace?: boolean;
|
|
1025
|
+
sensitive?: boolean;
|
|
1026
|
+
deprecated?: string | boolean;
|
|
1027
|
+
noRefresh?: boolean;
|
|
1028
|
+
isBodyRootParam?: boolean;
|
|
1029
|
+
syntheticType?: 'id' | 'find-by' | 'max-items' | 'items' | 'timeout';
|
|
1030
|
+
schemaType: TerraformSchemaType;
|
|
1031
|
+
pathExpr: PathExpression$1; /** whether this attribute is immediately nested inside a computed (or computed_optional) collection/object */
|
|
1032
|
+
nestedInComputedAttribute?: boolean;
|
|
1033
|
+
};
|
|
1034
|
+
declare const TerraformPathValidations: readonly ['requiredTogether', 'atLeastOneOf', 'exactlyOneOf', 'conflicting'];
|
|
1035
|
+
type PathValidators = Record<(typeof TerraformPathValidations)[number], PathExpression$1[][]>;
|
|
1036
|
+
type TerraformValidators = {
|
|
1037
|
+
path: PathValidators;
|
|
1038
|
+
any: never[];
|
|
1039
|
+
all: never[];
|
|
1040
|
+
};
|
|
1041
|
+
type TerraformDeclaration = TerraformDeclServiceNode | TerraformDeclSource | TerraformDeclAttribute | ErrorDecl;
|
|
1042
|
+
type TerraformDeclServiceNode = BaseDeclaration & {
|
|
1043
|
+
kind: 'TerraformDeclServiceNode';
|
|
1044
|
+
resource?: ID;
|
|
1045
|
+
dataSource?: ID;
|
|
1046
|
+
listDataSource?: ID;
|
|
1047
|
+
};
|
|
1048
|
+
type TerraformDeclSource = BaseDeclaration & {
|
|
1049
|
+
kind: 'TerraformDeclSource';
|
|
1050
|
+
name: string;
|
|
1051
|
+
type: 'resource' | 'datasource-plural' | 'datasource-single';
|
|
1052
|
+
methodName: string;
|
|
1053
|
+
required: ID[];
|
|
1054
|
+
optional: ID[];
|
|
1055
|
+
computed: ID[];
|
|
1056
|
+
};
|
|
1057
|
+
type PrimitiveNumberProps = {
|
|
1058
|
+
oneof?: number[];
|
|
1059
|
+
default: number | null;
|
|
1060
|
+
minimum: number | null;
|
|
1061
|
+
maximum: number | null;
|
|
1062
|
+
};
|
|
1063
|
+
type Primitive = {
|
|
1064
|
+
category: 'primitive';
|
|
1065
|
+
} & ({
|
|
1066
|
+
type: 'Bool';
|
|
1067
|
+
default: boolean | null;
|
|
1068
|
+
} | ({
|
|
1069
|
+
type: 'Float64';
|
|
1070
|
+
} & PrimitiveNumberProps) | ({
|
|
1071
|
+
type: 'Int64';
|
|
1072
|
+
} & PrimitiveNumberProps) | ({
|
|
1073
|
+
type: 'Number';
|
|
1074
|
+
} & PrimitiveNumberProps) | {
|
|
1075
|
+
type: 'Time';
|
|
1076
|
+
default: string | null;
|
|
1077
|
+
} | {
|
|
1078
|
+
type: 'String';
|
|
1079
|
+
oneof?: string[];
|
|
1080
|
+
default: string | null;
|
|
1081
|
+
});
|
|
1082
|
+
type Dynamic = {
|
|
1083
|
+
category: 'dynamic';
|
|
1084
|
+
type: 'Dynamic';
|
|
1085
|
+
allowedSubtypes: Primitive['type'][];
|
|
1086
|
+
};
|
|
1087
|
+
type Unknown = {
|
|
1088
|
+
category: 'unknown';
|
|
1089
|
+
type: 'unknown';
|
|
1090
|
+
};
|
|
1091
|
+
type Collection = {
|
|
1092
|
+
category: 'collection';
|
|
1093
|
+
type: 'List' | 'Map' | 'Set';
|
|
1094
|
+
elementType: AttributeType;
|
|
1095
|
+
};
|
|
1096
|
+
type Nested = {
|
|
1097
|
+
category: 'nested';
|
|
1098
|
+
type: 'ListNested' | 'MapNested' | 'SetNested' | 'SingleNested';
|
|
1099
|
+
modelTypeName: string;
|
|
1100
|
+
validators: TerraformValidators;
|
|
1101
|
+
};
|
|
1102
|
+
type AttributeType = Nested | Collection | Dynamic | Primitive | Unknown;
|
|
1103
|
+
type TerraformDeclAttribute = BaseDeclaration & {
|
|
1104
|
+
kind: 'TerraformDeclAttribute';
|
|
1105
|
+
name: string;
|
|
1106
|
+
docstring?: string;
|
|
1107
|
+
type: AttributeType;
|
|
1108
|
+
children: ID[];
|
|
1109
|
+
configurability: Configurability;
|
|
1110
|
+
requiresReplace?: boolean;
|
|
1111
|
+
};
|
|
1112
|
+
type TSDeclaration = TSDeclFunction | TSDeclClass | TSDeclInterface | TSDeclProperty | TSDeclTypeAlias | TSDeclReference | ErrorDecl;
|
|
1113
|
+
type TSDeclFunction = BaseDeclaration & {
|
|
1114
|
+
kind: 'TSDeclFunction';
|
|
1115
|
+
ident: TSIdentifier;
|
|
1116
|
+
qualified?: string;
|
|
1117
|
+
signature: TSFunctionSignature;
|
|
1118
|
+
overloads?: TSFunctionSignature[];
|
|
1119
|
+
paramsChildren?: ID[];
|
|
1120
|
+
responseChildren?: ID[];
|
|
1121
|
+
};
|
|
1122
|
+
type TSDeclClass = BaseDeclaration & {
|
|
1123
|
+
kind: 'TSDeclClass';
|
|
1124
|
+
ident: TSIdentifier;
|
|
1125
|
+
docstring?: string;
|
|
1126
|
+
typeParameters?: TSTypeParameter[];
|
|
1127
|
+
superClass?: TSTypeReference;
|
|
1128
|
+
implements?: TSTypeReference[];
|
|
1129
|
+
children: ID[];
|
|
1130
|
+
};
|
|
1131
|
+
type TSDeclInterface = BaseDeclaration & {
|
|
1132
|
+
kind: 'TSDeclInterface';
|
|
1133
|
+
ident: TSIdentifier;
|
|
1134
|
+
docstring?: string;
|
|
1135
|
+
typeParameters?: TSTypeParameter[];
|
|
1136
|
+
extends?: TSType[];
|
|
1137
|
+
children: ID[];
|
|
1138
|
+
};
|
|
1139
|
+
type TSDeclProperty = BaseDeclaration & {
|
|
1140
|
+
kind: 'TSDeclProperty';
|
|
1141
|
+
key: string;
|
|
1142
|
+
docstring?: string;
|
|
1143
|
+
title?: string;
|
|
1144
|
+
type: TSType;
|
|
1145
|
+
constraints?: Constraints;
|
|
1146
|
+
optional?: boolean;
|
|
1147
|
+
declare?: boolean;
|
|
1148
|
+
default?: unknown;
|
|
1149
|
+
examples?: unknown[];
|
|
1150
|
+
schemaType?: SchemaType;
|
|
1151
|
+
modelPath?: string;
|
|
1152
|
+
childrenParentSchema?: SchemaType;
|
|
1153
|
+
children?: ID[];
|
|
1154
|
+
};
|
|
1155
|
+
type TSDeclTypeAlias = BaseDeclaration & {
|
|
1156
|
+
kind: 'TSDeclTypeAlias';
|
|
1157
|
+
docstring?: string;
|
|
1158
|
+
ident: TSIdentifier;
|
|
1159
|
+
typeParameters?: TSTypeParameter[];
|
|
1160
|
+
type: TSType;
|
|
1161
|
+
children?: ID[];
|
|
1162
|
+
};
|
|
1163
|
+
type TSDeclReference = BaseDeclaration & {
|
|
1164
|
+
kind: 'TSDeclReference';
|
|
1165
|
+
docstring?: string;
|
|
1166
|
+
type: TSType;
|
|
1167
|
+
children?: ID[];
|
|
1168
|
+
};
|
|
1169
|
+
type TSFunctionSignature = {
|
|
1170
|
+
kind: 'TSFunctionSignature';
|
|
1171
|
+
parameters: TSFunctionParameter[];
|
|
1172
|
+
returns: TSType;
|
|
1173
|
+
async?: boolean;
|
|
1174
|
+
typeParameters?: TSTypeParameter[];
|
|
1175
|
+
docstring?: string;
|
|
1176
|
+
};
|
|
1177
|
+
type TSFunctionParameter = {
|
|
1178
|
+
kind: 'TSFunctionParameter';
|
|
1179
|
+
ident: TSIdentifier;
|
|
1180
|
+
type: TSType;
|
|
1181
|
+
optional?: boolean;
|
|
1182
|
+
};
|
|
1183
|
+
type TSTypeParameter = {
|
|
1184
|
+
kind: 'TSTypeParameter';
|
|
1185
|
+
name: TSIdentifier;
|
|
1186
|
+
constraint?: TSType;
|
|
1187
|
+
default?: TSType;
|
|
1188
|
+
};
|
|
1189
|
+
type TSIdentifier = string;
|
|
1190
|
+
type TSType = TSTypeReference | TSTypeObject | TSTypeArray | TSTypeString | TSTypeNumber | TSTypeBoolean | TSTypeNull | TSTypeUndefined | TSTypeVoid | TSTypeAny | TSTypeUnknown | TSTypeNever | TSTypeLiteral | TSTypeUnion | TSTypeIntersection | TSTypeInterface;
|
|
1191
|
+
type TSTypeReference = BaseType & {
|
|
1192
|
+
kind: 'TSTypeReference';
|
|
1193
|
+
ident: TSIdentifier;
|
|
1194
|
+
typeParameters?: TSType[];
|
|
1195
|
+
schemaType?: SchemaType;
|
|
1196
|
+
$ref?: ID;
|
|
1197
|
+
};
|
|
1198
|
+
type TSTypeObject = BaseType & {
|
|
1199
|
+
kind: 'TSTypeObject';
|
|
1200
|
+
members: {
|
|
1201
|
+
ident: TSIdentifier;
|
|
1202
|
+
type: TSType;
|
|
1203
|
+
optional?: boolean;
|
|
1204
|
+
}[];
|
|
1205
|
+
};
|
|
1206
|
+
type TSTypeArray = BaseType & {
|
|
1207
|
+
kind: 'TSTypeArray';
|
|
1208
|
+
elementType: TSType;
|
|
1209
|
+
};
|
|
1210
|
+
type TSTypeUnion = BaseType & {
|
|
1211
|
+
kind: 'TSTypeUnion';
|
|
1212
|
+
types: TSType[];
|
|
1213
|
+
};
|
|
1214
|
+
type TSTypeIntersection = BaseType & {
|
|
1215
|
+
kind: 'TSTypeIntersection';
|
|
1216
|
+
types: TSType[];
|
|
1217
|
+
};
|
|
1218
|
+
type TSTypeInterface = BaseType & {
|
|
1219
|
+
kind: 'TSTypeInterface';
|
|
1220
|
+
members: {
|
|
1221
|
+
ident: TSIdentifier;
|
|
1222
|
+
type: TSType;
|
|
1223
|
+
optional?: boolean;
|
|
1224
|
+
}[];
|
|
1225
|
+
extends?: TSTypeReference[];
|
|
1226
|
+
};
|
|
1227
|
+
type TSTypeLiteral = BaseType & {
|
|
1228
|
+
kind: 'TSTypeLiteral';
|
|
1229
|
+
literal: string | boolean | number;
|
|
1230
|
+
};
|
|
1231
|
+
type TSTypeString = BaseType & {
|
|
1232
|
+
kind: 'TSTypeString';
|
|
1233
|
+
};
|
|
1234
|
+
type TSTypeNumber = BaseType & {
|
|
1235
|
+
kind: 'TSTypeNumber';
|
|
1236
|
+
};
|
|
1237
|
+
type TSTypeBoolean = BaseType & {
|
|
1238
|
+
kind: 'TSTypeBoolean';
|
|
1239
|
+
};
|
|
1240
|
+
type TSTypeNull = BaseType & {
|
|
1241
|
+
kind: 'TSTypeNull';
|
|
1242
|
+
};
|
|
1243
|
+
type TSTypeUndefined = BaseType & {
|
|
1244
|
+
kind: 'TSTypeUndefined';
|
|
1245
|
+
};
|
|
1246
|
+
type TSTypeVoid = BaseType & {
|
|
1247
|
+
kind: 'TSTypeVoid';
|
|
1248
|
+
};
|
|
1249
|
+
type TSTypeAny = BaseType & {
|
|
1250
|
+
kind: 'TSTypeAny';
|
|
1251
|
+
};
|
|
1252
|
+
type TSTypeUnknown = BaseType & {
|
|
1253
|
+
kind: 'TSTypeUnknown';
|
|
1254
|
+
};
|
|
1255
|
+
type TSTypeNever = BaseType & {
|
|
1256
|
+
kind: 'TSTypeNever';
|
|
1257
|
+
};
|
|
1258
|
+
type HasOASRef = {
|
|
1259
|
+
oasRef?: string;
|
|
1260
|
+
};
|
|
1261
|
+
type HasConfigRef = {
|
|
1262
|
+
configRef: string;
|
|
1263
|
+
};
|
|
1264
|
+
type HasStainlessPath = {
|
|
1265
|
+
stainlessPath: string;
|
|
1266
|
+
};
|
|
1267
|
+
type ID = string & {
|
|
1268
|
+
_isId: null;
|
|
1269
|
+
};
|
|
1270
|
+
type SchemaType = SDKSchemaType;
|
|
1271
|
+
declare const constraints: readonly ['minLength', 'maxLength', 'format', 'minimum', 'exclusiveMinimum', 'maximum', 'exclusiveMaximum', 'multipleOf'];
|
|
1272
|
+
type Constraints = Pick<SchemaObject, (typeof constraints)[number]>;
|
|
1273
|
+
declare const SpecLanguages: readonly ['cli', 'csharp', 'go', 'http', 'java', 'kotlin', 'node', 'php', 'python', 'ruby', 'terraform', 'typescript'];
|
|
1274
|
+
type SpecLanguage = (typeof SpecLanguages)[number];
|
|
1275
|
+
declare const SnippetLanguages: readonly ['cli.default', 'csharp.default', 'go.default', 'http.curl', 'http.powershell', 'java.default', 'kotlin.default', 'node.default', 'php.default', 'python.default', 'ruby.default', 'terraform.default', 'typescript.default'];
|
|
1276
|
+
type SnippetLanguage<lang extends SpecLanguage = SpecLanguage> = (typeof SnippetLanguages)[number] & `${lang}.${string}`;
|
|
1277
|
+
/**
|
|
1278
|
+
* A literal property path from Spec down to a given node
|
|
1279
|
+
*/
|
|
1280
|
+
type Spec = {
|
|
1281
|
+
name: string;
|
|
1282
|
+
kind: 'spec';
|
|
1283
|
+
security_schemes: {
|
|
1284
|
+
type: 'http_bearer' | 'query' | 'header' | 'oauth2' | 'http_basic' | 'http_digest';
|
|
1285
|
+
description?: string;
|
|
1286
|
+
name: string;
|
|
1287
|
+
title: string;
|
|
1288
|
+
header: string | undefined;
|
|
1289
|
+
example: string | undefined;
|
|
1290
|
+
}[];
|
|
1291
|
+
resources: Record<string, Resource>;
|
|
1292
|
+
diagnostics: Diagnostics;
|
|
1293
|
+
docs?: Config['docs'];
|
|
1294
|
+
metadata: { [lang in SpecLanguage]?: {
|
|
1295
|
+
repo_url?: string;
|
|
1296
|
+
code_url?: string;
|
|
1297
|
+
package_title?: string;
|
|
1298
|
+
version?: string;
|
|
1299
|
+
install?: string;
|
|
1300
|
+
} };
|
|
1301
|
+
readme: { [lang in SpecLanguage]?: string };
|
|
1302
|
+
decls: { [lang in SpecLanguage]?: Record<string, LanguageDeclNodes[lang]> };
|
|
1303
|
+
snippets: { [key in SnippetLanguage]?: Record<string, {
|
|
1304
|
+
default: {
|
|
1305
|
+
content: string;
|
|
1306
|
+
};
|
|
1307
|
+
[key: `custom:${string}`]: {
|
|
1308
|
+
content: string;
|
|
1309
|
+
};
|
|
1310
|
+
}> };
|
|
1311
|
+
snippetResponses: {
|
|
1312
|
+
http: Record<string, {
|
|
1313
|
+
default?: {
|
|
1314
|
+
status: string;
|
|
1315
|
+
content: string;
|
|
1316
|
+
contentType?: string;
|
|
1317
|
+
}[];
|
|
1318
|
+
[key: `custom:${string}`]: {
|
|
1319
|
+
status?: string;
|
|
1320
|
+
content: string;
|
|
1321
|
+
}[];
|
|
1322
|
+
}>;
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
type Resource = (HasConfigRef & HasStainlessPath) & {
|
|
1326
|
+
kind: 'resource';
|
|
1327
|
+
name: string;
|
|
1328
|
+
title: string;
|
|
1329
|
+
configRef: string;
|
|
1330
|
+
description?: string;
|
|
1331
|
+
models: Record<string, Model>;
|
|
1332
|
+
methods: Record<string, Method>;
|
|
1333
|
+
subresources?: Record<string, Resource>;
|
|
1334
|
+
} & { [key in SpecLanguage]?: {
|
|
1335
|
+
Name: string;
|
|
1336
|
+
QualifiedName: string;
|
|
1337
|
+
} };
|
|
1338
|
+
type Method = (HasStainlessPath & HasOASRef) & {
|
|
1339
|
+
kind: 'http_method';
|
|
1340
|
+
name: string;
|
|
1341
|
+
title: string;
|
|
1342
|
+
configRef: string | undefined;
|
|
1343
|
+
description?: string;
|
|
1344
|
+
summary?: string;
|
|
1345
|
+
httpMethod: string;
|
|
1346
|
+
endpoint: string;
|
|
1347
|
+
deprecated?: string | boolean; /** @deprecated - use snippetResponses at the top level */
|
|
1348
|
+
exampleResponses?: Record<string, ResponseContentObject>;
|
|
1349
|
+
security: Record<string, string[]>[] | undefined;
|
|
1350
|
+
'x-api-token-group'?: string[];
|
|
1351
|
+
} & { [key in SpecLanguage]?: {
|
|
1352
|
+
Name: string;
|
|
1353
|
+
QualifiedName: string;
|
|
1354
|
+
} };
|
|
1355
|
+
type Model = (HasOASRef & HasConfigRef & HasStainlessPath) & {
|
|
1356
|
+
kind: 'model';
|
|
1357
|
+
name: string;
|
|
1358
|
+
title: string;
|
|
1359
|
+
isImplicit: boolean;
|
|
1360
|
+
stainlessPath: string;
|
|
1361
|
+
configRef: string;
|
|
1362
|
+
loading?: boolean;
|
|
1363
|
+
};
|
|
1364
|
+
type BaseDeclaration = {
|
|
1365
|
+
stainlessPath: string;
|
|
1366
|
+
oasRef?: string;
|
|
1367
|
+
configRef?: string;
|
|
1368
|
+
loading?: boolean;
|
|
1369
|
+
deprecated?: boolean | string;
|
|
1370
|
+
snippet?: string;
|
|
1371
|
+
};
|
|
1372
|
+
type BaseType = {
|
|
1373
|
+
oasRef?: string;
|
|
1374
|
+
};
|
|
1375
|
+
type Diagnostics = Record<string, DiagnosticExport[]>;
|
|
1376
|
+
type LanguageDeclNodes = {
|
|
1377
|
+
cli: CLIDeclaration;
|
|
1378
|
+
csharp: CSharpDeclaration;
|
|
1379
|
+
go: GoDeclaration;
|
|
1380
|
+
http: HttpDeclaration;
|
|
1381
|
+
java: JavaDeclaration;
|
|
1382
|
+
kotlin: JavaDeclaration;
|
|
1383
|
+
node: TSDeclaration;
|
|
1384
|
+
php: PhpDeclaration;
|
|
1385
|
+
python: PythonDeclaration;
|
|
1386
|
+
ruby: RubyDeclaration;
|
|
1387
|
+
terraform: TerraformDeclaration;
|
|
1388
|
+
typescript: TSDeclaration;
|
|
1389
|
+
};
|
|
1390
|
+
type ErrorDecl = BaseDeclaration & {
|
|
1391
|
+
kind: 'ErrorDecl';
|
|
1392
|
+
error: Error;
|
|
1393
|
+
message: string;
|
|
1394
|
+
};
|
|
1395
|
+
type GoDeclaration = GoDeclFunction | GoDeclType | GoDeclProperty | GoDeclTypeAlias | GoDeclConst | GoDeclReference | ErrorDecl;
|
|
1396
|
+
type GoDeclFunction = BaseDeclaration & {
|
|
1397
|
+
kind: 'GoDeclFunction';
|
|
1398
|
+
ident: GoIdentifier;
|
|
1399
|
+
qualified?: string;
|
|
1400
|
+
docstring?: string;
|
|
1401
|
+
async?: boolean;
|
|
1402
|
+
generics?: GoGenericParameter[];
|
|
1403
|
+
parameters: GoFunctionParameter[];
|
|
1404
|
+
returnType: GoType[];
|
|
1405
|
+
paramsChildren?: ID[];
|
|
1406
|
+
responseChildren?: ID[];
|
|
1407
|
+
};
|
|
1408
|
+
type GoFunctionParameter = {
|
|
1409
|
+
kind: 'GoFunctionParameter';
|
|
1410
|
+
optional?: boolean;
|
|
1411
|
+
ident: GoIdentifier;
|
|
1412
|
+
typeAnnotation: GoType;
|
|
1413
|
+
};
|
|
1414
|
+
type GoGenericParameter = {
|
|
1415
|
+
kind: 'GoTypeParameter';
|
|
1416
|
+
name: string;
|
|
1417
|
+
constraint?: GoType;
|
|
1418
|
+
};
|
|
1419
|
+
type GoDeclType = BaseDeclaration & {
|
|
1420
|
+
kind: 'GoDeclType';
|
|
1421
|
+
docstring?: string;
|
|
1422
|
+
ident: GoIdentifier;
|
|
1423
|
+
generics?: GoGenericParameter[];
|
|
1424
|
+
type: GoType;
|
|
1425
|
+
children?: ID[];
|
|
1426
|
+
};
|
|
1427
|
+
type GoDeclTypeAlias = BaseDeclaration & {
|
|
1428
|
+
kind: 'GoDeclTypeAlias';
|
|
1429
|
+
docstring?: string;
|
|
1430
|
+
ident: GoIdentifier;
|
|
1431
|
+
type: GoType;
|
|
1432
|
+
children?: ID[];
|
|
1433
|
+
};
|
|
1434
|
+
type GoDeclConst = BaseDeclaration & {
|
|
1435
|
+
kind: 'GoDeclConst';
|
|
1436
|
+
docstring?: string;
|
|
1437
|
+
ident: GoIdentifier;
|
|
1438
|
+
type: GoType;
|
|
1439
|
+
value: boolean | string | number;
|
|
1440
|
+
children?: ID[];
|
|
1441
|
+
};
|
|
1442
|
+
type GoIdentifier = string;
|
|
1443
|
+
type GoDeclProperty = BaseDeclaration & {
|
|
1444
|
+
kind: 'GoDeclProperty';
|
|
1445
|
+
docstring?: string;
|
|
1446
|
+
title?: string;
|
|
1447
|
+
ident: GoIdentifier;
|
|
1448
|
+
type: GoType;
|
|
1449
|
+
constraints?: Constraints;
|
|
1450
|
+
optional?: boolean;
|
|
1451
|
+
default?: unknown;
|
|
1452
|
+
examples?: unknown[];
|
|
1453
|
+
schemaType?: SchemaType;
|
|
1454
|
+
modelPath?: string;
|
|
1455
|
+
childrenParentSchema?: SchemaType;
|
|
1456
|
+
children?: ID[];
|
|
1457
|
+
};
|
|
1458
|
+
type GoDeclReference = BaseDeclaration & {
|
|
1459
|
+
kind: 'GoDeclReference';
|
|
1460
|
+
docstring?: string;
|
|
1461
|
+
type: GoType;
|
|
1462
|
+
children?: ID[];
|
|
1463
|
+
};
|
|
1464
|
+
type GoType = GoTypeReference | GoTypeInterface | GoTypeStruct | GoTypeArray | GoTypeMap | GoTypeString | GoTypeFloat | GoTypeInt | GoTypeBool | GoTypeAny | GoTypeUnknown | GoTypeError | GoTypePointer;
|
|
1465
|
+
type GoTypeReference = BaseType & {
|
|
1466
|
+
kind: 'GoTypeReference';
|
|
1467
|
+
typeName: GoIdentifier;
|
|
1468
|
+
typeParameters?: GoType[];
|
|
1469
|
+
schemaType?: SchemaType;
|
|
1470
|
+
$ref?: string;
|
|
1471
|
+
};
|
|
1472
|
+
type GoTypeStruct = BaseType & {
|
|
1473
|
+
kind: 'GoTypeStruct';
|
|
1474
|
+
};
|
|
1475
|
+
type GoTypeInterface = BaseType & {
|
|
1476
|
+
kind: 'GoTypeInterface';
|
|
1477
|
+
docstring?: string;
|
|
1478
|
+
typeName?: GoIdentifier;
|
|
1479
|
+
generics?: GoGenericParameter[];
|
|
1480
|
+
extends?: GoTypeReference[];
|
|
1481
|
+
};
|
|
1482
|
+
type GoTypeArray = BaseType & {
|
|
1483
|
+
kind: 'GoTypeArray';
|
|
1484
|
+
elementType: GoType;
|
|
1485
|
+
};
|
|
1486
|
+
type GoTypeMap = BaseType & {
|
|
1487
|
+
kind: 'GoTypeMap';
|
|
1488
|
+
indexType: GoType;
|
|
1489
|
+
itemType: GoType;
|
|
1490
|
+
};
|
|
1491
|
+
type GoTypeString = BaseType & {
|
|
1492
|
+
kind: 'GoTypeString';
|
|
1493
|
+
};
|
|
1494
|
+
type GoTypeFloat = BaseType & {
|
|
1495
|
+
kind: 'GoTypeFloat';
|
|
1496
|
+
};
|
|
1497
|
+
type GoTypeInt = BaseType & {
|
|
1498
|
+
kind: 'GoTypeInt';
|
|
1499
|
+
};
|
|
1500
|
+
type GoTypeBool = BaseType & {
|
|
1501
|
+
kind: 'GoTypeBool';
|
|
1502
|
+
};
|
|
1503
|
+
type GoTypeAny = BaseType & {
|
|
1504
|
+
kind: 'GoTypeAny';
|
|
1505
|
+
};
|
|
1506
|
+
type GoTypeUnknown = BaseType & {
|
|
1507
|
+
kind: 'GoTypeUnknown';
|
|
1508
|
+
};
|
|
1509
|
+
type GoTypeError = BaseType & {
|
|
1510
|
+
kind: 'GoTypeError';
|
|
1511
|
+
};
|
|
1512
|
+
type GoTypePointer = BaseType & {
|
|
1513
|
+
kind: 'GoTypePointer';
|
|
1514
|
+
inner: GoType;
|
|
1515
|
+
};
|
|
1516
|
+
//#endregion
|
|
1517
|
+
//#region src/types.d.ts
|
|
1518
|
+
type SearchSettings = {
|
|
1519
|
+
appId: string;
|
|
1520
|
+
searchKey: string;
|
|
1521
|
+
indexName: string;
|
|
1522
|
+
assistant?: string;
|
|
1523
|
+
};
|
|
1524
|
+
type SearchParams = {
|
|
1525
|
+
query: string;
|
|
1526
|
+
language?: DocsLanguage | null;
|
|
1527
|
+
kind?: QueryKindsType | null;
|
|
1528
|
+
};
|
|
1529
|
+
declare const QueryKinds: readonly ["all", "guide", "resource", "http_method", "model", "property"];
|
|
1530
|
+
type QueryKindsType = (typeof QueryKinds)[number];
|
|
1531
|
+
type IndexModel = {
|
|
1532
|
+
kind: 'model';
|
|
1533
|
+
title: string;
|
|
1534
|
+
children?: string[];
|
|
1535
|
+
ident?: string;
|
|
1536
|
+
};
|
|
1537
|
+
type IndexProperty = {
|
|
1538
|
+
kind: 'property';
|
|
1539
|
+
docstring?: string;
|
|
1540
|
+
type?: string;
|
|
1541
|
+
};
|
|
1542
|
+
type IndexResource = {
|
|
1543
|
+
kind: 'resource';
|
|
1544
|
+
title: string;
|
|
1545
|
+
Name: string;
|
|
1546
|
+
QualifiedName: string;
|
|
1547
|
+
};
|
|
1548
|
+
type IndexMethod = Pick<Method, 'kind' | 'summary' | 'description' | 'endpoint' | 'httpMethod'> & {
|
|
1549
|
+
title: string;
|
|
1550
|
+
qualified?: string;
|
|
1551
|
+
ident?: string;
|
|
1552
|
+
};
|
|
1553
|
+
declare const SearchableAttributes: readonly ["name", "title", "ident", "Name", "qualified", "QualifiedName", "endpoint", "summary", "description", "docstring"];
|
|
1554
|
+
declare const SearchableAttributesChat: string[];
|
|
1555
|
+
declare const SearchableAttributesProse: string[];
|
|
1556
|
+
type SearchAttributeNames = (typeof SearchableAttributes)[number];
|
|
1557
|
+
type RoutableJsonNode = Method | Model | Resource;
|
|
1558
|
+
type IndexEntry = Pick<RoutableJsonNode, 'name' | 'stainlessPath'> & (IndexProperty | IndexModel | IndexResource | IndexMethod) & {
|
|
1559
|
+
language: DocsLanguage;
|
|
1560
|
+
priority: number;
|
|
1561
|
+
crumbs: string[];
|
|
1562
|
+
};
|
|
1563
|
+
type ResultRecordType = IndexEntry & {
|
|
1564
|
+
objectID: string;
|
|
1565
|
+
_highlightResult: Record<SearchAttributeNames, {
|
|
1566
|
+
value: string;
|
|
1567
|
+
}>;
|
|
1568
|
+
};
|
|
1569
|
+
type ResultType = {
|
|
1570
|
+
hits: ResultRecordType[];
|
|
1571
|
+
facets?: Record<string, Record<string, number>>;
|
|
1572
|
+
nbHits: number;
|
|
1573
|
+
};
|
|
1574
|
+
type GuideResultType = {
|
|
1575
|
+
id: string;
|
|
1576
|
+
score: number;
|
|
1577
|
+
words: number[];
|
|
1578
|
+
data: {
|
|
1579
|
+
excerpt: string;
|
|
1580
|
+
url: string;
|
|
1581
|
+
word_count: number;
|
|
1582
|
+
meta: {
|
|
1583
|
+
title: string;
|
|
1584
|
+
};
|
|
1585
|
+
sub_results: {
|
|
1586
|
+
url: string;
|
|
1587
|
+
title: string;
|
|
1588
|
+
excerpt: string;
|
|
1589
|
+
}[];
|
|
1590
|
+
};
|
|
1591
|
+
};
|
|
1592
|
+
type ResultData = {
|
|
1593
|
+
items: Array<ResultRecordType | GuideResultType>;
|
|
1594
|
+
counts: Partial<Record<QueryKindsType, number>>;
|
|
1595
|
+
};
|
|
1596
|
+
type ProseIndexEntry = {
|
|
1597
|
+
id?: string;
|
|
1598
|
+
tag: string;
|
|
1599
|
+
content: string;
|
|
1600
|
+
source?: string;
|
|
1601
|
+
[additional: string]: unknown;
|
|
1602
|
+
};
|
|
1603
|
+
//#endregion
|
|
1604
|
+
export { SearchableAttributes as _, IndexProperty as a, Resource as b, QueryKinds as c, ResultRecordType as d, ResultType as f, SearchSettings as g, SearchParams as h, IndexModel as i, QueryKindsType as l, SearchAttributeNames as m, IndexEntry as n, IndexResource as o, RoutableJsonNode as p, IndexMethod as r, ProseIndexEntry as s, GuideResultType as t, ResultData as u, SearchableAttributesChat as v, Spec as x, SearchableAttributesProse as y };
|