@etohq/types 1.3.0 → 1.4.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/LICENSE +21 -0
- package/dist/http/common/request.d.ts +27 -4
- package/dist/http/common/request.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +22 -21
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Etohq
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -11,7 +11,7 @@ export interface SelectParams {
|
|
|
11
11
|
*
|
|
12
12
|
* Learn more in the [API reference](https://docs.etohq.com/api/store#select-fields-and-relations).
|
|
13
13
|
*/
|
|
14
|
-
fields?: string;
|
|
14
|
+
fields?: string[];
|
|
15
15
|
}
|
|
16
16
|
export interface FindParams extends SelectParams {
|
|
17
17
|
/**
|
|
@@ -40,9 +40,32 @@ export interface AdminBatchLink {
|
|
|
40
40
|
*/
|
|
41
41
|
remove?: string[];
|
|
42
42
|
}
|
|
43
|
+
export type LinkMethodRequest = {
|
|
44
|
+
add?: string[];
|
|
45
|
+
remove?: string[];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Specific generic type to ensure `id` is present as a required `string` (never undefined).
|
|
49
|
+
* If `id` exists in T, it is overridden as required string (not string | undefined).
|
|
50
|
+
* If `id` does not exist in T, it is added as required string.
|
|
51
|
+
*/
|
|
52
|
+
export type ModReqId<T extends object> = Omit<T, "id"> & {
|
|
53
|
+
id: string;
|
|
54
|
+
};
|
|
55
|
+
export type WithRequestConfig = {
|
|
56
|
+
queryConfig: {
|
|
57
|
+
fields?: string[];
|
|
58
|
+
pagination: {
|
|
59
|
+
skip?: number;
|
|
60
|
+
take?: number;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export type EtoRequest<Body = unknown> = Body;
|
|
43
65
|
/**
|
|
44
|
-
*
|
|
66
|
+
* Combines ModReqId and EtoRequest: ensures `id` is required string and merges with QueryFields.
|
|
45
67
|
*/
|
|
46
|
-
export type
|
|
47
|
-
|
|
68
|
+
export type EtoReqIdRequest<T extends object> = T & {
|
|
69
|
+
id: string;
|
|
70
|
+
};
|
|
48
71
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/http/common/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/http/common/request.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,CA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AAE,MAAM,CAAA;CAAE,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -27,4 +27,5 @@ export * from "./workflows-sdk";
|
|
|
27
27
|
export * from "./http/encore";
|
|
28
28
|
export * from "./shared-context";
|
|
29
29
|
export { OperatorMap, BaseFilterable, FilterQuery, Query } from "./http/encore";
|
|
30
|
+
export { LinkMethodRequest } from "./http/common";
|
|
30
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,OAAO,CAAA;AACrB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,OAAO,CAAA;AACrB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etohq/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Eto Types definition",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
6
|
"exports": {
|
|
8
7
|
".": {
|
|
9
8
|
"types": "./dist/index.d.ts",
|
|
@@ -810,30 +809,25 @@
|
|
|
810
809
|
],
|
|
811
810
|
"author": "Eto",
|
|
812
811
|
"license": "MIT",
|
|
813
|
-
"scripts": {
|
|
814
|
-
"build": "rimraf dist && tsc --build",
|
|
815
|
-
"watch": "tsc --build --watch",
|
|
816
|
-
"test": "exit 0",
|
|
817
|
-
"generate:exports": "node ../../../scripts/generate-exports.js"
|
|
818
|
-
},
|
|
819
812
|
"dependencies": {
|
|
820
|
-
"bignumber.js": "
|
|
813
|
+
"bignumber.js": "9.1.2"
|
|
821
814
|
},
|
|
822
815
|
"devDependencies": {
|
|
823
816
|
"@mikro-orm/core": "5.9.7",
|
|
824
|
-
"@types/jest": "
|
|
825
|
-
"@types/node": "
|
|
826
|
-
"awilix": "
|
|
827
|
-
"expect-type": "
|
|
828
|
-
"ioredis": "
|
|
829
|
-
"rimraf": "
|
|
830
|
-
"typescript": "
|
|
831
|
-
"
|
|
817
|
+
"@types/jest": "29.5.14",
|
|
818
|
+
"@types/node": "22.10.5",
|
|
819
|
+
"awilix": "8.0.1",
|
|
820
|
+
"expect-type": "0.20.0",
|
|
821
|
+
"ioredis": "5.4.1",
|
|
822
|
+
"rimraf": "5.0.2",
|
|
823
|
+
"typescript": "5.8.3",
|
|
824
|
+
"tsc-alias": "1.8.6",
|
|
825
|
+
"vite": "5.2.11"
|
|
832
826
|
},
|
|
833
827
|
"peerDependencies": {
|
|
834
|
-
"awilix": "
|
|
835
|
-
"ioredis": "
|
|
836
|
-
"vite": "
|
|
828
|
+
"awilix": "8.0.1",
|
|
829
|
+
"ioredis": "5.4.1",
|
|
830
|
+
"vite": "5.2.11"
|
|
837
831
|
},
|
|
838
832
|
"peerDependenciesMeta": {
|
|
839
833
|
"ioredis": {
|
|
@@ -842,5 +836,12 @@
|
|
|
842
836
|
"vite": {
|
|
843
837
|
"optional": true
|
|
844
838
|
}
|
|
839
|
+
},
|
|
840
|
+
"scripts": {
|
|
841
|
+
"build": "rimraf dist && tsc --build && npm run resolve:aliases",
|
|
842
|
+
"watch": "tsc --build --watch",
|
|
843
|
+
"resolve:aliases": "tsc --showConfig -p tsconfig.json > tsconfig.resolved.json && tsc-alias -p tsconfig.resolved.json && rimraf tsconfig.resolved.json",
|
|
844
|
+
"test": "exit 0",
|
|
845
|
+
"generate:exports": "node ../../../scripts/generate-exports.js"
|
|
845
846
|
}
|
|
846
|
-
}
|
|
847
|
+
}
|