@scalar/types 0.1.5 → 0.1.7
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/CHANGELOG.md +13 -0
- package/dist/api-reference/api-reference-configuration.d.ts +660 -28
- package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
- package/dist/api-reference/api-reference-configuration.js +34 -11
- package/dist/api-reference/api-reference-plugin.d.ts +61 -0
- package/dist/api-reference/api-reference-plugin.d.ts.map +1 -0
- package/dist/api-reference/api-reference-plugin.js +25 -0
- package/dist/api-reference/index.d.ts +1 -0
- package/dist/api-reference/index.d.ts.map +1 -1
- package/dist/entities/security-scheme.d.ts +8 -8
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAA;AA2EpF,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB;IAClC;;;;;;;;;;;;;;;;;QAiBI;;IAEJ;;;;;;;;;;;;;;;;;;;;QAoBI;;IAEJ;;;;;;OAMG;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;EAEH,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAQvE,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;IACvC;;QAEI;;IAEJ;;;;;QAKI;;IAEJ;;;;OAIG;;IAEH;;;;;;;;OAQG;;IAEH;;;;QAII;;QAvGJ;;;;;;;;;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iBAAiB,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,EAAE,CAAA;CACvD,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,4BAA4B,GACpC,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,OAAO,CAAC,oCAAoC,CAAC,EAAE,GAC/C,OAAO,CAAC,oCAAoC,CAAC,EAAE,CAAA;AAEnD,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,WAC7B,4BAA4B,KACnC,MAAM,IAAI,OAAO,CAAC,oCAAoC,CAC0C,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ApiReferencePluginSchema } from './api-reference-plugin.js';
|
|
2
3
|
import { migrateThemeVariables } from './helpers/migrate-theme-variables.js';
|
|
3
4
|
|
|
4
5
|
/** Available theme presets for the API reference */
|
|
@@ -127,7 +128,7 @@ const specConfigurationSchema = z.object({
|
|
|
127
128
|
*
|
|
128
129
|
* If none is passed, the title will be used.
|
|
129
130
|
*
|
|
130
|
-
* If no title is used, it
|
|
131
|
+
* If no title is used, it'll just use the index.
|
|
131
132
|
*
|
|
132
133
|
* @example 'scalar-galaxy'
|
|
133
134
|
*
|
|
@@ -150,7 +151,7 @@ const apiClientConfigurationSchema = z.object({
|
|
|
150
151
|
* Directly embed the OpenAPI document.
|
|
151
152
|
* Can be a string, object, function returning an object, or null.
|
|
152
153
|
*
|
|
153
|
-
* @remarks It
|
|
154
|
+
* @remarks It's recommended to pass a URL instead of content.
|
|
154
155
|
**/
|
|
155
156
|
content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),
|
|
156
157
|
/**
|
|
@@ -164,7 +165,7 @@ const apiClientConfigurationSchema = z.object({
|
|
|
164
165
|
*
|
|
165
166
|
* If none is passed, the title will be used.
|
|
166
167
|
*
|
|
167
|
-
* If no title is used, it
|
|
168
|
+
* If no title is used, it'll just use the index.
|
|
168
169
|
*
|
|
169
170
|
* @example 'scalar-galaxy'
|
|
170
171
|
*/
|
|
@@ -199,6 +200,8 @@ const apiClientConfigurationSchema = z.object({
|
|
|
199
200
|
theme: themeIdEnum.optional().default('default').catch('default'),
|
|
200
201
|
/** Integration type identifier */
|
|
201
202
|
_integration: integrationEnum.optional(),
|
|
203
|
+
/** onRequestSent is fired when a request is sent */
|
|
204
|
+
onRequestSent: z.function().args(z.string()).returns(z.void()).optional(),
|
|
202
205
|
});
|
|
203
206
|
const OLD_PROXY_URL = 'https://api.scalar.com/request-proxy';
|
|
204
207
|
const NEW_PROXY_URL = 'https://proxy.scalar.com';
|
|
@@ -214,6 +217,10 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(z.ob
|
|
|
214
217
|
* @deprecated Use proxyUrl instead
|
|
215
218
|
*/
|
|
216
219
|
proxy: z.string().optional(),
|
|
220
|
+
/**
|
|
221
|
+
* Plugins for the API reference
|
|
222
|
+
*/
|
|
223
|
+
plugins: z.array(ApiReferencePluginSchema).optional(),
|
|
217
224
|
/**
|
|
218
225
|
* Whether the spec input should show
|
|
219
226
|
* @default false
|
|
@@ -286,6 +293,18 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(z.ob
|
|
|
286
293
|
onServerChange: z.function().args(z.string()).returns(z.void()).optional(),
|
|
287
294
|
/** onDocumentSelect is fired when the config is selected */
|
|
288
295
|
onDocumentSelect: z.function().returns(z.void().or(z.void().promise())).optional(),
|
|
296
|
+
/** Callback fired when the reference is fully loaded */
|
|
297
|
+
onLoaded: z.function().returns(z.void().or(z.void().promise())).optional(),
|
|
298
|
+
/**
|
|
299
|
+
* onShowMore is fired when the user clicks the "Show more" button on the references
|
|
300
|
+
* @param tagId - The ID of the tag that was clicked
|
|
301
|
+
*/
|
|
302
|
+
onShowMore: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),
|
|
303
|
+
/**
|
|
304
|
+
* onSidebarClick is fired when the user clicks on a sidebar item
|
|
305
|
+
* @param href - The href of the sidebar item that was clicked
|
|
306
|
+
*/
|
|
307
|
+
onSidebarClick: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),
|
|
289
308
|
/**
|
|
290
309
|
* Route using paths instead of hashes, your server MUST support this
|
|
291
310
|
* @example '/standalone-api-reference/:custom(.*)?'
|
|
@@ -301,7 +320,9 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(z.ob
|
|
|
301
320
|
*/
|
|
302
321
|
generateHeadingSlug: z
|
|
303
322
|
.function()
|
|
304
|
-
.args(z.object({
|
|
323
|
+
.args(z.object({
|
|
324
|
+
slug: z.string().default('headingSlug'),
|
|
325
|
+
}))
|
|
305
326
|
.returns(z.string())
|
|
306
327
|
.optional(),
|
|
307
328
|
/**
|
|
@@ -312,7 +333,9 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(z.ob
|
|
|
312
333
|
*/
|
|
313
334
|
generateModelSlug: z
|
|
314
335
|
.function()
|
|
315
|
-
.args(z.object({
|
|
336
|
+
.args(z.object({
|
|
337
|
+
name: z.string().default('modelName'),
|
|
338
|
+
}))
|
|
316
339
|
.returns(z.string())
|
|
317
340
|
.optional(),
|
|
318
341
|
/**
|
|
@@ -323,7 +346,9 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(z.ob
|
|
|
323
346
|
*/
|
|
324
347
|
generateTagSlug: z
|
|
325
348
|
.function()
|
|
326
|
-
.args(z.object({
|
|
349
|
+
.args(z.object({
|
|
350
|
+
name: z.string().default('tagName'),
|
|
351
|
+
}))
|
|
327
352
|
.returns(z.string())
|
|
328
353
|
.optional(),
|
|
329
354
|
/**
|
|
@@ -356,8 +381,6 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(z.ob
|
|
|
356
381
|
}))
|
|
357
382
|
.returns(z.string())
|
|
358
383
|
.optional(),
|
|
359
|
-
/** Callback fired when the reference is fully loaded */
|
|
360
|
-
onLoaded: z.function().returns(z.void()).optional(),
|
|
361
384
|
/**
|
|
362
385
|
* To handle redirects, pass a function that will recieve:
|
|
363
386
|
* - The current path with hash if pathRouting is enabled
|
|
@@ -404,12 +427,12 @@ const migrateConfiguration = (_configuration) => {
|
|
|
404
427
|
const configuration = { ..._configuration };
|
|
405
428
|
// Remove the spec prefix
|
|
406
429
|
if (configuration.spec?.url) {
|
|
407
|
-
console.warn(`[DEPRECATED] You
|
|
430
|
+
console.warn(`[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`);
|
|
408
431
|
configuration.url = configuration.spec.url;
|
|
409
432
|
delete configuration.spec;
|
|
410
433
|
}
|
|
411
434
|
if (configuration.spec?.content) {
|
|
412
|
-
console.warn(`[DEPRECATED] You
|
|
435
|
+
console.warn(`[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`);
|
|
413
436
|
configuration.content = configuration.spec.content;
|
|
414
437
|
delete configuration.spec;
|
|
415
438
|
}
|
|
@@ -419,7 +442,7 @@ const migrateConfiguration = (_configuration) => {
|
|
|
419
442
|
}
|
|
420
443
|
// Migrate proxy URL
|
|
421
444
|
if (configuration.proxy) {
|
|
422
|
-
console.warn(`[DEPRECATED] You
|
|
445
|
+
console.warn(`[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`);
|
|
423
446
|
if (!configuration.proxyUrl) {
|
|
424
447
|
configuration.proxyUrl = configuration.proxy;
|
|
425
448
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OpenApiExtensionSchema: z.ZodObject<{
|
|
3
|
+
/**
|
|
4
|
+
* Name of specification extension property. Has to start with `x-`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```yaml
|
|
8
|
+
* x-custom-extension: foobar
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
/**
|
|
13
|
+
* Vue component to render the OpenAPI extension
|
|
14
|
+
*/
|
|
15
|
+
component: z.ZodUnknown;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
name: string;
|
|
18
|
+
component?: unknown;
|
|
19
|
+
}, {
|
|
20
|
+
name: string;
|
|
21
|
+
component?: unknown;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const ApiReferencePluginSchema: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
extensions: z.ZodArray<z.ZodObject<{
|
|
26
|
+
/**
|
|
27
|
+
* Name of specification extension property. Has to start with `x-`.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```yaml
|
|
31
|
+
* x-custom-extension: foobar
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
/**
|
|
36
|
+
* Vue component to render the OpenAPI extension
|
|
37
|
+
*/
|
|
38
|
+
component: z.ZodUnknown;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
name: string;
|
|
41
|
+
component?: unknown;
|
|
42
|
+
}, {
|
|
43
|
+
name: string;
|
|
44
|
+
component?: unknown;
|
|
45
|
+
}>, "many">;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
name: string;
|
|
48
|
+
extensions: {
|
|
49
|
+
name: string;
|
|
50
|
+
component?: unknown;
|
|
51
|
+
}[];
|
|
52
|
+
}, {
|
|
53
|
+
name: string;
|
|
54
|
+
extensions: {
|
|
55
|
+
name: string;
|
|
56
|
+
component?: unknown;
|
|
57
|
+
}[];
|
|
58
|
+
}>>;
|
|
59
|
+
export type SpecificationExtension = z.infer<typeof OpenApiExtensionSchema>;
|
|
60
|
+
export type ApiReferencePlugin = z.infer<typeof ApiReferencePluginSchema>;
|
|
61
|
+
//# sourceMappingURL=api-reference-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-reference-plugin.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,sBAAsB;IACjC;;;;;;;OAOG;;IAEH;;OAEG;;;;;;;;EAEH,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;QAfnC;;;;;;;WAOG;;QAEH;;WAEG;;;;;;;;;;;;;;;;;;;;;GASJ,CAAA;AAGD,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// TODO: Oh, do we really want to make this a dependency?
|
|
4
|
+
// import type { Component } from 'vue'
|
|
5
|
+
const OpenApiExtensionSchema = z.object({
|
|
6
|
+
/**
|
|
7
|
+
* Name of specification extension property. Has to start with `x-`.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```yaml
|
|
11
|
+
* x-custom-extension: foobar
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
name: z.string().regex(/^x-/),
|
|
15
|
+
/**
|
|
16
|
+
* Vue component to render the OpenAPI extension
|
|
17
|
+
*/
|
|
18
|
+
component: z.unknown(),
|
|
19
|
+
});
|
|
20
|
+
const ApiReferencePluginSchema = z.function().returns(z.object({
|
|
21
|
+
name: z.string(),
|
|
22
|
+
extensions: z.array(OpenApiExtensionSchema),
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
export { ApiReferencePluginSchema, OpenApiExtensionSchema };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { type ApiClientConfiguration, type ApiReferenceConfiguration, type ApiReferenceConfigurationWithSources, type AnyApiReferenceConfiguration, type SpecConfiguration, apiClientConfigurationSchema, apiReferenceConfigurationSchema, specConfigurationSchema, isConfigurationWithSources, } from './api-reference-configuration.ts';
|
|
2
2
|
export { type HtmlRenderingConfiguration, htmlRenderingConfigurationSchema, } from './html-rendering-configuration.ts';
|
|
3
3
|
export { migrateThemeVariables } from './helpers/migrate-theme-variables.ts';
|
|
4
|
+
export type { SpecificationExtension, ApiReferencePlugin, } from './api-reference-plugin.ts';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-reference/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,4BAA4B,EAC5B,+BAA+B,EAC/B,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EACL,KAAK,0BAA0B,EAC/B,gCAAgC,GACjC,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-reference/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,4BAA4B,EAC5B,+BAA+B,EAC/B,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EACL,KAAK,0BAA0B,EAC/B,gCAAgC,GACjC,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAE5E,YAAY,EACV,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,2BAA2B,CAAA"}
|
|
@@ -15,20 +15,20 @@ export declare const securityApiKeySchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
15
15
|
}>, {
|
|
16
16
|
value: z.ZodDefault<z.ZodString>;
|
|
17
17
|
}>, "strip", z.ZodTypeAny, {
|
|
18
|
+
name: string;
|
|
18
19
|
type: "apiKey";
|
|
19
20
|
value: string;
|
|
20
21
|
uid: string & z.BRAND<"securityScheme">;
|
|
21
22
|
nameKey: string;
|
|
22
|
-
name: string;
|
|
23
23
|
in: "cookie" | "query" | "header";
|
|
24
24
|
description?: string | undefined;
|
|
25
25
|
}, {
|
|
26
26
|
type: "apiKey";
|
|
27
|
+
name?: string | undefined;
|
|
27
28
|
value?: string | undefined;
|
|
28
29
|
description?: string | undefined;
|
|
29
30
|
uid?: string | undefined;
|
|
30
31
|
nameKey?: string | undefined;
|
|
31
|
-
name?: string | undefined;
|
|
32
32
|
in?: unknown;
|
|
33
33
|
}>;
|
|
34
34
|
export type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>;
|
|
@@ -520,14 +520,14 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
520
520
|
/** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
|
|
521
521
|
in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>>;
|
|
522
522
|
}>, "strip", z.ZodTypeAny, {
|
|
523
|
-
type: "apiKey";
|
|
524
523
|
name: string;
|
|
524
|
+
type: "apiKey";
|
|
525
525
|
in: "cookie" | "query" | "header";
|
|
526
526
|
description?: string | undefined;
|
|
527
527
|
}, {
|
|
528
528
|
type: "apiKey";
|
|
529
|
-
description?: string | undefined;
|
|
530
529
|
name?: string | undefined;
|
|
530
|
+
description?: string | undefined;
|
|
531
531
|
in?: unknown;
|
|
532
532
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
533
533
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -967,20 +967,20 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodUnion<[z.ZodObject<
|
|
|
967
967
|
}>, {
|
|
968
968
|
value: z.ZodDefault<z.ZodString>;
|
|
969
969
|
}>, "strip", z.ZodTypeAny, {
|
|
970
|
+
name: string;
|
|
970
971
|
type: "apiKey";
|
|
971
972
|
value: string;
|
|
972
973
|
uid: string & z.BRAND<"securityScheme">;
|
|
973
974
|
nameKey: string;
|
|
974
|
-
name: string;
|
|
975
975
|
in: "cookie" | "query" | "header";
|
|
976
976
|
description?: string | undefined;
|
|
977
977
|
}, {
|
|
978
978
|
type: "apiKey";
|
|
979
|
+
name?: string | undefined;
|
|
979
980
|
value?: string | undefined;
|
|
980
981
|
description?: string | undefined;
|
|
981
982
|
uid?: string | undefined;
|
|
982
983
|
nameKey?: string | undefined;
|
|
983
|
-
name?: string | undefined;
|
|
984
984
|
in?: unknown;
|
|
985
985
|
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
986
986
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1438,11 +1438,11 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodUnion<[z.ZodObject<
|
|
|
1438
1438
|
} | undefined;
|
|
1439
1439
|
} | undefined;
|
|
1440
1440
|
}>]>, {
|
|
1441
|
+
name: string;
|
|
1441
1442
|
type: "apiKey";
|
|
1442
1443
|
value: string;
|
|
1443
1444
|
uid: string & z.BRAND<"securityScheme">;
|
|
1444
1445
|
nameKey: string;
|
|
1445
|
-
name: string;
|
|
1446
1446
|
in: "cookie" | "query" | "header";
|
|
1447
1447
|
description?: string | undefined;
|
|
1448
1448
|
} | {
|
|
@@ -1516,11 +1516,11 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodUnion<[z.ZodObject<
|
|
|
1516
1516
|
'x-default-scopes'?: string | string[] | undefined;
|
|
1517
1517
|
}, {
|
|
1518
1518
|
type: "apiKey";
|
|
1519
|
+
name?: string | undefined;
|
|
1519
1520
|
value?: string | undefined;
|
|
1520
1521
|
description?: string | undefined;
|
|
1521
1522
|
uid?: string | undefined;
|
|
1522
1523
|
nameKey?: string | undefined;
|
|
1523
|
-
name?: string | undefined;
|
|
1524
1524
|
in?: unknown;
|
|
1525
1525
|
} | {
|
|
1526
1526
|
type: "http";
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"scalar",
|
|
17
17
|
"references"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.1.
|
|
19
|
+
"version": "0.1.7",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
@@ -28,30 +28,30 @@
|
|
|
28
28
|
"types": "./dist/index.d.ts",
|
|
29
29
|
"default": "./dist/index.js"
|
|
30
30
|
},
|
|
31
|
-
"./
|
|
32
|
-
"import": "./dist/
|
|
33
|
-
"types": "./dist/
|
|
34
|
-
"default": "./dist/
|
|
31
|
+
"./api-reference": {
|
|
32
|
+
"import": "./dist/api-reference/index.js",
|
|
33
|
+
"types": "./dist/api-reference/index.d.ts",
|
|
34
|
+
"default": "./dist/api-reference/index.js"
|
|
35
35
|
},
|
|
36
|
-
"./
|
|
37
|
-
"import": "./dist/
|
|
38
|
-
"types": "./dist/
|
|
39
|
-
"default": "./dist/
|
|
36
|
+
"./entities": {
|
|
37
|
+
"import": "./dist/entities/index.js",
|
|
38
|
+
"types": "./dist/entities/index.d.ts",
|
|
39
|
+
"default": "./dist/entities/index.js"
|
|
40
40
|
},
|
|
41
41
|
"./legacy": {
|
|
42
42
|
"import": "./dist/legacy/index.js",
|
|
43
43
|
"types": "./dist/legacy/index.d.ts",
|
|
44
44
|
"default": "./dist/legacy/index.js"
|
|
45
45
|
},
|
|
46
|
-
"./
|
|
47
|
-
"import": "./dist/
|
|
48
|
-
"types": "./dist/
|
|
49
|
-
"default": "./dist/
|
|
46
|
+
"./snippetz": {
|
|
47
|
+
"import": "./dist/snippetz/index.js",
|
|
48
|
+
"types": "./dist/snippetz/index.d.ts",
|
|
49
|
+
"default": "./dist/snippetz/index.js"
|
|
50
50
|
},
|
|
51
|
-
"./
|
|
52
|
-
"import": "./dist/
|
|
53
|
-
"types": "./dist/
|
|
54
|
-
"default": "./dist/
|
|
51
|
+
"./utils": {
|
|
52
|
+
"import": "./dist/utils/index.js",
|
|
53
|
+
"types": "./dist/utils/index.d.ts",
|
|
54
|
+
"default": "./dist/utils/index.js"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"files": [
|