@riocrypto/common-server 1.0.1003 → 1.0.1005
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.
|
@@ -4,6 +4,7 @@ declare class GoogleSheetsAPIClient {
|
|
|
4
4
|
googleAuth: any;
|
|
5
5
|
constructor(env: RioEnv);
|
|
6
6
|
getSheetValues(sheetId: string, range: string): Promise<any[][] | null | undefined>;
|
|
7
|
+
getNextAvailableRow(sheetId: string): Promise<string | null | undefined>;
|
|
7
8
|
}
|
|
8
9
|
export declare const googleSheetsAPIClient: GoogleSheetsAPIClient;
|
|
9
10
|
export {};
|
|
@@ -30,5 +30,16 @@ class GoogleSheetsAPIClient {
|
|
|
30
30
|
return response.data.values;
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
+
getNextAvailableRow(sheetId) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const authClientObject = yield this.googleAuth.getClient();
|
|
36
|
+
const sheets = googleapis_1.google.sheets({ version: "v4", auth: authClientObject });
|
|
37
|
+
const response = yield sheets.spreadsheets.values.get({
|
|
38
|
+
spreadsheetId: sheetId,
|
|
39
|
+
range: "A:A",
|
|
40
|
+
});
|
|
41
|
+
return response.data.range;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
33
44
|
}
|
|
34
45
|
exports.googleSheetsAPIClient = new GoogleSheetsAPIClient(process.env.RIO_ENV || process.env.NEXT_PUBLIC_RIO_ENV);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1005",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
25
25
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
26
26
|
"@google-cloud/storage": "^6.9.5",
|
|
27
|
-
"@riocrypto/common": "^1.0.
|
|
27
|
+
"@riocrypto/common": "^1.0.869",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|