@scalar/oas-utils 0.2.18 → 0.2.20

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @scalar/oas-utils
2
2
 
3
+ ## 0.2.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [de25d01]
8
+ - @scalar/themes@0.9.17
9
+
10
+ ## 0.2.19
11
+
12
+ ### Patch Changes
13
+
14
+ - bf2895e: feat(api-client): add multiple auth to api client
15
+
3
16
  ## 0.2.18
4
17
 
5
18
  ### Patch Changes
@@ -230,20 +230,8 @@ declare const collectionSchema: z.ZodObject<{
230
230
  } | undefined;
231
231
  }[] | undefined;
232
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">>;
233
+ /** A dictionary which maps the openapi spec name keys to the security-scheme UID's for lookup */
234
+ securitySchemeDict: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
247
235
  /** The currently selected server */
248
236
  selectedServerUid: z.ZodDefault<z.ZodString>;
249
237
  /** List of uids that correspond to collection requests or folders */
@@ -284,10 +272,7 @@ declare const collectionSchema: z.ZodObject<{
284
272
  } | undefined;
285
273
  } | undefined;
286
274
  };
287
- selectedSecuritySchemes: {
288
- uid: string;
289
- flowKey?: "implicit" | "password" | "clientCredentials" | "authorizationCode" | undefined;
290
- }[];
275
+ securitySchemeDict: Record<string, string>;
291
276
  selectedServerUid: string;
292
277
  childUids: string[];
293
278
  }, {
@@ -326,10 +311,7 @@ declare const collectionSchema: z.ZodObject<{
326
311
  } | undefined;
327
312
  }[] | undefined;
328
313
  } | undefined;
329
- selectedSecuritySchemes?: {
330
- uid: string;
331
- flowKey?: "implicit" | "password" | "clientCredentials" | "authorizationCode" | undefined;
332
- }[] | undefined;
314
+ securitySchemeDict?: Record<string, string> | undefined;
333
315
  selectedServerUid?: string | undefined;
334
316
  childUids?: string[] | undefined;
335
317
  }>;
@@ -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;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;;;;;;;;;;;;;;;;;;;;;;;;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E7F,sDAAsD;;gBAnBtD,6GAA6G;;gBAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;YAFzF,6GAA6G;;YAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CzF,iGAAiG;;IAEjG,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"}
@@ -110,24 +110,8 @@ const specSchema = z.object({
110
110
  const collectionSchema = z.object({
111
111
  uid: nanoidSchema,
112
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([]),
113
+ /** A dictionary which maps the openapi spec name keys to the security-scheme UID's for lookup */
114
+ securitySchemeDict: z.record(z.string(), z.string()).optional().default({}),
131
115
  /** The currently selected server */
132
116
  selectedServerUid: z.string().default(''),
133
117
  /** List of uids that correspond to collection requests or folders */
@@ -1,2 +1,2 @@
1
1
  export { securityRequirement } from './security-requirement.js';
2
- export { createSecurityScheme } from './security-schemes.js';
2
+ export { createSecurityScheme, securitySchemeApiKeyIn } from './security-schemes.js';