@activepieces/piece-snowflake 0.1.3 → 0.2.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 (70) hide show
  1. package/package.json +10 -15
  2. package/src/index.d.ts +4 -11
  3. package/src/index.d.ts.map +1 -0
  4. package/src/index.js +36 -56
  5. package/src/index.js.map +1 -1
  6. package/src/lib/actions/create-dynamic-table.d.ts +36 -0
  7. package/src/lib/actions/create-dynamic-table.d.ts.map +1 -0
  8. package/src/lib/actions/create-dynamic-table.js +81 -0
  9. package/src/lib/actions/create-dynamic-table.js.map +1 -0
  10. package/src/lib/actions/delete-row.d.ts +43 -0
  11. package/src/lib/actions/delete-row.d.ts.map +1 -0
  12. package/src/lib/actions/delete-row.js +45 -0
  13. package/src/lib/actions/delete-row.js.map +1 -0
  14. package/src/lib/actions/execute-stored-procedure.d.ts +43 -0
  15. package/src/lib/actions/execute-stored-procedure.d.ts.map +1 -0
  16. package/src/lib/actions/execute-stored-procedure.js +92 -0
  17. package/src/lib/actions/execute-stored-procedure.js.map +1 -0
  18. package/src/lib/actions/get-row-by-id.d.ts +53 -0
  19. package/src/lib/actions/get-row-by-id.d.ts.map +1 -0
  20. package/src/lib/actions/get-row-by-id.js +67 -0
  21. package/src/lib/actions/get-row-by-id.js.map +1 -0
  22. package/src/lib/actions/get-table-schema.d.ts +42 -0
  23. package/src/lib/actions/get-table-schema.d.ts.map +1 -0
  24. package/src/lib/actions/get-table-schema.js +49 -0
  25. package/src/lib/actions/get-table-schema.js.map +1 -0
  26. package/src/lib/actions/insert-multiple-rows.d.ts +43 -0
  27. package/src/lib/actions/insert-multiple-rows.d.ts.map +1 -0
  28. package/src/lib/actions/insert-multiple-rows.js +81 -0
  29. package/src/lib/actions/insert-multiple-rows.js.map +1 -0
  30. package/src/lib/actions/insert-row.d.ts +16 -10
  31. package/src/lib/actions/insert-row.d.ts.map +1 -0
  32. package/src/lib/actions/insert-row.js +3 -3
  33. package/src/lib/actions/insert-row.js.map +1 -1
  34. package/src/lib/actions/list-tables.d.ts +32 -0
  35. package/src/lib/actions/list-tables.d.ts.map +1 -0
  36. package/src/lib/actions/list-tables.js +47 -0
  37. package/src/lib/actions/list-tables.js.map +1 -0
  38. package/src/lib/actions/load-data-from-stage.d.ts +48 -0
  39. package/src/lib/actions/load-data-from-stage.d.ts.map +1 -0
  40. package/src/lib/actions/load-data-from-stage.js +117 -0
  41. package/src/lib/actions/load-data-from-stage.js.map +1 -0
  42. package/src/lib/actions/run-multiple-queries.d.ts +4 -2
  43. package/src/lib/actions/run-multiple-queries.d.ts.map +1 -0
  44. package/src/lib/actions/run-multiple-queries.js +3 -3
  45. package/src/lib/actions/run-multiple-queries.js.map +1 -1
  46. package/src/lib/actions/run-query.d.ts +4 -2
  47. package/src/lib/actions/run-query.d.ts.map +1 -0
  48. package/src/lib/actions/run-query.js +11 -26
  49. package/src/lib/actions/run-query.js.map +1 -1
  50. package/src/lib/actions/search-rows.d.ts +45 -0
  51. package/src/lib/actions/search-rows.d.ts.map +1 -0
  52. package/src/lib/actions/search-rows.js +58 -0
  53. package/src/lib/actions/search-rows.js.map +1 -0
  54. package/src/lib/actions/update-row.d.ts +53 -0
  55. package/src/lib/actions/update-row.d.ts.map +1 -0
  56. package/src/lib/actions/update-row.js +54 -0
  57. package/src/lib/actions/update-row.js.map +1 -0
  58. package/src/lib/actions/upsert-row.d.ts +62 -0
  59. package/src/lib/actions/upsert-row.d.ts.map +1 -0
  60. package/src/lib/actions/upsert-row.js +93 -0
  61. package/src/lib/actions/upsert-row.js.map +1 -0
  62. package/src/lib/auth.d.ts +22 -0
  63. package/src/lib/auth.d.ts.map +1 -0
  64. package/src/lib/auth.js +243 -0
  65. package/src/lib/auth.js.map +1 -0
  66. package/src/lib/common/index.d.ts +49 -11
  67. package/src/lib/common/index.d.ts.map +1 -0
  68. package/src/lib/common/index.js +93 -41
  69. package/src/lib/common/index.js.map +1 -1
  70. package/README.md +0 -1
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.upsertRowAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const common_1 = require("../common");
8
+ exports.upsertRowAction = (0, pieces_framework_1.createAction)({
9
+ name: 'upsert_row',
10
+ displayName: 'Upsert Row',
11
+ description: 'Insert a new row or update an existing one if a row with the same match column value already exists (MERGE INTO).',
12
+ auth: auth_1.snowflakeAuth,
13
+ props: {
14
+ database: common_1.snowflakeCommonProps.database,
15
+ schema: common_1.snowflakeCommonProps.schema,
16
+ table: common_1.snowflakeCommonProps.table,
17
+ match_column: pieces_framework_1.Property.Dropdown({
18
+ auth: auth_1.snowflakeAuth,
19
+ displayName: 'Match Column',
20
+ description: 'The column used to identify whether a row already exists (e.g. the primary key or a unique identifier column).',
21
+ refreshers: ['table'],
22
+ required: true,
23
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, table }) {
24
+ if (!auth) {
25
+ return {
26
+ disabled: true,
27
+ options: [],
28
+ placeholder: 'Please connect your account first',
29
+ };
30
+ }
31
+ if (!table) {
32
+ return {
33
+ disabled: true,
34
+ options: [],
35
+ placeholder: 'Please select a table first',
36
+ };
37
+ }
38
+ return (0, common_1.getTableColumnOptions)(auth, table);
39
+ }),
40
+ }),
41
+ table_column_values: common_1.snowflakeCommonProps.table_column_values,
42
+ },
43
+ run(context) {
44
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
45
+ var _a, _b, _c, _d;
46
+ const { table, match_column, table_column_values: columnValues, } = context.propsValue;
47
+ const columns = Object.keys(columnValues);
48
+ if (columns.length === 0) {
49
+ throw new Error('At least one column value must be provided.');
50
+ }
51
+ if (!columns.includes(match_column)) {
52
+ throw new Error(`Match column "${match_column}" must be included in the column values. ` +
53
+ `Please add a value for "${match_column}" in the columns to upsert.`);
54
+ }
55
+ // Build MERGE INTO statement
56
+ // source: SELECT ? AS col1, ? AS col2, ...
57
+ const sourceSelects = columns.map((col) => `? AS ${col}`).join(', ');
58
+ const updateEntries = columns.filter((col) => col !== match_column);
59
+ if (updateEntries.length === 0) {
60
+ throw new Error('At least one column other than the match column must be provided to update.');
61
+ }
62
+ const updateSets = updateEntries
63
+ .map((col) => `target.${col} = source.${col}`)
64
+ .join(', ');
65
+ const insertCols = columns.join(', ');
66
+ const insertVals = columns.map((col) => `source.${col}`).join(', ');
67
+ const sql = `
68
+ MERGE INTO ${table} AS target
69
+ USING (SELECT ${sourceSelects}) AS source
70
+ ON target.${match_column} = source.${match_column}
71
+ WHEN MATCHED THEN
72
+ UPDATE SET ${updateSets}
73
+ WHEN NOT MATCHED THEN
74
+ INSERT (${insertCols}) VALUES (${insertVals})
75
+ `.trim();
76
+ const binds = Object.values(columnValues);
77
+ const connection = (0, common_1.configureConnection)(context.auth);
78
+ yield (0, common_1.connect)(connection);
79
+ try {
80
+ const result = yield (0, common_1.execute)(connection, sql, binds);
81
+ return {
82
+ success: true,
83
+ rows_inserted: (_b = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a['number of rows inserted']) !== null && _b !== void 0 ? _b : null,
84
+ rows_updated: (_d = (_c = result === null || result === void 0 ? void 0 : result[0]) === null || _c === void 0 ? void 0 : _c['number of rows updated']) !== null && _d !== void 0 ? _d : null,
85
+ };
86
+ }
87
+ finally {
88
+ yield (0, common_1.destroy)(connection);
89
+ }
90
+ });
91
+ },
92
+ });
93
+ //# sourceMappingURL=upsert-row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upsert-row.js","sourceRoot":"","sources":["../../../../src/lib/actions/upsert-row.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAwC;AACxC,sCAQmB;AAEN,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EACT,mHAAm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MAAM,GAAG,MAAM,IAAA,gBAAO,EAAC,UAAU,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;gBACrD,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,aAAa,EAAE,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,CAAC,0CAAG,yBAAyB,CAAC,mCAAI,IAAI;oBAC/D,YAAY,EAAE,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,CAAC,0CAAG,wBAAwB,CAAC,mCAAI,IAAI;iBAC9D,CAAC;YACJ,CAAC;oBAAS,CAAC;gBACT,MAAM,IAAA,gBAAO,EAAC,UAAU,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ export declare const snowflakeOAuth2Auth: import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>;
2
+ export declare const snowflakeCustomAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
3
+ account: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
+ password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
7
+ privateKeyPassphrase: import("@activepieces/pieces-framework").SecretTextProperty<false>;
8
+ database: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ role: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ warehouse: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>;
12
+ export declare const snowflakeAuth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
13
+ account: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
+ password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
16
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
17
+ privateKeyPassphrase: import("@activepieces/pieces-framework").SecretTextProperty<false>;
18
+ database: import("@activepieces/pieces-framework").ShortTextProperty<false>;
19
+ role: import("@activepieces/pieces-framework").ShortTextProperty<false>;
20
+ warehouse: import("@activepieces/pieces-framework").ShortTextProperty<false>;
21
+ }>)[];
22
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,mBAAmB,+GAkG9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;EA4H9B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;KAA6C,CAAC"}
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.snowflakeAuth = exports.snowflakeCustomAuth = exports.snowflakeOAuth2Auth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const snowflake_sdk_1 = tslib_1.__importDefault(require("snowflake-sdk"));
7
+ // Suppress the SDK's verbose INFO/DEBUG logs so they don't corrupt stdout IPC
8
+ snowflake_sdk_1.default.configure({ logLevel: 'ERROR' });
9
+ function formatPrivateKey(privateKey) {
10
+ const lines = privateKey
11
+ .replace('-----BEGIN PRIVATE KEY-----', '')
12
+ .replace('-----END PRIVATE KEY-----', '')
13
+ .trim()
14
+ .split(' ');
15
+ return [
16
+ '-----BEGIN PRIVATE KEY-----',
17
+ ...lines,
18
+ '-----END PRIVATE KEY-----',
19
+ ].join('\n');
20
+ }
21
+ function connectAsync(conn) {
22
+ return new Promise((resolve, reject) => conn.connect((err) => (err ? reject(err) : resolve())));
23
+ }
24
+ function destroyAsync(conn) {
25
+ return new Promise((resolve, reject) => conn.destroy((err) => (err ? reject(err) : resolve())));
26
+ }
27
+ exports.snowflakeOAuth2Auth = pieces_framework_1.PieceAuth.OAuth2({
28
+ displayName: 'OAuth',
29
+ description: `Connect via Snowflake OAuth using a custom security integration.
30
+
31
+ > **Prerequisite:** You need the \`ACCOUNTADMIN\` role (or a role with the \`CREATE INTEGRATION\` privilege).
32
+
33
+ ---
34
+
35
+ ### Step 1 — Create a security integration
36
+
37
+ Open a **SQL Worksheet** in your Snowflake console and run:
38
+
39
+ \`\`\`sql
40
+ CREATE SECURITY INTEGRATION "activepieces"
41
+ TYPE = OAUTH
42
+ OAUTH_CLIENT = CUSTOM
43
+ OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
44
+ OAUTH_REDIRECT_URI = 'https://cloud.activepieces.com/redirect'
45
+ ENABLED = TRUE
46
+ OAUTH_ISSUE_REFRESH_TOKENS = TRUE;
47
+ \`\`\`
48
+
49
+ > Replace the redirect URI with the one shown on your Activepieces OAuth connection page.
50
+
51
+ ---
52
+
53
+ ### Step 2 — Retrieve client credentials
54
+
55
+ Run the following query to get your **Client ID** and **Client Secret**:
56
+
57
+ \`\`\`sql
58
+ SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('activepieces');
59
+ \`\`\`
60
+
61
+ Copy \`OAUTH_CLIENT_ID\` and \`OAUTH_CLIENT_SECRET\` from the JSON result.
62
+
63
+ ---
64
+
65
+ ### Step 3 — Find your Account Identifier
66
+
67
+ Click the **account icon** at the bottom-left of the Snowflake console → **View account details**.
68
+ Copy the **Account Identifier** (e.g. \`xy12345.us-east-1\` or \`orgname-accountname\`).
69
+
70
+ ---
71
+
72
+ ### Step 4 — Connect
73
+
74
+ Enter the **Client ID** and **Client Secret** in the Activepieces OAuth2 settings for this connection, fill in the **Account Identifier** below, then click **Connect**.`,
75
+ authUrl: 'https://{account}.snowflakecomputing.com/oauth/authorize',
76
+ tokenUrl: 'https://{account}.snowflakecomputing.com/oauth/token-request',
77
+ scope: ['session:role-any', 'refresh_token'],
78
+ pkce: false,
79
+ authorizationMethod: pieces_framework_1.OAuth2AuthorizationMethod.BODY,
80
+ required: true,
81
+ props: {
82
+ account: pieces_framework_1.Property.ShortText({
83
+ displayName: 'Account Identifier',
84
+ required: true,
85
+ description: 'Account icon (bottom-left) → **View account details** → copy the **Account Identifier**. Examples: `xy12345.us-east-1`, `orgname-accountname`.',
86
+ }),
87
+ database: pieces_framework_1.Property.ShortText({
88
+ displayName: 'Default Database',
89
+ required: false,
90
+ description: 'Optional. Default database for queries. Find names under **Data → Databases**.',
91
+ }),
92
+ warehouse: pieces_framework_1.Property.ShortText({
93
+ displayName: 'Default Warehouse',
94
+ required: false,
95
+ description: 'Optional. Default virtual warehouse. Find names under **Admin → Warehouses**.',
96
+ }),
97
+ role: pieces_framework_1.Property.ShortText({
98
+ displayName: 'Default Role',
99
+ required: false,
100
+ description: 'Optional. Default security role. Find names under **Admin → Users & Roles → Roles**.',
101
+ }),
102
+ },
103
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
104
+ try {
105
+ const conn = snowflake_sdk_1.default.createConnection({
106
+ account: auth.props['account'],
107
+ authenticator: 'OAUTH',
108
+ token: auth.access_token,
109
+ database: auth.props['database'],
110
+ warehouse: auth.props['warehouse'],
111
+ role: auth.props['role'],
112
+ application: 'ActivePieces',
113
+ });
114
+ yield connectAsync(conn);
115
+ yield destroyAsync(conn);
116
+ return { valid: true };
117
+ }
118
+ catch (e) {
119
+ return { valid: false, error: e.message };
120
+ }
121
+ }),
122
+ });
123
+ exports.snowflakeCustomAuth = pieces_framework_1.PieceAuth.CustomAuth({
124
+ displayName: 'Username & Password / Key Pair',
125
+ description: `Connect using your Snowflake username with either a **password** or an **RSA private key**.
126
+
127
+ ### Finding your Account Identifier
128
+
129
+ Click the **account icon** at the bottom-left of the Snowflake console → **View account details**.
130
+ Copy the **Account Identifier** (e.g. \`xy12345.us-east-1\` or \`orgname-accountname\`).
131
+
132
+ ---
133
+
134
+ ### Option A — Password
135
+
136
+ Use your Snowflake username and the password you use to log in at [app.snowflake.com](https://app.snowflake.com).
137
+ Your username is shown in the profile section at the top-left of the console, or under **Admin → Users & Roles → Users**.
138
+
139
+ ---
140
+
141
+ ### Option B — Key Pair *(recommended for automation)*
142
+
143
+ **1. Generate a key pair** (run in your terminal):
144
+
145
+ \`\`\`bash
146
+ # Unencrypted (no passphrase needed)
147
+ openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -out rsa_key.p8
148
+ openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
149
+
150
+ # Encrypted (you will be prompted for a passphrase)
151
+ openssl genrsa 2048 | openssl pkcs8 -topk8 -out rsa_key_encrypted.p8
152
+ openssl rsa -in rsa_key_encrypted.p8 -pubout -out rsa_key.pub
153
+ \`\`\`
154
+
155
+ **2. Register the public key** with your Snowflake user (run in a SQL Worksheet):
156
+
157
+ \`\`\`sql
158
+ ALTER USER <your_username>
159
+ SET RSA_PUBLIC_KEY='<contents of rsa_key.pub, excluding the BEGIN/END lines>';
160
+ \`\`\`
161
+
162
+ **3. Paste the private key** — copy the full contents of \`rsa_key.p8\` (including the \`-----BEGIN PRIVATE KEY-----\` header and footer) into the **Private Key** field below.`,
163
+ props: {
164
+ account: pieces_framework_1.Property.ShortText({
165
+ displayName: 'Account Identifier',
166
+ required: true,
167
+ description: 'Account icon (bottom-left) → **View account details** → copy the **Account Identifier**. Examples: `xy12345.us-east-1`, `orgname-accountname`.',
168
+ }),
169
+ username: pieces_framework_1.Property.ShortText({
170
+ displayName: 'Username',
171
+ required: true,
172
+ description: 'Your Snowflake login name. Shown in the profile section (top-left of the console) or under **Admin → Users & Roles → Users**.',
173
+ }),
174
+ password: pieces_framework_1.PieceAuth.SecretText({
175
+ displayName: 'Password',
176
+ description: 'Your Snowflake password *(Option A)*. Leave blank if you are using a Private Key.',
177
+ required: false,
178
+ }),
179
+ privateKey: pieces_framework_1.PieceAuth.SecretText({
180
+ displayName: 'Private Key',
181
+ description: 'RSA private key in PEM format *(Option B)*. Paste the full contents of your `.p8` file, including the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` lines. Leave blank if you are using a Password.',
182
+ required: false,
183
+ }),
184
+ privateKeyPassphrase: pieces_framework_1.PieceAuth.SecretText({
185
+ displayName: 'Private Key Passphrase',
186
+ description: 'Passphrase for the private key. Only required if you generated an **encrypted** key pair.',
187
+ required: false,
188
+ }),
189
+ database: pieces_framework_1.Property.ShortText({
190
+ displayName: 'Default Database',
191
+ description: 'Optional. Default database for queries. Find names under **Data → Databases**.',
192
+ required: false,
193
+ }),
194
+ role: pieces_framework_1.Property.ShortText({
195
+ displayName: 'Default Role',
196
+ description: 'Optional. Default security role. Find names under **Admin → Users & Roles → Roles**.',
197
+ required: false,
198
+ }),
199
+ warehouse: pieces_framework_1.Property.ShortText({
200
+ displayName: 'Default Warehouse',
201
+ description: 'Optional. Default virtual warehouse. Find names under **Admin → Warehouses**.',
202
+ required: false,
203
+ }),
204
+ },
205
+ required: true,
206
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
207
+ if (!auth.password && !auth.privateKey) {
208
+ return {
209
+ valid: false,
210
+ error: 'Either Password or Private Key must be provided.',
211
+ };
212
+ }
213
+ try {
214
+ const connectionOptions = {
215
+ account: auth.account,
216
+ username: auth.username,
217
+ database: auth.database,
218
+ warehouse: auth.warehouse,
219
+ role: auth.role,
220
+ application: 'ActivePieces',
221
+ };
222
+ if (auth.privateKey) {
223
+ connectionOptions.authenticator = 'SNOWFLAKE_JWT';
224
+ connectionOptions.privateKey = formatPrivateKey(auth.privateKey);
225
+ if (auth.privateKeyPassphrase) {
226
+ connectionOptions.privateKeyPass = auth.privateKeyPassphrase;
227
+ }
228
+ }
229
+ else {
230
+ connectionOptions.password = auth.password;
231
+ }
232
+ const conn = snowflake_sdk_1.default.createConnection(connectionOptions);
233
+ yield connectAsync(conn);
234
+ yield destroyAsync(conn);
235
+ return { valid: true };
236
+ }
237
+ catch (e) {
238
+ return { valid: false, error: e.message };
239
+ }
240
+ }),
241
+ });
242
+ exports.snowflakeAuth = [exports.snowflakeOAuth2Auth, exports.snowflakeCustomAuth];
243
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,0EAAsC;AAEtC,8EAA8E;AAC9E,uBAAS,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAEnC,CAAC,CAAC;AAEN,SAAS,gBAAgB,CAAC,UAAkB;IAC1C,MAAM,KAAK,GAAG,UAAU;SACrB,OAAO,CAAC,6BAA6B,EAAE,EAAE,CAAC;SAC1C,OAAO,CAAC,2BAA2B,EAAE,EAAE,CAAC;SACxC,IAAI,EAAE;SACN,KAAK,CAAC,GAAG,CAAC,CAAC;IACd,OAAO;QACL,6BAA6B;QAC7B,GAAG,KAAK;QACR,2BAA2B;KAC5B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,YAAY,CAAC,IAA0B;IAC9C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CACrC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CACvD,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,IAA0B;IAC9C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CACrC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CACvD,CAAC;AACJ,CAAC;AAEY,QAAA,mBAAmB,GAAG,4BAAS,CAAC,MAAM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ACN,iBAAiB,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC7C,CAAC;YACD,MAAM,IAAI,GAAG,uBAAS,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;YAC3D,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;YACzB,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;YACzB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAG,CAAW,CAAC,OAAO,EAAE,CAAC;QACvD,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,CAAC,2BAAmB,EAAE,2BAAmB,CAAC,CAAC"}
@@ -1,45 +1,83 @@
1
- import { PiecePropValueSchema } from '@activepieces/pieces-framework';
2
- import { snowflakeAuth } from '../..';
1
+ import { DropdownState } from '@activepieces/pieces-framework';
2
+ import { AppConnectionType } from '@activepieces/shared';
3
3
  import snowflake from 'snowflake-sdk';
