@major-tech/resource-client 0.1.1

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 (93) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +67 -0
  3. package/dist/base.cjs +67 -0
  4. package/dist/base.cjs.map +7 -0
  5. package/dist/base.d.ts +20 -0
  6. package/dist/base.d.ts.map +1 -0
  7. package/dist/base.js +41 -0
  8. package/dist/base.js.map +1 -0
  9. package/dist/clients/api-custom.cjs +44 -0
  10. package/dist/clients/api-custom.cjs.map +7 -0
  11. package/dist/clients/api-custom.d.ts +11 -0
  12. package/dist/clients/api-custom.d.ts.map +1 -0
  13. package/dist/clients/api-custom.js +17 -0
  14. package/dist/clients/api-custom.js.map +1 -0
  15. package/dist/clients/hubspot.cjs +43 -0
  16. package/dist/clients/hubspot.cjs.map +7 -0
  17. package/dist/clients/hubspot.d.ts +13 -0
  18. package/dist/clients/hubspot.d.ts.map +1 -0
  19. package/dist/clients/hubspot.js +16 -0
  20. package/dist/clients/hubspot.js.map +1 -0
  21. package/dist/clients/postgres.cjs +41 -0
  22. package/dist/clients/postgres.cjs.map +7 -0
  23. package/dist/clients/postgres.d.ts +6 -0
  24. package/dist/clients/postgres.d.ts.map +1 -0
  25. package/dist/clients/postgres.js +14 -0
  26. package/dist/clients/postgres.js.map +1 -0
  27. package/dist/clients/s3.cjs +41 -0
  28. package/dist/clients/s3.cjs.map +7 -0
  29. package/dist/clients/s3.d.ts +8 -0
  30. package/dist/clients/s3.d.ts.map +1 -0
  31. package/dist/clients/s3.js +14 -0
  32. package/dist/clients/s3.js.map +1 -0
  33. package/dist/errors.cjs +38 -0
  34. package/dist/errors.cjs.map +7 -0
  35. package/dist/errors.d.ts +10 -0
  36. package/dist/errors.d.ts.map +1 -0
  37. package/dist/errors.js +15 -0
  38. package/dist/errors.js.map +1 -0
  39. package/dist/index.cjs +37 -0
  40. package/dist/index.cjs.map +7 -0
  41. package/dist/index.d.ts +9 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +12 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/schemas/api-custom.cjs +17 -0
  46. package/dist/schemas/api-custom.cjs.map +7 -0
  47. package/dist/schemas/api-custom.d.ts +21 -0
  48. package/dist/schemas/api-custom.d.ts.map +1 -0
  49. package/dist/schemas/api-custom.js +2 -0
  50. package/dist/schemas/api-custom.js.map +1 -0
  51. package/dist/schemas/api-hubspot.cjs +17 -0
  52. package/dist/schemas/api-hubspot.cjs.map +7 -0
  53. package/dist/schemas/api-hubspot.d.ts +20 -0
  54. package/dist/schemas/api-hubspot.d.ts.map +1 -0
  55. package/dist/schemas/api-hubspot.js +2 -0
  56. package/dist/schemas/api-hubspot.js.map +1 -0
  57. package/dist/schemas/common.cjs +17 -0
  58. package/dist/schemas/common.cjs.map +7 -0
  59. package/dist/schemas/common.d.ts +66 -0
  60. package/dist/schemas/common.d.ts.map +1 -0
  61. package/dist/schemas/common.js +2 -0
  62. package/dist/schemas/common.js.map +1 -0
  63. package/dist/schemas/index.cjs +25 -0
  64. package/dist/schemas/index.cjs.map +7 -0
  65. package/dist/schemas/index.d.ts +17 -0
  66. package/dist/schemas/index.d.ts.map +1 -0
  67. package/dist/schemas/index.js +9 -0
  68. package/dist/schemas/index.js.map +1 -0
  69. package/dist/schemas/postgres.cjs +17 -0
  70. package/dist/schemas/postgres.cjs.map +7 -0
  71. package/dist/schemas/postgres.d.ts +28 -0
  72. package/dist/schemas/postgres.d.ts.map +1 -0
  73. package/dist/schemas/postgres.js +2 -0
  74. package/dist/schemas/postgres.js.map +1 -0
  75. package/dist/schemas/request.cjs +17 -0
  76. package/dist/schemas/request.cjs.map +7 -0
  77. package/dist/schemas/request.d.ts +15 -0
  78. package/dist/schemas/request.d.ts.map +1 -0
  79. package/dist/schemas/request.js +2 -0
  80. package/dist/schemas/request.js.map +1 -0
  81. package/dist/schemas/response.cjs +17 -0
  82. package/dist/schemas/response.cjs.map +7 -0
  83. package/dist/schemas/response.d.ts +51 -0
  84. package/dist/schemas/response.d.ts.map +1 -0
  85. package/dist/schemas/response.js +2 -0
  86. package/dist/schemas/response.js.map +1 -0
  87. package/dist/schemas/s3.cjs +17 -0
  88. package/dist/schemas/s3.cjs.map +7 -0
  89. package/dist/schemas/s3.d.ts +41 -0
  90. package/dist/schemas/s3.d.ts.map +1 -0
  91. package/dist/schemas/s3.js +2 -0
  92. package/dist/schemas/s3.js.map +1 -0
  93. package/package.json +55 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # @major-tech/resource-client
