@congruent-stack/congruent-api 0.11.1 → 0.11.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.
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +0 -4
- package/dist/index.d.mts +0 -4
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4,14 +4,17 @@ function endpoint(definition) {
|
|
|
4
4
|
return new HttpMethodEndpoint(definition);
|
|
5
5
|
}
|
|
6
6
|
class HttpMethodEndpoint {
|
|
7
|
+
/** @internal */
|
|
7
8
|
_definition;
|
|
8
9
|
get definition() {
|
|
9
10
|
return this._definition;
|
|
10
11
|
}
|
|
12
|
+
/** @internal */
|
|
11
13
|
_pathSegments = [];
|
|
12
14
|
get pathSegments() {
|
|
13
15
|
return this._pathSegments;
|
|
14
16
|
}
|
|
17
|
+
/** @internal */
|
|
15
18
|
_cachedGenericPath = null;
|
|
16
19
|
get genericPath() {
|
|
17
20
|
if (!this._cachedGenericPath) {
|
|
@@ -24,6 +27,7 @@ class HttpMethodEndpoint {
|
|
|
24
27
|
(segment) => segment.startsWith(":") ? pathParams[segment.slice(1)] ?? "?" : segment
|
|
25
28
|
).join("/")}`;
|
|
26
29
|
}
|
|
30
|
+
/** @internal */
|
|
27
31
|
_method = null;
|
|
28
32
|
get method() {
|
|
29
33
|
return this._method;
|
package/dist/index.d.cts
CHANGED
|
@@ -56,14 +56,10 @@ type HttpMethodEndpointResponses = Partial<{
|
|
|
56
56
|
readonly [status in HttpStatusCode]: HttpMethodEndpointResponse<status, any>;
|
|
57
57
|
}>;
|
|
58
58
|
declare class HttpMethodEndpoint<const TDef extends IHttpMethodEndpointDefinition & ValidateHttpMethodEndpointDefinition<TDef>> {
|
|
59
|
-
protected _definition: TDef;
|
|
60
59
|
get definition(): TDef;
|
|
61
|
-
protected _pathSegments: readonly string[];
|
|
62
60
|
get pathSegments(): readonly string[];
|
|
63
|
-
protected _cachedGenericPath: string | null;
|
|
64
61
|
get genericPath(): string;
|
|
65
62
|
createPath(pathParams: Record<string, string>): string;
|
|
66
|
-
protected _method: HttpMethod;
|
|
67
63
|
get method(): HttpMethod;
|
|
68
64
|
get lowerCasedMethod(): LowerCasedHttpMethod;
|
|
69
65
|
constructor(definition: TDef);
|
package/dist/index.d.mts
CHANGED
|
@@ -56,14 +56,10 @@ type HttpMethodEndpointResponses = Partial<{
|
|
|
56
56
|
readonly [status in HttpStatusCode]: HttpMethodEndpointResponse<status, any>;
|
|
57
57
|
}>;
|
|
58
58
|
declare class HttpMethodEndpoint<const TDef extends IHttpMethodEndpointDefinition & ValidateHttpMethodEndpointDefinition<TDef>> {
|
|
59
|
-
protected _definition: TDef;
|
|
60
59
|
get definition(): TDef;
|
|
61
|
-
protected _pathSegments: readonly string[];
|
|
62
60
|
get pathSegments(): readonly string[];
|
|
63
|
-
protected _cachedGenericPath: string | null;
|
|
64
61
|
get genericPath(): string;
|
|
65
62
|
createPath(pathParams: Record<string, string>): string;
|
|
66
|
-
protected _method: HttpMethod;
|
|
67
63
|
get method(): HttpMethod;
|
|
68
64
|
get lowerCasedMethod(): LowerCasedHttpMethod;
|
|
69
65
|
constructor(definition: TDef);
|
package/dist/index.mjs
CHANGED
|
@@ -2,14 +2,17 @@ function endpoint(definition) {
|
|
|
2
2
|
return new HttpMethodEndpoint(definition);
|
|
3
3
|
}
|
|
4
4
|
class HttpMethodEndpoint {
|
|
5
|
+
/** @internal */
|
|
5
6
|
_definition;
|
|
6
7
|
get definition() {
|
|
7
8
|
return this._definition;
|
|
8
9
|
}
|
|
10
|
+
/** @internal */
|
|
9
11
|
_pathSegments = [];
|
|
10
12
|
get pathSegments() {
|
|
11
13
|
return this._pathSegments;
|
|
12
14
|
}
|
|
15
|
+
/** @internal */
|
|
13
16
|
_cachedGenericPath = null;
|
|
14
17
|
get genericPath() {
|
|
15
18
|
if (!this._cachedGenericPath) {
|
|
@@ -22,6 +25,7 @@ class HttpMethodEndpoint {
|
|
|
22
25
|
(segment) => segment.startsWith(":") ? pathParams[segment.slice(1)] ?? "?" : segment
|
|
23
26
|
).join("/")}`;
|
|
24
27
|
}
|
|
28
|
+
/** @internal */
|
|
25
29
|
_method = null;
|
|
26
30
|
get method() {
|
|
27
31
|
return this._method;
|