@thisisagile/easy 17.18.9 → 17.20.0
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/{chunk-EL4LXAN7.mjs → chunk-3B4UXDOZ.mjs} +2 -2
- package/dist/{chunk-744LD44R.mjs → chunk-3MDXTFJG.mjs} +4 -4
- package/dist/{chunk-QZUUK6PI.mjs → chunk-4JBE26FB.mjs} +1 -1
- package/dist/chunk-4JBE26FB.mjs.map +1 -0
- package/dist/{chunk-3E3YJR6L.mjs → chunk-4U4PPZWS.mjs} +2 -2
- package/dist/{chunk-56HLMAA4.mjs → chunk-5RL5STCD.mjs} +2 -2
- package/dist/{chunk-3TI2Y4HN.mjs → chunk-AYPE2G3T.mjs} +2 -2
- package/dist/{chunk-4REZO4ZW.mjs → chunk-BQ2N2Y7O.mjs} +3 -3
- package/dist/{chunk-YH4CTU3I.mjs → chunk-DXXBPAXT.mjs} +2 -2
- package/dist/{chunk-SCNDLTL6.mjs → chunk-FI3X2XXY.mjs} +6 -6
- package/dist/{chunk-DK6TQHF3.mjs → chunk-K7NZINEX.mjs} +2 -2
- package/dist/{chunk-SOXQOCCH.mjs → chunk-LXJTNB3X.mjs} +5 -5
- package/dist/{chunk-FT66ANA7.mjs → chunk-M456CJK4.mjs} +2 -2
- package/dist/{chunk-COJ6DGFZ.mjs → chunk-PVWD7L7K.mjs} +2 -2
- package/dist/{chunk-YDEAOY7R.mjs → chunk-Q5LRJWPK.mjs} +2 -2
- package/dist/{chunk-DLJOM2QT.mjs → chunk-RTTVCEWR.mjs} +2 -2
- package/dist/chunk-S5I6XCJK.mjs +60 -0
- package/dist/chunk-S5I6XCJK.mjs.map +1 -0
- package/dist/{chunk-5HLBJ56K.mjs → chunk-TRIKRGDF.mjs} +4 -4
- package/dist/{chunk-DIJQ6NKV.mjs → chunk-VZYOBAK7.mjs} +3 -3
- package/dist/{chunk-4IH3OE4Y.mjs → chunk-WVYZIPWC.mjs} +4 -4
- package/dist/chunk-WVYZIPWC.mjs.map +1 -0
- package/dist/{chunk-2VL6B3UJ.mjs → chunk-XH47BBYI.mjs} +5 -5
- package/dist/{chunk-LXCI7XE5.mjs → chunk-ZDGQPZ6G.mjs} +4 -4
- package/dist/data/InMemoryGateway.mjs +4 -4
- package/dist/domain/Audit.mjs +6 -6
- package/dist/domain/Child.mjs +4 -4
- package/dist/domain/DateTime.mjs +3 -3
- package/dist/domain/Entity.mjs +6 -6
- package/dist/domain/Repo.mjs +5 -5
- package/dist/domain/Struct.mjs +3 -3
- package/dist/domain/Typo.d.ts +19 -1
- package/dist/domain/Typo.mjs +49 -3
- package/dist/domain/Typo.mjs.map +1 -1
- package/dist/http/CacheControl.mjs +4 -4
- package/dist/http/RestResult.mjs +3 -3
- package/dist/http/toResponse.mjs +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +58 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/dist/process/App.mjs +1 -1
- package/dist/process/Manage.mjs +4 -4
- package/dist/process/Scope.d.ts +2 -2
- package/dist/process/Scope.mjs +1 -1
- package/dist/process/Search.mjs +4 -4
- package/dist/process/UseCase.d.ts +2 -2
- package/dist/process/UseCase.mjs.map +1 -1
- package/dist/resources/Req.mjs +3 -3
- package/dist/services/Api.mjs +8 -8
- package/dist/services/ApiGateway.mjs +11 -11
- package/dist/services/AxiosProvider.mjs +7 -7
- package/dist/services/MappedRouteGateway.mjs +12 -12
- package/dist/services/RouteGateway.d.ts +15 -15
- package/dist/services/RouteGateway.mjs +12 -12
- package/dist/services/ViewRouteGateway.mjs +14 -14
- package/dist/sql/Column.mjs +3 -3
- package/dist/sql/Table.mjs +3 -3
- package/dist/sql/TableGateway.mjs +4 -4
- package/dist/types/CacheAge.mjs +4 -4
- package/dist/types/Case.mjs +2 -2
- package/dist/types/Gateway.mjs +2 -2
- package/dist/types/IdName.d.ts +8 -0
- package/dist/types/IdName.mjs +1 -0
- package/dist/types/IdName.mjs.map +1 -0
- package/dist/types/Identity.d.ts +0 -5
- package/dist/types/IsEqual.mjs +3 -3
- package/dist/types/Number.mjs +3 -3
- package/dist/types/PageList.mjs +3 -3
- package/dist/types/Parser.mjs +2 -2
- package/dist/types/Repository.d.ts +3 -3
- package/dist/types/Repository.mjs +2 -2
- package/dist/types/Try.mjs +2 -2
- package/dist/types/Uri.d.ts +14 -11
- package/dist/types/Uri.mjs +2 -2
- package/dist/types/Uri.mjs.map +1 -1
- package/dist/utils/View.mjs +5 -5
- package/dist/validation/Contraints.mjs +3 -3
- package/dist/validation/Validate.mjs +2 -2
- package/dist/validation/When.mjs +2 -2
- package/package.json +1 -1
- package/src/domain/Typo.ts +58 -2
- package/src/index.ts +2 -0
- package/src/process/Scope.ts +3 -3
- package/src/process/UseCase.ts +2 -2
- package/src/services/RouteGateway.ts +26 -25
- package/src/types/IdName.ts +4 -0
- package/src/types/Identity.ts +0 -2
- package/src/types/Repository.ts +3 -3
- package/src/types/Uri.ts +12 -11
- package/dist/chunk-4IH3OE4Y.mjs.map +0 -1
- package/dist/chunk-M6LRND3Z.mjs +0 -57
- package/dist/chunk-M6LRND3Z.mjs.map +0 -1
- package/dist/chunk-QZUUK6PI.mjs.map +0 -1
- /package/dist/{chunk-EL4LXAN7.mjs.map → chunk-3B4UXDOZ.mjs.map} +0 -0
- /package/dist/{chunk-744LD44R.mjs.map → chunk-3MDXTFJG.mjs.map} +0 -0
- /package/dist/{chunk-3E3YJR6L.mjs.map → chunk-4U4PPZWS.mjs.map} +0 -0
- /package/dist/{chunk-56HLMAA4.mjs.map → chunk-5RL5STCD.mjs.map} +0 -0
- /package/dist/{chunk-3TI2Y4HN.mjs.map → chunk-AYPE2G3T.mjs.map} +0 -0
- /package/dist/{chunk-4REZO4ZW.mjs.map → chunk-BQ2N2Y7O.mjs.map} +0 -0
- /package/dist/{chunk-YH4CTU3I.mjs.map → chunk-DXXBPAXT.mjs.map} +0 -0
- /package/dist/{chunk-SCNDLTL6.mjs.map → chunk-FI3X2XXY.mjs.map} +0 -0
- /package/dist/{chunk-DK6TQHF3.mjs.map → chunk-K7NZINEX.mjs.map} +0 -0
- /package/dist/{chunk-SOXQOCCH.mjs.map → chunk-LXJTNB3X.mjs.map} +0 -0
- /package/dist/{chunk-FT66ANA7.mjs.map → chunk-M456CJK4.mjs.map} +0 -0
- /package/dist/{chunk-COJ6DGFZ.mjs.map → chunk-PVWD7L7K.mjs.map} +0 -0
- /package/dist/{chunk-YDEAOY7R.mjs.map → chunk-Q5LRJWPK.mjs.map} +0 -0
- /package/dist/{chunk-DLJOM2QT.mjs.map → chunk-RTTVCEWR.mjs.map} +0 -0
- /package/dist/{chunk-5HLBJ56K.mjs.map → chunk-TRIKRGDF.mjs.map} +0 -0
- /package/dist/{chunk-DIJQ6NKV.mjs.map → chunk-VZYOBAK7.mjs.map} +0 -0
- /package/dist/{chunk-2VL6B3UJ.mjs.map → chunk-XH47BBYI.mjs.map} +0 -0
- /package/dist/{chunk-LXCI7XE5.mjs.map → chunk-ZDGQPZ6G.mjs.map} +0 -0
package/dist/domain/Typo.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ import { Json, JsonValue } from '../types/Json';
|
|
|
5
5
|
import { PageList } from '../types/PageList';
|
|
6
6
|
import { Id, Key } from '../types/Id';
|
|
7
7
|
import { List } from '../types/List';
|
|
8
|
-
|
|
8
|
+
import { RouteGateway } from '../services/RouteGateway';
|
|
9
|
+
import { RouteOptions } from '../services/Api';
|
|
10
|
+
export declare class Typo<T, Options extends RouteOptions = RouteOptions> extends Repository<T, Options> {
|
|
9
11
|
protected view: View<T>;
|
|
10
12
|
private readonly gateway;
|
|
11
13
|
constructor(view: View<T>, gateway: Gateway<Options>);
|
|
@@ -19,3 +21,19 @@ export declare class Typo<T, Options = FetchOptions> extends Repository<T, Optio
|
|
|
19
21
|
filter(options?: Options): Promise<PageList<T>>;
|
|
20
22
|
exists(id: Id): Promise<boolean>;
|
|
21
23
|
}
|
|
24
|
+
export declare class Agent<T, Options extends FetchOptions = FetchOptions> extends Repository<T, Options> {
|
|
25
|
+
private gateway;
|
|
26
|
+
constructor(gateway: RouteGateway);
|
|
27
|
+
all(options?: Options): Promise<PageList<T>>;
|
|
28
|
+
byId(id: Id): Promise<T>;
|
|
29
|
+
byIds(...ids: Id[]): Promise<List<T>>;
|
|
30
|
+
byKey(key: Key, options?: Options): Promise<PageList<T>>;
|
|
31
|
+
by(key: keyof T, value: JsonValue, options?: Options): Promise<PageList<T>>;
|
|
32
|
+
search(q: JsonValue, options?: Options): Promise<PageList<T>>;
|
|
33
|
+
filter(options?: Options): Promise<PageList<T>>;
|
|
34
|
+
exists(id: Id): Promise<boolean>;
|
|
35
|
+
add(t: Partial<T>): Promise<T>;
|
|
36
|
+
update(id: Id, t: Partial<T>): Promise<T>;
|
|
37
|
+
upsert(id: Id, t: Partial<T>): Promise<T>;
|
|
38
|
+
remove(id: Id): Promise<boolean>;
|
|
39
|
+
}
|
package/dist/domain/Typo.mjs
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Repository
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-WVYZIPWC.mjs";
|
|
4
|
+
import {
|
|
5
|
+
toJson
|
|
6
|
+
} from "../chunk-IANSP3JJ.mjs";
|
|
4
7
|
import {
|
|
5
8
|
when
|
|
6
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-TRIKRGDF.mjs";
|
|
7
10
|
import "../chunk-OFGI5FLG.mjs";
|
|
8
11
|
import "../chunk-KYQULNU4.mjs";
|
|
9
12
|
import "../chunk-BGSOJQAU.mjs";
|
|
10
|
-
import "../chunk-PKILDKWU.mjs";
|
|
11
13
|
import {
|
|
12
14
|
Exception
|
|
13
15
|
} from "../chunk-KXOBVHGI.mjs";
|
|
16
|
+
import "../chunk-PKILDKWU.mjs";
|
|
14
17
|
import "../chunk-WSBULPUZ.mjs";
|
|
15
18
|
import "../chunk-YGKMN5UC.mjs";
|
|
16
19
|
import "../chunk-3Y7X2UQ6.mjs";
|
|
@@ -61,7 +64,50 @@ var Typo = class extends Repository {
|
|
|
61
64
|
return this.gateway.exists(id);
|
|
62
65
|
}
|
|
63
66
|
};
|
|
67
|
+
var Agent = class extends Repository {
|
|
68
|
+
constructor(gateway) {
|
|
69
|
+
super();
|
|
70
|
+
this.gateway = gateway;
|
|
71
|
+
}
|
|
72
|
+
all(options) {
|
|
73
|
+
return this.gateway.all(options);
|
|
74
|
+
}
|
|
75
|
+
byId(id) {
|
|
76
|
+
return this.gateway.byId(id);
|
|
77
|
+
}
|
|
78
|
+
byIds(...ids) {
|
|
79
|
+
return this.gateway.byIds(...ids);
|
|
80
|
+
}
|
|
81
|
+
byKey(key, options) {
|
|
82
|
+
return this.gateway.by("key", key, options);
|
|
83
|
+
}
|
|
84
|
+
by(key, value, options) {
|
|
85
|
+
return this.gateway.by(key.toString(), value, options);
|
|
86
|
+
}
|
|
87
|
+
search(q, options) {
|
|
88
|
+
return this.gateway.search(q, options);
|
|
89
|
+
}
|
|
90
|
+
filter(options) {
|
|
91
|
+
return this.gateway.filter(options);
|
|
92
|
+
}
|
|
93
|
+
exists(id) {
|
|
94
|
+
return this.gateway.exists(id);
|
|
95
|
+
}
|
|
96
|
+
add(t) {
|
|
97
|
+
return this.gateway.add(toJson(t));
|
|
98
|
+
}
|
|
99
|
+
update(id, t) {
|
|
100
|
+
return this.gateway.update({ ...toJson(t), id });
|
|
101
|
+
}
|
|
102
|
+
upsert(id, t) {
|
|
103
|
+
return this.gateway.upsert({ ...toJson(t), id });
|
|
104
|
+
}
|
|
105
|
+
remove(id) {
|
|
106
|
+
return this.gateway.remove(id);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
64
109
|
export {
|
|
110
|
+
Agent,
|
|
65
111
|
Typo
|
|
66
112
|
};
|
|
67
113
|
//# sourceMappingURL=Typo.mjs.map
|
package/dist/domain/Typo.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/domain/Typo.ts"],"sourcesContent":["import { View } from '../utils/View';\nimport { FetchOptions, Gateway } from '../types/Gateway';\nimport { Repository } from '../types/Repository';\nimport { Json, JsonValue } from '../types/Json';\nimport { PageList } from '../types/PageList';\nimport { Id, Key } from '../types/Id';\nimport { when } from '../validation/When';\nimport { Exception } from '../types/Exception';\nimport { List } from '../types/List';\n\nexport class Typo<T, Options =
|
|
1
|
+
{"version":3,"sources":["../../src/domain/Typo.ts"],"sourcesContent":["import { View } from '../utils/View';\nimport { FetchOptions, Gateway } from '../types/Gateway';\nimport { Repository } from '../types/Repository';\nimport { Json, JsonValue, toJson } from '../types/Json';\nimport { PageList } from '../types/PageList';\nimport { Id, Key } from '../types/Id';\nimport { when } from '../validation/When';\nimport { Exception } from '../types/Exception';\nimport { List } from '../types/List';\nimport { RouteGateway } from '../services/RouteGateway';\nimport { RouteOptions } from '../services/Api';\n\nexport class Typo<T, Options extends RouteOptions = RouteOptions> extends Repository<T, Options> {\n constructor(\n protected view: View<T>,\n private readonly gateway: Gateway<Options>\n ) {\n super();\n }\n\n create = (j: Json): T => this.view.from(j);\n\n all(options?: Options): Promise<PageList<T>> {\n return this.gateway.all(options).then(js => js.map(this.create));\n }\n\n byId(id: Id): Promise<T> {\n return this.gateway\n .byId(id)\n .then(j => when(j).not.isDefined.reject(Exception.DoesNotExist))\n .then(j => this.create(j));\n }\n\n byIds(...ids: Id[]): Promise<List<T>> {\n return this.gateway.byIds(...ids).then(js => js.map(this.create));\n }\n\n byKey(key: Key, options?: Options): Promise<PageList<T>> {\n return this.gateway.by('key', key, options).then(js => js.map(this.create));\n }\n\n by(key: keyof T, value: JsonValue, options?: Options): Promise<PageList<T>> {\n return this.gateway.by(key.toString(), value, options).then(js => js.map(this.create));\n }\n\n search(q: JsonValue, options?: Options): Promise<PageList<T>> {\n return this.gateway.search(q, options).then(js => js.map(this.create));\n }\n\n filter(options?: Options): Promise<PageList<T>> {\n return this.gateway.filter(options).then(js => js.map(j => this.create(j)));\n }\n\n exists(id: Id): Promise<boolean> {\n return this.gateway.exists(id);\n }\n}\n\nexport class Agent<T, Options extends FetchOptions = FetchOptions> extends Repository<T, Options> {\n constructor(private gateway: RouteGateway) {\n super();\n }\n\n all(options?: Options): Promise<PageList<T>> {\n return this.gateway.all(options) as Promise<PageList<T>>;\n }\n\n byId(id: Id): Promise<T> {\n return this.gateway.byId(id) as Promise<T>;\n }\n\n byIds(...ids: Id[]): Promise<List<T>> {\n return this.gateway.byIds(...ids) as Promise<List<T>>;\n }\n\n byKey(key: Key, options?: Options): Promise<PageList<T>> {\n return this.gateway.by('key', key, options) as Promise<PageList<T>>;\n }\n\n by(key: keyof T, value: JsonValue, options?: Options): Promise<PageList<T>> {\n return this.gateway.by(key.toString(), value, options) as Promise<PageList<T>>;\n }\n\n search(q: JsonValue, options?: Options): Promise<PageList<T>> {\n return this.gateway.search(q, options) as Promise<PageList<T>>;\n }\n\n filter(options?: Options): Promise<PageList<T>> {\n return this.gateway.filter(options) as Promise<PageList<T>>;\n }\n\n exists(id: Id): Promise<boolean> {\n return this.gateway.exists(id);\n }\n\n add(t: Partial<T>): Promise<T> {\n return this.gateway.add(toJson(t)) as Promise<T>;\n }\n\n update(id: Id, t: Partial<T>): Promise<T> {\n return this.gateway.update({ ...toJson(t), id }) as Promise<T>;\n }\n\n upsert(id: Id, t: Partial<T>): Promise<T> {\n return this.gateway.upsert({ ...toJson(t), id }) as Promise<T>;\n }\n\n remove(id: Id): Promise<boolean> {\n return this.gateway.remove(id);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAM,OAAN,cAAmE,WAAuB;AAAA,EAC/F,YACY,MACO,SACjB;AACA,UAAM;AAHI;AACO;AAAA,EAGnB;AAAA,EAEA,SAAS,CAAC,MAAe,KAAK,KAAK,KAAK,CAAC;AAAA,EAEzC,IAAI,SAAyC;AAC3C,WAAO,KAAK,QAAQ,IAAI,OAAO,EAAE,K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TRIKRGDF.mjs";
|
|
7
7
|
import "../chunk-OFGI5FLG.mjs";
|
|
8
8
|
import "../chunk-KYQULNU4.mjs";
|
|
9
9
|
import "../chunk-BGSOJQAU.mjs";
|
|
10
|
-
import "../chunk-PKILDKWU.mjs";
|
|
11
10
|
import "../chunk-KXOBVHGI.mjs";
|
|
11
|
+
import "../chunk-PKILDKWU.mjs";
|
|
12
12
|
import "../chunk-WSBULPUZ.mjs";
|
|
13
13
|
import "../chunk-YGKMN5UC.mjs";
|
|
14
14
|
import "../chunk-3Y7X2UQ6.mjs";
|
package/dist/http/RestResult.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isRestResult,
|
|
3
3
|
rest
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-M456CJK4.mjs";
|
|
5
5
|
import "../chunk-H27UMLDT.mjs";
|
|
6
6
|
import "../chunk-UYDZZAEK.mjs";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-TRIKRGDF.mjs";
|
|
8
8
|
import "../chunk-OFGI5FLG.mjs";
|
|
9
9
|
import "../chunk-KYQULNU4.mjs";
|
|
10
10
|
import "../chunk-BGSOJQAU.mjs";
|
|
11
|
-
import "../chunk-PKILDKWU.mjs";
|
|
12
11
|
import "../chunk-KXOBVHGI.mjs";
|
|
12
|
+
import "../chunk-PKILDKWU.mjs";
|
|
13
13
|
import "../chunk-WSBULPUZ.mjs";
|
|
14
14
|
import "../chunk-YGKMN5UC.mjs";
|
|
15
15
|
import "../chunk-3Y7X2UQ6.mjs";
|
package/dist/http/toResponse.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toResponse
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-3B4UXDOZ.mjs";
|
|
4
|
+
import "../chunk-M456CJK4.mjs";
|
|
5
5
|
import "../chunk-H27UMLDT.mjs";
|
|
6
6
|
import "../chunk-UYDZZAEK.mjs";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-TRIKRGDF.mjs";
|
|
8
8
|
import "../chunk-OFGI5FLG.mjs";
|
|
9
9
|
import "../chunk-KYQULNU4.mjs";
|
|
10
10
|
import "../chunk-BGSOJQAU.mjs";
|
|
11
|
-
import "../chunk-PKILDKWU.mjs";
|
|
12
11
|
import "../chunk-KXOBVHGI.mjs";
|
|
12
|
+
import "../chunk-PKILDKWU.mjs";
|
|
13
13
|
import "../chunk-WSBULPUZ.mjs";
|
|
14
14
|
import "../chunk-YGKMN5UC.mjs";
|
|
15
15
|
import "../chunk-3Y7X2UQ6.mjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export * from './types/Gateway';
|
|
|
65
65
|
export * from './types/Get';
|
|
66
66
|
export * from './types/Id';
|
|
67
67
|
export * from './types/Identity';
|
|
68
|
+
export * from './types/IdName';
|
|
68
69
|
export * from './types/Is';
|
|
69
70
|
export * from './types/IsA';
|
|
70
71
|
export * from './types/IsDate';
|
|
@@ -110,3 +111,4 @@ export * from './utils/Wait';
|
|
|
110
111
|
export * from './validation/Contraints';
|
|
111
112
|
export * from './validation/Validate';
|
|
112
113
|
export * from './validation/When';
|
|
114
|
+
export { IdName } from './types/IdName';
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
39
39
|
// src/index.ts
|
|
40
40
|
var src_exports = {};
|
|
41
41
|
__export(src_exports, {
|
|
42
|
+
Agent: () => Agent,
|
|
42
43
|
Api: () => Api,
|
|
43
44
|
ApiGateway: () => ApiGateway,
|
|
44
45
|
App: () => App,
|
|
@@ -2032,6 +2033,48 @@ var Typo = class extends Repository {
|
|
|
2032
2033
|
return this.gateway.exists(id);
|
|
2033
2034
|
}
|
|
2034
2035
|
};
|
|
2036
|
+
var Agent = class extends Repository {
|
|
2037
|
+
constructor(gateway) {
|
|
2038
|
+
super();
|
|
2039
|
+
this.gateway = gateway;
|
|
2040
|
+
}
|
|
2041
|
+
all(options) {
|
|
2042
|
+
return this.gateway.all(options);
|
|
2043
|
+
}
|
|
2044
|
+
byId(id) {
|
|
2045
|
+
return this.gateway.byId(id);
|
|
2046
|
+
}
|
|
2047
|
+
byIds(...ids) {
|
|
2048
|
+
return this.gateway.byIds(...ids);
|
|
2049
|
+
}
|
|
2050
|
+
byKey(key, options) {
|
|
2051
|
+
return this.gateway.by("key", key, options);
|
|
2052
|
+
}
|
|
2053
|
+
by(key, value, options) {
|
|
2054
|
+
return this.gateway.by(key.toString(), value, options);
|
|
2055
|
+
}
|
|
2056
|
+
search(q, options) {
|
|
2057
|
+
return this.gateway.search(q, options);
|
|
2058
|
+
}
|
|
2059
|
+
filter(options) {
|
|
2060
|
+
return this.gateway.filter(options);
|
|
2061
|
+
}
|
|
2062
|
+
exists(id) {
|
|
2063
|
+
return this.gateway.exists(id);
|
|
2064
|
+
}
|
|
2065
|
+
add(t) {
|
|
2066
|
+
return this.gateway.add(toJson(t));
|
|
2067
|
+
}
|
|
2068
|
+
update(id, t) {
|
|
2069
|
+
return this.gateway.update({ ...toJson(t), id });
|
|
2070
|
+
}
|
|
2071
|
+
upsert(id, t) {
|
|
2072
|
+
return this.gateway.upsert({ ...toJson(t), id });
|
|
2073
|
+
}
|
|
2074
|
+
remove(id) {
|
|
2075
|
+
return this.gateway.remove(id);
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
2035
2078
|
|
|
2036
2079
|
// src/types/Number.ts
|
|
2037
2080
|
var asNumber = (n, alt) => tryTo(() => asString(n)).map((s) => parseInt(s)).filter((n2) => isNumber(n2)).or(ofGet(alt) ?? NaN);
|
|
@@ -2626,34 +2669,34 @@ var RouteGateway = class extends ApiGateway {
|
|
|
2626
2669
|
this.api = api2;
|
|
2627
2670
|
}
|
|
2628
2671
|
all(options) {
|
|
2629
|
-
return this.get(this.route(), options);
|
|
2672
|
+
return this.get(this.route().expand(options ?? {}), options);
|
|
2630
2673
|
}
|
|
2631
|
-
byId(id
|
|
2674
|
+
byId(id) {
|
|
2632
2675
|
return this.getOne(this.routeId().id(id));
|
|
2633
2676
|
}
|
|
2634
2677
|
byIds(...ids) {
|
|
2635
2678
|
return this.get(this.route().ids(toArray(...ids)));
|
|
2636
2679
|
}
|
|
2637
2680
|
search(q, options) {
|
|
2638
|
-
return this.get(this.route().
|
|
2681
|
+
return this.get(this.route().expand({ ...options, q }));
|
|
2639
2682
|
}
|
|
2640
|
-
exists(id
|
|
2641
|
-
return this.
|
|
2683
|
+
exists(id) {
|
|
2684
|
+
return this.byId(id).then((r) => isDefined(r)).catch((r) => HttpStatus.NotFound.equals(r.status) ? false : Promise.reject(r));
|
|
2642
2685
|
}
|
|
2643
|
-
add(item
|
|
2644
|
-
return this.post(this.route(), item
|
|
2686
|
+
add(item) {
|
|
2687
|
+
return this.post(this.route(), item);
|
|
2645
2688
|
}
|
|
2646
2689
|
filter(options) {
|
|
2647
|
-
return this.postSearch(this.route()
|
|
2690
|
+
return this.postSearch(this.route().expand(options ?? {}));
|
|
2648
2691
|
}
|
|
2649
|
-
update(item
|
|
2650
|
-
return this.patch(this.routeId().id(item.id), item
|
|
2692
|
+
update(item) {
|
|
2693
|
+
return this.patch(this.routeId().id(item.id), item);
|
|
2651
2694
|
}
|
|
2652
|
-
upsert(item
|
|
2653
|
-
return this.put(this.routeId().id(item.id), item
|
|
2695
|
+
upsert(item) {
|
|
2696
|
+
return this.put(this.routeId().id(item.id), item);
|
|
2654
2697
|
}
|
|
2655
|
-
remove(id
|
|
2656
|
-
return this.delete(this.routeId().id(id)
|
|
2698
|
+
remove(id) {
|
|
2699
|
+
return this.delete(this.routeId().id(id));
|
|
2657
2700
|
}
|
|
2658
2701
|
};
|
|
2659
2702
|
|
|
@@ -3413,6 +3456,7 @@ var Wait = class {
|
|
|
3413
3456
|
var wait = (millis) => Wait.wait(millis);
|
|
3414
3457
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3415
3458
|
0 && (module.exports = {
|
|
3459
|
+
Agent,
|
|
3416
3460
|
Api,
|
|
3417
3461
|
ApiGateway,
|
|
3418
3462
|
App,
|