expresso-macchiato 1.0.0-dev.7 → 1.0.0-dev.9

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.
@@ -1,375 +0,0 @@
1
- export interface Info {
2
- title: string;
3
- version: string;
4
- description?: string | undefined;
5
- termsOfService?: string | undefined;
6
- contact?: Contact | undefined;
7
- license?: License | undefined;
8
- }
9
-
10
- export interface Contact {
11
- name?: string | undefined;
12
- email?: string | undefined;
13
- url?: string | undefined;
14
- }
15
-
16
- export interface License {
17
- name: string;
18
- url?: string | undefined;
19
- }
20
-
21
- export interface ExternalDocs {
22
- url: string;
23
- description?: string | undefined;
24
- }
25
-
26
- export interface Tag {
27
- name: string;
28
- description?: string | undefined;
29
- externalDocs?: ExternalDocs | undefined;
30
- }
31
-
32
- export interface Header extends BaseSchema {
33
- type: ParameterType;
34
- }
35
-
36
- // ----------------------------- Parameter -----------------------------------
37
-
38
- export type ParameterType = "string" | "number" | "integer" | "boolean" | "array" | "object" | "file" | "date";
39
-
40
- export type BaseParameter = {
41
- name: string;
42
- in: "body" | "query" | "path" | "header" | "formData";
43
- required?: boolean | undefined;
44
- description?: string | undefined;
45
- };
46
-
47
- export type BodyParameter = BaseParameter & {
48
- in: "body";
49
- schema?: Schema | undefined;
50
- };
51
-
52
- export type GenericFormat = {
53
- type?: ParameterType | undefined;
54
- format?: string | undefined;
55
- };
56
-
57
- export type IntegerFormat = {
58
- type: "integer";
59
- format?: "int32" | "int64" | undefined;
60
- };
61
-
62
- export type NumberFormat = {
63
- type: "number";
64
- format?: "float" | "double" | undefined;
65
- };
66
-
67
- export type StringFormat = {
68
- type: "string";
69
- format?: "" | "byte" | "binary" | "date" | "date-time" | "password" | undefined;
70
- };
71
-
72
- export type SchemaFormatConstraints = GenericFormat | IntegerFormat | NumberFormat | StringFormat;
73
- export type BaseFormatContrainedParameter = BaseParameter & SchemaFormatConstraints;
74
- export type ParameterCollectionFormat = "csv" | "ssv" | "tsv" | "pipes" | "multi";
75
-
76
- export type QueryParameter =
77
- & BaseFormatContrainedParameter
78
- & BaseSchema
79
- & {
80
- in: "query";
81
- allowEmptyValue?: boolean | undefined;
82
- collectionFormat?: ParameterCollectionFormat | undefined;
83
- };
84
-
85
- export type PathParameter =
86
- & BaseFormatContrainedParameter
87
- & BaseSchema
88
- & {
89
- in: "path";
90
- required: boolean;
91
- };
92
-
93
- export type HeaderParameter =
94
- & BaseFormatContrainedParameter
95
- & BaseSchema
96
- & {
97
- in: "header";
98
- };
99
-
100
- export type FormDataParameter =
101
- & BaseFormatContrainedParameter
102
- & BaseSchema
103
- & {
104
- in: "formData";
105
- type: ParameterType | "file";
106
- allowEmptyValue?: boolean | undefined;
107
- collectionFormat?: ParameterCollectionFormat | undefined;
108
- };
109
-
110
- export type Parameter = { like?:boolean} & (BodyParameter | FormDataParameter | QueryParameter | PathParameter | HeaderParameter);
111
-
112
- // ------------------------------- Path --------------------------------------
113
- export interface Path {
114
- $ref?: string | undefined;
115
- get?: Operation | undefined;
116
- put?: Operation | undefined;
117
- post?: Operation | undefined;
118
- delete?: Operation | undefined;
119
- options?: Operation | undefined;
120
- head?: Operation | undefined;
121
- patch?: Operation | undefined;
122
- parameters?: Array<Parameter | Reference> | undefined;
123
- }
124
-
125
-
126
-
127
- export interface DynamicSwaggerPath {
128
- $ref?: string | undefined;
129
- get?: DynamicSwaggerOperation | undefined;
130
- put?: DynamicSwaggerOperationBody | undefined;
131
- post?: DynamicSwaggerOperationBody | undefined;
132
- delete?: DynamicSwaggerOperationBody | undefined;
133
- options?: DynamicSwaggerOperation | undefined;
134
- head?: DynamicSwaggerOperation | undefined;
135
- patch?: DynamicSwaggerOperation | undefined;
136
- parameters?: Array<Parameter | Reference> | undefined;
137
- }
138
-
139
-
140
-
141
- // ----------------------------- Components -----------------------------------
142
- export interface Components {
143
- schemas?: { [schemaName: string]: SchemaV3 };
144
- parameters?: { [parameterName: string]: Parameter };
145
- securitySchemes?:Record<string, {
146
- type: 'http',
147
- scheme: 'bearer',
148
- bearerFormat?: 'JWT'
149
- }>
150
- }
151
-
152
-
153
-
154
- // ----------------------------- Operation -----------------------------------
155
- export interface Operation {
156
- responses: { [responseName: string]: Response | Reference };
157
- summary?: string | undefined;
158
- description?: string | undefined;
159
- externalDocs?: ExternalDocs | undefined;
160
- operationId?: string | undefined;
161
- produces?: string[] | undefined;
162
- consumes?: string[] | undefined;
163
- parameters?: Array<Parameter | Reference> | undefined;
164
- schemes?: string[] | undefined;
165
- deprecated?: boolean | undefined;
166
- security?: Array<{ [securityDefinitionName: string]: string[] }> | undefined;
167
- tags?: string[] | undefined;
168
- requestBody?:RequestBodyOperation
169
- }
170
-
171
- export interface DynamicSwaggerOperation {
172
- responses: { [responseName: string]: Response | Reference };
173
- summary?: string | undefined;
174
- description?: string | undefined;
175
- operationId?: string | undefined;
176
- parameters?: Array<Parameter | Reference> | undefined;
177
- deprecated?: boolean | undefined;
178
- security?: Array<{ [securityDefinitionName: string]: string[] }> | undefined;
179
- tags?: string[] | undefined;
180
- }
181
- export interface DynamicSwaggerOperationBody {
182
- responses: { [responseName: string]: Response | Reference };
183
- summary?: string | undefined;
184
- description?: string | undefined;
185
- operationId?: string | undefined;
186
- parameters?: Array<Parameter | Reference> | undefined;
187
- deprecated?: boolean | undefined;
188
- security?: Array<{ [securityDefinitionName: string]: string[] }> | undefined;
189
- tags?: string[] | undefined;
190
- requestBody?:{
191
- required:boolean,
192
- description?:string,
193
- schemaName:string,
194
- schema?:{ [key:string]: SchemaV3 },
195
- comType?:'multipart/form-data' | 'application/json' | undefined;
196
- }
197
- }
198
-
199
-
200
-
201
-
202
- export type RequestBodyOperation = {
203
- description?: string;
204
- required:boolean;
205
- content: {
206
- "application/json": {
207
- schema: { $ref: string }
208
- }
209
- }
210
- | {
211
- "multipart/form-data": {
212
- schema: { $ref: string }
213
- }
214
- };
215
- }
216
- export type DynamicSwaggerRequestBodyOperation = {
217
- description?: string;
218
- required:boolean;
219
- content: {
220
- "application/json": {
221
- schema: { $ref: string }
222
- }
223
- }
224
- }
225
- // ----------------------------- Reference -----------------------------------
226
- export interface Reference {
227
- $ref: string;
228
- }
229
-
230
- // ----------------------------- Response ------------------------------------
231
- export interface Response {
232
- description: string;
233
- schema?: Schema | undefined;
234
- headers?: { [headerName: string]: Header } | undefined;
235
- examples?: { [exampleName: string]: {} } | undefined;
236
- }
237
-
238
- // ------------------------------ Schema -------------------------------------
239
- export type BaseSchema = {
240
- type?: ParameterType | undefined;
241
- format?: string | undefined;
242
- title?: string | undefined;
243
- description?: string | undefined;
244
- default?: any;
245
- multipleOf?: number | undefined;
246
- maximum?: number | undefined;
247
- exclusiveMaximum?: boolean | undefined;
248
- minimum?: number | undefined;
249
- exclusiveMinimum?: boolean | undefined;
250
- maxLength?: number | undefined;
251
- minLength?: number | undefined;
252
- pattern?: string | undefined;
253
- maxItems?: number | undefined;
254
- minItems?: number | undefined;
255
- uniqueItems?: boolean | undefined;
256
- maxProperties?: number | undefined;
257
- minProperties?: number | undefined;
258
- enum?: any[] | undefined;
259
- items?: Schema | Schema[] | undefined;
260
- };
261
-
262
- export interface Schema extends BaseSchema {
263
- $ref?: string | undefined;
264
- allOf?: Schema[] | undefined;
265
- additionalProperties?: Schema | boolean | undefined;
266
- properties?: { [propertyName: string]: Schema } | undefined;
267
- discriminator?: string | undefined;
268
- readOnly?: boolean | undefined;
269
- xml?: XML | undefined;
270
- externalDocs?: ExternalDocs | undefined;
271
- example?: any;
272
- required?:boolean;
273
- }
274
-
275
- export interface SchemaV3 extends BaseSchema {
276
- type:"object"
277
- properties?: { [propertyName: string]: Schema } | undefined;
278
- required?:boolean;
279
- }
280
-
281
- export interface XML {
282
- name?: string | undefined;
283
- namespace?: string | undefined;
284
- prefix?: string | undefined;
285
- attribute?: boolean | undefined;
286
- wrapped?: boolean | undefined;
287
- }
288
-
289
- // ----------------------------- Security ------------------------------------
290
- export interface BaseSecurity {
291
- type: "basic" | "apiKey" | "oauth2";
292
- description?: string | undefined;
293
- }
294
-
295
- export interface BasicAuthenticationSecurity extends BaseSecurity {
296
- type: "basic";
297
- }
298
-
299
- export interface ApiKeySecurity extends BaseSecurity {
300
- type: "apiKey";
301
- name: string;
302
- in: "query" | "header";
303
- }
304
-
305
- export interface BaseOAuthSecurity extends BaseSecurity {
306
- type: "oauth2";
307
- flow: "accessCode" | "application" | "implicit" | "password";
308
- scopes?: OAuthScope | undefined;
309
- }
310
-
311
- export interface OAuth2ImplicitSecurity extends BaseOAuthSecurity {
312
- type: "oauth2";
313
- flow: "implicit";
314
- authorizationUrl: string;
315
- }
316
-
317
- export interface OAuth2PasswordSecurity extends BaseOAuthSecurity {
318
- type: "oauth2";
319
- flow: "password";
320
- tokenUrl: string;
321
- }
322
-
323
- export interface OAuth2ApplicationSecurity extends BaseOAuthSecurity {
324
- type: "oauth2";
325
- flow: "application";
326
- tokenUrl: string;
327
- }
328
-
329
- export interface OAuth2AccessCodeSecurity extends BaseOAuthSecurity {
330
- type: "oauth2";
331
- flow: "accessCode";
332
- tokenUrl: string;
333
- authorizationUrl: string;
334
- }
335
-
336
- export interface OAuthScope {
337
- [scopeName: string]: string;
338
- }
339
-
340
- export type Security =
341
- | BasicAuthenticationSecurity
342
- | OAuth2AccessCodeSecurity
343
- | OAuth2ApplicationSecurity
344
- | OAuth2ImplicitSecurity
345
- | OAuth2PasswordSecurity
346
- | ApiKeySecurity;
347
-
348
- // --------------------------------- Spec ------------------------------------
349
- export type Server = {
350
- url:string;
351
- description?:string;
352
- }
353
-
354
-
355
- export interface Spec {
356
- openapi:"3.0.4";
357
- info: Info;
358
- servers: Server[];
359
- paths: { [pathName: string]: Path };
360
- tags?: Tag[];
361
- components?:Components;
362
-
363
- externalDocs?: ExternalDocs | undefined;
364
- host?: string | undefined;
365
- basePath?: string | undefined;
366
- schemes?: string[] | undefined;
367
- consumes?: string[] | undefined;
368
- produces?: string[] | undefined;
369
- definitions?: { [definitionsName: string]: Schema } | undefined;
370
- parameters?: { [parameterName: string]: BodyParameter | QueryParameter } | undefined;
371
- responses?: { [responseName: string]: Response } | undefined;
372
- security?: Array<{ [securityDefinitionName: string]: string[] }> | undefined;
373
- securityDefinitions?: { [securityDefinitionName: string]: Security } | undefined;
374
-
375
- }