@scalar/api-client 0.10.2 → 0.11.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/api-client
2
2
 
3
+ ## 0.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b1f3cb49]
8
+ - @scalar/use-codemirror@0.8.1
9
+
10
+ ## 0.11.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 26340b12: feat: update components to support all basic http request methods
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [612431b4]
19
+ - @scalar/use-codemirror@0.8.0
20
+
3
21
  ## 0.10.2
4
22
 
5
23
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClient.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ApiClient/ApiClient.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,gBAAgB,CAAA;;;;;;;;;;;;;;;;;;cAoW3C,OAAO;;AAHtB,wBAWG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAA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E,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { type Component } from 'vue';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ /** The type of element to render as, defaults to `span` */
4
+ as?: string | Component | undefined;
5
+ /** The css style property or variable that will be set to the request method color, defaults to `color` */
6
+ property?: string | undefined;
7
+ /** Whether or not to abbreviated the slot content */
8
+ short?: boolean | undefined;
9
+ /** The HTTP method to show */
10
+ method: string;
11
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
+ /** The type of element to render as, defaults to `span` */
13
+ as?: string | Component | undefined;
14
+ /** The css style property or variable that will be set to the request method color, defaults to `color` */
15
+ property?: string | undefined;
16
+ /** Whether or not to abbreviated the slot content */
17
+ short?: boolean | undefined;
18
+ /** The HTTP method to show */
19
+ method: string;
20
+ }>>>, {}, {}>, {
21
+ default?(_: {
22
+ normalized: string;
23
+ abbreviated: string;
24
+ color: string;
25
+ }): any;
26
+ }>;
27
+ export default _default;
28
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
29
+ type __VLS_TypePropsToRuntimeProps<T> = {
30
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
31
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
32
+ } : {
33
+ type: import('vue').PropType<T[K]>;
34
+ required: true;
35
+ };
36
+ };
37
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
42
+ //# sourceMappingURL=HttpMethod.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../src/components/HttpMethod.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,KAAK,CAAA;;IAyG5C,2DAA2D;;IAE3D,2GAA2G;;IAE3G,qDAAqD;;IAErD,8BAA8B;;;IAN9B,2DAA2D;;IAE3D,2GAA2G;;IAE3G,qDAAqD;;IAErD,8BAA8B;;;;;;;;;AAQhC,wBAAwG;AAGxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1,2 +1,11 @@
1
- export declare const validRequestMethods: string[];
1
+ export declare const validRequestMethods: readonly ["GET", "POST", "PUT", "HEAD", "DELETE", "PATCH", "OPTIONS", "CONNECT", "TRACE"];
2
+ type RequestMethod = typeof validRequestMethods[number];
3
+ export declare function isRequestMethod(s: string): s is RequestMethod;
4
+ export declare const requestMethodColors: {
5
+ [x in RequestMethod]: string;
6
+ };
7
+ export declare const requestMethodAbbreviations: {
8
+ [x in RequestMethod]: string;
9
+ };
10
+ export {};
2
11
  //# sourceMappingURL=httpRequestMethods.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"httpRequestMethods.d.ts","sourceRoot":"","sources":["../../src/fixtures/httpRequestMethods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,UAU/B,CAAA"}
1
+ {"version":3,"file":"httpRequestMethods.d.ts","sourceRoot":"","sources":["../../src/fixtures/httpRequestMethods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2FAUtB,CAAA;AAEV,KAAK,aAAa,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAExD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,aAAa,CAE7D;AAED,eAAO,MAAM,mBAAmB,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAU/D,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAUtE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Get a normalized request method (e.g. GET, POST, etc.)
3
3
  */
4
- export declare const normalizeRequestMethod: (method?: string) => string;
4
+ export declare const normalizeRequestMethod: (method?: string) => "GET" | "POST" | "PUT" | "HEAD" | "DELETE" | "PATCH" | "OPTIONS" | "CONNECT" | "TRACE";
5
5
  //# sourceMappingURL=normalizeRequestMethod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,WAyBrD,CAAA"}
1
+ {"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,2FAsBrD,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { ApiClient } from './components/ApiClient';
2
+ export { default as HttpMethod } from './components/HttpMethod.vue';
2
3
  export * from './helpers';
3
4
  export * from './stores/apiClientStore';
4
5
  export * from './stores/requestStore';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAElD,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAEnE,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}