@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/snowflake",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16-integration-id-canonicalization.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -9,9 +9,13 @@
|
|
|
9
9
|
"types": "./dist/index.d.mts",
|
|
10
10
|
"default": "./dist/index.mjs"
|
|
11
11
|
},
|
|
12
|
-
"./
|
|
13
|
-
"types": "./dist/
|
|
14
|
-
"default": "./dist/
|
|
12
|
+
"./credential-sets": {
|
|
13
|
+
"types": "./dist/credential-sets/index.d.mts",
|
|
14
|
+
"default": "./dist/credential-sets/index.mjs"
|
|
15
|
+
},
|
|
16
|
+
"./operations": {
|
|
17
|
+
"types": "./dist/operations/index.d.mts",
|
|
18
|
+
"default": "./dist/operations/index.mjs"
|
|
15
19
|
},
|
|
16
20
|
"./client": {
|
|
17
21
|
"types": "./dist/client.d.mts",
|
|
@@ -21,17 +25,13 @@
|
|
|
21
25
|
"types": "./dist/schemas/index.d.mts",
|
|
22
26
|
"default": "./dist/schemas/index.mjs"
|
|
23
27
|
},
|
|
24
|
-
"./_official": {
|
|
25
|
-
"types": "./dist/_official/index.d.mts",
|
|
26
|
-
"default": "./dist/_official/index.mjs"
|
|
27
|
-
},
|
|
28
28
|
"./events": {
|
|
29
|
-
"types": "./dist/events.d.mts",
|
|
30
|
-
"default": "./dist/events.mjs"
|
|
29
|
+
"types": "./dist/events/index.d.mts",
|
|
30
|
+
"default": "./dist/events/index.mjs"
|
|
31
31
|
},
|
|
32
32
|
"./triggers": {
|
|
33
|
-
"types": "./dist/triggers.d.mts",
|
|
34
|
-
"default": "./dist/triggers.mjs"
|
|
33
|
+
"types": "./dist/triggers/index.d.mts",
|
|
34
|
+
"default": "./dist/triggers/index.mjs"
|
|
35
35
|
},
|
|
36
36
|
"./verification": {
|
|
37
37
|
"types": "./dist/verification.d.mts",
|
|
@@ -136,10 +136,6 @@
|
|
|
136
136
|
"./status-page": {
|
|
137
137
|
"types": "./dist/status-page.d.mts",
|
|
138
138
|
"default": "./dist/status-page.mjs"
|
|
139
|
-
},
|
|
140
|
-
"./_runtime": {
|
|
141
|
-
"types": "./dist/_runtime/index.d.mts",
|
|
142
|
-
"default": "./dist/_runtime/index.mjs"
|
|
143
139
|
}
|
|
144
140
|
},
|
|
145
141
|
"files": [
|
|
@@ -160,8 +156,8 @@
|
|
|
160
156
|
"vitest": "^4.0.18",
|
|
161
157
|
"@keystrokehq/core": "^0.0.12",
|
|
162
158
|
"@keystrokehq/test-utils": "0.0.0",
|
|
163
|
-
"@keystrokehq/
|
|
164
|
-
"@keystrokehq/
|
|
159
|
+
"@keystrokehq/integration-authoring": "0.0.9",
|
|
160
|
+
"@keystrokehq/typescript-config": "0.0.0"
|
|
165
161
|
},
|
|
166
162
|
"keywords": [
|
|
167
163
|
"snowflake",
|
package/dist/_official/index.mjs
DELETED
package/dist/connection.d.mts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { a as snowflakeAuthModeSchema, c as snowflakeOfficialIntegration, i as snowflake, n as SnowflakeCredentials, o as snowflakeAuthSchema, r as parseSnowflakeCredentials, s as snowflakeBundle, t as SnowflakeAuthMode } from "./integration-86b6WaJF.mjs";
|
|
2
|
-
export { type SnowflakeAuthMode, type SnowflakeCredentials, parseSnowflakeCredentials, snowflake, snowflakeAuthModeSchema, snowflakeAuthSchema, snowflakeBundle, snowflakeOfficialIntegration };
|
package/dist/connection.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { a as snowflakeBundle, i as snowflakeAuthSchema, n as snowflake, o as snowflakeOfficialIntegration, r as snowflakeAuthModeSchema, t as parseSnowflakeCredentials } from "./integration-DNMbfXEy.mjs";
|
|
2
|
-
|
|
3
|
-
export { parseSnowflakeCredentials, snowflake, snowflakeAuthModeSchema, snowflakeAuthSchema, snowflakeBundle, snowflakeOfficialIntegration };
|
package/dist/databases.mjs
DELETED
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import { CredentialSet } from "@keystrokehq/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region ../../packages/integration-authoring/dist/official/index.mjs
|
|
5
|
-
const OFFICIAL_CREDENTIAL_SET_ID_PREFIX = "keystroke:";
|
|
6
|
-
function officialCredentialSetId(id) {
|
|
7
|
-
return `${OFFICIAL_CREDENTIAL_SET_ID_PREFIX}${id}`;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Creates an official integration bundle from a single config object.
|
|
11
|
-
*
|
|
12
|
-
* - Creates the public `CredentialSet` internally.
|
|
13
|
-
* - Accepts optional `internal` fields for Keystroke-owned platform credentials.
|
|
14
|
-
*/
|
|
15
|
-
function defineOfficialIntegration(config) {
|
|
16
|
-
const internalCredentialSets = config.internal ?? {};
|
|
17
|
-
const allInternalCredentialSets = [
|
|
18
|
-
...internalCredentialSets.providerApp ? [internalCredentialSets.providerApp] : [],
|
|
19
|
-
...internalCredentialSets.providerAppVariants ?? [],
|
|
20
|
-
...internalCredentialSets.webhookVerification ? [internalCredentialSets.webhookVerification] : [],
|
|
21
|
-
...internalCredentialSets.other ?? []
|
|
22
|
-
];
|
|
23
|
-
const credentialSet = new CredentialSet({
|
|
24
|
-
id: config.id,
|
|
25
|
-
name: config.name,
|
|
26
|
-
description: config.description,
|
|
27
|
-
auth: config.auth,
|
|
28
|
-
...config.connections ? { connections: config.connections } : {},
|
|
29
|
-
...config.proxy ? { proxy: config.proxy } : {},
|
|
30
|
-
...config.needsRawSecret === true ? { needsRawSecret: true } : {}
|
|
31
|
-
});
|
|
32
|
-
return Object.freeze({
|
|
33
|
-
integration: {
|
|
34
|
-
id: config.id,
|
|
35
|
-
name: config.name,
|
|
36
|
-
...config.description !== void 0 ? { description: config.description } : {},
|
|
37
|
-
auth: config.auth,
|
|
38
|
-
...config.proxy ? { proxy: config.proxy } : {},
|
|
39
|
-
...config.needsRawSecret === true ? { needsRawSecret: true } : {},
|
|
40
|
-
...config.connections ? { connections: config.connections } : {}
|
|
41
|
-
},
|
|
42
|
-
credentialSet,
|
|
43
|
-
internalCredentialSets,
|
|
44
|
-
allInternalCredentialSets
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/webhook-credentials.ts
|
|
50
|
-
/**
|
|
51
|
-
* Webhook credential sets for the Snowflake auto-ingest triggers.
|
|
52
|
-
*
|
|
53
|
-
* Snowflake has no native webhook product — auto-ingest relies on
|
|
54
|
-
* cloud-provider event buses (AWS SNS, GCP Pub/Sub, Azure Event Grid)
|
|
55
|
-
* that forward object-storage notifications to a public endpoint.
|
|
56
|
-
* Each cloud has a different trust model, so we ship one credential
|
|
57
|
-
* set per cloud rather than a single generic "auto-ingest" set.
|
|
58
|
-
*
|
|
59
|
-
* These credentials hold only the verification material the webhook
|
|
60
|
-
* receiver needs — the cloud provider itself controls who can publish
|
|
61
|
-
* to the topic/queue/event-grid. All auth fields are strings to keep
|
|
62
|
-
* them CredentialSet-compatible (auth shapes are Zod objects without
|
|
63
|
-
* unions/optionals-at-root).
|
|
64
|
-
*/
|
|
65
|
-
/**
|
|
66
|
-
* AWS SNS webhook credentials.
|
|
67
|
-
*
|
|
68
|
-
* SNS verifies message authenticity via an X.509 signature whose public
|
|
69
|
-
* cert is published at an SNS-hosted URL. The only real secret is the
|
|
70
|
-
* optional {@link expectedTopicArn}: tight-scoping to a single topic
|
|
71
|
-
* prevents an attacker that fooled SNS signing (not possible absent a
|
|
72
|
-
* certificate compromise) from posting events from an unrelated topic.
|
|
73
|
-
*/
|
|
74
|
-
const snowflakeS3SnsWebhookCredentialSet = new CredentialSet({
|
|
75
|
-
id: officialCredentialSetId("snowflake-s3-sns-webhook"),
|
|
76
|
-
exposure: "platform-only",
|
|
77
|
-
name: "Snowflake Auto-Ingest — AWS SNS",
|
|
78
|
-
auth: z.object({
|
|
79
|
-
expectedTopicArn: z.string().optional(),
|
|
80
|
-
allowedSigningCertHostPattern: z.string().default("^sns\\.[a-z0-9-]+\\.amazonaws\\.com(\\.cn)?$").optional(),
|
|
81
|
-
autoConfirmSubscriptions: z.enum(["true", "false"]).default("false").optional()
|
|
82
|
-
})
|
|
83
|
-
});
|
|
84
|
-
/**
|
|
85
|
-
* GCP Pub/Sub push subscriptions sign each request with a Google-minted
|
|
86
|
-
* OIDC JWT (RS256) in the `Authorization` header. Verification requires
|
|
87
|
-
* knowing:
|
|
88
|
-
*
|
|
89
|
-
* - `expectedAudience`: the OIDC audience configured on the push
|
|
90
|
-
* subscription (commonly the webhook URL itself).
|
|
91
|
-
* - `expectedServiceAccount`: the push subscription's service-account
|
|
92
|
-
* email, which appears as the JWT `email` claim.
|
|
93
|
-
*
|
|
94
|
-
* Both are public identifiers, but pinning them prevents an attacker
|
|
95
|
-
* with any valid Google OIDC token from impersonating the subscription.
|
|
96
|
-
*/
|
|
97
|
-
const snowflakeGcsPubSubWebhookCredentialSet = new CredentialSet({
|
|
98
|
-
id: officialCredentialSetId("snowflake-gcs-pubsub-webhook"),
|
|
99
|
-
exposure: "platform-only",
|
|
100
|
-
name: "Snowflake Auto-Ingest — GCS Pub/Sub",
|
|
101
|
-
auth: z.object({
|
|
102
|
-
expectedAudience: z.string().min(1),
|
|
103
|
-
expectedServiceAccount: z.string().min(1),
|
|
104
|
-
jwksUri: z.string().default("https://www.googleapis.com/oauth2/v3/certs").optional(),
|
|
105
|
-
issuer: z.string().default("https://accounts.google.com").optional()
|
|
106
|
-
})
|
|
107
|
-
});
|
|
108
|
-
/**
|
|
109
|
-
* Azure Event Grid authenticates webhook endpoints via one-time
|
|
110
|
-
* handshake validation (validation code or URL) rather than per-request
|
|
111
|
-
* signatures. If the operator wires a **shared secret** into the
|
|
112
|
-
* Event Grid subscription as a custom header, that secret can be
|
|
113
|
-
* checked here as a defence-in-depth measure.
|
|
114
|
-
*
|
|
115
|
-
* Event Grid's synchronous handshake (`SubscriptionValidationEvent`) is
|
|
116
|
-
* not fulfillable through the Keystroke static-response webhook
|
|
117
|
-
* primitive; Snowflake operators should use **manual handshake** or
|
|
118
|
-
* Cloud-Events schema. See `IMPLEMENTATION_NOTES.md` § trigger webhooks.
|
|
119
|
-
*/
|
|
120
|
-
const snowflakeAzureEventGridWebhookCredentialSet = new CredentialSet({
|
|
121
|
-
id: officialCredentialSetId("snowflake-azure-eventgrid-webhook"),
|
|
122
|
-
exposure: "platform-only",
|
|
123
|
-
name: "Snowflake Auto-Ingest — Azure Event Grid",
|
|
124
|
-
auth: z.object({
|
|
125
|
-
sharedSecret: z.string().optional(),
|
|
126
|
-
sharedSecretHeader: z.string().default("aeg-subscription-secret").optional(),
|
|
127
|
-
expectedTopicArn: z.string().optional()
|
|
128
|
-
})
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region src/integration.ts
|
|
133
|
-
/**
|
|
134
|
-
* Public auth schema for Snowflake connections.
|
|
135
|
-
*
|
|
136
|
-
* Modeled as a discriminated union on `mode`. `connection.kind` is `manual`
|
|
137
|
-
* because Keystroke does not run an interactive Snowflake OAuth dance — OAuth
|
|
138
|
-
* mode accepts a bearer token provided by the caller (external IdP /
|
|
139
|
-
* Snowflake-hosted OAuth). See `IMPLEMENTATION_NOTES.md` § 2 for rationale.
|
|
140
|
-
*/
|
|
141
|
-
const snowflakeAuthModeSchema = z.enum([
|
|
142
|
-
"keypair",
|
|
143
|
-
"oauth",
|
|
144
|
-
"pat",
|
|
145
|
-
"basic"
|
|
146
|
-
]);
|
|
147
|
-
/**
|
|
148
|
-
* Flat Zod object — the official integration contract constrains `auth` to a
|
|
149
|
-
* `ZodObject<ZodRawShape>`, so mode-specific fields are declared as optional
|
|
150
|
-
* and validated via `superRefine` below. Runtime invariants still cover:
|
|
151
|
-
* - keypair → requires SNOWFLAKE_USER + SNOWFLAKE_PRIVATE_KEY
|
|
152
|
-
* - oauth → requires SNOWFLAKE_OAUTH_ACCESS_TOKEN
|
|
153
|
-
* - pat → requires SNOWFLAKE_USER + SNOWFLAKE_PAT
|
|
154
|
-
* - basic → requires SNOWFLAKE_USER + SNOWFLAKE_PASSWORD
|
|
155
|
-
*/
|
|
156
|
-
const baseSnowflakeAuthShape = {
|
|
157
|
-
mode: snowflakeAuthModeSchema,
|
|
158
|
-
SNOWFLAKE_ACCOUNT: z.string().min(1),
|
|
159
|
-
SNOWFLAKE_USER: z.string().min(1).optional(),
|
|
160
|
-
SNOWFLAKE_PRIVATE_KEY: z.string().min(1).optional(),
|
|
161
|
-
SNOWFLAKE_PRIVATE_KEY_PASSPHRASE: z.string().optional(),
|
|
162
|
-
SNOWFLAKE_PAT: z.string().min(1).optional(),
|
|
163
|
-
SNOWFLAKE_PASSWORD: z.string().min(1).optional(),
|
|
164
|
-
SNOWFLAKE_OAUTH_ACCESS_TOKEN: z.string().min(1).optional(),
|
|
165
|
-
SNOWFLAKE_OAUTH_REFRESH_TOKEN: z.string().optional(),
|
|
166
|
-
SNOWFLAKE_OAUTH_CLIENT_ID: z.string().optional(),
|
|
167
|
-
SNOWFLAKE_OAUTH_CLIENT_SECRET: z.string().optional(),
|
|
168
|
-
SNOWFLAKE_OAUTH_TOKEN_URL: z.string().url().optional(),
|
|
169
|
-
SNOWFLAKE_OAUTH_SCOPES: z.string().optional(),
|
|
170
|
-
SNOWFLAKE_ROLE: z.string().optional(),
|
|
171
|
-
SNOWFLAKE_WAREHOUSE: z.string().optional(),
|
|
172
|
-
SNOWFLAKE_DATABASE: z.string().optional(),
|
|
173
|
-
SNOWFLAKE_SCHEMA: z.string().optional(),
|
|
174
|
-
SNOWFLAKE_HOST: z.string().optional(),
|
|
175
|
-
SNOWFLAKE_REGION: z.string().optional(),
|
|
176
|
-
SNOWFLAKE_PUBLIC_KEY_FP: z.string().optional()
|
|
177
|
-
};
|
|
178
|
-
const snowflakeAuthSchema = z.object(baseSnowflakeAuthShape).superRefine((value, ctx) => {
|
|
179
|
-
if (value.mode === "keypair") {
|
|
180
|
-
if (!value.SNOWFLAKE_USER) ctx.addIssue({
|
|
181
|
-
code: z.ZodIssueCode.custom,
|
|
182
|
-
path: ["SNOWFLAKE_USER"],
|
|
183
|
-
message: "SNOWFLAKE_USER is required when mode = \"keypair\""
|
|
184
|
-
});
|
|
185
|
-
if (!value.SNOWFLAKE_PRIVATE_KEY) ctx.addIssue({
|
|
186
|
-
code: z.ZodIssueCode.custom,
|
|
187
|
-
path: ["SNOWFLAKE_PRIVATE_KEY"],
|
|
188
|
-
message: "SNOWFLAKE_PRIVATE_KEY is required when mode = \"keypair\""
|
|
189
|
-
});
|
|
190
|
-
} else if (value.mode === "oauth") {
|
|
191
|
-
if (!value.SNOWFLAKE_OAUTH_ACCESS_TOKEN) ctx.addIssue({
|
|
192
|
-
code: z.ZodIssueCode.custom,
|
|
193
|
-
path: ["SNOWFLAKE_OAUTH_ACCESS_TOKEN"],
|
|
194
|
-
message: "SNOWFLAKE_OAUTH_ACCESS_TOKEN is required when mode = \"oauth\""
|
|
195
|
-
});
|
|
196
|
-
} else if (value.mode === "pat") {
|
|
197
|
-
if (!value.SNOWFLAKE_USER) ctx.addIssue({
|
|
198
|
-
code: z.ZodIssueCode.custom,
|
|
199
|
-
path: ["SNOWFLAKE_USER"],
|
|
200
|
-
message: "SNOWFLAKE_USER is required when mode = \"pat\""
|
|
201
|
-
});
|
|
202
|
-
if (!value.SNOWFLAKE_PAT) ctx.addIssue({
|
|
203
|
-
code: z.ZodIssueCode.custom,
|
|
204
|
-
path: ["SNOWFLAKE_PAT"],
|
|
205
|
-
message: "SNOWFLAKE_PAT is required when mode = \"pat\""
|
|
206
|
-
});
|
|
207
|
-
} else if (value.mode === "basic") {
|
|
208
|
-
if (!value.SNOWFLAKE_USER) ctx.addIssue({
|
|
209
|
-
code: z.ZodIssueCode.custom,
|
|
210
|
-
path: ["SNOWFLAKE_USER"],
|
|
211
|
-
message: "SNOWFLAKE_USER is required when mode = \"basic\""
|
|
212
|
-
});
|
|
213
|
-
if (!value.SNOWFLAKE_PASSWORD) ctx.addIssue({
|
|
214
|
-
code: z.ZodIssueCode.custom,
|
|
215
|
-
path: ["SNOWFLAKE_PASSWORD"],
|
|
216
|
-
message: "SNOWFLAKE_PASSWORD is required when mode = \"basic\""
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
/**
|
|
221
|
-
* `auth` shape used when defining the official integration. Must be a
|
|
222
|
-
* `ZodObject<ZodRawShape>` — refinements are attached for callers via
|
|
223
|
-
* {@link parseSnowflakeCredentials}.
|
|
224
|
-
*/
|
|
225
|
-
const snowflakeAuthObjectSchema = z.object(baseSnowflakeAuthShape);
|
|
226
|
-
const snowflakeOfficialIntegration = {
|
|
227
|
-
id: "snowflake",
|
|
228
|
-
name: "Snowflake",
|
|
229
|
-
description: "Snowflake data cloud: SQL API v2, Snowpipe (file + streaming), warehouses, roles, users, grants, shares, streams, tasks, and administration for Keystroke workflows.",
|
|
230
|
-
auth: snowflakeAuthObjectSchema
|
|
231
|
-
};
|
|
232
|
-
const snowflakeBundle = defineOfficialIntegration({
|
|
233
|
-
...snowflakeOfficialIntegration,
|
|
234
|
-
internal: { other: [
|
|
235
|
-
snowflakeS3SnsWebhookCredentialSet,
|
|
236
|
-
snowflakeGcsPubSubWebhookCredentialSet,
|
|
237
|
-
snowflakeAzureEventGridWebhookCredentialSet
|
|
238
|
-
] }
|
|
239
|
-
});
|
|
240
|
-
const snowflake = snowflakeBundle.credentialSet;
|
|
241
|
-
/**
|
|
242
|
-
* Parse raw credential values through the full refinement pipeline. Callers
|
|
243
|
-
* (client, operations) should use this instead of the raw object schema so
|
|
244
|
-
* mode-specific invariants are enforced.
|
|
245
|
-
*/
|
|
246
|
-
function parseSnowflakeCredentials(input) {
|
|
247
|
-
return snowflakeAuthSchema.parse(input);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
//#endregion
|
|
251
|
-
export { snowflakeBundle as a, snowflakeAuthSchema as i, snowflake as n, snowflakeOfficialIntegration as o, snowflakeAuthModeSchema as r, parseSnowflakeCredentials as t };
|
package/dist/schemas-catalog.mjs
DELETED
package/dist/views.d.mts
DELETED
package/dist/views.mjs
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|