4
- export declare function configureConnection(auth: PiecePropValueSchema<typeof snowflakeAuth>, application?: string, timeout?: number): snowflake.Connection;
4
+ export type SnowflakeAuthValue = {
5
+ type: AppConnectionType.OAUTH2;
6
+ access_token: string;
7
+ props: {
8
+ account: string;
9
+ database?: string;
10
+ warehouse?: string;
11
+ role?: string;
12
+ };
13
+ } | {
14
+ type: AppConnectionType.CUSTOM_AUTH;
15
+ props: {
16
+ account: string;
17
+ username: string;
18
+ password?: string;
19
+ privateKey?: string;
20
+ privateKeyPassphrase?: string;
21
+ database?: string;
22
+ role?: string;
23
+ warehouse?: string;
24
+ };
25
+ };
26
+ export declare function configureConnection(auth: SnowflakeAuthValue, application?: string, timeout?: number): snowflake.Connection;
5
27
  export declare function connect(conn: snowflake.Connection): Promise<void>;
6
28
  export declare function destroy(conn: snowflake.Connection): Promise<void>;
7
29
  export declare function execute(conn: snowflake.Connection, sqlText: string, binds: snowflake.Binds): Promise<any[] | undefined>;
8
30
  export declare const snowflakeCommonProps: {
9
- database: import("@activepieces/pieces-framework").DropdownProperty<any, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
31
+ database: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
32
+ account: import("@activepieces/pieces-framework").ShortTextProperty<true>;
33
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
34
+ password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
35
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
36
+ privateKeyPassphrase: import("@activepieces/pieces-framework").SecretTextProperty<false>;
37
+ database: import("@activepieces/pieces-framework").ShortTextProperty<false>;
38
+ role: import("@activepieces/pieces-framework").ShortTextProperty<false>;
39
+ warehouse: import("@activepieces/pieces-framework").ShortTextProperty<false>;
40
+ }>)[]>;
41
+ schema: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
10
42
  account: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
