@keystrokehq/snowflake 0.0.22 → 0.1.2

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 (162) hide show
  1. package/dist/action.cjs +21 -0
  2. package/dist/action.cjs.map +1 -0
  3. package/dist/action.mjs +21 -0
  4. package/dist/action.mjs.map +1 -0
  5. package/dist/actions/cancel-statement-execution.cjs +25 -0
  6. package/dist/actions/cancel-statement-execution.cjs.map +1 -0
  7. package/dist/actions/cancel-statement-execution.d.cts +21 -0
  8. package/dist/actions/cancel-statement-execution.d.cts.map +1 -0
  9. package/dist/actions/cancel-statement-execution.d.mts +21 -0
  10. package/dist/actions/cancel-statement-execution.d.mts.map +1 -0
  11. package/dist/actions/cancel-statement-execution.mjs +22 -0
  12. package/dist/actions/cancel-statement-execution.mjs.map +1 -0
  13. package/dist/actions/check-statement-status.cjs +58 -0
  14. package/dist/actions/check-statement-status.cjs.map +1 -0
  15. package/dist/actions/check-statement-status.d.cts +47 -0
  16. package/dist/actions/check-statement-status.d.cts.map +1 -0
  17. package/dist/actions/check-statement-status.d.mts +47 -0
  18. package/dist/actions/check-statement-status.d.mts.map +1 -0
  19. package/dist/actions/check-statement-status.mjs +57 -0
  20. package/dist/actions/check-statement-status.mjs.map +1 -0
  21. package/dist/actions/drop-warehouse.cjs +24 -0
  22. package/dist/actions/drop-warehouse.cjs.map +1 -0
  23. package/dist/actions/drop-warehouse.d.cts +20 -0
  24. package/dist/actions/drop-warehouse.d.cts.map +1 -0
  25. package/dist/actions/drop-warehouse.d.mts +20 -0
  26. package/dist/actions/drop-warehouse.d.mts.map +1 -0
  27. package/dist/actions/drop-warehouse.mjs +21 -0
  28. package/dist/actions/drop-warehouse.mjs.map +1 -0
  29. package/dist/actions/execute-sql.cjs +64 -0
  30. package/dist/actions/execute-sql.cjs.map +1 -0
  31. package/dist/actions/execute-sql.d.cts +58 -0
  32. package/dist/actions/execute-sql.d.cts.map +1 -0
  33. package/dist/actions/execute-sql.d.mts +58 -0
  34. package/dist/actions/execute-sql.d.mts.map +1 -0
  35. package/dist/actions/execute-sql.mjs +63 -0
  36. package/dist/actions/execute-sql.mjs.map +1 -0
  37. package/dist/actions/fetch-catalog-integration.cjs +26 -0
  38. package/dist/actions/fetch-catalog-integration.cjs.map +1 -0
  39. package/dist/actions/fetch-catalog-integration.d.cts +24 -0
  40. package/dist/actions/fetch-catalog-integration.d.cts.map +1 -0
  41. package/dist/actions/fetch-catalog-integration.d.mts +24 -0
  42. package/dist/actions/fetch-catalog-integration.d.mts.map +1 -0
  43. package/dist/actions/fetch-catalog-integration.mjs +25 -0
  44. package/dist/actions/fetch-catalog-integration.mjs.map +1 -0
  45. package/dist/actions/get-active-scheduled-maintenances.cjs +51 -0
  46. package/dist/actions/get-active-scheduled-maintenances.cjs.map +1 -0
  47. package/dist/actions/get-active-scheduled-maintenances.d.cts +41 -0
  48. package/dist/actions/get-active-scheduled-maintenances.d.cts.map +1 -0
  49. package/dist/actions/get-active-scheduled-maintenances.d.mts +41 -0
  50. package/dist/actions/get-active-scheduled-maintenances.d.mts.map +1 -0
  51. package/dist/actions/get-active-scheduled-maintenances.mjs +50 -0
  52. package/dist/actions/get-active-scheduled-maintenances.mjs.map +1 -0
  53. package/dist/actions/get-all-scheduled-maintenances.cjs +61 -0
  54. package/dist/actions/get-all-scheduled-maintenances.cjs.map +1 -0
  55. package/dist/actions/get-all-scheduled-maintenances.d.cts +50 -0
  56. package/dist/actions/get-all-scheduled-maintenances.d.cts.map +1 -0
  57. package/dist/actions/get-all-scheduled-maintenances.d.mts +50 -0
  58. package/dist/actions/get-all-scheduled-maintenances.d.mts.map +1 -0
  59. package/dist/actions/get-all-scheduled-maintenances.mjs +60 -0
  60. package/dist/actions/get-all-scheduled-maintenances.mjs.map +1 -0
  61. package/dist/actions/get-component-status.cjs +40 -0
  62. package/dist/actions/get-component-status.cjs.map +1 -0
  63. package/dist/actions/get-component-status.d.cts +35 -0
  64. package/dist/actions/get-component-status.d.cts.map +1 -0
  65. package/dist/actions/get-component-status.d.mts +35 -0
  66. package/dist/actions/get-component-status.d.mts.map +1 -0
  67. package/dist/actions/get-component-status.mjs +39 -0
  68. package/dist/actions/get-component-status.mjs.map +1 -0
  69. package/dist/actions/get-status-rollup.cjs +30 -0
  70. package/dist/actions/get-status-rollup.cjs.map +1 -0
  71. package/dist/actions/get-status-rollup.d.cts +21 -0
  72. package/dist/actions/get-status-rollup.d.cts.map +1 -0
  73. package/dist/actions/get-status-rollup.d.mts +21 -0
  74. package/dist/actions/get-status-rollup.d.mts.map +1 -0
  75. package/dist/actions/get-status-rollup.mjs +29 -0
  76. package/dist/actions/get-status-rollup.mjs.map +1 -0
  77. package/dist/actions/get-status-summary.cjs +86 -0
  78. package/dist/actions/get-status-summary.cjs.map +1 -0
  79. package/dist/actions/get-status-summary.d.cts +81 -0
  80. package/dist/actions/get-status-summary.d.cts.map +1 -0
  81. package/dist/actions/get-status-summary.d.mts +81 -0
  82. package/dist/actions/get-status-summary.d.mts.map +1 -0
  83. package/dist/actions/get-status-summary.mjs +85 -0
  84. package/dist/actions/get-status-summary.mjs.map +1 -0
  85. package/dist/actions/get-unresolved-incidents.cjs +48 -0
  86. package/dist/actions/get-unresolved-incidents.cjs.map +1 -0
  87. package/dist/actions/get-unresolved-incidents.d.cts +38 -0
  88. package/dist/actions/get-unresolved-incidents.d.cts.map +1 -0
  89. package/dist/actions/get-unresolved-incidents.d.mts +38 -0
  90. package/dist/actions/get-unresolved-incidents.d.mts.map +1 -0
  91. package/dist/actions/get-unresolved-incidents.mjs +47 -0
  92. package/dist/actions/get-unresolved-incidents.mjs.map +1 -0
  93. package/dist/actions/get-upcoming-scheduled-maintenances.cjs +50 -0
  94. package/dist/actions/get-upcoming-scheduled-maintenances.cjs.map +1 -0
  95. package/dist/actions/get-upcoming-scheduled-maintenances.d.cts +40 -0
  96. package/dist/actions/get-upcoming-scheduled-maintenances.d.cts.map +1 -0
  97. package/dist/actions/get-upcoming-scheduled-maintenances.d.mts +40 -0
  98. package/dist/actions/get-upcoming-scheduled-maintenances.d.mts.map +1 -0
  99. package/dist/actions/get-upcoming-scheduled-maintenances.mjs +49 -0
  100. package/dist/actions/get-upcoming-scheduled-maintenances.mjs.map +1 -0
  101. package/dist/actions/index.cjs +33 -0
  102. package/dist/actions/index.d.cts +17 -0
  103. package/dist/actions/index.d.mts +17 -0
  104. package/dist/actions/index.mjs +17 -0
  105. package/dist/actions/show-databases.cjs +34 -0
  106. package/dist/actions/show-databases.cjs.map +1 -0
  107. package/dist/actions/show-databases.d.cts +32 -0
  108. package/dist/actions/show-databases.d.cts.map +1 -0
  109. package/dist/actions/show-databases.d.mts +32 -0
  110. package/dist/actions/show-databases.d.mts.map +1 -0
  111. package/dist/actions/show-databases.mjs +31 -0
  112. package/dist/actions/show-databases.mjs.map +1 -0
  113. package/dist/actions/show-schemas.cjs +36 -0
  114. package/dist/actions/show-schemas.cjs.map +1 -0
  115. package/dist/actions/show-schemas.d.cts +36 -0
  116. package/dist/actions/show-schemas.d.cts.map +1 -0
  117. package/dist/actions/show-schemas.d.mts +36 -0
  118. package/dist/actions/show-schemas.d.mts.map +1 -0
  119. package/dist/actions/show-schemas.mjs +33 -0
  120. package/dist/actions/show-schemas.mjs.map +1 -0
  121. package/dist/actions/show-tables.cjs +37 -0
  122. package/dist/actions/show-tables.cjs.map +1 -0
  123. package/dist/actions/show-tables.d.cts +38 -0
  124. package/dist/actions/show-tables.d.cts.map +1 -0
  125. package/dist/actions/show-tables.d.mts +38 -0
  126. package/dist/actions/show-tables.d.mts.map +1 -0
  127. package/dist/actions/show-tables.mjs +34 -0
  128. package/dist/actions/show-tables.mjs.map +1 -0
  129. package/dist/actions/validate-credential.cjs +20 -0
  130. package/dist/actions/validate-credential.cjs.map +1 -0
  131. package/dist/actions/validate-credential.d.cts +13 -0
  132. package/dist/actions/validate-credential.d.cts.map +1 -0
  133. package/dist/actions/validate-credential.d.mts +13 -0
  134. package/dist/actions/validate-credential.d.mts.map +1 -0
  135. package/dist/actions/validate-credential.mjs +17 -0
  136. package/dist/actions/validate-credential.mjs.map +1 -0
  137. package/dist/app.cjs +9 -0
  138. package/dist/app.cjs.map +1 -0
  139. package/dist/app.d.cts +5 -0
  140. package/dist/app.d.cts.map +1 -0
  141. package/dist/app.d.mts +5 -0
  142. package/dist/app.d.mts.map +1 -0
  143. package/dist/app.mjs +10 -0
  144. package/dist/app.mjs.map +1 -0
  145. package/dist/catalog.cjs +15 -0
  146. package/dist/catalog.cjs.map +1 -0
  147. package/dist/catalog.d.cts +14 -0
  148. package/dist/catalog.d.cts.map +1 -0
  149. package/dist/catalog.d.mts +14 -0
  150. package/dist/catalog.d.mts.map +1 -0
  151. package/dist/catalog.mjs +15 -0
  152. package/dist/catalog.mjs.map +1 -0
  153. package/dist/execute.cjs +18 -0
  154. package/dist/execute.cjs.map +1 -0
  155. package/dist/execute.mjs +18 -0
  156. package/dist/execute.mjs.map +1 -0
  157. package/dist/index.cjs +38 -0
  158. package/dist/index.d.cts +19 -0
  159. package/dist/index.d.mts +19 -0
  160. package/dist/index.mjs +20 -0
  161. package/package.json +11 -18
  162. package/LICENSE +0 -21
