@equinor/fusion-framework-module-services
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -6,2 +6,6 @@ # Change Log | ||
## 2.0.1 (2023-01-30) | ||
**Note:** Version bump only for package @equinor/fusion-framework-module-services | ||
## [2.0.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-services@1.0.15...@equinor/fusion-framework-module-services@2.0.0) (2023-01-27) | ||
@@ -8,0 +12,0 @@ |
@@ -12,3 +12,3 @@ import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client'; | ||
}; | ||
export type GetContextArgs<T extends string> = T extends keyof typeof ApiVersion ? GetContextArgsTypes[typeof ApiVersion[T]] : unknown; | ||
export type GetContextArgs<T extends string> = T extends keyof typeof ApiVersion ? GetContextArgsTypes[(typeof ApiVersion)[T]] : unknown; | ||
type GetContextResponseTypes = { | ||
@@ -18,4 +18,4 @@ [ApiVersion.v1]: ApiContextEntity<ApiVersion.v1>; | ||
}; | ||
export type GetContextResponse<T> = T extends keyof typeof ApiVersion ? GetContextResponseTypes[typeof ApiVersion[T]] : unknown; | ||
export type GetContextResponse<T> = T extends keyof typeof ApiVersion ? GetContextResponseTypes[(typeof ApiVersion)[T]] : unknown; | ||
export type GetContextFn<TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TClient extends IHttpClient = IHttpClient, TResult = GetContextResponse<TVersion>> = (args: GetContextArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => GetContextResult<TVersion, TMethod, TResult>; | ||
export type GetContextResult<TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = GetContextResponse<TVersion>> = ClientMethod<TResult>[TMethod]; |
@@ -21,3 +21,3 @@ import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client'; | ||
}; | ||
export type QueryContextArgs<T> = T extends keyof typeof ApiVersion ? SearchContextArgTypes[typeof ApiVersion[T]] : { | ||
export type QueryContextArgs<T> = T extends keyof typeof ApiVersion ? SearchContextArgTypes[(typeof ApiVersion)[T]] : { | ||
query: { | ||
@@ -31,4 +31,4 @@ search: string; | ||
}; | ||
export type QueryContextResponse<T> = T extends keyof typeof ApiVersion ? QueryContextResponseTypes[typeof ApiVersion[T]] : unknown; | ||
export type QueryContextResponse<T> = T extends keyof typeof ApiVersion ? QueryContextResponseTypes[(typeof ApiVersion)[T]] : unknown; | ||
export type QueryContextFn<TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TClient extends IHttpClient = IHttpClient, TResult = QueryContextResponse<TVersion>> = (args: QueryContextArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => QueryContextResult<TVersion, TMethod, TResult>; | ||
export type QueryContextResult<TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = QueryContextResponse<TVersion>> = ClientMethod<TResult>[TMethod]; |
{ | ||
"name": "@equinor/fusion-framework-module-services", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "", | ||
@@ -52,3 +52,3 @@ "sideEffects": false, | ||
"@equinor/fusion-framework-module-http": "^3.0.0", | ||
"@equinor/fusion-framework-module-service-discovery": "^6.0.0" | ||
"@equinor/fusion-framework-module-service-discovery": "^6.0.1" | ||
}, | ||
@@ -59,3 +59,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "6738a5a6d620717c31d84ac94c217162a045b5fb" | ||
"gitHead": "85cb1b4a12ef25787cd6d88da648c566c810b9f5" | ||
} |
@@ -26,3 +26,3 @@ import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client'; | ||
export type GetContextArgs<T extends string> = T extends keyof typeof ApiVersion | ||
? GetContextArgsTypes[typeof ApiVersion[T]] | ||
? GetContextArgsTypes[(typeof ApiVersion)[T]] | ||
: unknown; | ||
@@ -36,3 +36,3 @@ | ||
export type GetContextResponse<T> = T extends keyof typeof ApiVersion | ||
? GetContextResponseTypes[typeof ApiVersion[T]] | ||
? GetContextResponseTypes[(typeof ApiVersion)[T]] | ||
: unknown; | ||
@@ -39,0 +39,0 @@ |
@@ -37,3 +37,3 @@ import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client'; | ||
export type QueryContextArgs<T> = T extends keyof typeof ApiVersion | ||
? SearchContextArgTypes[typeof ApiVersion[T]] | ||
? SearchContextArgTypes[(typeof ApiVersion)[T]] | ||
: { query: { search: string } }; | ||
@@ -47,3 +47,3 @@ | ||
export type QueryContextResponse<T> = T extends keyof typeof ApiVersion | ||
? QueryContextResponseTypes[typeof ApiVersion[T]] | ||
? QueryContextResponseTypes[(typeof ApiVersion)[T]] | ||
: unknown; | ||
@@ -50,0 +50,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222260