@orchesty/connector-google-sheet 1.0.2 → 2.0.0

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/README.md CHANGED
@@ -1,22 +1,77 @@
1
- # [Google Sheet](https://developers.google.com/sheets/api/reference/rest)
1
+ # Google Sheets Connector
2
2
 
3
- ## OAuth 2.0
3
+ [![npm](https://img.shields.io/npm/v/@orchesty/connector-google-sheet?color=15ba68)](https://www.npmjs.com/package/@orchesty/connector-google-sheet)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-15ba68)](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE)
4
5
 
5
- - Client ID
6
- - Client secret
6
+ An [Orchesty](https://orchesty.io) connector for Google Sheets, a web-based spreadsheet application that enables users to create, edit, and collaborate on spreadsheets in real time.
7
7
 
8
- ### How to get
8
+ ## Application Type
9
9
 
10
- - Go to [Google console](https://console.cloud.google.com/apis/api/sheets.googleapis.com/credentials)
10
+ **OAuth 2.0**
11
11
 
12
- ### Example data for create sheet
12
+ This connector uses Google OAuth 2.0 with the `auth/spreadsheets` scope. After entering your credentials in Orchesty, you will be redirected to Google to authorize access.
13
13
 
14
- ```json
15
- {
16
- "data": "A1,B1,C1\nA2,B2,C2",
17
- "name": "Name of file",
18
- "userName": "asdrvt15e21as51ce"
19
- }
14
+ | Field | Description |
15
+ |---|---|
16
+ | `client_id` | OAuth Client ID from the Google Cloud Console |
17
+ | `client_secret` | OAuth Client Secret from the Google Cloud Console |
18
+
19
+ ## Components
20
+
21
+ | Class | Type | Description |
22
+ |---|---|---|
23
+ | `GoogleSheetCreateSpreadsheetConnector` | Connector | Creates a new Google Sheets spreadsheet with an initial sheet populated from a 2D data array via `POST /v4/spreadsheets` |
24
+
25
+ ## Setup
26
+
27
+ ### Credentials
28
+
29
+ 1. Go to the [Google Cloud Console](https://console.cloud.google.com) and open your project.
30
+ 2. Navigate to **APIs & Services → Credentials**.
31
+ 3. Create an **OAuth 2.0 Client ID** (type: Web application).
32
+ 4. Add the Orchesty OAuth callback URL to **Authorized redirect URIs**.
33
+ 5. Copy the **Client ID** and **Client Secret**.
34
+ 6. Enable the **Google Sheets API** under **APIs & Services → Library**.
35
+ 7. In Orchesty, open the Google Sheets application settings, enter the credentials, and complete the OAuth authorization flow.
36
+
37
+ ### API Documentation
38
+
39
+ Google Sheets REST API: [https://developers.google.com/sheets/api/reference/rest](https://developers.google.com/sheets/api/reference/rest)
40
+
41
+ ## Installation & Usage
42
+
43
+ Install the package:
44
+
45
+ ```bash
46
+ npm install @orchesty/connector-google-sheet @orchesty/nodejs-sdk
47
+ # or
48
+ pnpm add @orchesty/connector-google-sheet @orchesty/nodejs-sdk
49
+ ```
50
+
51
+ Register the application and nodes in your Orchesty DI container:
52
+
53
+ ```typescript
54
+ import { container } from '@orchesty/nodejs-sdk';
55
+ import { OAuth2Provider } from '@orchesty/nodejs-sdk/dist/lib/Authorization/Provider/OAuth2/OAuth2Provider';
56
+ import GoogleSheetApplication from '@orchesty/connector-google-sheet/dist/GoogleSheetApplication';
57
+ import GoogleSheetCreateSpreadsheetConnector from '@orchesty/connector-google-sheet/dist/Connector/GoogleSheetCreateSpreadsheetConnector';
58
+
59
+ const app = new GoogleSheetApplication(container.get(OAuth2Provider));
60
+ container.setApplication(app);
61
+ container.setNode(new GoogleSheetCreateSpreadsheetConnector(), app);
20
62
  ```
21
63
 
64
+ ## License
65
+
66
+ This connector is released under the **Apache License 2.0**. See the [LICENSE](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE) file for the full license text.
67
+
68
+ ## Contributing
69
+
70
+ Contributions are welcome! This connector is part of the open-source [Orchesty Node.js Connectors](https://github.com/Orchesty/orchesty-nodejs-connectors) monorepo.
71
+
72
+ For guidelines on how to create or update connectors — including project setup, coding conventions, and how to write tests — please refer to the **[Contributing to Connectors](https://orchesty.io/community/contributing-to-connectors)** guide.
22
73
 
74
+ All contributions should include:
75
+ - Source code in `src/` following the existing connector structure
76
+ - Tests in `src/**/__tests__/` with `input.json`, `mock.json`, and `output.json` fixtures
77
+ - An updated `CHANGELOG.md` entry
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-google-sheet",
3
3
  "description": "",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
@@ -18,7 +18,7 @@
18
18
  "author": "info@hanaboso.com",
19
19
  "dependencies": {
20
20
  "@orchesty/connector-google-common": "workspace:*",
21
- "@orchesty/nodejs-sdk": "^4.3.6"
21
+ "@orchesty/nodejs-sdk": "^5.0.8"
22
22
  },
23
23
  "engines": {
24
24
  "node": ">=24"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-google-sheet",
3
3
  "description": "",
4
- "version": "1.0.2",
4
+ "version": "2.0.0",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
@@ -11,8 +11,8 @@
11
11
  "keywords": [],
12
12
  "author": "info@hanaboso.com",
13
13
  "dependencies": {
14
- "@orchesty/nodejs-sdk": "^4.3.6",
15
- "@orchesty/connector-google-common": "1.0.2"
14
+ "@orchesty/nodejs-sdk": "^5.0.8",
15
+ "@orchesty/connector-google-common": "2.0.0"
16
16
  },
17
17
  "engines": {
18
18
  "node": ">=24"