@scalar/types 0.5.10 → 0.6.1

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,23 @@
1
1
  # @scalar/types
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8000](https://github.com/scalar/scalar/pull/8000): fix(agent): change enabled flag to disabled
8
+ - [#7995](https://github.com/scalar/scalar/pull/7995): feat: enable/disable agent scalar
9
+
10
+ #### Updated Dependencies
11
+
12
+ - **@scalar/helpers@0.2.10**
13
+ - [#7963](https://github.com/scalar/scalar/pull/7963): feat: unify is-object helpers
14
+
15
+ ## 0.6.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#7959](https://github.com/scalar/scalar/pull/7959): feat(agent): add agent scalar to localhost
20
+
3
21
  ## 0.5.10
4
22
 
5
23
  ### Patch Changes
@@ -124,6 +124,10 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
124
124
  url: z.ZodOptional<z.ZodString>;
125
125
  content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
126
126
  }, z.core.$strip>>;
127
+ agent: z.ZodOptional<z.ZodObject<{
128
+ key: z.ZodOptional<z.ZodString>;
129
+ disabled: z.ZodOptional<z.ZodBoolean>;
130
+ }, z.core.$strip>>;
127
131
  }, z.core.$strip>;
128
132
  export type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>;
129
133
  //# sourceMappingURL=api-client-configuration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-client-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-client-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAKxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkE,CAAA;AAE3G,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
1
+ {"version":3,"file":"api-client-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-client-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAKxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkE,CAAA;AAE3G,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
@@ -14,6 +14,10 @@ export declare const sourceConfigurationSchema: z.ZodObject<{
14
14
  url: z.ZodOptional<z.ZodString>;
15
15
  content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
16
16
  }, z.core.$strip>>;
17
+ agent: z.ZodOptional<z.ZodObject<{
18
+ key: z.ZodOptional<z.ZodString>;
19
+ disabled: z.ZodOptional<z.ZodBoolean>;
20
+ }, z.core.$strip>>;
17
21
  }, z.core.$strip>;
18
22
  export type SourceConfiguration = z.infer<typeof sourceConfigurationSchema>;
19
23
  //# sourceMappingURL=source-configuration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/source-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;iBAwFpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
1
+ {"version":3,"file":"source-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/source-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;iBAiGpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
@@ -80,6 +80,13 @@ const sourceConfigurationSchema = z.object({
80
80
  output: z.record(z.string(), z.any())
81
81
  })
82
82
  ]).optional()
83
+ }).optional(),
84
+ /**
85
+ * Scalar Agent configuration options.
86
+ **/
87
+ agent: z.object({
88
+ key: z.string().optional(),
89
+ disabled: z.boolean().optional()
83
90
  }).optional()
84
91
  });
85
92
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/source-configuration.ts"],
4
- "sourcesContent": ["import z from 'zod'\n\n/**\n * A source is any potential document input used for API Reference\n * and API Client integrations. Sources may be specified in the configuration\n * or used independently. Some configurations may have multiple sources.\n */\nexport const sourceConfigurationSchema = z.object({\n default: z.boolean().default(false).optional().catch(false),\n /**\n * URL to an OpenAPI/Swagger document\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: z\n .object({\n url: z.string().optional(),\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n })\n .optional(),\n})\n\nexport type SourceConfiguration = z.infer<typeof sourceConfigurationSchema>\n"],
5
- "mappings": "AAAA,OAAO,OAAO;AAOP,MAAM,4BAA4B,EAAE,OAAO;AAAA,EAChD,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB1D,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBzB,SAAS,EACN,MAAM;AAAA,IACL,EAAE,OAAO;AAAA,IACT,EAAE,KAAK;AAAA,IACP,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,IAC5B,EAAE,SAAS;AAAA,MACT,OAAO,CAAC;AAAA,MACR,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,IACtC,CAAC;AAAA,EACH,CAAC,EACA,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQZ,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY3B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,MAAM,EACH,OAAO;AAAA,IACN,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,IACzB,SAAS,EACN,MAAM;AAAA,MACL,EAAE,OAAO;AAAA,MACT,EAAE,KAAK;AAAA,MACP,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,MAC5B,EAAE,SAAS;AAAA,QACT,OAAO,CAAC;AAAA,QACR,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,MACtC,CAAC;AAAA,IACH,CAAC,EACA,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;",
4
+ "sourcesContent": ["import z from 'zod'\n\n/**\n * A source is any potential document input used for API Reference\n * and API Client integrations. Sources may be specified in the configuration\n * or used independently. Some configurations may have multiple sources.\n */\nexport const sourceConfigurationSchema = z.object({\n default: z.boolean().default(false).optional().catch(false),\n /**\n * URL to an OpenAPI/Swagger document\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: z\n .object({\n url: z.string().optional(),\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n })\n .optional(),\n /**\n * Scalar Agent configuration options.\n **/\n agent: z\n .object({\n key: z.string().optional(),\n disabled: z.boolean().optional(),\n })\n .optional(),\n})\n\nexport type SourceConfiguration = z.infer<typeof sourceConfigurationSchema>\n"],
5
+ "mappings": "AAAA,OAAO,OAAO;AAOP,MAAM,4BAA4B,EAAE,OAAO;AAAA,EAChD,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB1D,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBzB,SAAS,EACN,MAAM;AAAA,IACL,EAAE,OAAO;AAAA,IACT,EAAE,KAAK;AAAA,IACP,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,IAC5B,EAAE,SAAS;AAAA,MACT,OAAO,CAAC;AAAA,MACR,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,IACtC,CAAC;AAAA,EACH,CAAC,EACA,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQZ,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY3B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,MAAM,EACH,OAAO;AAAA,IACN,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,IACzB,SAAS,EACN,MAAM;AAAA,MACL,EAAE,OAAO;AAAA,MACT,EAAE,KAAK;AAAA,MACP,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,MAC5B,EAAE,SAAS;AAAA,QACT,OAAO,CAAC;AAAA,QACR,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC;AAAA,MACtC,CAAC;AAAA,IACH,CAAC,EACA,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AAAA;AAAA;AAAA;AAAA,EAIZ,OAAO,EACJ,OAAO;AAAA,IACN,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,IACzB,UAAU,EAAE,QAAQ,EAAE,SAAS;AAAA,EACjC,CAAC,EACA,SAAS;AACd,CAAC;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "scalar",
17
17
  "references"
18
18
  ],
19
- "version": "0.5.10",
19
+ "version": "0.6.1",
20
20
  "engines": {
21
21
  "node": ">=20"
22
22
  },
@@ -62,10 +62,10 @@
62
62
  "nanoid": "^5.1.6",
63
63
  "type-fest": "^5.3.1",
64
64
  "zod": "^4.3.5",
65
- "@scalar/helpers": "0.2.9"
65
+ "@scalar/helpers": "0.2.10"
66
66
  },
67
67
  "devDependencies": {
68
- "@types/har-format": "^1.2.15",
68
+ "@types/har-format": "^1.2.16",
69
69
  "vite": "^7.3.1",
70
70
  "@scalar/build-tooling": "0.4.1"
71
71
  },