@major-tech/resource-client 0.2.10 → 0.2.12

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 (48) hide show
  1. package/bin/generate-clients.mjs +4 -3
  2. package/dist/clients/lambda.cjs +86 -0
  3. package/dist/clients/lambda.cjs.map +7 -0
  4. package/dist/clients/lambda.d.ts +90 -0
  5. package/dist/clients/lambda.d.ts.map +1 -0
  6. package/dist/clients/lambda.js +59 -0
  7. package/dist/clients/lambda.js.map +1 -0
  8. package/dist/clients/mssql.cjs +64 -0
  9. package/dist/clients/mssql.cjs.map +7 -0
  10. package/dist/clients/mssql.d.ts +29 -0
  11. package/dist/clients/mssql.d.ts.map +1 -0
  12. package/dist/clients/mssql.js +37 -0
  13. package/dist/clients/mssql.js.map +1 -0
  14. package/dist/clients/postgres.cjs +23 -0
  15. package/dist/clients/postgres.cjs.map +2 -2
  16. package/dist/clients/postgres.d.ts +24 -1
  17. package/dist/clients/postgres.d.ts.map +1 -1
  18. package/dist/clients/postgres.js +23 -0
  19. package/dist/clients/postgres.js.map +1 -1
  20. package/dist/index.cjs +4 -0
  21. package/dist/index.cjs.map +2 -2
  22. package/dist/index.d.ts +3 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +2 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/schemas/index.cjs +2 -0
  27. package/dist/schemas/index.cjs.map +2 -2
  28. package/dist/schemas/index.d.ts +5 -1
  29. package/dist/schemas/index.d.ts.map +1 -1
  30. package/dist/schemas/index.js +2 -0
  31. package/dist/schemas/index.js.map +1 -1
  32. package/dist/schemas/lambda.cjs +17 -0
  33. package/dist/schemas/lambda.cjs.map +7 -0
  34. package/dist/schemas/lambda.d.ts +107 -0
  35. package/dist/schemas/lambda.d.ts.map +1 -0
  36. package/dist/schemas/lambda.js +2 -0
  37. package/dist/schemas/lambda.js.map +1 -0
  38. package/dist/schemas/mssql.cjs +17 -0
  39. package/dist/schemas/mssql.cjs.map +7 -0
  40. package/dist/schemas/mssql.d.ts +18 -0
  41. package/dist/schemas/mssql.d.ts.map +1 -0
  42. package/dist/schemas/mssql.js +2 -0
  43. package/dist/schemas/mssql.js.map +1 -0
  44. package/dist/schemas/postgres.d.ts +3 -3
  45. package/dist/schemas/postgres.d.ts.map +1 -1
  46. package/dist/schemas/response.d.ts +8 -3
  47. package/dist/schemas/response.d.ts.map +1 -1
  48. package/package.json +1 -1
@@ -8,7 +8,7 @@
8
8
  * npx @major-tech/resource-client remove <name>
9
9
  * npx @major-tech/resource-client list
10
10
  *
11
- * Types: database-postgresql | database-dynamodb | database-cosmosdb | database-snowflake | api-hubspot | api-googlesheets | api-custom | storage-s3
11
+ * Types: database-postgresql | database-mssql | database-dynamodb | database-cosmosdb | database-snowflake | api-hubspot | api-googlesheets | api-custom | storage-s3
12
12
  *
13
13
  * Examples:
14
14
  * npx @major-tech/resource-client add "abc-123" "orders-db" "database-postgresql" "Orders database" "app-123"
