@scalar/api-client 2.23.0 → 2.23.3

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/style.css +1 -1
  3. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +13 -3
  4. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +68 -68
  6. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +54 -53
  8. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +5 -3
  9. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
  10. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +1 -1
  11. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +3 -2
  12. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  13. package/dist/v2/blocks/operation-block/index.d.ts +2 -1
  14. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
  15. package/dist/v2/blocks/operation-block/index.js +7 -4
  16. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +3 -2
  17. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  18. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
  19. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +3 -2
  20. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  21. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
  22. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +78 -78
  23. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +2 -2
  24. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
  25. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +3 -2
  26. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  27. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +2 -2
  28. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
  29. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +8 -5
  30. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  32. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +4 -4
  33. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +49 -45
  35. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +63 -51
  37. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  38. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -2
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +4 -2
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  41. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +18 -181
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +118 -107
  44. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -2
  45. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  46. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +30 -33
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +11 -178
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  49. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -110
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +5 -29
  52. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +6 -0
  53. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +85 -0
  55. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +9 -0
  56. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -0
  57. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +15 -0
  58. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +3 -2
  59. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  60. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +23 -0
  61. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -0
  62. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -2
  63. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  64. package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -6
  65. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  66. package/dist/v2/features/app/App.vue.js +51 -42
  67. package/dist/v2/features/app/app-state.d.ts +1 -1
  68. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  69. package/dist/v2/features/app/app-state.js +40 -38
  70. package/dist/v2/features/app/helpers/routes.d.ts +1 -1
  71. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  72. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  73. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  74. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -11
  75. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts.map +1 -1
  76. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.js +3 -1
  77. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  78. package/dist/v2/features/modal/Modal.vue.js +1 -1
  79. package/dist/v2/features/modal/Modal.vue2.js +14 -12
  80. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  81. package/dist/v2/features/operation/Operation.vue.js +44 -35
  82. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +3 -5
  83. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
  84. package/dist/v2/workspace-events.d.ts.map +1 -1
  85. package/dist/v2/workspace-events.js +116 -109
  86. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  87. package/package.json +17 -17
  88. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +0 -2
  89. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +0 -1
  90. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts +0 -8
  91. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map +0 -1
  92. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js +0 -33
  93. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts +0 -7
  94. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts.map +0 -1
  95. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.js +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"OperationCodeSample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/OperationCodeSample.vue"],"names":[],"mappings":"AAycA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AASrE,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,yCAAyC,CAAA;AAMhD,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,WAAW,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;IACpC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IACpC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAA;IAC3B;;OAEG;IACH,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,eAAe,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;CAChC,CAAA;AAED;;;;;;;;GAQG;;YAqBO,MAAM,OAAO;YACb,MAAM,OAAO;;AArBvB,wBA2fC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"OperationCodeSample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/OperationCodeSample.vue"],"names":[],"mappings":"AAycA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AASrE,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAM7G,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,WAAW,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;IACpC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IACpC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAA;IAC3B;;OAEG;IACH,eAAe,EAAE,0BAA0B,EAAE,CAAA;IAC7C;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,eAAe,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;CAChC,CAAA;AAED;;;;;;;;GAQG;;YAqBO,MAAM,OAAO;YACb,MAAM,OAAO;;AArBvB,wBA2fC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./OperationCodeSample.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f278dde0"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8dad5801"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -2,7 +2,8 @@ import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
2
  import type { AvailableClient } from '@scalar/snippetz';
3
3
  import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
4
4
  import type { XCodeSample } from '@scalar/workspace-store/schemas/extensions/operation';
