@teamkeel/functions-runtime 0.273.6 → 0.273.8
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/package.json +1 -3
- package/pnpm-lock.yaml +215 -813
- package/src/database.js +0 -15
- package/src/index.d.ts +28 -28
package/src/database.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const { Kysely, PostgresDialect } = require("kysely");
|
|
2
2
|
const pg = require("pg");
|
|
3
|
-
const { DataApiDialect } = require("kysely-data-api");
|
|
4
|
-
const RDSDataService = require("aws-sdk/clients/rdsdataservice");
|
|
5
3
|
|
|
6
4
|
function mustEnv(key) {
|
|
7
5
|
const v = process.env[key];
|
|
@@ -21,19 +19,6 @@ function getDialect() {
|
|
|
21
19
|
}),
|
|
22
20
|
});
|
|
23
21
|
|
|
24
|
-
case "dataapi":
|
|
25
|
-
return new DataApiDialect({
|
|
26
|
-
mode: "postgres",
|
|
27
|
-
driver: {
|
|
28
|
-
client: new RDSDataService({
|
|
29
|
-
region: mustEnv("KEEL_DB_REGION"),
|
|
30
|
-
}),
|
|
31
|
-
database: mustEnv("KEEL_DB_NAME"),
|
|
32
|
-
secretArn: mustEnv("KEEL_DB_SECRET_ARN"),
|
|
33
|
-
resourceArn: mustEnv("KEEL_DB_RESOURCE_ARN"),
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
22
|
default:
|
|
38
23
|
throw Error("unexpected KEEL_DB_CONN_TYPE: " + dbConnType);
|
|
39
24
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -2,55 +2,55 @@
|
|
|
2
2
|
// that are used by the generated @teamkeel/sdk package.
|
|
3
3
|
|
|
4
4
|
export type IDWhereCondition = {
|
|
5
|
-
equals?: string;
|
|
6
|
-
oneOf?: string[];
|
|
5
|
+
equals?: string | null;
|
|
6
|
+
oneOf?: string[] | null;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export type StringWhereCondition = {
|
|
10
|
-
startsWith?: string;
|
|
11
|
-
endsWith?: string;
|
|
12
|
-
oneOf?: string[];
|
|
13
|
-
contains?: string;
|
|
14
|
-
notEquals?: string;
|
|
15
|
-
equals?: string;
|
|
10
|
+
startsWith?: string | null;
|
|
11
|
+
endsWith?: string | null;
|
|
12
|
+
oneOf?: string[] | null;
|
|
13
|
+
contains?: string | null;
|
|
14
|
+
notEquals?: string | null;
|
|
15
|
+
equals?: string | null;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export type BooleanWhereCondition = {
|
|
19
|
-
equals?: boolean;
|
|
20
|
-
notEquals?: boolean;
|
|
19
|
+
equals?: boolean | null;
|
|
20
|
+
notEquals?: boolean | null;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export type NumberWhereCondition = {
|
|
24
|
-
greaterThan?: number;
|
|
25
|
-
greaterThanOrEquals?: number;
|
|
26
|
-
lessThan?: number;
|
|
27
|
-
lessThanOrEquals?: number;
|
|
28
|
-
equals?: number;
|
|
29
|
-
notEquals?: number;
|
|
24
|
+
greaterThan?: number | null;
|
|
25
|
+
greaterThanOrEquals?: number | null;
|
|
26
|
+
lessThan?: number | null;
|
|
27
|
+
lessThanOrEquals?: number | null;
|
|
28
|
+
equals?: number | null;
|
|
29
|
+
notEquals?: number | null;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
// Date database API
|
|
33
33
|
export type DateWhereCondition = {
|
|
34
|
-
equals?: Date | string;
|
|
35
|
-
before?: Date | string;
|
|
36
|
-
onOrBefore?: Date | string;
|
|
37
|
-
after?: Date | string;
|
|
38
|
-
onOrAfter?: Date | string;
|
|
34
|
+
equals?: Date | string | null;
|
|
35
|
+
before?: Date | string | null;
|
|
36
|
+
onOrBefore?: Date | string | null;
|
|
37
|
+
after?: Date | string | null;
|
|
38
|
+
onOrAfter?: Date | string | null;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
// Date query input
|
|
42
42
|
export type DateQueryInput = {
|
|
43
|
-
equals?: string;
|
|
44
|
-
before?: string;
|
|
45
|
-
onOrBefore?: string;
|
|
46
|
-
after?: string;
|
|
47
|
-
onOrAfter?: string;
|
|
43
|
+
equals?: string | null;
|
|
44
|
+
before?: string | null;
|
|
45
|
+
onOrBefore?: string | null;
|
|
46
|
+
after?: string | null;
|
|
47
|
+
onOrAfter?: string | null;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
// Timestamp query input
|
|
51
51
|
export type TimestampQueryInput = {
|
|
52
|
-
before: string;
|
|
53
|
-
after: string;
|
|
52
|
+
before: string | null;
|
|
53
|
+
after: string | null;
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
export type ContextAPI = {
|