@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/tasks/index.mjs
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
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
|
-
|
|
6
|
-
//#region src/tasks/index.ts
|
|
7
|
-
function taskFqn(ref) {
|
|
8
|
-
return buildFqn(ref.database, ref.schema, ref.name);
|
|
9
|
-
}
|
|
10
|
-
async function createTask(client, options) {
|
|
11
|
-
const prefix = `CREATE${options.orReplace ? " OR REPLACE" : ""} TASK${options.ifNotExists ? " IF NOT EXISTS" : ""}`;
|
|
12
|
-
const copyGrants = options.copyGrants ? " COPY GRANTS" : "";
|
|
13
|
-
const body = options.options && Object.keys(options.options).length > 0 ? ` ${formatOptions(options.options)}` : "";
|
|
14
|
-
const after = options.after && options.after.length > 0 ? ` AFTER ${options.after.map(taskFqn).join(", ")}` : "";
|
|
15
|
-
const when = options.when ? ` WHEN ${options.when}` : "";
|
|
16
|
-
const comment = options.comment ? ` COMMENT = ${quoteLiteral(options.comment)}` : "";
|
|
17
|
-
await executeSql(client, {
|
|
18
|
-
statement: `${prefix} ${taskFqn(options)}${copyGrants}${body}${after}${when}${comment} AS ${options.as}`,
|
|
19
|
-
warehouse: options.warehouse,
|
|
20
|
-
role: options.role
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
async function alterTask(client, options) {
|
|
24
|
-
let tail;
|
|
25
|
-
if (options.rename) tail = `RENAME TO ${taskFqn(options.rename)}`;
|
|
26
|
-
else if (options.addAfter && options.addAfter.length > 0) tail = `ADD AFTER ${options.addAfter.map(taskFqn).join(", ")}`;
|
|
27
|
-
else if (options.removeAfter && options.removeAfter.length > 0) tail = `REMOVE AFTER ${options.removeAfter.map(taskFqn).join(", ")}`;
|
|
28
|
-
else if (options.modifyAs !== void 0) tail = `MODIFY AS ${options.modifyAs}`;
|
|
29
|
-
else if (options.modifyWhen !== void 0) tail = `MODIFY WHEN ${options.modifyWhen}`;
|
|
30
|
-
else if (options.set && Object.keys(options.set).length > 0) tail = `SET ${formatOptions(options.set)}`;
|
|
31
|
-
else if (options.unset && options.unset.length > 0) tail = `UNSET ${options.unset.map((k) => k.toUpperCase()).join(", ")}`;
|
|
32
|
-
else if (options.comment !== void 0) tail = `SET COMMENT = ${quoteLiteral(options.comment)}`;
|
|
33
|
-
else throw new Error("alterTask requires one of: rename / addAfter / removeAfter / modifyAs / modifyWhen / set / unset / comment");
|
|
34
|
-
await executeSql(client, {
|
|
35
|
-
statement: `ALTER TASK${options.ifExists ? " IF EXISTS" : ""} ${taskFqn(options)} ${tail}`,
|
|
36
|
-
warehouse: options.warehouse,
|
|
37
|
-
role: options.role
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
async function dropTask(client, options) {
|
|
41
|
-
await executeSql(client, {
|
|
42
|
-
statement: `DROP TASK${options.ifExists ? " IF EXISTS" : ""} ${taskFqn(options)}`,
|
|
43
|
-
warehouse: options.warehouse,
|
|
44
|
-
role: options.role
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
async function describeTask(client, options) {
|
|
48
|
-
return (await executeSql(client, {
|
|
49
|
-
statement: `DESCRIBE TASK ${taskFqn(options)}`,
|
|
50
|
-
warehouse: options.warehouse,
|
|
51
|
-
role: options.role
|
|
52
|
-
})).rows;
|
|
53
|
-
}
|
|
54
|
-
async function executeTask(client, options) {
|
|
55
|
-
const suffix = options.retryLast ? " RETRY LAST" : "";
|
|
56
|
-
await executeSql(client, {
|
|
57
|
-
statement: `EXECUTE TASK ${taskFqn(options)}${suffix}`,
|
|
58
|
-
warehouse: options.warehouse,
|
|
59
|
-
role: options.role
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
async function resumeTask(client, options) {
|
|
63
|
-
await executeSql(client, {
|
|
64
|
-
statement: `ALTER TASK${options.ifExists ? " IF EXISTS" : ""} ${taskFqn(options)} RESUME`,
|
|
65
|
-
warehouse: options.warehouse,
|
|
66
|
-
role: options.role
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
async function suspendTask(client, options) {
|
|
70
|
-
await executeSql(client, {
|
|
71
|
-
statement: `ALTER TASK${options.ifExists ? " IF EXISTS" : ""} ${taskFqn(options)} SUSPEND`,
|
|
72
|
-
warehouse: options.warehouse,
|
|
73
|
-
role: options.role
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function renderTimestampArg(value) {
|
|
77
|
-
return value ? `TO_TIMESTAMP_LTZ(${quoteLiteral(value)})` : "NULL";
|
|
78
|
-
}
|
|
79
|
-
async function showTaskHistory(client, options = {}) {
|
|
80
|
-
const args = [];
|
|
81
|
-
if (options.scheduledTimeRangeStart !== void 0) args.push(`SCHEDULED_TIME_RANGE_START => ${renderTimestampArg(options.scheduledTimeRangeStart)}`);
|
|
82
|
-
if (options.scheduledTimeRangeEnd !== void 0) args.push(`SCHEDULED_TIME_RANGE_END => ${renderTimestampArg(options.scheduledTimeRangeEnd)}`);
|
|
83
|
-
if (options.resultLimit !== void 0) args.push(`RESULT_LIMIT => ${options.resultLimit}`);
|
|
84
|
-
if (options.taskName) args.push(`TASK_NAME => ${quoteLiteral(taskFqn(options.taskName))}`);
|
|
85
|
-
if (options.rootTaskName) args.push(`ROOT_TASK_NAME => ${quoteLiteral(taskFqn(options.rootTaskName))}`);
|
|
86
|
-
if (options.errorOnly !== void 0) args.push(`ERROR_ONLY => ${options.errorOnly ? "TRUE" : "FALSE"}`);
|
|
87
|
-
return (await executeSql(client, {
|
|
88
|
-
statement: `SELECT * FROM TABLE(INFORMATION_SCHEMA.TASK_HISTORY(${args.join(", ")}))`,
|
|
89
|
-
warehouse: options.warehouse,
|
|
90
|
-
role: options.role
|
|
91
|
-
})).rows;
|
|
92
|
-
}
|
|
93
|
-
async function showTaskDependents(client, options) {
|
|
94
|
-
const args = [`TASK_NAME => ${quoteLiteral(taskFqn(options))}`];
|
|
95
|
-
if (options.recursive !== void 0) args.push(`RECURSIVE => ${options.recursive ? "TRUE" : "FALSE"}`);
|
|
96
|
-
return (await executeSql(client, {
|
|
97
|
-
statement: `SELECT * FROM TABLE(INFORMATION_SCHEMA.TASK_DEPENDENTS(${args.join(", ")}))`,
|
|
98
|
-
warehouse: options.warehouse,
|
|
99
|
-
role: options.role
|
|
100
|
-
})).rows;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
//#endregion
|
|
104
|
-
export { alterTask, createTask, describeTask, dropTask, executeTask, resumeTask, showTaskDependents, showTaskHistory, showTasks, suspendTask };
|
|
@@ -1,381 +0,0 @@
|
|
|
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
|
-
import { BoundTrigger } from "@keystrokehq/core";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
import { PollingTriggerManifest } from "@keystrokehq/core/trigger";
|
|
8
|
-
|
|
9
|
-
//#region ../../packages/integration-authoring/dist/index.d.mts
|
|
10
|
-
declare function createPollingTriggerBindingFactory(config: any): (options: any) => any;
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/triggers/polling.d.ts
|
|
13
|
-
type Schedule = Parameters<typeof createPollingTriggerBindingFactory>[0]['schedule'];
|
|
14
|
-
type SnowflakeCredentialSets = readonly [typeof snowflakeCredentialSet];
|
|
15
|
-
type SnowflakePollingBoundTrigger<TResponse extends z.ZodTypeAny, TOutput = z.output<TResponse>> = BoundTrigger<z.output<TResponse>, SnowflakeCredentialSets, PollingTriggerManifest, TOutput>;
|
|
16
|
-
interface SnowflakePollingBindingOptions<TResponse extends z.ZodTypeAny, TOutput = z.output<TResponse>> extends IntegrationTriggerBindingOptions<z.output<TResponse>, TOutput> {
|
|
17
|
-
readonly schedule?: Schedule;
|
|
18
|
-
}
|
|
19
|
-
interface StreamHasNewRowsParams {
|
|
20
|
-
readonly streamName: string;
|
|
21
|
-
readonly database?: string;
|
|
22
|
-
readonly schema?: string;
|
|
23
|
-
readonly warehouse?: string;
|
|
24
|
-
readonly role?: string;
|
|
25
|
-
}
|
|
26
|
-
declare function streamHasNewRows<TOutput = z.output<typeof streamHasDataEventSchema>>(input: StreamHasNewRowsParams & SnowflakePollingBindingOptions<typeof streamHasDataEventSchema, TOutput>): SnowflakePollingBoundTrigger<typeof streamHasDataEventSchema, TOutput>;
|
|
27
|
-
interface StreamAppendOnlyParams {
|
|
28
|
-
readonly streamName: string;
|
|
29
|
-
readonly database?: string;
|
|
30
|
-
readonly schema?: string;
|
|
31
|
-
readonly warehouse?: string;
|
|
32
|
-
readonly role?: string;
|
|
33
|
-
readonly limit?: number;
|
|
34
|
-
/** Extra WHERE fragment appended after the default `METADATA$ACTION = 'INSERT'` clause. */
|
|
35
|
-
readonly where?: string;
|
|
36
|
-
}
|
|
37
|
-
declare function streamAppendOnly<TOutput = z.output<typeof streamAppendOnlyEventSchema>>(input: StreamAppendOnlyParams & SnowflakePollingBindingOptions<typeof streamAppendOnlyEventSchema, TOutput>): SnowflakePollingBoundTrigger<typeof streamAppendOnlyEventSchema, TOutput>;
|
|
38
|
-
interface ScheduledSqlParams {
|
|
39
|
-
readonly statement: string;
|
|
40
|
-
readonly warehouse?: string;
|
|
41
|
-
readonly role?: string;
|
|
42
|
-
readonly database?: string;
|
|
43
|
-
readonly schema?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Positional bindings for `?` placeholders in {@link statement}. Values
|
|
46
|
-
* flow through `BindingBuilder` (same type inference as `insertRow`).
|
|
47
|
-
*/
|
|
48
|
-
readonly bindings?: readonly RowValue[];
|
|
49
|
-
/** When true, emit even if the statement returns zero rows. Default false. */
|
|
50
|
-
readonly emitOnEmpty?: boolean;
|
|
51
|
-
}
|
|
52
|
-
declare function scheduledSql<TOutput = z.output<typeof scheduledSqlEventSchema>>(input: ScheduledSqlParams & SnowflakePollingBindingOptions<typeof scheduledSqlEventSchema, TOutput>): SnowflakePollingBoundTrigger<typeof scheduledSqlEventSchema, TOutput>;
|
|
53
|
-
interface ScheduledDeltaParams {
|
|
54
|
-
readonly table: string;
|
|
55
|
-
readonly cursorColumn: string;
|
|
56
|
-
readonly database?: string;
|
|
57
|
-
readonly schema?: string;
|
|
58
|
-
readonly warehouse?: string;
|
|
59
|
-
readonly role?: string;
|
|
60
|
-
readonly columns?: readonly string[];
|
|
61
|
-
/** Extra WHERE fragment appended to the high-water comparison. */
|
|
62
|
-
readonly where?: string;
|
|
63
|
-
readonly limit?: number;
|
|
64
|
-
/** Initial high-water value (used only on the first poll). */
|
|
65
|
-
readonly initialHighWater?: string | number;
|
|
66
|
-
}
|
|
67
|
-
declare function scheduledDelta<TOutput = z.output<typeof scheduledDeltaEventSchema>>(input: ScheduledDeltaParams & SnowflakePollingBindingOptions<typeof scheduledDeltaEventSchema, TOutput>): SnowflakePollingBoundTrigger<typeof scheduledDeltaEventSchema, TOutput>;
|
|
68
|
-
interface TaskRunCompletedParams {
|
|
69
|
-
readonly taskName?: string;
|
|
70
|
-
readonly database?: string;
|
|
71
|
-
readonly schema?: string;
|
|
72
|
-
readonly warehouse?: string;
|
|
73
|
-
readonly role?: string;
|
|
74
|
-
/** Initial lookback when no prior poll exists — defaults to 1 hour. */
|
|
75
|
-
readonly lookbackMinutes?: number;
|
|
76
|
-
/** Max rows per poll. Defaults to 200. */
|
|
77
|
-
readonly limit?: number;
|
|
78
|
-
/** Restrict to terminal states (default: `['SUCCEEDED', 'FAILED', 'FAILED_AND_AUTO_SUSPENDED', 'CANCELLED']`). */
|
|
79
|
-
readonly states?: readonly string[];
|
|
80
|
-
}
|
|
81
|
-
declare const taskRunEventsBatchSchema: z.ZodObject<{
|
|
82
|
-
events: z.ZodArray<z.ZodObject<{
|
|
83
|
-
name: z.ZodString;
|
|
84
|
-
databaseName: z.ZodOptional<z.ZodString>;
|
|
85
|
-
schemaName: z.ZodOptional<z.ZodString>;
|
|
86
|
-
state: z.ZodString;
|
|
87
|
-
queryId: z.ZodOptional<z.ZodString>;
|
|
88
|
-
scheduledTime: z.ZodOptional<z.ZodString>;
|
|
89
|
-
completedTime: z.ZodOptional<z.ZodString>;
|
|
90
|
-
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
-
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
attemptNumber: z.ZodOptional<z.ZodNumber>;
|
|
93
|
-
runId: z.ZodOptional<z.ZodString>;
|
|
94
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
95
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
96
|
-
highWaterValue: z.ZodNullable<z.ZodString>;
|
|
97
|
-
fetchedAt: z.ZodString;
|
|
98
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
99
|
-
declare function taskRunCompleted<TOutput = z.output<typeof taskRunEventsBatchSchema>>(input?: TaskRunCompletedParams & SnowflakePollingBindingOptions<typeof taskRunEventsBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof taskRunEventsBatchSchema, TOutput>;
|
|
100
|
-
interface StatementCompletedParams {
|
|
101
|
-
readonly warehouse?: string;
|
|
102
|
-
readonly role?: string;
|
|
103
|
-
readonly database?: string;
|
|
104
|
-
readonly schema?: string;
|
|
105
|
-
readonly userName?: string;
|
|
106
|
-
readonly queryTextLike?: string;
|
|
107
|
-
readonly lookbackMinutes?: number;
|
|
108
|
-
readonly limit?: number;
|
|
109
|
-
readonly executionStatuses?: readonly string[];
|
|
110
|
-
/** Set to `true` to include pending / running statements (default: terminal only). */
|
|
111
|
-
readonly includeInFlight?: boolean;
|
|
112
|
-
}
|
|
113
|
-
declare const statementCompletedBatchSchema: z.ZodObject<{
|
|
114
|
-
events: z.ZodArray<z.ZodObject<{
|
|
115
|
-
queryId: z.ZodString;
|
|
116
|
-
executionStatus: z.ZodString;
|
|
117
|
-
queryText: z.ZodOptional<z.ZodString>;
|
|
118
|
-
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
|
-
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
-
startTime: z.ZodOptional<z.ZodString>;
|
|
121
|
-
endTime: z.ZodOptional<z.ZodString>;
|
|
122
|
-
warehouseName: z.ZodOptional<z.ZodString>;
|
|
123
|
-
databaseName: z.ZodOptional<z.ZodString>;
|
|
124
|
-
schemaName: z.ZodOptional<z.ZodString>;
|
|
125
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
126
|
-
roleName: z.ZodOptional<z.ZodString>;
|
|
127
|
-
totalElapsedTimeMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
128
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
129
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
130
|
-
highWaterValue: z.ZodNullable<z.ZodString>;
|
|
131
|
-
fetchedAt: z.ZodString;
|
|
132
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
133
|
-
declare function statementCompleted<TOutput = z.output<typeof statementCompletedBatchSchema>>(input?: StatementCompletedParams & SnowflakePollingBindingOptions<typeof statementCompletedBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof statementCompletedBatchSchema, TOutput>;
|
|
134
|
-
interface PipeLoadParams {
|
|
135
|
-
readonly pipeName?: string;
|
|
136
|
-
readonly database?: string;
|
|
137
|
-
readonly schema?: string;
|
|
138
|
-
readonly tableName?: string;
|
|
139
|
-
readonly warehouse?: string;
|
|
140
|
-
readonly role?: string;
|
|
141
|
-
readonly lookbackMinutes?: number;
|
|
142
|
-
readonly limit?: number;
|
|
143
|
-
}
|
|
144
|
-
declare const pipeLoadBatchSchema: z.ZodObject<{
|
|
145
|
-
events: z.ZodArray<z.ZodObject<{
|
|
146
|
-
pipeName: z.ZodString;
|
|
147
|
-
filePath: z.ZodString;
|
|
148
|
-
status: z.ZodString;
|
|
149
|
-
loadTime: z.ZodOptional<z.ZodString>;
|
|
150
|
-
rowCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
151
|
-
rowParsed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
152
|
-
errorLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
153
|
-
errorsSeen: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
154
|
-
firstErrorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
|
-
firstErrorLineNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
156
|
-
firstErrorColumnName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
157
|
-
fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
158
|
-
stageLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
160
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
161
|
-
highWaterValue: z.ZodNullable<z.ZodString>;
|
|
162
|
-
fetchedAt: z.ZodString;
|
|
163
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
164
|
-
declare function pipeLoadCompleted<TOutput = z.output<typeof pipeLoadBatchSchema>>(input?: PipeLoadParams & SnowflakePollingBindingOptions<typeof pipeLoadBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof pipeLoadBatchSchema, TOutput>;
|
|
165
|
-
declare function pipeLoadFailed<TOutput = z.output<typeof pipeLoadBatchSchema>>(input?: PipeLoadParams & SnowflakePollingBindingOptions<typeof pipeLoadBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof pipeLoadBatchSchema, TOutput>;
|
|
166
|
-
interface LifecycleParams {
|
|
167
|
-
readonly database?: string;
|
|
168
|
-
readonly schema?: string;
|
|
169
|
-
readonly warehouse?: string;
|
|
170
|
-
readonly role?: string;
|
|
171
|
-
readonly like?: string;
|
|
172
|
-
/** Surface every currently-present row on the first poll. Default false. */
|
|
173
|
-
readonly emitInitialSnapshot?: boolean;
|
|
174
|
-
}
|
|
175
|
-
interface LifecycleTableParams extends LifecycleParams {
|
|
176
|
-
readonly in?: {
|
|
177
|
-
readonly database?: string;
|
|
178
|
-
readonly schema?: string;
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
declare const lifecycleBatchSchema: z.ZodObject<{
|
|
182
|
-
events: z.ZodArray<z.ZodObject<{
|
|
183
|
-
kind: z.ZodString;
|
|
184
|
-
name: z.ZodString;
|
|
185
|
-
change: z.ZodEnum<{
|
|
186
|
-
created: "created";
|
|
187
|
-
dropped: "dropped";
|
|
188
|
-
}>;
|
|
189
|
-
identity: z.ZodString;
|
|
190
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
191
|
-
createdOn: z.ZodOptional<z.ZodString>;
|
|
192
|
-
detectedAt: z.ZodString;
|
|
193
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
194
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
195
|
-
snapshot: z.ZodArray<z.ZodObject<{
|
|
196
|
-
identity: z.ZodString;
|
|
197
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
198
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
199
|
-
fetchedAt: z.ZodString;
|
|
200
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
201
|
-
declare function userCreated<TOutput = z.output<typeof lifecycleBatchSchema>>(input?: LifecycleParams & SnowflakePollingBindingOptions<typeof lifecycleBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof lifecycleBatchSchema, TOutput>;
|
|
202
|
-
declare function userDropped<TOutput = z.output<typeof lifecycleBatchSchema>>(input?: LifecycleParams & SnowflakePollingBindingOptions<typeof lifecycleBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof lifecycleBatchSchema, TOutput>;
|
|
203
|
-
declare function roleCreated<TOutput = z.output<typeof lifecycleBatchSchema>>(input?: LifecycleParams & SnowflakePollingBindingOptions<typeof lifecycleBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof lifecycleBatchSchema, TOutput>;
|
|
204
|
-
declare function roleDropped<TOutput = z.output<typeof lifecycleBatchSchema>>(input?: LifecycleParams & SnowflakePollingBindingOptions<typeof lifecycleBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof lifecycleBatchSchema, TOutput>;
|
|
205
|
-
declare function databaseCreated<TOutput = z.output<typeof lifecycleBatchSchema>>(input?: LifecycleParams & SnowflakePollingBindingOptions<typeof lifecycleBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof lifecycleBatchSchema, TOutput>;
|
|
206
|
-
declare function databaseDropped<TOutput = z.output<typeof lifecycleBatchSchema>>(input?: LifecycleParams & SnowflakePollingBindingOptions<typeof lifecycleBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof lifecycleBatchSchema, TOutput>;
|
|
207
|
-
declare function tableCreated<TOutput = z.output<typeof lifecycleBatchSchema>>(input?: LifecycleTableParams & SnowflakePollingBindingOptions<typeof lifecycleBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof lifecycleBatchSchema, TOutput>;
|
|
208
|
-
declare function tableDropped<TOutput = z.output<typeof lifecycleBatchSchema>>(input?: LifecycleTableParams & SnowflakePollingBindingOptions<typeof lifecycleBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof lifecycleBatchSchema, TOutput>;
|
|
209
|
-
interface ShareChangedParams {
|
|
210
|
-
readonly warehouse?: string;
|
|
211
|
-
readonly role?: string;
|
|
212
|
-
readonly like?: string;
|
|
213
|
-
readonly emitInitialSnapshot?: boolean;
|
|
214
|
-
}
|
|
215
|
-
declare const shareChangedBatchSchema: z.ZodObject<{
|
|
216
|
-
events: z.ZodArray<z.ZodObject<{
|
|
217
|
-
name: z.ZodString;
|
|
218
|
-
kind: z.ZodOptional<z.ZodString>;
|
|
219
|
-
change: z.ZodEnum<{
|
|
220
|
-
created: "created";
|
|
221
|
-
dropped: "dropped";
|
|
222
|
-
modified: "modified";
|
|
223
|
-
}>;
|
|
224
|
-
identity: z.ZodString;
|
|
225
|
-
detectedAt: z.ZodString;
|
|
226
|
-
previousRow: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
227
|
-
currentRow: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
228
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
229
|
-
snapshot: z.ZodArray<z.ZodObject<{
|
|
230
|
-
identity: z.ZodString;
|
|
231
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
232
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
233
|
-
fetchedAt: z.ZodString;
|
|
234
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
235
|
-
declare function shareChanged<TOutput = z.output<typeof shareChangedBatchSchema>>(input?: ShareChangedParams & SnowflakePollingBindingOptions<typeof shareChangedBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof shareChangedBatchSchema, TOutput>;
|
|
236
|
-
interface GrantsChangedParams {
|
|
237
|
-
readonly grantee: {
|
|
238
|
-
readonly role: string;
|
|
239
|
-
} | {
|
|
240
|
-
readonly user: string;
|
|
241
|
-
} | {
|
|
242
|
-
readonly share: string;
|
|
243
|
-
};
|
|
244
|
-
readonly warehouse?: string;
|
|
245
|
-
readonly sessionRole?: string;
|
|
246
|
-
}
|
|
247
|
-
declare const grantsChangedBatchSchema: z.ZodObject<{
|
|
248
|
-
events: z.ZodArray<z.ZodObject<{
|
|
249
|
-
privilege: z.ZodString;
|
|
250
|
-
grantedOn: z.ZodString;
|
|
251
|
-
objectName: z.ZodString;
|
|
252
|
-
granteeName: z.ZodString;
|
|
253
|
-
granteeType: z.ZodOptional<z.ZodString>;
|
|
254
|
-
change: z.ZodEnum<{
|
|
255
|
-
granted: "granted";
|
|
256
|
-
revoked: "revoked";
|
|
257
|
-
}>;
|
|
258
|
-
identity: z.ZodString;
|
|
259
|
-
detectedAt: z.ZodString;
|
|
260
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
261
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
262
|
-
snapshot: z.ZodArray<z.ZodObject<{
|
|
263
|
-
identity: z.ZodString;
|
|
264
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
265
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
266
|
-
fetchedAt: z.ZodString;
|
|
267
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
268
|
-
declare function grantsChanged<TOutput = z.output<typeof grantsChangedBatchSchema>>(input: GrantsChangedParams & SnowflakePollingBindingOptions<typeof grantsChangedBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof grantsChangedBatchSchema, TOutput>;
|
|
269
|
-
interface WarehouseMetricsParams {
|
|
270
|
-
readonly warehouseName?: string;
|
|
271
|
-
readonly warehouse?: string;
|
|
272
|
-
readonly role?: string;
|
|
273
|
-
readonly database?: string;
|
|
274
|
-
readonly schema?: string;
|
|
275
|
-
readonly lookbackMinutes?: number;
|
|
276
|
-
readonly limit?: number;
|
|
277
|
-
/** Emit only when the threshold field exceeds this value (inclusive). */
|
|
278
|
-
readonly minimum?: number;
|
|
279
|
-
}
|
|
280
|
-
declare const warehouseCreditsBatchSchema: z.ZodObject<{
|
|
281
|
-
events: z.ZodArray<z.ZodObject<{
|
|
282
|
-
warehouseName: z.ZodString;
|
|
283
|
-
startTime: z.ZodOptional<z.ZodString>;
|
|
284
|
-
endTime: z.ZodOptional<z.ZodString>;
|
|
285
|
-
creditsUsed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
286
|
-
creditsUsedCompute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
287
|
-
creditsUsedCloudServices: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
288
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
289
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
290
|
-
highWaterValue: z.ZodNullable<z.ZodString>;
|
|
291
|
-
fetchedAt: z.ZodString;
|
|
292
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
293
|
-
declare const warehouseQueueBatchSchema: z.ZodObject<{
|
|
294
|
-
events: z.ZodArray<z.ZodObject<{
|
|
295
|
-
warehouseName: z.ZodString;
|
|
296
|
-
startTime: z.ZodOptional<z.ZodString>;
|
|
297
|
-
endTime: z.ZodOptional<z.ZodString>;
|
|
298
|
-
avgRunning: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
299
|
-
avgQueuedLoad: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
300
|
-
avgQueuedProvisioning: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
301
|
-
avgBlocked: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
302
|
-
row: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
303
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
304
|
-
highWaterValue: z.ZodNullable<z.ZodString>;
|
|
305
|
-
fetchedAt: z.ZodString;
|
|
306
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
307
|
-
declare function warehouseCreditsUsage<TOutput = z.output<typeof warehouseCreditsBatchSchema>>(input?: WarehouseMetricsParams & SnowflakePollingBindingOptions<typeof warehouseCreditsBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof warehouseCreditsBatchSchema, TOutput>;
|
|
308
|
-
declare function warehouseQueueDepth<TOutput = z.output<typeof warehouseQueueBatchSchema>>(input?: WarehouseMetricsParams & SnowflakePollingBindingOptions<typeof warehouseQueueBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof warehouseQueueBatchSchema, TOutput>;
|
|
309
|
-
interface StatusPagePollingParams extends StatusPageOptions {
|
|
310
|
-
readonly emitInitialSnapshot?: boolean;
|
|
311
|
-
}
|
|
312
|
-
declare const statusPageIncidentBatchSchema: z.ZodObject<{
|
|
313
|
-
events: z.ZodArray<z.ZodObject<{
|
|
314
|
-
id: z.ZodString;
|
|
315
|
-
name: z.ZodString;
|
|
316
|
-
status: z.ZodString;
|
|
317
|
-
impact: z.ZodOptional<z.ZodString>;
|
|
318
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
319
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
320
|
-
resolvedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
321
|
-
shortlink: z.ZodOptional<z.ZodString>;
|
|
322
|
-
detectedAt: z.ZodString;
|
|
323
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
324
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
325
|
-
snapshot: z.ZodArray<z.ZodObject<{
|
|
326
|
-
identity: z.ZodString;
|
|
327
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
328
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
329
|
-
fetchedAt: z.ZodString;
|
|
330
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
331
|
-
declare const statusPageComponentChangeBatchSchema: z.ZodObject<{
|
|
332
|
-
events: z.ZodArray<z.ZodObject<{
|
|
333
|
-
id: z.ZodString;
|
|
334
|
-
name: z.ZodString;
|
|
335
|
-
previousStatus: z.ZodNullable<z.ZodString>;
|
|
336
|
-
currentStatus: z.ZodString;
|
|
337
|
-
description: z.ZodOptional<z.ZodString>;
|
|
338
|
-
changedAt: z.ZodString;
|
|
339
|
-
detectedAt: z.ZodString;
|
|
340
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
341
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
342
|
-
snapshot: z.ZodArray<z.ZodObject<{
|
|
343
|
-
identity: z.ZodString;
|
|
344
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
345
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
346
|
-
fetchedAt: z.ZodString;
|
|
347
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
348
|
-
/**
|
|
349
|
-
* Status-page pollers don't need Snowflake credentials, but they still
|
|
350
|
-
* flow through the Snowflake binding factory so they show up in the
|
|
351
|
-
* polling manifest alongside the rest. Credentials are declared but
|
|
352
|
-
* unused — the poll callback ignores `ctx.credentials['snowflake']`.
|
|
353
|
-
*/
|
|
354
|
-
declare function statusPageIncident<TOutput = z.output<typeof statusPageIncidentBatchSchema>>(input?: StatusPagePollingParams & SnowflakePollingBindingOptions<typeof statusPageIncidentBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof statusPageIncidentBatchSchema, TOutput>;
|
|
355
|
-
declare function statusPageComponentChanged<TOutput = z.output<typeof statusPageComponentChangeBatchSchema>>(input?: StatusPagePollingParams & SnowflakePollingBindingOptions<typeof statusPageComponentChangeBatchSchema, TOutput>): SnowflakePollingBoundTrigger<typeof statusPageComponentChangeBatchSchema, TOutput>;
|
|
356
|
-
declare const polling: Readonly<{
|
|
357
|
-
streamHasNewRows: typeof streamHasNewRows;
|
|
358
|
-
streamAppendOnly: typeof streamAppendOnly;
|
|
359
|
-
scheduledSql: typeof scheduledSql;
|
|
360
|
-
scheduledDelta: typeof scheduledDelta;
|
|
361
|
-
taskRunCompleted: typeof taskRunCompleted;
|
|
362
|
-
statementCompleted: typeof statementCompleted;
|
|
363
|
-
pipeLoadCompleted: typeof pipeLoadCompleted;
|
|
364
|
-
pipeLoadFailed: typeof pipeLoadFailed;
|
|
365
|
-
userCreated: typeof userCreated;
|
|
366
|
-
userDropped: typeof userDropped;
|
|
367
|
-
roleCreated: typeof roleCreated;
|
|
368
|
-
roleDropped: typeof roleDropped;
|
|
369
|
-
databaseCreated: typeof databaseCreated;
|
|
370
|
-
databaseDropped: typeof databaseDropped;
|
|
371
|
-
tableCreated: typeof tableCreated;
|
|
372
|
-
tableDropped: typeof tableDropped;
|
|
373
|
-
shareChanged: typeof shareChanged;
|
|
374
|
-
grantsChanged: typeof grantsChanged;
|
|
375
|
-
warehouseCreditsUsage: typeof warehouseCreditsUsage;
|
|
376
|
-
warehouseQueueDepth: typeof warehouseQueueDepth;
|
|
377
|
-
statusPageIncident: typeof statusPageIncident;
|
|
378
|
-
statusPageComponentChanged: typeof statusPageComponentChanged;
|
|
379
|
-
}>;
|
|
380
|
-
//#endregion
|
|
381
|
-
export { databaseCreated, databaseDropped, grantsChanged, pipeLoadCompleted, pipeLoadFailed, polling, roleCreated, roleDropped, scheduledDelta, scheduledSql, shareChanged, statementCompleted, statusPageComponentChanged, statusPageIncident, streamAppendOnly, streamHasNewRows, tableCreated, tableDropped, taskRunCompleted, userCreated, userDropped, warehouseCreditsUsage, warehouseQueueDepth };
|