@major-tech/resource-client 0.2.4 → 0.2.6

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 (42) hide show
  1. package/bin/generate-clients.mjs +5 -3
  2. package/dist/clients/cosmosdb.cjs +182 -0
  3. package/dist/clients/cosmosdb.cjs.map +7 -0
  4. package/dist/clients/cosmosdb.d.ts +93 -0
  5. package/dist/clients/cosmosdb.d.ts.map +1 -0
  6. package/dist/clients/cosmosdb.js +155 -0
  7. package/dist/clients/cosmosdb.js.map +1 -0
  8. package/dist/clients/googlesheets.cjs +129 -0
  9. package/dist/clients/googlesheets.cjs.map +7 -0
  10. package/dist/clients/googlesheets.d.ts +68 -0
  11. package/dist/clients/googlesheets.d.ts.map +1 -0
  12. package/dist/clients/googlesheets.js +102 -0
  13. package/dist/clients/googlesheets.js.map +1 -0
  14. package/dist/index.cjs +4 -0
  15. package/dist/index.cjs.map +2 -2
  16. package/dist/index.d.ts +3 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +2 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/schemas/api-googlesheets.cjs +17 -0
  21. package/dist/schemas/api-googlesheets.cjs.map +7 -0
  22. package/dist/schemas/api-googlesheets.d.ts +31 -0
  23. package/dist/schemas/api-googlesheets.d.ts.map +1 -0
  24. package/dist/schemas/api-googlesheets.js +2 -0
  25. package/dist/schemas/api-googlesheets.js.map +1 -0
  26. package/dist/schemas/cosmosdb.cjs +17 -0
  27. package/dist/schemas/cosmosdb.cjs.map +7 -0
  28. package/dist/schemas/cosmosdb.d.ts +121 -0
  29. package/dist/schemas/cosmosdb.d.ts.map +1 -0
  30. package/dist/schemas/cosmosdb.js +2 -0
  31. package/dist/schemas/cosmosdb.js.map +1 -0
  32. package/dist/schemas/index.cjs +2 -0
  33. package/dist/schemas/index.cjs.map +2 -2
  34. package/dist/schemas/index.d.ts +5 -1
  35. package/dist/schemas/index.d.ts.map +1 -1
  36. package/dist/schemas/index.js +2 -0
  37. package/dist/schemas/index.js.map +1 -1
  38. package/dist/schemas/request.d.ts +1 -1
  39. package/dist/schemas/request.d.ts.map +1 -1
  40. package/dist/schemas/response.d.ts +6 -1
  41. package/dist/schemas/response.d.ts.map +1 -1
  42. package/package.json +1 -1
