@scalar/oas-utils 0.11.1 → 0.12.0

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 (126) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/helpers/index.d.ts +0 -82
  3. package/dist/helpers/index.d.ts.map +1 -1
  4. package/dist/helpers/index.js +0 -78
  5. package/dist/migrations/migrate-to-indexdb.d.ts.map +1 -1
  6. package/dist/migrations/migrate-to-indexdb.js +1 -1
  7. package/dist/migrations/v-2.5.0/types.generated.d.ts +428 -34
  8. package/dist/migrations/v-2.5.0/types.generated.d.ts.map +1 -1
  9. package/package.json +7 -61
  10. package/dist/entities/cookie/cookie.d.ts +0 -15
  11. package/dist/entities/cookie/cookie.d.ts.map +0 -1
  12. package/dist/entities/cookie/cookie.js +0 -12
  13. package/dist/entities/cookie/index.d.ts +0 -2
  14. package/dist/entities/cookie/index.d.ts.map +0 -1
  15. package/dist/entities/cookie/index.js +0 -1
  16. package/dist/entities/environment/environment.d.ts +0 -12
  17. package/dist/entities/environment/environment.d.ts.map +0 -1
  18. package/dist/entities/environment/environment.js +0 -8
  19. package/dist/entities/environment/index.d.ts +0 -2
  20. package/dist/entities/environment/index.d.ts.map +0 -1
  21. package/dist/entities/environment/index.js +0 -1
  22. package/dist/entities/hotkeys/hotkeys.d.ts +0 -15
  23. package/dist/entities/hotkeys/hotkeys.d.ts.map +0 -1
  24. package/dist/entities/hotkeys/hotkeys.js +0 -118
  25. package/dist/entities/hotkeys/index.d.ts +0 -2
  26. package/dist/entities/hotkeys/index.d.ts.map +0 -1
  27. package/dist/entities/hotkeys/index.js +0 -1
  28. package/dist/entities/shared/index.d.ts +0 -2
  29. package/dist/entities/shared/index.d.ts.map +0 -1
  30. package/dist/entities/shared/index.js +0 -1
  31. package/dist/entities/shared/utility.d.ts +0 -5
  32. package/dist/entities/shared/utility.d.ts.map +0 -1
  33. package/dist/entities/shared/utility.js +0 -9
  34. package/dist/entities/spec/collection.d.ts +0 -133
  35. package/dist/entities/spec/collection.d.ts.map +0 -1
  36. package/dist/entities/spec/collection.js +0 -95
  37. package/dist/entities/spec/index.d.ts +0 -12
  38. package/dist/entities/spec/index.d.ts.map +0 -1
  39. package/dist/entities/spec/index.js +0 -10
  40. package/dist/entities/spec/operation.d.ts +0 -99
  41. package/dist/entities/spec/operation.d.ts.map +0 -1
  42. package/dist/entities/spec/operation.js +0 -6
  43. package/dist/entities/spec/parameters.d.ts +0 -44
  44. package/dist/entities/spec/parameters.d.ts.map +0 -1
  45. package/dist/entities/spec/parameters.js +0 -41
  46. package/dist/entities/spec/request-examples.d.ts +0 -380
  47. package/dist/entities/spec/request-examples.d.ts.map +0 -1
  48. package/dist/entities/spec/request-examples.js +0 -449
  49. package/dist/entities/spec/requests.d.ts +0 -137
  50. package/dist/entities/spec/requests.d.ts.map +0 -1
  51. package/dist/entities/spec/requests.js +0 -123
  52. package/dist/entities/spec/server.d.ts +0 -15
  53. package/dist/entities/spec/server.d.ts.map +0 -1
  54. package/dist/entities/spec/server.js +0 -67
  55. package/dist/entities/spec/spec-objects.d.ts +0 -171
  56. package/dist/entities/spec/spec-objects.d.ts.map +0 -1
  57. package/dist/entities/spec/spec-objects.js +0 -134
  58. package/dist/entities/spec/x-scalar-environments.d.ts +0 -22
  59. package/dist/entities/spec/x-scalar-environments.d.ts.map +0 -1
  60. package/dist/entities/spec/x-scalar-environments.js +0 -22
  61. package/dist/entities/spec/x-scalar-secrets.d.ts +0 -6
  62. package/dist/entities/spec/x-scalar-secrets.d.ts.map +0 -1
  63. package/dist/entities/spec/x-scalar-secrets.js +0 -8
  64. package/dist/entities/workspace/index.d.ts +0 -2
  65. package/dist/entities/workspace/index.d.ts.map +0 -1
  66. package/dist/entities/workspace/index.js +0 -1
  67. package/dist/entities/workspace/workspace.d.ts +0 -236
  68. package/dist/entities/workspace/workspace.d.ts.map +0 -1
  69. package/dist/entities/workspace/workspace.js +0 -49
  70. package/dist/helpers/fetch-document.d.ts +0 -7
  71. package/dist/helpers/fetch-document.d.ts.map +0 -1
  72. package/dist/helpers/fetch-document.js +0 -32
  73. package/dist/helpers/fetch-with-proxy-fallback.d.ts +0 -15
  74. package/dist/helpers/fetch-with-proxy-fallback.d.ts.map +0 -1
  75. package/dist/helpers/fetch-with-proxy-fallback.js +0 -29
  76. package/dist/helpers/normalize-mime-type-object.d.ts +0 -8
  77. package/dist/helpers/normalize-mime-type-object.d.ts.map +0 -1
  78. package/dist/helpers/normalize-mime-type-object.js +0 -21
  79. package/dist/helpers/normalize-mime-type.d.ts +0 -10
  80. package/dist/helpers/normalize-mime-type.d.ts.map +0 -1
  81. package/dist/helpers/normalize-mime-type.js +0 -12
  82. package/dist/helpers/operation-stability.d.ts +0 -19
  83. package/dist/helpers/operation-stability.d.ts.map +0 -1
  84. package/dist/helpers/operation-stability.js +0 -24
  85. package/dist/helpers/schema-model.d.ts +0 -5
  86. package/dist/helpers/schema-model.d.ts.map +0 -1
  87. package/dist/helpers/schema-model.js +0 -14
  88. package/dist/helpers/security/get-schemes.d.ts +0 -97
  89. package/dist/helpers/security/get-schemes.d.ts.map +0 -1
  90. package/dist/helpers/security/get-schemes.js +0 -8
  91. package/dist/helpers/security/has-token.d.ts +0 -4
  92. package/dist/helpers/security/has-token.d.ts.map +0 -1
  93. package/dist/helpers/security/has-token.js +0 -19
  94. package/dist/helpers/security/index.d.ts +0 -3
  95. package/dist/helpers/security/index.d.ts.map +0 -1
  96. package/dist/helpers/security/index.js +0 -2
  97. package/dist/helpers/servers.d.ts +0 -24
  98. package/dist/helpers/servers.d.ts.map +0 -1
  99. package/dist/helpers/servers.js +0 -146
  100. package/dist/helpers/should-ignore-entity.d.ts +0 -8
  101. package/dist/helpers/should-ignore-entity.d.ts.map +0 -1
  102. package/dist/helpers/should-ignore-entity.js +0 -4
  103. package/dist/migrations/generate-types.d.ts +0 -2
  104. package/dist/migrations/generate-types.d.ts.map +0 -1
  105. package/dist/migrations/generate-types.js +0 -53
  106. package/dist/spec-getters/get-example-from-schema.d.ts +0 -36
  107. package/dist/spec-getters/get-example-from-schema.d.ts.map +0 -1
  108. package/dist/spec-getters/get-example-from-schema.js +0 -521
  109. package/dist/spec-getters/get-parameters-from-operation.d.ts +0 -17
  110. package/dist/spec-getters/get-parameters-from-operation.d.ts.map +0 -1
  111. package/dist/spec-getters/get-parameters-from-operation.js +0 -40
  112. package/dist/spec-getters/get-request-body-from-operation.d.ts +0 -14
  113. package/dist/spec-getters/get-request-body-from-operation.d.ts.map +0 -1
  114. package/dist/spec-getters/get-request-body-from-operation.js +0 -176
  115. package/dist/spec-getters/get-server-variable-examples.d.ts +0 -4
  116. package/dist/spec-getters/get-server-variable-examples.d.ts.map +0 -1
  117. package/dist/spec-getters/get-server-variable-examples.js +0 -12
  118. package/dist/spec-getters/index.d.ts +0 -5
  119. package/dist/spec-getters/index.d.ts.map +0 -1
  120. package/dist/spec-getters/index.js +0 -4
  121. package/dist/transforms/import-spec.d.ts +0 -64
  122. package/dist/transforms/import-spec.d.ts.map +0 -1
  123. package/dist/transforms/import-spec.js +0 -397
  124. package/dist/transforms/index.d.ts +0 -2
  125. package/dist/transforms/index.d.ts.map +0 -1
  126. package/dist/transforms/index.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @scalar/oas-utils
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#8863](https://github.com/scalar/scalar/pull/8863): chore: updated imports to new api client version
8
+
9
+ ### Patch Changes
10
+
11
+ - [#8825](https://github.com/scalar/scalar/pull/8825): chore: moving files around in preparation for the big deletion of client v1
12
+ - [#8850](https://github.com/scalar/scalar/pull/8850): chore: remove entities, zod and the parser from oas-utils
13
+
3
14
  ## 0.11.1
4
15
 
5
16
  ## 0.11.0
@@ -1,85 +1,3 @@
1
- export {
2
- /** @deprecated Please use isDefined from \@scalar/helpers/array/is-defined instead */
3
- isDefined, } from '@scalar/helpers/array/is-defined';
4
- export {
5
- /** @deprecated Please use json2xml from \@scalar/helpers/file/json2xml instead */
6
- json2xml, } from '@scalar/helpers/file/json2xml';
7
- export {
8
- /** @deprecated Please use canMethodHaveBody from \@scalar/helpers/http/can-method-have-body instead */
9
- canMethodHaveBody, } from '@scalar/helpers/http/can-method-have-body';
10
- export {
11
- /** @deprecated Please use REQUEST_METHODS from \@scalar/helpers/http/http-methods instead */
12
- REQUEST_METHODS,
13
- /** @deprecated Please use getHttpMethodInfo from \@scalar/helpers/http/http-info instead */
14
- getHttpMethodInfo, } from '@scalar/helpers/http/http-info';
15
- export {
16
- /** @deprecated Please use HttpStatusCode from \@scalar/helpers/http/http-status-codes instead */
17
- type HttpStatusCode,
18
- /** @deprecated Please use HttpStatusCodes from \@scalar/helpers/http/http-status-codes instead */
19
- type HttpStatusCodes,
20
- /** @deprecated Please use httpStatusCodes from \@scalar/helpers/http/http-status-codes instead */
21
- httpStatusCodes, } from '@scalar/helpers/http/http-status-codes';
22
- export {
23
- /** @deprecated Please use isHttpMethod from \@scalar/helpers/http/is-http-method instead */
24
- isHttpMethod, } from '@scalar/helpers/http/is-http-method';
25
- export {
26
- /** @deprecated Please use objectKeys from \@scalar/helpers/object/object-keys instead */
27
- objectKeys as getObjectKeys, } from '@scalar/helpers/object/object-keys';
28
- export {
29
- /** @deprecated Please use findVariables from \@scalar/helpers/regex/find-variables instead */
30
- findVariables, } from '@scalar/helpers/regex/find-variables';
31
- export {
32
- /** @deprecated Please use REGEX from \@scalar/helpers/regex/regex-helpers instead */
33
- REGEX, } from '@scalar/helpers/regex/regex-helpers';
34
- export {
35
- /** @deprecated Please use replaceVariables from \@scalar/helpers/regex/replace-variables instead */
36
- replaceVariables, } from '@scalar/helpers/regex/replace-variables';
37
- export {
38
- /** @deprecated Please use camelToTitleWords from \@scalar/helpers/string/camel-to-title instead */
39
- camelToTitleWords, } from '@scalar/helpers/string/camel-to-title';
40
- export {
41
- /** @deprecated Please use capitalize from \@scalar/helpers/string/capitalize instead */
42
- capitalize, } from '@scalar/helpers/string/capitalize';
43
- /**
44
- * @deprecated These helpers are being phased out. Please import directly from @scalar/helpers instead.
45
- * For example: import { createHash } from '/@scalar/helpers/string/create-hash'
46
- */
47
- export {
48
- /** @deprecated Please use createHash from \@scalar/helpers/string/create-hash instead */
49
- createHash, } from '@scalar/helpers/string/create-hash';
50
- export {
51
- /** @deprecated Please use iterateTitle from \@scalar/helpers/string/iterate-title instead */
52
- iterateTitle, } from '@scalar/helpers/string/iterate-title';
53
- export {
54
- /** @deprecated Please use ensureProtocol from \@scalar/helpers/url/ensure-protocol instead */
55
- ensureProtocol, } from '@scalar/helpers/url/ensure-protocol';
56
- export {
57
- /** @deprecated Please use isLocalUrl from \@scalar/helpers/url/is-local-url instead */
58
- isLocalUrl, } from '@scalar/helpers/url/is-local-url';
59
- export {
60
- /** @deprecated Please use isRelativePath from \@scalar/helpers/url/is-relative-path instead */
61
- isRelativePath, } from '@scalar/helpers/url/is-relative-path';
62
- export {
63
- /** @deprecated Please use isValidUrl from \@scalar/helpers/url/is-valid-url instead */
64
- isValidUrl, } from '@scalar/helpers/url/is-valid-url';
65
- export {
66
- /** @deprecated Please use makeUrlAbsolute from \@scalar/helpers/url/make-url-absolute instead */
67
- makeUrlAbsolute, } from '@scalar/helpers/url/make-url-absolute';
68
- export {
69
- /** @deprecated Please use combineUrlAndPath from \@scalar/helpers/url/merge-urls instead */
70
- combineUrlAndPath,
71
- /** @deprecated Please use mergeSearchParams from \@scalar/helpers/url/merge-urls instead */
72
- mergeSearchParams,
73
- /** @deprecated Please use mergeUrls from \@scalar/helpers/url/merge-urls instead */
74
- mergeUrls, } from '@scalar/helpers/url/merge-urls';
75
1
  export { type ClientPlugin, executeHook } from './client-plugins.js';
76
- export { fetchDocument } from './fetch-document.js';
77
- export { type FetchWithProxyFallbackOptions, fetchWithProxyFallback } from './fetch-with-proxy-fallback.js';
78
- export { normalizeMimeType } from './normalize-mime-type.js';
79
- export { normalizeMimeTypeObject } from './normalize-mime-type-object.js';
80
- export { getOperationStability, getOperationStabilityColor, isOperationDeprecated } from './operation-stability.js';
81
2
  export { formatJsonOrYamlString, json, parseJsonOrYaml, transformToJson, yaml } from './parse.js';
82
- export { schemaModel } from './schema-model.js';
83
- export { getServersFromDocument } from './servers.js';
84
- export { shouldIgnoreEntity } from './should-ignore-entity.js';
85
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACL,sFAAsF;AACtF,SAAS,GACV,MAAM,kCAAkC,CAAA;AACzC,OAAO;AACL,kFAAkF;AAClF,QAAQ,GACT,MAAM,+BAA+B,CAAA;AACtC,OAAO;AACL,uGAAuG;AACvG,iBAAiB,GAClB,MAAM,2CAA2C,CAAA;AAClD,OAAO;AACL,6FAA6F;AAC7F,eAAe;AACf,4FAA4F;AAC5F,iBAAiB,GAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO;AACL,iGAAiG;AACjG,KAAK,cAAc;AACnB,kGAAkG;AAClG,KAAK,eAAe;AACpB,kGAAkG;AAClG,eAAe,GAChB,MAAM,wCAAwC,CAAA;AAC/C,OAAO;AACL,4FAA4F;AAC5F,YAAY,GACb,MAAM,qCAAqC,CAAA;AAC5C,OAAO;AACL,yFAAyF;AACzF,UAAU,IAAI,aAAa,GAC5B,MAAM,oCAAoC,CAAA;AAC3C,OAAO;AACL,8FAA8F;AAC9F,aAAa,GACd,MAAM,sCAAsC,CAAA;AAC7C,OAAO;AACL,qFAAqF;AACrF,KAAK,GACN,MAAM,qCAAqC,CAAA;AAC5C,OAAO;AACL,oGAAoG;AACpG,gBAAgB,GACjB,MAAM,yCAAyC,CAAA;AAChD,OAAO;AACL,mGAAmG;AACnG,iBAAiB,GAClB,MAAM,uCAAuC,CAAA;AAC9C,OAAO;AACL,wFAAwF;AACxF,UAAU,GACX,MAAM,mCAAmC,CAAA;AAC1C;;;GAGG;AACH,OAAO;AACL,yFAAyF;AACzF,UAAU,GACX,MAAM,oCAAoC,CAAA;AAC3C,OAAO;AACL,6FAA6F;AAC7F,YAAY,GACb,MAAM,sCAAsC,CAAA;AAC7C,OAAO;AACL,8FAA8F;AAC9F,cAAc,GACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO;AACL,uFAAuF;AACvF,UAAU,GACX,MAAM,kCAAkC,CAAA;AACzC,OAAO;AACL,+FAA+F;AAC/F,cAAc,GACf,MAAM,sCAAsC,CAAA;AAC7C,OAAO;AACL,uFAAuF;AACvF,UAAU,GACX,MAAM,kCAAkC,CAAA;AACzC,OAAO;AACL,iGAAiG;AACjG,eAAe,GAChB,MAAM,uCAAuC,CAAA;AAC9C,OAAO;AACL,4FAA4F;AAC5F,iBAAiB;AACjB,4FAA4F;AAC5F,iBAAiB;AACjB,oFAAoF;AACpF,SAAS,GACV,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,KAAK,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAChH,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA"}
@@ -1,80 +1,2 @@
1
- export {
2
- /** @deprecated Please use isDefined from \@scalar/helpers/array/is-defined instead */
3
- isDefined, } from '@scalar/helpers/array/is-defined';
4
- export {
5
- /** @deprecated Please use json2xml from \@scalar/helpers/file/json2xml instead */
6
- json2xml, } from '@scalar/helpers/file/json2xml';
7
- export {
8
- /** @deprecated Please use canMethodHaveBody from \@scalar/helpers/http/can-method-have-body instead */
9
- canMethodHaveBody, } from '@scalar/helpers/http/can-method-have-body';
10
- export {
11
- /** @deprecated Please use REQUEST_METHODS from \@scalar/helpers/http/http-methods instead */
12
- REQUEST_METHODS,
13
- /** @deprecated Please use getHttpMethodInfo from \@scalar/helpers/http/http-info instead */
14
- getHttpMethodInfo, } from '@scalar/helpers/http/http-info';
15
- export {
16
- /** @deprecated Please use httpStatusCodes from \@scalar/helpers/http/http-status-codes instead */
17
- httpStatusCodes, } from '@scalar/helpers/http/http-status-codes';
18
- export {
19
- /** @deprecated Please use isHttpMethod from \@scalar/helpers/http/is-http-method instead */
20
- isHttpMethod, } from '@scalar/helpers/http/is-http-method';
21
- export {
22
- /** @deprecated Please use objectKeys from \@scalar/helpers/object/object-keys instead */
23
- objectKeys as getObjectKeys, } from '@scalar/helpers/object/object-keys';
24
- export {
25
- /** @deprecated Please use findVariables from \@scalar/helpers/regex/find-variables instead */
26
- findVariables, } from '@scalar/helpers/regex/find-variables';
27
- export {
28
- /** @deprecated Please use REGEX from \@scalar/helpers/regex/regex-helpers instead */
29
- REGEX, } from '@scalar/helpers/regex/regex-helpers';
30
- export {
31
- /** @deprecated Please use replaceVariables from \@scalar/helpers/regex/replace-variables instead */
32
- replaceVariables, } from '@scalar/helpers/regex/replace-variables';
33
- export {
34
- /** @deprecated Please use camelToTitleWords from \@scalar/helpers/string/camel-to-title instead */
35
- camelToTitleWords, } from '@scalar/helpers/string/camel-to-title';
36
- export {
37
- /** @deprecated Please use capitalize from \@scalar/helpers/string/capitalize instead */
38
- capitalize, } from '@scalar/helpers/string/capitalize';
39
- /**
40
- * @deprecated These helpers are being phased out. Please import directly from @scalar/helpers instead.
41
- * For example: import { createHash } from '/@scalar/helpers/string/create-hash'
42
- */
43
- export {
44
- /** @deprecated Please use createHash from \@scalar/helpers/string/create-hash instead */
45
- createHash, } from '@scalar/helpers/string/create-hash';
46
- export {
47
- /** @deprecated Please use iterateTitle from \@scalar/helpers/string/iterate-title instead */
48
- iterateTitle, } from '@scalar/helpers/string/iterate-title';
49
- export {
50
- /** @deprecated Please use ensureProtocol from \@scalar/helpers/url/ensure-protocol instead */
51
- ensureProtocol, } from '@scalar/helpers/url/ensure-protocol';
52
- export {
53
- /** @deprecated Please use isLocalUrl from \@scalar/helpers/url/is-local-url instead */
54
- isLocalUrl, } from '@scalar/helpers/url/is-local-url';
55
- export {
56
- /** @deprecated Please use isRelativePath from \@scalar/helpers/url/is-relative-path instead */
57
- isRelativePath, } from '@scalar/helpers/url/is-relative-path';
58
- export {
59
- /** @deprecated Please use isValidUrl from \@scalar/helpers/url/is-valid-url instead */
60
- isValidUrl, } from '@scalar/helpers/url/is-valid-url';
61
- export {
62
- /** @deprecated Please use makeUrlAbsolute from \@scalar/helpers/url/make-url-absolute instead */
63
- makeUrlAbsolute, } from '@scalar/helpers/url/make-url-absolute';
64
- export {
65
- /** @deprecated Please use combineUrlAndPath from \@scalar/helpers/url/merge-urls instead */
66
- combineUrlAndPath,
67
- /** @deprecated Please use mergeSearchParams from \@scalar/helpers/url/merge-urls instead */
68
- mergeSearchParams,
69
- /** @deprecated Please use mergeUrls from \@scalar/helpers/url/merge-urls instead */
70
- mergeUrls, } from '@scalar/helpers/url/merge-urls';
71
1
  export { executeHook } from './client-plugins.js';
72
- export { fetchDocument } from './fetch-document.js';
73
- export { fetchWithProxyFallback } from './fetch-with-proxy-fallback.js';
74
- export { normalizeMimeType } from './normalize-mime-type.js';
75
- export { normalizeMimeTypeObject } from './normalize-mime-type-object.js';
76
- export { getOperationStability, getOperationStabilityColor, isOperationDeprecated } from './operation-stability.js';
77
2
  export { formatJsonOrYamlString, json, parseJsonOrYaml, transformToJson, yaml } from './parse.js';
78
- export { schemaModel } from './schema-model.js';
79
- export { getServersFromDocument } from './servers.js';
80
- export { shouldIgnoreEntity } from './should-ignore-entity.js';
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-to-indexdb.d.ts","sourceRoot":"","sources":["../../src/migrations/migrate-to-indexdb.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAA;AAOrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAkB3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAOnE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,qBA+CxC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,sBAAsB,OAAO,CAAC,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAC,WAAW,CAAC,KAC7F,OAAO,CAAC,OAAO,CAiBjB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,GAAU,YAAY;IAC/D,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;CAC/B;;;;IA8IA,CAAA"}
1
+ {"version":3,"file":"migrate-to-indexdb.d.ts","sourceRoot":"","sources":["../../src/migrations/migrate-to-indexdb.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAA;AAOrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAiB3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAOnE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,qBA+CxC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,sBAAsB,OAAO,CAAC,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAC,WAAW,CAAC,KAC7F,OAAO,CAAC,OAAO,CAiBjB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,GAAU,YAAY;IAC/D,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;CAC/B;;;;IA8IA,CAAA"}
@@ -1,6 +1,6 @@
1
- import { CONTENT_TYPES } from '@scalar/helpers/consts/content-types';
2
1
  import { createLimiter } from '@scalar/helpers/general/create-limiter';
3
2
  import { extractConfigSecrets, removeSecretFields } from '@scalar/helpers/general/extract-config-secrets';
3
+ import { CONTENT_TYPES } from '@scalar/helpers/http/content-types';
4
4
  import { objectEntries } from '@scalar/helpers/object/object-entries';
5
5
  import { toJsonCompatible } from '@scalar/helpers/object/to-json-compatible';
6
6
  import { extractServerFromPath } from '@scalar/helpers/url/extract-server-from-path';
@@ -1,43 +1,437 @@
1
- import type { Cookie } from '../../entities/cookie/cookie.js';
2
- import type { Environment } from '../../entities/environment/environment.js';
3
- import type { Collection } from '../../entities/spec/collection.js';
4
- import type { RequestExample } from '../../entities/spec/request-examples.js';
5
- import type { Request } from '../../entities/spec/requests.js';
6
- import type { Server } from '../../entities/spec/server.js';
7
- import type { Tag } from '../../entities/spec/spec-objects.js';
8
- import type { Workspace } from '../../entities/workspace/workspace.js';
9
- import type { SecurityScheme } from '@scalar/types/entities';
1
+ import type { XScalarStability } from '@scalar/types/legacy';
2
+ type Collection = {
3
+ 'type': 'collection';
4
+ 'openapi': string | '3.0.0' | '3.1.0' | '4.0.0';
5
+ 'jsonSchemaDialect'?: string | undefined;
6
+ 'info': {
7
+ title: string;
8
+ summary?: string | undefined;
9
+ description?: string | undefined;
10
+ termsOfService?: string | undefined;
11
+ contact?: {
12
+ name?: string | undefined;
13
+ url?: string | undefined;
14
+ email?: string | undefined;
15
+ } | undefined;
16
+ license?: {
17
+ name?: string | null | undefined;
18
+ identifier?: string | undefined;
19
+ url?: string | undefined;
20
+ } | undefined;
21
+ version: string;
22
+ 'x-scalar-sdk-installation'?: {
23
+ lang: string;
24
+ source?: string | undefined;
25
+ description?: string | undefined;
26
+ }[] | undefined;
27
+ };
28
+ 'security': {
29
+ [x: string]: string[];
30
+ }[];
31
+ 'externalDocs'?: {
32
+ description?: string | undefined;
33
+ url: string;
34
+ } | undefined;
35
+ 'components'?: {
36
+ [x: string]: unknown;
37
+ } | undefined;
38
+ 'webhooks'?: {
39
+ [x: string]: unknown;
40
+ } | undefined;
41
+ 'x-scalar-icon': string;
42
+ 'x-scalar-active-environment'?: string | undefined;
43
+ 'x-scalar-environments'?: {
44
+ [x: string]: {
45
+ description?: string | undefined;
46
+ color?: string | undefined;
47
+ variables: {
48
+ [x: string]: {
49
+ description?: string | undefined;
50
+ default: string;
51
+ } | string;
52
+ };
53
+ };
54
+ } | undefined;
55
+ 'x-scalar-secrets'?: {
56
+ [x: string]: {
57
+ description?: string | undefined;
58
+ example?: string | undefined;
59
+ };
60
+ } | undefined;
61
+ 'uid': string;
62
+ 'securitySchemes': string[];
63
+ 'selectedSecuritySchemeUids': string[];
64
+ 'selectedServerUid'?: string | undefined;
65
+ 'servers': string[];
66
+ 'requests': string[];
67
+ 'tags': string[];
68
+ 'children': string[];
69
+ 'documentUrl'?: string | undefined;
70
+ 'watchMode': boolean;
71
+ 'integration'?: (string | null) | undefined;
72
+ 'useCollectionSecurity': boolean;
73
+ 'watchModeStatus': 'IDLE' | 'WATCHING' | 'ERROR';
74
+ };
75
+ type Cookie = {
76
+ uid: string;
77
+ name: string;
78
+ value: string;
79
+ domain?: string | undefined;
80
+ path?: string | undefined;
81
+ };
82
+ type Environment = {
83
+ uid: string;
84
+ name: string;
85
+ color: string;
86
+ value: string;
87
+ isDefault?: boolean | undefined;
88
+ };
89
+ type Tag = {
90
+ 'type': 'tag';
91
+ 'name': string;
92
+ 'description'?: string | undefined;
93
+ 'externalDocs'?: {
94
+ description?: string | undefined;
95
+ url: string;
96
+ } | undefined;
97
+ 'x-scalar-children'?: {
98
+ tagName: string;
99
+ }[] | undefined;
100
+ 'x-internal'?: boolean | undefined;
101
+ 'x-scalar-ignore'?: boolean | undefined;
102
+ 'uid': string;
103
+ 'children': string[];
104
+ };
105
+ type RequestExample = {
106
+ uid: string;
107
+ type: 'requestExample';
108
+ requestUid?: string | undefined;
109
+ name: string;
110
+ body: {
111
+ raw?: {
112
+ encoding: 'json' | 'text' | 'html' | 'javascript' | 'xml' | 'yaml' | 'edn';
113
+ value: string;
114
+ mimeType?: string | undefined;
115
+ } | undefined;
116
+ formData?: {
117
+ encoding: 'form-data' | 'urlencoded';
118
+ value: {
119
+ key: string;
120
+ value: string;
121
+ enabled: boolean;
122
+ file?: any | undefined;
123
+ description?: string | undefined;
124
+ required?: boolean | undefined;
125
+ enum?: string[] | undefined;
126
+ examples?: any[] | undefined;
127
+ type?: (string | string[]) | undefined;
128
+ format?: string | undefined;
129
+ minimum?: number | undefined;
130
+ maximum?: number | undefined;
131
+ default?: any | undefined;
132
+ nullable?: boolean | undefined;
133
+ }[];
134
+ } | undefined;
135
+ binary?: Blob | undefined;
136
+ activeBody: 'raw' | 'formData' | 'binary';
137
+ };
138
+ parameters: {
139
+ path: {
140
+ key: string;
141
+ value: string;
142
+ enabled: boolean;
143
+ file?: any | undefined;
144
+ description?: string | undefined;
145
+ required?: boolean | undefined;
146
+ enum?: string[] | undefined;
147
+ examples?: any[] | undefined;
148
+ type?: (string | string[]) | undefined;
149
+ format?: string | undefined;
150
+ minimum?: number | undefined;
151
+ maximum?: number | undefined;
152
+ default?: any | undefined;
153
+ nullable?: boolean | undefined;
154
+ }[];
155
+ query: {
156
+ key: string;
157
+ value: string;
158
+ enabled: boolean;
159
+ file?: any | undefined;
160
+ description?: string | undefined;
161
+ required?: boolean | undefined;
162
+ enum?: string[] | undefined;
163
+ examples?: any[] | undefined;
164
+ type?: (string | string[]) | undefined;
165
+ format?: string | undefined;
166
+ minimum?: number | undefined;
167
+ maximum?: number | undefined;
168
+ default?: any | undefined;
169
+ nullable?: boolean | undefined;
170
+ }[];
171
+ headers: {
172
+ key: string;
173
+ value: string;
174
+ enabled: boolean;
175
+ file?: any | undefined;
176
+ description?: string | undefined;
177
+ required?: boolean | undefined;
178
+ enum?: string[] | undefined;
179
+ examples?: any[] | undefined;
180
+ type?: (string | string[]) | undefined;
181
+ format?: string | undefined;
182
+ minimum?: number | undefined;
183
+ maximum?: number | undefined;
184
+ default?: any | undefined;
185
+ nullable?: boolean | undefined;
186
+ }[];
187
+ cookies: {
188
+ key: string;
189
+ value: string;
190
+ enabled: boolean;
191
+ file?: any | undefined;
192
+ description?: string | undefined;
193
+ required?: boolean | undefined;
194
+ enum?: string[] | undefined;
195
+ examples?: any[] | undefined;
196
+ type?: (string | string[]) | undefined;
197
+ format?: string | undefined;
198
+ minimum?: number | undefined;
199
+ maximum?: number | undefined;
200
+ default?: any | undefined;
201
+ nullable?: boolean | undefined;
202
+ }[];
203
+ };
204
+ serverVariables?: {
205
+ [x: string]: string[];
206
+ } | undefined;
207
+ };
208
+ type Request = {
209
+ 'tags'?: string[] | undefined;
210
+ 'summary'?: string | undefined;
211
+ 'description'?: string | undefined;
212
+ 'operationId'?: string | undefined;
213
+ 'security'?: {
214
+ [x: string]: string[];
215
+ }[] | undefined;
216
+ 'requestBody'?: any | undefined;
217
+ 'parameters'?: {
218
+ in: 'path' | 'query' | 'header' | 'cookie';
219
+ name: string;
220
+ description?: string | undefined;
221
+ required: boolean;
222
+ deprecated: boolean;
223
+ schema?: unknown | undefined;
224
+ content?: unknown | undefined;
225
+ style?: ('matrix' | 'simple' | 'form' | 'label' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject') | undefined;
226
+ explode?: boolean | undefined;
227
+ example?: unknown | undefined;
228
+ examples?: {
229
+ [x: string]: {
230
+ value?: unknown;
231
+ summary?: string | undefined;
232
+ externalValue?: string | undefined;
233
+ };
234
+ } | unknown[] | undefined;
235
+ }[] | undefined;
236
+ 'externalDocs'?: {
237
+ description?: string | undefined;
238
+ url: string;
239
+ } | undefined;
240
+ 'deprecated'?: boolean | undefined;
241
+ 'responses'?: {
242
+ [x: string]: any;
243
+ } | undefined;
244
+ 'callbacks'?: {
245
+ [x: string]: {
246
+ [x: string]: {
247
+ [x: string]: any;
248
+ };
249
+ };
250
+ } | undefined;
251
+ 'x-codeSamples'?: {
252
+ lang?: string | undefined;
253
+ label?: string | undefined;
254
+ source: string;
255
+ }[] | undefined;
256
+ 'x-code-samples'?: {
257
+ lang?: string | undefined;
258
+ label?: string | undefined;
259
+ source: string;
260
+ }[] | undefined;
261
+ 'x-custom-examples'?: {
262
+ lang?: string | undefined;
263
+ label?: string | undefined;
264
+ source: string;
265
+ }[] | undefined;
266
+ 'x-internal'?: boolean | undefined;
267
+ 'x-scalar-ignore'?: boolean | undefined;
268
+ 'x-scalar-stability'?: XScalarStability | undefined;
269
+ 'type': 'request';
270
+ 'uid': string;
271
+ 'path': string;
272
+ 'method': 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
273
+ 'servers': string[];
274
+ 'selectedServerUid': string | null;
275
+ 'examples': string[];
276
+ 'selectedSecuritySchemeUids': (string | string[])[];
277
+ 'x-post-response'?: string | undefined;
278
+ };
279
+ type SecurityScheme = {
280
+ description?: string | undefined;
281
+ type: 'apiKey';
282
+ name: string;
283
+ in: 'query' | 'header' | 'cookie';
284
+ uid: string;
285
+ nameKey: string;
286
+ value: string;
287
+ } | {
288
+ description?: string | undefined;
289
+ type: 'http';
290
+ scheme: any;
291
+ bearerFormat: 'JWT' | string;
292
+ uid: string;
293
+ nameKey: string;
294
+ username: string;
295
+ password: string;
296
+ token: string;
297
+ } | {
298
+ description?: string | undefined;
299
+ type: 'openIdConnect';
300
+ openIdConnectUrl: string;
301
+ uid: string;
302
+ nameKey: string;
303
+ } | {
304
+ description?: string | undefined;
305
+ type: 'oauth2';
306
+ flows: {
307
+ implicit?: {
308
+ 'refreshUrl': string;
309
+ 'scopes': {
310
+ [x: string]: string;
311
+ };
312
+ 'selectedScopes': string[];
313
+ 'x-scalar-client-id': string;
314
+ 'token': string;
315
+ 'type': 'implicit';
316
+ 'authorizationUrl': string;
317
+ 'x-scalar-redirect-uri': string;
318
+ } | undefined;
319
+ password?: {
320
+ 'refreshUrl': string;
321
+ 'scopes': {
322
+ [x: string]: string;
323
+ };
324
+ 'selectedScopes': string[];
325
+ 'x-scalar-client-id': string;
326
+ 'token': string;
327
+ 'type': 'password';
328
+ 'tokenUrl': string;
329
+ 'clientSecret': string;
330
+ 'username': string;
331
+ 'password': string;
332
+ } | undefined;
333
+ clientCredentials?: {
334
+ 'refreshUrl': string;
335
+ 'scopes': {
336
+ [x: string]: string;
337
+ };
338
+ 'selectedScopes': string[];
339
+ 'x-scalar-client-id': string;
340
+ 'token': string;
341
+ 'type': 'clientCredentials';
342
+ 'tokenUrl': string;
343
+ 'clientSecret': string;
344
+ } | undefined;
345
+ authorizationCode?: {
346
+ 'refreshUrl': string;
347
+ 'scopes': {
348
+ [x: string]: string;
349
+ };
350
+ 'selectedScopes': string[];
351
+ 'x-scalar-client-id': string;
352
+ 'token': string;
353
+ 'type': 'authorizationCode';
354
+ 'authorizationUrl': string;
355
+ 'x-usePkce': 'SHA-256' | 'plain' | 'no';
356
+ 'x-scalar-redirect-uri': string;
357
+ 'tokenUrl': string;
358
+ 'clientSecret': string;
359
+ } | undefined;
360
+ };
361
+ uid: string;
362
+ nameKey: string;
363
+ };
364
+ type Server = {
365
+ url: string;
366
+ description?: string | undefined;
367
+ variables?: {
368
+ [x: string]: {
369
+ enum?: string[] | undefined;
370
+ default?: string | undefined;
371
+ description?: string | undefined;
372
+ value?: string | undefined;
373
+ };
374
+ } | undefined;
375
+ uid: string;
376
+ };
377
+ type Workspace = {
378
+ uid: string;
379
+ name: string;
380
+ description: string;
381
+ collections: string[];
382
+ environments: {
383
+ [x: string]: string;
384
+ };
385
+ hotKeyConfig?: {
386
+ modifiers: ('Meta' | 'Control' | 'Shift' | 'Alt' | 'default')[];
387
+ hotKeys?: Partial<Record<string, {
388
+ modifiers?: ('Meta' | 'Control' | 'Shift' | 'Alt' | 'default')[] | undefined;
389
+ event: string;
390
+ }>> | undefined;
391
+ } | undefined;
392
+ activeEnvironmentId: string;
393
+ cookies: string[];
394
+ proxyUrl?: string | undefined;
395
+ themeId: 'alternate' | 'default' | 'moon' | 'purple' | 'solarized' | 'bluePlanet' | 'deepSpace' | 'saturn' | 'kepler' | 'elysiajs' | 'fastify' | 'mars' | 'none' | 'laserwave';
396
+ selectedHttpClient: {
397
+ targetKey: string;
398
+ clientKey: string;
399
+ };
400
+ };
401
+ type DataRecord = {
402
+ collections: Record<string, Collection>;
403
+ cookies: Record<string, Cookie>;
404
+ environments: Record<string, Environment>;
405
+ requestExamples: Record<string, RequestExample>;
406
+ requests: Record<string, Request>;
407
+ securitySchemes: Record<string, SecurityScheme>;
408
+ servers: Record<string, Server>;
409
+ tags: Record<string, Tag>;
410
+ workspaces: Record<string, Workspace>;
411
+ };
412
+ type DataArray = {
413
+ collections: Collection[];
414
+ cookies: Cookie[];
415
+ environments: Environment[];
416
+ requestExamples: RequestExample[];
417
+ requests: Request[];
418
+ securitySchemes: SecurityScheme[];
419
+ servers: Server[];
420
+ tags: Tag[];
421
+ workspaces: Workspace[];
422
+ };
10
423
  export type v_2_5_0 = {
424
+ Collection: Collection;
11
425
  Cookie: Cookie;
12
426
  Environment: Environment;
13
- Collection: Collection;
14
- Request: Request;
427
+ Tag: Tag;
15
428
  RequestExample: RequestExample;
429
+ Request: Request;
16
430
  SecurityScheme: SecurityScheme;
17
431
  Server: Server;
18
- Tag: Tag;
19
432
  Workspace: Workspace;
20
- DataRecord: {
21
- collections: Record<string, Collection>;
22
- cookies: Record<string, Cookie>;
23
- environments: Record<string, Environment>;
24
- requestExamples: Record<string, RequestExample>;
25
- requests: Record<string, Request>;
26
- securitySchemes: Record<string, SecurityScheme>;
27
- servers: Record<string, Server>;
28
- tags: Record<string, Tag>;
29
- workspaces: Record<string, Workspace>;
30
- };
31
- DataArray: {
32
- collections: Collection[];
33
- cookies: Cookie[];
34
- environments: Environment[];
35
- requestExamples: RequestExample[];
36
- requests: Request[];
37
- securitySchemes: SecurityScheme[];
38
- servers: Server[];
39
- tags: Tag[];
40
- workspaces: Workspace[];
41
- };
433
+ DataRecord: DataRecord;
434
+ DataArray: DataArray;
42
435
  };
436
+ export {};
43
437
  //# sourceMappingURL=types.generated.d.ts.map