@decaf-ts/for-http 0.2.13 → 0.3.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/README.md +1 -1
- package/dist/for-http.cjs +1 -1
- package/dist/for-http.cjs.map +1 -1
- package/dist/for-http.js +1 -1
- package/dist/for-http.js.map +1 -1
- package/lib/RestRepository.d.ts +5 -6
- package/lib/RestRepository.js.map +1 -1
- package/lib/RestService.cjs +9 -229
- package/lib/RestService.d.ts +6 -157
- package/lib/RestService.js.map +1 -1
- package/lib/adapter.cjs +13 -8
- package/lib/adapter.d.ts +21 -22
- package/lib/adapter.js.map +1 -1
- package/lib/axios/axios.cjs +21 -8
- package/lib/axios/axios.d.ts +10 -7
- package/lib/axios/axios.js.map +1 -1
- package/lib/esm/RestRepository.d.ts +5 -6
- package/lib/esm/RestRepository.js.map +1 -1
- package/lib/esm/RestService.d.ts +6 -157
- package/lib/esm/RestService.js +9 -229
- package/lib/esm/RestService.js.map +1 -1
- package/lib/esm/adapter.d.ts +21 -22
- package/lib/esm/adapter.js +14 -9
- package/lib/esm/adapter.js.map +1 -1
- package/lib/esm/axios/axios.d.ts +10 -7
- package/lib/esm/axios/axios.js +21 -8
- package/lib/esm/axios/axios.js.map +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +5 -4
package/lib/esm/adapter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Adapter, PersistenceKeys, UnsupportedError, } from "@decaf-ts/core";
|
|
2
|
-
import { InternalError } from "@decaf-ts/db-decorators";
|
|
2
|
+
import { InternalError, } from "@decaf-ts/db-decorators";
|
|
3
3
|
import { Model } from "@decaf-ts/decorator-validation";
|
|
4
4
|
import { RestService } from "./RestService.js";
|
|
5
5
|
/**
|
|
@@ -58,8 +58,8 @@ export class HttpAdapter extends Adapter {
|
|
|
58
58
|
* @description Returns the repository constructor for this adapter
|
|
59
59
|
* @summary Provides the RestService class as the repository implementation for this HTTP adapter.
|
|
60
60
|
* This method is used to create repository instances that work with this adapter type.
|
|
61
|
-
* @template
|
|
62
|
-
* @return {Constructor<
|
|
61
|
+
* @template R - Repository subtype working with this adapter
|
|
62
|
+
* @return {Constructor<R>} The repository constructor
|
|
63
63
|
*/
|
|
64
64
|
repository() {
|
|
65
65
|
return RestService;
|
|
@@ -71,10 +71,11 @@ export class HttpAdapter extends Adapter {
|
|
|
71
71
|
* @template M - The model type
|
|
72
72
|
* @param {M} model - The model instance to prepare
|
|
73
73
|
* @param pk - The primary key property name
|
|
74
|
+
* @param args
|
|
74
75
|
* @return The prepared data
|
|
75
76
|
*/
|
|
76
|
-
prepare(model,
|
|
77
|
-
const log = this.
|
|
77
|
+
prepare(model, ...args) {
|
|
78
|
+
const { log } = this.logCtx(args, this.prepare);
|
|
78
79
|
const result = Object.assign({}, model);
|
|
79
80
|
if (model[PersistenceKeys.METADATA]) {
|
|
80
81
|
log.silly(`Passing along persistence metadata for ${model[PersistenceKeys.METADATA]}`);
|
|
@@ -87,7 +88,7 @@ export class HttpAdapter extends Adapter {
|
|
|
87
88
|
}
|
|
88
89
|
return {
|
|
89
90
|
record: model,
|
|
90
|
-
id: model[pk],
|
|
91
|
+
id: model[Model.pk(model.constructor)],
|
|
91
92
|
};
|
|
92
93
|
}
|
|
93
94
|
/**
|
|
@@ -101,8 +102,8 @@ export class HttpAdapter extends Adapter {
|
|
|
101
102
|
* @param {string|number|bigint} id - The primary key value
|
|
102
103
|
* @return {M} The reconstructed model instance
|
|
103
104
|
*/
|
|
104
|
-
revert(obj, clazz,
|
|
105
|
-
const log = this.
|
|
105
|
+
revert(obj, clazz, id, ...args) {
|
|
106
|
+
const { log } = this.logCtx(args, this.revert);
|
|
106
107
|
const ob = {};
|
|
107
108
|
const m = (typeof clazz === "string" ? Model.build(ob, clazz) : new clazz(ob));
|
|
108
109
|
log.silly(`Rebuilding model ${m.constructor.name} id ${id}`);
|
|
@@ -122,6 +123,9 @@ export class HttpAdapter extends Adapter {
|
|
|
122
123
|
}
|
|
123
124
|
return result;
|
|
124
125
|
}
|
|
126
|
+
toTableName(t) {
|
|
127
|
+
return typeof t === "string" ? t : Model.tableName(t);
|
|
128
|
+
}
|
|
125
129
|
/**
|
|
126
130
|
* @description Constructs a URL for API requests
|
|
127
131
|
* @summary Builds a complete URL for API requests using the configured protocol and host,
|
|
@@ -131,6 +135,7 @@ export class HttpAdapter extends Adapter {
|
|
|
131
135
|
* @return {string} The encoded URL string
|
|
132
136
|
*/
|
|
133
137
|
url(tableName, queryParams) {
|
|
138
|
+
tableName = this.toTableName(tableName);
|
|
134
139
|
const url = new URL(`${this.config.protocol}://${this.config.host}/${tableName}`);
|
|
135
140
|
if (queryParams)
|
|
136
141
|
Object.entries(queryParams).forEach(([key, value]) => url.searchParams.append(key, value.toString()));
|
|
@@ -150,7 +155,7 @@ export class HttpAdapter extends Adapter {
|
|
|
150
155
|
* @throws {UnsupportedError} Always throws as this method is not supported by default
|
|
151
156
|
*/
|
|
152
157
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
153
|
-
raw(rawInput,
|
|
158
|
+
raw(rawInput, ...args) {
|
|
154
159
|
return Promise.reject(new UnsupportedError("Api is not natively available for HttpAdapters. If required, please extends this class"));
|
|
155
160
|
}
|
|
156
161
|
/**
|
package/lib/esm/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAGP,eAAe,EAKf,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,aAAa,GAGd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,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J,CAAC;IAED;;;;;;;;;OASG;IACM,SAAS;QAKhB,MAAM,IAAI,gBAAgB,CACxB,wFAAwF,CACzF,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,6DAA6D;IAC7D,cAAc,CAAC,SAAyB;QACtC,MAAM,IAAI,gBAAgB,CACxB,wFAAwF,CACzF,CAAC;IACJ,CAAC;CACF"}
|
package/lib/esm/axios/axios.d.ts
CHANGED
|
@@ -2,7 +2,10 @@ import { HttpAdapter } from "../adapter";
|
|
|
2
2
|
import { Axios, AxiosRequestConfig } from "axios";
|
|
3
3
|
import { HttpConfig } from "../types";
|
|
4
4
|
import { AxiosFlags } from "./types";
|
|
5
|
-
import { BaseError, Context } from "@decaf-ts/db-decorators";
|
|
5
|
+
import { BaseError, Context, PrimaryKeyType } from "@decaf-ts/db-decorators";
|
|
6
|
+
import { ContextualArgs } from "@decaf-ts/core";
|
|
7
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
8
|
+
import { Constructor } from "@decaf-ts/decoration";
|
|
6
9
|
/**
|
|
7
10
|
* @description Axios implementation of the HTTP adapter
|
|
8
11
|
* @summary Concrete implementation of HttpAdapter using Axios as the HTTP client.
|
|
@@ -50,7 +53,7 @@ import { BaseError, Context } from "@decaf-ts/db-decorators";
|
|
|
50
53
|
* Axios-->>AxiosHttpAdapter: Response Data
|
|
51
54
|
* AxiosHttpAdapter-->>Client: Resource Data
|
|
52
55
|
*/
|
|
53
|
-
export declare class AxiosHttpAdapter extends HttpAdapter<HttpConfig, Axios, AxiosRequestConfig,
|
|
56
|
+
export declare class AxiosHttpAdapter extends HttpAdapter<HttpConfig, Axios, AxiosRequestConfig, Context<AxiosFlags>> {
|
|
54
57
|
constructor(config: HttpConfig, alias?: string);
|
|
55
58
|
protected getClient(): Axios;
|
|
56
59
|
/**
|
|
@@ -71,7 +74,7 @@ export declare class AxiosHttpAdapter extends HttpAdapter<HttpConfig, Axios, Axi
|
|
|
71
74
|
* @param {Record<string, any>} model - The data model to create
|
|
72
75
|
* @return {Promise<Record<string, any>>} A promise that resolves with the created resource
|
|
73
76
|
*/
|
|
74
|
-
create(tableName: string, id:
|
|
77
|
+
create<M extends Model>(tableName: Constructor<M> | string, id: PrimaryKeyType, model: Record<string, any>, ..._args: ContextualArgs<Context<AxiosFlags>>): Promise<Record<string, any>>;
|
|
75
78
|
/**
|
|
76
79
|
* @description Retrieves a resource by ID via HTTP GET
|
|
77
80
|
* @summary Implementation of the abstract read method from HttpAdapter.
|
|
@@ -80,7 +83,7 @@ export declare class AxiosHttpAdapter extends HttpAdapter<HttpConfig, Axios, Axi
|
|
|
80
83
|
* @param {string|number|bigint} id - The identifier for the resource to retrieve
|
|
81
84
|
* @return {Promise<Record<string, any>>} A promise that resolves with the retrieved resource
|
|
82
85
|
*/
|
|
83
|
-
read(tableName: string, id:
|
|
86
|
+
read<M extends Model>(tableName: Constructor<M> | string, id: PrimaryKeyType, ...args: ContextualArgs<Context<AxiosFlags>>): Promise<Record<string, any>>;
|
|
84
87
|
/**
|
|
85
88
|
* @description Updates an existing resource via HTTP PUT
|
|
86
89
|
* @summary Implementation of the abstract update method from HttpAdapter.
|
|
@@ -90,7 +93,7 @@ export declare class AxiosHttpAdapter extends HttpAdapter<HttpConfig, Axios, Axi
|
|
|
90
93
|
* @param {Record<string, any>} model - The updated data model
|
|
91
94
|
* @return {Promise<Record<string, any>>} A promise that resolves with the updated resource
|
|
92
95
|
*/
|
|
93
|
-
update(tableName: string, id: string | number, model: Record<string, any
|
|
96
|
+
update<M extends Model>(tableName: Constructor<M> | string, id: string | number, model: Record<string, any>, ..._args: ContextualArgs<Context<AxiosFlags>>): Promise<Record<string, any>>;
|
|
94
97
|
/**
|
|
95
98
|
* @description Deletes a resource by ID via HTTP DELETE
|
|
96
99
|
* @summary Implementation of the abstract delete method from HttpAdapter.
|
|
@@ -99,6 +102,6 @@ export declare class AxiosHttpAdapter extends HttpAdapter<HttpConfig, Axios, Axi
|
|
|
99
102
|
* @param {string|number|bigint} id - The identifier for the resource to delete
|
|
100
103
|
* @return {Promise<Record<string, any>>} A promise that resolves with the deletion result
|
|
101
104
|
*/
|
|
102
|
-
delete(tableName: string, id:
|
|
103
|
-
parseError(err: Error):
|
|
105
|
+
delete<M extends Model>(tableName: Constructor<M> | string, id: PrimaryKeyType, ..._args: ContextualArgs<Context<AxiosFlags>>): Promise<Record<string, any>>;
|
|
106
|
+
parseError<E extends BaseError>(err: Error, ...args: any[]): E;
|
|
104
107
|
}
|
package/lib/esm/axios/axios.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HttpAdapter } from "./../adapter.js";
|
|
2
2
|
import { Axios } from "axios";
|
|
3
3
|
import { ConflictError, InternalError, NotFoundError, } from "@decaf-ts/db-decorators";
|
|
4
|
+
import { AuthorizationError, UnsupportedError, } from "@decaf-ts/core";
|
|
4
5
|
import { AxiosFlavour } from "./constants.js";
|
|
5
|
-
import { AuthorizationError, UnsupportedError } from "@decaf-ts/core";
|
|
6
6
|
/**
|
|
7
7
|
* @description Axios implementation of the HTTP adapter
|
|
8
8
|
* @summary Concrete implementation of HttpAdapter using Axios as the HTTP client.
|
|
@@ -79,7 +79,9 @@ export class AxiosHttpAdapter extends HttpAdapter {
|
|
|
79
79
|
* @param {Record<string, any>} model - The data model to create
|
|
80
80
|
* @return {Promise<Record<string, any>>} A promise that resolves with the created resource
|
|
81
81
|
*/
|
|
82
|
-
async create(tableName, id, model
|
|
82
|
+
async create(tableName, id, model,
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
84
|
+
..._args) {
|
|
83
85
|
try {
|
|
84
86
|
const url = this.url(tableName);
|
|
85
87
|
return this.client.post(url, model);
|
|
@@ -96,9 +98,13 @@ export class AxiosHttpAdapter extends HttpAdapter {
|
|
|
96
98
|
* @param {string|number|bigint} id - The identifier for the resource to retrieve
|
|
97
99
|
* @return {Promise<Record<string, any>>} A promise that resolves with the retrieved resource
|
|
98
100
|
*/
|
|
99
|
-
async read(tableName, id
|
|
101
|
+
async read(tableName, id,
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
103
|
+
...args) {
|
|
100
104
|
try {
|
|
101
|
-
const url = this.url(tableName, {
|
|
105
|
+
const url = this.url(tableName, {
|
|
106
|
+
id: id,
|
|
107
|
+
});
|
|
102
108
|
return this.client.get(url);
|
|
103
109
|
}
|
|
104
110
|
catch (e) {
|
|
@@ -114,7 +120,9 @@ export class AxiosHttpAdapter extends HttpAdapter {
|
|
|
114
120
|
* @param {Record<string, any>} model - The updated data model
|
|
115
121
|
* @return {Promise<Record<string, any>>} A promise that resolves with the updated resource
|
|
116
122
|
*/
|
|
117
|
-
async update(tableName, id, model
|
|
123
|
+
async update(tableName, id, model,
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
125
|
+
..._args) {
|
|
118
126
|
try {
|
|
119
127
|
const url = this.url(tableName);
|
|
120
128
|
return this.client.put(url, model);
|
|
@@ -131,16 +139,21 @@ export class AxiosHttpAdapter extends HttpAdapter {
|
|
|
131
139
|
* @param {string|number|bigint} id - The identifier for the resource to delete
|
|
132
140
|
* @return {Promise<Record<string, any>>} A promise that resolves with the deletion result
|
|
133
141
|
*/
|
|
134
|
-
async delete(tableName, id
|
|
142
|
+
async delete(tableName, id,
|
|
143
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
144
|
+
..._args) {
|
|
135
145
|
try {
|
|
136
|
-
const url = this.url(tableName, {
|
|
146
|
+
const url = this.url(tableName, {
|
|
147
|
+
id: id,
|
|
148
|
+
});
|
|
137
149
|
return this.client.delete(url);
|
|
138
150
|
}
|
|
139
151
|
catch (e) {
|
|
140
152
|
throw this.parseError(e);
|
|
141
153
|
}
|
|
142
154
|
}
|
|
143
|
-
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
156
|
+
parseError(err, ...args) {
|
|
144
157
|
const errs = [
|
|
145
158
|
InternalError,
|
|
146
159
|
AuthorizationError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../../src/axios/axios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,wBAAmB;AACzC,OAAO,EAAE,KAAK,EAAsB,MAAM,OAAO,CAAC;AAGlD,OAAO,EAEL,aAAa,EAEb,aAAa,EACb,aAAa,
|
|
1
|
+
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../../src/axios/axios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,wBAAmB;AACzC,OAAO,EAAE,KAAK,EAAsB,MAAM,OAAO,CAAC;AAGlD,OAAO,EAEL,aAAa,EAEb,aAAa,EACb,aAAa,GAEd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,uBAAoB;AAI3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAKrC;IACC,YAAY,MAAkB,EAAE,KAAc;QAC5C,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;IACrC,CAAC;IAEkB,SAAS;QAC1B,OAAO,IAAI,KAAK,CAAC;YACf,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;SACnC,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACM,KAAK,CAAC,OAAO,CAAI,OAA2B;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;;OAQG;IACM,KAAK,CAAC,MAAM,CACnB,SAAkC,EAClC,EAAkB,EAClB,KAA0B;IAC1B,6DAA6D;IAC7D,GAAG,KAA0C;QAE7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AAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE;gBAC9B,EAAE,EAAE,EAAqB;aAC1B,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,6DAA6D;IACpD,UAAU,CAAsB,GAAU,EAAE,GAAG,IAAW;QACjE,MAAM,IAAI,GAAG;YACX,aAAa;YACb,kBAAkB;YAClB,aAAa;YACb,aAAa;YACb,gBAAgB;SACjB,CAAC;QACF,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,IAAK,GAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC;gBAC7C,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAM,CAAC;QACvC,CAAC;QACD,OAAO,IAAI,aAAa,CAAC,GAAG,CAAC,OAAO,CAAM,CAAC;IAC7C,CAAC;CACF"}
|
package/lib/esm/index.d.ts
CHANGED
package/lib/esm/index.js
CHANGED
package/lib/index.cjs
CHANGED
package/lib/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decaf-ts/for-http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "http wrappers for decaf-ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -82,14 +82,15 @@
|
|
|
82
82
|
"@decaf-ts/utils": "latest",
|
|
83
83
|
"fastify": "^5.6.1"
|
|
84
84
|
},
|
|
85
|
-
"
|
|
85
|
+
"dependencies": {
|
|
86
86
|
"@decaf-ts/core": "latest",
|
|
87
87
|
"@decaf-ts/db-decorators": "latest",
|
|
88
|
+
"@decaf-ts/decoration": "latest",
|
|
88
89
|
"@decaf-ts/decorator-validation": "latest",
|
|
89
90
|
"@decaf-ts/injectable-decorators": "latest",
|
|
91
|
+
"@decaf-ts/logging": "latest",
|
|
90
92
|
"@decaf-ts/reflection": "latest",
|
|
91
93
|
"@decaf-ts/transactional-decorators": "latest",
|
|
92
|
-
"axios": "^1.7.8"
|
|
93
|
-
"reflect-metadata": "^0.2.1"
|
|
94
|
+
"axios": "^1.7.8"
|
|
94
95
|
}
|
|
95
96
|
}
|