@superdurable/connector-amazon-redshift 0.1.0 → 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.
- package/README.md +3 -1
- package/dex-connector.json +228 -2
- package/dist/chunk-V4IZMGI7.js +293 -0
- package/dist/connection-QfejfWYW.d.ts +185 -0
- package/dist/index.d.ts +249 -6
- package/dist/index.js +371 -8
- package/dist/mock.d.ts +85 -3
- package/dist/mock.js +205 -3
- package/package.json +2 -2
- package/dist/chunk-OEV6UKQQ.js +0 -113
- package/dist/connection-BikiyVDi.d.ts +0 -77
package/dist/mock.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CancelStatementDefinition,
|
|
3
|
+
CancelStatementInputSchema,
|
|
4
|
+
DescribeStatementDefinition,
|
|
5
|
+
DescribeStatementInputSchema,
|
|
6
|
+
ExecuteStatementDefinition,
|
|
7
|
+
ExecuteStatementInputSchema,
|
|
2
8
|
GetStatementResultDefinition,
|
|
3
9
|
GetStatementResultInputSchema,
|
|
10
|
+
ListStatementsDefinition,
|
|
11
|
+
ListStatementsInputSchema,
|
|
4
12
|
ProviderID,
|
|
13
|
+
StatementCancellationSchema,
|
|
14
|
+
StatementIdentitySchema,
|
|
15
|
+
StatementPageSchema,
|
|
5
16
|
StatementResultPageSchema,
|
|
17
|
+
StatementStatusSchema,
|
|
6
18
|
newConnectionWithOperations
|
|
7
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-V4IZMGI7.js";
|
|
8
20
|
|
|
9
21
|
// src/generated/mock.ts
|
|
10
|
-
import { branchCase, retryCase, newQuery } from "@superdurable/connectors-sdk/connectormock";
|
|
22
|
+
import { branchCase, retryCase, newMutation, newQuery } from "@superdurable/connectors-sdk/connectormock";
|
|
11
23
|
var emptyGetStatementResultInput = GetStatementResultInputSchema.parse({
|
|
12
24
|
"statementId": "",
|
|
13
25
|
"nextToken": ""
|
|
@@ -17,6 +29,36 @@ var emptyStatementResultPage = StatementResultPageSchema.parse({
|
|
|
17
29
|
"nextToken": "",
|
|
18
30
|
"totalNumRows": 0
|
|
19
31
|
});
|
|
32
|
+
var emptyExecuteStatementInput = ExecuteStatementInputSchema.parse({
|
|
33
|
+
"workgroupName": "",
|
|
34
|
+
"database": "",
|
|
35
|
+
"sql": ""
|
|
36
|
+
});
|
|
37
|
+
var emptyStatementIdentity = StatementIdentitySchema.parse({
|
|
38
|
+
"id": ""
|
|
39
|
+
});
|
|
40
|
+
var emptyDescribeStatementInput = DescribeStatementInputSchema.parse({
|
|
41
|
+
"statementId": ""
|
|
42
|
+
});
|
|
43
|
+
var emptyStatementStatus = StatementStatusSchema.parse({
|
|
44
|
+
"id": "",
|
|
45
|
+
"status": "",
|
|
46
|
+
"hasResultSet": false
|
|
47
|
+
});
|
|
48
|
+
var emptyListStatementsInput = ListStatementsInputSchema.parse({
|
|
49
|
+
"maxResults": 0,
|
|
50
|
+
"nextToken": ""
|
|
51
|
+
});
|
|
52
|
+
var emptyStatementPage = StatementPageSchema.parse({
|
|
53
|
+
"statements": [],
|
|
54
|
+
"nextToken": ""
|
|
55
|
+
});
|
|
56
|
+
var emptyCancelStatementInput = CancelStatementInputSchema.parse({
|
|
57
|
+
"statementId": ""
|
|
58
|
+
});
|
|
59
|
+
var emptyStatementCancellation = StatementCancellationSchema.parse({
|
|
60
|
+
"canceled": false
|
|
61
|
+
});
|
|
20
62
|
function getStatementResultFetched(value, failure) {
|
|
21
63
|
return branchCase("fetched", value, failure);
|
|
22
64
|
}
|
|
@@ -42,11 +84,116 @@ function getStatementResultFetchedDefault() {
|
|
|
42
84
|
function getStatementResultDefault() {
|
|
43
85
|
return getStatementResultFetchedDefault();
|
|
44
86
|
}
|
|
87
|
+
function executeStatementSubmitted(value, failure) {
|
|
88
|
+
return branchCase("submitted", value, failure);
|
|
89
|
+
}
|
|
90
|
+
function executeStatementProviderRejected(value, failure) {
|
|
91
|
+
return branchCase("providerRejected", value, failure);
|
|
92
|
+
}
|
|
93
|
+
function executeStatementInvalidResponse(value, failure) {
|
|
94
|
+
return branchCase("invalidResponse", value, failure);
|
|
95
|
+
}
|
|
96
|
+
function executeStatementDefect(value, failure) {
|
|
97
|
+
return branchCase("defect", value, failure);
|
|
98
|
+
}
|
|
99
|
+
function executeStatementRetry(failure, retryAfterMs = 0) {
|
|
100
|
+
return retryCase(failure, retryAfterMs);
|
|
101
|
+
}
|
|
102
|
+
function executeStatementSubmittedDefault() {
|
|
103
|
+
const value = StatementIdentitySchema.parse({ "id": "123e4567-e89b-12d3-a456-426614174000" });
|
|
104
|
+
return branchCase("submitted", value);
|
|
105
|
+
}
|
|
106
|
+
function executeStatementDefault() {
|
|
107
|
+
return executeStatementSubmittedDefault();
|
|
108
|
+
}
|
|
109
|
+
function describeStatementDescribed(value, failure) {
|
|
110
|
+
return branchCase("described", value, failure);
|
|
111
|
+
}
|
|
112
|
+
function describeStatementMissing(value, failure) {
|
|
113
|
+
return branchCase("missing", value, failure);
|
|
114
|
+
}
|
|
115
|
+
function describeStatementProviderRejected(value, failure) {
|
|
116
|
+
return branchCase("providerRejected", value, failure);
|
|
117
|
+
}
|
|
118
|
+
function describeStatementInvalidResponse(value, failure) {
|
|
119
|
+
return branchCase("invalidResponse", value, failure);
|
|
120
|
+
}
|
|
121
|
+
function describeStatementDefect(value, failure) {
|
|
122
|
+
return branchCase("defect", value, failure);
|
|
123
|
+
}
|
|
124
|
+
function describeStatementRetry(failure, retryAfterMs = 0) {
|
|
125
|
+
return retryCase(failure, retryAfterMs);
|
|
126
|
+
}
|
|
127
|
+
function describeStatementDescribedDefault() {
|
|
128
|
+
const value = StatementStatusSchema.parse({ "hasResultSet": true, "id": "123e4567-e89b-12d3-a456-426614174000", "status": "FINISHED" });
|
|
129
|
+
return branchCase("described", value);
|
|
130
|
+
}
|
|
131
|
+
function describeStatementDefault() {
|
|
132
|
+
return describeStatementDescribedDefault();
|
|
133
|
+
}
|
|
134
|
+
function listStatementsListed(value, failure) {
|
|
135
|
+
return branchCase("listed", value, failure);
|
|
136
|
+
}
|
|
137
|
+
function listStatementsProviderRejected(value, failure) {
|
|
138
|
+
return branchCase("providerRejected", value, failure);
|
|
139
|
+
}
|
|
140
|
+
function listStatementsInvalidResponse(value, failure) {
|
|
141
|
+
return branchCase("invalidResponse", value, failure);
|
|
142
|
+
}
|
|
143
|
+
function listStatementsDefect(value, failure) {
|
|
144
|
+
return branchCase("defect", value, failure);
|
|
145
|
+
}
|
|
146
|
+
function listStatementsRetry(failure, retryAfterMs = 0) {
|
|
147
|
+
return retryCase(failure, retryAfterMs);
|
|
148
|
+
}
|
|
149
|
+
function listStatementsListedDefault() {
|
|
150
|
+
const value = StatementPageSchema.parse({ "nextToken": "", "statements": [{ "hasResultSet": false, "id": "123e4567-e89b-12d3-a456-426614174000", "status": "FINISHED" }] });
|
|
151
|
+
return branchCase("listed", value);
|
|
152
|
+
}
|
|
153
|
+
function listStatementsDefault() {
|
|
154
|
+
return listStatementsListedDefault();
|
|
155
|
+
}
|
|
156
|
+
function cancelStatementCanceled(value, failure) {
|
|
157
|
+
return branchCase("canceled", value, failure);
|
|
158
|
+
}
|
|
159
|
+
function cancelStatementNotCanceled(value, failure) {
|
|
160
|
+
return branchCase("notCanceled", value, failure);
|
|
161
|
+
}
|
|
162
|
+
function cancelStatementMissing(value, failure) {
|
|
163
|
+
return branchCase("missing", value, failure);
|
|
164
|
+
}
|
|
165
|
+
function cancelStatementProviderRejected(value, failure) {
|
|
166
|
+
return branchCase("providerRejected", value, failure);
|
|
167
|
+
}
|
|
168
|
+
function cancelStatementInvalidResponse(value, failure) {
|
|
169
|
+
return branchCase("invalidResponse", value, failure);
|
|
170
|
+
}
|
|
171
|
+
function cancelStatementDefect(value, failure) {
|
|
172
|
+
return branchCase("defect", value, failure);
|
|
173
|
+
}
|
|
174
|
+
function cancelStatementRetry(failure, retryAfterMs = 0) {
|
|
175
|
+
return retryCase(failure, retryAfterMs);
|
|
176
|
+
}
|
|
177
|
+
function cancelStatementCanceledDefault() {
|
|
178
|
+
const value = StatementCancellationSchema.parse({ "canceled": true });
|
|
179
|
+
return branchCase("canceled", value);
|
|
180
|
+
}
|
|
181
|
+
function cancelStatementDefault() {
|
|
182
|
+
return cancelStatementCanceledDefault();
|
|
183
|
+
}
|
|
45
184
|
var GeneratedMock = class {
|
|
46
185
|
#getStatementResult;
|
|
186
|
+
#executeStatement;
|
|
187
|
+
#describeStatement;
|
|
188
|
+
#listStatements;
|
|
189
|
+
#cancelStatement;
|
|
47
190
|
#connection;
|
|
48
191
|
constructor(connectionName) {
|
|
49
192
|
this.#getStatementResult = newQuery(GetStatementResultDefinition).default(getStatementResultDefault());
|
|
193
|
+
this.#executeStatement = newMutation(ExecuteStatementDefinition).default(executeStatementDefault());
|
|
194
|
+
this.#describeStatement = newQuery(DescribeStatementDefinition).default(describeStatementDefault());
|
|
195
|
+
this.#listStatements = newQuery(ListStatementsDefinition).default(listStatementsDefault());
|
|
196
|
+
this.#cancelStatement = newMutation(CancelStatementDefinition).default(cancelStatementDefault());
|
|
50
197
|
this.#connection = newConnectionWithOperations(this, { provider: ProviderID, name: connectionName });
|
|
51
198
|
}
|
|
52
199
|
connection() {
|
|
@@ -55,15 +202,63 @@ var GeneratedMock = class {
|
|
|
55
202
|
getStatementResult() {
|
|
56
203
|
return this.#getStatementResult;
|
|
57
204
|
}
|
|
205
|
+
executeStatement() {
|
|
206
|
+
return this.#executeStatement;
|
|
207
|
+
}
|
|
208
|
+
describeStatement() {
|
|
209
|
+
return this.#describeStatement;
|
|
210
|
+
}
|
|
211
|
+
listStatements() {
|
|
212
|
+
return this.#listStatements;
|
|
213
|
+
}
|
|
214
|
+
cancelStatement() {
|
|
215
|
+
return this.#cancelStatement;
|
|
216
|
+
}
|
|
58
217
|
assertNoFailures() {
|
|
59
218
|
this.#getStatementResult.assertNoFailures();
|
|
219
|
+
this.#executeStatement.assertNoFailures();
|
|
220
|
+
this.#describeStatement.assertNoFailures();
|
|
221
|
+
this.#listStatements.assertNoFailures();
|
|
222
|
+
this.#cancelStatement.assertNoFailures();
|
|
60
223
|
}
|
|
61
224
|
};
|
|
62
225
|
export {
|
|
63
226
|
GeneratedMock,
|
|
64
227
|
GeneratedMock as Mock,
|
|
228
|
+
cancelStatementCanceled,
|
|
229
|
+
cancelStatementCanceledDefault,
|
|
230
|
+
cancelStatementDefault,
|
|
231
|
+
cancelStatementDefect,
|
|
232
|
+
cancelStatementInvalidResponse,
|
|
233
|
+
cancelStatementMissing,
|
|
234
|
+
cancelStatementNotCanceled,
|
|
235
|
+
cancelStatementProviderRejected,
|
|
236
|
+
cancelStatementRetry,
|
|
237
|
+
describeStatementDefault,
|
|
238
|
+
describeStatementDefect,
|
|
239
|
+
describeStatementDescribed,
|
|
240
|
+
describeStatementDescribedDefault,
|
|
241
|
+
describeStatementInvalidResponse,
|
|
242
|
+
describeStatementMissing,
|
|
243
|
+
describeStatementProviderRejected,
|
|
244
|
+
describeStatementRetry,
|
|
245
|
+
emptyCancelStatementInput,
|
|
246
|
+
emptyDescribeStatementInput,
|
|
247
|
+
emptyExecuteStatementInput,
|
|
65
248
|
emptyGetStatementResultInput,
|
|
249
|
+
emptyListStatementsInput,
|
|
250
|
+
emptyStatementCancellation,
|
|
251
|
+
emptyStatementIdentity,
|
|
252
|
+
emptyStatementPage,
|
|
66
253
|
emptyStatementResultPage,
|
|
254
|
+
emptyStatementStatus,
|
|
255
|
+
executeStatementDefault,
|
|
256
|
+
executeStatementDefect,
|
|
257
|
+
executeStatementInvalidResponse,
|
|
258
|
+
executeStatementProviderRejected,
|
|
259
|
+
executeStatementRetry,
|
|
260
|
+
executeStatementSubmitted,
|
|
261
|
+
executeStatementSubmittedDefault,
|
|
67
262
|
getStatementResultDefault,
|
|
68
263
|
getStatementResultDefect,
|
|
69
264
|
getStatementResultFetched,
|
|
@@ -71,5 +266,12 @@ export {
|
|
|
71
266
|
getStatementResultInvalidResponse,
|
|
72
267
|
getStatementResultMissing,
|
|
73
268
|
getStatementResultProviderRejected,
|
|
74
|
-
getStatementResultRetry
|
|
269
|
+
getStatementResultRetry,
|
|
270
|
+
listStatementsDefault,
|
|
271
|
+
listStatementsDefect,
|
|
272
|
+
listStatementsInvalidResponse,
|
|
273
|
+
listStatementsListed,
|
|
274
|
+
listStatementsListedDefault,
|
|
275
|
+
listStatementsProviderRejected,
|
|
276
|
+
listStatementsRetry
|
|
75
277
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdurable/connector-amazon-redshift",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Amazon Redshift connector for Dex TypeScript applications",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"check": "npm run typecheck && npm run lint && npm test && npm run build"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@superdurable/connectors-sdk": "0.
|
|
46
|
+
"@superdurable/connectors-sdk": "0.12.0",
|
|
47
47
|
"@superdurable/dex": ">=1.28.0",
|
|
48
48
|
"zod": "^4.1.0"
|
|
49
49
|
},
|
package/dist/chunk-OEV6UKQQ.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
// src/generated/models.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { SecretString } from "@superdurable/connectors-sdk";
|
|
4
|
-
var ConfigSchema = z.object({
|
|
5
|
-
"region": z.string().optional(),
|
|
6
|
-
"endpoint": z.string().optional(),
|
|
7
|
-
"timeoutMs": z.number().int().optional(),
|
|
8
|
-
"maxResponseBytes": z.number().int().optional()
|
|
9
|
-
});
|
|
10
|
-
function decodeCredentials(value) {
|
|
11
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("credential fields are invalid");
|
|
12
|
-
const fields = value;
|
|
13
|
-
const allowed = /* @__PURE__ */ new Set(["access_key_id", "secret_access_key", "session_token"]);
|
|
14
|
-
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new TypeError("stored credential does not match the connector credential fields");
|
|
15
|
-
if (fields["access_key_id"] != null && !(typeof fields["access_key_id"] === "string")) throw new TypeError("credential access_key_id has an invalid type");
|
|
16
|
-
if (fields["secret_access_key"] != null && !(typeof fields["secret_access_key"] === "string")) throw new TypeError("credential secret_access_key has an invalid type");
|
|
17
|
-
if (fields["session_token"] != null && !(typeof fields["session_token"] === "string")) throw new TypeError("credential session_token has an invalid type");
|
|
18
|
-
const credentials = {};
|
|
19
|
-
if (!fields["access_key_id"]) throw new TypeError("credential access_key_id is required");
|
|
20
|
-
credentials.accessKeyId = new SecretString(fields["access_key_id"] ?? "");
|
|
21
|
-
if (!fields["secret_access_key"]) throw new TypeError("credential secret_access_key is required");
|
|
22
|
-
credentials.secretAccessKey = new SecretString(fields["secret_access_key"] ?? "");
|
|
23
|
-
credentials.sessionToken = new SecretString(fields["session_token"] ?? "");
|
|
24
|
-
return credentials;
|
|
25
|
-
}
|
|
26
|
-
var GetStatementResultInputSchema = z.strictObject({
|
|
27
|
-
"statementId": z.string(),
|
|
28
|
-
"nextToken": z.string()
|
|
29
|
-
});
|
|
30
|
-
var StatementResultPageSchema = z.strictObject({
|
|
31
|
-
"records": z.array(z.unknown().nullable()).nullable(),
|
|
32
|
-
"nextToken": z.string(),
|
|
33
|
-
"totalNumRows": z.number().int()
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// src/generated/definitions.ts
|
|
37
|
-
var ConnectorID = "amazon-redshift";
|
|
38
|
-
var ProviderID = "amazon-redshift";
|
|
39
|
-
var GetStatementResultBranch = {
|
|
40
|
-
Fetched: "fetched",
|
|
41
|
-
Missing: "missing",
|
|
42
|
-
ProviderRejected: "providerRejected",
|
|
43
|
-
InvalidResponse: "invalidResponse",
|
|
44
|
-
Defect: "defect"
|
|
45
|
-
};
|
|
46
|
-
var GetStatementResultBranchFetched = GetStatementResultBranch.Fetched;
|
|
47
|
-
var GetStatementResultBranchMissing = GetStatementResultBranch.Missing;
|
|
48
|
-
var GetStatementResultBranchProviderRejected = GetStatementResultBranch.ProviderRejected;
|
|
49
|
-
var GetStatementResultBranchInvalidResponse = GetStatementResultBranch.InvalidResponse;
|
|
50
|
-
var GetStatementResultBranchDefect = GetStatementResultBranch.Defect;
|
|
51
|
-
var GetStatementResultDefinition = {
|
|
52
|
-
operation: { connectorId: ConnectorID, operationId: "getStatementResult" },
|
|
53
|
-
branches: [
|
|
54
|
-
{ id: "fetched", description: "Redshift returned the statement result page." },
|
|
55
|
-
{ id: "missing", description: "Redshift does not retain the specified statement result.", optional: true },
|
|
56
|
-
{ id: "providerRejected", description: "Redshift conclusively rejected the lookup or credentials.", optional: true },
|
|
57
|
-
{ id: "invalidResponse", description: "Redshift returned malformed or oversized result JSON.", optional: true },
|
|
58
|
-
{ id: "defect", description: "The statement ID, endpoint, Region, or credentials are invalid.", optional: true }
|
|
59
|
-
],
|
|
60
|
-
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
61
|
-
};
|
|
62
|
-
var GetStatementResultMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
63
|
-
|
|
64
|
-
// src/generated/connection.ts
|
|
65
|
-
import { ConnectionRefSchema } from "@superdurable/connectors-sdk";
|
|
66
|
-
var Connection = class {
|
|
67
|
-
/** Stable provider and connection name. */
|
|
68
|
-
reference;
|
|
69
|
-
/** Bound provider operations. */
|
|
70
|
-
operations;
|
|
71
|
-
/** Validate a reference and bind operations. */
|
|
72
|
-
constructor(reference, operations) {
|
|
73
|
-
this.reference = ConnectionRefSchema.parse(reference);
|
|
74
|
-
if (this.reference.provider !== ProviderID) throw new TypeError("connection provider differs from the manifest");
|
|
75
|
-
if (!operations) throw new TypeError("connector operations are required");
|
|
76
|
-
this.operations = operations;
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
function newConnection(client, reference) {
|
|
80
|
-
if (!client) throw new TypeError("connector client is required");
|
|
81
|
-
return new Connection(reference, client);
|
|
82
|
-
}
|
|
83
|
-
function newConnectionWithOperations(operations, reference) {
|
|
84
|
-
return new Connection(reference, operations);
|
|
85
|
-
}
|
|
86
|
-
function newProjectConnection(project, connectionName, createClient) {
|
|
87
|
-
if (!project) throw new TypeError("loaded project is required");
|
|
88
|
-
const reference = ConnectionRefSchema.parse({ provider: ProviderID, name: connectionName });
|
|
89
|
-
const selected = project.configuration.connections.find((entry) => entry.connectorId === ConnectorID && entry.connectionName === connectionName);
|
|
90
|
-
if (!selected || selected.provider !== ProviderID) throw new TypeError("project connection is not configured");
|
|
91
|
-
return newConnection(createClient(project, connectionName), reference);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
ConfigSchema,
|
|
96
|
-
decodeCredentials,
|
|
97
|
-
GetStatementResultInputSchema,
|
|
98
|
-
StatementResultPageSchema,
|
|
99
|
-
ConnectorID,
|
|
100
|
-
ProviderID,
|
|
101
|
-
GetStatementResultBranch,
|
|
102
|
-
GetStatementResultBranchFetched,
|
|
103
|
-
GetStatementResultBranchMissing,
|
|
104
|
-
GetStatementResultBranchProviderRejected,
|
|
105
|
-
GetStatementResultBranchInvalidResponse,
|
|
106
|
-
GetStatementResultBranchDefect,
|
|
107
|
-
GetStatementResultDefinition,
|
|
108
|
-
GetStatementResultMetadata,
|
|
109
|
-
Connection,
|
|
110
|
-
newConnection,
|
|
111
|
-
newConnectionWithOperations,
|
|
112
|
-
newProjectConnection
|
|
113
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { SecretString, CredentialProvider, Query, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
/** Connector configuration; omitted fields use manifest defaults. */
|
|
5
|
-
interface Config {
|
|
6
|
-
/** AWS Region code containing the statement, such as eu-west-1. In https://console.aws.amazon.com/redshiftv2 > Query editor v2, use the console Region selector; blank uses the displayed default. */
|
|
7
|
-
region?: string;
|
|
8
|
-
/** Optional Redshift Data API root. Blank derives the regional AWS endpoint from region. Override only for a trusted compatible endpoint; local tests may use loopback HTTP. */
|
|
9
|
-
endpoint?: string;
|
|
10
|
-
/** Maximum duration of one result-page request as a positive Go duration such as 15s. Blank uses the displayed default; increase only for a slow network. Runtime value in milliseconds. */
|
|
11
|
-
timeoutMs?: number;
|
|
12
|
-
/** Maximum complete result page in bytes. Blank uses the displayed default; increase only for a known large page. */
|
|
13
|
-
maxResponseBytes?: number;
|
|
14
|
-
}
|
|
15
|
-
/** Runtime schema for manifest configuration. */
|
|
16
|
-
declare const ConfigSchema: z.ZodObject<{
|
|
17
|
-
region: z.ZodOptional<z.ZodString>;
|
|
18
|
-
endpoint: z.ZodOptional<z.ZodString>;
|
|
19
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
20
|
-
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
/** Private connector credentials resolved by the host. */
|
|
23
|
-
interface Credentials {
|
|
24
|
-
/** Secret-stored AWS access key ID from https://console.aws.amazon.com/iam > Users > selected user > Security credentials > Access keys > Create access key. Long-term IDs start AKIA and temporary IDs start ASIA. Blank prevents signing. */
|
|
25
|
-
accessKeyId: SecretString;
|
|
26
|
-
/** Secret access key paired with access_key_id, shown once on the IAM Retrieve access keys page. Copy the Value, never the key ID. Blank prevents signing; rotate through IAM. */
|
|
27
|
-
secretAccessKey: SecretString;
|
|
28
|
-
/** Secret session token for temporary ASIA credentials, from AWS STS. Blank means long-term IAM user credentials. Temporary credentials expire; replace all three fields before expiry. */
|
|
29
|
-
sessionToken?: SecretString;
|
|
30
|
-
}
|
|
31
|
-
/** Decode private credential fields for the connector. */
|
|
32
|
-
declare function decodeCredentials(value: unknown): Credentials;
|
|
33
|
-
/** Host-owned source of private connector credentials. */
|
|
34
|
-
type CredentialSource = CredentialProvider<Credentials>;
|
|
35
|
-
/** GetStatementResultInput identifies a JSON result page by statement UUID and optional token. */
|
|
36
|
-
interface GetStatementResultInput {
|
|
37
|
-
"statementId": string;
|
|
38
|
-
"nextToken": string;
|
|
39
|
-
}
|
|
40
|
-
/** StatementResultPage holds one page of Redshift Field rows and a token for the next page. */
|
|
41
|
-
interface StatementResultPage {
|
|
42
|
-
"records": Array<unknown | null> | null;
|
|
43
|
-
"nextToken": string;
|
|
44
|
-
"totalNumRows": number;
|
|
45
|
-
}
|
|
46
|
-
/** Runtime validator for GetStatementResultInput. */
|
|
47
|
-
declare const GetStatementResultInputSchema: z.ZodObject<{
|
|
48
|
-
statementId: z.ZodString;
|
|
49
|
-
nextToken: z.ZodString;
|
|
50
|
-
}, z.core.$strict>;
|
|
51
|
-
/** Runtime validator for StatementResultPage. */
|
|
52
|
-
declare const StatementResultPageSchema: z.ZodObject<{
|
|
53
|
-
records: z.ZodNullable<z.ZodArray<z.ZodNullable<z.ZodUnknown>>>;
|
|
54
|
-
nextToken: z.ZodString;
|
|
55
|
-
totalNumRows: z.ZodNumber;
|
|
56
|
-
}, z.core.$strict>;
|
|
57
|
-
|
|
58
|
-
/** Typed operations supplied by a client or mock. */
|
|
59
|
-
interface Operations {
|
|
60
|
-
/** Invoke getStatementResult through this connection. */
|
|
61
|
-
getStatementResult(): Query<GetStatementResultInput, StatementResultPage>;
|
|
62
|
-
}
|
|
63
|
-
/** Named connector connection kept outside Flow state. */
|
|
64
|
-
declare class Connection<BoundOperations = Operations> {
|
|
65
|
-
/** Stable provider and connection name. */
|
|
66
|
-
readonly reference: ConnectionRef;
|
|
67
|
-
/** Bound provider operations. */
|
|
68
|
-
readonly operations: BoundOperations;
|
|
69
|
-
/** Validate a reference and bind operations. */
|
|
70
|
-
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
71
|
-
}
|
|
72
|
-
/** Bind a client to a named connection. */
|
|
73
|
-
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
74
|
-
/** Bind scripted operations to a named connection. */
|
|
75
|
-
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
76
|
-
|
|
77
|
-
export { Connection as C, type GetStatementResultInput as G, type Operations as O, type StatementResultPage as S, type Config as a, type Credentials as b, ConfigSchema as c, type CredentialSource as d, GetStatementResultInputSchema as e, StatementResultPageSchema as f, decodeCredentials as g, newConnectionWithOperations as h, newConnection as n };
|