@@ -141,6 +141,7 @@ function toCamelCase(str) {
141
141
  function getClientClass(type) {
142
142
  const typeMap = {
143
143
  'database-postgresql': 'PostgresResourceClient',
144
+ 'database-mssql': 'MssqlResourceClient',
144
145
  'database-dynamodb': 'DynamoDBResourceClient',
145
146
  'database-cosmosdb': 'CosmosDBResourceClient',
146
147
  'database-snowflake': 'SnowflakeResourceClient',
@@ -181,7 +182,7 @@ function generateIndexFile(resources) {
181
182
  }
182
183
 
183
184
  function addResource(resourceId, name, type, description, applicationId, framework) {
184
- const validTypes = ['database-postgresql', 'database-dynamodb', 'database-cosmosdb', 'database-snowflake', 'api-hubspot', 'api-googlesheets', 'api-custom', 'storage-s3'];
185
+ const validTypes = ['database-postgresql', 'database-mssql', 'database-dynamodb', 'database-cosmosdb', 'database-snowflake', 'api-hubspot', 'api-googlesheets', 'api-custom', 'storage-s3'];
185
186
  if (!validTypes.includes(type)) {
186
187
  console.error(`❌ Invalid type: ${type}`);
187
188
  console.error(` Valid types: ${validTypes.join(', ')}`);
@@ -318,7 +319,7 @@ function main() {
318
319
  console.log(' npx @major-tech/resource-client add <resource_id> <name> <type> <description> <application_id> [--framework <nextjs|vite>]');
319
320
  console.log(' npx @major-tech/resource-client remove <name> [--framework <nextjs|vite>]');
320
321
  console.log(' npx @major-tech/resource-client list');
321
- console.log('\nTypes: database-postgresql | database-dynamodb | database-cosmosdb | database-snowflake | api-hubspot | api-googlesheets | api-custom | storage-s3');
322
+ console.log('\nTypes: database-postgresql | database-mssql | database-dynamodb | database-cosmosdb | database-snowflake | api-hubspot | api-googlesheets | api-custom | storage-s3');
322
323
  return;
323
324
  }
324
325
 
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var lambda_exports = {};
21
+ __export(lambda_exports, {
22
+ LambdaResourceClient: () => LambdaResourceClient
23
+ });
24
+ module.exports = __toCommonJS(lambda_exports);
25
+ var import_base = require("../base");
26
+ class LambdaResourceClient extends import_base.BaseResourceClient {
27
+ static {
28
+ __name(this, "LambdaResourceClient");
29
+ }
30
+ /**
31
+ * Invoke a Lambda function
32
+ *
33
+ * @param functionName - The name, ARN, or partial ARN of the Lambda function
34
+ * @param payload - The JSON input for the Lambda function (optional)
35
+ * @param invocationKey - A unique key for tracking this invocation
36
+ * @param options - Additional invocation options
37
+ * @returns The Lambda invocation result
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * // Simple synchronous invocation
42
+ * const result = await lambdaClient.invoke(
43
+ * "my-function",
44
+ * { key: "value" },
45
+ * "process-data"
46
+ * );
47
+ *
48
+ * if (result.ok) {
49
+ * console.log("Response:", result.result.Payload);
50
+ * }
51
+ *
52
+ * // Asynchronous invocation
53
+ * const asyncResult = await lambdaClient.invoke(
54
+ * "my-function",
55
+ * { key: "value" },
56
+ * "async-process",
57
+ * { InvocationType: "Event" }
58
+ * );
59
+ *
60
+ * // With execution logs
61
+ * const debugResult = await lambdaClient.invoke(
62
+ * "my-function",
63
+ * { key: "value" },
64
+ * "debug-invocation",
65
+ * { LogType: "Tail" }
66
+ * );
67
+ *
68
+ * if (debugResult.ok) {
69
+ * // LogResult is base64 encoded
70
+ * const logs = atob(debugResult.result.LogResult || "");
71
+ * console.log("Execution logs:", logs);
72
+ * }
73
+ * ```
74
+ */
75
+ async invoke(functionName, payload, invocationKey, options = {}) {
76
+ const invokePayload = {
77
+ type: "api",
78
+ subtype: "lambda",
79
+ FunctionName: functionName,
80
+ Payload: payload,
81
+ ...options
82
+ };
83
+ return this.invokeRaw(invokePayload, invocationKey);
84
+ }
85
+ }
86
+ //# sourceMappingURL=lambda.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/clients/lambda.ts"],
4
+ "sourcesContent": ["import type {\n ApiLambdaPayload,\n ApiLambdaResult,\n LambdaInvocationType,\n LambdaLogType,\n} from \"../schemas\";\nimport type { BaseInvokeSuccess, InvokeFailure } from \"../schemas/response\";\nimport { BaseResourceClient } from \"../base\";\n\n/**\n * Options for Lambda invocation\n */\nexport interface LambdaInvokeOptions {\n /**\n * The invocation mode.\n * - RequestResponse (default): Synchronous invocation\n * - Event: Asynchronous invocation\n * - DryRun: Validate parameters and permissions only\n */\n InvocationType?: LambdaInvocationType;\n\n /**\n * Controls execution log inclusion in the response.\n * - None (default): Don't include logs\n * - Tail: Include the last 4 KB of execution log (sync only)\n */\n LogType?: LambdaLogType;\n\n /**\n * Specifies a version or alias to invoke.\n * If not specified, invokes $LATEST.\n */\n Qualifier?: string;\n\n /**\n * Up to 3,583 bytes of base64-encoded data about the invoking client\n * to pass to the function. Only for synchronous invocations.\n */\n ClientContext?: string;\n\n /**\n * A unique name for durable execution.\n * Length: 1-64 characters. Pattern: [a-zA-Z0-9-_]+\n */\n DurableExecutionName?: string;\n\n /**\n * The identifier for tenant in multi-tenant Lambda function.\n * Length: 1-256 characters.\n */\n TenantId?: string;\n}\n\nexport class LambdaResourceClient extends BaseResourceClient {\n /**\n * Invoke a Lambda function\n *\n * @param functionName - The name, ARN, or partial ARN of the Lambda function\n * @param payload - The JSON input for the Lambda function (optional)\n * @param invocationKey - A unique key for tracking this invocation\n * @param options - Additional invocation options\n * @returns The Lambda invocation result\n *\n * @example\n * ```typescript\n * // Simple synchronous invocation\n * const result = await lambdaClient.invoke(\n * \"my-function\",\n * { key: \"value\" },\n * \"process-data\"\n * );\n *\n * if (result.ok) {\n * console.log(\"Response:\", result.result.Payload);\n * }\n *\n * // Asynchronous invocation\n * const asyncResult = await lambdaClient.invoke(\n * \"my-function\",\n * { key: \"value\" },\n * \"async-process\",\n * { InvocationType: \"Event\" }\n * );\n *\n * // With execution logs\n * const debugResult = await lambdaClient.invoke(\n * \"my-function\",\n * { key: \"value\" },\n * \"debug-invocation\",\n * { LogType: \"Tail\" }\n * );\n *\n * if (debugResult.ok) {\n * // LogResult is base64 encoded\n * const logs = atob(debugResult.result.LogResult || \"\");\n * console.log(\"Execution logs:\", logs);\n * }\n * ```\n */\n async invoke(\n functionName: string,\n payload: unknown,\n invocationKey: string,\n options: LambdaInvokeOptions = {},\n ): Promise<BaseInvokeSuccess<ApiLambdaResult> | InvokeFailure> {\n const invokePayload: ApiLambdaPayload = {\n type: \"api\",\n subtype: \"lambda\",\n FunctionName: functionName,\n Payload: payload,\n ...options,\n };\n\n return this.invokeRaw(invokePayload, invocationKey) as Promise<\n BaseInvokeSuccess<ApiLambdaResult> | InvokeFailure\n >;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAOA;;;;;AAAA,kBAAmC;AA8C7B,MAAO,6BAA6B,+BAAkB;EA9C5D,OA8C4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C1D,MAAM,OACJ,cACA,SACA,eACA,UAA+B,CAAA,GAAE;AAEjC,UAAM,gBAAkC;MACtC,MAAM;MACN,SAAS;MACT,cAAc;MACd,SAAS;MACT,GAAG;;AAGL,WAAO,KAAK,UAAU,eAAe,aAAa;EAGpD;;",
6
+ "names": []
7
+ }
@@ -0,0 +1,90 @@
1
+ import type { ApiLambdaResult, LambdaInvocationType, LambdaLogType } from "../schemas";
2
+ import type { BaseInvokeSuccess, InvokeFailure } from "../schemas/response";
3
+ import { BaseResourceClient } from "../base";
4
+ /**
5
+ * Options for Lambda invocation
6
+ */
7
+ export interface LambdaInvokeOptions {
8
+ /**
9
+ * The invocation mode.
10
+ * - RequestResponse (default): Synchronous invocation
11
+ * - Event: Asynchronous invocation
12
+ * - DryRun: Validate parameters and permissions only
13
+ */
14
+ InvocationType?: LambdaInvocationType;
15
+ /**
16
+ * Controls execution log inclusion in the response.
17
+ * - None (default): Don't include logs
18
+ * - Tail: Include the last 4 KB of execution log (sync only)
19
+ */
20
+ LogType?: LambdaLogType;
21
+ /**
22
+ * Specifies a version or alias to invoke.
23
+ * If not specified, invokes $LATEST.
24
+ */
25
+ Qualifier?: string;
26
+ /**
27
+ * Up to 3,583 bytes of base64-encoded data about the invoking client
28
+ * to pass to the function. Only for synchronous invocations.
29
+ */
30
+ ClientContext?: string;
31
+ /**
32
+ * A unique name for durable execution.
33
+ * Length: 1-64 characters. Pattern: [a-zA-Z0-9-_]+
34
+ */
35
+ DurableExecutionName?: string;
36
+ /**
37
+ * The identifier for tenant in multi-tenant Lambda function.
38
+ * Length: 1-256 characters.
39
+ */
40
+ TenantId?: string;
41
+ }
42
+ export declare class LambdaResourceClient extends BaseResourceClient {
43
+ /**
44
+ * Invoke a Lambda function
45
+ *
46
+ * @param functionName - The name, ARN, or partial ARN of the Lambda function
47
+ * @param payload - The JSON input for the Lambda function (optional)
48
+ * @param invocationKey - A unique key for tracking this invocation
49
+ * @param options - Additional invocation options
50
+ * @returns The Lambda invocation result
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * // Simple synchronous invocation
55
+ * const result = await lambdaClient.invoke(
56
+ * "my-function",
57
+ * { key: "value" },
58
+ * "process-data"
59
+ * );
60
+ *
61
+ * if (result.ok) {
62
+ * console.log("Response:", result.result.Payload);
63
+ * }
64
+ *
65
+ * // Asynchronous invocation
66
+ * const asyncResult = await lambdaClient.invoke(
67
+ * "my-function",
68
+ * { key: "value" },
69
+ * "async-process",
70
+ * { InvocationType: "Event" }
71
+ * );
72
+ *
73
+ * // With execution logs
74
+ * const debugResult = await lambdaClient.invoke(
75
+ * "my-function",
76
+ * { key: "value" },
77
+ * "debug-invocation",
78
+ * { LogType: "Tail" }
79
+ * );
80
+ *
81
+ * if (debugResult.ok) {
82
+ * // LogResult is base64 encoded
83
+ * const logs = atob(debugResult.result.LogResult || "");
84
+ * console.log("Execution logs:", logs);
85
+ * }
86
+ * ```
87
+ */
88
+ invoke(functionName: string, payload: unknown, invocationKey: string, options?: LambdaInvokeOptions): Promise<BaseInvokeSuccess<ApiLambdaResult> | InvokeFailure>;
89
+ }
90
+ //# sourceMappingURL=lambda.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lambda.d.ts","sourceRoot":"","sources":["../../src/clients/lambda.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EACf,oBAAoB,EACpB,aAAa,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IAEtC;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,oBAAqB,SAAQ,kBAAkB;IAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACG,MAAM,CACV,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC;CAa/D"}
@@ -0,0 +1,59 @@
1
+ import { BaseResourceClient } from "../base";
2
+ export class LambdaResourceClient extends BaseResourceClient {
3
+ /**
4
+ * Invoke a Lambda function
5
+ *
6
+ * @param functionName - The name, ARN, or partial ARN of the Lambda function
7
+ * @param payload - The JSON input for the Lambda function (optional)
8
+ * @param invocationKey - A unique key for tracking this invocation
9
+ * @param options - Additional invocation options
10
+ * @returns The Lambda invocation result
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * // Simple synchronous invocation
15
+ * const result = await lambdaClient.invoke(
16
+ * "my-function",
17
+ * { key: "value" },
18
+ * "process-data"
19
+ * );
20
+ *
21
+ * if (result.ok) {
22
+ * console.log("Response:", result.result.Payload);
23
+ * }
24
+ *
25
+ * // Asynchronous invocation
26
+ * const asyncResult = await lambdaClient.invoke(
27
+ * "my-function",
28
+ * { key: "value" },
29
+ * "async-process",
30
+ * { InvocationType: "Event" }
31
+ * );
32
+ *
33
+ * // With execution logs
34
+ * const debugResult = await lambdaClient.invoke(
35
+ * "my-function",
36
+ * { key: "value" },
37
+ * "debug-invocation",
38
+ * { LogType: "Tail" }
39
+ * );
40
+ *
41
+ * if (debugResult.ok) {
42
+ * // LogResult is base64 encoded
43
+ * const logs = atob(debugResult.result.LogResult || "");
44
+ * console.log("Execution logs:", logs);
45
+ * }
46
+ * ```
47
+ */
48
+ async invoke(functionName, payload, invocationKey, options = {}) {
49
+ const invokePayload = {
50
+ type: "api",
51
+ subtype: "lambda",
52
+ FunctionName: functionName,
53
+ Payload: payload,
54
+ ...options,
55
+ };
56
+ return this.invokeRaw(invokePayload, invocationKey);
57
+ }
58
+ }
59
+ //# sourceMappingURL=lambda.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lambda.js","sourceRoot":"","sources":["../../src/clients/lambda.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA8C7C,MAAM,OAAO,oBAAqB,SAAQ,kBAAkB;IAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,KAAK,CAAC,MAAM,CACV,YAAoB,EACpB,OAAgB,EAChB,aAAqB,EACrB,UAA+B,EAAE;QAEjC,MAAM,aAAa,GAAqB;YACtC,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,QAAQ;YACjB,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE,OAAO;YAChB,GAAG,OAAO;SACX,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa,CAEjD,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var mssql_exports = {};
21
+ __export(mssql_exports, {
22
+ MssqlResourceClient: () => MssqlResourceClient
23
+ });
24
+ module.exports = __toCommonJS(mssql_exports);
25
+ var import_base = require("../base");
26
+ class MssqlResourceClient extends import_base.BaseResourceClient {
27
+ static {
28
+ __name(this, "MssqlResourceClient");
29
+ }
30
+ /**
31
+ * Execute a SQL query against MSSQL
32
+ * @param sql The SQL query to execute
33
+ * @param params Optional named parameters (e.g., { id: 123 } for @id in the query)
34
+ * @param invocationKey Unique key for tracking this invocation
35
+ * @param timeoutMs Optional timeout in milliseconds
36
+ * @returns Typed response with rows of type T
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * interface User { id: number; name: string; email: string }
41
+ *
42
+ * const response = await client.invoke<User>(
43
+ * "SELECT id, name, email FROM users WHERE id = @id",
44
+ * { id: 123 },
45
+ * "get-user-123"
46
+ * );
47
+ *
48
+ * if (response.ok) {
49
+ * const users: User[] = response.result.rows;
50
+ * }
51
+ * ```
52
+ */
53
+ async invoke(sql, params, invocationKey, timeoutMs) {
54
+ const payload = {
55
+ type: "database",
56
+ subtype: "mssql",
57
+ sql,
58
+ params,
59
+ timeoutMs
60
+ };
61
+ return this.invokeRaw(payload, invocationKey);
62
+ }
63
+ }
64
+ //# sourceMappingURL=mssql.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/clients/mssql.ts"],
4
+ "sourcesContent": ["import type {\n DbMssqlParamValue,\n DbMssqlPayload,\n DatabaseInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\n\nexport class MssqlResourceClient extends BaseResourceClient {\n /**\n * Execute a SQL query against MSSQL\n * @param sql The SQL query to execute\n * @param params Optional named parameters (e.g., { id: 123 } for @id in the query)\n * @param invocationKey Unique key for tracking this invocation\n * @param timeoutMs Optional timeout in milliseconds\n * @returns Typed response with rows of type T\n *\n * @example\n * ```ts\n * interface User { id: number; name: string; email: string }\n *\n * const response = await client.invoke<User>(\n * \"SELECT id, name, email FROM users WHERE id = @id\",\n * { id: 123 },\n * \"get-user-123\"\n * );\n *\n * if (response.ok) {\n * const users: User[] = response.result.rows;\n * }\n * ```\n */\n async invoke<T = Record<string, unknown>>(\n sql: string,\n params: Record<string, DbMssqlParamValue> | undefined,\n invocationKey: string,\n timeoutMs?: number\n ): Promise<DatabaseInvokeResponse<T>> {\n const payload: DbMssqlPayload = {\n type: \"database\",\n subtype: \"mssql\",\n sql,\n params,\n timeoutMs,\n };\n\n return this.invokeRaw(payload, invocationKey) as Promise<DatabaseInvokeResponse<T>>;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAKA;;;;;AAAA,kBAAmC;AAE7B,MAAO,4BAA4B,+BAAkB;EAF3D,OAE2D;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBzD,MAAM,OACJ,KACA,QACA,eACA,WAAkB;AAElB,UAAM,UAA0B;MAC9B,MAAM;MACN,SAAS;MACT;MACA;MACA;;AAGF,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
+ "names": []
7
+ }
@@ -0,0 +1,29 @@
1
+ import type { DbMssqlParamValue, DatabaseInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class MssqlResourceClient extends BaseResourceClient {
4
+ /**
5
+ * Execute a SQL query against MSSQL
6
+ * @param sql The SQL query to execute
7
+ * @param params Optional named parameters (e.g., { id: 123 } for @id in the query)
8
+ * @param invocationKey Unique key for tracking this invocation
9
+ * @param timeoutMs Optional timeout in milliseconds
10
+ * @returns Typed response with rows of type T
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * interface User { id: number; name: string; email: string }
15
+ *
16
+ * const response = await client.invoke<User>(
17
+ * "SELECT id, name, email FROM users WHERE id = @id",
18
+ * { id: 123 },
19
+ * "get-user-123"
20
+ * );
21
+ *
22
+ * if (response.ok) {
23
+ * const users: User[] = response.result.rows;
24
+ * }
25
+ * ```
26
+ */
27
+ invoke<T = Record<string, unknown>>(sql: string, params: Record<string, DbMssqlParamValue> | undefined, invocationKey: string, timeoutMs?: number): Promise<DatabaseInvokeResponse<T>>;
28
+ }
29
+ //# sourceMappingURL=mssql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mssql.d.ts","sourceRoot":"","sources":["../../src/clients/mssql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAEjB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,qBAAa,mBAAoB,SAAQ,kBAAkB;IACzD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,SAAS,EACrD,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;CAWtC"}
@@ -0,0 +1,37 @@
1
+ import { BaseResourceClient } from "../base";
2
+ export class MssqlResourceClient extends BaseResourceClient {
3
+ /**
4
+ * Execute a SQL query against MSSQL
5
+ * @param sql The SQL query to execute
6
+ * @param params Optional named parameters (e.g., { id: 123 } for @id in the query)
7
+ * @param invocationKey Unique key for tracking this invocation
8
+ * @param timeoutMs Optional timeout in milliseconds
9
+ * @returns Typed response with rows of type T
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * interface User { id: number; name: string; email: string }
14
+ *
15
+ * const response = await client.invoke<User>(
16
+ * "SELECT id, name, email FROM users WHERE id = @id",
17
+ * { id: 123 },
18
+ * "get-user-123"
19
+ * );
20
+ *
21
+ * if (response.ok) {
22
+ * const users: User[] = response.result.rows;
23
+ * }
24
+ * ```
25
+ */
26
+ async invoke(sql, params, invocationKey, timeoutMs) {
27
+ const payload = {
28
+ type: "database",
29
+ subtype: "mssql",
30
+ sql,
31
+ params,
32
+ timeoutMs,
33
+ };
34
+ return this.invokeRaw(payload, invocationKey);
35
+ }
36
+ }
37
+ //# sourceMappingURL=mssql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mssql.js","sourceRoot":"","sources":["../../src/clients/mssql.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IACzD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,MAAM,CACV,GAAW,EACX,MAAqD,EACrD,aAAqB,EACrB,SAAkB;QAElB,MAAM,OAAO,GAAmB;YAC9B,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,OAAO;YAChB,GAAG;YACH,MAAM;YACN,SAAS;SACV,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAuC,CAAC;IACtF,CAAC;CACF"}
@@ -27,6 +27,29 @@ class PostgresResourceClient extends import_base.BaseResourceClient {
27
27
  static {
28
28
  __name(this, "PostgresResourceClient");
29
29
  }
30
+ /**
31
+ * Execute a SQL query against PostgreSQL
32
+ * @param sql The SQL query to execute
33
+ * @param params Optional positional parameters ($1, $2, etc.)
34
+ * @param invocationKey Unique key for tracking this invocation
35
+ * @param timeoutMs Optional timeout in milliseconds
36
+ * @returns Typed response with rows of type T
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * interface User { id: number; name: string; email: string }
41
+ *
42
+ * const response = await client.invoke<User>(
43
+ * "SELECT id, name, email FROM users WHERE id = $1",
44
+ * [123],
45
+ * "get-user-123"
46
+ * );
47
+ *
48
+ * if (response.ok) {
49
+ * const users: User[] = response.result.rows;
50
+ * }
51
+ * ```
52
+ */
30
53
  async invoke(sql, params, invocationKey, timeoutMs) {
31
54
  const payload = {
32
55
  type: "database",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/clients/postgres.ts"],
4
- "sourcesContent": ["import type {\n DbParamPrimitive,\n DbPostgresPayload,\n DatabaseInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\n\nexport class PostgresResourceClient extends BaseResourceClient {\n async invoke(\n sql: string,\n params: DbParamPrimitive[] | undefined,\n invocationKey: string,\n timeoutMs?: number\n ): Promise<DatabaseInvokeResponse> {\n const payload: DbPostgresPayload = {\n type: \"database\",\n subtype: \"postgresql\",\n sql,\n params,\n timeoutMs,\n };\n\n return this.invokeRaw(payload, invocationKey) as Promise<DatabaseInvokeResponse>;\n }\n}\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAKA;;;;;AAAA,kBAAmC;AAE7B,MAAO,+BAA+B,+BAAkB;EAF9D,OAE8D;;;EAC5D,MAAM,OACJ,KACA,QACA,eACA,WAAkB;AAElB,UAAM,UAA6B;MACjC,MAAM;MACN,SAAS;MACT;MACA;MACA;;AAGF,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
4
+ "sourcesContent": ["import type {\n DbParamPrimitive,\n DbPostgresPayload,\n DatabaseInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\n\nexport class PostgresResourceClient extends BaseResourceClient {\n /**\n * Execute a SQL query against PostgreSQL\n * @param sql The SQL query to execute\n * @param params Optional positional parameters ($1, $2, etc.)\n * @param invocationKey Unique key for tracking this invocation\n * @param timeoutMs Optional timeout in milliseconds\n * @returns Typed response with rows of type T\n *\n * @example\n * ```ts\n * interface User { id: number; name: string; email: string }\n *\n * const response = await client.invoke<User>(\n * \"SELECT id, name, email FROM users WHERE id = $1\",\n * [123],\n * \"get-user-123\"\n * );\n *\n * if (response.ok) {\n * const users: User[] = response.result.rows;\n * }\n * ```\n */\n async invoke<T = Record<string, unknown>>(\n sql: string,\n params: DbParamPrimitive[] | undefined,\n invocationKey: string,\n timeoutMs?: number\n ): Promise<DatabaseInvokeResponse<T>> {\n const payload: DbPostgresPayload = {\n type: \"database\",\n subtype: \"postgresql\",\n sql,\n params,\n timeoutMs,\n };\n\n return this.invokeRaw(payload, invocationKey) as Promise<DatabaseInvokeResponse<T>>;\n }\n}\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAKA;;;;;AAAA,kBAAmC;AAE7B,MAAO,+BAA+B,+BAAkB;EAF9D,OAE8D;;;;;;;;;;;;;;;;;;;;;;;;;;EAwB5D,MAAM,OACJ,KACA,QACA,eACA,WAAkB;AAElB,UAAM,UAA6B;MACjC,MAAM;MACN,SAAS;MACT;MACA;MACA;;AAGF,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,29 @@
1
1
  import type { DbParamPrimitive, DatabaseInvokeResponse } from "../schemas";
2
2
  import { BaseResourceClient } from "../base";
3
3
  export declare class PostgresResourceClient extends BaseResourceClient {
4
- invoke(sql: string, params: DbParamPrimitive[] | undefined, invocationKey: string, timeoutMs?: number): Promise<DatabaseInvokeResponse>;
4
+ /**
5
+ * Execute a SQL query against PostgreSQL
6
+ * @param sql The SQL query to execute
7
+ * @param params Optional positional parameters ($1, $2, etc.)
8
+ * @param invocationKey Unique key for tracking this invocation
9
+ * @param timeoutMs Optional timeout in milliseconds
10
+ * @returns Typed response with rows of type T
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * interface User { id: number; name: string; email: string }
15
+ *
16
+ * const response = await client.invoke<User>(
17
+ * "SELECT id, name, email FROM users WHERE id = $1",
18
+ * [123],
19
+ * "get-user-123"
20
+ * );
21
+ *
22
+ * if (response.ok) {
23
+ * const users: User[] = response.result.rows;
24
+ * }
25
+ * ```
26
+ */
27
+ invoke<T = Record<string, unknown>>(sql: string, params: DbParamPrimitive[] | undefined, invocationKey: string, timeoutMs?: number): Promise<DatabaseInvokeResponse<T>>;
5
28
  }
6
29
  //# sourceMappingURL=postgres.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/clients/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,qBAAa,sBAAuB,SAAQ,kBAAkB;IACtD,MAAM,CACV,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,gBAAgB,EAAE,GAAG,SAAS,EACtC,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,sBAAsB,CAAC;CAWnC"}
1
+ {"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/clients/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,gBAAgB,EAAE,GAAG,SAAS,EACtC,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;CAWtC"}
@@ -1,5 +1,28 @@
1
1
  import { BaseResourceClient } from "../base";
2
2
  export class PostgresResourceClient extends BaseResourceClient {
3
+ /**
4
+ * Execute a SQL query against PostgreSQL
5
+ * @param sql The SQL query to execute
6
+ * @param params Optional positional parameters ($1, $2, etc.)
7
+ * @param invocationKey Unique key for tracking this invocation
8
+ * @param timeoutMs Optional timeout in milliseconds
9
+ * @returns Typed response with rows of type T
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * interface User { id: number; name: string; email: string }
14
+ *
15
+ * const response = await client.invoke<User>(
16
+ * "SELECT id, name, email FROM users WHERE id = $1",
17
+ * [123],
18
+ * "get-user-123"
19
+ * );
20
+ *
21
+ * if (response.ok) {
22
+ * const users: User[] = response.result.rows;
23
+ * }
24
+ * ```
25
+ */
3
26
  async invoke(sql, params, invocationKey, timeoutMs) {
4
27
  const payload = {
5
28
  type: "database",
@@ -1 +1 @@
1
- {"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/clients/postgres.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,sBAAuB,SAAQ,kBAAkB;IAC5D,KAAK,CAAC,MAAM,CACV,GAAW,EACX,MAAsC,EACtC,aAAqB,EACrB,SAAkB;QAElB,MAAM,OAAO,GAAsB;YACjC,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,YAAY;YACrB,GAAG;YACH,MAAM;YACN,SAAS;SACV,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAoC,CAAC;IACnF,CAAC;CACF"}
1
+ {"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/clients/postgres.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,sBAAuB,SAAQ,kBAAkB;IAC5D;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,MAAM,CACV,GAAW,EACX,MAAsC,EACtC,aAAqB,EACrB,SAAkB;QAElB,MAAM,OAAO,GAAsB;YACjC,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,YAAY;YACrB,GAAG;YACH,MAAM;YACN,SAAS;SACV,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAuC,CAAC;IACtF,CAAC;CACF"}
package/dist/index.cjs CHANGED
@@ -25,6 +25,8 @@ __export(index_exports, {
25
25
  DynamoDBResourceClient: () => import_dynamodb.DynamoDBResourceClient,
26
26
  GoogleSheetsResourceClient: () => import_googlesheets.GoogleSheetsResourceClient,
27
27
  HubSpotResourceClient: () => import_hubspot.HubSpotResourceClient,
28
+ LambdaResourceClient: () => import_lambda.LambdaResourceClient,
29
+ MssqlResourceClient: () => import_mssql.MssqlResourceClient,
28
30
  PostgresResourceClient: () => import_postgres.PostgresResourceClient,
29
31
  ResourceInvokeError: () => import_errors.ResourceInvokeError,
30
32
  S3ResourceClient: () => import_s3.S3ResourceClient,
@@ -35,6 +37,7 @@ __reExport(index_exports, require("./schemas"), module.exports);
35
37
  var import_base = require("./base");
36
38
  var import_errors = require("./errors");
37
39
  var import_postgres = require("./clients/postgres");
40
+ var import_mssql = require("./clients/mssql");
38
41
  var import_dynamodb = require("./clients/dynamodb");
39
42
  var import_cosmosdb = require("./clients/cosmosdb");
40
43
  var import_snowflake = require("./clients/snowflake");
@@ -42,4 +45,5 @@ var import_api_custom = require("./clients/api-custom");
42
45
  var import_hubspot = require("./clients/hubspot");
43
46
  var import_googlesheets = require("./clients/googlesheets");
44
47
  var import_s3 = require("./clients/s3");
48
+ var import_lambda = require("./clients/lambda");
45
49
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["// Export all schemas and types\nexport * from \"./schemas\";\n\n// Export base client and config\nexport { BaseResourceClient, type BaseClientConfig } from \"./base\";\n\n// Export errors\nexport { ResourceInvokeError } from \"./errors\";\n\n// Export individual clients\nexport { PostgresResourceClient } from \"./clients/postgres\";\nexport { DynamoDBResourceClient } from \"./clients/dynamodb\";\nexport { CosmosDBResourceClient } from \"./clients/cosmosdb\";\nexport { SnowflakeResourceClient } from \"./clients/snowflake\";\nexport { CustomApiResourceClient } from \"./clients/api-custom\";\nexport { HubSpotResourceClient } from \"./clients/hubspot\";\nexport { GoogleSheetsResourceClient } from \"./clients/googlesheets\";\nexport { S3ResourceClient } from \"./clients/s3\";\n\n// Re-export common response types for convenience\nexport type {\n DatabaseInvokeResponse,\n DynamoDBInvokeResponse,\n CosmosDBInvokeResponse,\n SnowflakeInvokeResponse,\n ApiInvokeResponse,\n StorageInvokeResponse,\n BaseInvokeSuccess,\n} from \"./schemas/response\";\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AACA,0BAAc,sBADd;AAIA,kBAA0D;AAG1D,oBAAoC;AAGpC,sBAAuC;AACvC,sBAAuC;AACvC,sBAAuC;AACvC,uBAAwC;AACxC,wBAAwC;AACxC,qBAAsC;AACtC,0BAA2C;AAC3C,gBAAiC;",
4
+ "sourcesContent": ["// Export all schemas and types\nexport * from \"./schemas\";\n\n// Export base client and config\nexport { BaseResourceClient, type BaseClientConfig } from \"./base\";\n\n// Export errors\nexport { ResourceInvokeError } from \"./errors\";\n\n// Export individual clients\nexport { PostgresResourceClient } from \"./clients/postgres\";\nexport { MssqlResourceClient } from \"./clients/mssql\";\nexport { DynamoDBResourceClient } from \"./clients/dynamodb\";\nexport { CosmosDBResourceClient } from \"./clients/cosmosdb\";\nexport { SnowflakeResourceClient } from \"./clients/snowflake\";\nexport { CustomApiResourceClient } from \"./clients/api-custom\";\nexport { HubSpotResourceClient } from \"./clients/hubspot\";\nexport { GoogleSheetsResourceClient } from \"./clients/googlesheets\";\nexport { S3ResourceClient } from \"./clients/s3\";\nexport { LambdaResourceClient } from \"./clients/lambda\";\n\n// Re-export common response types for convenience\nexport type {\n DatabaseInvokeResponse,\n DynamoDBInvokeResponse,\n CosmosDBInvokeResponse,\n SnowflakeInvokeResponse,\n ApiInvokeResponse,\n StorageInvokeResponse,\n LambdaInvokeResponse,\n BaseInvokeSuccess,\n} from \"./schemas/response\";\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AACA,0BAAc,sBADd;AAIA,kBAA0D;AAG1D,oBAAoC;AAGpC,sBAAuC;AACvC,mBAAoC;AACpC,sBAAuC;AACvC,sBAAuC;AACvC,uBAAwC;AACxC,wBAAwC;AACxC,qBAAsC;AACtC,0BAA2C;AAC3C,gBAAiC;AACjC,oBAAqC;",
6
6
  "names": []
7
7
  }
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from "./schemas";
2
2
  export { BaseResourceClient, type BaseClientConfig } from "./base";
3
3
  export { ResourceInvokeError } from "./errors";
4
4
  export { PostgresResourceClient } from "./clients/postgres";
5
+ export { MssqlResourceClient } from "./clients/mssql";
5
6
  export { DynamoDBResourceClient } from "./clients/dynamodb";
6
7
  export { CosmosDBResourceClient } from "./clients/cosmosdb";
7
8
  export { SnowflakeResourceClient } from "./clients/snowflake";
@@ -9,5 +10,6 @@ export { CustomApiResourceClient } from "./clients/api-custom";
9
10
  export { HubSpotResourceClient } from "./clients/hubspot";
10
11
  export { GoogleSheetsResourceClient } from "./clients/googlesheets";
11
12
  export { S3ResourceClient } from "./clients/s3";
12
- export type { DatabaseInvokeResponse, DynamoDBInvokeResponse, CosmosDBInvokeResponse, SnowflakeInvokeResponse, ApiInvokeResponse, StorageInvokeResponse, BaseInvokeSuccess, } from "./schemas/response";
13
+ export { LambdaResourceClient } from "./clients/lambda";
14
+ export type { DatabaseInvokeResponse, DynamoDBInvokeResponse, CosmosDBInvokeResponse, SnowflakeInvokeResponse, ApiInvokeResponse, StorageInvokeResponse, LambdaInvokeResponse, BaseInvokeSuccess, } from "./schemas/response";
13
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAGnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAGnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ export { BaseResourceClient } from "./base";
6
6
  export { ResourceInvokeError } from "./errors";
7
7
  // Export individual clients
8
8
  export { PostgresResourceClient } from "./clients/postgres";
9
+ export { MssqlResourceClient } from "./clients/mssql";
9
10
  export { DynamoDBResourceClient } from "./clients/dynamodb";
10
11
  export { CosmosDBResourceClient } from "./clients/cosmosdb";
11
12
  export { SnowflakeResourceClient } from "./clients/snowflake";
@@ -13,4 +14,5 @@ export { CustomApiResourceClient } from "./clients/api-custom";
13
14
  export { HubSpotResourceClient } from "./clients/hubspot";
14
15
  export { GoogleSheetsResourceClient } from "./clients/googlesheets";
15
16
  export { S3ResourceClient } from "./clients/s3";
17
+ export { LambdaResourceClient } from "./clients/lambda";
16
18
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,cAAc,WAAW,CAAC;AAE1B,gCAAgC;AAChC,OAAO,EAAE,kBAAkB,EAAyB,MAAM,QAAQ,CAAC;AAEnE,gBAAgB;AAChB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,4BAA4B;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,cAAc,WAAW,CAAC;AAE1B,gCAAgC;AAChC,OAAO,EAAE,kBAAkB,EAAyB,MAAM,QAAQ,CAAC;AAEnE,gBAAgB;AAChB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,4BAA4B;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -17,6 +17,7 @@ var index_exports = {};
17
17
  module.exports = __toCommonJS(index_exports);
18
18
  __reExport(index_exports, require("./common"), module.exports);
19
19
  __reExport(index_exports, require("./postgres"), module.exports);
20
+ __reExport(index_exports, require("./mssql"), module.exports);
20
21
  __reExport(index_exports, require("./dynamodb"), module.exports);
21
22
  __reExport(index_exports, require("./cosmosdb"), module.exports);
22
23
  __reExport(index_exports, require("./snowflake"), module.exports);
@@ -24,6 +25,7 @@ __reExport(index_exports, require("./s3"), module.exports);
24
25
  __reExport(index_exports, require("./api-custom"), module.exports);
25
26
  __reExport(index_exports, require("./api-hubspot"), module.exports);
26
27
  __reExport(index_exports, require("./api-googlesheets"), module.exports);
28
+ __reExport(index_exports, require("./lambda"), module.exports);
27
29
  __reExport(index_exports, require("./request"), module.exports);
28
30
  __reExport(index_exports, require("./response"), module.exports);
29
31
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/schemas/index.ts"],
4
- "sourcesContent": ["// Re-export all types\nexport * from \"./common\";\nexport * from \"./postgres\";\nexport * from \"./dynamodb\";\nexport * from \"./cosmosdb\";\nexport * from \"./snowflake\";\nexport * from \"./s3\";\nexport * from \"./api-custom\";\nexport * from \"./api-hubspot\";\nexport * from \"./api-googlesheets\";\nexport * from \"./request\";\nexport * from \"./response\";\n\n// Import for discriminated union\nimport type { ApiCustomPayload } from \"./api-custom\";\nimport type { ApiHubSpotPayload } from \"./api-hubspot\";\nimport type { ApiGoogleSheetsPayload } from \"./api-googlesheets\";\nimport type { DbPostgresPayload } from \"./postgres\";\nimport type { DbDynamoDBPayload } from \"./dynamodb\";\nimport type { DbCosmosDBPayload } from \"./cosmosdb\";\nimport type { DbSnowflakePayload } from \"./snowflake\";\nimport type { StorageS3Payload } from \"./s3\";\n\n/**\n * Discriminated union of all resource payload types\n * Use the 'subtype' field to narrow the type\n */\nexport type ResourceInvokePayload =\n | ApiCustomPayload\n | DbPostgresPayload\n | DbDynamoDBPayload\n | DbCosmosDBPayload\n | DbSnowflakePayload\n | ApiHubSpotPayload\n | ApiGoogleSheetsPayload\n | StorageS3Payload;\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAAA;;AACA,0BAAc,qBADd;AAEA,0BAAc,uBAFd;AAGA,0BAAc,uBAHd;AAIA,0BAAc,uBAJd;AAKA,0BAAc,wBALd;AAMA,0BAAc,iBANd;AAOA,0BAAc,yBAPd;AAQA,0BAAc,0BARd;AASA,0BAAc,+BATd;AAUA,0BAAc,sBAVd;AAWA,0BAAc,uBAXd;",
4
+ "sourcesContent": ["// Re-export all types\nexport * from \"./common\";\nexport * from \"./postgres\";\nexport * from \"./mssql\";\nexport * from \"./dynamodb\";\nexport * from \"./cosmosdb\";\nexport * from \"./snowflake\";\nexport * from \"./s3\";\nexport * from \"./api-custom\";\nexport * from \"./api-hubspot\";\nexport * from \"./api-googlesheets\";\nexport * from \"./lambda\";\nexport * from \"./request\";\nexport * from \"./response\";\n\n// Import for discriminated union\nimport type { ApiCustomPayload } from \"./api-custom\";\nimport type { ApiHubSpotPayload } from \"./api-hubspot\";\nimport type { ApiGoogleSheetsPayload } from \"./api-googlesheets\";\nimport type { DbPostgresPayload } from \"./postgres\";\nimport type { DbMssqlPayload } from \"./mssql\";\nimport type { DbDynamoDBPayload } from \"./dynamodb\";\nimport type { DbCosmosDBPayload } from \"./cosmosdb\";\nimport type { DbSnowflakePayload } from \"./snowflake\";\nimport type { StorageS3Payload } from \"./s3\";\nimport type { ApiLambdaPayload } from \"./lambda\";\n\n/**\n * Discriminated union of all resource payload types\n * Use the 'subtype' field to narrow the type\n */\nexport type ResourceInvokePayload =\n | ApiCustomPayload\n | DbPostgresPayload\n | DbMssqlPayload\n | DbDynamoDBPayload\n | DbCosmosDBPayload\n | DbSnowflakePayload\n | ApiHubSpotPayload\n | ApiGoogleSheetsPayload\n | StorageS3Payload\n | ApiLambdaPayload;\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;AACA,0BAAc,qBADd;AAEA,0BAAc,uBAFd;AAGA,0BAAc,oBAHd;AAIA,0BAAc,uBAJd;AAKA,0BAAc,uBALd;AAMA,0BAAc,wBANd;AAOA,0BAAc,iBAPd;AAQA,0BAAc,yBARd;AASA,0BAAc,0BATd;AAUA,0BAAc,+BAVd;AAWA,0BAAc,qBAXd;AAYA,0BAAc,sBAZd;AAaA,0BAAc,uBAbd;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
1
  export * from "./common";
2
2
  export * from "./postgres";
3
+ export * from "./mssql";
3
4
  export * from "./dynamodb";
4
5
  export * from "./cosmosdb";
5
6
  export * from "./snowflake";
@@ -7,19 +8,22 @@ export * from "./s3";
7
8
  export * from "./api-custom";
8
9
  export * from "./api-hubspot";
9
10
  export * from "./api-googlesheets";
11
+ export * from "./lambda";
10
12
  export * from "./request";
11
13
  export * from "./response";
12
14
  import type { ApiCustomPayload } from "./api-custom";
13
15
  import type { ApiHubSpotPayload } from "./api-hubspot";
14
16
  import type { ApiGoogleSheetsPayload } from "./api-googlesheets";
15
17
  import type { DbPostgresPayload } from "./postgres";
18
+ import type { DbMssqlPayload } from "./mssql";
16
19
  import type { DbDynamoDBPayload } from "./dynamodb";
17
20
  import type { DbCosmosDBPayload } from "./cosmosdb";
18
21
  import type { DbSnowflakePayload } from "./snowflake";
19
22
  import type { StorageS3Payload } from "./s3";
23
+ import type { ApiLambdaPayload } from "./lambda";
20
24
  /**
21
25
  * Discriminated union of all resource payload types
22
26
  * Use the 'subtype' field to narrow the type
23
27
  */
24
- export type ResourceInvokePayload = ApiCustomPayload | DbPostgresPayload | DbDynamoDBPayload | DbCosmosDBPayload | DbSnowflakePayload | ApiHubSpotPayload | ApiGoogleSheetsPayload | StorageS3Payload;
28
+ export type ResourceInvokePayload = ApiCustomPayload | DbPostgresPayload | DbMssqlPayload | DbDynamoDBPayload | DbCosmosDBPayload | DbSnowflakePayload | ApiHubSpotPayload | ApiGoogleSheetsPayload | StorageS3Payload | ApiLambdaPayload;
25
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAC7B,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAC7B,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,GAChB,gBAAgB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  // Re-export all types
2
2
  export * from "./common";
3
3
  export * from "./postgres";
4
+ export * from "./mssql";
4
5
  export * from "./dynamodb";
5
6
  export * from "./cosmosdb";
6
7
  export * from "./snowflake";
@@ -8,6 +9,7 @@ export * from "./s3";
8
9
  export * from "./api-custom";
9
10
  export * from "./api-hubspot";
10
11
  export * from "./api-googlesheets";
12
+ export * from "./lambda";
11
13
  export * from "./request";
12
14
  export * from "./response";
13
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var lambda_exports = {};
16
+ module.exports = __toCommonJS(lambda_exports);
17
+ //# sourceMappingURL=lambda.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["lambda.js"],
4
+ "sourcesContent": ["export {};\n//# sourceMappingURL=lambda.js.map"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Lambda invocation type
3
+ * - RequestResponse (default): Synchronous invocation
4
+ * - Event: Asynchronous invocation
5
+ * - DryRun: Validate parameters and permissions only
6
+ */
7
+ export type LambdaInvocationType = "RequestResponse" | "Event" | "DryRun";
8
+ /**
9
+ * Lambda log type
10
+ * - None (default): Don't include logs
11
+ * - Tail: Include the last 4 KB of execution log (sync only)
12
+ */
13
+ export type LambdaLogType = "None" | "Tail";
14
+ /**
15
+ * Payload for invoking a Lambda resource
16
+ * Matches the backend LambdaInvokePayload structure in go-common/resourcetypes/lambda.go
17
+ */
18
+ export interface ApiLambdaPayload {
19
+ type: "api";
20
+ subtype: "lambda";
21
+ /**
22
+ * The name, ARN, or partial ARN of the Lambda function.
23
+ * Formats:
24
+ * - Function name: my-function
25
+ * - Function ARN: arn:aws:lambda:us-west-2:123456789012:function:my-function
26
+ * - Partial ARN: 123456789012:function:my-function
27
+ * You can append a version number or alias to any of the formats.
28
+ */
29
+ FunctionName: string;
30
+ /**
31
+ * The JSON input for the Lambda function.
32
+ * Max 6 MB for synchronous invocations, 1 MB for asynchronous.
33
+ */
34
+ Payload?: unknown;
35
+ /**
36
+ * The invocation mode.
37
+ * - RequestResponse (default): Synchronous invocation
38
+ * - Event: Asynchronous invocation
39
+ * - DryRun: Validate parameters and permissions only
40
+ */
41
+ InvocationType?: LambdaInvocationType;
42
+ /**
43
+ * Controls execution log inclusion in the response.
44
+ * - None (default): Don't include logs
45
+ * - Tail: Include the last 4 KB of execution log (sync only)
46
+ */
47
+ LogType?: LambdaLogType;
48
+ /**
49
+ * Specifies a version or alias to invoke.
50
+ * If not specified, invokes $LATEST.
51
+ */
52
+ Qualifier?: string;
53
+ /**
54
+ * Up to 3,583 bytes of base64-encoded data about the invoking client
55
+ * to pass to the function. Only for synchronous invocations.
56
+ */
57
+ ClientContext?: string;
58
+ /**
59
+ * A unique name for durable execution.
60
+ * Length: 1-64 characters. Pattern: [a-zA-Z0-9-_]+
61
+ */
62
+ DurableExecutionName?: string;
63
+ /**
64
+ * The identifier for tenant in multi-tenant Lambda function.
65
+ * Length: 1-256 characters.
66
+ */
67
+ TenantId?: string;
68
+ }
69
+ /**
70
+ * Result from a Lambda invocation
71
+ * Matches the backend LambdaInvokeResult structure in go-common/resourcetypes/lambda.go
72
+ */
73
+ export interface ApiLambdaResult {
74
+ kind: "lambda";
75
+ /**
76
+ * The HTTP status code for the invocation:
77
+ * - 200: RequestResponse success
78
+ * - 202: Event success (async)
79
+ * - 204: DryRun success
80
+ */
81
+ StatusCode: number;
82
+ /**
83
+ * The response from the Lambda function.
84
+ * For RequestResponse, contains the function's return value.
85
+ * For Event and DryRun, this is empty.
86
+ */
87
+ Payload?: unknown;
88
+ /**
89
+ * Indicates if there was an error during function execution.
90
+ * Values: "Handled" or "Unhandled"
91
+ */
92
+ FunctionError?: string;
93
+ /**
94
+ * The last 4 KB of execution log (base64-encoded).
95
+ * Only populated when LogType is "Tail".
96
+ */
97
+ LogResult?: string;
98
+ /**
99
+ * The version of the function that was executed.
100
+ */
101
+ ExecutedVersion?: string;
102
+ /**
103
+ * The ARN of the started durable execution.
104
+ */
105
+ DurableExecutionArn?: string;
106
+ }
107
+ //# sourceMappingURL=lambda.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lambda.d.ts","sourceRoot":"","sources":["../../src/schemas/lambda.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,QAAQ,CAAC;IAElB;;;;;;;OAOG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IAEtC;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC;IAEf;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lambda.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lambda.js","sourceRoot":"","sources":["../../src/schemas/lambda.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var mssql_exports = {};
16
+ module.exports = __toCommonJS(mssql_exports);
17
+ //# sourceMappingURL=mssql.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["mssql.js"],
4
+ "sourcesContent": ["export {};\n//# sourceMappingURL=mssql.js.map"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Allowed types for MSSQL query parameters (named parameters)
3
+ */
4
+ export type DbMssqlParamValue = string | number | boolean | null;
5
+ /**
6
+ * Payload for invoking a Microsoft SQL Server database resource
7
+ */
8
+ export interface DbMssqlPayload {
9
+ type: "database";
10
+ subtype: "mssql";
11
+ /** SQL query to execute */
12
+ sql: string;
13
+ /** Optional named parameters for the query (e.g., { id: 123 } for @id) */
14
+ params?: Record<string, DbMssqlParamValue>;
15
+ /** Optional timeout in milliseconds */
16
+ timeoutMs?: number;
17
+ }
18
+ //# sourceMappingURL=mssql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mssql.d.ts","sourceRoot":"","sources":["../../src/schemas/mssql.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC3C,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mssql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mssql.js","sourceRoot":"","sources":["../../src/schemas/mssql.ts"],"names":[],"mappings":""}
@@ -16,12 +16,12 @@ export interface DbPostgresPayload {
16
16
  timeoutMs?: number;
17
17
  }
18
18
  /**
19
- * Result from a database query execution
19
+ * Result from a database query execution with typed rows
20
20
  */
21
- export interface DbResult {
21
+ export interface DbResult<T = Record<string, unknown>> {
22
22
  kind: "database";
23
23
  /** Array of row objects returned by the query */
24
- rows: Record<string, unknown>[];
24
+ rows: T[];
25
25
  /** Number of rows affected by the query (for INSERT, UPDATE, DELETE) */
26
26
  rowsAffected?: number;
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/schemas/postgres.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/schemas/postgres.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,IAAI,EAAE,UAAU,CAAC;IACjB,iDAAiD;IACjD,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -4,10 +4,11 @@ import type { StorageS3Result } from "./s3";
4
4
  import type { DbDynamoDBResult } from "./dynamodb";
5
5
  import type { DbCosmosDBResult, DbCosmosDBResultGeneric } from "./cosmosdb";
6
6
  import type { DbSnowflakeResult } from "./snowflake";
7
+ import type { ApiLambdaResult } from "./lambda";
7
8
  /**
8
9
  * Union of all possible resource invocation result types
9
10
  */
10
- export type ResourceInvokeSuccess = ApiResult | DbResult | StorageS3Result | DbDynamoDBResult | DbCosmosDBResult | DbSnowflakeResult;
11
+ export type ResourceInvokeSuccess = ApiResult | DbResult | StorageS3Result | DbDynamoDBResult | DbCosmosDBResult | DbSnowflakeResult | ApiLambdaResult;
11
12
  /**
12
13
  * Base successful invocation response - generic over result type
13
14
  */
@@ -40,9 +41,9 @@ export interface InvokeFailure {
40
41
  */
41
42
  export type InvokeResponse = InvokeSuccess | InvokeFailure;
42
43
  /**
43
- * Response from database resource invocation
44
+ * Response from database resource invocation (generic for typed rows)
44
45
  */
45
- export type DatabaseInvokeResponse = BaseInvokeSuccess<DbResult> | InvokeFailure;
46
+ export type DatabaseInvokeResponse<T = Record<string, unknown>> = BaseInvokeSuccess<DbResult<T>> | InvokeFailure;
46
47
  /**
47
48
  * Response from API resource invocation (custom or HubSpot)
48
49
  */
@@ -63,4 +64,8 @@ export type CosmosDBInvokeResponse<T = Record<string, unknown>> = BaseInvokeSucc
63
64
  * Response from Snowflake database resource invocation
64
65
  */
65
66
  export type SnowflakeInvokeResponse = BaseInvokeSuccess<DbSnowflakeResult> | InvokeFailure;
67
+ /**
68
+ * Response from Lambda resource invocation
69
+ */
70
+ export type LambdaInvokeResponse = BaseInvokeSuccess<ApiLambdaResult> | InvokeFailure;
66
71
  //# sourceMappingURL=response.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/schemas/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAErI;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,EAAE,EAAE,IAAI,CAAC;IACT,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,MAAM,EAAE,CAAC,CAAC;CACX;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,KAAK,CAAC;IACV,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,aAAa,CAAC;AAM3D;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAC1D,iBAAiB,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,GAC7C,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/schemas/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAEvJ;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,EAAE,EAAE,IAAI,CAAC;IACT,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,MAAM,EAAE,CAAC,CAAC;CACX;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,KAAK,CAAC;IACV,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,aAAa,CAAC;AAM3D;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAC1D,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAC9B,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAC1D,iBAAiB,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,GAC7C,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,aAAa,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@major-tech/resource-client",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "TypeScript client library for invoking Major resources (PostgreSQL, Custom APIs, HubSpot, S3)",
5
5
  "type": "module",
6
6
  "sideEffects": false,