@keystrokehq/snowflake 0.0.9 → 0.0.16-integration-id-canonicalization.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/README.md +3 -9
- package/dist/{accounts.d.mts → accounts/index.d.mts} +3 -3
- package/dist/{accounts.mjs → accounts/index.mjs} +3 -3
- package/dist/{bulk.d.mts → bulk/index.d.mts} +6 -6
- package/dist/{bulk.mjs → bulk/index.mjs} +5 -5
- package/dist/{catalog.d.mts → catalog/index.d.mts} +3 -3
- package/dist/{catalog.mjs → catalog/index.mjs} +3 -3
- package/dist/{client.d.mts → client/index.d.mts} +3 -3
- package/dist/{client.mjs → client/index.mjs} +4 -4
- package/dist/credential-sets/index.d.mts +3 -0
- package/dist/credential-sets/index.mjs +4 -0
- package/dist/{databases.d.mts → databases/index.d.mts} +1 -1
- package/dist/databases/index.mjs +3 -0
- package/dist/{events.d.mts → events/index.d.mts} +1 -1
- package/dist/{events.mjs → events/index.mjs} +2 -2
- package/dist/{file-formats.d.mts → file-formats/index.d.mts} +5 -5
- package/dist/{file-formats.mjs → file-formats/index.mjs} +5 -5
- package/dist/{functions.d.mts → functions/index.d.mts} +5 -5
- package/dist/{functions.mjs → functions/index.mjs} +5 -5
- package/dist/{grants.d.mts → grants/index.d.mts} +3 -3
- package/dist/{grants.mjs → grants/index.mjs} +4 -4
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +6 -1
- package/dist/{org-admin.d.mts → org-admin/index.d.mts} +4 -4
- package/dist/{org-admin.mjs → org-admin/index.mjs} +4 -4
- package/dist/{pipes.d.mts → pipes/index.d.mts} +4 -4
- package/dist/{pipes.mjs → pipes/index.mjs} +4 -4
- package/dist/{procedures.d.mts → procedures/index.d.mts} +7 -7
- package/dist/{procedures.mjs → procedures/index.mjs} +6 -6
- package/dist/{results.d.mts → results/index.d.mts} +2 -2
- package/dist/{results.mjs → results/index.mjs} +1 -1
- package/dist/{roles.d.mts → roles/index.d.mts} +4 -4
- package/dist/{roles.mjs → roles/index.mjs} +5 -5
- package/dist/{rows.d.mts → rows/index.d.mts} +3 -3
- package/dist/{rows.mjs → rows/index.mjs} +3 -3
- package/dist/schemas/index.mjs +2 -2
- package/dist/{schemas-catalog.d.mts → schemas-catalog/index.d.mts} +1 -1
- package/dist/schemas-catalog/index.mjs +3 -0
- package/dist/{shares.d.mts → shares/index.d.mts} +4 -4
- package/dist/{shares.mjs → shares/index.mjs} +4 -4
- package/dist/snowflake-s3-sns-webhook.credential-set-D6bLAWy5.d.mts +50 -0
- package/dist/snowflake-s3-sns-webhook.credential-set-DzR7oWNK.mjs +44 -0
- package/dist/{integration-86b6WaJF.d.mts → snowflake.credential-set-BxT7Gf3A.d.mts} +36 -92
- package/dist/snowflake.credential-set-DE3gXf-a.mjs +106 -0
- package/dist/{sql.d.mts → sql/index.d.mts} +3 -3
- package/dist/{sql.mjs → sql/index.mjs} +4 -4
- package/dist/{sql-options-DI-OmLU6.mjs → sql-options-D6GEa21F.mjs} +1 -1
- package/dist/{stages.d.mts → stages/index.d.mts} +6 -6
- package/dist/{stages.mjs → stages/index.mjs} +5 -5
- package/dist/{statements-B2ThF_4b.mjs → statements-BumhMhN4.mjs} +1 -1
- package/dist/{status-page.d.mts → status-page/index.d.mts} +1 -1
- package/dist/{status-page.mjs → status-page/index.mjs} +1 -1
- package/dist/{streaming.d.mts → streaming/index.d.mts} +2 -2
- package/dist/{streaming.mjs → streaming/index.mjs} +1 -1
- package/dist/{streams.d.mts → streams/index.d.mts} +5 -5
- package/dist/{streams.mjs → streams/index.mjs} +5 -5
- package/dist/{tables.d.mts → tables/index.d.mts} +1 -1
- package/dist/{tables.mjs → tables/index.mjs} +1 -1
- package/dist/{tasks.d.mts → tasks/index.d.mts} +5 -5
- package/dist/{tasks.mjs → tasks/index.mjs} +5 -5
- package/dist/{triggers.d.mts → triggers/index.d.mts} +6 -6
- package/dist/{triggers.mjs → triggers/index.mjs} +10 -11
- package/dist/{users.d.mts → users/index.d.mts} +5 -5
- package/dist/{users.mjs → users/index.mjs} +5 -5
- package/dist/{verification.d.mts → verification/index.d.mts} +2 -2
- package/dist/{verification.mjs → verification/index.mjs} +2 -2
- package/dist/views/index.d.mts +2 -0
- package/dist/views/index.mjs +3 -0
- package/dist/{warehouses.d.mts → warehouses/index.d.mts} +5 -5
- package/dist/{warehouses.mjs → warehouses/index.mjs} +5 -5
- package/package.json +14 -18
- package/dist/_official/index.d.mts +0 -2
- package/dist/_official/index.mjs +0 -3
- package/dist/connection.d.mts +0 -2
- package/dist/connection.mjs +0 -3
- package/dist/databases.mjs +0 -3
- package/dist/integration-DNMbfXEy.mjs +0 -251
- package/dist/schemas-catalog.mjs +0 -3
- package/dist/views.d.mts +0 -2
- package/dist/views.mjs +0 -3
- /package/dist/{common-BnKTPQXc.mjs → common-DfpCwJx5.mjs} +0 -0
- /package/dist/{errors-DKnc9o_a.mjs → errors-60AsF7Su.mjs} +0 -0
- /package/dist/{_runtime → operations}/index.d.mts +0 -0
- /package/dist/{_runtime → operations}/index.mjs +0 -0
- /package/dist/{retry-0hMfb8cC.mjs → retry-B4-9MZIp.mjs} +0 -0
- /package/dist/{sql-safety-CywdR3EP.mjs → sql-safety-BZpAPsq6.mjs} +0 -0
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
1
|
import { CredentialSet } from "@keystrokehq/core";
|
|
3
2
|
import { z } from "zod";
|
|
4
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
5
3
|
import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
|
|
6
4
|
|
|
7
|
-
//#region src/
|
|
5
|
+
//#region src/credential-sets/snowflake.credential-set.d.ts
|
|
8
6
|
/**
|
|
9
7
|
* Public auth schema for Snowflake connections.
|
|
10
8
|
*
|
|
11
9
|
* Modeled as a discriminated union on `mode`. `connection.kind` is `manual`
|
|
12
10
|
* because Keystroke does not run an interactive Snowflake OAuth dance — OAuth
|
|
13
11
|
* mode accepts a bearer token provided by the caller (external IdP /
|
|
14
|
-
* Snowflake-hosted OAuth).
|
|
12
|
+
* Snowflake-hosted OAuth).
|
|
15
13
|
*/
|
|
16
14
|
declare const snowflakeAuthModeSchema: z.ZodEnum<{
|
|
17
15
|
keypair: "keypair";
|
|
@@ -47,11 +45,37 @@ declare const snowflakeAuthSchema: z.ZodObject<{
|
|
|
47
45
|
SNOWFLAKE_REGION: z.ZodOptional<z.ZodString>;
|
|
48
46
|
SNOWFLAKE_PUBLIC_KEY_FP: z.ZodOptional<z.ZodString>;
|
|
49
47
|
}, z.core.$strip>;
|
|
50
|
-
declare const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
declare const snowflakeCredentialSet: CredentialSet<"snowflake", z.ZodObject<{
|
|
49
|
+
mode: z.ZodEnum<{
|
|
50
|
+
keypair: "keypair";
|
|
51
|
+
oauth: "oauth";
|
|
52
|
+
pat: "pat";
|
|
53
|
+
basic: "basic";
|
|
54
|
+
}>;
|
|
55
|
+
SNOWFLAKE_ACCOUNT: z.ZodString;
|
|
56
|
+
SNOWFLAKE_USER: z.ZodOptional<z.ZodString>;
|
|
57
|
+
SNOWFLAKE_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
|
|
58
|
+
SNOWFLAKE_PRIVATE_KEY_PASSPHRASE: z.ZodOptional<z.ZodString>;
|
|
59
|
+
SNOWFLAKE_PAT: z.ZodOptional<z.ZodString>;
|
|
60
|
+
SNOWFLAKE_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
61
|
+
SNOWFLAKE_OAUTH_ACCESS_TOKEN: z.ZodOptional<z.ZodString>;
|
|
62
|
+
SNOWFLAKE_OAUTH_REFRESH_TOKEN: z.ZodOptional<z.ZodString>;
|
|
63
|
+
SNOWFLAKE_OAUTH_CLIENT_ID: z.ZodOptional<z.ZodString>;
|
|
64
|
+
SNOWFLAKE_OAUTH_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
|
|
65
|
+
SNOWFLAKE_OAUTH_TOKEN_URL: z.ZodOptional<z.ZodString>;
|
|
66
|
+
SNOWFLAKE_OAUTH_SCOPES: z.ZodOptional<z.ZodString>;
|
|
67
|
+
SNOWFLAKE_ROLE: z.ZodOptional<z.ZodString>;
|
|
68
|
+
SNOWFLAKE_WAREHOUSE: z.ZodOptional<z.ZodString>;
|
|
69
|
+
SNOWFLAKE_DATABASE: z.ZodOptional<z.ZodString>;
|
|
70
|
+
SNOWFLAKE_SCHEMA: z.ZodOptional<z.ZodString>;
|
|
71
|
+
SNOWFLAKE_HOST: z.ZodOptional<z.ZodString>;
|
|
72
|
+
SNOWFLAKE_REGION: z.ZodOptional<z.ZodString>;
|
|
73
|
+
SNOWFLAKE_PUBLIC_KEY_FP: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>, {
|
|
75
|
+
id: string;
|
|
76
|
+
kind: "manual";
|
|
77
|
+
label: string;
|
|
78
|
+
input: z.ZodObject<{
|
|
55
79
|
mode: z.ZodEnum<{
|
|
56
80
|
keypair: "keypair";
|
|
57
81
|
oauth: "oauth";
|
|
@@ -78,88 +102,8 @@ declare const snowflakeOfficialIntegration: {
|
|
|
78
102
|
SNOWFLAKE_REGION: z.ZodOptional<z.ZodString>;
|
|
79
103
|
SNOWFLAKE_PUBLIC_KEY_FP: z.ZodOptional<z.ZodString>;
|
|
80
104
|
}, z.core.$strip>;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
mode: z.ZodEnum<{
|
|
84
|
-
keypair: "keypair";
|
|
85
|
-
oauth: "oauth";
|
|
86
|
-
pat: "pat";
|
|
87
|
-
basic: "basic";
|
|
88
|
-
}>;
|
|
89
|
-
SNOWFLAKE_ACCOUNT: z.ZodString;
|
|
90
|
-
SNOWFLAKE_USER: z.ZodOptional<z.ZodString>;
|
|
91
|
-
SNOWFLAKE_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
|
|
92
|
-
SNOWFLAKE_PRIVATE_KEY_PASSPHRASE: z.ZodOptional<z.ZodString>;
|
|
93
|
-
SNOWFLAKE_PAT: z.ZodOptional<z.ZodString>;
|
|
94
|
-
SNOWFLAKE_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
95
|
-
SNOWFLAKE_OAUTH_ACCESS_TOKEN: z.ZodOptional<z.ZodString>;
|
|
96
|
-
SNOWFLAKE_OAUTH_REFRESH_TOKEN: z.ZodOptional<z.ZodString>;
|
|
97
|
-
SNOWFLAKE_OAUTH_CLIENT_ID: z.ZodOptional<z.ZodString>;
|
|
98
|
-
SNOWFLAKE_OAUTH_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
|
|
99
|
-
SNOWFLAKE_OAUTH_TOKEN_URL: z.ZodOptional<z.ZodString>;
|
|
100
|
-
SNOWFLAKE_OAUTH_SCOPES: z.ZodOptional<z.ZodString>;
|
|
101
|
-
SNOWFLAKE_ROLE: z.ZodOptional<z.ZodString>;
|
|
102
|
-
SNOWFLAKE_WAREHOUSE: z.ZodOptional<z.ZodString>;
|
|
103
|
-
SNOWFLAKE_DATABASE: z.ZodOptional<z.ZodString>;
|
|
104
|
-
SNOWFLAKE_SCHEMA: z.ZodOptional<z.ZodString>;
|
|
105
|
-
SNOWFLAKE_HOST: z.ZodOptional<z.ZodString>;
|
|
106
|
-
SNOWFLAKE_REGION: z.ZodOptional<z.ZodString>;
|
|
107
|
-
SNOWFLAKE_PUBLIC_KEY_FP: z.ZodOptional<z.ZodString>;
|
|
108
|
-
}, z.core.$strip>>;
|
|
109
|
-
declare const snowflake: _keystrokehq_core0.CredentialSet<"snowflake", z.ZodObject<{
|
|
110
|
-
mode: z.ZodEnum<{
|
|
111
|
-
keypair: "keypair";
|
|
112
|
-
oauth: "oauth";
|
|
113
|
-
pat: "pat";
|
|
114
|
-
basic: "basic";
|
|
115
|
-
}>;
|
|
116
|
-
SNOWFLAKE_ACCOUNT: z.ZodString;
|
|
117
|
-
SNOWFLAKE_USER: z.ZodOptional<z.ZodString>;
|
|
118
|
-
SNOWFLAKE_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
|
|
119
|
-
SNOWFLAKE_PRIVATE_KEY_PASSPHRASE: z.ZodOptional<z.ZodString>;
|
|
120
|
-
SNOWFLAKE_PAT: z.ZodOptional<z.ZodString>;
|
|
121
|
-
SNOWFLAKE_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
122
|
-
SNOWFLAKE_OAUTH_ACCESS_TOKEN: z.ZodOptional<z.ZodString>;
|
|
123
|
-
SNOWFLAKE_OAUTH_REFRESH_TOKEN: z.ZodOptional<z.ZodString>;
|
|
124
|
-
SNOWFLAKE_OAUTH_CLIENT_ID: z.ZodOptional<z.ZodString>;
|
|
125
|
-
SNOWFLAKE_OAUTH_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
|
|
126
|
-
SNOWFLAKE_OAUTH_TOKEN_URL: z.ZodOptional<z.ZodString>;
|
|
127
|
-
SNOWFLAKE_OAUTH_SCOPES: z.ZodOptional<z.ZodString>;
|
|
128
|
-
SNOWFLAKE_ROLE: z.ZodOptional<z.ZodString>;
|
|
129
|
-
SNOWFLAKE_WAREHOUSE: z.ZodOptional<z.ZodString>;
|
|
130
|
-
SNOWFLAKE_DATABASE: z.ZodOptional<z.ZodString>;
|
|
131
|
-
SNOWFLAKE_SCHEMA: z.ZodOptional<z.ZodString>;
|
|
132
|
-
SNOWFLAKE_HOST: z.ZodOptional<z.ZodString>;
|
|
133
|
-
SNOWFLAKE_REGION: z.ZodOptional<z.ZodString>;
|
|
134
|
-
SNOWFLAKE_PUBLIC_KEY_FP: z.ZodOptional<z.ZodString>;
|
|
135
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
136
|
-
mode: z.ZodEnum<{
|
|
137
|
-
keypair: "keypair";
|
|
138
|
-
oauth: "oauth";
|
|
139
|
-
pat: "pat";
|
|
140
|
-
basic: "basic";
|
|
141
|
-
}>;
|
|
142
|
-
SNOWFLAKE_ACCOUNT: z.ZodString;
|
|
143
|
-
SNOWFLAKE_USER: z.ZodOptional<z.ZodString>;
|
|
144
|
-
SNOWFLAKE_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
|
|
145
|
-
SNOWFLAKE_PRIVATE_KEY_PASSPHRASE: z.ZodOptional<z.ZodString>;
|
|
146
|
-
SNOWFLAKE_PAT: z.ZodOptional<z.ZodString>;
|
|
147
|
-
SNOWFLAKE_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
148
|
-
SNOWFLAKE_OAUTH_ACCESS_TOKEN: z.ZodOptional<z.ZodString>;
|
|
149
|
-
SNOWFLAKE_OAUTH_REFRESH_TOKEN: z.ZodOptional<z.ZodString>;
|
|
150
|
-
SNOWFLAKE_OAUTH_CLIENT_ID: z.ZodOptional<z.ZodString>;
|
|
151
|
-
SNOWFLAKE_OAUTH_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
|
|
152
|
-
SNOWFLAKE_OAUTH_TOKEN_URL: z.ZodOptional<z.ZodString>;
|
|
153
|
-
SNOWFLAKE_OAUTH_SCOPES: z.ZodOptional<z.ZodString>;
|
|
154
|
-
SNOWFLAKE_ROLE: z.ZodOptional<z.ZodString>;
|
|
155
|
-
SNOWFLAKE_WAREHOUSE: z.ZodOptional<z.ZodString>;
|
|
156
|
-
SNOWFLAKE_DATABASE: z.ZodOptional<z.ZodString>;
|
|
157
|
-
SNOWFLAKE_SCHEMA: z.ZodOptional<z.ZodString>;
|
|
158
|
-
SNOWFLAKE_HOST: z.ZodOptional<z.ZodString>;
|
|
159
|
-
SNOWFLAKE_REGION: z.ZodOptional<z.ZodString>;
|
|
160
|
-
SNOWFLAKE_PUBLIC_KEY_FP: z.ZodOptional<z.ZodString>;
|
|
161
|
-
}, z.core.$strip>>[] | undefined>;
|
|
162
|
-
type SnowflakeCredentials = InferCredentialSetAuth<typeof snowflake>;
|
|
105
|
+
}[]>;
|
|
106
|
+
type SnowflakeCredentials = InferCredentialSetAuth<typeof snowflakeCredentialSet>;
|
|
163
107
|
/**
|
|
164
108
|
* Parse raw credential values through the full refinement pipeline. Callers
|
|
165
109
|
* (client, operations) should use this instead of the raw object schema so
|
|
@@ -167,4 +111,4 @@ type SnowflakeCredentials = InferCredentialSetAuth<typeof snowflake>;
|
|
|
167
111
|
*/
|
|
168
112
|
declare function parseSnowflakeCredentials(input: unknown): SnowflakeCredentials;
|
|
169
113
|
//#endregion
|
|
170
|
-
export {
|
|
114
|
+
export { snowflakeAuthSchema as a, snowflakeAuthModeSchema as i, SnowflakeCredentials as n, snowflakeCredentialSet as o, parseSnowflakeCredentials as r, SnowflakeAuthMode as t };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { CredentialSet } from "@keystrokehq/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/credential-sets/snowflake.credential-set.ts
|
|
5
|
+
/**
|
|
6
|
+
* Public auth schema for Snowflake connections.
|
|
7
|
+
*
|
|
8
|
+
* Modeled as a discriminated union on `mode`. `connection.kind` is `manual`
|
|
9
|
+
* because Keystroke does not run an interactive Snowflake OAuth dance — OAuth
|
|
10
|
+
* mode accepts a bearer token provided by the caller (external IdP /
|
|
11
|
+
* Snowflake-hosted OAuth).
|
|
12
|
+
*/
|
|
13
|
+
const snowflakeAuthModeSchema = z.enum([
|
|
14
|
+
"keypair",
|
|
15
|
+
"oauth",
|
|
16
|
+
"pat",
|
|
17
|
+
"basic"
|
|
18
|
+
]);
|
|
19
|
+
const baseSnowflakeAuthShape = {
|
|
20
|
+
mode: snowflakeAuthModeSchema,
|
|
21
|
+
SNOWFLAKE_ACCOUNT: z.string().min(1),
|
|
22
|
+
SNOWFLAKE_USER: z.string().min(1).optional(),
|
|
23
|
+
SNOWFLAKE_PRIVATE_KEY: z.string().min(1).optional(),
|
|
24
|
+
SNOWFLAKE_PRIVATE_KEY_PASSPHRASE: z.string().optional(),
|
|
25
|
+
SNOWFLAKE_PAT: z.string().min(1).optional(),
|
|
26
|
+
SNOWFLAKE_PASSWORD: z.string().min(1).optional(),
|
|
27
|
+
SNOWFLAKE_OAUTH_ACCESS_TOKEN: z.string().min(1).optional(),
|
|
28
|
+
SNOWFLAKE_OAUTH_REFRESH_TOKEN: z.string().optional(),
|
|
29
|
+
SNOWFLAKE_OAUTH_CLIENT_ID: z.string().optional(),
|
|
30
|
+
SNOWFLAKE_OAUTH_CLIENT_SECRET: z.string().optional(),
|
|
31
|
+
SNOWFLAKE_OAUTH_TOKEN_URL: z.string().url().optional(),
|
|
32
|
+
SNOWFLAKE_OAUTH_SCOPES: z.string().optional(),
|
|
33
|
+
SNOWFLAKE_ROLE: z.string().optional(),
|
|
34
|
+
SNOWFLAKE_WAREHOUSE: z.string().optional(),
|
|
35
|
+
SNOWFLAKE_DATABASE: z.string().optional(),
|
|
36
|
+
SNOWFLAKE_SCHEMA: z.string().optional(),
|
|
37
|
+
SNOWFLAKE_HOST: z.string().optional(),
|
|
38
|
+
SNOWFLAKE_REGION: z.string().optional(),
|
|
39
|
+
SNOWFLAKE_PUBLIC_KEY_FP: z.string().optional()
|
|
40
|
+
};
|
|
41
|
+
const snowflakeAuthSchema = z.object(baseSnowflakeAuthShape).superRefine((value, ctx) => {
|
|
42
|
+
if (value.mode === "keypair") {
|
|
43
|
+
if (!value.SNOWFLAKE_USER) ctx.addIssue({
|
|
44
|
+
code: z.ZodIssueCode.custom,
|
|
45
|
+
path: ["SNOWFLAKE_USER"],
|
|
46
|
+
message: "SNOWFLAKE_USER is required when mode = \"keypair\""
|
|
47
|
+
});
|
|
48
|
+
if (!value.SNOWFLAKE_PRIVATE_KEY) ctx.addIssue({
|
|
49
|
+
code: z.ZodIssueCode.custom,
|
|
50
|
+
path: ["SNOWFLAKE_PRIVATE_KEY"],
|
|
51
|
+
message: "SNOWFLAKE_PRIVATE_KEY is required when mode = \"keypair\""
|
|
52
|
+
});
|
|
53
|
+
} else if (value.mode === "oauth") {
|
|
54
|
+
if (!value.SNOWFLAKE_OAUTH_ACCESS_TOKEN) ctx.addIssue({
|
|
55
|
+
code: z.ZodIssueCode.custom,
|
|
56
|
+
path: ["SNOWFLAKE_OAUTH_ACCESS_TOKEN"],
|
|
57
|
+
message: "SNOWFLAKE_OAUTH_ACCESS_TOKEN is required when mode = \"oauth\""
|
|
58
|
+
});
|
|
59
|
+
} else if (value.mode === "pat") {
|
|
60
|
+
if (!value.SNOWFLAKE_USER) ctx.addIssue({
|
|
61
|
+
code: z.ZodIssueCode.custom,
|
|
62
|
+
path: ["SNOWFLAKE_USER"],
|
|
63
|
+
message: "SNOWFLAKE_USER is required when mode = \"pat\""
|
|
64
|
+
});
|
|
65
|
+
if (!value.SNOWFLAKE_PAT) ctx.addIssue({
|
|
66
|
+
code: z.ZodIssueCode.custom,
|
|
67
|
+
path: ["SNOWFLAKE_PAT"],
|
|
68
|
+
message: "SNOWFLAKE_PAT is required when mode = \"pat\""
|
|
69
|
+
});
|
|
70
|
+
} else if (value.mode === "basic") {
|
|
71
|
+
if (!value.SNOWFLAKE_USER) ctx.addIssue({
|
|
72
|
+
code: z.ZodIssueCode.custom,
|
|
73
|
+
path: ["SNOWFLAKE_USER"],
|
|
74
|
+
message: "SNOWFLAKE_USER is required when mode = \"basic\""
|
|
75
|
+
});
|
|
76
|
+
if (!value.SNOWFLAKE_PASSWORD) ctx.addIssue({
|
|
77
|
+
code: z.ZodIssueCode.custom,
|
|
78
|
+
path: ["SNOWFLAKE_PASSWORD"],
|
|
79
|
+
message: "SNOWFLAKE_PASSWORD is required when mode = \"basic\""
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const snowflakeAuthObjectSchema = z.object(baseSnowflakeAuthShape);
|
|
84
|
+
const snowflakeCredentialSet = new CredentialSet({
|
|
85
|
+
id: "snowflake",
|
|
86
|
+
name: "Snowflake",
|
|
87
|
+
description: "Snowflake data cloud: SQL API v2, Snowpipe (file + streaming), warehouses, roles, users, grants, shares, streams, tasks, and administration for Keystroke workflows.",
|
|
88
|
+
auth: snowflakeAuthObjectSchema,
|
|
89
|
+
connections: [{
|
|
90
|
+
id: "manual",
|
|
91
|
+
kind: "manual",
|
|
92
|
+
label: "Snowflake credentials",
|
|
93
|
+
input: snowflakeAuthObjectSchema
|
|
94
|
+
}]
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* Parse raw credential values through the full refinement pipeline. Callers
|
|
98
|
+
* (client, operations) should use this instead of the raw object schema so
|
|
99
|
+
* mode-specific invariants are enforced.
|
|
100
|
+
*/
|
|
101
|
+
function parseSnowflakeCredentials(input) {
|
|
102
|
+
return snowflakeAuthSchema.parse(input);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
export { snowflakeCredentialSet as i, snowflakeAuthModeSchema as n, snowflakeAuthSchema as r, parseSnowflakeCredentials as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SnowflakeClient } from "
|
|
2
|
-
import { a as SubmitStatementInput, d as HydratedRow, f as PartitionResponse, m as ColumnMeta, n as StatementResponse } from "
|
|
3
|
-
//#region src/sql.d.ts
|
|
1
|
+
import { SnowflakeClient } from "../client/index.mjs";
|
|
2
|
+
import { a as SubmitStatementInput, d as HydratedRow, f as PartitionResponse, m as ColumnMeta, n as StatementResponse } from "../statements-DJL0qVNA.mjs";
|
|
3
|
+
//#region src/sql/index.d.ts
|
|
4
4
|
interface SubmitOptions {
|
|
5
5
|
readonly async?: boolean;
|
|
6
6
|
readonly requestId?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import { hydrateRows } from "
|
|
1
|
+
import { a as submitStatementInputSchema, n as statementResponseSchema, o as partitionResponseSchema, r as statementStatus } from "../statements-BumhMhN4.mjs";
|
|
2
|
+
import { n as SnowflakeSqlError, t as SnowflakeApiError } from "../errors-60AsF7Su.mjs";
|
|
3
|
+
import { hydrateRows } from "../results/index.mjs";
|
|
4
4
|
|
|
5
|
-
//#region src/sql.ts
|
|
5
|
+
//#region src/sql/index.ts
|
|
6
6
|
const STATEMENTS_PATH = "/api/v2/statements";
|
|
7
7
|
/**
|
|
8
8
|
* Submit a statement. When `async: true` (or the server chooses async) we
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SnowflakeClient } from "
|
|
2
|
-
import { d as HydratedRow } from "
|
|
3
|
-
import { ExecuteSqlResult } from "
|
|
4
|
-
import { t as OptionMap } from "
|
|
5
|
-
import { CatalogResult, ShowScopedOptions, showStages } from "
|
|
1
|
+
import { SnowflakeClient } from "../client/index.mjs";
|
|
2
|
+
import { d as HydratedRow } from "../statements-DJL0qVNA.mjs";
|
|
3
|
+
import { ExecuteSqlResult } from "../sql/index.mjs";
|
|
4
|
+
import { t as OptionMap } from "../sql-options-2k5xQ-oS.mjs";
|
|
5
|
+
import { CatalogResult, ShowScopedOptions, showStages } from "../catalog/index.mjs";
|
|
6
6
|
|
|
7
|
-
//#region src/stages.d.ts
|
|
7
|
+
//#region src/stages/index.d.ts
|
|
8
8
|
interface StageRef {
|
|
9
9
|
readonly database?: string;
|
|
10
10
|
readonly schema?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { executeSql } from "
|
|
2
|
-
import { a as quoteLiteral, t as buildFqn } from "
|
|
3
|
-
import { n as renderOptionGroup, t as formatOptions } from "
|
|
4
|
-
import { showStages } from "
|
|
1
|
+
import { executeSql } from "../sql/index.mjs";
|
|
2
|
+
import { a as quoteLiteral, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
|
|
3
|
+
import { n as renderOptionGroup, t as formatOptions } from "../sql-options-D6GEa21F.mjs";
|
|
4
|
+
import { showStages } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/stages.ts
|
|
6
|
+
//#region src/stages/index.ts
|
|
7
7
|
function stageFqn(ref) {
|
|
8
8
|
return buildFqn(ref.database, ref.schema, ref.name);
|
|
9
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as sqlBindingsSchema, l as statementContextSchema, r as resultSetMetaDataSchema } from "./common-
|
|
1
|
+
import { c as sqlBindingsSchema, l as statementContextSchema, r as resultSetMetaDataSchema } from "./common-DfpCwJx5.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/schemas/results.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SnowflakeClient } from "
|
|
2
|
-
import { d as HydratedRow } from "
|
|
3
|
-
import { t as OptionMap } from "
|
|
4
|
-
import { CatalogResult, ShowScopedOptions, showStreams } from "
|
|
1
|
+
import { SnowflakeClient } from "../client/index.mjs";
|
|
2
|
+
import { d as HydratedRow } from "../statements-DJL0qVNA.mjs";
|
|
3
|
+
import { t as OptionMap } from "../sql-options-2k5xQ-oS.mjs";
|
|
4
|
+
import { CatalogResult, ShowScopedOptions, showStreams } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/streams.d.ts
|
|
6
|
+
//#region src/streams/index.d.ts
|
|
7
7
|
interface StreamRef {
|
|
8
8
|
readonly database?: string;
|
|
9
9
|
readonly schema?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { executeSql } from "
|
|
2
|
-
import { a as quoteLiteral, t as buildFqn } from "
|
|
3
|
-
import { t as formatOptions } from "
|
|
4
|
-
import { showStreams } from "
|
|
1
|
+
import { executeSql } from "../sql/index.mjs";
|
|
2
|
+
import { a as quoteLiteral, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
|
|
3
|
+
import { t as formatOptions } from "../sql-options-D6GEa21F.mjs";
|
|
4
|
+
import { showStreams } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/streams.ts
|
|
6
|
+
//#region src/streams/index.ts
|
|
7
7
|
function streamFqn(ref) {
|
|
8
8
|
return buildFqn(ref.database, ref.schema, ref.name);
|
|
9
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CatalogResult, DescribeTableOptions, ExploreColumnsOptions, ExploreColumnsResult, FindTablesOptions, ShowColumnsOptions, ShowTablesOptions, describeTable, exploreColumns, findTables, showColumns, showTables } from "
|
|
1
|
+
import { CatalogResult, DescribeTableOptions, ExploreColumnsOptions, ExploreColumnsResult, FindTablesOptions, ShowColumnsOptions, ShowTablesOptions, describeTable, exploreColumns, findTables, showColumns, showTables } from "../catalog/index.mjs";
|
|
2
2
|
export { type CatalogResult, type DescribeTableOptions, type ExploreColumnsOptions, type ExploreColumnsResult, type FindTablesOptions, type ShowColumnsOptions, type ShowTablesOptions, describeTable, exploreColumns, findTables, showColumns, showTables };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { describeTable, exploreColumns, findTables, showColumns, showTables } from "
|
|
1
|
+
import { describeTable, exploreColumns, findTables, showColumns, showTables } from "../catalog/index.mjs";
|
|
2
2
|
|
|
3
3
|
export { describeTable, exploreColumns, findTables, showColumns, showTables };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SnowflakeClient } from "
|
|
2
|
-
import { d as HydratedRow } from "
|
|
3
|
-
import { t as OptionMap } from "
|
|
4
|
-
import { CatalogResult, ShowScopedOptions, showTasks } from "
|
|
1
|
+
import { SnowflakeClient } from "../client/index.mjs";
|
|
2
|
+
import { d as HydratedRow } from "../statements-DJL0qVNA.mjs";
|
|
3
|
+
import { t as OptionMap } from "../sql-options-2k5xQ-oS.mjs";
|
|
4
|
+
import { CatalogResult, ShowScopedOptions, showTasks } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/tasks.d.ts
|
|
6
|
+
//#region src/tasks/index.d.ts
|
|
7
7
|
interface TaskRef {
|
|
8
8
|
readonly database?: string;
|
|
9
9
|
readonly schema?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { executeSql } from "
|
|
2
|
-
import { a as quoteLiteral, t as buildFqn } from "
|
|
3
|
-
import { t as formatOptions } from "
|
|
4
|
-
import { showTasks } from "
|
|
1
|
+
import { executeSql } from "../sql/index.mjs";
|
|
2
|
+
import { a as quoteLiteral, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
|
|
3
|
+
import { t as formatOptions } from "../sql-options-D6GEa21F.mjs";
|
|
4
|
+
import { showTasks } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/tasks.ts
|
|
6
|
+
//#region src/tasks/index.ts
|
|
7
7
|
function taskFqn(ref) {
|
|
8
8
|
return buildFqn(ref.database, ref.schema, ref.name);
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { scheduledDeltaEventSchema, scheduledSqlEventSchema, streamAppendOnlyEventSchema, streamHasDataEventSchema } from "
|
|
3
|
-
import { RowValue } from "
|
|
4
|
-
import { StatusPageOptions } from "
|
|
1
|
+
import { o as snowflakeCredentialSet } from "../snowflake.credential-set-BxT7Gf3A.mjs";
|
|
2
|
+
import { scheduledDeltaEventSchema, scheduledSqlEventSchema, streamAppendOnlyEventSchema, streamHasDataEventSchema } from "../events/index.mjs";
|
|
3
|
+
import { RowValue } from "../rows/index.mjs";
|
|
4
|
+
import { StatusPageOptions } from "../status-page/index.mjs";
|
|
5
5
|
import { BoundTrigger } from "@keystrokehq/core";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { PollingTriggerManifest } from "@keystrokehq/core/trigger";
|
|
@@ -9,9 +9,9 @@ import { PollingTriggerManifest } from "@keystrokehq/core/trigger";
|
|
|
9
9
|
//#region ../../packages/integration-authoring/dist/index.d.mts
|
|
10
10
|
declare function createPollingTriggerBindingFactory(config: any): (options: any) => any;
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region src/triggers.d.ts
|
|
12
|
+
//#region src/triggers/polling.d.ts
|
|
13
13
|
type Schedule = Parameters<typeof createPollingTriggerBindingFactory>[0]['schedule'];
|
|
14
|
-
type SnowflakeCredentialSets = readonly [typeof
|
|
14
|
+
type SnowflakeCredentialSets = readonly [typeof snowflakeCredentialSet];
|
|
15
15
|
type SnowflakePollingBoundTrigger<TResponse extends z.ZodTypeAny, TOutput = z.output<TResponse>> = BoundTrigger<z.output<TResponse>, SnowflakeCredentialSets, PollingTriggerManifest, TOutput>;
|
|
16
16
|
interface SnowflakePollingBindingOptions<TResponse extends z.ZodTypeAny, TOutput = z.output<TResponse>> extends IntegrationTriggerBindingOptions<z.output<TResponse>, TOutput> {
|
|
17
17
|
readonly schedule?: Schedule;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createSnowflakeClient } from "
|
|
3
|
-
import { grantChangedEventSchema, pipeLoadEventSchema, scheduledDeltaEventSchema, scheduledSqlEventSchema, shareChangedEventSchema, snowflakeDiffSnapshotEntrySchema, snowflakeObjectLifecycleEventSchema, statementCompletedEventSchema, statusPageComponentChangeEventSchema, statusPageIncidentEventSchema, streamAppendOnlyEventSchema, streamHasDataEventSchema, taskRunEventSchema, warehouseCreditsEventSchema, warehouseQueueEventSchema } from "
|
|
4
|
-
import { executeSql } from "
|
|
5
|
-
import { a as quoteLiteral, i as quoteIdentifier, t as buildFqn } from "
|
|
6
|
-
import { BindingBuilder } from "
|
|
7
|
-
import { getStatusSummary, getUnresolvedIncidents } from "
|
|
8
|
-
import "@keystrokehq/core";
|
|
1
|
+
import { i as snowflakeCredentialSet } from "../snowflake.credential-set-DE3gXf-a.mjs";
|
|
2
|
+
import { createSnowflakeClient } from "../client/index.mjs";
|
|
3
|
+
import { grantChangedEventSchema, pipeLoadEventSchema, scheduledDeltaEventSchema, scheduledSqlEventSchema, shareChangedEventSchema, snowflakeDiffSnapshotEntrySchema, snowflakeObjectLifecycleEventSchema, statementCompletedEventSchema, statusPageComponentChangeEventSchema, statusPageIncidentEventSchema, streamAppendOnlyEventSchema, streamHasDataEventSchema, taskRunEventSchema, warehouseCreditsEventSchema, warehouseQueueEventSchema } from "../events/index.mjs";
|
|
4
|
+
import { executeSql } from "../sql/index.mjs";
|
|
5
|
+
import { a as quoteLiteral, i as quoteIdentifier, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
|
|
6
|
+
import { BindingBuilder } from "../rows/index.mjs";
|
|
7
|
+
import { getStatusSummary, getUnresolvedIncidents } from "../status-page/index.mjs";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
import { pollingTrigger } from "@keystrokehq/core/trigger";
|
|
11
10
|
|
|
@@ -57,7 +56,7 @@ function createPollingTriggerBindingFactory(config) {
|
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
//#endregion
|
|
60
|
-
//#region src/triggers.ts
|
|
59
|
+
//#region src/triggers/polling.ts
|
|
61
60
|
function defineSnowflakePollingTrigger(definition) {
|
|
62
61
|
return definition;
|
|
63
62
|
}
|
|
@@ -80,11 +79,11 @@ function createSnowflakePollingBindingFactory(definition, params, schedule) {
|
|
|
80
79
|
defaultId: definition.defaultId,
|
|
81
80
|
defaultDescription: definition.defaultDescription,
|
|
82
81
|
schedule: resolveSchedule(schedule, definition.defaultSchedule),
|
|
83
|
-
credentialSets: [
|
|
82
|
+
credentialSets: [snowflakeCredentialSet],
|
|
84
83
|
response: definition.responseSchema,
|
|
85
84
|
poll: (ctx) => {
|
|
86
85
|
const snowflakeCtx = ctx;
|
|
87
|
-
return definition.poll(params, snowflakeCtx.credentials
|
|
86
|
+
return definition.poll(params, snowflakeCtx.credentials.snowflake, snowflakeCtx);
|
|
88
87
|
}
|
|
89
88
|
});
|
|
90
89
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SnowflakeClient } from "
|
|
2
|
-
import { d as HydratedRow } from "
|
|
3
|
-
import { t as OptionMap } from "
|
|
4
|
-
import { CatalogResult, ShowOptions, showUsers } from "
|
|
1
|
+
import { SnowflakeClient } from "../client/index.mjs";
|
|
2
|
+
import { d as HydratedRow } from "../statements-DJL0qVNA.mjs";
|
|
3
|
+
import { t as OptionMap } from "../sql-options-2k5xQ-oS.mjs";
|
|
4
|
+
import { CatalogResult, ShowOptions, showUsers } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/users.d.ts
|
|
6
|
+
//#region src/users/index.d.ts
|
|
7
7
|
interface UserContext {
|
|
8
8
|
readonly warehouse?: string;
|
|
9
9
|
readonly role?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { executeSql } from "
|
|
2
|
-
import { a as quoteLiteral, i as quoteIdentifier } from "
|
|
3
|
-
import { t as formatOptions } from "
|
|
4
|
-
import { showUsers } from "
|
|
1
|
+
import { executeSql } from "../sql/index.mjs";
|
|
2
|
+
import { a as quoteLiteral, i as quoteIdentifier } from "../sql-safety-BZpAPsq6.mjs";
|
|
3
|
+
import { t as formatOptions } from "../sql-options-D6GEa21F.mjs";
|
|
4
|
+
import { showUsers } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/users.ts
|
|
6
|
+
//#region src/users/index.ts
|
|
7
7
|
async function createUser(client, options) {
|
|
8
8
|
const prefix = `CREATE${options.orReplace ? " OR REPLACE" : ""} USER${options.ifNotExists ? " IF NOT EXISTS" : ""}`;
|
|
9
9
|
const body = options.options && Object.keys(options.options).length > 0 ? ` ${formatOptions(options.options)}` : "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AzureEventGridEvent, GcsPubSubPush, SnsNotification } from "
|
|
1
|
+
import { AzureEventGridEvent, GcsPubSubPush, SnsNotification } from "../events/index.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
-
//#region src/verification.d.ts
|
|
4
|
+
//#region src/verification/index.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Thrown whenever a webhook verifier rejects a request. Includes a
|
|
7
7
|
* compact `reason` code so callers can distinguish transport problems
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { azureEventGridEventSchema, gcsPubSubPushSchema, snsNotificationSchema } from "
|
|
1
|
+
import { azureEventGridEventSchema, gcsPubSubPushSchema, snsNotificationSchema } from "../events/index.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { X509Certificate, createPublicKey, createVerify } from "node:crypto";
|
|
4
4
|
|
|
5
|
-
//#region src/verification.ts
|
|
5
|
+
//#region src/verification/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* Signature / authenticity verification helpers for the three
|
|
8
8
|
* Snowflake auto-ingest webhook triggers. Everything here is
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SnowflakeClient } from "
|
|
2
|
-
import { d as HydratedRow } from "
|
|
3
|
-
import { t as OptionMap } from "
|
|
4
|
-
import { CatalogResult, ShowOptions, showWarehouses } from "
|
|
1
|
+
import { SnowflakeClient } from "../client/index.mjs";
|
|
2
|
+
import { d as HydratedRow } from "../statements-DJL0qVNA.mjs";
|
|
3
|
+
import { t as OptionMap } from "../sql-options-2k5xQ-oS.mjs";
|
|
4
|
+
import { CatalogResult, ShowOptions, showWarehouses } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/warehouses.d.ts
|
|
6
|
+
//#region src/warehouses/index.d.ts
|
|
7
7
|
interface WarehouseContext {
|
|
8
8
|
readonly warehouse?: string;
|
|
9
9
|
readonly role?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { executeSql } from "
|
|
2
|
-
import { a as quoteLiteral, i as quoteIdentifier } from "
|
|
3
|
-
import { t as formatOptions } from "
|
|
4
|
-
import { showWarehouses } from "
|
|
1
|
+
import { executeSql } from "../sql/index.mjs";
|
|
2
|
+
import { a as quoteLiteral, i as quoteIdentifier } from "../sql-safety-BZpAPsq6.mjs";
|
|
3
|
+
import { t as formatOptions } from "../sql-options-D6GEa21F.mjs";
|
|
4
|
+
import { showWarehouses } from "../catalog/index.mjs";
|
|
5
5
|
|
|
6
|
-
//#region src/warehouses.ts
|
|
6
|
+
//#region src/warehouses/index.ts
|
|
7
7
|
async function createWarehouse(client, options) {
|
|
8
8
|
const prefix = `CREATE${options.orReplace ? " OR REPLACE" : ""} WAREHOUSE${options.ifNotExists ? " IF NOT EXISTS" : ""}`;
|
|
9
9
|
const body = options.options && Object.keys(options.options).length > 0 ? ` ${formatOptions(options.options)}` : "";
|