@furystack/rest
Advanced tools
Comparing version 4.1.17 to 4.2.0
{ | ||
"name": "@furystack/rest", | ||
"version": "4.1.17", | ||
"version": "4.2.0", | ||
"description": "Generic REST package", | ||
@@ -32,3 +32,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@furystack/core": "^11.2.12", | ||
"@furystack/core": "^11.3.0", | ||
"@furystack/inject": "^7.1.8" | ||
@@ -35,0 +35,0 @@ }, |
/** | ||
* Endpoint model for updating entities | ||
*/ | ||
export type PatchEndpoint<T, TPrimaryKey extends keyof T> = { | ||
body: Partial<T> | ||
export type PatchEndpoint<T, TPrimaryKey extends keyof T, TWritableData = Partial<T>> = { | ||
body: TWritableData | ||
url: { id: T[TPrimaryKey] } | ||
result: {} | ||
} |
@@ -6,5 +6,5 @@ import type { WithOptionalId } from '@furystack/core' | ||
*/ | ||
export type PostEndpoint<T, TPrimaryKey extends keyof T> = { | ||
body: WithOptionalId<T, TPrimaryKey> | ||
export type PostEndpoint<T, TPrimaryKey extends keyof T, TPostData = WithOptionalId<T, TPrimaryKey>> = { | ||
body: TPostData | ||
result: T | ||
} |
/** | ||
* Endpoint model for updating entities | ||
*/ | ||
export type PatchEndpoint<T, TPrimaryKey extends keyof T> = { | ||
body: Partial<T>; | ||
export type PatchEndpoint<T, TPrimaryKey extends keyof T, TWritableData = Partial<T>> = { | ||
body: TWritableData; | ||
url: { | ||
@@ -7,0 +7,0 @@ id: T[TPrimaryKey]; |
@@ -5,6 +5,6 @@ import type { WithOptionalId } from '@furystack/core'; | ||
*/ | ||
export type PostEndpoint<T, TPrimaryKey extends keyof T> = { | ||
body: WithOptionalId<T, TPrimaryKey>; | ||
export type PostEndpoint<T, TPrimaryKey extends keyof T, TPostData = WithOptionalId<T, TPrimaryKey>> = { | ||
body: TPostData; | ||
result: T; | ||
}; | ||
//# sourceMappingURL=post-endpoint.d.ts.map |
Sorry, the diff of this file is not supported yet
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
58150
Updated@furystack/core@^11.3.0