@rest-vir/implement-service 0.19.1 → 0.19.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HttpStatus, type MaybePromise, type Values } from '@augment-vir/common';
|
|
1
|
+
import { type HttpStatus, type MaybePromise, type SetOptionalWithUndefined, type Values } from '@augment-vir/common';
|
|
2
2
|
import { type BaseServiceEndpointsInit, type BaseServiceWebSocketsInit, type EndpointPathBase, type NoParam, type WithFinalEndpointProps } from '@rest-vir/define-service';
|
|
3
3
|
import { type EndpointImplementationOutput } from './implement-endpoint.js';
|
|
4
4
|
import { type ContextInitParams } from './service-context-init.js';
|
|
@@ -9,12 +9,12 @@ import { type ContextInitParams } from './service-context-init.js';
|
|
|
9
9
|
* @category Package : @rest-vir/implement-service
|
|
10
10
|
* @package [`@rest-vir/implement-service`](https://www.npmjs.com/package/@rest-vir/implement-service)
|
|
11
11
|
*/
|
|
12
|
-
export type PostHookParams<Context = any, ServiceName extends string = any, EndpointsInit extends BaseServiceEndpointsInit | NoParam = NoParam, WebSocketsInit extends BaseServiceWebSocketsInit | NoParam = NoParam> = ContextInitParams<ServiceName, EndpointsInit, WebSocketsInit> & {
|
|
12
|
+
export type PostHookParams<Context = any, ServiceName extends string = any, EndpointsInit extends BaseServiceEndpointsInit | NoParam = NoParam, WebSocketsInit extends BaseServiceWebSocketsInit | NoParam = NoParam> = SetOptionalWithUndefined<ContextInitParams<ServiceName, EndpointsInit, WebSocketsInit> & {
|
|
13
13
|
originalResponseData: EndpointsInit extends NoParam ? unknown : WithFinalEndpointProps<Values<EndpointsInit>, Extract<keyof EndpointsInit, EndpointPathBase>>['ResponseType'];
|
|
14
14
|
originalStatus: HttpStatus;
|
|
15
15
|
/** This will be `undefined` if your `createContext` method rejects the request. */
|
|
16
|
-
context: Context
|
|
17
|
-
}
|
|
16
|
+
context: Context;
|
|
17
|
+
}, 'context' | 'searchParams'>;
|
|
18
18
|
/**
|
|
19
19
|
* Type for `ServiceImplementationsParams.postHook`.
|
|
20
20
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rest-vir/implement-service",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.2",
|
|
4
4
|
"description": "Implement a service defined by @rest-vir/define-service.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rest",
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"test:update": "npm test update"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@augment-vir/assert": "^31.
|
|
43
|
-
"@augment-vir/common": "^31.
|
|
44
|
-
"@rest-vir/define-service": "^0.19.
|
|
42
|
+
"@augment-vir/assert": "^31.20.0",
|
|
43
|
+
"@augment-vir/common": "^31.20.0",
|
|
44
|
+
"@rest-vir/define-service": "^0.19.2",
|
|
45
45
|
"@types/ws": "^8.18.1",
|
|
46
46
|
"fastify": "^5.3.3",
|
|
47
47
|
"path-to-regexp": "^8.2.0",
|
|
48
48
|
"type-fest": "^4.41.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@augment-vir/test": "^31.
|
|
52
|
-
"@types/node": "^22.15.
|
|
51
|
+
"@augment-vir/test": "^31.20.0",
|
|
52
|
+
"@types/node": "^22.15.21",
|
|
53
53
|
"c8": "^10.1.3",
|
|
54
54
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
55
55
|
"markdown-code-example-inserter": "^3.0.3",
|