@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.
Files changed (86) hide show
  1. package/README.md +3 -9
  2. package/dist/{accounts.d.mts → accounts/index.d.mts} +3 -3
  3. package/dist/{accounts.mjs → accounts/index.mjs} +3 -3
  4. package/dist/{bulk.d.mts → bulk/index.d.mts} +6 -6
  5. package/dist/{bulk.mjs → bulk/index.mjs} +5 -5
  6. package/dist/{catalog.d.mts → catalog/index.d.mts} +3 -3
  7. package/dist/{catalog.mjs → catalog/index.mjs} +3 -3
  8. package/dist/{client.d.mts → client/index.d.mts} +3 -3
  9. package/dist/{client.mjs → client/index.mjs} +4 -4
  10. package/dist/credential-sets/index.d.mts +3 -0
  11. package/dist/credential-sets/index.mjs +4 -0
  12. package/dist/{databases.d.mts → databases/index.d.mts} +1 -1
  13. package/dist/databases/index.mjs +3 -0
  14. package/dist/{events.d.mts → events/index.d.mts} +1 -1
  15. package/dist/{events.mjs → events/index.mjs} +2 -2
  16. package/dist/{file-formats.d.mts → file-formats/index.d.mts} +5 -5
  17. package/dist/{file-formats.mjs → file-formats/index.mjs} +5 -5
  18. package/dist/{functions.d.mts → functions/index.d.mts} +5 -5
  19. package/dist/{functions.mjs → functions/index.mjs} +5 -5
  20. package/dist/{grants.d.mts → grants/index.d.mts} +3 -3
  21. package/dist/{grants.mjs → grants/index.mjs} +4 -4
  22. package/dist/index.d.mts +4 -1
  23. package/dist/index.mjs +6 -1
  24. package/dist/{org-admin.d.mts → org-admin/index.d.mts} +4 -4
  25. package/dist/{org-admin.mjs → org-admin/index.mjs} +4 -4
  26. package/dist/{pipes.d.mts → pipes/index.d.mts} +4 -4
  27. package/dist/{pipes.mjs → pipes/index.mjs} +4 -4
  28. package/dist/{procedures.d.mts → procedures/index.d.mts} +7 -7
  29. package/dist/{procedures.mjs → procedures/index.mjs} +6 -6
  30. package/dist/{results.d.mts → results/index.d.mts} +2 -2
  31. package/dist/{results.mjs → results/index.mjs} +1 -1
  32. package/dist/{roles.d.mts → roles/index.d.mts} +4 -4
  33. package/dist/{roles.mjs → roles/index.mjs} +5 -5
  34. package/dist/{rows.d.mts → rows/index.d.mts} +3 -3
  35. package/dist/{rows.mjs → rows/index.mjs} +3 -3
  36. package/dist/schemas/index.mjs +2 -2
  37. package/dist/{schemas-catalog.d.mts → schemas-catalog/index.d.mts} +1 -1
  38. package/dist/schemas-catalog/index.mjs +3 -0
  39. package/dist/{shares.d.mts → shares/index.d.mts} +4 -4
  40. package/dist/{shares.mjs → shares/index.mjs} +4 -4
  41. package/dist/snowflake-s3-sns-webhook.credential-set-D6bLAWy5.d.mts +50 -0
  42. package/dist/snowflake-s3-sns-webhook.credential-set-DzR7oWNK.mjs +44 -0
  43. package/dist/{integration-86b6WaJF.d.mts → snowflake.credential-set-BxT7Gf3A.d.mts} +36 -92
  44. package/dist/snowflake.credential-set-DE3gXf-a.mjs +106 -0
  45. package/dist/{sql.d.mts → sql/index.d.mts} +3 -3
  46. package/dist/{sql.mjs → sql/index.mjs} +4 -4
  47. package/dist/{sql-options-DI-OmLU6.mjs → sql-options-D6GEa21F.mjs} +1 -1
  48. package/dist/{stages.d.mts → stages/index.d.mts} +6 -6
  49. package/dist/{stages.mjs → stages/index.mjs} +5 -5
  50. package/dist/{statements-B2ThF_4b.mjs → statements-BumhMhN4.mjs} +1 -1
  51. package/dist/{status-page.d.mts → status-page/index.d.mts} +1 -1
  52. package/dist/{status-page.mjs → status-page/index.mjs} +1 -1
  53. package/dist/{streaming.d.mts → streaming/index.d.mts} +2 -2
  54. package/dist/{streaming.mjs → streaming/index.mjs} +1 -1
  55. package/dist/{streams.d.mts → streams/index.d.mts} +5 -5
  56. package/dist/{streams.mjs → streams/index.mjs} +5 -5
  57. package/dist/{tables.d.mts → tables/index.d.mts} +1 -1
  58. package/dist/{tables.mjs → tables/index.mjs} +1 -1
  59. package/dist/{tasks.d.mts → tasks/index.d.mts} +5 -5
  60. package/dist/{tasks.mjs → tasks/index.mjs} +5 -5
  61. package/dist/{triggers.d.mts → triggers/index.d.mts} +6 -6
  62. package/dist/{triggers.mjs → triggers/index.mjs} +10 -11
  63. package/dist/{users.d.mts → users/index.d.mts} +5 -5
  64. package/dist/{users.mjs → users/index.mjs} +5 -5
  65. package/dist/{verification.d.mts → verification/index.d.mts} +2 -2
  66. package/dist/{verification.mjs → verification/index.mjs} +2 -2
  67. package/dist/views/index.d.mts +2 -0
  68. package/dist/views/index.mjs +3 -0
  69. package/dist/{warehouses.d.mts → warehouses/index.d.mts} +5 -5
  70. package/dist/{warehouses.mjs → warehouses/index.mjs} +5 -5
  71. package/package.json +14 -18
  72. package/dist/_official/index.d.mts +0 -2
  73. package/dist/_official/index.mjs +0 -3
  74. package/dist/connection.d.mts +0 -2
  75. package/dist/connection.mjs +0 -3
  76. package/dist/databases.mjs +0 -3
  77. package/dist/integration-DNMbfXEy.mjs +0 -251
  78. package/dist/schemas-catalog.mjs +0 -3
  79. package/dist/views.d.mts +0 -2
  80. package/dist/views.mjs +0 -3
  81. /package/dist/{common-BnKTPQXc.mjs → common-DfpCwJx5.mjs} +0 -0
  82. /package/dist/{errors-DKnc9o_a.mjs → errors-60AsF7Su.mjs} +0 -0
  83. /package/dist/{_runtime → operations}/index.d.mts +0 -0
  84. /package/dist/{_runtime → operations}/index.mjs +0 -0
  85. /package/dist/{retry-0hMfb8cC.mjs → retry-B4-9MZIp.mjs} +0 -0
  86. /package/dist/{sql-safety-CywdR3EP.mjs → sql-safety-BZpAPsq6.mjs} +0 -0
