@scalar/workspace-store 0.28.1 → 0.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/client.d.ts +10 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +40 -1
- package/dist/client.js.map +2 -2
- package/dist/entities/auth/index.d.ts +75 -0
- package/dist/entities/auth/index.d.ts.map +1 -0
- package/dist/entities/auth/index.js +89 -0
- package/dist/entities/auth/index.js.map +7 -0
- package/dist/entities/auth/schema.d.ts +7318 -0
- package/dist/entities/auth/schema.d.ts.map +1 -0
- package/dist/entities/auth/schema.js +74 -0
- package/dist/entities/auth/schema.js.map +7 -0
- package/dist/entities/history/index.d.ts +93 -0
- package/dist/entities/history/index.d.ts.map +1 -0
- package/dist/entities/history/index.js +62 -0
- package/dist/entities/history/index.js.map +7 -0
- package/dist/entities/history/schema.d.ts +234 -0
- package/dist/entities/history/schema.d.ts.map +1 -0
- package/dist/{schemas/extensions/operation/x-scalar-history.js → entities/history/schema.js} +5 -6
- package/dist/{schemas/extensions/operation/x-scalar-history.js.map → entities/history/schema.js.map} +3 -3
- package/dist/events/definitions/auth.d.ts +14 -0
- package/dist/events/definitions/auth.d.ts.map +1 -1
- package/dist/mutators/auth.d.ts +10 -17
- package/dist/mutators/auth.d.ts.map +1 -1
- package/dist/mutators/auth.js +87 -57
- package/dist/mutators/auth.js.map +2 -2
- package/dist/mutators/index.d.ts +4 -12
- package/dist/mutators/index.d.ts.map +1 -1
- package/dist/mutators/index.js +1 -1
- package/dist/mutators/index.js.map +2 -2
- package/dist/mutators/operation.d.ts +2 -2
- package/dist/mutators/operation.d.ts.map +1 -1
- package/dist/mutators/operation.js +9 -16
- package/dist/mutators/operation.js.map +2 -2
- package/dist/persistence/index.d.ts +16 -3
- package/dist/persistence/index.d.ts.map +1 -1
- package/dist/persistence/index.js +47 -3
- package/dist/persistence/index.js.map +2 -2
- package/dist/plugins/client/persistence.d.ts.map +1 -1
- package/dist/plugins/client/persistence.js +12 -0
- package/dist/plugins/client/persistence.js.map +2 -2
- package/dist/schemas/extensions/security/index.d.ts +2 -0
- package/dist/schemas/extensions/security/index.d.ts.map +1 -0
- package/dist/schemas/extensions/security/index.js +1 -0
- package/dist/schemas/extensions/security/index.js.map +7 -0
- package/dist/schemas/inmemory-workspace.d.ts +2917 -114
- package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
- package/dist/schemas/inmemory-workspace.js +5 -1
- package/dist/schemas/inmemory-workspace.js.map +2 -2
- package/dist/schemas/reference-config/index.d.ts +0 -114
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +0 -114
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts +5 -35
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/oauth-flow.js +1 -16
- package/dist/schemas/v3.1/strict/oauth-flow.js.map +2 -2
- package/dist/schemas/v3.1/strict/oauthflows.d.ts +0 -29
- package/dist/schemas/v3.1/strict/oauthflows.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +37 -5536
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +2 -10
- package/dist/schemas/v3.1/strict/openapi-document.js.map +2 -2
- package/dist/schemas/v3.1/strict/operation.d.ts +1 -70
- package/dist/schemas/v3.1/strict/operation.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/operation.js +1 -7
- package/dist/schemas/v3.1/strict/operation.js.map +2 -2
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts +0 -1
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/ref-definitions.js +1 -3
- package/dist/schemas/v3.1/strict/ref-definitions.js.map +2 -2
- package/dist/schemas/v3.1/strict/security-scheme.d.ts +3 -11
- package/dist/schemas/v3.1/strict/security-scheme.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.js +0 -7
- package/dist/schemas/v3.1/strict/security-scheme.js.map +2 -2
- package/dist/schemas/workspace.d.ts +0 -798
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/workspace-plugin.d.ts +8 -0
- package/dist/workspace-plugin.d.ts.map +1 -1
- package/package.json +21 -6
- package/dist/schemas/extensions/operation/x-scalar-history.d.ts +0 -217
- package/dist/schemas/extensions/operation/x-scalar-history.d.ts.map +0 -1
- package/dist/schemas/extensions/security/x-scalar-selected-security.d.ts +0 -17
- package/dist/schemas/extensions/security/x-scalar-selected-security.d.ts.map +0 -1
- package/dist/schemas/extensions/security/x-scalar-selected-security.js +0 -14
- package/dist/schemas/extensions/security/x-scalar-selected-security.js.map +0 -7
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type XScalarCredentialsLocation } from '../../../schemas/extensions/security/x-scalar-credentials-location.js';
|
|
2
2
|
import { type XScalarSecurityBody } from '../../../schemas/extensions/security/x-scalar-security-body.js';
|
|
3
3
|
import { type XScalarSecurityQuery } from '../../../schemas/extensions/security/x-scalar-security-query.js';
|
|
4
|
-
import { type XScalarSecretClientId, type XScalarSecretClientSecret, type XScalarSecretHTTP, type XScalarSecretRedirectUri, type XScalarSecretToken } from '../../../schemas/extensions/security/x-scalar-security-secrets.js';
|
|
5
4
|
import { type XTokenName } from '../../../schemas/extensions/security/x-tokenName.js';
|
|
6
5
|
import { type XusePkce } from '../../../schemas/extensions/security/x-use-pkce.js';
|
|
7
6
|
/** Common properties used across all OAuth flows */
|
|
@@ -10,17 +9,13 @@ type OAuthFlowCommon = {
|
|
|
10
9
|
refreshUrl: string;
|
|
11
10
|
/** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */
|
|
12
11
|
scopes: Record<string, string>;
|
|
13
|
-
} &
|
|
12
|
+
} & XScalarSecurityQuery & XScalarSecurityBody & XTokenName;
|
|
14
13
|
/** Configuration for the OAuth Implicit flow */
|
|
15
14
|
export declare const OAuthFlowImplicitSchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
16
15
|
/** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
17
16
|
refreshUrl: import("@scalar/typebox").TString;
|
|
18
17
|
/** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */
|
|
19
18
|
scopes: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>;
|
|
20
|
-
}>, import("@scalar/typebox").TObject<{
|
|
21
|
-
'x-scalar-secret-client-id': import("@scalar/typebox").TString;
|
|
22
|
-
}>, import("@scalar/typebox").TObject<{
|
|
23
|
-
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
24
19
|
}>, import("@scalar/typebox").TObject<{
|
|
25
20
|
'x-scalar-security-query': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
|
|
26
21
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -30,24 +25,18 @@ export declare const OAuthFlowImplicitSchema: import("@scalar/typebox").TInterse
|
|
|
30
25
|
}>]>, import("@scalar/typebox").TObject<{
|
|
31
26
|
/** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
32
27
|
authorizationUrl: import("@scalar/typebox").TString;
|
|
33
|
-
}>, import("@scalar/typebox").TObject<{
|
|
34
|
-
'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
|
|
35
28
|
}>]>;
|
|
36
29
|
/** Configuration for the OAuth Implicit flow */
|
|
37
30
|
export type OAuthFlowImplicit = OAuthFlowCommon & {
|
|
38
31
|
/** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
39
32
|
authorizationUrl: string;
|
|
40
|
-
}
|
|
33
|
+
};
|
|
41
34
|
/** Configuration for the OAuth Resource Owner Password flow */
|
|
42
35
|
export declare const OAuthFlowPasswordSchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
43
36
|
/** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
44
37
|
refreshUrl: import("@scalar/typebox").TString;
|
|
45
38
|
/** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */
|
|
46
39
|
scopes: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>;
|
|
47
|
-
}>, import("@scalar/typebox").TObject<{
|
|
48
|
-
'x-scalar-secret-client-id': import("@scalar/typebox").TString;
|
|
49
|
-
}>, import("@scalar/typebox").TObject<{
|
|
50
|
-
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
51
40
|
}>, import("@scalar/typebox").TObject<{
|
|
52
41
|
'x-scalar-security-query': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
|
|
53
42
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -57,11 +46,6 @@ export declare const OAuthFlowPasswordSchema: import("@scalar/typebox").TInterse
|
|
|
57
46
|
}>]>, import("@scalar/typebox").TObject<{
|
|
58
47
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
59
48
|
tokenUrl: import("@scalar/typebox").TString;
|
|
60
|
-
}>, import("@scalar/typebox").TObject<{
|
|
61
|
-
'x-scalar-secret-username': import("@scalar/typebox").TString;
|
|
62
|
-
'x-scalar-secret-password': import("@scalar/typebox").TString;
|
|
63
|
-
}>, import("@scalar/typebox").TObject<{
|
|
64
|
-
'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
|
|
65
49
|
}>, import("@scalar/typebox").TObject<{
|
|
66
50
|
'x-scalar-credentials-location': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"body">]>>;
|
|
67
51
|
}>]>;
|
|
@@ -69,17 +53,13 @@ export declare const OAuthFlowPasswordSchema: import("@scalar/typebox").TInterse
|
|
|
69
53
|
export type OAuthFlowPassword = OAuthFlowCommon & {
|
|
70
54
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
71
55
|
tokenUrl: string;
|
|
72
|
-
} &
|
|
56
|
+
} & XScalarCredentialsLocation;
|
|
73
57
|
/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
|
|
74
58
|
export declare const OAuthFlowClientCredentialsSchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
75
59
|
/** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
76
60
|
refreshUrl: import("@scalar/typebox").TString;
|
|
77
61
|
/** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */
|
|
78
62
|
scopes: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>;
|
|
79
|
-
}>, import("@scalar/typebox").TObject<{
|
|
80
|
-
'x-scalar-secret-client-id': import("@scalar/typebox").TString;
|
|
81
|
-
}>, import("@scalar/typebox").TObject<{
|
|
82
|
-
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
83
63
|
}>, import("@scalar/typebox").TObject<{
|
|
84
64
|
'x-scalar-security-query': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
|
|
85
65
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -89,8 +69,6 @@ export declare const OAuthFlowClientCredentialsSchema: import("@scalar/typebox")
|
|
|
89
69
|
}>]>, import("@scalar/typebox").TObject<{
|
|
90
70
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
91
71
|
tokenUrl: import("@scalar/typebox").TString;
|
|
92
|
-
}>, import("@scalar/typebox").TObject<{
|
|
93
|
-
'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
|
|
94
72
|
}>, import("@scalar/typebox").TObject<{
|
|
95
73
|
'x-scalar-credentials-location': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"body">]>>;
|
|
96
74
|
}>]>;
|
|
@@ -98,17 +76,13 @@ export declare const OAuthFlowClientCredentialsSchema: import("@scalar/typebox")
|
|
|
98
76
|
export type OAuthFlowClientCredentials = OAuthFlowCommon & {
|
|
99
77
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
100
78
|
tokenUrl: string;
|
|
101
|
-
} &
|
|
79
|
+
} & XScalarCredentialsLocation;
|
|
102
80
|
/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0. */
|
|
103
81
|
export declare const OAuthFlowAuthorizationCodeSchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
104
82
|
/** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
105
83
|
refreshUrl: import("@scalar/typebox").TString;
|
|
106
84
|
/** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */
|
|
107
85
|
scopes: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>;
|
|
108
|
-
}>, import("@scalar/typebox").TObject<{
|
|
109
|
-
'x-scalar-secret-client-id': import("@scalar/typebox").TString;
|
|
110
|
-
}>, import("@scalar/typebox").TObject<{
|
|
111
|
-
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
112
86
|
}>, import("@scalar/typebox").TObject<{
|
|
113
87
|
'x-scalar-security-query': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
|
|
114
88
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -120,10 +94,6 @@ export declare const OAuthFlowAuthorizationCodeSchema: import("@scalar/typebox")
|
|
|
120
94
|
authorizationUrl: import("@scalar/typebox").TString;
|
|
121
95
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
122
96
|
tokenUrl: import("@scalar/typebox").TString;
|
|
123
|
-
}>, import("@scalar/typebox").TObject<{
|
|
124
|
-
'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
|
|
125
|
-
}>, import("@scalar/typebox").TObject<{
|
|
126
|
-
'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
|
|
127
97
|
}>, import("@scalar/typebox").TObject<{
|
|
128
98
|
'x-usePkce': import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"SHA-256">, import("@scalar/typebox").TLiteral<"plain">, import("@scalar/typebox").TLiteral<"no">]>;
|
|
129
99
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -135,7 +105,7 @@ export type OAuthFlowAuthorizationCode = OAuthFlowCommon & {
|
|
|
135
105
|
authorizationUrl: string;
|
|
136
106
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
137
107
|
tokenUrl: string;
|
|
138
|
-
} &
|
|
108
|
+
} & XusePkce & XScalarCredentialsLocation;
|
|
139
109
|
export type OAuthFlow = OAuthFlowImplicit | OAuthFlowPassword | OAuthFlowClientCredentials | OAuthFlowAuthorizationCode;
|
|
140
110
|
export {};
|
|
141
111
|
//# sourceMappingURL=oauth-flow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-flow.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/oauth-flow.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,0BAA0B,EAEhC,MAAM,6DAA6D,CAAA;AACpE,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,uDAAuD,CAAA;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"oauth-flow.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/oauth-flow.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,0BAA0B,EAEhC,MAAM,6DAA6D,CAAA;AACpE,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,uDAAuD,CAAA;AAC9D,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,2CAA2C,CAAA;AAC7F,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,0CAA0C,CAAA;AAexF,oDAAoD;AACpD,KAAK,eAAe,GAAG;IACrB,uIAAuI;IACvI,UAAU,EAAE,MAAM,CAAA;IAClB,wJAAwJ;IACxJ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B,GAAG,oBAAoB,GACtB,mBAAmB,GACnB,UAAU,CAAA;AAEZ,gDAAgD;AAChD,eAAO,MAAM,uBAAuB;IArBhC,uIAAuI;;IAEvI,wJAAwJ;;;;;;;;;IAsBxJ,gJAAgJ;;IAGnJ,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAChD,gJAAgJ;IAChJ,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,+DAA+D;AAC/D,eAAO,MAAM,uBAAuB;IApChC,uIAAuI;;IAEvI,wJAAwJ;;;;;;;;;IAqCxJ,wIAAwI;;;;IAI3I,CAAA;AAED,+DAA+D;AAC/D,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAChD,wIAAwI;IACxI,QAAQ,EAAE,MAAM,CAAA;CACjB,GAAG,0BAA0B,CAAA;AAE9B,yGAAyG;AACzG,eAAO,MAAM,gCAAgC;IApDzC,uIAAuI;;IAEvI,wJAAwJ;;;;;;;;;IAqDxJ,wIAAwI;;;;IAI3I,CAAA;AAED,yGAAyG;AACzG,MAAM,MAAM,0BAA0B,GAAG,eAAe,GAAG;IACzD,wIAAwI;IACxI,QAAQ,EAAE,MAAM,CAAA;CACjB,GAAG,0BAA0B,CAAA;AAE9B,wGAAwG;AACxG,eAAO,MAAM,gCAAgC;IApEzC,uIAAuI;;IAEvI,wJAAwJ;;;;;;;;;IAqExJ,gJAAgJ;;IAEhJ,wIAAwI;;;;;;IAK3I,CAAA;AAED,wGAAwG;AACxG,MAAM,MAAM,0BAA0B,GAAG,eAAe,GAAG;IACzD,gJAAgJ;IAChJ,gBAAgB,EAAE,MAAM,CAAA;IACxB,wIAAwI;IACxI,QAAQ,EAAE,MAAM,CAAA;CACjB,GAAG,QAAQ,GACV,0BAA0B,CAAA;AAE5B,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,0BAA0B,GAAG,0BAA0B,CAAA"}
|
|
@@ -9,13 +9,6 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
XScalarSecurityQuerySchema
|
|
11
11
|
} from "../../../schemas/extensions/security/x-scalar-security-query.js";
|
|
12
|
-
import {
|
|
13
|
-
XScalarSecretClientIdSchema,
|
|
14
|
-
XScalarSecretClientSecretSchema,
|
|
15
|
-
XScalarSecretHTTPSchema,
|
|
16
|
-
XScalarSecretRedirectUriSchema,
|
|
17
|
-
XScalarSecretTokenSchema
|
|
18
|
-
} from "../../../schemas/extensions/security/x-scalar-security-secrets.js";
|
|
19
12
|
import { XTokenNameSchema } from "../../../schemas/extensions/security/x-tokenName.js";
|
|
20
13
|
import { XusePkceSchema } from "../../../schemas/extensions/security/x-use-pkce.js";
|
|
21
14
|
const OAuthFlowCommonSchema = compose(
|
|
@@ -25,8 +18,6 @@ const OAuthFlowCommonSchema = compose(
|
|
|
25
18
|
/** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */
|
|
26
19
|
scopes: Type.Record(Type.String(), Type.String())
|
|
27
20
|
}),
|
|
28
|
-
XScalarSecretClientIdSchema,
|
|
29
|
-
XScalarSecretTokenSchema,
|
|
30
21
|
XScalarSecurityQuerySchema,
|
|
31
22
|
XScalarSecurityBodySchema,
|
|
32
23
|
XTokenNameSchema
|
|
@@ -36,8 +27,7 @@ const OAuthFlowImplicitSchema = compose(
|
|
|
36
27
|
Type.Object({
|
|
37
28
|
/** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
38
29
|
authorizationUrl: Type.String()
|
|
39
|
-
})
|
|
40
|
-
XScalarSecretRedirectUriSchema
|
|
30
|
+
})
|
|
41
31
|
);
|
|
42
32
|
const OAuthFlowPasswordSchema = compose(
|
|
43
33
|
OAuthFlowCommonSchema,
|
|
@@ -45,8 +35,6 @@ const OAuthFlowPasswordSchema = compose(
|
|
|
45
35
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
46
36
|
tokenUrl: Type.String()
|
|
47
37
|
}),
|
|
48
|
-
XScalarSecretHTTPSchema,
|
|
49
|
-
XScalarSecretClientSecretSchema,
|
|
50
38
|
XScalarCredentialsLocationSchema
|
|
51
39
|
);
|
|
52
40
|
const OAuthFlowClientCredentialsSchema = compose(
|
|
@@ -55,7 +43,6 @@ const OAuthFlowClientCredentialsSchema = compose(
|
|
|
55
43
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
56
44
|
tokenUrl: Type.String()
|
|
57
45
|
}),
|
|
58
|
-
XScalarSecretClientSecretSchema,
|
|
59
46
|
XScalarCredentialsLocationSchema
|
|
60
47
|
);
|
|
61
48
|
const OAuthFlowAuthorizationCodeSchema = compose(
|
|
@@ -66,8 +53,6 @@ const OAuthFlowAuthorizationCodeSchema = compose(
|
|
|
66
53
|
/** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */
|
|
67
54
|
tokenUrl: Type.String()
|
|
68
55
|
}),
|
|
69
|
-
XScalarSecretClientSecretSchema,
|
|
70
|
-
XScalarSecretRedirectUriSchema,
|
|
71
56
|
XusePkceSchema,
|
|
72
57
|
XScalarCredentialsLocationSchema
|
|
73
58
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/schemas/v3.1/strict/oauth-flow.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport {\n type XScalarCredentialsLocation,\n XScalarCredentialsLocationSchema,\n} from '@/schemas/extensions/security/x-scalar-credentials-location'\nimport {\n type XScalarSecurityBody,\n XScalarSecurityBodySchema,\n} from '@/schemas/extensions/security/x-scalar-security-body'\nimport {\n type XScalarSecurityQuery,\n XScalarSecurityQuerySchema,\n} from '@/schemas/extensions/security/x-scalar-security-query'\nimport {
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;AACP
|
|
4
|
+
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport {\n type XScalarCredentialsLocation,\n XScalarCredentialsLocationSchema,\n} from '@/schemas/extensions/security/x-scalar-credentials-location'\nimport {\n type XScalarSecurityBody,\n XScalarSecurityBodySchema,\n} from '@/schemas/extensions/security/x-scalar-security-body'\nimport {\n type XScalarSecurityQuery,\n XScalarSecurityQuerySchema,\n} from '@/schemas/extensions/security/x-scalar-security-query'\nimport { type XTokenName, XTokenNameSchema } from '@/schemas/extensions/security/x-tokenName'\nimport { type XusePkce, XusePkceSchema } from '@/schemas/extensions/security/x-use-pkce'\n\n/** Common properties used across all OAuth flows */\nconst OAuthFlowCommonSchema = compose(\n Type.Object({\n /** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n refreshUrl: Type.String(),\n /** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */\n scopes: Type.Record(Type.String(), Type.String()),\n }),\n XScalarSecurityQuerySchema,\n XScalarSecurityBodySchema,\n XTokenNameSchema,\n)\n\n/** Common properties used across all OAuth flows */\ntype OAuthFlowCommon = {\n /** The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n refreshUrl: string\n /** REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty. */\n scopes: Record<string, string>\n} & XScalarSecurityQuery &\n XScalarSecurityBody &\n XTokenName\n\n/** Configuration for the OAuth Implicit flow */\nexport const OAuthFlowImplicitSchema = compose(\n OAuthFlowCommonSchema,\n Type.Object({\n /** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n authorizationUrl: Type.String(),\n }),\n)\n\n/** Configuration for the OAuth Implicit flow */\nexport type OAuthFlowImplicit = OAuthFlowCommon & {\n /** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n authorizationUrl: string\n}\n\n/** Configuration for the OAuth Resource Owner Password flow */\nexport const OAuthFlowPasswordSchema = compose(\n OAuthFlowCommonSchema,\n Type.Object({\n /** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n tokenUrl: Type.String(),\n }),\n XScalarCredentialsLocationSchema,\n)\n\n/** Configuration for the OAuth Resource Owner Password flow */\nexport type OAuthFlowPassword = OAuthFlowCommon & {\n /** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n tokenUrl: string\n} & XScalarCredentialsLocation\n\n/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */\nexport const OAuthFlowClientCredentialsSchema = compose(\n OAuthFlowCommonSchema,\n Type.Object({\n /** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n tokenUrl: Type.String(),\n }),\n XScalarCredentialsLocationSchema,\n)\n\n/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */\nexport type OAuthFlowClientCredentials = OAuthFlowCommon & {\n /** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n tokenUrl: string\n} & XScalarCredentialsLocation\n\n/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0. */\nexport const OAuthFlowAuthorizationCodeSchema = compose(\n OAuthFlowCommonSchema,\n Type.Object({\n /** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n authorizationUrl: Type.String(),\n /** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n tokenUrl: Type.String(),\n }),\n XusePkceSchema,\n XScalarCredentialsLocationSchema,\n)\n\n/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0. */\nexport type OAuthFlowAuthorizationCode = OAuthFlowCommon & {\n /** REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n authorizationUrl: string\n /** REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS. */\n tokenUrl: string\n} & XusePkce &\n XScalarCredentialsLocation\n\nexport type OAuthFlow = OAuthFlowImplicit | OAuthFlowPassword | OAuthFlowClientCredentials | OAuthFlowAuthorizationCode\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;AACP,SAA0B,wBAAwB;AAClD,SAAwB,sBAAsB;AAG9C,MAAM,wBAAwB;AAAA,EAC5B,KAAK,OAAO;AAAA;AAAA,IAEV,YAAY,KAAK,OAAO;AAAA;AAAA,IAExB,QAAQ,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,OAAO,CAAC;AAAA,EAClD,CAAC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AACF;AAaO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,kBAAkB,KAAK,OAAO;AAAA,EAChC,CAAC;AACH;AASO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,UAAU,KAAK,OAAO;AAAA,EACxB,CAAC;AAAA,EACD;AACF;AASO,MAAM,mCAAmC;AAAA,EAC9C;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,UAAU,KAAK,OAAO;AAAA,EACxB,CAAC;AAAA,EACD;AACF;AASO,MAAM,mCAAmC;AAAA,EAC9C;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,kBAAkB,KAAK,OAAO;AAAA;AAAA,IAE9B,UAAU,KAAK,OAAO;AAAA,EACxB,CAAC;AAAA,EACD;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,10 +7,6 @@ export declare const OAuthFlowsObjectSchemaDefinition: import("@scalar/typebox")
|
|
|
7
7
|
implicit: import("@scalar/typebox").TOptional<import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
8
8
|
refreshUrl: import("@scalar/typebox").TString;
|
|
9
9
|
scopes: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>;
|
|
10
|
-
}>, import("@scalar/typebox").TObject<{
|
|
11
|
-
'x-scalar-secret-client-id': import("@scalar/typebox").TString;
|
|
12
|
-
}>, import("@scalar/typebox").TObject<{
|
|
13
|
-
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
14
10
|
}>, import("@scalar/typebox").TObject<{
|
|
15
11
|
'x-scalar-security-query': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
|
|
16
12
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -19,17 +15,11 @@ export declare const OAuthFlowsObjectSchemaDefinition: import("@scalar/typebox")
|
|
|
19
15
|
'x-tokenName': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
20
16
|
}>]>, import("@scalar/typebox").TObject<{
|
|
21
17
|
authorizationUrl: import("@scalar/typebox").TString;
|
|
22
|
-
}>, import("@scalar/typebox").TObject<{
|
|
23
|
-
'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
|
|
24
18
|
}>]>>;
|
|
25
19
|
/** Configuration for the OAuth Resource Owner Password flow */
|
|
26
20
|
password: import("@scalar/typebox").TOptional<import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
27
21
|
refreshUrl: import("@scalar/typebox").TString;
|
|
28
22
|
scopes: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>;
|
|
29
|
-
}>, import("@scalar/typebox").TObject<{
|
|
30
|
-
'x-scalar-secret-client-id': import("@scalar/typebox").TString;
|
|
31
|
-
}>, import("@scalar/typebox").TObject<{
|
|
32
|
-
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
33
23
|
}>, import("@scalar/typebox").TObject<{
|
|
34
24
|
'x-scalar-security-query': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
|
|
35
25
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -38,11 +28,6 @@ export declare const OAuthFlowsObjectSchemaDefinition: import("@scalar/typebox")
|
|
|
38
28
|
'x-tokenName': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
39
29
|
}>]>, import("@scalar/typebox").TObject<{
|
|
40
30
|
tokenUrl: import("@scalar/typebox").TString;
|
|
41
|
-
}>, import("@scalar/typebox").TObject<{
|
|
42
|
-
'x-scalar-secret-username': import("@scalar/typebox").TString;
|
|
43
|
-
'x-scalar-secret-password': import("@scalar/typebox").TString;
|
|
44
|
-
}>, import("@scalar/typebox").TObject<{
|
|
45
|
-
'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
|
|
46
31
|
}>, import("@scalar/typebox").TObject<{
|
|
47
32
|
'x-scalar-credentials-location': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"body">]>>;
|
|
48
33
|
}>]>>;
|
|
@@ -50,10 +35,6 @@ export declare const OAuthFlowsObjectSchemaDefinition: import("@scalar/typebox")
|
|
|
50
35
|
clientCredentials: import("@scalar/typebox").TOptional<import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
51
36
|
refreshUrl: import("@scalar/typebox").TString;
|
|
52
37
|
scopes: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>;
|
|
53
|
-
}>, import("@scalar/typebox").TObject<{
|
|
54
|
-
'x-scalar-secret-client-id': import("@scalar/typebox").TString;
|
|
55
|
-
}>, import("@scalar/typebox").TObject<{
|
|
56
|
-
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
57
38
|
}>, import("@scalar/typebox").TObject<{
|
|
58
39
|
'x-scalar-security-query': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
|
|
59
40
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -62,8 +43,6 @@ export declare const OAuthFlowsObjectSchemaDefinition: import("@scalar/typebox")
|
|
|
62
43
|
'x-tokenName': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
63
44
|
}>]>, import("@scalar/typebox").TObject<{
|
|
64
45
|
tokenUrl: import("@scalar/typebox").TString;
|
|
65
|
-
}>, import("@scalar/typebox").TObject<{
|
|
66
|
-
'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
|
|
67
46
|
}>, import("@scalar/typebox").TObject<{
|
|
68
47
|
'x-scalar-credentials-location': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"body">]>>;
|
|
69
48
|
}>]>>;
|
|
@@ -71,10 +50,6 @@ export declare const OAuthFlowsObjectSchemaDefinition: import("@scalar/typebox")
|
|
|
71
50
|
authorizationCode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
72
51
|
refreshUrl: import("@scalar/typebox").TString;
|
|
73
52
|
scopes: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>;
|
|
74
|
-
}>, import("@scalar/typebox").TObject<{
|
|
75
|
-
'x-scalar-secret-client-id': import("@scalar/typebox").TString;
|
|
76
|
-
}>, import("@scalar/typebox").TObject<{
|
|
77
|
-
'x-scalar-secret-token': import("@scalar/typebox").TString;
|
|
78
53
|
}>, import("@scalar/typebox").TObject<{
|
|
79
54
|
'x-scalar-security-query': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>>;
|
|
80
55
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -84,10 +59,6 @@ export declare const OAuthFlowsObjectSchemaDefinition: import("@scalar/typebox")
|
|
|
84
59
|
}>]>, import("@scalar/typebox").TObject<{
|
|
85
60
|
authorizationUrl: import("@scalar/typebox").TString;
|
|
86
61
|
tokenUrl: import("@scalar/typebox").TString;
|
|
87
|
-
}>, import("@scalar/typebox").TObject<{
|
|
88
|
-
'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
|
|
89
|
-
}>, import("@scalar/typebox").TObject<{
|
|
90
|
-
'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
|
|
91
62
|
}>, import("@scalar/typebox").TObject<{
|
|
92
63
|
'x-usePkce': import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"SHA-256">, import("@scalar/typebox").TLiteral<"plain">, import("@scalar/typebox").TLiteral<"no">]>;
|
|
93
64
|
}>, import("@scalar/typebox").TObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauthflows.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/oauthflows.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,0BAA0B,EAE/B,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EAEvB,MAAM,cAAc,CAAA;AAErB;;GAEG;AACH,eAAO,MAAM,gCAAgC;IAC3C,gDAAgD
|
|
1
|
+
{"version":3,"file":"oauthflows.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/oauthflows.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,0BAA0B,EAE/B,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EAEvB,MAAM,cAAc,CAAA;AAErB;;GAEG;AACH,eAAO,MAAM,gCAAgC;IAC3C,gDAAgD;;;;;;;;;;;;;IAEhD,+DAA+D;;;;;;;;;;;;;;;IAE/D,yGAAyG;;;;;;;;;;;;;;;IAEzG,wGAAwG;;;;;;;;;;;;;;;;;;EAExG,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gDAAgD;IAChD,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,yGAAyG;IACzG,iBAAiB,CAAC,EAAE,0BAA0B,CAAA;IAC9C,wGAAwG;IACxG,iBAAiB,CAAC,EAAE,0BAA0B,CAAA;CAC/C,CAAA"}
|