@@ -0,0 +1,68 @@
1
+ import type { HttpMethod, QueryParams, ApiInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class GoogleSheetsResourceClient 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
+ * Get values from a range in the spreadsheet
14
+ * @param range A1 notation range (e.g., "Sheet1!A1:D5")
15
+ * @param invocationKey Unique key for tracking this invocation
16
+ */
17
+ getValues(range: string, invocationKey: string): Promise<ApiInvokeResponse>;
18
+ /**
19
+ * Update values in a range in the spreadsheet
20
+ * @param range A1 notation range (e.g., "Sheet1!A1:D5")
21
+ * @param values 2D array of values to write
22
+ * @param invocationKey Unique key for tracking this invocation
23
+ * @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
24
+ */
25
+ updateValues(range: string, values: unknown[][], invocationKey: string, valueInputOption?: "RAW" | "USER_ENTERED"): Promise<ApiInvokeResponse>;
26
+ /**
27
+ * Append values to a sheet
28
+ * @param range A1 notation range (e.g., "Sheet1!A1:D1")
29
+ * @param values 2D array of values to append
30
+ * @param invocationKey Unique key for tracking this invocation
31
+ * @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
32
+ */
33
+ appendValues(range: string, values: unknown[][], invocationKey: string, valueInputOption?: "RAW" | "USER_ENTERED"): Promise<ApiInvokeResponse>;
34
+ /**
35
+ * Clear values in a range
36
+ * @param range A1 notation range (e.g., "Sheet1!A1:D5")
37
+ * @param invocationKey Unique key for tracking this invocation
38
+ */
39
+ clearValues(range: string, invocationKey: string): Promise<ApiInvokeResponse>;
40
+ /**
41
+ * Batch get multiple ranges
42
+ * @param ranges Array of A1 notation ranges
43
+ * @param invocationKey Unique key for tracking this invocation
44
+ */
45
+ batchGetValues(ranges: string[], invocationKey: string): Promise<ApiInvokeResponse>;
46
+ /**
47
+ * Batch update multiple ranges
48
+ * @param data Array of range updates
49
+ * @param invocationKey Unique key for tracking this invocation
50
+ * @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
51
+ */
52
+ batchUpdateValues(data: Array<{
53
+ range: string;
54
+ values: unknown[][];
55
+ }>, invocationKey: string, valueInputOption?: "RAW" | "USER_ENTERED"): Promise<ApiInvokeResponse>;
56
+ /**
57
+ * Get spreadsheet metadata
58
+ * @param invocationKey Unique key for tracking this invocation
59
+ */
60
+ getSpreadsheet(invocationKey: string): Promise<ApiInvokeResponse>;
61
+ /**
62
+ * Batch update spreadsheet (for formatting, creating sheets, etc.)
63
+ * @param requests Array of update requests
64
+ * @param invocationKey Unique key for tracking this invocation
65
+ */
66
+ batchUpdate(requests: unknown[], invocationKey: string): Promise<ApiInvokeResponse>;
67
+ }
68
+ //# sourceMappingURL=googlesheets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"googlesheets.d.ts","sourceRoot":"","sources":["../../src/clients/googlesheets.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,0BAA2B,SAAQ,kBAAkB;IAC1D,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;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 -0,0 +1,102 @@
1
+ import { BaseResourceClient } from "../base";
2
+ export class GoogleSheetsResourceClient extends BaseResourceClient {
3
+ async invoke(method, path, invocationKey, options = {}) {
4
+ const payload = {
5
+ type: "api",
6
+ subtype: "googlesheets",
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
+ * Get values from a range in the spreadsheet
17
+ * @param range A1 notation range (e.g., "Sheet1!A1:D5")
18
+ * @param invocationKey Unique key for tracking this invocation
19
+ */
20
+ async getValues(range, invocationKey) {
21
+ return this.invoke("GET", `/values/${range}`, invocationKey);
22
+ }
23
+ /**
24
+ * Update values in a range in the spreadsheet
25
+ * @param range A1 notation range (e.g., "Sheet1!A1:D5")
26
+ * @param values 2D array of values to write
27
+ * @param invocationKey Unique key for tracking this invocation
28
+ * @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
29
+ */
30
+ async updateValues(range, values, invocationKey, valueInputOption = "USER_ENTERED") {
31
+ return this.invoke("PUT", `/values/${range}`, invocationKey, {
32
+ query: { valueInputOption },
33
+ body: { type: "json", value: { values } },
34
+ });
35
+ }
36
+ /**
37
+ * Append values to a sheet
38
+ * @param range A1 notation range (e.g., "Sheet1!A1:D1")
39
+ * @param values 2D array of values to append
40
+ * @param invocationKey Unique key for tracking this invocation
41
+ * @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
42
+ */
43
+ async appendValues(range, values, invocationKey, valueInputOption = "USER_ENTERED") {
44
+ return this.invoke("POST", `/values/${range}:append`, invocationKey, {
45
+ query: { valueInputOption },
46
+ body: { type: "json", value: { values } },
47
+ });
48
+ }
49
+ /**
50
+ * Clear values in a range
51
+ * @param range A1 notation range (e.g., "Sheet1!A1:D5")
52
+ * @param invocationKey Unique key for tracking this invocation
53
+ */
54
+ async clearValues(range, invocationKey) {
55
+ return this.invoke("POST", `/values/${range}:clear`, invocationKey);
56
+ }
57
+ /**
58
+ * Batch get multiple ranges
59
+ * @param ranges Array of A1 notation ranges
60
+ * @param invocationKey Unique key for tracking this invocation
61
+ */
62
+ async batchGetValues(ranges, invocationKey) {
63
+ return this.invoke("GET", "/values:batchGet", invocationKey, {
64
+ query: { ranges },
65
+ });
66
+ }
67
+ /**
68
+ * Batch update multiple ranges
69
+ * @param data Array of range updates
70
+ * @param invocationKey Unique key for tracking this invocation
71
+ * @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
72
+ */
73
+ async batchUpdateValues(data, invocationKey, valueInputOption = "USER_ENTERED") {
74
+ return this.invoke("POST", "/values:batchUpdate", invocationKey, {
75
+ body: {
76
+ type: "json",
77
+ value: {
78
+ valueInputOption,
79
+ data,
80
+ },
81
+ },
82
+ });
83
+ }
84
+ /**
85
+ * Get spreadsheet metadata
86
+ * @param invocationKey Unique key for tracking this invocation
87
+ */
88
+ async getSpreadsheet(invocationKey) {
89
+ return this.invoke("GET", "/", invocationKey);
90
+ }
91
+ /**
92
+ * Batch update spreadsheet (for formatting, creating sheets, etc.)
93
+ * @param requests Array of update requests
94
+ * @param invocationKey Unique key for tracking this invocation
95
+ */
96
+ async batchUpdate(requests, invocationKey) {
97
+ return this.invoke("POST", "/:batchUpdate", invocationKey, {
98
+ body: { type: "json", value: { requests } },
99
+ });
100
+ }
101
+ }
102
+ //# sourceMappingURL=googlesheets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"googlesheets.js","sourceRoot":"","sources":["../../src/clients/googlesheets.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAChE,KAAK,CAAC,MAAM,CACV,MAAkB,EAClB,IAAY,EACZ,aAAqB,EACrB,UAII,EAAE;QAEN,MAAM,OAAO,GAA2B;YACtC,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,cAAc;YACvB,MAAM;YACN,IAA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K,CAAC,cAAc,CAClB,MAAgB,EAChB,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE;YAC3D,KAAK,EAAE,EAAE,MAAM,EAAE;SAClB,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CACrB,IAAmD,EACnD,aAAqB,EACrB,mBAA2C,cAAc;QAEzD,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,EAAE,aAAa,EAAE;YAC/D,IAAI,EAAE;gBACJ,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE;oBACL,gBAAgB;oBAChB,IAAI;iBACL;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc,CAAC,aAAqB;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW,CACf,QAAmB,EACnB,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE;YACzD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE;SAC5C,CAAC,CAAC;IACL,CAAC;CACF"}
package/dist/index.cjs CHANGED
@@ -20,8 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var index_exports = {};
21
21
  __export(index_exports, {
22
22
  BaseResourceClient: () => import_base.BaseResourceClient,
23
+ CosmosDBResourceClient: () => import_cosmosdb.CosmosDBResourceClient,
23
24
  CustomApiResourceClient: () => import_api_custom.CustomApiResourceClient,
24
25
  DynamoDBResourceClient: () => import_dynamodb.DynamoDBResourceClient,
26
+ GoogleSheetsResourceClient: () => import_googlesheets.GoogleSheetsResourceClient,
25
27
  HubSpotResourceClient: () => import_hubspot.HubSpotResourceClient,
26
28
  PostgresResourceClient: () => import_postgres.PostgresResourceClient,
27
29
  ResourceInvokeError: () => import_errors.ResourceInvokeError,
@@ -33,7 +35,9 @@ var import_base = require("./base");
33
35
  var import_errors = require("./errors");
34
36
  var import_postgres = require("./clients/postgres");
35
37
  var import_dynamodb = require("./clients/dynamodb");
38
+ var import_cosmosdb = require("./clients/cosmosdb");
36
39
  var import_api_custom = require("./clients/api-custom");
37
40
  var import_hubspot = require("./clients/hubspot");
41
+ var import_googlesheets = require("./clients/googlesheets");
38
42
  var import_s3 = require("./clients/s3");
39
43
  //# 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 { CustomApiResourceClient } from \"./clients/api-custom\";\nexport { HubSpotResourceClient } from \"./clients/hubspot\";\nexport { S3ResourceClient } from \"./clients/s3\";\n\n// Re-export common response types for convenience\nexport type {\n DatabaseInvokeResponse,\n DynamoDBInvokeResponse,\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,wBAAwC;AACxC,qBAAsC;AACtC,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 { DynamoDBResourceClient } from \"./clients/dynamodb\";\nexport { CosmosDBResourceClient } from \"./clients/cosmosdb\";\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 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,wBAAwC;AACxC,qBAAsC;AACtC,0BAA2C;AAC3C,gBAAiC;",
6
6
  "names": []
7
7
  }
package/dist/index.d.ts CHANGED
@@ -3,8 +3,10 @@ export { BaseResourceClient, type BaseClientConfig } from "./base";
3
3
  export { ResourceInvokeError } from "./errors";
4
4
  export { PostgresResourceClient } from "./clients/postgres";
5
5
  export { DynamoDBResourceClient } from "./clients/dynamodb";
6
+ export { CosmosDBResourceClient } from "./clients/cosmosdb";
6
7
  export { CustomApiResourceClient } from "./clients/api-custom";
7
8
  export { HubSpotResourceClient } from "./clients/hubspot";
9
+ export { GoogleSheetsResourceClient } from "./clients/googlesheets";
8
10
  export { S3ResourceClient } from "./clients/s3";
9
- export type { DatabaseInvokeResponse, DynamoDBInvokeResponse, ApiInvokeResponse, StorageInvokeResponse, BaseInvokeSuccess, } from "./schemas/response";
11
+ export type { DatabaseInvokeResponse, DynamoDBInvokeResponse, CosmosDBInvokeResponse, ApiInvokeResponse, StorageInvokeResponse, BaseInvokeSuccess, } from "./schemas/response";
10
12
  //# 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,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,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,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,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,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -7,7 +7,9 @@ export { ResourceInvokeError } from "./errors";
7
7
  // Export individual clients
8
8
  export { PostgresResourceClient } from "./clients/postgres";
9
9
  export { DynamoDBResourceClient } from "./clients/dynamodb";
10
+ export { CosmosDBResourceClient } from "./clients/cosmosdb";
10
11
  export { CustomApiResourceClient } from "./clients/api-custom";
11
12
  export { HubSpotResourceClient } from "./clients/hubspot";
13
+ export { GoogleSheetsResourceClient } from "./clients/googlesheets";
12
14
  export { S3ResourceClient } from "./clients/s3";
13
15
  //# 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,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,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,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,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"}
@@ -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 api_googlesheets_exports = {};
16
+ module.exports = __toCommonJS(api_googlesheets_exports);
17
+ //# sourceMappingURL=api-googlesheets.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["api-googlesheets.js"],
4
+ "sourcesContent": ["export {};\n//# sourceMappingURL=api-googlesheets.js.map"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ import type { JsonBody, HttpMethod, QueryParams } from "./common";
2
+ /**
3
+ * Payload for invoking a Google Sheets API resource
4
+ * Note: Google Sheets authentication is handled automatically by the API
5
+ * The resource is bound to a specific spreadsheet (stored in resourceMeta)
6
+ */
7
+ export interface ApiGoogleSheetsPayload {
8
+ type: "api";
9
+ subtype: "googlesheets";
10
+ /** HTTP method to use */
11
+ method: HttpMethod;
12
+ /**
13
+ * Google Sheets API path relative to the spreadsheet
14
+ * Examples:
15
+ * - "/values/{range}" - Get/update cell values (e.g., "/values/Sheet1!A1:D5")
16
+ * - "/values:batchGet" - Get multiple ranges
17
+ * - "/values:batchUpdate" - Update multiple ranges
18
+ * - "/values:append" - Append values
19
+ * - "/values:clear" - Clear values
20
+ * - "/:batchUpdate" - Update spreadsheet properties, formatting, etc.
21
+ * - "" or "/" - Get spreadsheet metadata
22
+ */
23
+ path: string;
24
+ /** Optional query parameters */
25
+ query?: QueryParams;
26
+ /** Optional JSON body (Google Sheets uses JSON) */
27
+ body?: JsonBody;
28
+ /** Optional timeout in milliseconds (default: 30000) */
29
+ timeoutMs?: number;
30
+ }
31
+ //# sourceMappingURL=api-googlesheets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-googlesheets.d.ts","sourceRoot":"","sources":["../../src/schemas/api-googlesheets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAElE;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,cAAc,CAAC;IACxB,yBAAyB;IACzB,MAAM,EAAE,UAAU,CAAC;IACnB;;;;;;;;;;OAUG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,mDAAmD;IACnD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=api-googlesheets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-googlesheets.js","sourceRoot":"","sources":["../../src/schemas/api-googlesheets.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 cosmosdb_exports = {};
16
+ module.exports = __toCommonJS(cosmosdb_exports);
17
+ //# sourceMappingURL=cosmosdb.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["cosmosdb.js"],
4
+ "sourcesContent": ["export {};\n//# sourceMappingURL=cosmosdb.js.map"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Recursive type for CosmosDB document values
3
+ */
4
+ export type CosmosValue = string | number | boolean | null | CosmosValue[] | {
5
+ [key: string]: CosmosValue;
6
+ };
7
+ /**
8
+ * Partition key type - single value or hierarchical array
9
+ */
10
+ export type PartitionKey = string | number | boolean | null | (string | number | boolean | null)[];
11
+ /**
12
+ * Query parameter for parameterized SQL queries
13
+ */
14
+ export interface CosmosQueryParameter {
15
+ name: string;
16
+ value: CosmosValue;
17
+ }
18
+ /**
19
+ * Patch operation for partial document updates
20
+ */
21
+ export interface CosmosPatchOperation {
22
+ op: "add" | "set" | "replace" | "remove" | "incr";
23
+ path: string;
24
+ value?: CosmosValue;
25
+ }
26
+ interface CosmosDBPayloadBase {
27
+ type: "database";
28
+ subtype: "cosmosdb";
29
+ container: string;
30
+ timeoutMs?: number;
31
+ }
32
+ export interface CosmosQueryPayload extends CosmosDBPayloadBase {
33
+ operation: "query";
34
+ query: string;
35
+ parameters?: CosmosQueryParameter[];
36
+ partitionKey?: PartitionKey;
37
+ maxItemCount?: number;
38
+ continuationToken?: string;
39
+ }
40
+ export interface CosmosReadPayload extends CosmosDBPayloadBase {
41
+ operation: "read";
42
+ id: string;
43
+ partitionKey: PartitionKey;
44
+ }
45
+ export interface CosmosCreatePayload extends CosmosDBPayloadBase {
46
+ operation: "create";
47
+ body: Record<string, CosmosValue>;
48
+ }
49
+ export interface CosmosReplacePayload extends CosmosDBPayloadBase {
50
+ operation: "replace";
51
+ id: string;
52
+ partitionKey: PartitionKey;
53
+ body: Record<string, CosmosValue>;
54
+ }
55
+ export interface CosmosUpsertPayload extends CosmosDBPayloadBase {
56
+ operation: "upsert";
57
+ body: Record<string, CosmosValue>;
58
+ }
59
+ export interface CosmosDeletePayload extends CosmosDBPayloadBase {
60
+ operation: "delete";
61
+ id: string;
62
+ partitionKey: PartitionKey;
63
+ }
64
+ export interface CosmosPatchPayload extends CosmosDBPayloadBase {
65
+ operation: "patch";
66
+ id: string;
67
+ partitionKey: PartitionKey;
68
+ patchOperations: CosmosPatchOperation[];
69
+ condition?: string;
70
+ }
71
+ /**
72
+ * Discriminated union of all CosmosDB operation payloads
73
+ */
74
+ export type DbCosmosDBPayload = CosmosQueryPayload | CosmosReadPayload | CosmosCreatePayload | CosmosReplacePayload | CosmosUpsertPayload | CosmosDeletePayload | CosmosPatchPayload;
75
+ export interface CosmosQueryResult<T = Record<string, unknown>> {
76
+ kind: "cosmosdb";
77
+ operation: "query";
78
+ documents: T[];
79
+ count: number;
80
+ continuationToken?: string;
81
+ }
82
+ export interface CosmosReadResult<T = Record<string, unknown>> {
83
+ kind: "cosmosdb";
84
+ operation: "read";
85
+ document: T;
86
+ etag: string;
87
+ }
88
+ export interface CosmosCreateResult<T = Record<string, unknown>> {
89
+ kind: "cosmosdb";
90
+ operation: "create";
91
+ document: T;
92
+ }
93
+ export interface CosmosReplaceResult<T = Record<string, unknown>> {
94
+ kind: "cosmosdb";
95
+ operation: "replace";
96
+ document: T;
97
+ }
98
+ export interface CosmosUpsertResult<T = Record<string, unknown>> {
99
+ kind: "cosmosdb";
100
+ operation: "upsert";
101
+ document: T;
102
+ }
103
+ export interface CosmosDeleteResult {
104
+ kind: "cosmosdb";
105
+ operation: "delete";
106
+ }
107
+ export interface CosmosPatchResult<T = Record<string, unknown>> {
108
+ kind: "cosmosdb";
109
+ operation: "patch";
110
+ document: T;
111
+ }
112
+ /**
113
+ * Union of all CosmosDB operation results (non-generic version)
114
+ */
115
+ export type DbCosmosDBResult = CosmosQueryResult | CosmosReadResult | CosmosCreateResult | CosmosReplaceResult | CosmosUpsertResult | CosmosDeleteResult | CosmosPatchResult;
116
+ /**
117
+ * Generic result type for typed document access
118
+ */
119
+ export type DbCosmosDBResultGeneric<T = Record<string, unknown>> = CosmosQueryResult<T> | CosmosReadResult<T> | CosmosCreateResult<T> | CosmosReplaceResult<T> | CosmosUpsertResult<T> | CosmosDeleteResult | CosmosPatchResult<T>;
120
+ export {};
121
+ //# sourceMappingURL=cosmosdb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cosmosdb.d.ts","sourceRoot":"","sources":["../../src/schemas/cosmosdb.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,WAAW,EAAE,GACb;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAA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emas/cosmosdb.ts"],"names":[],"mappings":""}
@@ -18,9 +18,11 @@ module.exports = __toCommonJS(index_exports);
18
18
  __reExport(index_exports, require("./common"), module.exports);
19
19
  __reExport(index_exports, require("./postgres"), module.exports);
20
20
  __reExport(index_exports, require("./dynamodb"), module.exports);
21
+ __reExport(index_exports, require("./cosmosdb"), module.exports);
21
22
  __reExport(index_exports, require("./s3"), module.exports);
22
23
  __reExport(index_exports, require("./api-custom"), module.exports);
23
24
  __reExport(index_exports, require("./api-hubspot"), module.exports);
25
+ __reExport(index_exports, require("./api-googlesheets"), module.exports);
24
26
  __reExport(index_exports, require("./request"), module.exports);
25
27
  __reExport(index_exports, require("./response"), module.exports);
26
28
  //# 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 \"./s3\";\nexport * from \"./api-custom\";\nexport * from \"./api-hubspot\";\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 { DbPostgresPayload } from \"./postgres\";\nimport type { DbDynamoDBPayload } from \"./dynamodb\";\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 | ApiHubSpotPayload\n | StorageS3Payload;\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAAA;;AACA,0BAAc,qBADd;AAEA,0BAAc,uBAFd;AAGA,0BAAc,uBAHd;AAIA,0BAAc,iBAJd;AAKA,0BAAc,yBALd;AAMA,0BAAc,0BANd;AAOA,0BAAc,sBAPd;AAQA,0BAAc,uBARd;",
4
+ "sourcesContent": ["// Re-export all types\nexport * from \"./common\";\nexport * from \"./postgres\";\nexport * from \"./dynamodb\";\nexport * from \"./cosmosdb\";\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 { 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 | ApiHubSpotPayload\n | ApiGoogleSheetsPayload\n | StorageS3Payload;\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;AACA,0BAAc,qBADd;AAEA,0BAAc,uBAFd;AAGA,0BAAc,uBAHd;AAIA,0BAAc,uBAJd;AAKA,0BAAc,iBALd;AAMA,0BAAc,yBANd;AAOA,0BAAc,0BAPd;AAQA,0BAAc,+BARd;AASA,0BAAc,sBATd;AAUA,0BAAc,uBAVd;",
6
6
  "names": []
7
7
  }
@@ -1,19 +1,23 @@
1
1
  export * from "./common";
2
2
  export * from "./postgres";
3
3
  export * from "./dynamodb";
4
+ export * from "./cosmosdb";
4
5
  export * from "./s3";
5
6
  export * from "./api-custom";
6
7
  export * from "./api-hubspot";
8
+ export * from "./api-googlesheets";
7
9
  export * from "./request";
8
10
  export * from "./response";
9
11
  import type { ApiCustomPayload } from "./api-custom";
10
12
  import type { ApiHubSpotPayload } from "./api-hubspot";
13
+ import type { ApiGoogleSheetsPayload } from "./api-googlesheets";
11
14
  import type { DbPostgresPayload } from "./postgres";
12
15
  import type { DbDynamoDBPayload } from "./dynamodb";
16
+ import type { DbCosmosDBPayload } from "./cosmosdb";
13
17
  import type { StorageS3Payload } from "./s3";
14
18
  /**
15
19
  * Discriminated union of all resource payload types
16
20
  * Use the 'subtype' field to narrow the type
17
21
  */
18
- export type ResourceInvokePayload = ApiCustomPayload | DbPostgresPayload | DbDynamoDBPayload | ApiHubSpotPayload | StorageS3Payload;
22
+ export type ResourceInvokePayload = ApiCustomPayload | DbPostgresPayload | DbDynamoDBPayload | DbCosmosDBPayload | ApiHubSpotPayload | ApiGoogleSheetsPayload | StorageS3Payload;
19
23
  //# 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,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,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,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAC7B,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,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,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,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,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAC7B,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,CAAC"}
@@ -2,9 +2,11 @@
2
2
  export * from "./common";
3
3
  export * from "./postgres";
4
4
  export * from "./dynamodb";
5
+ export * from "./cosmosdb";
5
6
  export * from "./s3";
6
7
  export * from "./api-custom";
7
8
  export * from "./api-hubspot";
9
+ export * from "./api-googlesheets";
8
10
  export * from "./request";
9
11
  export * from "./response";
10
12
  //# 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,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,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,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ResourceInvokePayload } from "./";
1
+ import type { ResourceInvokePayload } from ".";
2
2
  /**
3
3
  * Request envelope for resource invocation
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/schemas/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,OAAO,EAAE,qBAAqB,CAAC;IAC/B;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/schemas/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,GAAG,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,OAAO,EAAE,qBAAqB,CAAC;IAC/B;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -2,10 +2,11 @@ import type { ApiResult } from "./common";
2
2
  import type { DbResult } from "./postgres";
3
3
  import type { StorageS3Result } from "./s3";
4
4
  import type { DbDynamoDBResult } from "./dynamodb";
5
+ import type { DbCosmosDBResult, DbCosmosDBResultGeneric } from "./cosmosdb";
5
6
  /**
6
7
  * Union of all possible resource invocation result types
7
8
  */
8
- export type ResourceInvokeSuccess = ApiResult | DbResult | StorageS3Result | DbDynamoDBResult;
9
+ export type ResourceInvokeSuccess = ApiResult | DbResult | StorageS3Result | DbDynamoDBResult | DbCosmosDBResult;
9
10
  /**
10
11
  * Base successful invocation response - generic over result type
11
12
  */
@@ -53,4 +54,8 @@ export type StorageInvokeResponse = BaseInvokeSuccess<StorageS3Result> | InvokeF
53
54
  * Response from DynamoDB database resource invocation
54
55
  */
55
56
  export type DynamoDBInvokeResponse = BaseInvokeSuccess<DbDynamoDBResult> | InvokeFailure;
57
+ /**
58
+ * Response from CosmosDB database resource invocation (generic for typed documents)
59
+ */
60
+ export type CosmosDBInvokeResponse<T = Record<string, unknown>> = BaseInvokeSuccess<DbCosmosDBResultGeneric<T>> | InvokeFailure;
56
61
  //# 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;AAEnD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAE9F;;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,E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AM,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@major-tech/resource-client",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "TypeScript client library for invoking Major resources (PostgreSQL, Custom APIs, HubSpot, S3)",
5
5
  "type": "module",
6
6
  "sideEffects": false,