package/README.md CHANGED
@@ -28,7 +28,7 @@ Shared required fields: `SNOWFLAKE_ACCOUNT`, plus `SNOWFLAKE_USER` for any non-O
28
28
  Example vault values for key-pair mode:
29
29
 
30
30
  ```ts
31
- import type { SnowflakeCredentials } from '@keystrokehq/snowflake/connection';
31
+ import type { SnowflakeCredentials } from '@keystrokehq/snowflake/credential-sets';
32
32
 
33
33
  const credentials: SnowflakeCredentials = {
34
34
  mode: 'keypair',
@@ -212,7 +212,8 @@ try {
212
212
 
213
213
  ## Public surface
214
214
 
215
- - `@keystrokehq/snowflake/connection` — `snowflake` credential set, `snowflakeBundle`, and credential types.
215
+ - `@keystrokehq/snowflake/credential-sets` — `snowflakeCredentialSet`, platform-only auto-ingest webhook credential sets, auth schemas, and credential types.
216
+ - `@keystrokehq/snowflake/operations` — catalog operation barrel (empty today; trigger-only package).
216
217
  - `@keystrokehq/snowflake/client` — `createSnowflakeClient(credentials, options?)` for direct SQL API access.
217
218
  - `@keystrokehq/snowflake/schemas` — shared Zod schemas (statements, results, pipes, catalog, and more).
218
219
  - `@keystrokehq/snowflake/events` — curated Zod event contracts emitted by each trigger.
@@ -229,13 +230,6 @@ try {
229
230
  - `pipes`, `streaming`, `bulk` — Snowpipe file REST, Snowpipe Streaming channels, stage-oriented bulk helpers.
230
231
  - `status-page` — Composio-parity Snowflake status page endpoints.
231
232
 
232
- ### Internal repo-only surfaces
233
-
234
- - `@keystrokehq/snowflake/_official`
235
- - `@keystrokehq/snowflake/_runtime`
236
-
237
- Do not import these from end-user code.
238
-
239
233
  ## Safety
240
234
 
241
235
  - Destructive DDL operations (`dropTable`, `dropDatabase`, `dropSchema`, `dropUser`, `dropRole`, `dropWarehouse`, `dropShare`, etc.) require an explicit `confirm: true` input and are marked `needsApproval: true` where surfaced through the operation factory.
@@ -1,6 +1,6 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { d as HydratedRow, m as ColumnMeta } from "./statements-DJL0qVNA.mjs";
3
- //#region src/accounts.d.ts
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { d as HydratedRow, m as ColumnMeta } from "../statements-DJL0qVNA.mjs";
3
+ //#region src/accounts/index.d.ts
4
4
  interface AccountContext {
5
5
  readonly warehouse?: string;
6
6
  readonly role?: string;
@@ -1,7 +1,7 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { i as quoteIdentifier, r as likeClause } from "./sql-safety-CywdR3EP.mjs";
1
+ import { executeSql } from "../sql/index.mjs";
2
+ import { i as quoteIdentifier, r as likeClause } from "../sql-safety-BZpAPsq6.mjs";
3
3
 
4
- //#region src/accounts.ts
4
+ //#region src/accounts/index.ts
5
5
  /**
6
6
  * Returns a single-row identity snapshot for the account that the
7
7
  * current connection is bound to. Useful as a "whoami" / health probe.
@@ -1,10 +1,10 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { d as HydratedRow } from "./statements-DJL0qVNA.mjs";
3
- import { ExecuteSqlResult } from "./sql.mjs";
4
- import { t as OptionMap } from "./sql-options-2k5xQ-oS.mjs";
5
- import { StageRef } from "./stages.mjs";
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 { StageRef } from "../stages/index.mjs";
6
6
 
7
- //#region src/bulk.d.ts
7
+ //#region src/bulk/index.d.ts
8
8
  interface TableRef {
9
9
  readonly database?: string;
10
10
  readonly schema?: string;
@@ -1,9 +1,9 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { a as quoteLiteral, t as buildFqn } from "./sql-safety-CywdR3EP.mjs";
3
- import { n as renderOptionGroup, t as formatOptions } from "./sql-options-DI-OmLU6.mjs";
4
- import { stagePath } from "./stages.mjs";
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 { stagePath } from "../stages/index.mjs";
5
5
 
6
- //#region src/bulk.ts
6
+ //#region src/bulk/index.ts
7
7
  function tableFqn(ref) {
8
8
  return buildFqn(ref.database, ref.schema, ref.table);
9
9
  }
@@ -1,6 +1,6 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { d as HydratedRow } from "./statements-DJL0qVNA.mjs";
3
- //#region src/catalog.d.ts
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { d as HydratedRow } from "../statements-DJL0qVNA.mjs";
3
+ //#region src/catalog/index.d.ts
4
4
  interface ShowOptions {
5
5
  /** Optional `LIKE '<pattern>'` filter. Escaped via {@link quoteLiteral}. */
6
6
  readonly like?: string;
@@ -1,7 +1,7 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { i as quoteIdentifier, n as inClause, r as likeClause, t as buildFqn } from "./sql-safety-CywdR3EP.mjs";
1
+ import { executeSql } from "../sql/index.mjs";
2
+ import { i as quoteIdentifier, n as inClause, r as likeClause, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
3
3
 
4
- //#region src/catalog.ts
4
+ //#region src/catalog/index.ts
5
5
  function limitClause(limit) {
6
6
  return limit && limit > 0 ? ` LIMIT ${Math.floor(limit)}` : "";
7
7
  }
@@ -1,7 +1,7 @@
1
- import { n as SnowflakeCredentials } from "./integration-86b6WaJF.mjs";
2
- import { t as RetryPolicy } from "./retry-w7cTp1QL.mjs";
1
+ import { n as SnowflakeCredentials } from "../snowflake.credential-set-BxT7Gf3A.mjs";
2
+ import { t as RetryPolicy } from "../retry-w7cTp1QL.mjs";
3
3
 
4
- //#region src/client.d.ts
4
+ //#region src/client/index.d.ts
5
5
  type SnowflakeAuthTokenType = 'KEYPAIR_JWT' | 'OAUTH' | 'PROGRAMMATIC_ACCESS_TOKEN' | 'BASIC';
6
6
  type SnowflakeHttpMethod = 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT';
7
7
  type QueryPrimitive = string | number | boolean;
@@ -1,8 +1,8 @@
1
- import { t as parseSnowflakeCredentials } from "./integration-DNMbfXEy.mjs";
2
- import { a as extractSnowflakeMessage, c as parseRetryAfterHeader, i as extractSnowflakeCode, n as SnowflakeSqlError, o as extractSnowflakeSqlState, r as classifySnowflakeHttpStatus, s as extractSnowflakeStatementHandle, t as SnowflakeApiError } from "./errors-DKnc9o_a.mjs";
3
- import { a as createSnowflakeJwt, i as shouldRetry, n as computeBackoffMs, r as defaultSleep, t as DEFAULT_RETRY_POLICY } from "./retry-0hMfb8cC.mjs";
1
+ import { t as parseSnowflakeCredentials } from "../snowflake.credential-set-DE3gXf-a.mjs";
2
+ import { a as extractSnowflakeMessage, c as parseRetryAfterHeader, i as extractSnowflakeCode, n as SnowflakeSqlError, o as extractSnowflakeSqlState, r as classifySnowflakeHttpStatus, s as extractSnowflakeStatementHandle, t as SnowflakeApiError } from "../errors-60AsF7Su.mjs";
3
+ import { a as createSnowflakeJwt, i as shouldRetry, n as computeBackoffMs, r as defaultSleep, t as DEFAULT_RETRY_POLICY } from "../retry-B4-9MZIp.mjs";
4
4
 
5
- //#region src/client.ts
5
+ //#region src/client/index.ts
6
6
  /**
7
7
  * Core HTTP client for the Snowflake integration.
8
8
  *
@@ -0,0 +1,3 @@
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 };
@@ -0,0 +1,4 @@
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 };
@@ -1,2 +1,2 @@
1
- import { CatalogResult, FindDatabasesOptions, ShowDatabasesOptions, findDatabases, showDatabases } from "./catalog.mjs";
1
+ import { CatalogResult, FindDatabasesOptions, ShowDatabasesOptions, findDatabases, showDatabases } from "../catalog/index.mjs";
2
2
  export { type CatalogResult, type FindDatabasesOptions, type ShowDatabasesOptions, findDatabases, showDatabases };
@@ -0,0 +1,3 @@
1
+ import { findDatabases, showDatabases } from "../catalog/index.mjs";
2
+
3
+ export { findDatabases, showDatabases };
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
 
3
- //#region src/events.d.ts
3
+ //#region src/events/index.d.ts
4
4
  /**
5
5
  * Row batch shape used by the SQL-emitting polling triggers.
6
6
  *
@@ -1,7 +1,7 @@
1
- import { o as snowflakeObjectRowSchema, t as columnMetaSchema } from "./common-BnKTPQXc.mjs";
1
+ import { o as snowflakeObjectRowSchema, t as columnMetaSchema } from "../common-DfpCwJx5.mjs";
2
2
  import { z } from "zod";
3
3
 
4
- //#region src/events.ts
4
+ //#region src/events/index.ts
5
5
  /**
6
6
  * Trigger event contracts — Zod schemas for the payload shapes that
7
7
  * `src/triggers.ts` emits. Every polling trigger returns exactly one of
@@ -1,9 +1,9 @@
1
- import { SnowflakeClient } from "./client.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, showFileFormats } from "./catalog.mjs";
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, showFileFormats } from "../catalog/index.mjs";
5
5
 
6
- //#region src/file-formats.d.ts
6
+ //#region src/file-formats/index.d.ts
7
7
  interface FileFormatRef {
8
8
  readonly database?: string;
9
9
  readonly schema?: string;
@@ -1,9 +1,9 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { a as quoteLiteral, t as buildFqn } from "./sql-safety-CywdR3EP.mjs";
3
- import { t as formatOptions } from "./sql-options-DI-OmLU6.mjs";
4
- import { showFileFormats } from "./catalog.mjs";
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 { showFileFormats } from "../catalog/index.mjs";
5
5
 
6
- //#region src/file-formats.ts
6
+ //#region src/file-formats/index.ts
7
7
  function fileFormatFqn(ref) {
8
8
  return buildFqn(ref.database, ref.schema, ref.name);
9
9
  }
@@ -1,9 +1,9 @@
1
- import { SnowflakeClient } from "./client.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, showFunctions } from "./catalog.mjs";
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, showFunctions } from "../catalog/index.mjs";
5
5
 
6
- //#region src/functions.d.ts
6
+ //#region src/functions/index.d.ts
7
7
  interface FunctionRef {
8
8
  readonly database?: string;
9
9
  readonly schema?: string;
@@ -1,9 +1,9 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { a as quoteLiteral, t as buildFqn } from "./sql-safety-CywdR3EP.mjs";
3
- import { t as formatOptions } from "./sql-options-DI-OmLU6.mjs";
4
- import { showFunctions } from "./catalog.mjs";
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 { showFunctions } from "../catalog/index.mjs";
5
5
 
6
- //#region src/functions.ts
6
+ //#region src/functions/index.ts
7
7
  function renderArguments(args) {
8
8
  if (!args || args.length === 0) return "()";
9
9
  return `(${args.map((a) => {
@@ -1,7 +1,7 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { CatalogResult, ShowOptions, showGrants } from "./catalog.mjs";
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { CatalogResult, ShowOptions, showGrants } from "../catalog/index.mjs";
3
3
 
4
- //#region src/grants.d.ts
4
+ //#region src/grants/index.d.ts
5
5
  interface GrantContext {
6
6
  readonly warehouse?: string;
7
7
  readonly role?: string;
@@ -1,8 +1,8 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { i as quoteIdentifier, t as buildFqn } from "./sql-safety-CywdR3EP.mjs";
3
- import { showGrants } from "./catalog.mjs";
1
+ import { executeSql } from "../sql/index.mjs";
2
+ import { i as quoteIdentifier, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
3
+ import { showGrants } from "../catalog/index.mjs";
4
4
 
5
- //#region src/grants.ts
5
+ //#region src/grants/index.ts
6
6
  /**
7
7
  * Grants / privileges: GRANT, REVOKE, and five SHOW GRANTS convenience
8
8
  * wrappers plus SHOW FUTURE GRANTS.
package/dist/index.d.mts CHANGED
@@ -1 +1,4 @@
1
- export { };
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 { C as resultSetMetaDataSchema, D as sqlBindingValueSchema, E as snowflakeObjectRowSchema, O as sqlBindingsSchema, S as partitionInfoSchema, T as snowflakeIdentifier, _ as SnowflakeObjectRow, a as SubmitStatementInput, b as StatementContext, c as statementStatus, d as HydratedRow, f as PartitionResponse, g as ResultSetMetaData, h as PartitionInfo, i as StatementTerminalStatus, k as statementContextSchema, l as statementStatusCodeSchema, m as ColumnMeta, n as StatementResponse, o as cancelStatementResponseSchema, p as partitionResponseSchema, r as StatementStatus, s as statementResponseSchema, t as CancelStatementResponse, u as submitStatementInputSchema, v as SqlBinding, w as snowflakeFqn, x as columnMetaSchema, y as SqlBindings } from "./statements-DJL0qVNA.mjs";
3
+ 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";
4
+ export { CancelStatementResponse, ColumnMeta, HydratedRow, PartitionInfo, PartitionResponse, ResultSetMetaData, SnowflakeAuthMode, SnowflakeAzureEventGridWebhookCredentials, SnowflakeCredentials, SnowflakeGcsPubSubWebhookCredentials, SnowflakeObjectRow, SnowflakeS3SnsWebhookCredentials, SqlBinding, SqlBindings, StatementContext, StatementResponse, StatementStatus, StatementTerminalStatus, SubmitStatementInput, cancelStatementResponseSchema, columnMetaSchema, parseSnowflakeCredentials, partitionInfoSchema, partitionResponseSchema, resultSetMetaDataSchema, snowflakeAuthModeSchema, snowflakeAuthSchema, snowflakeAzureEventGridWebhookCredentialSet, snowflakeCredentialSet, snowflakeFqn, snowflakeGcsPubSubWebhookCredentialSet, snowflakeIdentifier, snowflakeObjectRowSchema, snowflakeS3SnsWebhookCredentialSet, sqlBindingValueSchema, sqlBindingsSchema, statementContextSchema, statementResponseSchema, statementStatus, statementStatusCodeSchema, submitStatementInputSchema };
package/dist/index.mjs CHANGED
@@ -1 +1,6 @@
1
- export { };
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
+ import { a as snowflakeIdentifier, c as sqlBindingsSchema, i as snowflakeFqn, l as statementContextSchema, n as partitionInfoSchema, o as snowflakeObjectRowSchema, r as resultSetMetaDataSchema, s as sqlBindingValueSchema, t as columnMetaSchema } from "./common-DfpCwJx5.mjs";
4
+ import { a as submitStatementInputSchema, i as statementStatusCodeSchema, n as statementResponseSchema, o as partitionResponseSchema, r as statementStatus, t as cancelStatementResponseSchema } from "./statements-BumhMhN4.mjs";
5
+
6
+ export { cancelStatementResponseSchema, columnMetaSchema, parseSnowflakeCredentials, partitionInfoSchema, partitionResponseSchema, resultSetMetaDataSchema, snowflakeAuthModeSchema, snowflakeAuthSchema, snowflakeAzureEventGridWebhookCredentialSet, snowflakeCredentialSet, snowflakeFqn, snowflakeGcsPubSubWebhookCredentialSet, snowflakeIdentifier, snowflakeObjectRowSchema, snowflakeS3SnsWebhookCredentialSet, sqlBindingValueSchema, sqlBindingsSchema, statementContextSchema, statementResponseSchema, statementStatus, statementStatusCodeSchema, submitStatementInputSchema };
@@ -1,8 +1,8 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { d as HydratedRow, m as ColumnMeta } from "./statements-DJL0qVNA.mjs";
3
- import { t as OptionMap } from "./sql-options-2k5xQ-oS.mjs";
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { d as HydratedRow, m as ColumnMeta } from "../statements-DJL0qVNA.mjs";
3
+ import { t as OptionMap } from "../sql-options-2k5xQ-oS.mjs";
4
4
 
5
- //#region src/org-admin.d.ts
5
+ //#region src/org-admin/index.d.ts
6
6
  interface OrgAdminContext {
7
7
  readonly warehouse?: string;
8
8
  readonly role?: string;
@@ -1,8 +1,8 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { a as quoteLiteral, i as quoteIdentifier, r as likeClause } from "./sql-safety-CywdR3EP.mjs";
3
- import { t as formatOptions } from "./sql-options-DI-OmLU6.mjs";
1
+ import { executeSql } from "../sql/index.mjs";
2
+ import { a as quoteLiteral, i as quoteIdentifier, r as likeClause } from "../sql-safety-BZpAPsq6.mjs";
3
+ import { t as formatOptions } from "../sql-options-D6GEa21F.mjs";
4
4
 
5
- //#region src/org-admin.ts
5
+ //#region src/org-admin/index.ts
6
6
  /**
7
7
  * `SHOW ORGANIZATION ACCOUNTS`. Lists every account in the org (ORGADMIN
8
8
  * only).
@@ -1,8 +1,8 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { d as HydratedRow } from "./statements-DJL0qVNA.mjs";
3
- import { CatalogResult, ShowScopedOptions, showPipes } from "./catalog.mjs";
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { d as HydratedRow } from "../statements-DJL0qVNA.mjs";
3
+ import { CatalogResult, ShowScopedOptions, showPipes } from "../catalog/index.mjs";
4
4
 
5
- //#region src/pipes.d.ts
5
+ //#region src/pipes/index.d.ts
6
6
  interface PipeRef {
7
7
  readonly database?: string;
8
8
  readonly schema?: string;
@@ -1,8 +1,8 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { a as quoteLiteral, i as quoteIdentifier, t as buildFqn } from "./sql-safety-CywdR3EP.mjs";
3
- import { showPipes } from "./catalog.mjs";
1
+ import { executeSql } from "../sql/index.mjs";
2
+ import { a as quoteLiteral, i as quoteIdentifier, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
3
+ import { showPipes } from "../catalog/index.mjs";
4
4
 
5
- //#region src/pipes.ts
5
+ //#region src/pipes/index.ts
6
6
  function pipeFqn(ref) {
7
7
  return buildFqn(ref.database, ref.schema, ref.name);
8
8
  }
@@ -1,11 +1,11 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { d as HydratedRow, v as SqlBinding } from "./statements-DJL0qVNA.mjs";
3
- import { ExecuteSqlResult } from "./sql.mjs";
4
- import { t as OptionMap } from "./sql-options-2k5xQ-oS.mjs";
5
- import { CatalogResult, ShowScopedOptions, showProcedures } from "./catalog.mjs";
6
- import { RowValue } from "./rows.mjs";
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { d as HydratedRow, v as SqlBinding } 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, showProcedures } from "../catalog/index.mjs";
6
+ import { RowValue } from "../rows/index.mjs";
7
7
 
8
- //#region src/procedures.d.ts
8
+ //#region src/procedures/index.d.ts
9
9
  interface ProcedureRef {
10
10
  readonly database?: string;
11
11
  readonly schema?: string;
@@ -1,10 +1,10 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { a as quoteLiteral, t as buildFqn } from "./sql-safety-CywdR3EP.mjs";
3
- import { BindingBuilder } from "./rows.mjs";
4
- import { t as formatOptions } from "./sql-options-DI-OmLU6.mjs";
5
- import { showProcedures } from "./catalog.mjs";
1
+ import { executeSql } from "../sql/index.mjs";
2
+ import { a as quoteLiteral, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
3
+ import { BindingBuilder } from "../rows/index.mjs";
4
+ import { t as formatOptions } from "../sql-options-D6GEa21F.mjs";
5
+ import { showProcedures } from "../catalog/index.mjs";
6
6
 
7
- //#region src/procedures.ts
7
+ //#region src/procedures/index.ts
8
8
  function renderArguments(args) {
9
9
  if (!args || args.length === 0) return "()";
10
10
  return `(${args.map((a) => {
@@ -1,5 +1,5 @@
1
- import { d as HydratedRow, m as ColumnMeta } from "./statements-DJL0qVNA.mjs";
2
- //#region src/results.d.ts
1
+ import { d as HydratedRow, m as ColumnMeta } from "../statements-DJL0qVNA.mjs";
2
+ //#region src/results/index.d.ts
3
3
  /**
4
4
  * Hydrate a single positional row into an object keyed by column name.
5
5
  * Values are coerced per Snowflake type; unknown / unrepresentable values
@@ -1,4 +1,4 @@
1
- //#region src/results.ts
1
+ //#region src/results/index.ts
2
2
  const MAX_SAFE_INT_AS_STRING = String(Number.MAX_SAFE_INTEGER);
3
3
  const MIN_SAFE_INT_AS_STRING = String(Number.MIN_SAFE_INTEGER);
4
4
  /**
@@ -1,8 +1,8 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { t as OptionMap } from "./sql-options-2k5xQ-oS.mjs";
3
- import { CatalogResult, ShowOptions, showRoles } from "./catalog.mjs";
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { t as OptionMap } from "../sql-options-2k5xQ-oS.mjs";
3
+ import { CatalogResult, ShowOptions, showRoles } from "../catalog/index.mjs";
4
4
 
5
- //#region src/roles.d.ts
5
+ //#region src/roles/index.d.ts
6
6
  interface RoleContext {
7
7
  readonly warehouse?: string;
8
8
  readonly sessionRole?: string;
@@ -1,9 +1,9 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { a as quoteLiteral, i as quoteIdentifier } from "./sql-safety-CywdR3EP.mjs";
3
- import { t as formatOptions } from "./sql-options-DI-OmLU6.mjs";
4
- import { showRoles } from "./catalog.mjs";
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 { showRoles } from "../catalog/index.mjs";
5
5
 
6
- //#region src/roles.ts
6
+ //#region src/roles/index.ts
7
7
  async function createRole(client, options) {
8
8
  const prefix = `CREATE${options.orReplace ? " OR REPLACE" : ""} ROLE${options.ifNotExists ? " IF NOT EXISTS" : ""}`;
9
9
  const body = options.options && Object.keys(options.options).length > 0 ? ` ${formatOptions(options.options)}` : "";
@@ -1,6 +1,6 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { d as HydratedRow, v as SqlBinding } from "./statements-DJL0qVNA.mjs";
3
- //#region src/rows.d.ts
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { d as HydratedRow, v as SqlBinding } from "../statements-DJL0qVNA.mjs";
3
+ //#region src/rows/index.d.ts
4
4
  /**
5
5
  * A value a caller can pass into an `insert` / `update` / `where` map. The
6
6
  * binding helper below maps each JS primitive onto a Snowflake type (`TEXT`,
@@ -1,7 +1,7 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { i as quoteIdentifier, t as buildFqn } from "./sql-safety-CywdR3EP.mjs";
1
+ import { executeSql } from "../sql/index.mjs";
2
+ import { i as quoteIdentifier, t as buildFqn } from "../sql-safety-BZpAPsq6.mjs";
3
3
 
4
- //#region src/rows.ts
4
+ //#region src/rows/index.ts
5
5
  function isSqlBinding(value) {
6
6
  return typeof value === "object" && value !== null && "type" in value && "value" in value && typeof value.type === "string";
7
7
  }
@@ -1,4 +1,4 @@
1
- import { a as snowflakeIdentifier, c as sqlBindingsSchema, i as snowflakeFqn, l as statementContextSchema, n as partitionInfoSchema, o as snowflakeObjectRowSchema, r as resultSetMetaDataSchema, s as sqlBindingValueSchema, t as columnMetaSchema } from "../common-BnKTPQXc.mjs";
2
- import { a as submitStatementInputSchema, i as statementStatusCodeSchema, n as statementResponseSchema, o as partitionResponseSchema, r as statementStatus, t as cancelStatementResponseSchema } from "../statements-B2ThF_4b.mjs";
1
+ import { a as snowflakeIdentifier, c as sqlBindingsSchema, i as snowflakeFqn, l as statementContextSchema, n as partitionInfoSchema, o as snowflakeObjectRowSchema, r as resultSetMetaDataSchema, s as sqlBindingValueSchema, t as columnMetaSchema } from "../common-DfpCwJx5.mjs";
2
+ import { a as submitStatementInputSchema, i as statementStatusCodeSchema, n as statementResponseSchema, o as partitionResponseSchema, r as statementStatus, t as cancelStatementResponseSchema } from "../statements-BumhMhN4.mjs";
3
3
 
4
4
  export { cancelStatementResponseSchema, columnMetaSchema, partitionInfoSchema, partitionResponseSchema, resultSetMetaDataSchema, snowflakeFqn, snowflakeIdentifier, snowflakeObjectRowSchema, sqlBindingValueSchema, sqlBindingsSchema, statementContextSchema, statementResponseSchema, statementStatus, statementStatusCodeSchema, submitStatementInputSchema };
@@ -1,2 +1,2 @@
1
- import { CatalogResult, FindSchemasOptions, ShowSchemasOptions, findSchemas, showSchemas } from "./catalog.mjs";
1
+ import { CatalogResult, FindSchemasOptions, ShowSchemasOptions, findSchemas, showSchemas } from "../catalog/index.mjs";
2
2
  export { type CatalogResult, type FindSchemasOptions, type ShowSchemasOptions, findSchemas, showSchemas };
@@ -0,0 +1,3 @@
1
+ import { findSchemas, showSchemas } from "../catalog/index.mjs";
2
+
3
+ export { findSchemas, showSchemas };
@@ -1,8 +1,8 @@
1
- import { SnowflakeClient } from "./client.mjs";
2
- import { d as HydratedRow } from "./statements-DJL0qVNA.mjs";
3
- import { CatalogResult, ShowOptions, showShares } from "./catalog.mjs";
1
+ import { SnowflakeClient } from "../client/index.mjs";
2
+ import { d as HydratedRow } from "../statements-DJL0qVNA.mjs";
3
+ import { CatalogResult, ShowOptions, showShares } from "../catalog/index.mjs";
4
4
 
5
- //#region src/shares.d.ts
5
+ //#region src/shares/index.d.ts
6
6
  interface ShareContext {
7
7
  readonly warehouse?: string;
8
8
  readonly role?: string;
@@ -1,8 +1,8 @@
1
- import { executeSql } from "./sql.mjs";
2
- import { a as quoteLiteral, i as quoteIdentifier } from "./sql-safety-CywdR3EP.mjs";
3
- import { showShares } from "./catalog.mjs";
1
+ import { executeSql } from "../sql/index.mjs";
2
+ import { a as quoteLiteral, i as quoteIdentifier } from "../sql-safety-BZpAPsq6.mjs";
3
+ import { showShares } from "../catalog/index.mjs";
4
4
 
5
- //#region src/shares.ts
5
+ //#region src/shares/index.ts
6
6
  async function createShare(client, options) {
7
7
  const prefix = `CREATE${options.orReplace ? " OR REPLACE" : ""} SHARE${options.ifNotExists ? " IF NOT EXISTS" : ""}`;
8
8
  const comment = options.comment ? ` COMMENT = ${quoteLiteral(options.comment)}` : "";
@@ -0,0 +1,50 @@
1
+ import { CredentialSet } from "@keystrokehq/core";
2
+ import { z } from "zod";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
+ import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
5
+
6
+ //#region src/credential-sets/snowflake-azure-eventgrid-webhook.credential-set.d.ts
7
+ declare const snowflakeAzureEventGridWebhookCredentialSet: CredentialSet<"snowflake-azure-eventgrid-webhook", z.ZodObject<{
8
+ sharedSecret: z.ZodOptional<z.ZodString>;
9
+ sharedSecretHeader: z.ZodOptional<z.ZodDefault<z.ZodString>>;
10
+ expectedTopicArn: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
12
+ sharedSecret: z.ZodOptional<z.ZodString>;
13
+ sharedSecretHeader: z.ZodOptional<z.ZodDefault<z.ZodString>>;
14
+ expectedTopicArn: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>>[] | undefined>;
16
+ type SnowflakeAzureEventGridWebhookCredentials = InferCredentialSetAuth<typeof snowflakeAzureEventGridWebhookCredentialSet>;
17
+ //#endregion
18
+ //#region src/credential-sets/snowflake-gcs-pubsub-webhook.credential-set.d.ts
19
+ declare const snowflakeGcsPubSubWebhookCredentialSet: CredentialSet<"snowflake-gcs-pubsub-webhook", z.ZodObject<{
20
+ expectedAudience: z.ZodString;
21
+ expectedServiceAccount: z.ZodString;
22
+ jwksUri: z.ZodOptional<z.ZodDefault<z.ZodString>>;
23
+ issuer: z.ZodOptional<z.ZodDefault<z.ZodString>>;
24
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
25
+ expectedAudience: z.ZodString;
26
+ expectedServiceAccount: z.ZodString;
27
+ jwksUri: z.ZodOptional<z.ZodDefault<z.ZodString>>;
28
+ issuer: z.ZodOptional<z.ZodDefault<z.ZodString>>;
29
+ }, z.core.$strip>>[] | undefined>;
30
+ type SnowflakeGcsPubSubWebhookCredentials = InferCredentialSetAuth<typeof snowflakeGcsPubSubWebhookCredentialSet>;
31
+ //#endregion
32
+ //#region src/credential-sets/snowflake-s3-sns-webhook.credential-set.d.ts
33
+ declare const snowflakeS3SnsWebhookCredentialSet: CredentialSet<"snowflake-s3-sns-webhook", z.ZodObject<{
34
+ expectedTopicArn: z.ZodOptional<z.ZodString>;
35
+ allowedSigningCertHostPattern: z.ZodOptional<z.ZodDefault<z.ZodString>>;
36
+ autoConfirmSubscriptions: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
37
+ true: "true";
38
+ false: "false";
39
+ }>>>;
40
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
41
+ expectedTopicArn: z.ZodOptional<z.ZodString>;
42
+ allowedSigningCertHostPattern: z.ZodOptional<z.ZodDefault<z.ZodString>>;
43
+ autoConfirmSubscriptions: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
44
+ true: "true";
45
+ false: "false";
46
+ }>>>;
47
+ }, z.core.$strip>>[] | undefined>;
48
+ type SnowflakeS3SnsWebhookCredentials = InferCredentialSetAuth<typeof snowflakeS3SnsWebhookCredentialSet>;
49
+ //#endregion
50
+ export { SnowflakeAzureEventGridWebhookCredentials as a, snowflakeGcsPubSubWebhookCredentialSet as i, snowflakeS3SnsWebhookCredentialSet as n, snowflakeAzureEventGridWebhookCredentialSet as o, SnowflakeGcsPubSubWebhookCredentials as r, SnowflakeS3SnsWebhookCredentials as t };
@@ -0,0 +1,44 @@
1
+ import { CredentialSet } from "@keystrokehq/core";
2
+ import { z } from "zod";
3
+
4
+ //#region src/credential-sets/snowflake-azure-eventgrid-webhook.credential-set.ts
5
+ const snowflakeAzureEventGridWebhookCredentialSet = new CredentialSet({
6
+ id: "snowflake-azure-eventgrid-webhook",
7
+ exposure: "platform-only",
8
+ name: "Snowflake Auto-Ingest — Azure Event Grid",
9
+ auth: z.object({
10
+ sharedSecret: z.string().optional(),
11
+ sharedSecretHeader: z.string().default("aeg-subscription-secret").optional(),
12
+ expectedTopicArn: z.string().optional()
13
+ })
14
+ });
15
+
16
+ //#endregion
17
+ //#region src/credential-sets/snowflake-gcs-pubsub-webhook.credential-set.ts
18
+ const snowflakeGcsPubSubWebhookCredentialSet = new CredentialSet({
19
+ id: "snowflake-gcs-pubsub-webhook",
20
+ exposure: "platform-only",
21
+ name: "Snowflake Auto-Ingest — GCS Pub/Sub",
22
+ auth: z.object({
23
+ expectedAudience: z.string().min(1),
24
+ expectedServiceAccount: z.string().min(1),
25
+ jwksUri: z.string().default("https://www.googleapis.com/oauth2/v3/certs").optional(),
26
+ issuer: z.string().default("https://accounts.google.com").optional()
27
+ })
28
+ });
29
+
30
+ //#endregion
31
+ //#region src/credential-sets/snowflake-s3-sns-webhook.credential-set.ts
32
+ const snowflakeS3SnsWebhookCredentialSet = new CredentialSet({
33
+ id: "snowflake-s3-sns-webhook",
34
+ exposure: "platform-only",
35
+ name: "Snowflake Auto-Ingest — AWS SNS",
36
+ auth: z.object({
37
+ expectedTopicArn: z.string().optional(),
38
+ allowedSigningCertHostPattern: z.string().default("^sns\\.[a-z0-9-]+\\.amazonaws\\.com(\\.cn)?$").optional(),
39
+ autoConfirmSubscriptions: z.enum(["true", "false"]).default("false").optional()
40
+ })
41
+ });
42
+
43
+ //#endregion
44
+ export { snowflakeGcsPubSubWebhookCredentialSet as n, snowflakeAzureEventGridWebhookCredentialSet as r, snowflakeS3SnsWebhookCredentialSet as t };