@major-tech/resource-client 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/generate-clients.mjs +4 -3
- package/dist/clients/googlesheets.cjs +129 -0
- package/dist/clients/googlesheets.cjs.map +7 -0
- package/dist/clients/googlesheets.d.ts +68 -0
- package/dist/clients/googlesheets.d.ts.map +1 -0
- package/dist/clients/googlesheets.js +102 -0
- package/dist/clients/googlesheets.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/api-googlesheets.cjs +17 -0
- package/dist/schemas/api-googlesheets.cjs.map +7 -0
- package/dist/schemas/api-googlesheets.d.ts +31 -0
- package/dist/schemas/api-googlesheets.d.ts.map +1 -0
- package/dist/schemas/api-googlesheets.js +2 -0
- package/dist/schemas/api-googlesheets.js.map +1 -0
- package/dist/schemas/index.cjs +1 -0
- package/dist/schemas/index.cjs.map +2 -2
- package/dist/schemas/index.d.ts +3 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/request.d.ts +1 -1
- package/dist/schemas/request.d.ts.map +1 -1
- package/package.json +1 -1
package/bin/generate-clients.mjs
CHANGED
|
@@ -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 | api-hubspot | api-custom | storage-s3
|
|
11
|
+
* Types: database-postgresql | database-dynamodb | 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"
|
|
@@ -144,6 +144,7 @@ function getClientClass(type) {
|
|
|
144
144
|
'database-dynamodb': 'DynamoDBResourceClient',
|
|
145
145
|
'api-custom': 'CustomApiResourceClient',
|
|
146
146
|
'api-hubspot': 'HubSpotResourceClient',
|
|
147
|
+
'api-googlesheets': 'GoogleSheetsResourceClient',
|
|
147
148
|
'storage-s3': 'S3ResourceClient',
|
|
148
149
|
};
|
|
149
150
|
return typeMap[type] || 'PostgresResourceClient';
|
|
@@ -178,7 +179,7 @@ function generateIndexFile(resources) {
|
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
function addResource(resourceId, name, type, description, applicationId, framework) {
|
|
181
|
-
const validTypes = ['database-postgresql', 'database-dynamodb', 'api-hubspot', 'api-custom', 'storage-s3'];
|
|
182
|
+
const validTypes = ['database-postgresql', 'database-dynamodb', 'api-hubspot', 'api-googlesheets', 'api-custom', 'storage-s3'];
|
|
182
183
|
if (!validTypes.includes(type)) {
|
|
183
184
|
console.error(`❌ Invalid type: ${type}`);
|
|
184
185
|
console.log(` Valid types: ${validTypes.join(', ')}`);
|
|
@@ -315,7 +316,7 @@ function main() {
|
|
|
315
316
|
console.log(' npx @major-tech/resource-client add <resource_id> <name> <type> <description> <application_id> [--framework <nextjs|vite>]');
|
|
316
317
|
console.log(' npx @major-tech/resource-client remove <name> [--framework <nextjs|vite>]');
|
|
317
318
|
console.log(' npx @major-tech/resource-client list');
|
|
318
|
-
console.log('\nTypes: database-postgresql | database-dynamodb | api-hubspot | api-custom | storage-s3');
|
|
319
|
+
console.log('\nTypes: database-postgresql | database-dynamodb | api-hubspot | api-googlesheets | api-custom | storage-s3');
|
|
319
320
|
return;
|
|
320
321
|
}
|
|
321
322
|
|
|
@@ -0,0 +1,129 @@
|
|
|
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 googlesheets_exports = {};
|
|
21
|
+
__export(googlesheets_exports, {
|
|
22
|
+
GoogleSheetsResourceClient: () => GoogleSheetsResourceClient
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(googlesheets_exports);
|
|
25
|
+
var import_base = require("../base");
|
|
26
|
+
class GoogleSheetsResourceClient extends import_base.BaseResourceClient {
|
|
27
|
+
static {
|
|
28
|
+
__name(this, "GoogleSheetsResourceClient");
|
|
29
|
+
}
|
|
30
|
+
async invoke(method, path, invocationKey, options = {}) {
|
|
31
|
+
const payload = {
|
|
32
|
+
type: "api",
|
|
33
|
+
subtype: "googlesheets",
|
|
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
|
+
* Get values from a range in the spreadsheet
|
|
44
|
+
* @param range A1 notation range (e.g., "Sheet1!A1:D5")
|
|
45
|
+
* @param invocationKey Unique key for tracking this invocation
|
|
46
|
+
*/
|
|
47
|
+
async getValues(range, invocationKey) {
|
|
48
|
+
return this.invoke("GET", `/values/${range}`, invocationKey);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Update values in a range in the spreadsheet
|
|
52
|
+
* @param range A1 notation range (e.g., "Sheet1!A1:D5")
|
|
53
|
+
* @param values 2D array of values to write
|
|
54
|
+
* @param invocationKey Unique key for tracking this invocation
|
|
55
|
+
* @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
|
|
56
|
+
*/
|
|
57
|
+
async updateValues(range, values, invocationKey, valueInputOption = "USER_ENTERED") {
|
|
58
|
+
return this.invoke("PUT", `/values/${range}`, invocationKey, {
|
|
59
|
+
query: { valueInputOption },
|
|
60
|
+
body: { type: "json", value: { values } }
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Append values to a sheet
|
|
65
|
+
* @param range A1 notation range (e.g., "Sheet1!A1:D1")
|
|
66
|
+
* @param values 2D array of values to append
|
|
67
|
+
* @param invocationKey Unique key for tracking this invocation
|
|
68
|
+
* @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
|
|
69
|
+
*/
|
|
70
|
+
async appendValues(range, values, invocationKey, valueInputOption = "USER_ENTERED") {
|
|
71
|
+
return this.invoke("POST", `/values/${range}:append`, invocationKey, {
|
|
72
|
+
query: { valueInputOption },
|
|
73
|
+
body: { type: "json", value: { values } }
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Clear values in a range
|
|
78
|
+
* @param range A1 notation range (e.g., "Sheet1!A1:D5")
|
|
79
|
+
* @param invocationKey Unique key for tracking this invocation
|
|
80
|
+
*/
|
|
81
|
+
async clearValues(range, invocationKey) {
|
|
82
|
+
return this.invoke("POST", `/values/${range}:clear`, invocationKey);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Batch get multiple ranges
|
|
86
|
+
* @param ranges Array of A1 notation ranges
|
|
87
|
+
* @param invocationKey Unique key for tracking this invocation
|
|
88
|
+
*/
|
|
89
|
+
async batchGetValues(ranges, invocationKey) {
|
|
90
|
+
return this.invoke("GET", "/values:batchGet", invocationKey, {
|
|
91
|
+
query: { ranges }
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Batch update multiple ranges
|
|
96
|
+
* @param data Array of range updates
|
|
97
|
+
* @param invocationKey Unique key for tracking this invocation
|
|
98
|
+
* @param valueInputOption How to interpret input values ("RAW" or "USER_ENTERED")
|
|
99
|
+
*/
|
|
100
|
+
async batchUpdateValues(data, invocationKey, valueInputOption = "USER_ENTERED") {
|
|
101
|
+
return this.invoke("POST", "/values:batchUpdate", invocationKey, {
|
|
102
|
+
body: {
|
|
103
|
+
type: "json",
|
|
104
|
+
value: {
|
|
105
|
+
valueInputOption,
|
|
106
|
+
data
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Get spreadsheet metadata
|
|
113
|
+
* @param invocationKey Unique key for tracking this invocation
|
|
114
|
+
*/
|
|
115
|
+
async getSpreadsheet(invocationKey) {
|
|
116
|
+
return this.invoke("GET", "/", invocationKey);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Batch update spreadsheet (for formatting, creating sheets, etc.)
|
|
120
|
+
* @param requests Array of update requests
|
|
121
|
+
* @param invocationKey Unique key for tracking this invocation
|
|
122
|
+
*/
|
|
123
|
+
async batchUpdate(requests, invocationKey) {
|
|
124
|
+
return this.invoke("POST", "/:batchUpdate", invocationKey, {
|
|
125
|
+
body: { type: "json", value: { requests } }
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=googlesheets.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/clients/googlesheets.ts"],
|
|
4
|
+
"sourcesContent": ["import type {\n HttpMethod,\n QueryParams,\n ApiGoogleSheetsPayload,\n ApiInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\n\nexport class GoogleSheetsResourceClient 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: ApiGoogleSheetsPayload = {\n type: \"api\",\n subtype: \"googlesheets\",\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 * Get values from a range in the spreadsheet\n * @param range A1 notation range (e.g., \"Sheet1!A1:D5\")\n * @param invocationKey Unique key for tracking this invocation\n */\n async getValues(\n range: string,\n invocationKey: string\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\"GET\", `/values/${range}`, invocationKey);\n }\n\n /**\n * Update values in a range in the spreadsheet\n * @param range A1 notation range (e.g., \"Sheet1!A1:D5\")\n * @param values 2D array of values to write\n * @param invocationKey Unique key for tracking this invocation\n * @param valueInputOption How to interpret input values (\"RAW\" or \"USER_ENTERED\")\n */\n async updateValues(\n range: string,\n values: unknown[][],\n invocationKey: string,\n valueInputOption: \"RAW\" | \"USER_ENTERED\" = \"USER_ENTERED\"\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\n \"PUT\",\n `/values/${range}`,\n invocationKey,\n {\n query: { valueInputOption },\n body: { type: \"json\", value: { values } },\n }\n );\n }\n\n /**\n * Append values to a sheet\n * @param range A1 notation range (e.g., \"Sheet1!A1:D1\")\n * @param values 2D array of values to append\n * @param invocationKey Unique key for tracking this invocation\n * @param valueInputOption How to interpret input values (\"RAW\" or \"USER_ENTERED\")\n */\n async appendValues(\n range: string,\n values: unknown[][],\n invocationKey: string,\n valueInputOption: \"RAW\" | \"USER_ENTERED\" = \"USER_ENTERED\"\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\n \"POST\",\n `/values/${range}:append`,\n invocationKey,\n {\n query: { valueInputOption },\n body: { type: \"json\", value: { values } },\n }\n );\n }\n\n /**\n * Clear values in a range\n * @param range A1 notation range (e.g., \"Sheet1!A1:D5\")\n * @param invocationKey Unique key for tracking this invocation\n */\n async clearValues(\n range: string,\n invocationKey: string\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\"POST\", `/values/${range}:clear`, invocationKey);\n }\n\n /**\n * Batch get multiple ranges\n * @param ranges Array of A1 notation ranges\n * @param invocationKey Unique key for tracking this invocation\n */\n async batchGetValues(\n ranges: string[],\n invocationKey: string\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\"GET\", \"/values:batchGet\", invocationKey, {\n query: { ranges },\n });\n }\n\n /**\n * Batch update multiple ranges\n * @param data Array of range updates\n * @param invocationKey Unique key for tracking this invocation\n * @param valueInputOption How to interpret input values (\"RAW\" or \"USER_ENTERED\")\n */\n async batchUpdateValues(\n data: Array<{ range: string; values: unknown[][] }>,\n invocationKey: string,\n valueInputOption: \"RAW\" | \"USER_ENTERED\" = \"USER_ENTERED\"\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\"POST\", \"/values:batchUpdate\", invocationKey, {\n body: {\n type: \"json\",\n value: {\n valueInputOption,\n data,\n },\n },\n });\n }\n\n /**\n * Get spreadsheet metadata\n * @param invocationKey Unique key for tracking this invocation\n */\n async getSpreadsheet(invocationKey: string): Promise<ApiInvokeResponse> {\n return this.invoke(\"GET\", \"/\", invocationKey);\n }\n\n /**\n * Batch update spreadsheet (for formatting, creating sheets, etc.)\n * @param requests Array of update requests\n * @param invocationKey Unique key for tracking this invocation\n */\n async batchUpdate(\n requests: unknown[],\n invocationKey: string\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\"POST\", \"/:batchUpdate\", invocationKey, {\n body: { type: \"json\", value: { requests } },\n });\n }\n}\n\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAMA;;;;;AAAA,kBAAmC;AAE7B,MAAO,mCAAmC,+BAAkB;EAFlE,OAEkE;;;EAChE,MAAM,OACJ,QACA,MACA,eACA,UAII,CAAA,GAAE;AAEN,UAAM,UAAkC;MACtC,MAAM;MACN,SAAS;MACT;MACA;MACA,OAAO,QAAQ;MACf,MAAM,QAAQ;MACd,WAAW,QAAQ,aAAa;;AAGlC,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;EAOA,MAAM,UACJ,OACA,eAAqB;AAErB,WAAO,KAAK,OAAO,OAAO,WAAW,KAAK,IAAI,aAAa;EAC7D;;;;;;;;EASA,MAAM,aACJ,OACA,QACA,eACA,mBAA2C,gBAAc;AAEzD,WAAO,KAAK,OACV,OACA,WAAW,KAAK,IAChB,eACA;MACE,OAAO,EAAE,iBAAgB;MACzB,MAAM,EAAE,MAAM,QAAQ,OAAO,EAAE,OAAM,EAAE;KACxC;EAEL;;;;;;;;EASA,MAAM,aACJ,OACA,QACA,eACA,mBAA2C,gBAAc;AAEzD,WAAO,KAAK,OACV,QACA,WAAW,KAAK,WAChB,eACA;MACE,OAAO,EAAE,iBAAgB;MACzB,MAAM,EAAE,MAAM,QAAQ,OAAO,EAAE,OAAM,EAAE;KACxC;EAEL;;;;;;EAOA,MAAM,YACJ,OACA,eAAqB;AAErB,WAAO,KAAK,OAAO,QAAQ,WAAW,KAAK,UAAU,aAAa;EACpE;;;;;;EAOA,MAAM,eACJ,QACA,eAAqB;AAErB,WAAO,KAAK,OAAO,OAAO,oBAAoB,eAAe;MAC3D,OAAO,EAAE,OAAM;KAChB;EACH;;;;;;;EAQA,MAAM,kBACJ,MACA,eACA,mBAA2C,gBAAc;AAEzD,WAAO,KAAK,OAAO,QAAQ,uBAAuB,eAAe;MAC/D,MAAM;QACJ,MAAM;QACN,OAAO;UACL;UACA;;;KAGL;EACH;;;;;EAMA,MAAM,eAAe,eAAqB;AACxC,WAAO,KAAK,OAAO,OAAO,KAAK,aAAa;EAC9C;;;;;;EAOA,MAAM,YACJ,UACA,eAAqB;AAErB,WAAO,KAAK,OAAO,QAAQ,iBAAiB,eAAe;MACzD,MAAM,EAAE,MAAM,QAAQ,OAAO,EAAE,SAAQ,EAAE;KAC1C;EACH;;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -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;SAAE,CAAC;QACxC,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,iBAAiB,CAAC;IAc7B;;;;OAIG;IACG,SAAS,CACb,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,iBAAiB,CAAC;IAI7B;;;;;;OAMG;IACG,YAAY,CAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,OAAO,EAAE,EAAE,EACnB,aAAa,EAAE,MAAM,EACrB,gBAAgB,GAAE,KAAK,GAAG,cAA+B,GACxD,OAAO,CAAC,iBAAiB,CAAC;IAY7B;;;;;;OAMG;IACG,YAAY,CAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,OAAO,EAAE,EAAE,EACnB,aAAa,EAAE,MAAM,EACrB,gBAAgB,GAAE,KAAK,GAAG,cAA+B,GACxD,OAAO,CAAC,iBAAiB,CAAC;IAY7B;;;;OAIG;IACG,WAAW,CACf,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,iBAAiB,CAAC;IAI7B;;;;OAIG;IACG,cAAc,CAClB,MAAM,EAAE,MAAM,EAAE,EAChB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,iBAAiB,CAAC;IAM7B;;;;;OAKG;IACG,iBAAiB,CACrB,IAAI,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAC,EACnD,aAAa,EAAE,MAAM,EACrB,gBAAgB,GAAE,KAAK,GAAG,cAA+B,GACxD,OAAO,CAAC,iBAAiB,CAAC;IAY7B;;;OAGG;IACG,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIvE;;;;OAIG;IACG,WAAW,CACf,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,iBAAiB,CAAC;CAK9B"}
|
|
@@ -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":"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"}
|
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ __export(index_exports, {
|
|
|
22
22
|
BaseResourceClient: () => import_base.BaseResourceClient,
|
|
23
23
|
CustomApiResourceClient: () => import_api_custom.CustomApiResourceClient,
|
|
24
24
|
DynamoDBResourceClient: () => import_dynamodb.DynamoDBResourceClient,
|
|
25
|
+
GoogleSheetsResourceClient: () => import_googlesheets.GoogleSheetsResourceClient,
|
|
25
26
|
HubSpotResourceClient: () => import_hubspot.HubSpotResourceClient,
|
|
26
27
|
PostgresResourceClient: () => import_postgres.PostgresResourceClient,
|
|
27
28
|
ResourceInvokeError: () => import_errors.ResourceInvokeError,
|
|
@@ -35,5 +36,6 @@ var import_postgres = require("./clients/postgres");
|
|
|
35
36
|
var import_dynamodb = require("./clients/dynamodb");
|
|
36
37
|
var import_api_custom = require("./clients/api-custom");
|
|
37
38
|
var import_hubspot = require("./clients/hubspot");
|
|
39
|
+
var import_googlesheets = require("./clients/googlesheets");
|
|
38
40
|
var import_s3 = require("./clients/s3");
|
|
39
41
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -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
|
|
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 { 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 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,0BAA2C;AAC3C,gBAAiC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { PostgresResourceClient } from "./clients/postgres";
|
|
|
5
5
|
export { DynamoDBResourceClient } from "./clients/dynamodb";
|
|
6
6
|
export { CustomApiResourceClient } from "./clients/api-custom";
|
|
7
7
|
export { HubSpotResourceClient } from "./clients/hubspot";
|
|
8
|
+
export { GoogleSheetsResourceClient } from "./clients/googlesheets";
|
|
8
9
|
export { S3ResourceClient } from "./clients/s3";
|
|
9
10
|
export type { DatabaseInvokeResponse, DynamoDBInvokeResponse, ApiInvokeResponse, StorageInvokeResponse, BaseInvokeSuccess, } from "./schemas/response";
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,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,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,5 +9,6 @@ export { PostgresResourceClient } from "./clients/postgres";
|
|
|
9
9
|
export { DynamoDBResourceClient } from "./clients/dynamodb";
|
|
10
10
|
export { CustomApiResourceClient } from "./clients/api-custom";
|
|
11
11
|
export { HubSpotResourceClient } from "./clients/hubspot";
|
|
12
|
+
export { GoogleSheetsResourceClient } from "./clients/googlesheets";
|
|
12
13
|
export { S3ResourceClient } from "./clients/s3";
|
|
13
14
|
//# 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,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,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 @@
|
|
|
1
|
+
{"version":3,"file":"api-googlesheets.js","sourceRoot":"","sources":["../../src/schemas/api-googlesheets.ts"],"names":[],"mappings":""}
|
package/dist/schemas/index.cjs
CHANGED
|
@@ -21,6 +21,7 @@ __reExport(index_exports, require("./dynamodb"), module.exports);
|
|
|
21
21
|
__reExport(index_exports, require("./s3"), module.exports);
|
|
22
22
|
__reExport(index_exports, require("./api-custom"), module.exports);
|
|
23
23
|
__reExport(index_exports, require("./api-hubspot"), module.exports);
|
|
24
|
+
__reExport(index_exports, require("./api-googlesheets"), module.exports);
|
|
24
25
|
__reExport(index_exports, require("./request"), module.exports);
|
|
25
26
|
__reExport(index_exports, require("./response"), module.exports);
|
|
26
27
|
//# 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
|
|
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 \"./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 { 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 | ApiGoogleSheetsPayload\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,+BAPd;AAQA,0BAAc,sBARd;AASA,0BAAc,uBATd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -4,10 +4,12 @@ export * from "./dynamodb";
|
|
|
4
4
|
export * from "./s3";
|
|
5
5
|
export * from "./api-custom";
|
|
6
6
|
export * from "./api-hubspot";
|
|
7
|
+
export * from "./api-googlesheets";
|
|
7
8
|
export * from "./request";
|
|
8
9
|
export * from "./response";
|
|
9
10
|
import type { ApiCustomPayload } from "./api-custom";
|
|
10
11
|
import type { ApiHubSpotPayload } from "./api-hubspot";
|
|
12
|
+
import type { ApiGoogleSheetsPayload } from "./api-googlesheets";
|
|
11
13
|
import type { DbPostgresPayload } from "./postgres";
|
|
12
14
|
import type { DbDynamoDBPayload } from "./dynamodb";
|
|
13
15
|
import type { StorageS3Payload } from "./s3";
|
|
@@ -15,5 +17,5 @@ import type { StorageS3Payload } from "./s3";
|
|
|
15
17
|
* Discriminated union of all resource payload types
|
|
16
18
|
* Use the 'subtype' field to narrow the type
|
|
17
19
|
*/
|
|
18
|
-
export type ResourceInvokePayload = ApiCustomPayload | DbPostgresPayload | DbDynamoDBPayload | ApiHubSpotPayload | StorageS3Payload;
|
|
20
|
+
export type ResourceInvokePayload = ApiCustomPayload | DbPostgresPayload | DbDynamoDBPayload | ApiHubSpotPayload | ApiGoogleSheetsPayload | StorageS3Payload;
|
|
19
21
|
//# 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,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,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAC7B,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -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,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/schemas/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,
|
|
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"}
|
package/package.json
CHANGED