@keystrokehq/snowflake 0.0.16 → 0.0.18
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 +1 -1
- package/README.md +9 -233
- package/package.json +39 -171
- package/dist/accounts/index.d.mts +0 -40
- package/dist/accounts/index.mjs +0 -51
- package/dist/bulk/index.d.mts +0 -71
- package/dist/bulk/index.mjs +0 -65
- package/dist/catalog/index.d.mts +0 -144
- package/dist/catalog/index.mjs +0 -158
- package/dist/client/index.d.mts +0 -44
- package/dist/client/index.mjs +0 -273
- package/dist/common-DfpCwJx5.mjs +0 -92
- package/dist/credential-sets/index.d.mts +0 -3
- package/dist/credential-sets/index.mjs +0 -4
- package/dist/databases/index.d.mts +0 -2
- package/dist/databases/index.mjs +0 -3
- package/dist/errors-60AsF7Su.mjs +0 -95
- package/dist/events/index.d.mts +0 -382
- package/dist/events/index.mjs +0 -291
- package/dist/file-formats/index.d.mts +0 -39
- package/dist/file-formats/index.mjs +0 -48
- package/dist/functions/index.d.mts +0 -53
- package/dist/functions/index.mjs +0 -56
- package/dist/grants/index.d.mts +0 -93
- package/dist/grants/index.mjs +0 -102
- package/dist/index.d.mts +0 -4
- package/dist/index.mjs +0 -6
- package/dist/operations/index.d.mts +0 -1
- package/dist/operations/index.mjs +0 -1
- package/dist/org-admin/index.d.mts +0 -80
- package/dist/org-admin/index.mjs +0 -79
- package/dist/pipes/index.d.mts +0 -119
- package/dist/pipes/index.mjs +0 -106
- package/dist/procedures/index.d.mts +0 -61
- package/dist/procedures/index.mjs +0 -79
- package/dist/results/index.d.mts +0 -16
- package/dist/results/index.mjs +0 -64
- package/dist/retry-B4-9MZIp.mjs +0 -164
- package/dist/retry-w7cTp1QL.d.mts +0 -10
- package/dist/roles/index.d.mts +0 -60
- package/dist/roles/index.mjs +0 -74
- package/dist/rows/index.d.mts +0 -106
- package/dist/rows/index.mjs +0 -223
- package/dist/schemas/index.d.mts +0 -2
- package/dist/schemas/index.mjs +0 -4
- package/dist/schemas-catalog/index.d.mts +0 -2
- package/dist/schemas-catalog/index.mjs +0 -3
- package/dist/shares/index.d.mts +0 -56
- package/dist/shares/index.mjs +0 -77
- package/dist/snowflake-s3-sns-webhook.credential-set-D6bLAWy5.d.mts +0 -50
- package/dist/snowflake-s3-sns-webhook.credential-set-DzR7oWNK.mjs +0 -44
- package/dist/snowflake.credential-set-BxT7Gf3A.d.mts +0 -114
- package/dist/snowflake.credential-set-DE3gXf-a.mjs +0 -106
- package/dist/sql/index.d.mts +0 -84
- package/dist/sql/index.mjs +0 -209
- package/dist/sql-options-2k5xQ-oS.d.mts +0 -32
- package/dist/sql-options-D6GEa21F.mjs +0 -79
- package/dist/sql-safety-BZpAPsq6.mjs +0 -56
- package/dist/stages/index.d.mts +0 -64
- package/dist/stages/index.mjs +0 -81
- package/dist/statements-BumhMhN4.mjs +0 -81
- package/dist/statements-DJL0qVNA.d.mts +0 -238
- package/dist/status-page/index.d.mts +0 -510
- package/dist/status-page/index.mjs +0 -261
- package/dist/streaming/index.d.mts +0 -70
- package/dist/streaming/index.mjs +0 -56
- package/dist/streams/index.d.mts +0 -71
- package/dist/streams/index.mjs +0 -78
- package/dist/tables/index.d.mts +0 -2
- package/dist/tables/index.mjs +0 -3
- package/dist/tasks/index.d.mts +0 -79
- package/dist/tasks/index.mjs +0 -104
- package/dist/triggers/index.d.mts +0 -381
- package/dist/triggers/index.mjs +0 -1100
- package/dist/users/index.d.mts +0 -61
- package/dist/users/index.mjs +0 -67
- package/dist/verification/index.d.mts +0 -201
- package/dist/verification/index.mjs +0 -512
- package/dist/views/index.d.mts +0 -2
- package/dist/views/index.mjs +0 -3
- package/dist/warehouses/index.d.mts +0 -68
- package/dist/warehouses/index.mjs +0 -101
package/dist/common-DfpCwJx5.mjs
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
//#region src/schemas/common.ts
|
|
4
|
-
/**
|
|
5
|
-
* Cross-domain Zod primitives for the Snowflake integration.
|
|
6
|
-
*
|
|
7
|
-
* These schemas are the single source of truth for identifier shapes,
|
|
8
|
-
* fully-qualified names, statement context, and row / column metadata.
|
|
9
|
-
* Downstream domain files (sql.ts, results.ts, rows.ts, tables.ts, ...)
|
|
10
|
-
* compose them to avoid drift.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Snowflake identifiers are 1-255 chars. Unquoted identifiers are normalized
|
|
14
|
-
* to upper-case; quoted identifiers preserve case. We keep raw validation
|
|
15
|
-
* permissive and let the server reject bad names — a strict regex would
|
|
16
|
-
* forbid unicode-quoted identifiers legitimately used in the wild.
|
|
17
|
-
*/
|
|
18
|
-
const snowflakeIdentifier = z.string().min(1, "Snowflake identifier must not be empty").max(255, "Snowflake identifier must be 255 chars or less");
|
|
19
|
-
/**
|
|
20
|
-
* Fully-qualified name: `DATABASE.SCHEMA.NAME` (or subsets). Stored as a
|
|
21
|
-
* single string; we do *not* split/rejoin so callers can pass quoted
|
|
22
|
-
* segments through verbatim.
|
|
23
|
-
*/
|
|
24
|
-
const snowflakeFqn = z.string().min(1);
|
|
25
|
-
/**
|
|
26
|
-
* Optional context overrides applied per-statement.
|
|
27
|
-
* Every field is optional — absent values fall back to the connection's
|
|
28
|
-
* session defaults and then to account-level defaults.
|
|
29
|
-
*/
|
|
30
|
-
const statementContextSchema = z.object({
|
|
31
|
-
database: snowflakeIdentifier.optional(),
|
|
32
|
-
schema: snowflakeIdentifier.optional(),
|
|
33
|
-
warehouse: snowflakeIdentifier.optional(),
|
|
34
|
-
role: snowflakeIdentifier.optional(),
|
|
35
|
-
timeout: z.number().int().nonnegative().optional(),
|
|
36
|
-
parameters: z.record(z.string(), z.unknown()).optional()
|
|
37
|
-
}).strict();
|
|
38
|
-
/**
|
|
39
|
-
* SQL API v2 supports typed bindings: each binding is an object with a
|
|
40
|
-
* `type` and a `value`. We allow the simple positional shape and the
|
|
41
|
-
* keyed-map shape Snowflake accepts.
|
|
42
|
-
*/
|
|
43
|
-
const sqlBindingValueSchema = z.object({
|
|
44
|
-
type: z.string(),
|
|
45
|
-
value: z.union([
|
|
46
|
-
z.string(),
|
|
47
|
-
z.number(),
|
|
48
|
-
z.boolean(),
|
|
49
|
-
z.null()
|
|
50
|
-
])
|
|
51
|
-
});
|
|
52
|
-
const sqlBindingsSchema = z.record(z.string(), sqlBindingValueSchema).or(z.array(sqlBindingValueSchema));
|
|
53
|
-
/**
|
|
54
|
-
* Loosely-typed record shape for objects returned by `SHOW ...` commands.
|
|
55
|
-
* Snowflake returns positional arrays with a `rowType[]` describing each
|
|
56
|
-
* column — callers either consume the tuple form directly or `hydrateRow`
|
|
57
|
-
* into a `Record<string, unknown>`.
|
|
58
|
-
*/
|
|
59
|
-
const snowflakeObjectRowSchema = z.record(z.string(), z.unknown());
|
|
60
|
-
/**
|
|
61
|
-
* Column metadata entry as returned under `resultSetMetaData.rowType`.
|
|
62
|
-
*/
|
|
63
|
-
const columnMetaSchema = z.object({
|
|
64
|
-
name: z.string(),
|
|
65
|
-
type: z.string(),
|
|
66
|
-
nullable: z.boolean().optional(),
|
|
67
|
-
length: z.number().optional(),
|
|
68
|
-
precision: z.number().optional(),
|
|
69
|
-
scale: z.number().optional(),
|
|
70
|
-
byteLength: z.number().optional(),
|
|
71
|
-
collation: z.string().nullable().optional(),
|
|
72
|
-
database: z.string().optional(),
|
|
73
|
-
schema: z.string().optional(),
|
|
74
|
-
table: z.string().optional()
|
|
75
|
-
}).catchall(z.unknown());
|
|
76
|
-
/**
|
|
77
|
-
* Partition entry describing a shard of the total result set.
|
|
78
|
-
*/
|
|
79
|
-
const partitionInfoSchema = z.object({
|
|
80
|
-
rowCount: z.number(),
|
|
81
|
-
uncompressedSize: z.number().optional(),
|
|
82
|
-
compressedSize: z.number().optional()
|
|
83
|
-
}).catchall(z.unknown());
|
|
84
|
-
const resultSetMetaDataSchema = z.object({
|
|
85
|
-
numRows: z.number().optional(),
|
|
86
|
-
format: z.string().optional(),
|
|
87
|
-
partitionInfo: z.array(partitionInfoSchema).optional(),
|
|
88
|
-
rowType: z.array(columnMetaSchema).optional()
|
|
89
|
-
}).catchall(z.unknown());
|
|
90
|
-
|
|
91
|
-
//#endregion
|
|
92
|
-
export { snowflakeIdentifier as a, sqlBindingsSchema as c, snowflakeFqn as i, statementContextSchema as l, partitionInfoSchema as n, snowflakeObjectRowSchema as o, resultSetMetaDataSchema as r, sqlBindingValueSchema as s, columnMetaSchema as t };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { a as snowflakeAuthSchema, i as snowflakeAuthModeSchema, n as SnowflakeCredentials, o as snowflakeCredentialSet, r as parseSnowflakeCredentials, t as SnowflakeAuthMode } from "../snowflake.credential-set-BxT7Gf3A.mjs";
|
|
2
|
-
import { a as SnowflakeAzureEventGridWebhookCredentials, i as snowflakeGcsPubSubWebhookCredentialSet, n as snowflakeS3SnsWebhookCredentialSet, o as snowflakeAzureEventGridWebhookCredentialSet, r as SnowflakeGcsPubSubWebhookCredentials, t as SnowflakeS3SnsWebhookCredentials } from "../snowflake-s3-sns-webhook.credential-set-D6bLAWy5.mjs";
|
|
3
|
-
export { type SnowflakeAuthMode, type SnowflakeAzureEventGridWebhookCredentials, type SnowflakeCredentials, type SnowflakeGcsPubSubWebhookCredentials, type SnowflakeS3SnsWebhookCredentials, parseSnowflakeCredentials, snowflakeAuthModeSchema, snowflakeAuthSchema, snowflakeAzureEventGridWebhookCredentialSet, snowflakeCredentialSet, snowflakeGcsPubSubWebhookCredentialSet, snowflakeS3SnsWebhookCredentialSet };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { i as snowflakeCredentialSet, n as snowflakeAuthModeSchema, r as snowflakeAuthSchema, t as parseSnowflakeCredentials } from "../snowflake.credential-set-DE3gXf-a.mjs";
|
|
2
|
-
import { n as snowflakeGcsPubSubWebhookCredentialSet, r as snowflakeAzureEventGridWebhookCredentialSet, t as snowflakeS3SnsWebhookCredentialSet } from "../snowflake-s3-sns-webhook.credential-set-DzR7oWNK.mjs";
|
|
3
|
-
|
|
4
|
-
export { parseSnowflakeCredentials, snowflakeAuthModeSchema, snowflakeAuthSchema, snowflakeAzureEventGridWebhookCredentialSet, snowflakeCredentialSet, snowflakeGcsPubSubWebhookCredentialSet, snowflakeS3SnsWebhookCredentialSet };
|
package/dist/databases/index.mjs
DELETED
package/dist/errors-60AsF7Su.mjs
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
//#region src/errors.ts
|
|
2
|
-
/**
|
|
3
|
-
* Structured Snowflake error. Always thrown by the client on transport or
|
|
4
|
-
* HTTP-level failure, and by higher-level helpers when they wrap those
|
|
5
|
-
* failures with extra context.
|
|
6
|
-
*/
|
|
7
|
-
var SnowflakeApiError = class extends Error {
|
|
8
|
-
kind;
|
|
9
|
-
status;
|
|
10
|
-
body;
|
|
11
|
-
providerCode;
|
|
12
|
-
requestId;
|
|
13
|
-
retryAfterMs;
|
|
14
|
-
retryable;
|
|
15
|
-
constructor(init) {
|
|
16
|
-
super(init.message, init.cause !== void 0 ? { cause: init.cause } : void 0);
|
|
17
|
-
this.name = "SnowflakeApiError";
|
|
18
|
-
this.kind = init.kind;
|
|
19
|
-
this.status = init.status;
|
|
20
|
-
this.body = init.body;
|
|
21
|
-
this.providerCode = init.providerCode;
|
|
22
|
-
this.requestId = init.requestId;
|
|
23
|
-
this.retryAfterMs = init.retryAfterMs;
|
|
24
|
-
this.retryable = init.retryable ?? defaultRetryability(init.kind);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* SQL-level failure emitted by the SQL API on status 422. Callers should
|
|
29
|
-
* branch on `sqlState` / `code` when they need to recover from known
|
|
30
|
-
* SQL-layer errors (for example `42S02` table-not-found).
|
|
31
|
-
*/
|
|
32
|
-
var SnowflakeSqlError = class extends SnowflakeApiError {
|
|
33
|
-
sqlState;
|
|
34
|
-
code;
|
|
35
|
-
statementHandle;
|
|
36
|
-
constructor(init) {
|
|
37
|
-
super({
|
|
38
|
-
...init,
|
|
39
|
-
kind: "sql"
|
|
40
|
-
});
|
|
41
|
-
this.name = "SnowflakeSqlError";
|
|
42
|
-
this.sqlState = init.sqlState;
|
|
43
|
-
this.code = init.code;
|
|
44
|
-
this.statementHandle = init.statementHandle;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
function defaultRetryability(kind) {
|
|
48
|
-
return kind === "rate_limit" || kind === "server_error" || kind === "timeout" || kind === "network";
|
|
49
|
-
}
|
|
50
|
-
function classifySnowflakeHttpStatus(status) {
|
|
51
|
-
if (status === 401) return "auth";
|
|
52
|
-
if (status === 403) return "auth";
|
|
53
|
-
if (status === 404) return "not_found";
|
|
54
|
-
if (status === 408) return "timeout";
|
|
55
|
-
if (status === 409) return "conflict";
|
|
56
|
-
if (status === 422) return "sql";
|
|
57
|
-
if (status === 429) return "rate_limit";
|
|
58
|
-
if (status >= 500 && status <= 599) return "server_error";
|
|
59
|
-
if (status >= 400 && status <= 499) return "validation";
|
|
60
|
-
return "unknown";
|
|
61
|
-
}
|
|
62
|
-
function isRecord(value) {
|
|
63
|
-
return typeof value === "object" && value !== null;
|
|
64
|
-
}
|
|
65
|
-
function extractSnowflakeMessage(body) {
|
|
66
|
-
if (!isRecord(body)) return void 0;
|
|
67
|
-
if (typeof body.message === "string") return body.message;
|
|
68
|
-
if (typeof body.error === "string") return body.error;
|
|
69
|
-
if (typeof body.errorMessage === "string") return body.errorMessage;
|
|
70
|
-
}
|
|
71
|
-
function extractSnowflakeCode(body) {
|
|
72
|
-
if (!isRecord(body)) return void 0;
|
|
73
|
-
if (typeof body.code === "string") return body.code;
|
|
74
|
-
if (typeof body.errorCode === "string") return body.errorCode;
|
|
75
|
-
}
|
|
76
|
-
function extractSnowflakeSqlState(body) {
|
|
77
|
-
if (!isRecord(body)) return void 0;
|
|
78
|
-
if (typeof body.sqlState === "string") return body.sqlState;
|
|
79
|
-
if (typeof body.sql_state === "string") return body.sql_state;
|
|
80
|
-
}
|
|
81
|
-
function extractSnowflakeStatementHandle(body) {
|
|
82
|
-
if (!isRecord(body)) return void 0;
|
|
83
|
-
if (typeof body.statementHandle === "string") return body.statementHandle;
|
|
84
|
-
if (typeof body.statement_handle === "string") return body.statement_handle;
|
|
85
|
-
}
|
|
86
|
-
function parseRetryAfterHeader(headerValue) {
|
|
87
|
-
if (!headerValue) return void 0;
|
|
88
|
-
const asNumber = Number(headerValue);
|
|
89
|
-
if (Number.isFinite(asNumber) && asNumber >= 0) return asNumber * 1e3;
|
|
90
|
-
const asDate = Date.parse(headerValue);
|
|
91
|
-
if (!Number.isNaN(asDate)) return Math.max(0, asDate - Date.now());
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
//#endregion
|
|
95
|
-
export { extractSnowflakeMessage as a, parseRetryAfterHeader as c, extractSnowflakeCode as i, SnowflakeSqlError as n, extractSnowflakeSqlState as o, classifySnowflakeHttpStatus as r, extractSnowflakeStatementHandle as s, SnowflakeApiError as t };
|
package/dist/events/index.d.mts
DELETED
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
//#region src/events/index.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Row batch shape used by the SQL-emitting polling triggers.
|
|
6
|
-
*
|
|
7
|
-
* `rows` is the hydrated row list (column-name keyed record) straight
|
|
8
|
-
* from `executeSql`. `columns` preserves the `resultSetMetaData.rowType`
|
|
9
|
-
* entries so downstream workflows can introspect nullability / type
|
|
10
|
-
* without a round-trip. `fetchedAt` is the ISO-8601 timestamp we
|
|
11
|
-
* captured the result at.
|
|
12
|
-
*/
|
|
13
|
-
declare const snowflakeRowBatchSchema: z.ZodObject<{
|
|
14
|
-
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
15
|
-
columns: z.ZodArray<z.ZodObject<{
|
|
16
|
-
name: z.ZodString;
|
|
17
|
-
type: z.ZodString;
|
|
18
|
-
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
-
length: z.ZodOptional<z.ZodNumber>;
|
|
20
|
-
precision: z.ZodOptional<z.ZodNumber>;
|
|
21
|
-
scale: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
byteLength: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
collation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
-
database: z.ZodOptional<z.ZodString>;
|
|
25
|
-
schema: z.ZodOptional<z.ZodString>;
|
|
26
|
-
table: z.ZodOptional<z.ZodString>;
|
|
27
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
28
|
-
rowCount: z.ZodNumber;
|
|
29
|
-
fetchedAt: z.ZodString;
|
|
30
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
31
|
-
type SnowflakeRowBatch = z.infer<typeof snowflakeRowBatchSchema>;
|
|
32
|
-
declare const streamHasDataEventSchema: z.ZodObject<{
|
|
33
|
-
streamName: z.ZodString;
|
|
34
|
-
hasData: z.ZodBoolean;
|
|
35
|
-
checkedAt: z.ZodString;
|
|
36
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
37
|
-
type StreamHasDataEvent = z.infer<typeof streamHasDataEventSchema>;
|
|
38
|
-
declare const streamAppendOnlyEventSchema: z.ZodObject<{
|
|
39
|
-
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
40
|
-
columns: z.ZodArray<z.ZodObject<{
|
|
41
|
-
name: z.ZodString;
|
|
42
|
-
type: z.ZodString;
|
|
43
|
-
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
-
length: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
precision: z.ZodOptional<z.ZodNumber>;
|
|
46
|
-
scale: z.ZodOptional<z.ZodNumber>;
|
|
47
|
-
byteLength: z.ZodOptional<z.ZodNumber>;
|
|
48
|
-
collation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
-
database: z.ZodOptional<z.ZodString>;
|
|
50
|
-
schema: z.ZodOptional<z.ZodString>;
|
|
51
|
-
table: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
53
|
-
rowCount: z.ZodNumber;
|
|
54
|
-
fetchedAt: z.ZodString;
|
|
55
|
-
streamName: z.ZodString;
|
|
56
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
57
|
-
type StreamAppendOnlyEvent = z.infer<typeof streamAppendOnlyEventSchema>;
|
|
58
|
-
declare const scheduledSqlEventSchema: z.ZodObject<{
|
|
59
|
-
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60
|
-
columns: z.ZodArray<z.ZodObject<{
|
|
61
|
-
name: z.ZodString;
|
|
62
|
-
type: z.ZodString;
|
|
63
|
-
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
-
length: z.ZodOptional<z.ZodNumber>;
|
|
65
|
-
precision: z.ZodOptional<z.ZodNumber>;
|
|
66
|
-
scale: z.ZodOptional<z.ZodNumber>;
|
|
67
|
-
byteLength: z.ZodOptional<z.ZodNumber>;
|
|
68
|
-
collation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
-
database: z.ZodOptional<z.ZodString>;
|
|
70
|
-
schema: z.ZodOptional<z.ZodString>;
|
|
71
|
-
table: z.ZodOptional<z.ZodString>;
|
|
72
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
73
|
-
rowCount: z.ZodNumber;
|
|
74
|
-
fetchedAt: z.ZodString;
|
|
75
|
-
statementDigest: z.ZodString;
|
|
76
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
77
|
-
type ScheduledSqlEvent = z.infer<typeof scheduledSqlEventSchema>;
|
|
78
|
-
declare const scheduledDeltaEventSchema: z.ZodObject<{
|
|
79
|
-
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
80
|
-
columns: z.ZodArray<z.ZodObject<{
|
|
81
|
-
name: z.ZodString;
|
|
82
|
-
type: z.ZodString;
|
|
83
|
-
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
-
length: z.ZodOptional<z.ZodNumber>;
|
|
85
|
-
precision: z.ZodOptional<z.ZodNumber>;
|
|
86
|
-
scale: z.ZodOptional<z.ZodNumber>;
|
|
87
|
-
byteLength: z.ZodOptional<z.ZodNumber>;
|
|
88
|
-
collation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
-
database: z.ZodOptional<z.ZodString>;
|
|
90
|
-
schema: z.ZodOptional<z.ZodString>;
|
|
91
|
-
table: z.ZodOptional<z.ZodString>;
|
|
92
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
93
|
-
rowCount: z.ZodNumber;
|
|
94
|
-
fetchedAt: z.ZodString;
|
|
95
|
-
table: z.ZodString;
|
|
96
|
-
cursorColumn: z.ZodString;
|
|
97
|
-
highWaterValue: z.ZodNullable<z.ZodString>;
|
|
98
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
99
|
-
type ScheduledDeltaEvent = z.infer<typeof scheduledDeltaEventSchema>;
|
|
100
|
-
declare const taskRunEventSchema: z.ZodObject<{
|
|
101
|
-
name: z.ZodString;
|
|
102
|
-
databaseName: z.ZodOptional<z.ZodString>;
|
|
103
|
-
schemaName: z.ZodOptional<z.ZodString>;
|
|
104
|
-
state: z.ZodString;
|
|
105
|
-
queryId: z.ZodOptional<z.ZodString>;
|
|
106
|
-
scheduledTime: z.ZodOptional<z.ZodString>;
|
|
107
|
-
completedTime: z.ZodOptional<z.ZodString>;
|
|
108
|
-
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
109
|
-
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
-
attemptNumber: z.ZodOptional<z.ZodNumber>;
|
|
111
|
-
runId: z.ZodOptional<z.ZodString>;
|
|
112
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
113
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
114
|
-
type TaskRunEvent = z.infer<typeof taskRunEventSchema>;
|
|
115
|
-
declare const statementCompletedEventSchema: z.ZodObject<{
|
|
116
|
-
queryId: z.ZodString;
|
|
117
|
-
executionStatus: z.ZodString;
|
|
118
|
-
queryText: z.ZodOptional<z.ZodString>;
|
|
119
|
-
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
-
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
-
startTime: z.ZodOptional<z.ZodString>;
|
|
122
|
-
endTime: z.ZodOptional<z.ZodString>;
|
|
123
|
-
warehouseName: z.ZodOptional<z.ZodString>;
|
|
124
|
-
databaseName: z.ZodOptional<z.ZodString>;
|
|
125
|
-
schemaName: z.ZodOptional<z.ZodString>;
|
|
126
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
127
|
-
roleName: z.ZodOptional<z.ZodString>;
|
|
128
|
-
totalElapsedTimeMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
129
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
130
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
131
|
-
type StatementCompletedEvent = z.infer<typeof statementCompletedEventSchema>;
|
|
132
|
-
declare const pipeLoadEventSchema: z.ZodObject<{
|
|
133
|
-
pipeName: z.ZodString;
|
|
134
|
-
filePath: z.ZodString;
|
|
135
|
-
status: z.ZodString;
|
|
136
|
-
loadTime: z.ZodOptional<z.ZodString>;
|
|
137
|
-
rowCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
138
|
-
rowParsed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
139
|
-
errorLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
140
|
-
errorsSeen: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
141
|
-
firstErrorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
|
-
firstErrorLineNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
143
|
-
firstErrorColumnName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
-
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
145
|
-
stageLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
146
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
147
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
148
|
-
type PipeLoadEvent = z.infer<typeof pipeLoadEventSchema>;
|
|
149
|
-
/**
|
|
150
|
-
* Kinds of Snowflake objects the SHOW-diff polling triggers can surface.
|
|
151
|
-
* Kept open-ended (`z.string()`) via the enum's `catch` so new kinds can
|
|
152
|
-
* be added without bumping the schema — callers rarely want to pattern
|
|
153
|
-
* match on the kind, they just want the row.
|
|
154
|
-
*/
|
|
155
|
-
declare const snowflakeObjectKindSchema: z.ZodEnum<{
|
|
156
|
-
USER: "USER";
|
|
157
|
-
ROLE: "ROLE";
|
|
158
|
-
DATABASE: "DATABASE";
|
|
159
|
-
SCHEMA: "SCHEMA";
|
|
160
|
-
TABLE: "TABLE";
|
|
161
|
-
VIEW: "VIEW";
|
|
162
|
-
STAGE: "STAGE";
|
|
163
|
-
PIPE: "PIPE";
|
|
164
|
-
TASK: "TASK";
|
|
165
|
-
STREAM: "STREAM";
|
|
166
|
-
SHARE: "SHARE";
|
|
167
|
-
WAREHOUSE: "WAREHOUSE";
|
|
168
|
-
FUNCTION: "FUNCTION";
|
|
169
|
-
PROCEDURE: "PROCEDURE";
|
|
170
|
-
FILE_FORMAT: "FILE_FORMAT";
|
|
171
|
-
}>;
|
|
172
|
-
type SnowflakeObjectKind = z.infer<typeof snowflakeObjectKindSchema>;
|
|
173
|
-
declare const snowflakeObjectLifecycleEventSchema: z.ZodObject<{
|
|
174
|
-
kind: z.ZodString;
|
|
175
|
-
name: z.ZodString;
|
|
176
|
-
change: z.ZodEnum<{
|
|
177
|
-
created: "created";
|
|
178
|
-
dropped: "dropped";
|
|
179
|
-
}>;
|
|
180
|
-
identity: z.ZodString;
|
|
181
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
182
|
-
createdOn: z.ZodOptional<z.ZodString>;
|
|
183
|
-
detectedAt: z.ZodString;
|
|
184
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
185
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
186
|
-
type SnowflakeObjectLifecycleEvent = z.infer<typeof snowflakeObjectLifecycleEventSchema>;
|
|
187
|
-
declare const shareChangedEventSchema: z.ZodObject<{
|
|
188
|
-
name: z.ZodString;
|
|
189
|
-
kind: z.ZodOptional<z.ZodString>;
|
|
190
|
-
change: z.ZodEnum<{
|
|
191
|
-
created: "created";
|
|
192
|
-
dropped: "dropped";
|
|
193
|
-
modified: "modified";
|
|
194
|
-
}>;
|
|
195
|
-
identity: z.ZodString;
|
|
196
|
-
detectedAt: z.ZodString;
|
|
197
|
-
previousRow: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
198
|
-
currentRow: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
199
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
200
|
-
type ShareChangedEvent = z.infer<typeof shareChangedEventSchema>;
|
|
201
|
-
declare const grantChangedEventSchema: z.ZodObject<{
|
|
202
|
-
privilege: z.ZodString;
|
|
203
|
-
grantedOn: z.ZodString;
|
|
204
|
-
objectName: z.ZodString;
|
|
205
|
-
granteeName: z.ZodString;
|
|
206
|
-
granteeType: z.ZodOptional<z.ZodString>;
|
|
207
|
-
change: z.ZodEnum<{
|
|
208
|
-
granted: "granted";
|
|
209
|
-
revoked: "revoked";
|
|
210
|
-
}>;
|
|
211
|
-
identity: z.ZodString;
|
|
212
|
-
detectedAt: z.ZodString;
|
|
213
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
214
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
215
|
-
type GrantChangedEvent = z.infer<typeof grantChangedEventSchema>;
|
|
216
|
-
declare const warehouseCreditsEventSchema: z.ZodObject<{
|
|
217
|
-
warehouseName: z.ZodString;
|
|
218
|
-
startTime: z.ZodOptional<z.ZodString>;
|
|
219
|
-
endTime: z.ZodOptional<z.ZodString>;
|
|
220
|
-
creditsUsed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
221
|
-
creditsUsedCompute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
222
|
-
creditsUsedCloudServices: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
223
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
224
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
225
|
-
type WarehouseCreditsEvent = z.infer<typeof warehouseCreditsEventSchema>;
|
|
226
|
-
declare const warehouseQueueEventSchema: z.ZodObject<{
|
|
227
|
-
warehouseName: z.ZodString;
|
|
228
|
-
startTime: z.ZodOptional<z.ZodString>;
|
|
229
|
-
endTime: z.ZodOptional<z.ZodString>;
|
|
230
|
-
avgRunning: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
231
|
-
avgQueuedLoad: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
232
|
-
avgQueuedProvisioning: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
233
|
-
avgBlocked: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
234
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
235
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
236
|
-
type WarehouseQueueEvent = z.infer<typeof warehouseQueueEventSchema>;
|
|
237
|
-
declare const statusPageIncidentEventSchema: z.ZodObject<{
|
|
238
|
-
id: z.ZodString;
|
|
239
|
-
name: z.ZodString;
|
|
240
|
-
status: z.ZodString;
|
|
241
|
-
impact: z.ZodOptional<z.ZodString>;
|
|
242
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
243
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
244
|
-
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
|
-
shortlink: z.ZodOptional<z.ZodString>;
|
|
246
|
-
detectedAt: z.ZodString;
|
|
247
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
248
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
249
|
-
type StatusPageIncidentEvent = z.infer<typeof statusPageIncidentEventSchema>;
|
|
250
|
-
declare const statusPageComponentChangeEventSchema: z.ZodObject<{
|
|
251
|
-
id: z.ZodString;
|
|
252
|
-
name: z.ZodString;
|
|
253
|
-
previousStatus: z.ZodNullable<z.ZodString>;
|
|
254
|
-
currentStatus: z.ZodString;
|
|
255
|
-
description: z.ZodOptional<z.ZodString>;
|
|
256
|
-
changedAt: z.ZodString;
|
|
257
|
-
detectedAt: z.ZodString;
|
|
258
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
259
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
260
|
-
type StatusPageComponentChangeEvent = z.infer<typeof statusPageComponentChangeEventSchema>;
|
|
261
|
-
declare const snowflakeDiffSnapshotEntrySchema: z.ZodObject<{
|
|
262
|
-
identity: z.ZodString;
|
|
263
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
264
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
265
|
-
type SnowflakeDiffSnapshotEntry = z.infer<typeof snowflakeDiffSnapshotEntrySchema>;
|
|
266
|
-
/**
|
|
267
|
-
* Canonical object-storage event shape emitted by the three auto-ingest
|
|
268
|
-
* webhook triggers. Each cloud's native payload is normalised to this
|
|
269
|
-
* shape; the raw envelope is preserved under `raw` for callers that
|
|
270
|
-
* need provider-specific fields (etag, metageneration, blob tier, ...).
|
|
271
|
-
*/
|
|
272
|
-
declare const snowpipeObjectEventSchema: z.ZodObject<{
|
|
273
|
-
provider: z.ZodEnum<{
|
|
274
|
-
"aws-s3": "aws-s3";
|
|
275
|
-
"gcp-gcs": "gcp-gcs";
|
|
276
|
-
"azure-blob": "azure-blob";
|
|
277
|
-
}>;
|
|
278
|
-
eventType: z.ZodString;
|
|
279
|
-
eventTime: z.ZodString;
|
|
280
|
-
bucket: z.ZodString;
|
|
281
|
-
key: z.ZodString;
|
|
282
|
-
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
283
|
-
etag: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
-
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
285
|
-
sourceIp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
286
|
-
messageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
287
|
-
receivedAt: z.ZodString;
|
|
288
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
289
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
290
|
-
type SnowpipeObjectEvent = z.infer<typeof snowpipeObjectEventSchema>;
|
|
291
|
-
/**
|
|
292
|
-
* Batch envelope used by auto-ingest webhook triggers — a single SNS
|
|
293
|
-
* notification, Pub/Sub push, or Event Grid batch can carry multiple
|
|
294
|
-
* object events, so the trigger emits `{ events, receivedAt, messageId }`.
|
|
295
|
-
*/
|
|
296
|
-
declare const snowpipeObjectBatchSchema: z.ZodObject<{
|
|
297
|
-
events: z.ZodArray<z.ZodObject<{
|
|
298
|
-
provider: z.ZodEnum<{
|
|
299
|
-
"aws-s3": "aws-s3";
|
|
300
|
-
"gcp-gcs": "gcp-gcs";
|
|
301
|
-
"azure-blob": "azure-blob";
|
|
302
|
-
}>;
|
|
303
|
-
eventType: z.ZodString;
|
|
304
|
-
eventTime: z.ZodString;
|
|
305
|
-
bucket: z.ZodString;
|
|
306
|
-
key: z.ZodString;
|
|
307
|
-
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
308
|
-
etag: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
309
|
-
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
310
|
-
sourceIp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
311
|
-
messageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
312
|
-
receivedAt: z.ZodString;
|
|
313
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
314
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
315
|
-
provider: z.ZodEnum<{
|
|
316
|
-
"aws-s3": "aws-s3";
|
|
317
|
-
"gcp-gcs": "gcp-gcs";
|
|
318
|
-
"azure-blob": "azure-blob";
|
|
319
|
-
}>;
|
|
320
|
-
receivedAt: z.ZodString;
|
|
321
|
-
messageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
322
|
-
topic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
323
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
324
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
325
|
-
type SnowpipeObjectBatch = z.infer<typeof snowpipeObjectBatchSchema>;
|
|
326
|
-
/**
|
|
327
|
-
* Raw SNS "Notification" envelope. The outer webhook payload we accept
|
|
328
|
-
* from `autoIngestS3Sns` matches this shape — fields per the AWS SNS
|
|
329
|
-
* HTTP(S) delivery spec.
|
|
330
|
-
*/
|
|
331
|
-
declare const snsNotificationSchema: z.ZodObject<{
|
|
332
|
-
Type: z.ZodEnum<{
|
|
333
|
-
Notification: "Notification";
|
|
334
|
-
SubscriptionConfirmation: "SubscriptionConfirmation";
|
|
335
|
-
UnsubscribeConfirmation: "UnsubscribeConfirmation";
|
|
336
|
-
}>;
|
|
337
|
-
MessageId: z.ZodString;
|
|
338
|
-
TopicArn: z.ZodString;
|
|
339
|
-
Message: z.ZodString;
|
|
340
|
-
Timestamp: z.ZodString;
|
|
341
|
-
SignatureVersion: z.ZodString;
|
|
342
|
-
Signature: z.ZodString;
|
|
343
|
-
SigningCertURL: z.ZodString;
|
|
344
|
-
Subject: z.ZodOptional<z.ZodString>;
|
|
345
|
-
Token: z.ZodOptional<z.ZodString>;
|
|
346
|
-
SubscribeURL: z.ZodOptional<z.ZodString>;
|
|
347
|
-
UnsubscribeURL: z.ZodOptional<z.ZodString>;
|
|
348
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
349
|
-
type SnsNotification = z.infer<typeof snsNotificationSchema>;
|
|
350
|
-
/**
|
|
351
|
-
* GCP Pub/Sub push envelope. The push subscription wraps the Pub/Sub
|
|
352
|
-
* message in `{message, subscription}`; `message.data` is base64 and
|
|
353
|
-
* decodes to the GCS object-change notification.
|
|
354
|
-
*/
|
|
355
|
-
declare const gcsPubSubPushSchema: z.ZodObject<{
|
|
356
|
-
message: z.ZodObject<{
|
|
357
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
358
|
-
publishTime: z.ZodOptional<z.ZodString>;
|
|
359
|
-
data: z.ZodOptional<z.ZodString>;
|
|
360
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
361
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
362
|
-
subscription: z.ZodOptional<z.ZodString>;
|
|
363
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
364
|
-
type GcsPubSubPush = z.infer<typeof gcsPubSubPushSchema>;
|
|
365
|
-
/**
|
|
366
|
-
* Azure Event Grid event (Event Grid schema v1.0). The wire format is
|
|
367
|
-
* always a JSON array; we schema-validate a single envelope and the
|
|
368
|
-
* trigger unwraps the array at the boundary.
|
|
369
|
-
*/
|
|
370
|
-
declare const azureEventGridEventSchema: z.ZodObject<{
|
|
371
|
-
id: z.ZodString;
|
|
372
|
-
eventType: z.ZodString;
|
|
373
|
-
subject: z.ZodString;
|
|
374
|
-
eventTime: z.ZodString;
|
|
375
|
-
dataVersion: z.ZodOptional<z.ZodString>;
|
|
376
|
-
metadataVersion: z.ZodOptional<z.ZodString>;
|
|
377
|
-
topic: z.ZodOptional<z.ZodString>;
|
|
378
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
379
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
380
|
-
type AzureEventGridEvent = z.infer<typeof azureEventGridEventSchema>;
|
|
381
|
-
//#endregion
|
|
382
|
-
export { AzureEventGridEvent, GcsPubSubPush, GrantChangedEvent, PipeLoadEvent, ScheduledDeltaEvent, ScheduledSqlEvent, ShareChangedEvent, SnowflakeDiffSnapshotEntry, SnowflakeObjectKind, SnowflakeObjectLifecycleEvent, SnowflakeRowBatch, SnowpipeObjectBatch, SnowpipeObjectEvent, SnsNotification, StatementCompletedEvent, StatusPageComponentChangeEvent, StatusPageIncidentEvent, StreamAppendOnlyEvent, StreamHasDataEvent, TaskRunEvent, WarehouseCreditsEvent, WarehouseQueueEvent, azureEventGridEventSchema, gcsPubSubPushSchema, grantChangedEventSchema, pipeLoadEventSchema, scheduledDeltaEventSchema, scheduledSqlEventSchema, shareChangedEventSchema, snowflakeDiffSnapshotEntrySchema, snowflakeObjectKindSchema, snowflakeObjectLifecycleEventSchema, snowflakeRowBatchSchema, snowpipeObjectBatchSchema, snowpipeObjectEventSchema, snsNotificationSchema, statementCompletedEventSchema, statusPageComponentChangeEventSchema, statusPageIncidentEventSchema, streamAppendOnlyEventSchema, streamHasDataEventSchema, taskRunEventSchema, warehouseCreditsEventSchema, warehouseQueueEventSchema };
|