43
  username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
12
44
  password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
13
45
  privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
46
+ privateKeyPassphrase: import("@activepieces/pieces-framework").SecretTextProperty<false>;
14
47
  database: import("@activepieces/pieces-framework").ShortTextProperty<false>;
15
48
  role: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
49
  warehouse: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
- }>>;
18
- schema: import("@activepieces/pieces-framework").DropdownProperty<any, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
50
+ }>)[]>;
51
+ table: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
19
52
  account: import("@activepieces/pieces-framework").ShortTextProperty<true>;
20
53
  username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
21
54
  password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
22
55
  privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
56
+ privateKeyPassphrase: import("@activepieces/pieces-framework").SecretTextProperty<false>;
23
57
  database: import("@activepieces/pieces-framework").ShortTextProperty<false>;
24
58
  role: import("@activepieces/pieces-framework").ShortTextProperty<false>;
25
59
  warehouse: import("@activepieces/pieces-framework").ShortTextProperty<false>;
26
- }>>;
27
- table: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
60
+ }>)[]>;
61
+ table_column_values: import("@activepieces/pieces-framework").DynamicProperties<true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
28
62
  account: import("@activepieces/pieces-framework").ShortTextProperty<true>;
29
63
  username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
30
64
  password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
31
65
  privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