5
- import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
5
+ import type { OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
+ import type { SecuritySchemeObjectSecret } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
6
7
  import { type CustomCodeSampleId } from './generate-client-options.js';
7
8
  type GenerateCodeSnippetProps = {
8
9
  /** The selected client/language for code generation (e.g., 'node/fetch') or a custom code sample ID. */
@@ -20,7 +21,7 @@ type GenerateCodeSnippetProps = {
20
21
  /** The API endpoint path (e.g., '/users/{id}'). */
21
22
  path: string;
22
23
  /** Array of security schemes to apply to the request (e.g., API keys, OAuth). */
23
- securitySchemes: SecuritySchemeObject[];
24
+ securitySchemes: SecuritySchemeObjectSecret[];
24
25
  /** The server object defining the base URL for the API request. */
25
26
  server: ServerObject | null;
26
27
  /** Workspace + document cookies */
@@ -1 +1 @@
1
- {"version":3,"file":"generate-code-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/generate-code-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,kBAAkB,CAAA;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAA;AACvF,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,2BAA2B,CAAA;AAErF,KAAK,wBAAwB,GAAG;IAC9B,wGAAwG;IACxG,QAAQ,EAAE,eAAe,GAAG,kBAAkB,GAAG,SAAS,CAAA;IAC1D,qFAAqF;IACrF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,mFAAmF;IACnF,iBAAiB,EAAE,WAAW,EAAE,CAAA;IAChC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gEAAgE;IAChE,MAAM,EAAE,UAAU,CAAA;IAClB,wEAAwE;IACxE,SAAS,EAAE,eAAe,CAAA;IAC1B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,mEAAmE;IACnE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mCAAmC;IACnC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;IAC/B,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,GAAI,gJAYjC,wBAAwB,KAAG,MAuC7B,CAAA"}
1
+ {"version":3,"file":"generate-code-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/generate-code-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,kBAAkB,CAAA;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAA;AACvF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGjH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAG7G,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,2BAA2B,CAAA;AAErF,KAAK,wBAAwB,GAAG;IAC9B,wGAAwG;IACxG,QAAQ,EAAE,eAAe,GAAG,kBAAkB,GAAG,SAAS,CAAA;IAC1D,qFAAqF;IACrF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,mFAAmF;IACnF,iBAAiB,EAAE,WAAW,EAAE,CAAA;IAChC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gEAAgE;IAChE,MAAM,EAAE,UAAU,CAAA;IAClB,wEAAwE;IACxE,SAAS,EAAE,eAAe,CAAA;IAC1B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,eAAe,EAAE,0BAA0B,EAAE,CAAA;IAC7C,mEAAmE;IACnE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mCAAmC;IACnC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;IAC/B,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,GAAI,gJAYjC,wBAAwB,KAAG,MAuC7B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAichG,KAAK,2BAA2B,GAAG;IACjC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,CAAA;AAYD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,YAAY,EACpB,UAAU,2BAA2B,EACrC,uCAKG,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CACtB,CAAM,KACN,OAuJF,CAAA"}
1
+ {"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAochG,KAAK,2BAA2B,GAAG;IACjC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,CAAA;AAYD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,YAAY,EACpB,UAAU,2BAA2B,EACrC,uCAKG,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CACtB,CAAM,KACN,OAuJF,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { isDefined as v } from "@scalar/helpers/array/is-defined";
2
2
  import { getRaw as E } from "@scalar/json-magic/magic-proxy";
3
- import { getResolvedRef as m } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
3
  import { unpackOverridesProxy as N } from "@scalar/workspace-store/helpers/overrides-proxy";
5
- const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date()).toISOString(), q = j.split("T")[0], k = j.split("T")[1].split(".")[0], I = {
4
+ import { resolve as y } from "@scalar/workspace-store/resolve";
5
+ const M = 10, P = 10, R = "additionalProperty", j = (/* @__PURE__ */ new Date()).toISOString(), q = j.split("T")[0], k = j.split("T")[1].split(".")[0], I = {
6
6
  "date-time": j,
7
7
  date: q,
8
8
  email: "hello@example.com",
@@ -42,11 +42,11 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
42
42
  return S.set(t, l), l;
43
43
  }
44
44
  }
45
- }, a = (t, i, o) => {
45
+ }, d = (t, i, o) => {
46
46
  if (typeof i != "object" || i === null)
47
47
  return i;
48
- const l = E(N(t)), d = A.get(l) ?? /* @__PURE__ */ new Map();
49
- return d && d.set(o, i), A.set(l, d), i;
48
+ const l = E(N(t)), f = A.get(l) ?? /* @__PURE__ */ new Map();
49
+ return f && f.set(o, i), A.set(l, f), i;
50
50
  }, C = (t) => !!(t.allOf || t.oneOf || t.anyOf), F = (t, i, o, l) => {
51
51
  if (t.deprecated || l?.mode === "write" && t.readOnly || l?.mode === "read" && t.writeOnly)
52
52
  return !0;
@@ -54,28 +54,28 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
54
54
  return !1;
55
55
  const r = o ?? t.title ?? "", e = _(i);
56
56
  return !(e ? e.has(r) : !1);
57
- }, R = (t, i) => Array.isArray(t) && Array.isArray(i) ? [...t, ...i] : t && typeof t == "object" && i && typeof i == "object" ? { ...t, ...i } : i, L = (t, i, o, l, d) => {
57
+ }, T = (t, i) => Array.isArray(t) && Array.isArray(i) ? [...t, ...i] : t && typeof t == "object" && i && typeof i == "object" ? { ...t, ...i } : i, L = (t, i, o, l, f) => {
58
58
  const r = {};
59
59
  if ("properties" in t && t.properties) {
60
60
  const e = Object.keys(t.properties), n = o > 3 ? Math.min(P, e.length) : e.length;
61
- for (let p = 0; p < n; p++) {
62
- const x = e[p], u = m(t.properties[x]);
61
+ for (let a = 0; a < n; a++) {
62
+ const b = e[a], u = y.schema(t.properties[b]);
63
63
  if (!u)
64
64
  continue;
65
- const s = i?.xml && "xml" in u ? u.xml?.name : void 0, y = c(u, i, {
65
+ const c = i?.xml && "xml" in u ? u.xml?.name : void 0, m = s(u, i, {
66
66
  level: o + 1,
67
67
  parentSchema: t,
68
- name: x,
68
+ name: b,
69
69
  seen: l
70
70
  });
71
- typeof y < "u" && (r[s ?? x] = y);
71
+ typeof m < "u" && (r[c ?? b] = m);
72
72
  }
73
73
  o > 3 && e.length > P && (r["..."] = "[Additional Properties Truncated]");
74
74
  }
75
75
  if ("patternProperties" in t && t.patternProperties)
76
76
  for (const e of Object.keys(t.patternProperties)) {
77
- const n = m(t.patternProperties[e]);
78
- n && (r[e] = c(n, i, {
77
+ const n = y.schema(t.patternProperties[e]);
78
+ n && (r[e] = s(n, i, {
79
79
  level: o + 1,
80
80
  parentSchema: t,
81
81
  name: e,
@@ -83,8 +83,8 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
83
83
  }));
84
84
  }
85
85
  if ("additionalProperties" in t && t.additionalProperties) {
86
- const e = m(t.additionalProperties), n = t.additionalProperties === !0 || typeof t.additionalProperties == "object" && Object.keys(t.additionalProperties).length === 0, p = typeof e == "object" && "x-additionalPropertiesName" in e && typeof e["x-additionalPropertiesName"] == "string" && e["x-additionalPropertiesName"].trim().length > 0 ? e["x-additionalPropertiesName"].trim() : M;
87
- r[p] = n ? "anything" : typeof e == "object" ? c(e, i, {
86
+ const e = typeof t.additionalProperties == "boolean" ? t.additionalProperties : y.schema(t.additionalProperties), n = t.additionalProperties === !0 || typeof t.additionalProperties == "object" && Object.keys(t.additionalProperties).length === 0, a = typeof e == "object" && "x-additionalPropertiesName" in e && typeof e["x-additionalPropertiesName"] == "string" && e["x-additionalPropertiesName"].trim().length > 0 ? e["x-additionalPropertiesName"].trim() : R;
87
+ r[a] = n ? "anything" : typeof e == "object" ? s(e, i, {
88
88
  level: o + 1,
89
89
  seen: l
90
90
  }) : "anything";
@@ -92,7 +92,7 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
92
92
  if (t.oneOf?.[0])
93
93
  Object.assign(
94
94
  r,
95
- c(m(t.oneOf[0]), i, {
95
+ s(y.schema(t.oneOf[0]), i, {
96
96
  level: o + 1,
97
97
  seen: l
98
98
  })
@@ -100,7 +100,7 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
100
100
  else if (t.anyOf?.[0])
101
101
  Object.assign(
102
102
  r,
103
- c(m(t.anyOf[0]), i, {
103
+ s(y.schema(t.anyOf[0]), i, {
104
104
  level: o + 1,
105
105
  seen: l
106
106
  })
@@ -108,67 +108,67 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
108
108
  else if (Array.isArray(t.allOf) && t.allOf.length > 0) {
109
109
  let e = r;
110
110
  for (const n of t.allOf) {
111
- const p = c(m(n), i, {
111
+ const a = s(y.schema(n), i, {
112
112
  level: o + 1,
113
113
  parentSchema: t,
114
114
  seen: l
115
115
  });
116
- e = R(e, p);
116
+ e = T(e, a);
117
117
  }
118
118
  e && typeof e == "object" && Object.assign(r, e);
119
119
  }
120
120
  if (i?.xml && "xml" in t && t.xml?.name && o === 0) {
121
121
  const e = {};
122
- return e[t.xml.name] = r, a(t, e, d);
122
+ return e[t.xml.name] = r, d(t, e, f);
123
123
  }
124
- return a(t, r, d);
125
- }, X = (t, i, o, l, d) => {
126
- const r = "items" in t ? m(t.items) : void 0, e = r && typeof r == "object" && "xml" in r ? r.xml?.name : void 0, n = !!(i?.xml && "xml" in t && t.xml?.wrapped && e);
124
+ return d(t, r, f);
125
+ }, X = (t, i, o, l, f) => {
126
+ const r = "items" in t ? y.schema(t.items) : void 0, e = r && typeof r == "object" && "xml" in r ? r.xml?.name : void 0, n = !!(i?.xml && "xml" in t && t.xml?.wrapped && e);
127
127
  if (t.example !== void 0)
128
- return a(t, n ? { [e]: t.example } : t.example, d);
128
+ return d(t, n ? { [e]: t.example } : t.example, f);
129
129
  if (r && typeof r == "object") {
130
130
  if (Array.isArray(r.allOf) && r.allOf.length > 0) {
131
- const s = r.allOf.filter(v), y = m(s[0]);
132
- if (y && typeof y == "object" && "type" in y && y.type === "object") {
133
- const g = c({ type: "object", allOf: s }, i, {
131
+ const c = r.allOf.filter(v), m = y.schema(c[0]);
132
+ if (m && typeof m == "object" && "type" in m && m.type === "object") {
133
+ const g = s({ type: "object", allOf: c }, i, {
134
134
  level: o + 1,
135
135
  parentSchema: t,
136
136
  seen: l
137
137
  });
138
- return a(t, n ? [{ [e]: g }] : [g], d);
138
+ return d(t, n ? [{ [e]: g }] : [g], f);
139
139
  }
140
- const O = s.map(
141
- (f) => c(m(f), i, {
140
+ const O = c.map(
141
+ (p) => s(y.schema(p), i, {
142
142
  level: o + 1,
143
143
  parentSchema: t,
144
144
  seen: l
145
145
  })
146
146
  ).filter(v);
147
- return a(
147
+ return d(
148
148
  t,
149
- n ? O.map((f) => ({ [e]: f })) : O,
150
- d
149
+ n ? O.map((p) => ({ [e]: p })) : O,
150
+ f
151
151
  );
152
152
  }
153
153
  const u = r.anyOf || r.oneOf;
154
154
  if (u && u.length > 0) {
155
- const s = u[0], y = c(m(s), i, {
155
+ const c = u[0], m = s(y.schema(c), i, {
156
156
  level: o + 1,
157
157
  parentSchema: t,
158
158
  seen: l
159
159
  });
160
- return a(t, n ? [{ [e]: y }] : [y], d);
160
+ return d(t, n ? [{ [e]: m }] : [m], f);
161
161
  }
162
162
  }
163
- const p = r && typeof r == "object" && ("type" in r && r.type === "object" || "properties" in r), x = r && typeof r == "object" && ("type" in r && r.type === "array" || "items" in r);
164
- if (r && typeof r == "object" && ("type" in r && r.type || p || x)) {
165
- const u = c(r, i, {
163
+ const a = r && typeof r == "object" && ("type" in r && r.type === "object" || "properties" in r), b = r && typeof r == "object" && ("type" in r && r.type === "array" || "items" in r);
164
+ if (r && typeof r == "object" && ("type" in r && r.type || a || b)) {
165
+ const u = s(r, i, {
166
166
  level: o + 1,
167
167
  seen: l
168
168
  });
169
- return a(t, n ? [{ [e]: u }] : [u], d);
169
+ return d(t, n ? [{ [e]: u }] : [u], f);
170
170
  }
171
- return a(t, [], d);
171
+ return d(t, [], f);
172
172
  }, U = (t, i, o) => {
173
173
  if ("type" in t && t.type && !Array.isArray(t.type))
174
174
  switch (t.type) {
@@ -212,87 +212,87 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
212
212
  mode: t?.mode,
213
213
  variables: t?.variables,
214
214
  omitEmptyAndOptionalProperties: t?.omitEmptyAndOptionalProperties
215
- }), c = (t, i, {
215
+ }), s = (t, i, {
216
216
  level: o = 0,
217
217
  parentSchema: l,
218
- name: d,
218
+ name: f,
219
219
  seen: r = /* @__PURE__ */ new WeakSet()
220
220
  } = {}) => {
221
- const e = m(t);
221
+ const e = y.schema(t);
222
222
  if (!v(e))
223
223
  return;
224
224
  const n = E(N(e));
225
225
  if (r.has(n))
226
226
  return;
227
227
  r.add(n);
228
- const p = z(i), x = A.get(n)?.get(p);
229
- if (typeof x < "u")
230
- return r.delete(n), x;
231
- if (o > D)
228
+ const a = z(i), b = A.get(n)?.get(a);
229
+ if (typeof b < "u")
230
+ return r.delete(n), b;
231
+ if (o > M)
232
232
  return r.delete(n), "[Max Depth Exceeded]";
233
233
  const u = !!i?.emptyString;
234
- if (F(e, l, d, i)) {
234
+ if (F(e, l, f, i)) {
235
235
  r.delete(n);
236
236
  return;
237
237
  }
238
238
  if ("x-variable" in e && e["x-variable"]) {
239
- const f = i?.variables?.[e["x-variable"]];
240
- if (f !== void 0)
241
- return "type" in e && (e.type === "number" || e.type === "integer") ? (r.delete(n), a(e, Number(f), p)) : (r.delete(n), a(e, f, p));
239
+ const p = i?.variables?.[e["x-variable"]];
240
+ if (p !== void 0)
241
+ return "type" in e && (e.type === "number" || e.type === "integer") ? (r.delete(n), d(e, Number(p), a)) : (r.delete(n), d(e, p, a));
242
242
  }
243
243
  if (Array.isArray(e.examples) && e.examples.length > 0)
244
- return r.delete(n), a(e, e.examples[0], p);
244
+ return r.delete(n), d(e, e.examples[0], a);
245
245
  if (e.example !== void 0)
246
- return r.delete(n), a(e, e.example, p);
246
+ return r.delete(n), d(e, e.example, a);
247
247
  if (e.default !== void 0)
248
- return r.delete(n), a(e, e.default, p);
248
+ return r.delete(n), d(e, e.default, a);
249
249
  if (e.const !== void 0)
250
- return r.delete(n), a(e, e.const, p);
250
+ return r.delete(n), d(e, e.const, a);
251
251
  if (Array.isArray(e.enum) && e.enum.length > 0)
252
- return r.delete(n), a(e, e.enum[0], p);
252
+ return r.delete(n), d(e, e.enum[0], a);
253
253
  if ("properties" in e || "type" in e && e.type === "object") {
254
- const f = L(e, i, o, r, p);
255
- return r.delete(n), f;
254
+ const p = L(e, i, o, r, a);
255
+ return r.delete(n), p;
256
256
  }
257
257
  if ("type" in e && e.type === "array" || "items" in e) {
258
- const f = X(e, i, o, r, p);
259
- return r.delete(n), f;
258
+ const p = X(e, i, o, r, a);
259
+ return r.delete(n), p;
260
260
  }
261
- const s = U(e, u, i?.emptyString);
262
- if (s !== void 0)
263
- return r.delete(n), a(e, s, p);
264
- const y = e.oneOf || e.anyOf;
265
- if (Array.isArray(y) && y.length > 0) {
266
- for (const f of y) {
267
- const g = m(f);
261
+ const c = U(e, u, i?.emptyString);
262
+ if (c !== void 0)
263
+ return r.delete(n), d(e, c, a);
264
+ const m = e.oneOf || e.anyOf;
265
+ if (Array.isArray(m) && m.length > 0) {
266
+ for (const p of m) {
267
+ const g = y.schema(p);
268
268
  if (g && (!("type" in g) || g.type !== "null"))
269
- return r.delete(n), a(
269
+ return r.delete(n), d(
270
270
  e,
271
- c(g, i, {
271
+ s(g, i, {
272
272
  level: o + 1,
273
273
  seen: r
274
274
  }),
275
- p
275
+ a
276
276
  );
277
277
  }
278
- return r.delete(n), a(e, null, p);
278
+ return r.delete(n), d(e, null, a);
279
279
  }
280
280
  if (Array.isArray(e.allOf) && e.allOf.length > 0) {
281
- let f;
281
+ let p;
282
282
  const g = e.allOf;
283
- for (const T of g) {
284
- const b = c(T, i, {
283
+ for (const D of g) {
284
+ const x = s(D, i, {
285
285
  level: o + 1,
286
286
  parentSchema: e,
287
287
  seen: r
288
288
  });
289
- f === void 0 ? f = b : f && typeof f == "object" && b && typeof b == "object" ? f = R(f, b) : b !== void 0 && (f = b);
289
+ p === void 0 ? p = x : p && typeof p == "object" && x && typeof x == "object" ? p = T(p, x) : x !== void 0 && (p = x);
290
290
  }
291
- return r.delete(n), a(e, f ?? null, p);
291
+ return r.delete(n), d(e, p ?? null, a);
292
292
  }
293
293
  const O = W(e, u, i?.emptyString);
294
- return O !== void 0 ? (r.delete(n), a(e, O, p)) : (r.delete(n), a(e, null, p));
294
+ return O !== void 0 ? (r.delete(n), d(e, O, a)) : (r.delete(n), d(e, null, a));
295
295
  };
296
296
  export {
297
- c as getExampleFromSchema
297
+ s as getExampleFromSchema
298
298
  };
@@ -1,4 +1,4 @@
1
- import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
1
+ import type { SecuritySchemeObjectSecret } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
2
2
  /** Extract secrets from security schemes */
3
- export declare const getSecrets: (securitySchemes: SecuritySchemeObject[]) => string[];
3
+ export declare const getSecrets: (securitySchemes: SecuritySchemeObjectSecret[]) => string[];
4
4
  //# sourceMappingURL=get-secrets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-secrets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAGxG,4CAA4C;AAC5C,eAAO,MAAM,UAAU,GAAI,iBAAiB,oBAAoB,EAAE,KAAG,MAAM,EAqBvD,CAAA"}
1
+ {"version":3,"file":"get-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-secrets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAE7G,4CAA4C;AAC5C,eAAO,MAAM,UAAU,GAAI,iBAAiB,0BAA0B,EAAE,KAAG,MAAM,EAqB7D,CAAA"}
@@ -1,7 +1,8 @@
1
1
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
2
  import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
3
- import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ import type { OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
4
  import type { Request as HarRequest } from 'har-format';
5
+ import type { SecuritySchemeObjectSecret } from '../../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
5
6
  export type OperationToHarProps = {
6
7
  /** OpenAPI Operation object */
7
8
  operation: OperationObject;
@@ -25,7 +26,7 @@ export type OperationToHarProps = {
25
26
  /** OpenAPI Server object */
26
27
  server?: ServerObject | null;
27
28
  /** OpenAPI SecurityScheme objects which are applicable to the operation */
28
- securitySchemes?: SecuritySchemeObject[];
29
+ securitySchemes?: SecuritySchemeObjectSecret[];
29
30
  /** Workspace + document cookies */
30
31
  globalCookies?: XScalarCookie[];
31
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"operation-to-har.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAUvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,+BAA+B;IAC/B,SAAS,EAAE,eAAe,CAAA;IAC1B,mCAAmC;IACnC,MAAM,EAAE,UAAU,CAAA;IAClB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAC5B,2EAA2E;IAC3E,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC,mCAAmC;IACnC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;IAC/B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc,GAAI,mHAU5B,mBAAmB,KAAG,UA+FxB,CAAA"}
1
+ {"version":3,"file":"operation-to-har.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AACjH,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAIvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAO7G,MAAM,MAAM,mBAAmB,GAAG;IAChC,+BAA+B;IAC/B,SAAS,EAAE,eAAe,CAAA;IAC1B,mCAAmC;IACnC,MAAM,EAAE,UAAU,CAAA;IAClB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAC5B,2EAA2E;IAC3E,eAAe,CAAC,EAAE,0BAA0B,EAAE,CAAA;IAC9C,mCAAmC;IACnC,aAAa,CAAC,EAAE,aAAa,EAAE,CAAA;IAC/B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc,GAAI,mHAU5B,mBAAmB,KAAG,UA+FxB,CAAA"}
@@ -1,5 +1,5 @@
1
- import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
1
  import type { Request as HarRequest } from 'har-format';
2
+ import type { SecuritySchemeObjectSecret } from '../../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
3
3
  type ProcessedSecuritySchemesReturn = {
4
4
  headers: HarRequest['headers'];
5
5
  queryString: HarRequest['queryString'];
@@ -10,6 +10,6 @@ type ProcessedSecuritySchemesReturn = {
10
10
  *
11
11
  * TODO: we probably want to be able to disable YOUR_SECRET_TOKEN placeholder text + or allow it to be customzied
12
12
  */
13
- export declare const processSecuritySchemes: (securitySchemes: SecuritySchemeObject[]) => ProcessedSecuritySchemesReturn;
13
+ export declare const processSecuritySchemes: (securitySchemes: SecuritySchemeObjectSecret[]) => ProcessedSecuritySchemesReturn;
14
14
  export {};
15
15
  //# sourceMappingURL=process-security-schemes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-security-schemes.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AACxG,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAGvD,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;IAC9B,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;IACtC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;CAC/B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,iBAAiB,oBAAoB,EAAE,KAAG,8BAuEhF,CAAA"}
1
+ {"version":3,"file":"process-security-schemes.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAGvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAE7G,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;IAC9B,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;IACtC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;CAC/B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,iBAAiB,0BAA0B,EAAE,KAC5C,8BAuEF,CAAA"}
@@ -1,22 +1,25 @@
1
1
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
2
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
+ import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth';
3
4
  import type { AuthMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
4
5
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
5
6
  import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
6
- import type { OpenApiDocument, OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
7
+ import type { OpenApiDocument, OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
7
8
  import type { ClientLayout } from '../../../hooks/index.js';
8
9
  import type { ClientOptionGroup } from '../../../v2/blocks/operation-code-sample/index.js';
10
+ import { type MergedSecuritySchemes } from '../../../v2/blocks/scalar-auth-selector-block/index.js';
11
+ import type { SecuritySchemeObjectSecret } from '../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
9
12
  import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
10
13
  export type ExtendedScalarCookie = XScalarCookie & {
11
14
  location: 'document' | 'workspace';
12
15
  };
13
16
  type __VLS_Props = {
14
- selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
15
17
  authMeta: AuthMeta;
16
18
  clientOptions: ClientOptionGroup[];
17
19
  environment: XScalarEnvironment;
18
20
  eventBus: WorkspaceEventBus;
19
21
  exampleKey: string;
22
+ globalCookies: ExtendedScalarCookie[];
20
23
  layout: ClientLayout;
21
24
  method: HttpMethod;
22
25
  operation: OperationObject;
@@ -24,11 +27,11 @@ type __VLS_Props = {
24
27
  plugins: ClientPlugin[];
25
28
  proxyUrl: string;
26
29
  securityRequirements: OpenApiDocument['security'];
27
- securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
30
+ securitySchemes: MergedSecuritySchemes;
28
31
  selectedClient: WorkspaceStore['workspace']['x-scalar-default-client'];
29
- selectedSecuritySchemes: SecuritySchemeObject[];
32
+ selectedSecurity: SelectedSecurity;
33
+ selectedSecuritySchemes: SecuritySchemeObjectSecret[];
30
34
  server: ServerObject | null;
31
- globalCookies: ExtendedScalarCookie[];
32
35
  };
33
36
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
37
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AAuiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAEV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAW1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAWxD,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IACjD,QAAQ,EAAE,UAAU,GAAG,WAAW,CAAA;CACnC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,uBAAuB,EAAE,oBAAoB,EAAE,CAAA;IAC/C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,aAAa,EAAE,oBAAoB,EAAE,CAAA;CACtC,CAAC;;AAmqBF,wBAMG"}
1
+ {"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AA0iBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EAEV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAU1E,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAC7G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAWxD,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IACjD,QAAQ,EAAE,UAAU,GAAG,WAAW,CAAA;CACnC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,oBAAoB,EAAE,CAAA;IACrC,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;IACrD,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;;AAmqBF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBlock.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8c6cdddb"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fe19bfef"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };
@@ -24,12 +24,12 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
24
24
  }, xe = ["id", "role"], Ne = /* @__PURE__ */ j({
25
25
  __name: "RequestBlock",
26
26
  props: {
27
- selectedSecurity: {},
28
27
  authMeta: { default: () => ({ type: "document" }) },
29
28
  clientOptions: {},
30
29
  environment: {},
31
30
  eventBus: {},
32
31
  exampleKey: {},
32
+ globalCookies: {},
33
33
  layout: {},
34
34
  method: {},
35
35
  operation: {},
@@ -39,9 +39,9 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
39
39
  securityRequirements: {},
40
40
  securitySchemes: {},
41
41
  selectedClient: {},
42
+ selectedSecurity: {},
42
43
  selectedSecuritySchemes: {},
43
- server: {},
44
- globalCookies: {}
44
+ server: {}
45
45
  },
46
46
  setup(e) {
47
47
  const r = n(() => ({
@@ -315,7 +315,7 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
315
315
  ]),
316
316
  _: 2
317
317
  }, 1024))), 128)),
318
- a[1] || (a[1] = K("div", { class: "flex flex-grow" }, null, -1)),
318
+ a[1] || (a[1] = K("div", { class: "flex grow" }, null, -1)),
319
319
  c(m(ue, {
320
320
  clientOptions: e.clientOptions,
321
321
  eventBus: e.eventBus,
@@ -1 +1 @@
1
- {"version":3,"file":"RequestCodeSnippet.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestCodeSnippet.vue"],"names":[],"mappings":"AA6JA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAQvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sEAAsE,CAAA;AAQpH,KAAK,WAAW,GAAG,wBAAwB,GAAG;IAAE,QAAQ,EAAE,iBAAiB,CAAA;CAAE,CAAC;;AA0Q9E,wBAMG"}
1
+ {"version":3,"file":"RequestCodeSnippet.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestCodeSnippet.vue"],"names":[],"mappings":"AAmKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAQvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sEAAsE,CAAA;AAQpH,KAAK,WAAW,GAAG,wBAAwB,GAAG;IAAE,QAAQ,EAAE,iBAAiB,CAAA;CAAE,CAAC;;AAiR9E,wBAMG"}