@scalar/oas-utils 0.2.43 → 0.2.45
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 +22 -0
- package/dist/diff/diff.d.ts +13 -0
- package/dist/diff/diff.d.ts.map +1 -0
- package/dist/diff/index.d.ts +1 -0
- package/dist/diff/index.d.ts.map +1 -0
- package/dist/diff/index.js +1 -0
- package/dist/entities/{workspace/cookie → cookie}/cookie.d.ts +1 -17
- package/dist/entities/cookie/cookie.d.ts.map +1 -0
- package/dist/entities/{workspace/cookie → cookie}/cookie.js +1 -4
- package/dist/entities/cookie/index.d.ts.map +1 -0
- package/dist/entities/cookie/index.js +1 -0
- package/dist/entities/environment/environment.d.ts +24 -0
- package/dist/entities/environment/environment.d.ts.map +1 -0
- package/dist/entities/environment/environment.js +12 -0
- package/dist/entities/environment/index.d.ts.map +1 -0
- package/dist/entities/environment/index.js +1 -0
- package/dist/entities/{workspace/consts/hot-keys.d.ts → hotkeys/hotkeys.d.ts} +2 -2
- package/dist/entities/hotkeys/hotkeys.d.ts.map +1 -0
- package/dist/entities/{workspace/consts/hot-keys.js → hotkeys/hotkeys.js} +1 -0
- package/dist/entities/hotkeys/index.d.ts +2 -0
- package/dist/entities/hotkeys/index.d.ts.map +1 -0
- package/dist/entities/hotkeys/index.js +1 -0
- package/dist/entities/index.d.ts +1 -1
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +1 -1
- package/dist/entities/shared/index.d.ts.map +1 -0
- package/dist/entities/shared/utility.d.ts.map +1 -0
- package/dist/entities/spec/collection.d.ts +489 -0
- package/dist/entities/spec/collection.d.ts.map +1 -0
- package/dist/entities/spec/collection.js +63 -0
- package/dist/entities/spec/index.d.ts +10 -0
- package/dist/entities/spec/index.d.ts.map +1 -0
- package/dist/entities/spec/index.js +7 -0
- package/dist/entities/spec/parameters.d.ts +42 -0
- package/dist/entities/spec/parameters.d.ts.map +1 -0
- package/dist/entities/spec/parameters.js +30 -0
- package/dist/entities/spec/request-examples.d.ts +916 -0
- package/dist/entities/spec/request-examples.d.ts.map +1 -0
- package/dist/entities/spec/request-examples.js +168 -0
- package/dist/entities/spec/requests.d.ts +317 -0
- package/dist/entities/spec/requests.d.ts.map +1 -0
- package/dist/entities/{workspace/spec → spec}/requests.js +56 -32
- package/dist/entities/spec/security.d.ts +964 -0
- package/dist/entities/spec/security.d.ts.map +1 -0
- package/dist/entities/spec/security.js +222 -0
- package/dist/entities/spec/server.d.ts +82 -0
- package/dist/entities/spec/server.d.ts.map +1 -0
- package/dist/entities/{workspace/server → spec}/server.js +11 -13
- package/dist/entities/spec/spec-objects.d.ts +279 -0
- package/dist/entities/spec/spec-objects.d.ts.map +1 -0
- package/dist/entities/{workspace/collection/collection.js → spec/spec-objects.js} +21 -45
- package/dist/entities/workspace/index.js +1 -1
- package/dist/entities/workspace/workspace.d.ts +24 -43
- package/dist/entities/workspace/workspace.d.ts.map +1 -1
- package/dist/entities/workspace/workspace.js +6 -7
- package/dist/helpers/httpMethods.d.ts +16 -82
- package/dist/helpers/httpMethods.d.ts.map +1 -1
- package/dist/helpers/httpMethods.js +45 -41
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +4 -2
- package/dist/helpers/local-storage.d.ts +16 -0
- package/dist/helpers/local-storage.d.ts.map +1 -0
- package/dist/helpers/local-storage.js +17 -0
- package/dist/helpers/redirectToProxy.d.ts +2 -0
- package/dist/helpers/redirectToProxy.d.ts.map +1 -1
- package/dist/helpers/redirectToProxy.js +6 -7
- package/dist/helpers/regexHelpers.d.ts +3 -0
- package/dist/helpers/regexHelpers.d.ts.map +1 -0
- package/dist/helpers/regexHelpers.js +4 -0
- package/dist/helpers/schema-model.d.ts +2 -2
- package/dist/helpers/schema-model.d.ts.map +1 -1
- package/dist/helpers/schema-model.js +11 -17
- package/dist/migrations/data-version.d.ts +12 -0
- package/dist/migrations/data-version.d.ts.map +1 -0
- package/dist/migrations/data-version.js +13 -0
- package/dist/migrations/generate-types.d.ts +2 -0
- package/dist/migrations/generate-types.d.ts.map +1 -0
- package/dist/migrations/index.d.ts +4 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +3 -0
- package/dist/migrations/local-storage.d.ts +8 -0
- package/dist/migrations/local-storage.d.ts.map +1 -0
- package/dist/migrations/local-storage.js +36 -0
- package/dist/migrations/migrator.d.ts +4 -0
- package/dist/migrations/migrator.d.ts.map +1 -0
- package/dist/migrations/migrator.js +40 -0
- package/dist/migrations/semver.d.ts +5 -0
- package/dist/migrations/semver.d.ts.map +1 -0
- package/dist/migrations/semver.js +25 -0
- package/dist/migrations/v-0.0.0/index.d.ts +2 -0
- package/dist/migrations/v-0.0.0/index.d.ts.map +1 -0
- package/dist/migrations/v-0.0.0/index.js +1 -0
- package/dist/migrations/v-0.0.0/types.generated.d.ts +347 -0
- package/dist/migrations/v-0.0.0/types.generated.d.ts.map +1 -0
- package/dist/migrations/v-2.1.0/index.d.ts +3 -0
- package/dist/migrations/v-2.1.0/index.d.ts.map +1 -0
- package/dist/migrations/v-2.1.0/index.js +1 -0
- package/dist/migrations/v-2.1.0/migration.d.ts +334 -0
- package/dist/migrations/v-2.1.0/migration.d.ts.map +1 -0
- package/dist/migrations/v-2.1.0/migration.js +249 -0
- package/dist/migrations/v-2.1.0/types.generated.d.ts +42 -0
- package/dist/migrations/v-2.1.0/types.generated.d.ts.map +1 -0
- package/dist/spec-getters/getExampleFromSchema.d.ts.map +1 -1
- package/dist/spec-getters/getExampleFromSchema.js +21 -8
- package/dist/spec-getters/getParametersFromOperation.d.ts +1 -1
- package/dist/spec-getters/getParametersFromOperation.d.ts.map +1 -1
- package/dist/spec-getters/getParametersFromOperation.js +8 -7
- package/dist/spec-getters/getRequestBodyFromOperation.d.ts +12 -40
- package/dist/spec-getters/getRequestBodyFromOperation.d.ts.map +1 -1
- package/dist/spec-getters/getRequestBodyFromOperation.js +34 -23
- package/dist/spec-getters/getRequestFromOperation.d.ts.map +1 -1
- package/dist/spec-getters/getRequestFromOperation.js +1 -2
- package/dist/spec-getters/getServerVariableExamples.d.ts +4 -0
- package/dist/spec-getters/getServerVariableExamples.d.ts.map +1 -0
- package/dist/spec-getters/getServerVariableExamples.js +12 -0
- package/dist/spec-getters/index.d.ts +1 -0
- package/dist/spec-getters/index.d.ts.map +1 -1
- package/dist/spec-getters/index.js +1 -0
- package/dist/transforms/export-spec.d.ts +68 -0
- package/dist/transforms/export-spec.d.ts.map +1 -0
- package/dist/transforms/import-spec.d.ts +20 -68
- package/dist/transforms/import-spec.d.ts.map +1 -1
- package/dist/transforms/import-spec.js +209 -126
- package/package.json +43 -37
- package/dist/entities/workspace/collection/collection.d.ts +0 -330
- package/dist/entities/workspace/collection/collection.d.ts.map +0 -1
- package/dist/entities/workspace/collection/index.d.ts +0 -2
- package/dist/entities/workspace/collection/index.d.ts.map +0 -1
- package/dist/entities/workspace/collection/index.js +0 -1
- package/dist/entities/workspace/consts/hot-keys.d.ts.map +0 -1
- package/dist/entities/workspace/consts/index.d.ts +0 -2
- package/dist/entities/workspace/consts/index.d.ts.map +0 -1
- package/dist/entities/workspace/consts/index.js +0 -1
- package/dist/entities/workspace/cookie/cookie.d.ts.map +0 -1
- package/dist/entities/workspace/cookie/index.d.ts.map +0 -1
- package/dist/entities/workspace/cookie/index.js +0 -1
- package/dist/entities/workspace/environment/environment.d.ts +0 -55
- package/dist/entities/workspace/environment/environment.d.ts.map +0 -1
- package/dist/entities/workspace/environment/environment.js +0 -23
- package/dist/entities/workspace/environment/index.d.ts.map +0 -1
- package/dist/entities/workspace/environment/index.js +0 -1
- package/dist/entities/workspace/folder/folder.d.ts +0 -36
- package/dist/entities/workspace/folder/folder.d.ts.map +0 -1
- package/dist/entities/workspace/folder/folder.js +0 -21
- package/dist/entities/workspace/folder/index.d.ts +0 -2
- package/dist/entities/workspace/folder/index.d.ts.map +0 -1
- package/dist/entities/workspace/folder/index.js +0 -1
- package/dist/entities/workspace/security/index.d.ts +0 -3
- package/dist/entities/workspace/security/index.d.ts.map +0 -1
- package/dist/entities/workspace/security/index.js +0 -2
- package/dist/entities/workspace/security/security-requirement.d.ts +0 -13
- package/dist/entities/workspace/security/security-requirement.d.ts.map +0 -1
- package/dist/entities/workspace/security/security-requirement.js +0 -15
- package/dist/entities/workspace/security/security-schemes.d.ts +0 -696
- package/dist/entities/workspace/security/security-schemes.d.ts.map +0 -1
- package/dist/entities/workspace/security/security-schemes.js +0 -139
- package/dist/entities/workspace/server/index.d.ts +0 -2
- package/dist/entities/workspace/server/index.d.ts.map +0 -1
- package/dist/entities/workspace/server/index.js +0 -1
- package/dist/entities/workspace/server/server.d.ts +0 -91
- package/dist/entities/workspace/server/server.d.ts.map +0 -1
- package/dist/entities/workspace/shared/index.d.ts.map +0 -1
- package/dist/entities/workspace/shared/utility.d.ts.map +0 -1
- package/dist/entities/workspace/spec/components.d.ts +0 -3
- package/dist/entities/workspace/spec/components.d.ts.map +0 -1
- package/dist/entities/workspace/spec/index.d.ts +0 -5
- package/dist/entities/workspace/spec/index.d.ts.map +0 -1
- package/dist/entities/workspace/spec/index.js +0 -2
- package/dist/entities/workspace/spec/parameters.d.ts +0 -16
- package/dist/entities/workspace/spec/parameters.d.ts.map +0 -1
- package/dist/entities/workspace/spec/refs.d.ts +0 -30
- package/dist/entities/workspace/spec/refs.d.ts.map +0 -1
- package/dist/entities/workspace/spec/refs.js +0 -9
- package/dist/entities/workspace/spec/request-examples.d.ts +0 -1573
- package/dist/entities/workspace/spec/request-examples.d.ts.map +0 -1
- package/dist/entities/workspace/spec/request-examples.js +0 -96
- package/dist/entities/workspace/spec/requests.d.ts +0 -181
- package/dist/entities/workspace/spec/requests.d.ts.map +0 -1
- package/dist/entities/workspace/spec/spec.d.ts +0 -18
- package/dist/entities/workspace/spec/spec.d.ts.map +0 -1
- package/dist/entities/workspace/spec/spec.js +0 -8
- /package/dist/entities/{workspace/cookie → cookie}/index.d.ts +0 -0
- /package/dist/entities/{workspace/environment → environment}/index.d.ts +0 -0
- /package/dist/entities/{workspace/shared → shared}/index.d.ts +0 -0
- /package/dist/entities/{workspace/shared → shared}/index.js +0 -0
- /package/dist/entities/{workspace/shared → shared}/utility.d.ts +0 -0
- /package/dist/entities/{workspace/shared → shared}/utility.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"security-schemes.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/security/security-schemes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgBvB,eAAO,MAAM,sBAAsB,wCAAyC,CAAA;AAE5E,QAAA,MAAM,oBAAoB;;IARxB,0EAA0E;;;;;IAU1E,8EAA8E;;IAE9E,6FAA6F;;;;;;;;;;;;;;;;;;;EAG7F,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AA+FvE,QAAA,MAAM,oBAAoB;;IAhHxB,0EAA0E;;;;;IAkH1E,6FAA6F;;QA3D7F;;;WAGG;;QAEH;;;WAGG;;QAQH,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;QAhBpC;;;WAGG;;QAEH;;;WAGG;;QAQH,oCAAoC;;;;;;QAiBhC,eAAe;;QAEf,eAAe;;;;;;;;;;;;;;;;;;;;;;;;QAnCnB;;;WAGG;;QAEH;;;WAGG;;QAQH,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;QAhBpC;;;WAGG;;QAEH;;;WAGG;;QAQH,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CpC,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAWvE,QAAA,MAAM,cAAc;;IAjIlB,0EAA0E;;;;;IAU1E,8EAA8E;;IAE9E,6FAA6F;;;;;;;;;;;;;;;;;;;;;IAZ7F,0EAA0E;;;;;IAqB1E;;;OAGG;;IAEH;;;;OAIG;;IAKH,eAAe;;IAEf,eAAe;;;;;;;;;;;;;;;;;;;;;;IArCf,0EAA0E;;;;;IAkH1E,6FAA6F;;QA3D7F;;;WAGG;;QAEH;;;WAGG;;QAQH,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;QAhBpC;;;WAGG;;QAEH;;;WAGG;;QAQH,oCAAoC;;;;;;QAiBhC,eAAe;;QAEf,eAAe;;;;;;;;;;;;;;;;;;;;;;;;QAnCnB;;;WAGG;;QAEH;;;WAGG;;QAQH,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;QAhBpC;;;WAGG;;QAEH;;;WAGG;;QAQH,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAvEpC,0EAA0E;;;;;IA0H1E;;;OAGG;;;;;;;;;;;;;;IASH,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAC3D,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAElE,2CAA2C;AAC3C,eAAO,MAAM,oBAAoB,YAAa,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAShE,CAAA"}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { deepMerge } from '@scalar/object-utils/merge';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { nanoidSchema } from '../shared/utility.js';
|
|
4
|
-
|
|
5
|
-
/** A generic string value used for filling in fields */
|
|
6
|
-
const value = z.string().optional().default('');
|
|
7
|
-
/** Some common properties used in all security schemes */
|
|
8
|
-
const commonProps = z.object({
|
|
9
|
-
uid: nanoidSchema,
|
|
10
|
-
/** The name key that links a security requirement to a security object */
|
|
11
|
-
nameKey: z.string().optional().default(''),
|
|
12
|
-
/* A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
13
|
-
description: z.string().optional(),
|
|
14
|
-
});
|
|
15
|
-
const securitySchemeApiKeyIn = ['query', 'header', 'cookie'];
|
|
16
|
-
const securitySchemeApiKey = commonProps.extend({
|
|
17
|
-
type: z.literal('apiKey'),
|
|
18
|
-
/** REQUIRED. The name of the header, query or cookie parameter to be used. */
|
|
19
|
-
name: z.string().optional().default(''),
|
|
20
|
-
/** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
|
|
21
|
-
in: z.enum(securitySchemeApiKeyIn).optional().default('header'),
|
|
22
|
-
value,
|
|
23
|
-
});
|
|
24
|
-
const securitySchemeHttp = commonProps.extend({
|
|
25
|
-
type: z.literal('http'),
|
|
26
|
-
/**
|
|
27
|
-
* REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
|
|
28
|
-
* [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
|
|
29
|
-
*/
|
|
30
|
-
scheme: z.enum(['basic', 'bearer']).optional().default('basic'),
|
|
31
|
-
/**
|
|
32
|
-
* A hint to the client to identify how the bearer token is formatted.
|
|
33
|
-
* Bearer tokens are usually generated by an authorization server, so
|
|
34
|
-
* this information is primarily for documentation purposes.
|
|
35
|
-
*/
|
|
36
|
-
bearerFormat: z
|
|
37
|
-
.union([z.literal('JWT'), z.string()])
|
|
38
|
-
.optional()
|
|
39
|
-
.default('JWT'),
|
|
40
|
-
/** Username */
|
|
41
|
-
value,
|
|
42
|
-
/** Password */
|
|
43
|
-
secondValue: value,
|
|
44
|
-
});
|
|
45
|
-
/**
|
|
46
|
-
* REQUIRED. The authorization URL to be used for this flow. This MUST be in
|
|
47
|
-
* the form of a URL. The OAuth2 standard requires the use of TLS.
|
|
48
|
-
*/
|
|
49
|
-
const authorizationUrl = z.string().optional().default('');
|
|
50
|
-
/**
|
|
51
|
-
* REQUIRED. The token URL to be used for this flow. This MUST be in the
|
|
52
|
-
* form of a URL. The OAuth2 standard requires the use of TLS.
|
|
53
|
-
*/
|
|
54
|
-
const tokenUrl = z.string().optional().default('');
|
|
55
|
-
/** Common properties used across all oauth2 flows */
|
|
56
|
-
const oauthCommon = z.object({
|
|
57
|
-
/**
|
|
58
|
-
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
59
|
-
* URL. The OAuth2 standard requires the use of TLS.
|
|
60
|
-
*/
|
|
61
|
-
refreshUrl: z.string().optional().default(''),
|
|
62
|
-
/**
|
|
63
|
-
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
64
|
-
* between the scope name and a short description for it. The map MAY be empty.
|
|
65
|
-
*/
|
|
66
|
-
scopes: z
|
|
67
|
-
.union([
|
|
68
|
-
z.map(z.string(), z.string().optional()),
|
|
69
|
-
z.record(z.string(), z.string().optional()),
|
|
70
|
-
z.object({}),
|
|
71
|
-
])
|
|
72
|
-
.optional(),
|
|
73
|
-
/** User selected scopes per flow */
|
|
74
|
-
selectedScopes: z.array(z.string()).optional().default([]),
|
|
75
|
-
token: value,
|
|
76
|
-
});
|
|
77
|
-
const oauthFlowSchema = z
|
|
78
|
-
.discriminatedUnion('type', [
|
|
79
|
-
/** Configuration for the OAuth Implicit flow */
|
|
80
|
-
oauthCommon.extend({
|
|
81
|
-
type: z.literal('implicit'),
|
|
82
|
-
authorizationUrl,
|
|
83
|
-
redirectUri: z.string().optional().default(''),
|
|
84
|
-
}),
|
|
85
|
-
/** Configuration for the OAuth Resource Owner Password flow */
|
|
86
|
-
oauthCommon.extend({
|
|
87
|
-
type: z.literal('password'),
|
|
88
|
-
tokenUrl,
|
|
89
|
-
/** Username */
|
|
90
|
-
value,
|
|
91
|
-
/** Password */
|
|
92
|
-
secondValue: value,
|
|
93
|
-
clientSecret: value,
|
|
94
|
-
}),
|
|
95
|
-
/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
|
|
96
|
-
oauthCommon.extend({
|
|
97
|
-
type: z.literal('clientCredentials'),
|
|
98
|
-
tokenUrl,
|
|
99
|
-
clientSecret: value,
|
|
100
|
-
}),
|
|
101
|
-
/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/
|
|
102
|
-
oauthCommon.extend({
|
|
103
|
-
type: z.literal('authorizationCode'),
|
|
104
|
-
authorizationUrl,
|
|
105
|
-
redirectUri: z.string().optional().default(''),
|
|
106
|
-
tokenUrl,
|
|
107
|
-
clientSecret: value,
|
|
108
|
-
}),
|
|
109
|
-
])
|
|
110
|
-
.optional()
|
|
111
|
-
.default({ type: 'implicit' });
|
|
112
|
-
const securitySchemeOauth2 = commonProps.extend({
|
|
113
|
-
type: z.literal('oauth2'),
|
|
114
|
-
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
115
|
-
flow: oauthFlowSchema,
|
|
116
|
-
clientId: value,
|
|
117
|
-
});
|
|
118
|
-
const securitySchemeOpenId = commonProps.extend({
|
|
119
|
-
type: z.literal('openIdConnect'),
|
|
120
|
-
/**
|
|
121
|
-
* REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
|
|
122
|
-
* form of a URL. The OpenID Connect standard requires the use of TLS.
|
|
123
|
-
*/
|
|
124
|
-
openIdConnectUrl: z.string().optional().default(''),
|
|
125
|
-
});
|
|
126
|
-
const securityScheme = z.union([
|
|
127
|
-
securitySchemeApiKey,
|
|
128
|
-
securitySchemeHttp,
|
|
129
|
-
securitySchemeOauth2,
|
|
130
|
-
securitySchemeOpenId,
|
|
131
|
-
]);
|
|
132
|
-
/** Create Security Scheme with defaults */
|
|
133
|
-
const createSecurityScheme = (payload) => deepMerge(securityScheme.parse(
|
|
134
|
-
// Ensure we set the flow type as well
|
|
135
|
-
'flow' in payload && payload?.flow?.type
|
|
136
|
-
? { type: payload.type, flow: { type: payload.flow.type } }
|
|
137
|
-
: { type: payload.type }), payload);
|
|
138
|
-
|
|
139
|
-
export { createSecurityScheme, securitySchemeApiKeyIn };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createServer } from './server.js';
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const serverSchema: z.ZodObject<{
|
|
3
|
-
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
4
|
-
/**
|
|
5
|
-
* REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that
|
|
6
|
-
* the host location is relative to the location where the OpenAPI document is being served. Variable substitutions
|
|
7
|
-
* will be made when a variable is named in {brackets}.
|
|
8
|
-
*/
|
|
9
|
-
url: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
10
|
-
/**
|
|
11
|
-
* An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text
|
|
12
|
-
* representation.
|
|
13
|
-
*/
|
|
14
|
-
description: z.ZodOptional<z.ZodString>;
|
|
15
|
-
/** A map between a variable name and its value. The value is used for substitution in the server’s URL template. */
|
|
16
|
-
variables: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
17
|
-
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
18
|
-
/**
|
|
19
|
-
* An enumeration of string values to be used if the substitution options are from a limited set.
|
|
20
|
-
* The array MUST NOT be empty.
|
|
21
|
-
*/
|
|
22
|
-
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
-
/**
|
|
24
|
-
* REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied.
|
|
25
|
-
* Note this behavior is different than the Schema Object’s treatment of default values, because in those cases
|
|
26
|
-
* parameter values are optional. If the enum is defined, the value MUST exist in the enum’s values.
|
|
27
|
-
*/
|
|
28
|
-
default: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
29
|
-
/** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */
|
|
30
|
-
description: z.ZodOptional<z.ZodString>;
|
|
31
|
-
/** An optional value for the server variable */
|
|
32
|
-
value: z.ZodOptional<z.ZodString>;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
default: string;
|
|
35
|
-
uid: string;
|
|
36
|
-
value?: string | undefined;
|
|
37
|
-
description?: string | undefined;
|
|
38
|
-
enum?: string[] | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
value?: string | undefined;
|
|
41
|
-
default?: string | undefined;
|
|
42
|
-
uid?: string | undefined;
|
|
43
|
-
description?: string | undefined;
|
|
44
|
-
enum?: string[] | undefined;
|
|
45
|
-
}>>>>;
|
|
46
|
-
}, "strip", z.ZodTypeAny, {
|
|
47
|
-
uid: string;
|
|
48
|
-
url: string;
|
|
49
|
-
description?: string | undefined;
|
|
50
|
-
variables?: Record<string, {
|
|
51
|
-
default: string;
|
|
52
|
-
uid: string;
|
|
53
|
-
value?: string | undefined;
|
|
54
|
-
description?: string | undefined;
|
|
55
|
-
enum?: string[] | undefined;
|
|
56
|
-
}> | null | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
uid?: string | undefined;
|
|
59
|
-
description?: string | undefined;
|
|
60
|
-
url?: string | undefined;
|
|
61
|
-
variables?: Record<string, {
|
|
62
|
-
value?: string | undefined;
|
|
63
|
-
default?: string | undefined;
|
|
64
|
-
uid?: string | undefined;
|
|
65
|
-
description?: string | undefined;
|
|
66
|
-
enum?: string[] | undefined;
|
|
67
|
-
}> | null | undefined;
|
|
68
|
-
}>;
|
|
69
|
-
/**
|
|
70
|
-
* Server object
|
|
71
|
-
* An object representing a Server.
|
|
72
|
-
*
|
|
73
|
-
* @see https://spec.openapis.org/oas/v3.1.0#server-object
|
|
74
|
-
*/
|
|
75
|
-
export type Server = z.infer<typeof serverSchema>;
|
|
76
|
-
export type ServerPayload = z.input<typeof serverSchema>;
|
|
77
|
-
/** Create server helper */
|
|
78
|
-
export declare const createServer: (payload: ServerPayload) => {
|
|
79
|
-
uid: string;
|
|
80
|
-
url: string;
|
|
81
|
-
description?: string | undefined;
|
|
82
|
-
variables?: Record<string, {
|
|
83
|
-
default: string;
|
|
84
|
-
uid: string;
|
|
85
|
-
value?: string | undefined;
|
|
86
|
-
description?: string | undefined;
|
|
87
|
-
enum?: string[] | undefined;
|
|
88
|
-
}> | null | undefined;
|
|
89
|
-
};
|
|
90
|
-
export {};
|
|
91
|
-
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA6BvB,QAAA,MAAM,YAAY;;IAEhB;;;;OAIG;;IAEH;;;OAGG;;IAEH,oHAAoH;;;QA9BpH;;;WAGG;;QAEH;;;;WAIG;;QAEH,mHAAmH;;QAEnH,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBhD,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,2BAA2B;AAC3B,eAAO,MAAM,YAAY,YAAa,aAAa;;;;;;;;;;;CACY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/shared/utility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,gCAAgC;AAChC,eAAO,MAAM,YAAY,0CAIC,CAAA;AAE1B,6BAA6B;AAC7B,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/spec/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,YAAY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/spec/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { SchemaObject } from '../../../entities/workspace/spec/components';
|
|
2
|
-
export type ParameterStyle = 'matrix' | 'simple' | 'form' | 'label' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
3
|
-
/** */
|
|
4
|
-
export type ParameterObject = {
|
|
5
|
-
name: string;
|
|
6
|
-
in: 'query' | 'path' | 'header' | 'cookie';
|
|
7
|
-
description?: string;
|
|
8
|
-
/** Defaulted to false */
|
|
9
|
-
required?: boolean;
|
|
10
|
-
/** Defaulted to false */
|
|
11
|
-
deprecated?: boolean;
|
|
12
|
-
/** Defaulted according to @url https://spec.openapis.org/oas/v3.1.0#parameter-object */
|
|
13
|
-
style: ParameterStyle;
|
|
14
|
-
schema: SchemaObject;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=parameters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/spec/parameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAExE,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,gBAAgB,GAChB,eAAe,GACf,YAAY,CAAA;AAChB,OAAO;AAEP,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yBAAyB;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wFAAwF;IACxF,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;CACrB,CAAA"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Internal type used to describe an OpenAPI spec $ref
|
|
4
|
-
*
|
|
5
|
-
* Where this type is used we can set the UI to readonly and redirect to the
|
|
6
|
-
* definition object to allow modification
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export type $REF = {
|
|
10
|
-
/** $ref string from the OpenAPI spec */
|
|
11
|
-
path: string;
|
|
12
|
-
/** If the reference is internal to a collection we include a dot separate path */
|
|
13
|
-
collectionRef?: string;
|
|
14
|
-
/** If the reference is external we can handle differently */
|
|
15
|
-
isExternal: boolean;
|
|
16
|
-
};
|
|
17
|
-
export declare const $refSchema: z.ZodObject<{
|
|
18
|
-
path: z.ZodString;
|
|
19
|
-
collectionRef: z.ZodOptional<z.ZodString>;
|
|
20
|
-
isExternal: z.ZodBoolean;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
path: string;
|
|
23
|
-
isExternal: boolean;
|
|
24
|
-
collectionRef?: string | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
path: string;
|
|
27
|
-
isExternal: boolean;
|
|
28
|
-
collectionRef?: string | undefined;
|
|
29
|
-
}>;
|
|
30
|
-
//# sourceMappingURL=refs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/spec/refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvC;;;;;;GAMG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,6DAA6D;IAC7D,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;EAIK,CAAA"}
|