66
+ privateKeyPassphrase: import("@activepieces/pieces-framework").SecretTextProperty<false>;
32
67
  database: import("@activepieces/pieces-framework").ShortTextProperty<false>;
33
68
  role: import("@activepieces/pieces-framework").ShortTextProperty<false>;
34
69
  warehouse: import("@activepieces/pieces-framework").ShortTextProperty<false>;
35
- }>>;
36
- table_column_values: import("@activepieces/pieces-framework").DynamicProperties<true, import("@activepieces/pieces-framework").CustomAuthProperty<{
70
+ }>)[]>;
71
+ table_update_values: import("@activepieces/pieces-framework").DynamicProperties<true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
37
72
  account: import("@activepieces/pieces-framework").ShortTextProperty<true>;
38
73
  username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
39
74
  password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
40
75
  privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
76
+ privateKeyPassphrase: import("@activepieces/pieces-framework").SecretTextProperty<false>;
41
77
  database: import("@activepieces/pieces-framework").ShortTextProperty<false>;
42
78
  role: import("@activepieces/pieces-framework").ShortTextProperty<false>;
43
79
  warehouse: import("@activepieces/pieces-framework").ShortTextProperty<false>;
44
- }>>;
80
+ }>)[]>;
45
81
  };
82
+ export declare function getTableColumnOptions(auth: SnowflakeAuthValue, table: string): Promise<DropdownState<string>>;
83
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAEd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,SAAS,MAAM,eAAe,CAAC;AAKtC,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC,WAAW,CAAC;IACpC,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,C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