@@ -0,0 +1,21 @@
1
+ const require_app = require("./app.cjs");
2
+ const require_execute = require("./execute.cjs");
3
+ require("zod");
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return require_app.snowflake.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await require_execute.executeSnowflakeTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ exports.action = action;
20
+
21
+ //# sourceMappingURL=action.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.cjs","names":["snowflake","executeSnowflakeTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { snowflake } from \"./app\";\nimport { executeSnowflakeTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return snowflake.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await executeSnowflakeTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,UAAU,OAAO;EACtB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,qBAAqB,MAAM,KAAgC,CAAC;EAC5F;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { snowflake } from "./app.mjs";
2
+ import { executeSnowflakeTool } from "./execute.mjs";
3
+ import "zod";
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return snowflake.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await executeSnowflakeTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ export { action };
20
+
21
+ //# sourceMappingURL=action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { snowflake } from \"./app\";\nimport { executeSnowflakeTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return snowflake.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await executeSnowflakeTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,UAAU,OAAO;EACtB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,qBAAqB,MAAM,KAAgC,CAAC;EAC5F;CACF,CAAC;AACH"}
@@ -0,0 +1,25 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/cancel-statement-execution.ts
4
+ const SnowflakeCancelStatementExecutionInput = zod.z.object({
5
+ request_id: zod.z.string().describe("Unique ID (a UUID) of the API request. This is an optional parameter that can be used to track the request.").optional(),
6
+ statementHandle: zod.z.string().describe("The handle of the statement to be cancelled. This can be obtained from the response of the execute_statement action.")
7
+ });
8
+ const SnowflakeCancelStatementExecutionOutput = zod.z.object({
9
+ code: zod.z.string().describe("The response code from the Snowflake API.").nullable(),
10
+ message: zod.z.string().describe("A message indicating the result of the cancellation request.").nullable(),
11
+ sqlState: zod.z.string().describe("The SQL state of the statement after the cancellation request.").nullable(),
12
+ statementHandle: zod.z.string().describe("The handle of the statement that was cancelled.").nullable(),
13
+ statementStatusUrl: zod.z.string().describe("The URL to check the status of the statement.").nullable()
14
+ });
15
+ const snowflakeCancelStatementExecution = require_action.action("SNOWFLAKE_CANCEL_STATEMENT_EXECUTION", {
16
+ slug: "snowflake-cancel-statement-execution",
17
+ name: "Cancel Statement Execution",
18
+ description: "Cancels the execution of a running SQL statement. Use this action to stop a long-running query.",
19
+ input: SnowflakeCancelStatementExecutionInput,
20
+ output: SnowflakeCancelStatementExecutionOutput
21
+ });
22
+ //#endregion
23
+ exports.snowflakeCancelStatementExecution = snowflakeCancelStatementExecution;
24
+
25
+ //# sourceMappingURL=cancel-statement-execution.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-statement-execution.cjs","names":["z","action"],"sources":["../../src/actions/cancel-statement-execution.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SnowflakeCancelStatementExecutionInput = z.object({\n request_id: z.string().describe(\"Unique ID (a UUID) of the API request. This is an optional parameter that can be used to track the request.\").optional(),\n statementHandle: z.string().describe(\"The handle of the statement to be cancelled. This can be obtained from the response of the execute_statement action.\"),\n});\nexport const SnowflakeCancelStatementExecutionOutput = z.object({\n code: z.string().describe(\"The response code from the Snowflake API.\").nullable(),\n message: z.string().describe(\"A message indicating the result of the cancellation request.\").nullable(),\n sqlState: z.string().describe(\"The SQL state of the statement after the cancellation request.\").nullable(),\n statementHandle: z.string().describe(\"The handle of the statement that was cancelled.\").nullable(),\n statementStatusUrl: z.string().describe(\"The URL to check the status of the statement.\").nullable(),\n});\n\nexport const snowflakeCancelStatementExecution = action(\"SNOWFLAKE_CANCEL_STATEMENT_EXECUTION\", {\n slug: \"snowflake-cancel-statement-execution\",\n name: \"Cancel Statement Execution\",\n description: \"Cancels the execution of a running SQL statement. Use this action to stop a long-running query.\",\n input: SnowflakeCancelStatementExecutionInput,\n output: SnowflakeCancelStatementExecutionOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yCAAyCA,IAAAA,EAAE,OAAO;CAC7D,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6GAA6G,CAAC,CAAC,SAAS;CACxJ,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sHAAsH;AAC7J,CAAC;AACD,MAAa,0CAA0CA,IAAAA,EAAE,OAAO;CAC9D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAChF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CACtG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CACzG,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CACjG,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;AACpG,CAAC;AAED,MAAa,oCAAoCC,eAAAA,OAAO,wCAAwC;CAC9F,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/cancel-statement-execution.d.ts
4
+ declare const SnowflakeCancelStatementExecutionInput: z.ZodObject<{
5
+ request_id: z.ZodOptional<z.ZodString>;
6
+ statementHandle: z.ZodString;
7
+ }, z.core.$strip>;
8
+ declare const SnowflakeCancelStatementExecutionOutput: z.ZodObject<{
9
+ code: z.ZodNullable<z.ZodString>;
10
+ message: z.ZodNullable<z.ZodString>;
11
+ sqlState: z.ZodNullable<z.ZodString>;
12
+ statementHandle: z.ZodNullable<z.ZodString>;
13
+ statementStatusUrl: z.ZodNullable<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ declare const snowflakeCancelStatementExecution: import("@keystrokehq/action").WorkflowActionDefinition<{
16
+ statementHandle: string;
17
+ request_id?: string | undefined;
18
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
19
+ //#endregion
20
+ export { snowflakeCancelStatementExecution };
21
+ //# sourceMappingURL=cancel-statement-execution.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-statement-execution.d.cts","names":[],"sources":["../../src/actions/cancel-statement-execution.ts"],"mappings":";;;cAIa,sCAAA,EAAsC,CAAA,CAAA,SAAA;;;;cAItC,uCAAA,EAAuC,CAAA,CAAA,SAAA;;;;;;;cAQvC,iCAAA,gCAAiC,wBAAA"}
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/cancel-statement-execution.d.ts
4
+ declare const SnowflakeCancelStatementExecutionInput: z.ZodObject<{
5
+ request_id: z.ZodOptional<z.ZodString>;
6
+ statementHandle: z.ZodString;
7
+ }, z.core.$strip>;
8
+ declare const SnowflakeCancelStatementExecutionOutput: z.ZodObject<{
9
+ code: z.ZodNullable<z.ZodString>;
10
+ message: z.ZodNullable<z.ZodString>;
11
+ sqlState: z.ZodNullable<z.ZodString>;
12
+ statementHandle: z.ZodNullable<z.ZodString>;
13
+ statementStatusUrl: z.ZodNullable<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ declare const snowflakeCancelStatementExecution: import("@keystrokehq/action").WorkflowActionDefinition<{
16
+ statementHandle: string;
17
+ request_id?: string | undefined;
18
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
19
+ //#endregion
20
+ export { snowflakeCancelStatementExecution };
21
+ //# sourceMappingURL=cancel-statement-execution.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-statement-execution.d.mts","names":[],"sources":["../../src/actions/cancel-statement-execution.ts"],"mappings":";;;cAIa,sCAAA,EAAsC,CAAA,CAAA,SAAA;;;;cAItC,uCAAA,EAAuC,CAAA,CAAA,SAAA;;;;;;;cAQvC,iCAAA,gCAAiC,wBAAA"}
@@ -0,0 +1,22 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const snowflakeCancelStatementExecution = action("SNOWFLAKE_CANCEL_STATEMENT_EXECUTION", {
4
+ slug: "snowflake-cancel-statement-execution",
5
+ name: "Cancel Statement Execution",
6
+ description: "Cancels the execution of a running SQL statement. Use this action to stop a long-running query.",
7
+ input: z.object({
8
+ request_id: z.string().describe("Unique ID (a UUID) of the API request. This is an optional parameter that can be used to track the request.").optional(),
9
+ statementHandle: z.string().describe("The handle of the statement to be cancelled. This can be obtained from the response of the execute_statement action.")
10
+ }),
11
+ output: z.object({
12
+ code: z.string().describe("The response code from the Snowflake API.").nullable(),
13
+ message: z.string().describe("A message indicating the result of the cancellation request.").nullable(),
14
+ sqlState: z.string().describe("The SQL state of the statement after the cancellation request.").nullable(),
15
+ statementHandle: z.string().describe("The handle of the statement that was cancelled.").nullable(),
16
+ statementStatusUrl: z.string().describe("The URL to check the status of the statement.").nullable()
17
+ })
18
+ });
19
+ //#endregion
20
+ export { snowflakeCancelStatementExecution };
21
+
22
+ //# sourceMappingURL=cancel-statement-execution.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-statement-execution.mjs","names":[],"sources":["../../src/actions/cancel-statement-execution.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SnowflakeCancelStatementExecutionInput = z.object({\n request_id: z.string().describe(\"Unique ID (a UUID) of the API request. This is an optional parameter that can be used to track the request.\").optional(),\n statementHandle: z.string().describe(\"The handle of the statement to be cancelled. This can be obtained from the response of the execute_statement action.\"),\n});\nexport const SnowflakeCancelStatementExecutionOutput = z.object({\n code: z.string().describe(\"The response code from the Snowflake API.\").nullable(),\n message: z.string().describe(\"A message indicating the result of the cancellation request.\").nullable(),\n sqlState: z.string().describe(\"The SQL state of the statement after the cancellation request.\").nullable(),\n statementHandle: z.string().describe(\"The handle of the statement that was cancelled.\").nullable(),\n statementStatusUrl: z.string().describe(\"The URL to check the status of the statement.\").nullable(),\n});\n\nexport const snowflakeCancelStatementExecution = action(\"SNOWFLAKE_CANCEL_STATEMENT_EXECUTION\", {\n slug: \"snowflake-cancel-statement-execution\",\n name: \"Cancel Statement Execution\",\n description: \"Cancels the execution of a running SQL statement. Use this action to stop a long-running query.\",\n input: SnowflakeCancelStatementExecutionInput,\n output: SnowflakeCancelStatementExecutionOutput,\n});\n"],"mappings":";;AAgBA,MAAa,oCAAoC,OAAO,wCAAwC;CAC9F,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhBoD,EAAE,OAAO;EAC7D,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,6GAA6G,CAAC,CAAC,SAAS;EACxJ,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,sHAAsH;CAC7J,CAaS;CACP,QAbqD,EAAE,OAAO;EAC9D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;EAChF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;EACtG,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EACzG,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;EACjG,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;CACpG,CAOU;AACV,CAAC"}
@@ -0,0 +1,58 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/check-statement-status.ts
4
+ const SnowflakeCheckStatementStatusInput = zod.z.object({
5
+ partition: zod.z.number().int().describe("The partition number to return. The size of each partition is determined by Snowflake.").optional(),
6
+ requestId: zod.z.string().describe("Unique ID (UUID) of the API request for idempotency.").optional(),
7
+ statementHandle: zod.z.string().describe("The handle of the statement to be checked.")
8
+ });
9
+ const SnowflakeCheckStatementStatus_RowTypeInfoSchema = zod.z.object({
10
+ name: zod.z.string().describe("Name of the column.").nullable(),
11
+ type: zod.z.string().describe("Data type of the column (e.g., 'text', 'fixed', 'timestamp_ltz').").nullable(),
12
+ scale: zod.z.number().int().describe("Scale for numeric types.").nullable().optional(),
13
+ table: zod.z.string().describe("Table name.").nullable(),
14
+ length: zod.z.number().int().describe("Length for text types.").nullable().optional(),
15
+ schema: zod.z.string().describe("Schema name.").nullable(),
16
+ database: zod.z.string().describe("Database name.").nullable(),
17
+ nullable: zod.z.boolean().describe("Whether the column is nullable.").nullable(),
18
+ collation: zod.z.string().describe("Collation for text types.").nullable().optional(),
19
+ precision: zod.z.number().int().describe("Precision for numeric types.").nullable().optional(),
20
+ byteLength: zod.z.number().int().describe("Byte length for text types.").nullable().optional()
21
+ });
22
+ const SnowflakeCheckStatementStatus_PartitionInfoSchema = zod.z.object({
23
+ rowCount: zod.z.number().int().describe("Number of rows in this partition.").nullable(),
24
+ uncompressedSize: zod.z.number().int().describe("Uncompressed size of the partition in bytes.").nullable()
25
+ });
26
+ const SnowflakeCheckStatementStatus_ResultSetMetadataSchema = zod.z.object({
27
+ format: zod.z.string().describe("Format of the result set (e.g., 'jsonv2').").nullable(),
28
+ numRows: zod.z.number().int().describe("Total number of rows in the result set.").nullable(),
29
+ rowType: zod.z.array(SnowflakeCheckStatementStatus_RowTypeInfoSchema).describe("Metadata describing each column in the result set."),
30
+ partitionInfo: zod.z.array(SnowflakeCheckStatementStatus_PartitionInfoSchema).describe("Information about result set partitions.")
31
+ });
32
+ const SnowflakeCheckStatementStatusOutput = zod.z.object({
33
+ code: zod.z.string().describe("Response code (e.g., '090001' for success).").nullable().optional(),
34
+ data: zod.z.array(zod.z.array(zod.z.union([
35
+ zod.z.string(),
36
+ zod.z.number().int(),
37
+ zod.z.number(),
38
+ zod.z.boolean()
39
+ ]).nullable())).describe("The result set data as a 2D array, where each inner array represents a row.").nullable().optional(),
40
+ message: zod.z.string().describe("Human-readable message describing the statement execution status.").nullable().optional(),
41
+ sqlState: zod.z.string().describe("SQL state code (e.g., '00000' for success).").nullable().optional(),
42
+ createdOn: zod.z.number().int().describe("Unix timestamp (in milliseconds) when the statement execution started.").nullable().optional(),
43
+ requestId: zod.z.string().describe("Unique ID (UUID) of the API request.").nullable().optional(),
44
+ statementHandle: zod.z.string().describe("Unique identifier (UUID) for the statement being executed.").nullable().optional(),
45
+ resultSetMetaData: SnowflakeCheckStatementStatus_ResultSetMetadataSchema.nullable().optional(),
46
+ statementStatusUrl: zod.z.string().describe("URL path to retrieve the statement status and result set.").nullable().optional()
47
+ });
48
+ const snowflakeCheckStatementStatus = require_action.action("SNOWFLAKE_CHECK_STATEMENT_STATUS", {
49
+ slug: "snowflake-check-statement-status",
50
+ name: "Check Statement Status",
51
+ description: "Retrieves the status and results of a previously submitted SQL statement using its statement handle. Use this to poll async queries submitted via SNOWFLAKE_SUBMIT_SQL_STATEMENT; call repeatedly until status is no longer pending. Use SNOWFLAKE_CANCEL_STATEMENT to abort a hanging query.",
52
+ input: SnowflakeCheckStatementStatusInput,
53
+ output: SnowflakeCheckStatementStatusOutput
54
+ });
55
+ //#endregion
56
+ exports.snowflakeCheckStatementStatus = snowflakeCheckStatementStatus;
57
+
58
+ //# sourceMappingURL=check-statement-status.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-statement-status.cjs","names":["z","action"],"sources":["../../src/actions/check-statement-status.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SnowflakeCheckStatementStatusInput = z.object({\n partition: z.number().int().describe(\"The partition number to return. The size of each partition is determined by Snowflake.\").optional(),\n requestId: z.string().describe(\"Unique ID (UUID) of the API request for idempotency.\").optional(),\n statementHandle: z.string().describe(\"The handle of the statement to be checked.\"),\n});\nconst SnowflakeCheckStatementStatus_RowTypeInfoSchema = z.object({\n name: z.string().describe(\"Name of the column.\").nullable(),\n type: z.string().describe(\"Data type of the column (e.g., 'text', 'fixed', 'timestamp_ltz').\").nullable(),\n scale: z.number().int().describe(\"Scale for numeric types.\").nullable().optional(),\n table: z.string().describe(\"Table name.\").nullable(),\n length: z.number().int().describe(\"Length for text types.\").nullable().optional(),\n schema: z.string().describe(\"Schema name.\").nullable(),\n database: z.string().describe(\"Database name.\").nullable(),\n nullable: z.boolean().describe(\"Whether the column is nullable.\").nullable(),\n collation: z.string().describe(\"Collation for text types.\").nullable().optional(),\n precision: z.number().int().describe(\"Precision for numeric types.\").nullable().optional(),\n byteLength: z.number().int().describe(\"Byte length for text types.\").nullable().optional(),\n});\nconst SnowflakeCheckStatementStatus_PartitionInfoSchema = z.object({\n rowCount: z.number().int().describe(\"Number of rows in this partition.\").nullable(),\n uncompressedSize: z.number().int().describe(\"Uncompressed size of the partition in bytes.\").nullable(),\n});\nconst SnowflakeCheckStatementStatus_ResultSetMetadataSchema = z.object({\n format: z.string().describe(\"Format of the result set (e.g., 'jsonv2').\").nullable(),\n numRows: z.number().int().describe(\"Total number of rows in the result set.\").nullable(),\n rowType: z.array(SnowflakeCheckStatementStatus_RowTypeInfoSchema).describe(\"Metadata describing each column in the result set.\"),\n partitionInfo: z.array(SnowflakeCheckStatementStatus_PartitionInfoSchema).describe(\"Information about result set partitions.\"),\n});\nexport const SnowflakeCheckStatementStatusOutput = z.object({\n code: z.string().describe(\"Response code (e.g., '090001' for success).\").nullable().optional(),\n data: z.array(z.array(z.union([z.string(), z.number().int(), z.number(), z.boolean()]).nullable())).describe(\"The result set data as a 2D array, where each inner array represents a row.\").nullable().optional(),\n message: z.string().describe(\"Human-readable message describing the statement execution status.\").nullable().optional(),\n sqlState: z.string().describe(\"SQL state code (e.g., '00000' for success).\").nullable().optional(),\n createdOn: z.number().int().describe(\"Unix timestamp (in milliseconds) when the statement execution started.\").nullable().optional(),\n requestId: z.string().describe(\"Unique ID (UUID) of the API request.\").nullable().optional(),\n statementHandle: z.string().describe(\"Unique identifier (UUID) for the statement being executed.\").nullable().optional(),\n resultSetMetaData: SnowflakeCheckStatementStatus_ResultSetMetadataSchema.nullable().optional(),\n statementStatusUrl: z.string().describe(\"URL path to retrieve the statement status and result set.\").nullable().optional(),\n});\n\nexport const snowflakeCheckStatementStatus = action(\"SNOWFLAKE_CHECK_STATEMENT_STATUS\", {\n slug: \"snowflake-check-statement-status\",\n name: \"Check Statement Status\",\n description: \"Retrieves the status and results of a previously submitted SQL statement using its statement handle. Use this to poll async queries submitted via SNOWFLAKE_SUBMIT_SQL_STATEMENT; call repeatedly until status is no longer pending. Use SNOWFLAKE_CANCEL_STATEMENT to abort a hanging query.\",\n input: SnowflakeCheckStatementStatusInput,\n output: SnowflakeCheckStatementStatusOutput,\n});\n"],"mappings":"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"}
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/check-statement-status.d.ts
4
+ declare const SnowflakeCheckStatementStatusInput: z.ZodObject<{
5
+ partition: z.ZodOptional<z.ZodNumber>;
6
+ requestId: z.ZodOptional<z.ZodString>;
7
+ statementHandle: z.ZodString;
8
+ }, z.core.$strip>;
9
+ declare const SnowflakeCheckStatementStatusOutput: z.ZodObject<{
10
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ data: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodArray<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNumber, z.ZodBoolean]>>>>>>;
12
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ sqlState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ createdOn: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15
+ requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ statementHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ resultSetMetaData: z.ZodOptional<z.ZodNullable<z.ZodObject<{
18
+ format: z.ZodNullable<z.ZodString>;
19
+ numRows: z.ZodNullable<z.ZodNumber>;
20
+ rowType: z.ZodArray<z.ZodObject<{
21
+ name: z.ZodNullable<z.ZodString>;
22
+ type: z.ZodNullable<z.ZodString>;
23
+ scale: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
24
+ table: z.ZodNullable<z.ZodString>;
25
+ length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
+ schema: z.ZodNullable<z.ZodString>;
27
+ database: z.ZodNullable<z.ZodString>;
28
+ nullable: z.ZodNullable<z.ZodBoolean>;
29
+ collation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ precision: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
31
+ byteLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ }, z.core.$strip>>;
33
+ partitionInfo: z.ZodArray<z.ZodObject<{
34
+ rowCount: z.ZodNullable<z.ZodNumber>;
35
+ uncompressedSize: z.ZodNullable<z.ZodNumber>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>>>;
38
+ statementStatusUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
+ }, z.core.$strip>;
40
+ declare const snowflakeCheckStatementStatus: import("@keystrokehq/action").WorkflowActionDefinition<{
41
+ statementHandle: string;
42
+ partition?: number | undefined;
43
+ requestId?: string | undefined;
44
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
45
+ //#endregion
46
+ export { snowflakeCheckStatementStatus };
47
+ //# sourceMappingURL=check-statement-status.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-statement-status.d.cts","names":[],"sources":["../../src/actions/check-statement-status.ts"],"mappings":";;;cAIa,kCAAA,EAAkC,CAAA,CAAA,SAAA;;;;;cA4BlC,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAYnC,6BAAA,gCAA6B,wBAAA"}
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/check-statement-status.d.ts
4
+ declare const SnowflakeCheckStatementStatusInput: z.ZodObject<{
5
+ partition: z.ZodOptional<z.ZodNumber>;
6
+ requestId: z.ZodOptional<z.ZodString>;
7
+ statementHandle: z.ZodString;
8
+ }, z.core.$strip>;
9
+ declare const SnowflakeCheckStatementStatusOutput: z.ZodObject<{
10
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ data: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodArray<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNumber, z.ZodBoolean]>>>>>>;
12
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ sqlState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ createdOn: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15
+ requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ statementHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ resultSetMetaData: z.ZodOptional<z.ZodNullable<z.ZodObject<{
18
+ format: z.ZodNullable<z.ZodString>;
19
+ numRows: z.ZodNullable<z.ZodNumber>;
20
+ rowType: z.ZodArray<z.ZodObject<{
21
+ name: z.ZodNullable<z.ZodString>;
22
+ type: z.ZodNullable<z.ZodString>;
23
+ scale: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
24
+ table: z.ZodNullable<z.ZodString>;
25
+ length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
+ schema: z.ZodNullable<z.ZodString>;
27
+ database: z.ZodNullable<z.ZodString>;
28
+ nullable: z.ZodNullable<z.ZodBoolean>;
29
+ collation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ precision: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
31
+ byteLength: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ }, z.core.$strip>>;
33
+ partitionInfo: z.ZodArray<z.ZodObject<{
34
+ rowCount: z.ZodNullable<z.ZodNumber>;
35
+ uncompressedSize: z.ZodNullable<z.ZodNumber>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>>>;
38
+ statementStatusUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
+ }, z.core.$strip>;
40
+ declare const snowflakeCheckStatementStatus: import("@keystrokehq/action").WorkflowActionDefinition<{
41
+ statementHandle: string;
42
+ partition?: number | undefined;
43
+ requestId?: string | undefined;
44
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
45
+ //#endregion
46
+ export { snowflakeCheckStatementStatus };
47
+ //# sourceMappingURL=check-statement-status.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-statement-status.d.mts","names":[],"sources":["../../src/actions/check-statement-status.ts"],"mappings":";;;cAIa,kCAAA,EAAkC,CAAA,CAAA,SAAA;;;;;cA4BlC,mCAAA,EAAmC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAYnC,6BAAA,gCAA6B,wBAAA"}
@@ -0,0 +1,57 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/check-statement-status.ts
4
+ const SnowflakeCheckStatementStatusInput = z.object({
5
+ partition: z.number().int().describe("The partition number to return. The size of each partition is determined by Snowflake.").optional(),
6
+ requestId: z.string().describe("Unique ID (UUID) of the API request for idempotency.").optional(),
7
+ statementHandle: z.string().describe("The handle of the statement to be checked.")
8
+ });
9
+ const SnowflakeCheckStatementStatus_RowTypeInfoSchema = z.object({
10
+ name: z.string().describe("Name of the column.").nullable(),
11
+ type: z.string().describe("Data type of the column (e.g., 'text', 'fixed', 'timestamp_ltz').").nullable(),
12
+ scale: z.number().int().describe("Scale for numeric types.").nullable().optional(),
13
+ table: z.string().describe("Table name.").nullable(),
14
+ length: z.number().int().describe("Length for text types.").nullable().optional(),
15
+ schema: z.string().describe("Schema name.").nullable(),
16
+ database: z.string().describe("Database name.").nullable(),
17
+ nullable: z.boolean().describe("Whether the column is nullable.").nullable(),
18
+ collation: z.string().describe("Collation for text types.").nullable().optional(),
19
+ precision: z.number().int().describe("Precision for numeric types.").nullable().optional(),
20
+ byteLength: z.number().int().describe("Byte length for text types.").nullable().optional()
21
+ });
22
+ const SnowflakeCheckStatementStatus_PartitionInfoSchema = z.object({
23
+ rowCount: z.number().int().describe("Number of rows in this partition.").nullable(),
24
+ uncompressedSize: z.number().int().describe("Uncompressed size of the partition in bytes.").nullable()
25
+ });
26
+ const SnowflakeCheckStatementStatus_ResultSetMetadataSchema = z.object({
27
+ format: z.string().describe("Format of the result set (e.g., 'jsonv2').").nullable(),
28
+ numRows: z.number().int().describe("Total number of rows in the result set.").nullable(),
29
+ rowType: z.array(SnowflakeCheckStatementStatus_RowTypeInfoSchema).describe("Metadata describing each column in the result set."),
30
+ partitionInfo: z.array(SnowflakeCheckStatementStatus_PartitionInfoSchema).describe("Information about result set partitions.")
31
+ });
32
+ const snowflakeCheckStatementStatus = action("SNOWFLAKE_CHECK_STATEMENT_STATUS", {
33
+ slug: "snowflake-check-statement-status",
34
+ name: "Check Statement Status",
35
+ description: "Retrieves the status and results of a previously submitted SQL statement using its statement handle. Use this to poll async queries submitted via SNOWFLAKE_SUBMIT_SQL_STATEMENT; call repeatedly until status is no longer pending. Use SNOWFLAKE_CANCEL_STATEMENT to abort a hanging query.",
36
+ input: SnowflakeCheckStatementStatusInput,
37
+ output: z.object({
38
+ code: z.string().describe("Response code (e.g., '090001' for success).").nullable().optional(),
39
+ data: z.array(z.array(z.union([
40
+ z.string(),
41
+ z.number().int(),
42
+ z.number(),
43
+ z.boolean()
44
+ ]).nullable())).describe("The result set data as a 2D array, where each inner array represents a row.").nullable().optional(),
45
+ message: z.string().describe("Human-readable message describing the statement execution status.").nullable().optional(),
46
+ sqlState: z.string().describe("SQL state code (e.g., '00000' for success).").nullable().optional(),
47
+ createdOn: z.number().int().describe("Unix timestamp (in milliseconds) when the statement execution started.").nullable().optional(),
48
+ requestId: z.string().describe("Unique ID (UUID) of the API request.").nullable().optional(),
49
+ statementHandle: z.string().describe("Unique identifier (UUID) for the statement being executed.").nullable().optional(),
50
+ resultSetMetaData: SnowflakeCheckStatementStatus_ResultSetMetadataSchema.nullable().optional(),
51
+ statementStatusUrl: z.string().describe("URL path to retrieve the statement status and result set.").nullable().optional()
52
+ })
53
+ });
54
+ //#endregion
55
+ export { snowflakeCheckStatementStatus };
56
+
57
+ //# sourceMappingURL=check-statement-status.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-statement-status.mjs","names":[],"sources":["../../src/actions/check-statement-status.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SnowflakeCheckStatementStatusInput = z.object({\n partition: z.number().int().describe(\"The partition number to return. The size of each partition is determined by Snowflake.\").optional(),\n requestId: z.string().describe(\"Unique ID (UUID) of the API request for idempotency.\").optional(),\n statementHandle: z.string().describe(\"The handle of the statement to be checked.\"),\n});\nconst SnowflakeCheckStatementStatus_RowTypeInfoSchema = z.object({\n name: z.string().describe(\"Name of the column.\").nullable(),\n type: z.string().describe(\"Data type of the column (e.g., 'text', 'fixed', 'timestamp_ltz').\").nullable(),\n scale: z.number().int().describe(\"Scale for numeric types.\").nullable().optional(),\n table: z.string().describe(\"Table name.\").nullable(),\n length: z.number().int().describe(\"Length for text types.\").nullable().optional(),\n schema: z.string().describe(\"Schema name.\").nullable(),\n database: z.string().describe(\"Database name.\").nullable(),\n nullable: z.boolean().describe(\"Whether the column is nullable.\").nullable(),\n collation: z.string().describe(\"Collation for text types.\").nullable().optional(),\n precision: z.number().int().describe(\"Precision for numeric types.\").nullable().optional(),\n byteLength: z.number().int().describe(\"Byte length for text types.\").nullable().optional(),\n});\nconst SnowflakeCheckStatementStatus_PartitionInfoSchema = z.object({\n rowCount: z.number().int().describe(\"Number of rows in this partition.\").nullable(),\n uncompressedSize: z.number().int().describe(\"Uncompressed size of the partition in bytes.\").nullable(),\n});\nconst SnowflakeCheckStatementStatus_ResultSetMetadataSchema = z.object({\n format: z.string().describe(\"Format of the result set (e.g., 'jsonv2').\").nullable(),\n numRows: z.number().int().describe(\"Total number of rows in the result set.\").nullable(),\n rowType: z.array(SnowflakeCheckStatementStatus_RowTypeInfoSchema).describe(\"Metadata describing each column in the result set.\"),\n partitionInfo: z.array(SnowflakeCheckStatementStatus_PartitionInfoSchema).describe(\"Information about result set partitions.\"),\n});\nexport const SnowflakeCheckStatementStatusOutput = z.object({\n code: z.string().describe(\"Response code (e.g., '090001' for success).\").nullable().optional(),\n data: z.array(z.array(z.union([z.string(), z.number().int(), z.number(), z.boolean()]).nullable())).describe(\"The result set data as a 2D array, where each inner array represents a row.\").nullable().optional(),\n message: z.string().describe(\"Human-readable message describing the statement execution status.\").nullable().optional(),\n sqlState: z.string().describe(\"SQL state code (e.g., '00000' for success).\").nullable().optional(),\n createdOn: z.number().int().describe(\"Unix timestamp (in milliseconds) when the statement execution started.\").nullable().optional(),\n requestId: z.string().describe(\"Unique ID (UUID) of the API request.\").nullable().optional(),\n statementHandle: z.string().describe(\"Unique identifier (UUID) for the statement being executed.\").nullable().optional(),\n resultSetMetaData: SnowflakeCheckStatementStatus_ResultSetMetadataSchema.nullable().optional(),\n statementStatusUrl: z.string().describe(\"URL path to retrieve the statement status and result set.\").nullable().optional(),\n});\n\nexport const snowflakeCheckStatementStatus = action(\"SNOWFLAKE_CHECK_STATEMENT_STATUS\", {\n slug: \"snowflake-check-statement-status\",\n name: \"Check Statement Status\",\n description: \"Retrieves the status and results of a previously submitted SQL statement using its statement handle. Use this to poll async queries submitted via SNOWFLAKE_SUBMIT_SQL_STATEMENT; call repeatedly until status is no longer pending. Use SNOWFLAKE_CANCEL_STATEMENT to abort a hanging query.\",\n input: SnowflakeCheckStatementStatusInput,\n output: SnowflakeCheckStatementStatusOutput,\n});\n"],"mappings":"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"}
@@ -0,0 +1,24 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/drop-warehouse.ts
4
+ const SnowflakeDropWarehouseInput = zod.z.object({
5
+ name: zod.z.string().describe("Identifier (i.e. name) for the warehouse to drop. The value is case-sensitive and must match the exact warehouse name in Snowflake."),
6
+ if_exists: zod.z.boolean().default(false).describe("If true, the endpoint does not throw an error if the warehouse does not exist. It returns a 200 success response without taking action. If false, the endpoint throws an error if the warehouse doesn't exist.").optional()
7
+ });
8
+ const SnowflakeDropWarehouseOutput = zod.z.object({
9
+ code: zod.z.string().describe("Message code for asynchronous deletion (202 response).").nullable().optional(),
10
+ status: zod.z.string().describe("Status message for successful synchronous deletion (200 response).").nullable().optional(),
11
+ message: zod.z.string().describe("Message for asynchronous deletion indicating execution in progress (202 response).").nullable().optional(),
12
+ resultHandler: zod.z.string().describe("Opaque result ID used for checking request completion status (202 response).").nullable().optional()
13
+ });
14
+ const snowflakeDropWarehouse = require_action.action("SNOWFLAKE_DROP_WAREHOUSE", {
15
+ slug: "snowflake-drop-warehouse",
16
+ name: "Drop Warehouse",
17
+ description: "Drops (permanently deletes) a warehouse in Snowflake. This operation is irreversible — once a warehouse is dropped, it cannot be recovered. Use this action when you need to permanently remove a warehouse that is no longer needed. Requires OWNERSHIP privilege on the warehouse.",
18
+ input: SnowflakeDropWarehouseInput,
19
+ output: SnowflakeDropWarehouseOutput
20
+ });
21
+ //#endregion
22
+ exports.snowflakeDropWarehouse = snowflakeDropWarehouse;
23
+
24
+ //# sourceMappingURL=drop-warehouse.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop-warehouse.cjs","names":["z","action"],"sources":["../../src/actions/drop-warehouse.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SnowflakeDropWarehouseInput = z.object({\n name: z.string().describe(\"Identifier (i.e. name) for the warehouse to drop. The value is case-sensitive and must match the exact warehouse name in Snowflake.\"),\n if_exists: z.boolean().default(false).describe(\"If true, the endpoint does not throw an error if the warehouse does not exist. It returns a 200 success response without taking action. If false, the endpoint throws an error if the warehouse doesn't exist.\").optional(),\n});\nexport const SnowflakeDropWarehouseOutput = z.object({\n code: z.string().describe(\"Message code for asynchronous deletion (202 response).\").nullable().optional(),\n status: z.string().describe(\"Status message for successful synchronous deletion (200 response).\").nullable().optional(),\n message: z.string().describe(\"Message for asynchronous deletion indicating execution in progress (202 response).\").nullable().optional(),\n resultHandler: z.string().describe(\"Opaque result ID used for checking request completion status (202 response).\").nullable().optional(),\n});\n\nexport const snowflakeDropWarehouse = action(\"SNOWFLAKE_DROP_WAREHOUSE\", {\n slug: \"snowflake-drop-warehouse\",\n name: \"Drop Warehouse\",\n description: \"Drops (permanently deletes) a warehouse in Snowflake. This operation is irreversible — once a warehouse is dropped, it cannot be recovered. Use this action when you need to permanently remove a warehouse that is no longer needed. Requires OWNERSHIP privilege on the warehouse.\",\n input: SnowflakeDropWarehouseInput,\n output: SnowflakeDropWarehouseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qIAAqI;CAC/J,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gNAAgN,CAAC,CAAC,SAAS;AAC5Q,CAAC;AACD,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtH,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oFAAoF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvI,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzI,CAAC;AAED,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/drop-warehouse.d.ts
4
+ declare const SnowflakeDropWarehouseInput: z.ZodObject<{
5
+ name: z.ZodString;
6
+ if_exists: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
7
+ }, z.core.$strip>;
8
+ declare const SnowflakeDropWarehouseOutput: z.ZodObject<{
9
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ resultHandler: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ }, z.core.$strip>;
14
+ declare const snowflakeDropWarehouse: import("@keystrokehq/action").WorkflowActionDefinition<{
15
+ name: string;
16
+ if_exists?: boolean | undefined;
17
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
18
+ //#endregion
19
+ export { snowflakeDropWarehouse };
20
+ //# sourceMappingURL=drop-warehouse.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop-warehouse.d.cts","names":[],"sources":["../../src/actions/drop-warehouse.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;cAI3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;cAO5B,sBAAA,gCAAsB,wBAAA"}
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/drop-warehouse.d.ts
4
+ declare const SnowflakeDropWarehouseInput: z.ZodObject<{
5
+ name: z.ZodString;
6
+ if_exists: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
7
+ }, z.core.$strip>;
8
+ declare const SnowflakeDropWarehouseOutput: z.ZodObject<{
9
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ resultHandler: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ }, z.core.$strip>;
14
+ declare const snowflakeDropWarehouse: import("@keystrokehq/action").WorkflowActionDefinition<{
15
+ name: string;
16
+ if_exists?: boolean | undefined;
17
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
18
+ //#endregion
19
+ export { snowflakeDropWarehouse };
20
+ //# sourceMappingURL=drop-warehouse.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop-warehouse.d.mts","names":[],"sources":["../../src/actions/drop-warehouse.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;cAI3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;cAO5B,sBAAA,gCAAsB,wBAAA"}
@@ -0,0 +1,21 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const snowflakeDropWarehouse = action("SNOWFLAKE_DROP_WAREHOUSE", {
4
+ slug: "snowflake-drop-warehouse",
5
+ name: "Drop Warehouse",
6
+ description: "Drops (permanently deletes) a warehouse in Snowflake. This operation is irreversible — once a warehouse is dropped, it cannot be recovered. Use this action when you need to permanently remove a warehouse that is no longer needed. Requires OWNERSHIP privilege on the warehouse.",
7
+ input: z.object({
8
+ name: z.string().describe("Identifier (i.e. name) for the warehouse to drop. The value is case-sensitive and must match the exact warehouse name in Snowflake."),
9
+ if_exists: z.boolean().default(false).describe("If true, the endpoint does not throw an error if the warehouse does not exist. It returns a 200 success response without taking action. If false, the endpoint throws an error if the warehouse doesn't exist.").optional()
10
+ }),
11
+ output: z.object({
12
+ code: z.string().describe("Message code for asynchronous deletion (202 response).").nullable().optional(),
13
+ status: z.string().describe("Status message for successful synchronous deletion (200 response).").nullable().optional(),
14
+ message: z.string().describe("Message for asynchronous deletion indicating execution in progress (202 response).").nullable().optional(),
15
+ resultHandler: z.string().describe("Opaque result ID used for checking request completion status (202 response).").nullable().optional()
16
+ })
17
+ });
18
+ //#endregion
19
+ export { snowflakeDropWarehouse };
20
+
21
+ //# sourceMappingURL=drop-warehouse.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop-warehouse.mjs","names":[],"sources":["../../src/actions/drop-warehouse.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SnowflakeDropWarehouseInput = z.object({\n name: z.string().describe(\"Identifier (i.e. name) for the warehouse to drop. The value is case-sensitive and must match the exact warehouse name in Snowflake.\"),\n if_exists: z.boolean().default(false).describe(\"If true, the endpoint does not throw an error if the warehouse does not exist. It returns a 200 success response without taking action. If false, the endpoint throws an error if the warehouse doesn't exist.\").optional(),\n});\nexport const SnowflakeDropWarehouseOutput = z.object({\n code: z.string().describe(\"Message code for asynchronous deletion (202 response).\").nullable().optional(),\n status: z.string().describe(\"Status message for successful synchronous deletion (200 response).\").nullable().optional(),\n message: z.string().describe(\"Message for asynchronous deletion indicating execution in progress (202 response).\").nullable().optional(),\n resultHandler: z.string().describe(\"Opaque result ID used for checking request completion status (202 response).\").nullable().optional(),\n});\n\nexport const snowflakeDropWarehouse = action(\"SNOWFLAKE_DROP_WAREHOUSE\", {\n slug: \"snowflake-drop-warehouse\",\n name: \"Drop Warehouse\",\n description: \"Drops (permanently deletes) a warehouse in Snowflake. This operation is irreversible — once a warehouse is dropped, it cannot be recovered. Use this action when you need to permanently remove a warehouse that is no longer needed. Requires OWNERSHIP privilege on the warehouse.\",\n input: SnowflakeDropWarehouseInput,\n output: SnowflakeDropWarehouseOutput,\n});\n"],"mappings":";;AAeA,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAfyC,EAAE,OAAO;EAClD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,qIAAqI;EAC/J,WAAW,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gNAAgN,CAAC,CAAC,SAAS;CAC5Q,CAYS;CACP,QAZ0C,EAAE,OAAO;EACnD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACxG,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtH,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,oFAAoF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvI,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzI,CAOU;AACV,CAAC"}
@@ -0,0 +1,64 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/execute-sql.ts
4
+ const SnowflakeExecuteSqlInput = zod.z.object({
5
+ role: zod.z.string().describe("Role name to use for execution (case-sensitive). If not specified, uses the user's DEFAULT_ROLE setting.").optional(),
6
+ timeout: zod.z.number().int().describe("Execution timeout in seconds. Set to 0 for maximum timeout (604800 seconds). If not specified, uses the default timeout.").optional(),
7
+ bindings: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Values of bind variables in the SQL statement. Use this for parameterized queries to prevent SQL injection.").optional(),
8
+ database: zod.z.string().describe("Database name to use for execution (case-sensitive). If not specified, uses the user's DEFAULT_NAMESPACE setting.").optional(),
9
+ statement: zod.z.string().describe("SQL statement(s) to execute. Supports SELECT queries, DDL (CREATE, ALTER, DROP), and DML (INSERT, UPDATE, DELETE). Multiple statements can be separated by semicolons; they will be executed in sequence automatically. When querying INFORMATION_SCHEMA, always filter on both `table_schema` and `table_catalog` and wrap mixed AND/OR conditions in parentheses. For multi-statement batches, test critical sections in isolation first — a single failing statement obscures root cause."),
10
+ warehouse: zod.z.string().describe("Warehouse name to use for query execution (case-sensitive). Required for queries that need compute resources. If not specified, uses the user's DEFAULT_WAREHOUSE setting. Suspended or undersized warehouses cause high latency or timeouts; verify the warehouse is active and appropriately sized before execution.").optional(),
11
+ parameters: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Session parameters to set for the statement execution. These are Snowflake session-level parameters.").optional(),
12
+ schema_name: zod.z.string().describe("Schema name to use for execution (case-sensitive). If not specified, uses the user's DEFAULT_NAMESPACE setting.").optional()
13
+ });
14
+ const SnowflakeExecuteSql_RowTypeMetadataSchema = zod.z.object({
15
+ name: zod.z.string().describe("Column name").nullable(),
16
+ type: zod.z.string().describe("Data type of the column").nullable(),
17
+ scale: zod.z.number().int().describe("Scale for numeric types").nullable().optional(),
18
+ table: zod.z.string().describe("Table name").nullable(),
19
+ length: zod.z.number().int().describe("Length for text types").nullable().optional(),
20
+ schema: zod.z.string().describe("Schema name").nullable(),
21
+ database: zod.z.string().describe("Database name").nullable(),
22
+ nullable: zod.z.boolean().describe("Whether the column is nullable").nullable(),
23
+ collation: zod.z.string().describe("Collation for text types").nullable().optional(),
24
+ precision: zod.z.number().int().describe("Precision for numeric types").nullable().optional(),
25
+ byteLength: zod.z.number().int().describe("Byte length for text types").nullable().optional()
26
+ });
27
+ const SnowflakeExecuteSql_PartitionInfoSchema = zod.z.object({
28
+ rowCount: zod.z.number().int().describe("Number of rows in this partition").nullable(),
29
+ uncompressedSize: zod.z.number().int().describe("Uncompressed size in bytes").nullable()
30
+ });
31
+ const SnowflakeExecuteSql_ResultSetMetaDataSchema = zod.z.object({
32
+ format: zod.z.string().describe("Format of the result data (e.g., 'jsonv2')").nullable(),
33
+ numRows: zod.z.number().int().describe("Total number of rows in the result set").nullable(),
34
+ rowType: zod.z.array(SnowflakeExecuteSql_RowTypeMetadataSchema).describe("Metadata for each column in the result set"),
35
+ partitionInfo: zod.z.array(SnowflakeExecuteSql_PartitionInfoSchema).describe("Information about data partitions")
36
+ });
37
+ const SnowflakeExecuteSqlOutput = zod.z.object({
38
+ code: zod.z.string().describe("Status code from Snowflake (e.g., '090001' for success)").nullable().optional(),
39
+ data: zod.z.array(zod.z.array(zod.z.union([
40
+ zod.z.string(),
41
+ zod.z.number().int(),
42
+ zod.z.number(),
43
+ zod.z.boolean()
44
+ ]).nullable())).describe("The result set rows (single statement only). For multi-statement execution, use statementHandles to retrieve results individually.").nullable().optional(),
45
+ message: zod.z.string().describe("Execution status message").nullable().optional(),
46
+ sqlState: zod.z.string().describe("SQL state code (e.g., '00000' for success)").nullable().optional(),
47
+ createdOn: zod.z.number().int().describe("Timestamp in milliseconds since epoch when the statement was created").nullable().optional(),
48
+ statementHandle: zod.z.string().describe("Unique identifier for the executed statement (single statement only)").nullable().optional(),
49
+ statementHandles: zod.z.array(zod.z.string()).describe("Array of statement handles for multi-statement execution. Use these handles with CHECK_STATEMENT_STATUS to retrieve results for each statement.").nullable().optional(),
50
+ resultSetMetaData: SnowflakeExecuteSql_ResultSetMetaDataSchema.nullable().optional(),
51
+ statementStatusUrl: zod.z.string().describe("URL to check the execution status").nullable().optional(),
52
+ composio_execution_message: zod.z.string().describe("Additional execution information from Composio").nullable().optional()
53
+ });
54
+ const snowflakeExecuteSql = require_action.action("SNOWFLAKE_EXECUTE_SQL", {
55
+ slug: "snowflake-execute-sql",
56
+ name: "Execute SQL",
57
+ description: "Execute SQL statements in Snowflake and retrieve results. Supports SELECT queries for data retrieval, DDL statements (CREATE, ALTER, DROP) for schema management, and DML statements (INSERT, UPDATE, DELETE) for data modification. Returns comprehensive result metadata including column types, row counts, and execution status. Unquoted SQL identifiers are auto-uppercased by Snowflake — use matching case in `database`, `schema_name`, `warehouse`, and `role` parameters to avoid 'object not found' errors. Always apply explicit time-range filters and a LIMIT clause to unbounded SELECT queries to prevent large, slow result sets.",
58
+ input: SnowflakeExecuteSqlInput,
59
+ output: SnowflakeExecuteSqlOutput
60
+ });
61
+ //#endregion
62
+ exports.snowflakeExecuteSql = snowflakeExecuteSql;
63
+
64
+ //# sourceMappingURL=execute-sql.cjs.map