2
+
3
+ TypeScript client for Major resources (PostgreSQL, Custom APIs, HubSpot, S3). Type-safe, zero dependencies, universal (Node/browser/edge), ESM & CJS.
4
+
5
+ ## Install
6
+ ```bash
7
+ pnpm install @major-tech/resource-client
8
+ ```
9
+
10
+ ## Usage
11
+
12
+ **Config (all clients):**
13
+ ```typescript
14
+ { baseUrl: string; applicationId: string; resourceId: string; majorJwtToken?: string; fetch?: typeof fetch }
15
+ ```
16
+
17
+ **Response:** `{ ok: true; requestId: string; result: T } | { ok: false; requestId: string; error: { message: string; httpStatus?: number } }`
18
+
19
+ **PostgreSQL:**
20
+ ```typescript
21
+ import { PostgresResourceClient } from '@major/resource-client';
22
+ const client = new PostgresResourceClient({ baseUrl, applicationId, resourceId, majorJwtToken? });
23
+ const res = await client.invoke('SELECT * FROM users WHERE id = $1', [123], 'fetch-user-by-id');
24
+ // res.ok ? res.result.rows / res.result.rowsAffected : res.error.message
25
+ ```
26
+
27
+ **Custom API:**
28
+ ```typescript
29
+ import { CustomApiResourceClient } from '@major/resource-client';
30
+ const client = new CustomApiResourceClient({ baseUrl, applicationId, resourceId });
31
+ const res = await client.invoke('POST', '/v1/payments', 'create-payment', {
32
+ query: { currency: 'USD' }, headers: { 'X-Custom': 'value' },
33
+ body: { type: 'json', value: { amount: 100 } }, timeoutMs: 5000
34
+ });
35
+ // res.ok ? res.result.status / res.result.body : res.error
36
+ ```
37
+
38
+ **HubSpot:**
39
+ ```typescript
40
+ import { HubSpotResourceClient } from '@major/resource-client';
41
+ const client = new HubSpotResourceClient({ baseUrl, applicationId, resourceId });
42
+ const res = await client.invoke('GET', '/crm/v3/objects/contacts', 'fetch-contacts', { query: { limit: '10' } });
43
+ // res.ok && res.result.body.kind === 'json' ? res.result.body.value : res.error
44
+ ```
45
+
46
+ **S3:**
47
+ ```typescript
48
+ import { S3ResourceClient } from '@major/resource-client';
49
+ const client = new S3ResourceClient({ baseUrl, applicationId, resourceId });
50
+ const res = await client.invoke('ListObjectsV2', { Bucket: 'my-bucket', Prefix: 'uploads/' }, 'list-uploads');
51
+ // res.ok ? res.result.data : res.error
52
+ const url = await client.invoke('GeneratePresignedUrl', { Bucket: 'my-bucket', Key: 'file.pdf', expiresIn: 3600 }, 'presigned-url');
53
+ // url.ok && 'presignedUrl' in url.result ? url.result.presignedUrl / url.result.expiresAt : url.error
54
+ ```
55
+
56
+ **Error Handling:**
57
+ ```typescript
58
+ import { ResourceInvokeError } from '@major/resource-client';
59
+ try { await client.invoke(...); }
60
+ catch (e) { if (e instanceof ResourceInvokeError) { e.message, e.httpStatus, e.requestId } }
61
+ ```
62
+
63
+ **Invocation Keys:** Unique operation identifiers for tracking (format: `[a-zA-Z0-9][a-zA-Z0-9._:-]*`). Examples: `fetch-user-by-id`, `create-payment`, `hubspot:get-contacts`, `s3.list-uploads`
64
+
65
+ **Types:** All exported: `BaseClientConfig`, `DatabaseInvokeResponse`, `ApiInvokeResponse`, `StorageInvokeResponse`, `HttpMethod`, `QueryParams`, `BodyPayload`, `S3Command`, etc.
66
+
67
+ MIT License
package/dist/base.cjs ADDED
@@ -0,0 +1,67 @@
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 base_exports = {};
21
+ __export(base_exports, {
22
+ BaseResourceClient: () => BaseResourceClient
23
+ });
24
+ module.exports = __toCommonJS(base_exports);
25
+ var import_errors = require("./errors");
26
+ class BaseResourceClient {
27
+ static {
28
+ __name(this, "BaseResourceClient");
29
+ }
30
+ config;
31
+ constructor(config) {
32
+ this.config = {
33
+ baseUrl: config.baseUrl.replace(/\/$/, ""),
34
+ majorJwtToken: config.majorJwtToken,
35
+ applicationId: config.applicationId,
36
+ resourceId: config.resourceId,
37
+ fetch: config.fetch || globalThis.fetch
38
+ };
39
+ }
40
+ async invokeRaw(payload, invocationKey) {
41
+ const url = `${this.config.baseUrl}/internal/apps/v1/${this.config.applicationId}/resource/${this.config.resourceId}/invoke`;
42
+ const body = {
43
+ payload,
44
+ invocationKey
45
+ };
46
+ const headers = {
47
+ "Content-Type": "application/json"
48
+ };
49
+ if (this.config.majorJwtToken) {
50
+ headers["x-major-jwt"] = this.config.majorJwtToken;
51
+ }
52
+ try {
53
+ const response = await this.config.fetch(url, {
54
+ method: "POST",
55
+ headers,
56
+ credentials: "include",
57
+ body: JSON.stringify(body)
58
+ });
59
+ const data = await response.json();
60
+ return data;
61
+ } catch (error) {
62
+ const message = error instanceof Error ? error.message : String(error);
63
+ throw new import_errors.ResourceInvokeError(`Failed to invoke resource: ${message}`);
64
+ }
65
+ }
66
+ }
67
+ //# sourceMappingURL=base.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/base.ts"],
4
+ "sourcesContent": ["import type {\n ResourceInvokePayload,\n InvokeResponse,\n InvokeRequest,\n} from \"./schemas\";\nimport { ResourceInvokeError } from \"./errors\";\n\nexport interface BaseClientConfig {\n baseUrl: string;\n majorJwtToken?: string;\n applicationId: string;\n resourceId: string;\n fetch?: typeof fetch;\n}\n\nexport abstract class BaseResourceClient {\n protected readonly config: {\n baseUrl: string;\n majorJwtToken?: string;\n applicationId: string;\n resourceId: string;\n fetch: typeof fetch;\n };\n\n constructor(config: BaseClientConfig) {\n this.config = {\n baseUrl: config.baseUrl.replace(/\\/$/, \"\"),\n majorJwtToken: config.majorJwtToken,\n applicationId: config.applicationId,\n resourceId: config.resourceId,\n fetch: config.fetch || globalThis.fetch,\n };\n }\n\n protected async invokeRaw(\n payload: ResourceInvokePayload,\n invocationKey: string,\n ): Promise<InvokeResponse> {\n const url = `${this.config.baseUrl}/internal/apps/v1/${this.config.applicationId}/resource/${this.config.resourceId}/invoke`;\n \n const body: InvokeRequest = {\n payload,\n invocationKey,\n };\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n };\n\n if (this.config.majorJwtToken) {\n headers[\"x-major-jwt\"] = this.config.majorJwtToken;\n }\n\n try {\n const response = await this.config.fetch(url, {\n method: \"POST\",\n headers,\n credentials: \"include\",\n body: JSON.stringify(body),\n });\n\n const data = await response.json();\n return data as InvokeResponse;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n throw new ResourceInvokeError(`Failed to invoke resource: ${message}`);\n }\n }\n}\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAKA;;;;;AAAA,oBAAoC;AAU9B,MAAgB,mBAAkB;EAVxC,OAUwC;;;EACnB;EAQnB,YAAY,QAAwB;AAClC,SAAK,SAAS;MACZ,SAAS,OAAO,QAAQ,QAAQ,OAAO,EAAE;MACzC,eAAe,OAAO;MACtB,eAAe,OAAO;MACtB,YAAY,OAAO;MACnB,OAAO,OAAO,SAAS,WAAW;;EAEtC;EAEU,MAAM,UACd,SACA,eAAqB;AAErB,UAAM,MAAM,GAAG,KAAK,OAAO,OAAO,qBAAqB,KAAK,OAAO,aAAa,aAAa,KAAK,OAAO,UAAU;AAEnH,UAAM,OAAsB;MAC1B;MACA;;AAGF,UAAM,UAAkC;MACtC,gBAAgB;;AAGlB,QAAI,KAAK,OAAO,eAAe;AAC7B,cAAQ,aAAa,IAAI,KAAK,OAAO;IACvC;AAEA,QAAI;AACF,YAAM,WAAW,MAAM,KAAK,OAAO,MAAM,KAAK;QAC5C,QAAQ;QACR;QACA,aAAa;QACb,MAAM,KAAK,UAAU,IAAI;OAC1B;AAED,YAAM,OAAO,MAAM,SAAS,KAAI;AAChC,aAAO;IACT,SAAS,OAAO;AACd,YAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACrE,YAAM,IAAI,kCAAoB,8BAA8B,OAAO,EAAE;IACvE;EACF;;",
6
+ "names": []
7
+ }
package/dist/base.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import type { ResourceInvokePayload, InvokeResponse } from "./schemas";
2
+ export interface BaseClientConfig {
3
+ baseUrl: string;
4
+ majorJwtToken?: string;
5
+ applicationId: string;
6
+ resourceId: string;
7
+ fetch?: typeof fetch;
8
+ }
9
+ export declare abstract class BaseResourceClient {
10
+ protected readonly config: {
11
+ baseUrl: string;
12
+ majorJwtToken?: string;
13
+ applicationId: string;
14
+ resourceId: string;
15
+ fetch: typeof fetch;
16
+ };
17
+ constructor(config: BaseClientConfig);
18
+ protected invokeRaw(payload: ResourceInvokePayload, invocationKey: string): Promise<InvokeResponse>;
19
+ }
20
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EAEf,MAAM,WAAW,CAAC;AAGnB,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,8BAAsB,kBAAkB;IACtC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;QACzB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,OAAO,KAAK,CAAC;KACrB,CAAC;gBAEU,MAAM,EAAE,gBAAgB;cAUpB,SAAS,CACvB,OAAO,EAAE,qBAAqB,EAC9B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,cAAc,CAAC;CA+B3B"}
package/dist/base.js ADDED
@@ -0,0 +1,41 @@
1
+ import { ResourceInvokeError } from "./errors";
2
+ export class BaseResourceClient {
3
+ config;
4
+ constructor(config) {
5
+ this.config = {
6
+ baseUrl: config.baseUrl.replace(/\/$/, ""),
7
+ majorJwtToken: config.majorJwtToken,
8
+ applicationId: config.applicationId,
9
+ resourceId: config.resourceId,
10
+ fetch: config.fetch || globalThis.fetch,
11
+ };
12
+ }
13
+ async invokeRaw(payload, invocationKey) {
14
+ const url = `${this.config.baseUrl}/internal/apps/v1/${this.config.applicationId}/resource/${this.config.resourceId}/invoke`;
15
+ const body = {
16
+ payload,
17
+ invocationKey,
18
+ };
19
+ const headers = {
20
+ "Content-Type": "application/json",
21
+ };
22
+ if (this.config.majorJwtToken) {
23
+ headers["x-major-jwt"] = this.config.majorJwtToken;
24
+ }
25
+ try {
26
+ const response = await this.config.fetch(url, {
27
+ method: "POST",
28
+ headers,
29
+ credentials: "include",
30
+ body: JSON.stringify(body),
31
+ });
32
+ const data = await response.json();
33
+ return data;
34
+ }
35
+ catch (error) {
36
+ const message = error instanceof Error ? error.message : String(error);
37
+ throw new ResourceInvokeError(`Failed to invoke resource: ${message}`);
38
+ }
39
+ }
40
+ }
41
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAU/C,MAAM,OAAgB,kBAAkB;IACnB,MAAM,CAMvB;IAEF,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG;YACZ,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;YAC1C,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK;SACxC,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,SAAS,CACvB,OAA8B,EAC9B,aAAqB;QAErB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,aAAa,aAAa,IAAI,CAAC,MAAM,CAAC,UAAU,SAAS,CAAC;QAE7H,MAAM,IAAI,GAAkB;YAC1B,OAAO;YACP,aAAa;SACd,CAAC;QAEF,MAAM,OAAO,GAA2B;YACtC,cAAc,EAAE,kBAAkB;SACnC,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;YAC9B,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QACrD,CAAC;QAED,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;gBAC5C,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;aAC3B,CAAC,CAAC;YAEH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO,IAAsB,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,IAAI,mBAAmB,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,44 @@
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 api_custom_exports = {};
21
+ __export(api_custom_exports, {
22
+ CustomApiResourceClient: () => CustomApiResourceClient
23
+ });
24
+ module.exports = __toCommonJS(api_custom_exports);
25
+ var import_base = require("../base");
26
+ class CustomApiResourceClient extends import_base.BaseResourceClient {
27
+ static {
28
+ __name(this, "CustomApiResourceClient");
29
+ }
30
+ async invoke(method, path, invocationKey, options = {}) {
31
+ const payload = {
32
+ type: "api",
33
+ subtype: "custom",
34
+ method,
35
+ path,
36
+ query: options.query,
37
+ headers: options.headers,
38
+ body: options.body,
39
+ timeoutMs: options.timeoutMs || 3e4
40
+ };
41
+ return this.invokeRaw(payload, invocationKey);
42
+ }
43
+ }
44
+ //# sourceMappingURL=api-custom.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/clients/api-custom.ts"],
4
+ "sourcesContent": ["import type {\n HttpMethod,\n QueryParams,\n BodyPayload,\n ApiCustomPayload,\n ApiInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\n\nexport class CustomApiResourceClient extends BaseResourceClient {\n async invoke(\n method: HttpMethod,\n path: string,\n invocationKey: string,\n options: {\n query?: QueryParams;\n headers?: Record<string, string>;\n body?: BodyPayload;\n timeoutMs?: number;\n } = {}\n ): Promise<ApiInvokeResponse> {\n const payload: ApiCustomPayload = {\n type: \"api\",\n subtype: \"custom\",\n method,\n path,\n query: options.query,\n headers: options.headers,\n body: options.body,\n timeoutMs: options.timeoutMs || 30000,\n };\n\n return this.invokeRaw(payload, invocationKey) as Promise<ApiInvokeResponse>;\n }\n}\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAOA;;;;;AAAA,kBAAmC;AAE7B,MAAO,gCAAgC,+BAAkB;EAF/D,OAE+D;;;EAC7D,MAAM,OACJ,QACA,MACA,eACA,UAKI,CAAA,GAAE;AAEN,UAAM,UAA4B;MAChC,MAAM;MACN,SAAS;MACT;MACA;MACA,OAAO,QAAQ;MACf,SAAS,QAAQ;MACjB,MAAM,QAAQ;MACd,WAAW,QAAQ,aAAa;;AAGlC,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
+ "names": []
7
+ }
@@ -0,0 +1,11 @@
1
+ import type { HttpMethod, QueryParams, BodyPayload, ApiInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class CustomApiResourceClient extends BaseResourceClient {
4
+ invoke(method: HttpMethod, path: string, invocationKey: string, options?: {
5
+ query?: QueryParams;
6
+ headers?: Record<string, string>;
7
+ body?: BodyPayload;
8
+ timeoutMs?: number;
9
+ }): Promise<ApiInvokeResponse>;
10
+ }
11
+ //# sourceMappingURL=api-custom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-custom.d.ts","sourceRoot":"","sources":["../../src/clients/api-custom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,WAAW,EAEX,iBAAiB,EAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,qBAAa,uBAAwB,SAAQ,kBAAkB;IACvD,MAAM,CACV,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;QACP,KAAK,CAAC,EAAE,WAAW,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,EAAE,WAAW,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,iBAAiB,CAAC;CAc9B"}
@@ -0,0 +1,17 @@
1
+ import { BaseResourceClient } from "../base";
2
+ export class CustomApiResourceClient extends BaseResourceClient {
3
+ async invoke(method, path, invocationKey, options = {}) {
4
+ const payload = {
5
+ type: "api",
6
+ subtype: "custom",
7
+ method,
8
+ path,
9
+ query: options.query,
10
+ headers: options.headers,
11
+ body: options.body,
12
+ timeoutMs: options.timeoutMs || 30000,
13
+ };
14
+ return this.invokeRaw(payload, invocationKey);
15
+ }
16
+ }
17
+ //# sourceMappingURL=api-custom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-custom.js","sourceRoot":"","sources":["../../src/clients/api-custom.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,uBAAwB,SAAQ,kBAAkB;IAC7D,KAAK,CAAC,MAAM,CACV,MAAkB,EAClB,IAAY,EACZ,aAAqB,EACrB,UAKI,EAAE;QAEN,MAAM,OAAO,GAAqB;YAChC,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,QAAQ;YACjB,MAAM;YACN,IAAI;YACJ,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,KAAK;SACtC,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAA+B,CAAC;IAC9E,CAAC;CACF"}
@@ -0,0 +1,43 @@
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 hubspot_exports = {};
21
+ __export(hubspot_exports, {
22
+ HubSpotResourceClient: () => HubSpotResourceClient
23
+ });
24
+ module.exports = __toCommonJS(hubspot_exports);
25
+ var import_base = require("../base");
26
+ class HubSpotResourceClient extends import_base.BaseResourceClient {
27
+ static {
28
+ __name(this, "HubSpotResourceClient");
29
+ }
30
+ async invoke(method, path, invocationKey, options = {}) {
31
+ const payload = {
32
+ type: "api",
33
+ subtype: "hubspot",
34
+ method,
35
+ path,
36
+ query: options.query,
37
+ body: options.body,
38
+ timeoutMs: options.timeoutMs || 3e4
39
+ };
40
+ return this.invokeRaw(payload, invocationKey);
41
+ }
42
+ }
43
+ //# sourceMappingURL=hubspot.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/clients/hubspot.ts"],
4
+ "sourcesContent": ["import type {\n HttpMethod,\n QueryParams,\n ApiHubSpotPayload,\n ApiInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\n\nexport class HubSpotResourceClient extends BaseResourceClient {\n async invoke(\n method: HttpMethod,\n path: string,\n invocationKey: string,\n options: {\n query?: QueryParams;\n body?: { type: \"json\"; value: unknown };\n timeoutMs?: number;\n } = {}\n ): Promise<ApiInvokeResponse> {\n const payload: ApiHubSpotPayload = {\n type: \"api\",\n subtype: \"hubspot\",\n method,\n path,\n query: options.query,\n body: options.body,\n timeoutMs: options.timeoutMs || 30000,\n };\n\n return this.invokeRaw(payload, invocationKey) as Promise<ApiInvokeResponse>;\n }\n}\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAMA;;;;;AAAA,kBAAmC;AAE7B,MAAO,8BAA8B,+BAAkB;EAF7D,OAE6D;;;EAC3D,MAAM,OACJ,QACA,MACA,eACA,UAII,CAAA,GAAE;AAEN,UAAM,UAA6B;MACjC,MAAM;MACN,SAAS;MACT;MACA;MACA,OAAO,QAAQ;MACf,MAAM,QAAQ;MACd,WAAW,QAAQ,aAAa;;AAGlC,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
+ "names": []
7
+ }
@@ -0,0 +1,13 @@
1
+ import type { HttpMethod, QueryParams, ApiInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class HubSpotResourceClient extends BaseResourceClient {
4
+ invoke(method: HttpMethod, path: string, invocationKey: string, options?: {
5
+ query?: QueryParams;
6
+ body?: {
7
+ type: "json";
8
+ value: unknown;
9
+ };
10
+ timeoutMs?: number;
11
+ }): Promise<ApiInvokeResponse>;
12
+ }
13
+ //# sourceMappingURL=hubspot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hubspot.d.ts","sourceRoot":"","sources":["../../src/clients/hubspot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EAEX,iBAAiB,EAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,qBAAa,qBAAsB,SAAQ,kBAAkB;IACrD,MAAM,CACV,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;QACP,KAAK,CAAC,EAAE,WAAW,CAAC;QACpB,IAAI,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAE,CAAC;QACxC,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,iBAAiB,CAAC;CAa9B"}
@@ -0,0 +1,16 @@
1
+ import { BaseResourceClient } from "../base";
2
+ export class HubSpotResourceClient extends BaseResourceClient {
3
+ async invoke(method, path, invocationKey, options = {}) {
4
+ const payload = {
5
+ type: "api",
6
+ subtype: "hubspot",
7
+ method,
8
+ path,
9
+ query: options.query,
10
+ body: options.body,
11
+ timeoutMs: options.timeoutMs || 30000,
12
+ };
13
+ return this.invokeRaw(payload, invocationKey);
14
+ }
15
+ }
16
+ //# sourceMappingURL=hubspot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hubspot.js","sourceRoot":"","sources":["../../src/clients/hubspot.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,qBAAsB,SAAQ,kBAAkB;IAC3D,KAAK,CAAC,MAAM,CACV,MAAkB,EAClB,IAAY,EACZ,aAAqB,EACrB,UAII,EAAE;QAEN,MAAM,OAAO,GAAsB;YACjC,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,SAAS;YAClB,MAAM;YACN,IAAI;YACJ,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,KAAK;SACtC,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAA+B,CAAC;IAC9E,CAAC;CACF"}
@@ -0,0 +1,41 @@
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 postgres_exports = {};
21
+ __export(postgres_exports, {
22
+ PostgresResourceClient: () => PostgresResourceClient
23
+ });
24
+ module.exports = __toCommonJS(postgres_exports);
25
+ var import_base = require("../base");
26
+ class PostgresResourceClient extends import_base.BaseResourceClient {
27
+ static {
28
+ __name(this, "PostgresResourceClient");
29
+ }
30
+ async invoke(sql, params, invocationKey, timeoutMs) {
31
+ const payload = {
32
+ type: "database",
33
+ subtype: "postgresql",
34
+ sql,
35
+ params,
36
+ timeoutMs
37
+ };
38
+ return this.invokeRaw(payload, invocationKey);
39
+ }
40
+ }
41
+ //# sourceMappingURL=postgres.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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;;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import type { DbParamPrimitive, DatabaseInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class PostgresResourceClient extends BaseResourceClient {
4
+ invoke(sql: string, params: DbParamPrimitive[] | undefined, invocationKey: string, timeoutMs?: number): Promise<DatabaseInvokeResponse>;
5
+ }
6
+ //# sourceMappingURL=postgres.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,14 @@
1
+ import { BaseResourceClient } from "../base";
2
+ export class PostgresResourceClient extends BaseResourceClient {
3
+ async invoke(sql, params, invocationKey, timeoutMs) {
4
+ const payload = {
5
+ type: "database",
6
+ subtype: "postgresql",
7
+ sql,
8
+ params,
9
+ timeoutMs,
10
+ };
11
+ return this.invokeRaw(payload, invocationKey);
12
+ }
13
+ }
14
+ //# sourceMappingURL=postgres.js.map
@@ -0,0 +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"}
@@ -0,0 +1,41 @@
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 s3_exports = {};
21
+ __export(s3_exports, {
22
+ S3ResourceClient: () => S3ResourceClient
23
+ });
24
+ module.exports = __toCommonJS(s3_exports);
25
+ var import_base = require("../base");
26
+ class S3ResourceClient extends import_base.BaseResourceClient {
27
+ static {
28
+ __name(this, "S3ResourceClient");
29
+ }
30
+ async invoke(command, params, invocationKey, options = {}) {
31
+ const payload = {
32
+ type: "storage",
33
+ subtype: "s3",
34
+ command,
35
+ params,
36
+ timeoutMs: options.timeoutMs
37
+ };
38
+ return this.invokeRaw(payload, invocationKey);
39
+ }
40
+ }
41
+ //# sourceMappingURL=s3.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/clients/s3.ts"],
4
+ "sourcesContent": ["import type {\n S3Command,\n StorageS3Payload,\n StorageInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\n\nexport class S3ResourceClient extends BaseResourceClient {\n async invoke(\n command: S3Command,\n params: Record<string, unknown>,\n invocationKey: string,\n options: {\n timeoutMs?: number;\n } = {}\n ): Promise<StorageInvokeResponse> {\n const payload: StorageS3Payload = {\n type: \"storage\",\n subtype: \"s3\",\n command,\n params,\n timeoutMs: options.timeoutMs,\n };\n\n return this.invokeRaw(payload, invocationKey) as Promise<StorageInvokeResponse>;\n }\n}\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAKA;;;;;AAAA,kBAAmC;AAE7B,MAAO,yBAAyB,+BAAkB;EAFxD,OAEwD;;;EACtD,MAAM,OACJ,SACA,QACA,eACA,UAEI,CAAA,GAAE;AAEN,UAAM,UAA4B;MAChC,MAAM;MACN,SAAS;MACT;MACA;MACA,WAAW,QAAQ;;AAGrB,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ import type { S3Command, StorageInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class S3ResourceClient extends BaseResourceClient {
4
+ invoke(command: S3Command, params: Record<string, unknown>, invocationKey: string, options?: {
5
+ timeoutMs?: number;
6
+ }): Promise<StorageInvokeResponse>;
7
+ }
8
+ //# sourceMappingURL=s3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../src/clients/s3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAET,qBAAqB,EACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,qBAAa,gBAAiB,SAAQ,kBAAkB;IAChD,MAAM,CACV,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,qBAAqB,CAAC;CAWlC"}
@@ -0,0 +1,14 @@
1
+ import { BaseResourceClient } from "../base";
2
+ export class S3ResourceClient extends BaseResourceClient {
3
+ async invoke(command, params, invocationKey, options = {}) {
4
+ const payload = {
5
+ type: "storage",
6
+ subtype: "s3",
7
+ command,
8
+ params,
9
+ timeoutMs: options.timeoutMs,
10
+ };
11
+ return this.invokeRaw(payload, invocationKey);
12
+ }
13
+ }
14
+ //# sourceMappingURL=s3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.js","sourceRoot":"","sources":["../../src/clients/s3.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,gBAAiB,SAAQ,kBAAkB;IACtD,KAAK,CAAC,MAAM,CACV,OAAkB,EAClB,MAA+B,EAC/B,aAAqB,EACrB,UAEI,EAAE;QAEN,MAAM,OAAO,GAAqB;YAChC,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;YACb,OAAO;YACP,MAAM;YACN,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAmC,CAAC;IAClF,CAAC;CACF"}
@@ -0,0 +1,38 @@
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 errors_exports = {};
21
+ __export(errors_exports, {
22
+ ResourceInvokeError: () => ResourceInvokeError
23
+ });
24
+ module.exports = __toCommonJS(errors_exports);
25
+ class ResourceInvokeError extends Error {
26
+ static {
27
+ __name(this, "ResourceInvokeError");
28
+ }
29
+ httpStatus;
30
+ requestId;
31
+ constructor(message, httpStatus, requestId) {
32
+ super(message);
33
+ this.name = "ResourceInvokeError";
34
+ this.httpStatus = httpStatus;
35
+ this.requestId = requestId;
36
+ }
37
+ }
38
+ //# sourceMappingURL=errors.cjs.map