@scalar/oas-utils 0.2.3 → 0.2.5
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 +14 -0
- package/dist/entities/workspace/collection/collection.d.ts +51 -17
- package/dist/entities/workspace/collection/collection.d.ts.map +1 -1
- package/dist/entities/workspace/collection/collection.js +27 -0
- package/dist/entities/workspace/cookie/cookie.d.ts +6 -4
- package/dist/entities/workspace/cookie/cookie.d.ts.map +1 -1
- package/dist/entities/workspace/cookie/cookie.js +4 -2
- package/dist/entities/workspace/environment/environment.d.ts +3 -3
- package/dist/entities/workspace/folder/folder.d.ts +4 -4
- package/dist/entities/workspace/security/index.d.ts +3 -0
- package/dist/entities/workspace/security/index.d.ts.map +1 -0
- package/dist/entities/workspace/security/index.js +2 -0
- package/dist/entities/workspace/security/security-requirement.d.ts +13 -0
- package/dist/entities/workspace/security/security-requirement.d.ts.map +1 -0
- package/dist/entities/workspace/security/security-requirement.js +15 -0
- package/dist/entities/workspace/security/security-schemes.d.ts +685 -0
- package/dist/entities/workspace/security/security-schemes.d.ts.map +1 -0
- package/dist/entities/workspace/security/security-schemes.js +155 -0
- package/dist/entities/workspace/server/server.d.ts +6 -6
- package/dist/entities/workspace/spec/request-examples.d.ts +18 -18
- package/dist/entities/workspace/spec/requests.d.ts +28 -14
- package/dist/entities/workspace/spec/requests.d.ts.map +1 -1
- package/dist/entities/workspace/spec/requests.js +13 -2
- package/dist/entities/workspace/workspace.d.ts +6 -6
- package/dist/helpers/deepMerge.d.ts.map +1 -1
- package/dist/helpers/fetchSpecFromUrl.js +1 -1
- package/dist/helpers/index.d.ts +2 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +2 -1
- package/dist/helpers/object.d.ts +10 -0
- package/dist/helpers/object.d.ts.map +1 -0
- package/dist/helpers/{objectMerge.js → object.js} +7 -2
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/prettyPrintJson.d.ts +1 -1
- package/dist/helpers/prettyPrintJson.d.ts.map +1 -1
- package/dist/helpers/prettyPrintJson.js +1 -1
- package/dist/helpers/string.d.ts +10 -0
- package/dist/helpers/string.d.ts.map +1 -0
- package/dist/helpers/string.js +14 -0
- package/dist/spec-getters/getExampleFromSchema.d.ts +2 -2
- package/dist/spec-getters/getExampleFromSchema.d.ts.map +1 -1
- package/dist/spec-getters/getRequestFromOperation.d.ts.map +1 -1
- package/dist/spec-getters/getRequestFromOperation.js +1 -2
- package/dist/transforms/import-spec.d.ts +8 -3
- package/dist/transforms/import-spec.d.ts.map +1 -1
- package/dist/transforms/import-spec.js +17 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/entities/workspace/security-schemes/index.d.ts +0 -2
- package/dist/entities/workspace/security-schemes/index.d.ts.map +0 -1
- package/dist/entities/workspace/security-schemes/index.js +0 -1
- package/dist/entities/workspace/security-schemes/security-schemes.d.ts +0 -19
- package/dist/entities/workspace/security-schemes/security-schemes.d.ts.map +0 -1
- package/dist/entities/workspace/security-schemes/security-schemes.js +0 -15
- package/dist/helpers/objectMerge.d.ts +0 -5
- package/dist/helpers/objectMerge.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @scalar/oas-utils
|
|
2
2
|
|
|
3
|
+
## 0.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a298195: feat: add timestamp in request event type
|
|
8
|
+
- 326bd3d: fix: URL is not encoded when sent to the proxy
|
|
9
|
+
- 94e68ab: chore: upgrade typescript to 5.5
|
|
10
|
+
|
|
11
|
+
## 0.2.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- c20c7d0: feat: security schemes and requirements
|
|
16
|
+
|
|
3
17
|
## 0.2.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -14,14 +14,22 @@ declare const exteralDocumentationSchema: z.ZodObject<{
|
|
|
14
14
|
url: string;
|
|
15
15
|
description?: string | undefined;
|
|
16
16
|
}, {
|
|
17
|
-
url?: string | undefined;
|
|
18
17
|
description?: string | undefined;
|
|
18
|
+
url?: string | undefined;
|
|
19
19
|
}>;
|
|
20
20
|
export type ExternalDocumentation = z.infer<typeof exteralDocumentationSchema>;
|
|
21
21
|
declare const collectionSchema: z.ZodObject<{
|
|
22
22
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
23
23
|
spec: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
24
24
|
openapi: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"3.1.0">, z.ZodLiteral<"4.0.0">]>>>;
|
|
25
|
+
/**
|
|
26
|
+
* A declaration of which security mechanisms can be used across the API. The list of
|
|
27
|
+
* values includes alternative security requirement objects that can be used. Only
|
|
28
|
+
* one of the security requirement objects need to be satisfied to authorize a request.
|
|
29
|
+
* Individual operations can override this definition. To make security optional, an empty
|
|
30
|
+
* security requirement ({}) can be included in the array.
|
|
31
|
+
*/
|
|
32
|
+
security: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>>, "many">>>;
|
|
25
33
|
/** OAS info */
|
|
26
34
|
info: z.ZodOptional<z.ZodObject<{
|
|
27
35
|
/** REQUIRED. The title of the API. */
|
|
@@ -77,8 +85,8 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
77
85
|
}, "strip", z.ZodTypeAny, {
|
|
78
86
|
title: string;
|
|
79
87
|
version: string;
|
|
80
|
-
summary?: string | undefined;
|
|
81
88
|
description?: string | undefined;
|
|
89
|
+
summary?: string | undefined;
|
|
82
90
|
termsOfService?: string | undefined;
|
|
83
91
|
contact?: {
|
|
84
92
|
name?: string | undefined;
|
|
@@ -91,9 +99,9 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
91
99
|
url?: string | undefined;
|
|
92
100
|
} | undefined;
|
|
93
101
|
}, {
|
|
102
|
+
description?: string | undefined;
|
|
94
103
|
title?: string | undefined;
|
|
95
104
|
summary?: string | undefined;
|
|
96
|
-
description?: string | undefined;
|
|
97
105
|
termsOfService?: string | undefined;
|
|
98
106
|
contact?: {
|
|
99
107
|
name?: string | undefined;
|
|
@@ -125,8 +133,8 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
125
133
|
url: string;
|
|
126
134
|
description?: string | undefined;
|
|
127
135
|
}, {
|
|
128
|
-
url?: string | undefined;
|
|
129
136
|
description?: string | undefined;
|
|
137
|
+
url?: string | undefined;
|
|
130
138
|
}>>;
|
|
131
139
|
}, "strip", z.ZodTypeAny, {
|
|
132
140
|
name: string;
|
|
@@ -136,11 +144,11 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
136
144
|
description?: string | undefined;
|
|
137
145
|
} | undefined;
|
|
138
146
|
}, {
|
|
139
|
-
name?: string | undefined;
|
|
140
147
|
description?: string | undefined;
|
|
148
|
+
name?: string | undefined;
|
|
141
149
|
externalDocs?: {
|
|
142
|
-
url?: string | undefined;
|
|
143
150
|
description?: string | undefined;
|
|
151
|
+
url?: string | undefined;
|
|
144
152
|
} | undefined;
|
|
145
153
|
}>, "many">>;
|
|
146
154
|
externalDocs: z.ZodOptional<z.ZodObject<{
|
|
@@ -152,11 +160,12 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
152
160
|
url: string;
|
|
153
161
|
description?: string | undefined;
|
|
154
162
|
}, {
|
|
155
|
-
url?: string | undefined;
|
|
156
163
|
description?: string | undefined;
|
|
164
|
+
url?: string | undefined;
|
|
157
165
|
}>>;
|
|
158
166
|
}, "strip", z.ZodTypeAny, {
|
|
159
167
|
openapi: string;
|
|
168
|
+
security: Record<string, string[]>[];
|
|
160
169
|
serverUids: string[];
|
|
161
170
|
tags: {
|
|
162
171
|
name: string;
|
|
@@ -173,8 +182,8 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
173
182
|
info?: {
|
|
174
183
|
title: string;
|
|
175
184
|
version: string;
|
|
176
|
-
summary?: string | undefined;
|
|
177
185
|
description?: string | undefined;
|
|
186
|
+
summary?: string | undefined;
|
|
178
187
|
termsOfService?: string | undefined;
|
|
179
188
|
contact?: {
|
|
180
189
|
name?: string | undefined;
|
|
@@ -189,14 +198,15 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
189
198
|
} | undefined;
|
|
190
199
|
}, {
|
|
191
200
|
externalDocs?: {
|
|
192
|
-
url?: string | undefined;
|
|
193
201
|
description?: string | undefined;
|
|
202
|
+
url?: string | undefined;
|
|
194
203
|
} | undefined;
|
|
195
204
|
openapi?: string | undefined;
|
|
205
|
+
security?: Record<string, string[] | undefined>[] | undefined;
|
|
196
206
|
info?: {
|
|
207
|
+
description?: string | undefined;
|
|
197
208
|
title?: string | undefined;
|
|
198
209
|
summary?: string | undefined;
|
|
199
|
-
description?: string | undefined;
|
|
200
210
|
termsOfService?: string | undefined;
|
|
201
211
|
contact?: {
|
|
202
212
|
name?: string | undefined;
|
|
@@ -212,14 +222,28 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
212
222
|
} | undefined;
|
|
213
223
|
serverUids?: string[] | undefined;
|
|
214
224
|
tags?: {
|
|
215
|
-
name?: string | undefined;
|
|
216
225
|
description?: string | undefined;
|
|
226
|
+
name?: string | undefined;
|
|
217
227
|
externalDocs?: {
|
|
218
|
-
url?: string | undefined;
|
|
219
228
|
description?: string | undefined;
|
|
229
|
+
url?: string | undefined;
|
|
220
230
|
} | undefined;
|
|
221
231
|
}[] | undefined;
|
|
222
232
|
}>>>;
|
|
233
|
+
/**
|
|
234
|
+
* The currently selected security scheme key
|
|
235
|
+
* TODO eventually we will need to maintain one per request + collection but this will do for now
|
|
236
|
+
*/
|
|
237
|
+
selectedSecuritySchemes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
238
|
+
uid: z.ZodString;
|
|
239
|
+
flowKey: z.ZodOptional<z.ZodEnum<["implicit", "clientCredentials", "password", "authorizationCode"]>>;
|
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
|
241
|
+
uid: string;
|
|
242
|
+
flowKey?: "implicit" | "password" | "clientCredentials" | "authorizationCode" | undefined;
|
|
243
|
+
}, {
|
|
244
|
+
uid: string;
|
|
245
|
+
flowKey?: "implicit" | "password" | "clientCredentials" | "authorizationCode" | undefined;
|
|
246
|
+
}>, "many">>;
|
|
223
247
|
/** The currently selected server */
|
|
224
248
|
selectedServerUid: z.ZodDefault<z.ZodString>;
|
|
225
249
|
/** List of uids that correspond to collection requests or folders */
|
|
@@ -228,6 +252,7 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
228
252
|
uid: string;
|
|
229
253
|
spec: {
|
|
230
254
|
openapi: string;
|
|
255
|
+
security: Record<string, string[]>[];
|
|
231
256
|
serverUids: string[];
|
|
232
257
|
tags: {
|
|
233
258
|
name: string;
|
|
@@ -244,8 +269,8 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
244
269
|
info?: {
|
|
245
270
|
title: string;
|
|
246
271
|
version: string;
|
|
247
|
-
summary?: string | undefined;
|
|
248
272
|
description?: string | undefined;
|
|
273
|
+
summary?: string | undefined;
|
|
249
274
|
termsOfService?: string | undefined;
|
|
250
275
|
contact?: {
|
|
251
276
|
name?: string | undefined;
|
|
@@ -259,20 +284,25 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
259
284
|
} | undefined;
|
|
260
285
|
} | undefined;
|
|
261
286
|
};
|
|
287
|
+
selectedSecuritySchemes: {
|
|
288
|
+
uid: string;
|
|
289
|
+
flowKey?: "implicit" | "password" | "clientCredentials" | "authorizationCode" | undefined;
|
|
290
|
+
}[];
|
|
262
291
|
selectedServerUid: string;
|
|
263
292
|
childUids: string[];
|
|
264
293
|
}, {
|
|
265
294
|
uid?: string | undefined;
|
|
266
295
|
spec?: {
|
|
267
296
|
externalDocs?: {
|
|
268
|
-
url?: string | undefined;
|
|
269
297
|
description?: string | undefined;
|
|
298
|
+
url?: string | undefined;
|
|
270
299
|
} | undefined;
|
|
271
300
|
openapi?: string | undefined;
|
|
301
|
+
security?: Record<string, string[] | undefined>[] | undefined;
|
|
272
302
|
info?: {
|
|
303
|
+
description?: string | undefined;
|
|
273
304
|
title?: string | undefined;
|
|
274
305
|
summary?: string | undefined;
|
|
275
|
-
description?: string | undefined;
|
|
276
306
|
termsOfService?: string | undefined;
|
|
277
307
|
contact?: {
|
|
278
308
|
name?: string | undefined;
|
|
@@ -288,14 +318,18 @@ declare const collectionSchema: z.ZodObject<{
|
|
|
288
318
|
} | undefined;
|
|
289
319
|
serverUids?: string[] | undefined;
|
|
290
320
|
tags?: {
|
|
291
|
-
name?: string | undefined;
|
|
292
321
|
description?: string | undefined;
|
|
322
|
+
name?: string | undefined;
|
|
293
323
|
externalDocs?: {
|
|
294
|
-
url?: string | undefined;
|
|
295
324
|
description?: string | undefined;
|
|
325
|
+
url?: string | undefined;
|
|
296
326
|
} | undefined;
|
|
297
327
|
}[] | undefined;
|
|
298
328
|
} | undefined;
|
|
329
|
+
selectedSecuritySchemes?: {
|
|
330
|
+
uid: string;
|
|
331
|
+
flowKey?: "implicit" | "password" | "clientCredentials" | "authorizationCode" | undefined;
|
|
332
|
+
}[] | undefined;
|
|
299
333
|
selectedServerUid?: string | undefined;
|
|
300
334
|
childUids?: string[] | undefined;
|
|
301
335
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/collection/collection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/collection/collection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA+DvB;;;;;GAKG;AACH,QAAA,MAAM,0BAA0B;IAC9B,6GAA6G;;IAE7G,yFAAyF;;;;;;;;EAEzF,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAwC9E,QAAA,MAAM,gBAAgB;;;;QAjBpB;;;;;;WAMG;;QAEH,eAAe;;YA9Df,sCAAsC;;YAEtC,kCAAkC;;YAElC,4FAA4F;;YAE5F,oFAAoF;;YAEpF,mDAAmD;;gBAxBnD,+DAA+D;;gBAE/D,sFAAsF;;gBAEtF,0GAA0G;;;;;;;;;;;YAsB1G,mDAAmD;;gBA5CnD,mDAAmD;;gBAEnD,2GAA2G;;gBAE3G;;;mBAGG;;;;;;;;;;;YAuCH;;;eAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiDH,wDAAwD;;QAExD,eAAe;;YAzBf,qCAAqC;;YAErC,6FAA6F;;YAE7F,sDAAsD;;gBAnBtD,6GAA6G;;gBAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;YAFzF,6GAA6G;;YAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CzF;;;OAGG;;;;;;;;;;;IAiBH,oCAAoC;;IAEpC,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtE,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACzD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEhE,8BAA8B;AAC9B,eAAO,MAAM,gBAAgB,YAAa,iBAAiB,KAAG,UACd,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { securityRequirement } from '../security/security-requirement.js';
|
|
2
3
|
import { nanoidSchema } from '../shared/utility.js';
|
|
3
4
|
import { deepMerge } from '../../../helpers/deepMerge.js';
|
|
4
5
|
|
|
@@ -90,6 +91,14 @@ const specSchema = z.object({
|
|
|
90
91
|
.union([z.string(), z.literal('3.1.0'), z.literal('4.0.0')])
|
|
91
92
|
.optional()
|
|
92
93
|
.default('3.1.0'),
|
|
94
|
+
/**
|
|
95
|
+
* A declaration of which security mechanisms can be used across the API. The list of
|
|
96
|
+
* values includes alternative security requirement objects that can be used. Only
|
|
97
|
+
* one of the security requirement objects need to be satisfied to authorize a request.
|
|
98
|
+
* Individual operations can override this definition. To make security optional, an empty
|
|
99
|
+
* security requirement ({}) can be included in the array.
|
|
100
|
+
*/
|
|
101
|
+
security: z.array(securityRequirement).optional().default([]),
|
|
93
102
|
/** OAS info */
|
|
94
103
|
info: infoSchema.optional(),
|
|
95
104
|
/** Uids which refer to servers on the workspace base */
|
|
@@ -101,6 +110,24 @@ const specSchema = z.object({
|
|
|
101
110
|
const collectionSchema = z.object({
|
|
102
111
|
uid: nanoidSchema,
|
|
103
112
|
spec: specSchema.optional().default({}),
|
|
113
|
+
/**
|
|
114
|
+
* The currently selected security scheme key
|
|
115
|
+
* TODO eventually we will need to maintain one per request + collection but this will do for now
|
|
116
|
+
*/
|
|
117
|
+
selectedSecuritySchemes: z
|
|
118
|
+
.array(z.object({
|
|
119
|
+
uid: z.string(),
|
|
120
|
+
// Wasn't sure how to extract the keys from another schema so hard coded these for now
|
|
121
|
+
flowKey: z
|
|
122
|
+
.enum([
|
|
123
|
+
'implicit',
|
|
124
|
+
'clientCredentials',
|
|
125
|
+
'password',
|
|
126
|
+
'authorizationCode',
|
|
127
|
+
])
|
|
128
|
+
.optional(),
|
|
129
|
+
}))
|
|
130
|
+
.default([]),
|
|
104
131
|
/** The currently selected server */
|
|
105
132
|
selectedServerUid: z.string().default(''),
|
|
106
133
|
/** List of uids that correspond to collection requests or folders */
|
|
@@ -19,13 +19,15 @@ declare const cookieSchema: z.ZodObject<{
|
|
|
19
19
|
* immediately. If both Expires and Max-Age are set, Max-Age has precedence.
|
|
20
20
|
*/
|
|
21
21
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Indicates that the cookie should be stored using partitioned storage. See Cookies Having Independent Partitioned
|
|
23
24
|
* State (CHIPS) for more details.
|
|
24
25
|
*/
|
|
25
26
|
partitioned: z.ZodOptional<z.ZodBoolean>;
|
|
26
27
|
/** Indicates the path that must exist in the requested URL for the browser to send the Cookie header. */
|
|
27
28
|
path: z.ZodOptional<z.ZodString>;
|
|
28
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site
|
|
29
31
|
* request forgery attacks (CSRF).
|
|
30
32
|
*/
|
|
31
33
|
sameSite: z.ZodUnion<[z.ZodLiteral<"Lax">, z.ZodLiteral<"Strict">, z.ZodLiteral<"None">]>;
|
|
@@ -36,8 +38,8 @@ declare const cookieSchema: z.ZodObject<{
|
|
|
36
38
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
37
39
|
}, "strip", z.ZodTypeAny, {
|
|
38
40
|
value: string;
|
|
39
|
-
name: string;
|
|
40
41
|
uid: string;
|
|
42
|
+
name: string;
|
|
41
43
|
sameSite: "Lax" | "Strict" | "None";
|
|
42
44
|
path?: string | undefined;
|
|
43
45
|
domain?: string | undefined;
|
|
@@ -69,8 +71,8 @@ export type CookiePayload = z.input<typeof cookieSchema>;
|
|
|
69
71
|
/** Create cookie helper */
|
|
70
72
|
export declare const createCookie: (payload: CookiePayload) => {
|
|
71
73
|
value: string;
|
|
72
|
-
name: string;
|
|
73
74
|
uid: string;
|
|
75
|
+
name: string;
|
|
74
76
|
sameSite: "Lax" | "Strict" | "None";
|
|
75
77
|
path?: string | undefined;
|
|
76
78
|
domain?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/cookie/cookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,YAAY;;IAEhB,kGAAkG;;;IAGlG,yDAAyD;;IAEzD,oHAAoH;;IAEpH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;
|
|
1
|
+
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/cookie/cookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,YAAY;;IAEhB,kGAAkG;;;IAGlG,yDAAyD;;IAEzD,oHAAoH;;IAEpH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,yGAAyG;;IAEzG;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAA;AAEF;;;;GAIG;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;;;;;;;;;;;;CACP,CAAA"}
|
|
@@ -22,13 +22,15 @@ const cookieSchema = z.object({
|
|
|
22
22
|
* immediately. If both Expires and Max-Age are set, Max-Age has precedence.
|
|
23
23
|
*/
|
|
24
24
|
maxAge: z.number().optional(),
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Indicates that the cookie should be stored using partitioned storage. See Cookies Having Independent Partitioned
|
|
26
27
|
* State (CHIPS) for more details.
|
|
27
28
|
*/
|
|
28
29
|
partitioned: z.boolean().optional(),
|
|
29
30
|
/** Indicates the path that must exist in the requested URL for the browser to send the Cookie header. */
|
|
30
31
|
path: z.string().optional(),
|
|
31
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site
|
|
32
34
|
* request forgery attacks (CSRF).
|
|
33
35
|
*/
|
|
34
36
|
sameSite: z.union([z.literal('Lax'), z.literal('Strict'), z.literal('None')]),
|
|
@@ -16,8 +16,8 @@ declare const environmentSchema: z.ZodObject<{
|
|
|
16
16
|
}>, "many">>>;
|
|
17
17
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
name: string;
|
|
20
19
|
uid: string;
|
|
20
|
+
name: string;
|
|
21
21
|
color: string;
|
|
22
22
|
raw: string;
|
|
23
23
|
parsed: {
|
|
@@ -26,8 +26,8 @@ declare const environmentSchema: z.ZodObject<{
|
|
|
26
26
|
}[];
|
|
27
27
|
isDefault?: boolean | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
name?: string | undefined;
|
|
30
29
|
uid?: string | undefined;
|
|
30
|
+
name?: string | undefined;
|
|
31
31
|
color?: string | undefined;
|
|
32
32
|
raw?: string | undefined;
|
|
33
33
|
parsed?: {
|
|
@@ -41,8 +41,8 @@ export type Environment = z.infer<typeof environmentSchema>;
|
|
|
41
41
|
export type EnvironmentPayload = z.input<typeof environmentSchema>;
|
|
42
42
|
/** Create environment helper */
|
|
43
43
|
export declare const createEnvironment: (payload: EnvironmentPayload) => {
|
|
44
|
-
name: string;
|
|
45
44
|
uid: string;
|
|
45
|
+
name: string;
|
|
46
46
|
color: string;
|
|
47
47
|
raw: string;
|
|
48
48
|
parsed: {
|
|
@@ -12,14 +12,14 @@ declare const folderSchema: z.ZodObject<{
|
|
|
12
12
|
*/
|
|
13
13
|
childUids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
name: string;
|
|
16
15
|
uid: string;
|
|
16
|
+
name: string;
|
|
17
17
|
childUids: string[];
|
|
18
18
|
description?: string | undefined;
|
|
19
19
|
}, {
|
|
20
|
-
name?: string | undefined;
|
|
21
|
-
description?: string | undefined;
|
|
22
20
|
uid?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
name?: string | undefined;
|
|
23
23
|
childUids?: string[] | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
/** Folders will correspond to the x- */
|
|
@@ -27,8 +27,8 @@ export type Folder = z.infer<typeof folderSchema>;
|
|
|
27
27
|
export type FolderPayload = z.input<typeof folderSchema>;
|
|
28
28
|
/** Create folder helper */
|
|
29
29
|
export declare const createFolder: (payload: FolderPayload) => {
|
|
30
|
-
name: string;
|
|
31
30
|
uid: string;
|
|
31
|
+
name: string;
|
|
32
32
|
childUids: string[];
|
|
33
33
|
description?: string | undefined;
|
|
34
34
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/security/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Security Requirement
|
|
4
|
+
* Lists the required security schemes to execute this operation OR the whole collection/spec.
|
|
5
|
+
* The name used for each property MUST correspond to a security scheme declared in the Security
|
|
6
|
+
* Schemes under the Components Object.
|
|
7
|
+
*
|
|
8
|
+
* The key (name) here will be matched to the key of the securityScheme for linking
|
|
9
|
+
*
|
|
10
|
+
* @see https://spec.openapis.org/oas/latest.html#security-requirement-object
|
|
11
|
+
*/
|
|
12
|
+
export declare const securityRequirement: z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>>;
|
|
13
|
+
//# sourceMappingURL=security-requirement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-requirement.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/security/security-requirement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,wFAG/B,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Security Requirement
|
|
5
|
+
* Lists the required security schemes to execute this operation OR the whole collection/spec.
|
|
6
|
+
* The name used for each property MUST correspond to a security scheme declared in the Security
|
|
7
|
+
* Schemes under the Components Object.
|
|
8
|
+
*
|
|
9
|
+
* The key (name) here will be matched to the key of the securityScheme for linking
|
|
10
|
+
*
|
|
11
|
+
* @see https://spec.openapis.org/oas/latest.html#security-requirement-object
|
|
12
|
+
*/
|
|
13
|
+
const securityRequirement = z.record(z.string(), z.array(z.string()).optional().default([]));
|
|
14
|
+
|
|
15
|
+
export { securityRequirement };
|