@puppi/adapter-google-sheets 0.0.0-stage → 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.
- package/LICENSE +202 -0
- package/README.md +31 -2
- package/dist/define.d.ts +19 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +12 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +263 -0
- package/dist/index.js.map +1 -0
- package/dist/openapi.d.ts +289 -0
- package/dist/openapi.d.ts.map +1 -0
- package/dist/openapi.js +6 -0
- package/dist/openapi.js.map +1 -0
- package/dist/operations.d.ts +19 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +35 -0
- package/dist/operations.js.map +1 -0
- package/package.json +48 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @puppi/adapter-google-sheets
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Source connector for the Google Sheets API. It reads a range and writes records into a sheet. Auth is a bearer access token. Writes need one of `https://www.googleapis.com/auth/spreadsheets`, `https://www.googleapis.com/auth/drive`, or `https://www.googleapis.com/auth/drive.file`.
|
|
4
|
+
|
|
5
|
+
The API version is the `v4` prefix of the base URL. `base_url` defaults to `https://sheets.googleapis.com`. A binding that omits `api_version` uses `v4`. `spreadsheet_id` is the spreadsheet this client reads and writes.
|
|
6
|
+
|
|
7
|
+
`values(range)` is `GET /v4/spreadsheets/{spreadsheetId}/values/{range}`. `rows(range)` turns that body into objects. The first row is the header. A repeated header is `name`, then `name_2`. A missing cell is null. Empty rows at the end are dropped.
|
|
8
|
+
|
|
9
|
+
`appendRows(range, rows)` and `updateRows(range, rows)` use that same header. A record key that is not a header throws, and no write is sent. A null or missing cell is sent as `""`. Sheets skips a null and would leave the previous value. `clearValues(range)` does not read the header. `valueInputOption` is `RAW` on both writes: cells are stored as text. `USER_ENTERED` would parse dates and formulas, and `rows()` would read different strings back.
|
|
10
|
+
|
|
11
|
+
`appendRows` reads the header, then `POST /v4/spreadsheets/{spreadsheetId}/values/{range}:append?valueInputOption=RAW`. Sheets appends after the last table in `range`, starting at that table's first column. Pass one table whose first row is the header. A range that also contains a later table appends onto the later table while the columns still come from the first row. The call does not send `insertDataOption`. Sheets then overwrites data after the table. A second call appends the same records again. A lost response can duplicate them.
|
|
12
|
+
|
|
13
|
+
`updateRows` reads the header, then `POST /v4/spreadsheets/{spreadsheetId}/values:batchUpdate` with `valueInputOption` `RAW` and one range: the row after the header, with no end cell. A shorter list blanks the leftover data rows from that read with `""`. A longer list extends the sheet. The header row is not written. The same records written again leave the same cells. The read and the write are two requests, so another writer can change the sheet in between.
|
|
14
|
+
|
|
15
|
+
`clearValues` is `POST /v4/spreadsheets/{spreadsheetId}/values/{range}:clear` with `{}`. Values are cleared. Formatting stays. A header inside `range` is cleared. Clearing a range that is already empty leaves it empty.
|
|
16
|
+
|
|
17
|
+
Ranges are A1 notation, the same strings `rows()` takes. A column-only ref such as `Sheet1!A:C` treats row 1 as the header. A sheet name with no cell uses the range Sheets returns from the read.
|
|
18
|
+
|
|
19
|
+
Quotas, from the [Sheets usage limits](https://developers.google.com/workspace/sheets/api/limits): 300 read requests and 300 write requests per minute per project, and 60 of each per minute per user per project. A request past the quota is `429`. `appendRows` and `updateRows` spend one read and one write. `clearValues` spends one write. One batch counts as one request. Google recommends a 2 MB payload. A request that runs longer than 180 seconds times out. A spreadsheet holds up to 20 million cells or 100 MB ([Drive file limits](https://support.google.com/drive/answer/37603)).
|
|
20
|
+
|
|
21
|
+
`check()` calls `GET /v4/spreadsheets/{spreadsheetId}?fields=spreadsheetId`.
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"google-sheets": {
|
|
26
|
+
"config": { "spreadsheet_id": "spreadsheet id" },
|
|
27
|
+
"secret_refs": { "access_token": "sheets_access_token" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Reference: <https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values>
|
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly type: "google-sheets";
|
|
3
|
+
readonly docs: "https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values";
|
|
4
|
+
readonly configSchema: {
|
|
5
|
+
readonly spreadsheet_id: "string";
|
|
6
|
+
readonly base_url: "string";
|
|
7
|
+
readonly api_version: "string";
|
|
8
|
+
};
|
|
9
|
+
readonly secretFields: readonly ["access_token"];
|
|
10
|
+
readonly auth: {
|
|
11
|
+
readonly scheme: "bearer";
|
|
12
|
+
readonly secret: "access_token";
|
|
13
|
+
};
|
|
14
|
+
readonly apiVersions: readonly ["v4"];
|
|
15
|
+
readonly defaultApiVersion: "v4";
|
|
16
|
+
readonly defaultBaseUrl: "https://sheets.googleapis.com";
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,wBASG"}
|
package/dist/define.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineConnector } from "@puppi/sdk";
|
|
2
|
+
export default defineConnector({
|
|
3
|
+
type: "google-sheets",
|
|
4
|
+
docs: "https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values",
|
|
5
|
+
configSchema: { spreadsheet_id: "string", base_url: "string", api_version: "string" },
|
|
6
|
+
secretFields: ["access_token"],
|
|
7
|
+
auth: { scheme: "bearer", secret: "access_token" },
|
|
8
|
+
apiVersions: ["v4"],
|
|
9
|
+
defaultApiVersion: "v4",
|
|
10
|
+
defaultBaseUrl: "https://sheets.googleapis.com",
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=define.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAe,eAAe,CAAC;IAC7B,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,0FAA0F;IAChG,YAAY,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE;IACrF,YAAY,EAAE,CAAC,cAAc,CAAC;IAC9B,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE;IAClD,WAAW,EAAE,CAAC,IAAI,CAAC;IACnB,iBAAiB,EAAE,IAAI;IACvB,cAAc,EAAE,+BAA+B;CAChD,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@puppi/adapter-google-sheets`: reads ranges and writes records on the
|
|
3
|
+
* Google Sheets API. Auth is a bearer access token. The API version is a
|
|
4
|
+
* prefix of the base URL (`/<version>`), from `api_version` or the default
|
|
5
|
+
* in `define.ts`.
|
|
6
|
+
*/
|
|
7
|
+
import { type CredentialCheck, type ClientOptions, OpenApiClient } from "@puppi/sdk";
|
|
8
|
+
import connector from "./define.js";
|
|
9
|
+
import type { SchemaAppendValuesResponse, SchemaBatchUpdateValuesResponse, SchemaClearValuesResponse } from "./openapi.js";
|
|
10
|
+
import { type Api } from "./operations.js";
|
|
11
|
+
export default connector;
|
|
12
|
+
/** One data row. Keys are the header cells. A cell the row did not include is null. */
|
|
13
|
+
export type Row = Record<string, string | null>;
|
|
14
|
+
export declare class Client extends OpenApiClient<Api> {
|
|
15
|
+
private readonly spreadsheetId;
|
|
16
|
+
constructor(config: Record<string, unknown>, secrets?: Record<string, string>, options?: ClientOptions);
|
|
17
|
+
/** `GET /<version>/spreadsheets/{spreadsheetId}?fields=spreadsheetId` proves `access_token`. */
|
|
18
|
+
check(): Promise<CredentialCheck>;
|
|
19
|
+
/** One `values.get` body. The range is a path parameter; this does not pre-encode it. */
|
|
20
|
+
values(range: string): Promise<{
|
|
21
|
+
range?: string;
|
|
22
|
+
majorDimension?: string;
|
|
23
|
+
values?: string[][];
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Header row, then one object per later row. A repeated header is `name`,
|
|
27
|
+
* then `name_2`. A missing cell is null. Empty rows at the end are dropped.
|
|
28
|
+
*/
|
|
29
|
+
rows(range: string): Promise<Row[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Appends `rows` after the table in `range`. The first row of `range` is
|
|
32
|
+
* the header, with the same `name_2` names as `rows()`. Calling this again
|
|
33
|
+
* appends the same records a second time.
|
|
34
|
+
*/
|
|
35
|
+
appendRows(range: string, rows: readonly Row[]): Promise<SchemaAppendValuesResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Replaces the rows under the header in `range`. A shorter list blanks the
|
|
38
|
+
* leftover rows from that read. A longer list extends the sheet. The header
|
|
39
|
+
* row is left as it was.
|
|
40
|
+
*/
|
|
41
|
+
updateRows(range: string, rows: readonly Row[]): Promise<SchemaBatchUpdateValuesResponse>;
|
|
42
|
+
/** Clears values in `range` and leaves formatting. A header inside `range` is cleared too. */
|
|
43
|
+
clearValues(range: string): Promise<SchemaClearValuesResponse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AG,OAAO,CAAC,+BAA+B,CAAC;IAiB/F,8FAA8F;IAE9F,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAO9D,OAAO,CAAC,WAAW;CAKpB"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@puppi/adapter-google-sheets`: reads ranges and writes records on the
|
|
3
|
+
* Google Sheets API. Auth is a bearer access token. The API version is a
|
|
4
|
+
* prefix of the base URL (`/<version>`), from `api_version` or the default
|
|
5
|
+
* in `define.ts`.
|
|
6
|
+
*/
|
|
7
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
8
|
+
var useValue = arguments.length > 2;
|
|
9
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
10
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
11
|
+
}
|
|
12
|
+
return useValue ? value : void 0;
|
|
13
|
+
};
|
|
14
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
15
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
16
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
17
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
18
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
19
|
+
var _, done = false;
|
|
20
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
21
|
+
var context = {};
|
|
22
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
23
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
24
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
25
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
26
|
+
if (kind === "accessor") {
|
|
27
|
+
if (result === void 0) continue;
|
|
28
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
29
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
30
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
31
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
32
|
+
}
|
|
33
|
+
else if (_ = accept(result)) {
|
|
34
|
+
if (kind === "field") initializers.unshift(_);
|
|
35
|
+
else descriptor[key] = _;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
39
|
+
done = true;
|
|
40
|
+
};
|
|
41
|
+
import { read, write, OpenApiClient, openApiClientOptions, trimSlash, } from "@puppi/sdk";
|
|
42
|
+
import connector from "./define.js";
|
|
43
|
+
import { operations } from "./operations.js";
|
|
44
|
+
export default connector;
|
|
45
|
+
const type = connector.type;
|
|
46
|
+
const auth = connector.auth;
|
|
47
|
+
const defaultBaseUrl = connector.defaultBaseUrl;
|
|
48
|
+
/**
|
|
49
|
+
* RAW stores the text `rows()` reads back. USER_ENTERED would parse dates
|
|
50
|
+
* and formulas, so a later read would not see the same strings.
|
|
51
|
+
*/
|
|
52
|
+
const RAW = "RAW";
|
|
53
|
+
let Client = (() => {
|
|
54
|
+
let _classSuper = OpenApiClient;
|
|
55
|
+
let _instanceExtraInitializers = [];
|
|
56
|
+
let _values_decorators;
|
|
57
|
+
let _rows_decorators;
|
|
58
|
+
let _appendRows_decorators;
|
|
59
|
+
let _updateRows_decorators;
|
|
60
|
+
let _clearValues_decorators;
|
|
61
|
+
return class Client extends _classSuper {
|
|
62
|
+
static {
|
|
63
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
64
|
+
_values_decorators = [read];
|
|
65
|
+
_rows_decorators = [read];
|
|
66
|
+
_appendRows_decorators = [write];
|
|
67
|
+
_updateRows_decorators = [write];
|
|
68
|
+
_clearValues_decorators = [write];
|
|
69
|
+
__esDecorate(this, null, _values_decorators, { kind: "method", name: "values", static: false, private: false, access: { has: obj => "values" in obj, get: obj => obj.values }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
70
|
+
__esDecorate(this, null, _rows_decorators, { kind: "method", name: "rows", static: false, private: false, access: { has: obj => "rows" in obj, get: obj => obj.rows }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
71
|
+
__esDecorate(this, null, _appendRows_decorators, { kind: "method", name: "appendRows", static: false, private: false, access: { has: obj => "appendRows" in obj, get: obj => obj.appendRows }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
72
|
+
__esDecorate(this, null, _updateRows_decorators, { kind: "method", name: "updateRows", static: false, private: false, access: { has: obj => "updateRows" in obj, get: obj => obj.updateRows }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
73
|
+
__esDecorate(this, null, _clearValues_decorators, { kind: "method", name: "clearValues", static: false, private: false, access: { has: obj => "clearValues" in obj, get: obj => obj.clearValues }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
74
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
75
|
+
}
|
|
76
|
+
spreadsheetId = __runInitializers(this, _instanceExtraInitializers);
|
|
77
|
+
constructor(config, secrets = {}, options = {}) {
|
|
78
|
+
const [defaults, openApi] = openApiClientOptions(connector, config, secrets, operations, {
|
|
79
|
+
baseUrl: (version) => baseUrl(config, version),
|
|
80
|
+
});
|
|
81
|
+
super({ ...config, base_url: defaults.baseUrl }, options, defaults, openApi);
|
|
82
|
+
const id = config["spreadsheet_id"];
|
|
83
|
+
this.spreadsheetId = typeof id === "string" && id !== "" ? id : undefined;
|
|
84
|
+
}
|
|
85
|
+
/** `GET /<version>/spreadsheets/{spreadsheetId}?fields=spreadsheetId` proves `access_token`. */
|
|
86
|
+
check() {
|
|
87
|
+
return this.prove(`/spreadsheets/${this.spreadsheet()}?fields=spreadsheetId`, auth.secret);
|
|
88
|
+
}
|
|
89
|
+
/** One `values.get` body. The range is a path parameter; this does not pre-encode it. */
|
|
90
|
+
values(range) {
|
|
91
|
+
return this.read("getValues", {
|
|
92
|
+
path: { spreadsheetId: this.spreadsheet(), range },
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Header row, then one object per later row. A repeated header is `name`,
|
|
97
|
+
* then `name_2`. A missing cell is null. Empty rows at the end are dropped.
|
|
98
|
+
*/
|
|
99
|
+
async rows(range) {
|
|
100
|
+
const body = await this.values(range);
|
|
101
|
+
return sheetRows(body.values ?? []);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Appends `rows` after the table in `range`. The first row of `range` is
|
|
105
|
+
* the header, with the same `name_2` names as `rows()`. Calling this again
|
|
106
|
+
* appends the same records a second time.
|
|
107
|
+
*/
|
|
108
|
+
async appendRows(range, rows) {
|
|
109
|
+
const sheet = await this.values(range);
|
|
110
|
+
const values = recordValues(sheet.values ?? [], rows, range);
|
|
111
|
+
return this.read("appendValues", {
|
|
112
|
+
path: { spreadsheetId: this.spreadsheet(), range },
|
|
113
|
+
query: { valueInputOption: RAW },
|
|
114
|
+
body: { majorDimension: "ROWS", values },
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Replaces the rows under the header in `range`. A shorter list blanks the
|
|
119
|
+
* leftover rows from that read. A longer list extends the sheet. The header
|
|
120
|
+
* row is left as it was.
|
|
121
|
+
*/
|
|
122
|
+
async updateRows(range, rows) {
|
|
123
|
+
const sheet = await this.values(range);
|
|
124
|
+
const table = sheet.values ?? [];
|
|
125
|
+
const grid = recordValues(table, rows, range);
|
|
126
|
+
const values = padRows(grid, table[0]?.length ?? 0, dataRows(table));
|
|
127
|
+
// values.update is PUT. This client only dispatches GET and POST, so one
|
|
128
|
+
// range goes through values.batchUpdate.
|
|
129
|
+
return this.read("batchUpdateValues", {
|
|
130
|
+
path: { spreadsheetId: this.spreadsheet() },
|
|
131
|
+
body: {
|
|
132
|
+
valueInputOption: RAW,
|
|
133
|
+
data: [{ range: bodyRange(range, sheet.range), majorDimension: "ROWS", values }],
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/** Clears values in `range` and leaves formatting. A header inside `range` is cleared too. */
|
|
138
|
+
clearValues(range) {
|
|
139
|
+
return this.read("clearValues", {
|
|
140
|
+
path: { spreadsheetId: this.spreadsheet(), range },
|
|
141
|
+
body: {},
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
spreadsheet() {
|
|
145
|
+
if (this.spreadsheetId === undefined)
|
|
146
|
+
throw new Error(`${type} requires spreadsheet_id`);
|
|
147
|
+
return this.spreadsheetId;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
})();
|
|
151
|
+
export { Client };
|
|
152
|
+
/** Sheets host plus `/<version>`. `base_url` replaces the host. */
|
|
153
|
+
function baseUrl(config, version) {
|
|
154
|
+
const override = config["base_url"];
|
|
155
|
+
const host = typeof override === "string" && override !== "" ? override : defaultBaseUrl;
|
|
156
|
+
if (typeof host !== "string" || host === "")
|
|
157
|
+
throw new Error("google-sheets requires base_url");
|
|
158
|
+
return `${trimSlash(host)}/${version}`;
|
|
159
|
+
}
|
|
160
|
+
/** Header cells, with a repeated name written `name`, then `name_2`. */
|
|
161
|
+
function headerNames(row) {
|
|
162
|
+
const seen = new Map();
|
|
163
|
+
return row.map((header) => {
|
|
164
|
+
const count = (seen.get(header) ?? 0) + 1;
|
|
165
|
+
seen.set(header, count);
|
|
166
|
+
return count === 1 ? header : `${header}_${count}`;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function blank(row) {
|
|
170
|
+
return row.every((cell) => cell === "");
|
|
171
|
+
}
|
|
172
|
+
/** Objects from a values body. The first row is headers. Empty rows at the end are dropped. */
|
|
173
|
+
function sheetRows(values) {
|
|
174
|
+
const end = usedEnd(values);
|
|
175
|
+
const headerRow = values[0];
|
|
176
|
+
if (!headerRow || end <= 1)
|
|
177
|
+
return [];
|
|
178
|
+
const headers = headerNames(headerRow);
|
|
179
|
+
return values.slice(1, end).map((cells) => {
|
|
180
|
+
const row = {};
|
|
181
|
+
for (const [index, header] of headers.entries()) {
|
|
182
|
+
row[header] = cells[index] ?? null;
|
|
183
|
+
}
|
|
184
|
+
return row;
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function dataRows(values) {
|
|
188
|
+
return Math.max(0, usedEnd(values) - 1);
|
|
189
|
+
}
|
|
190
|
+
function usedEnd(values) {
|
|
191
|
+
let end = values.length;
|
|
192
|
+
while (end > 1 && blank(values[end - 1] ?? []))
|
|
193
|
+
end -= 1;
|
|
194
|
+
return end;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* A null or missing cell is `""`. Sheets skips null and would leave the
|
|
198
|
+
* previous value.
|
|
199
|
+
*/
|
|
200
|
+
function recordValues(values, rows, range) {
|
|
201
|
+
const header = values[0];
|
|
202
|
+
if (!header || header.length === 0) {
|
|
203
|
+
throw new Error(`google-sheets range ${JSON.stringify(range)} has no header row`);
|
|
204
|
+
}
|
|
205
|
+
const names = headerNames(header);
|
|
206
|
+
const known = new Set(names);
|
|
207
|
+
return rows.map((row) => {
|
|
208
|
+
for (const key of Object.keys(row)) {
|
|
209
|
+
if (!known.has(key)) {
|
|
210
|
+
throw new Error(`google-sheets column ${JSON.stringify(key)} is not a header`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return names.map((name) => row[name] ?? "");
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function padRows(grid, width, rows) {
|
|
217
|
+
if (grid.length >= rows)
|
|
218
|
+
return grid;
|
|
219
|
+
const blankRow = () => Array.from({ length: width }, () => "");
|
|
220
|
+
return [...grid, ...Array.from({ length: rows - grid.length }, blankRow)];
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* The row after the header. A column-only ref (`A:C`) starts at row 1, the
|
|
224
|
+
* header `rows()` reads. A range with no cell uses the range Sheets returned.
|
|
225
|
+
*/
|
|
226
|
+
function bodyRange(requested, returned) {
|
|
227
|
+
const start = dataStart(requested) ?? (returned === undefined ? undefined : dataStart(returned));
|
|
228
|
+
if (start === undefined) {
|
|
229
|
+
throw new Error(`google-sheets range ${JSON.stringify(requested)} has no A1 cell`);
|
|
230
|
+
}
|
|
231
|
+
return start;
|
|
232
|
+
}
|
|
233
|
+
const CELL = /^(\$?)([A-Za-z]{1,3})(\$?)(\d+)?$/;
|
|
234
|
+
function dataStart(a1) {
|
|
235
|
+
const { sheet, cells } = splitA1(a1);
|
|
236
|
+
const match = CELL.exec(cells.split(":")[0] ?? "");
|
|
237
|
+
if (!match)
|
|
238
|
+
return undefined;
|
|
239
|
+
const [, colAbs, col, rowAbs, row] = match;
|
|
240
|
+
const next = `${colAbs ?? ""}${col ?? ""}${rowAbs ?? ""}${Number(row ?? "1") + 1}`;
|
|
241
|
+
return sheet === undefined ? next : `${sheet}!${next}`;
|
|
242
|
+
}
|
|
243
|
+
function splitA1(a1) {
|
|
244
|
+
if (a1.startsWith("'")) {
|
|
245
|
+
for (let i = 1; i < a1.length; i += 1) {
|
|
246
|
+
if (a1[i] === "'" && a1[i + 1] === "'") {
|
|
247
|
+
i += 1;
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
if (a1[i] !== "'")
|
|
251
|
+
continue;
|
|
252
|
+
const rest = a1.slice(i + 1);
|
|
253
|
+
if (rest.startsWith("!"))
|
|
254
|
+
return { sheet: a1.slice(0, i + 1), cells: rest.slice(1) };
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
const bang = a1.indexOf("!");
|
|
259
|
+
if (bang === -1)
|
|
260
|
+
return { sheet: undefined, cells: a1 };
|
|
261
|
+
return { sheet: a1.slice(0, bang), cells: a1.slice(bang + 1) };
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EACL,IAAI,EACJ,KAAK,EAGL,aAAa,EACb,oBAAoB,EACpB,SAAS,GACV,MAAM,YAAY,CAAC;AAEpB,OAAO,SAAS,MAAM,aAAa,CAAC;AAMpC,OAAO,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEvD,eAAe,SAAS,CAAC;AAEzB,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;AAC5B,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;AAC5B,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC;AAEhD;;;GAGG;AACH,MAAM,GAAG,GAAG,KAAK,CAAC;IAKL,MAAM;sBAAS,aAAa;;;;;;;iBAA5B,MAAO,SAAQ,WAAkB;;;kCAyB3C,IAAI;gCAWJ,IAAI;sCAYJ,KAAK;sCAiBL,KAAK;uCAmBL,KAAK;YA1DN,qKAAA,MAAM,6DAIL;YAOD,+JAAM,IAAI,6DAIT;YAQD,iLAAM,UAAU,6DASf;YAQD,iLAAM,UAAU,6DAef;YAID,oLAAA,WAAW,6DAKV;;;QAzFgB,aAAa,GADnB,mDAAM,CACkC;QAEnD,YACE,MAA+B,EAC/B,UAAkC,EAAE,EACpC,UAAyB,EAAE;YAE3B,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE;gBACvF,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;aAC/C,CAAC,CAAC;YAEH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,CAAC;gBACvC,CAAC,IAAI,CAAC,CAAC;gBACP,SAAS;YACX,CAAC;YAED,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG;gBAAE,SAAS;YAE5B,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAE7B,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;gBAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YAErF,MAAM;QACR,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAE7B,IAAI,IAAI,KAAK,CAAC,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAExD,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export type paths = {
|
|
6
|
+
"/spreadsheets/{spreadsheetId}": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
get: operations["getSpreadsheet"];
|
|
14
|
+
put?: never;
|
|
15
|
+
post?: never;
|
|
16
|
+
delete?: never;
|
|
17
|
+
options?: never;
|
|
18
|
+
head?: never;
|
|
19
|
+
patch?: never;
|
|
20
|
+
trace?: never;
|
|
21
|
+
};
|
|
22
|
+
"/spreadsheets/{spreadsheetId}/values/{range}": {
|
|
23
|
+
parameters: {
|
|
24
|
+
query?: never;
|
|
25
|
+
header?: never;
|
|
26
|
+
path?: never;
|
|
27
|
+
cookie?: never;
|
|
28
|
+
};
|
|
29
|
+
get: operations["getValues"];
|
|
30
|
+
put?: never;
|
|
31
|
+
post?: never;
|
|
32
|
+
delete?: never;
|
|
33
|
+
options?: never;
|
|
34
|
+
head?: never;
|
|
35
|
+
patch?: never;
|
|
36
|
+
trace?: never;
|
|
37
|
+
};
|
|
38
|
+
"/spreadsheets/{spreadsheetId}/values/{range}:append": {
|
|
39
|
+
parameters: {
|
|
40
|
+
query?: never;
|
|
41
|
+
header?: never;
|
|
42
|
+
path?: never;
|
|
43
|
+
cookie?: never;
|
|
44
|
+
};
|
|
45
|
+
get?: never;
|
|
46
|
+
put?: never;
|
|
47
|
+
post: operations["appendValues"];
|
|
48
|
+
delete?: never;
|
|
49
|
+
options?: never;
|
|
50
|
+
head?: never;
|
|
51
|
+
patch?: never;
|
|
52
|
+
trace?: never;
|
|
53
|
+
};
|
|
54
|
+
"/spreadsheets/{spreadsheetId}/values:batchUpdate": {
|
|
55
|
+
parameters: {
|
|
56
|
+
query?: never;
|
|
57
|
+
header?: never;
|
|
58
|
+
path?: never;
|
|
59
|
+
cookie?: never;
|
|
60
|
+
};
|
|
61
|
+
get?: never;
|
|
62
|
+
put?: never;
|
|
63
|
+
post: operations["batchUpdateValues"];
|
|
64
|
+
delete?: never;
|
|
65
|
+
options?: never;
|
|
66
|
+
head?: never;
|
|
67
|
+
patch?: never;
|
|
68
|
+
trace?: never;
|
|
69
|
+
};
|
|
70
|
+
"/spreadsheets/{spreadsheetId}/values/{range}:clear": {
|
|
71
|
+
parameters: {
|
|
72
|
+
query?: never;
|
|
73
|
+
header?: never;
|
|
74
|
+
path?: never;
|
|
75
|
+
cookie?: never;
|
|
76
|
+
};
|
|
77
|
+
get?: never;
|
|
78
|
+
put?: never;
|
|
79
|
+
post: operations["clearValues"];
|
|
80
|
+
delete?: never;
|
|
81
|
+
options?: never;
|
|
82
|
+
head?: never;
|
|
83
|
+
patch?: never;
|
|
84
|
+
trace?: never;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export type webhooks = Record<string, never>;
|
|
88
|
+
export type components = {
|
|
89
|
+
schemas: {
|
|
90
|
+
spreadsheet: {
|
|
91
|
+
spreadsheetId?: string;
|
|
92
|
+
sheets?: {
|
|
93
|
+
properties?: {
|
|
94
|
+
title?: string;
|
|
95
|
+
sheetId?: number;
|
|
96
|
+
};
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
valueRange: {
|
|
100
|
+
range?: string;
|
|
101
|
+
majorDimension?: string;
|
|
102
|
+
values?: string[][];
|
|
103
|
+
};
|
|
104
|
+
appendValuesResponse: {
|
|
105
|
+
spreadsheetId?: string;
|
|
106
|
+
tableRange?: string;
|
|
107
|
+
updates?: components["schemas"]["updateValuesResponse"];
|
|
108
|
+
};
|
|
109
|
+
updateValuesResponse: {
|
|
110
|
+
spreadsheetId?: string;
|
|
111
|
+
updatedRange?: string;
|
|
112
|
+
updatedRows?: number;
|
|
113
|
+
updatedColumns?: number;
|
|
114
|
+
updatedCells?: number;
|
|
115
|
+
updatedData?: components["schemas"]["valueRange"];
|
|
116
|
+
};
|
|
117
|
+
batchUpdateValuesRequest: {
|
|
118
|
+
valueInputOption: string;
|
|
119
|
+
data: components["schemas"]["valueRange"][];
|
|
120
|
+
includeValuesInResponse?: boolean;
|
|
121
|
+
responseValueRenderOption?: string;
|
|
122
|
+
responseDateTimeRenderOption?: string;
|
|
123
|
+
};
|
|
124
|
+
batchUpdateValuesResponse: {
|
|
125
|
+
spreadsheetId?: string;
|
|
126
|
+
totalUpdatedRows?: number;
|
|
127
|
+
totalUpdatedColumns?: number;
|
|
128
|
+
totalUpdatedCells?: number;
|
|
129
|
+
totalUpdatedSheets?: number;
|
|
130
|
+
responses?: components["schemas"]["updateValuesResponse"][];
|
|
131
|
+
};
|
|
132
|
+
/** @description The request for clearing a range of values in a spreadsheet. */
|
|
133
|
+
clearValuesRequest: Record<string, unknown>;
|
|
134
|
+
clearValuesResponse: {
|
|
135
|
+
spreadsheetId?: string;
|
|
136
|
+
clearedRange?: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
responses: never;
|
|
140
|
+
parameters: never;
|
|
141
|
+
requestBodies: never;
|
|
142
|
+
headers: never;
|
|
143
|
+
pathItems: never;
|
|
144
|
+
};
|
|
145
|
+
export type SchemaSpreadsheet = components["schemas"]["spreadsheet"];
|
|
146
|
+
export type SchemaValueRange = components["schemas"]["valueRange"];
|
|
147
|
+
export type SchemaAppendValuesResponse = components["schemas"]["appendValuesResponse"];
|
|
148
|
+
export type SchemaUpdateValuesResponse = components["schemas"]["updateValuesResponse"];
|
|
149
|
+
export type SchemaBatchUpdateValuesRequest = components["schemas"]["batchUpdateValuesRequest"];
|
|
150
|
+
export type SchemaBatchUpdateValuesResponse = components["schemas"]["batchUpdateValuesResponse"];
|
|
151
|
+
export type SchemaClearValuesRequest = components["schemas"]["clearValuesRequest"];
|
|
152
|
+
export type SchemaClearValuesResponse = components["schemas"]["clearValuesResponse"];
|
|
153
|
+
export type $defs = Record<string, never>;
|
|
154
|
+
export interface operations {
|
|
155
|
+
getSpreadsheet: {
|
|
156
|
+
parameters: {
|
|
157
|
+
query?: {
|
|
158
|
+
fields?: string;
|
|
159
|
+
};
|
|
160
|
+
header?: never;
|
|
161
|
+
path: {
|
|
162
|
+
spreadsheetId: string;
|
|
163
|
+
};
|
|
164
|
+
cookie?: never;
|
|
165
|
+
};
|
|
166
|
+
requestBody?: never;
|
|
167
|
+
responses: {
|
|
168
|
+
/** @description The spreadsheet. */
|
|
169
|
+
200: {
|
|
170
|
+
headers: {
|
|
171
|
+
[name: string]: unknown;
|
|
172
|
+
};
|
|
173
|
+
content: {
|
|
174
|
+
"application/json": components["schemas"]["spreadsheet"];
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
getValues: {
|
|
180
|
+
parameters: {
|
|
181
|
+
query?: never;
|
|
182
|
+
header?: never;
|
|
183
|
+
path: {
|
|
184
|
+
spreadsheetId: string;
|
|
185
|
+
range: string;
|
|
186
|
+
};
|
|
187
|
+
cookie?: never;
|
|
188
|
+
};
|
|
189
|
+
requestBody?: never;
|
|
190
|
+
responses: {
|
|
191
|
+
/** @description One range of values. */
|
|
192
|
+
200: {
|
|
193
|
+
headers: {
|
|
194
|
+
[name: string]: unknown;
|
|
195
|
+
};
|
|
196
|
+
content: {
|
|
197
|
+
"application/json": components["schemas"]["valueRange"];
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
appendValues: {
|
|
203
|
+
parameters: {
|
|
204
|
+
query?: {
|
|
205
|
+
valueInputOption?: string;
|
|
206
|
+
insertDataOption?: string;
|
|
207
|
+
includeValuesInResponse?: boolean;
|
|
208
|
+
responseValueRenderOption?: string;
|
|
209
|
+
responseDateTimeRenderOption?: string;
|
|
210
|
+
};
|
|
211
|
+
header?: never;
|
|
212
|
+
path: {
|
|
213
|
+
spreadsheetId: string;
|
|
214
|
+
range: string;
|
|
215
|
+
};
|
|
216
|
+
cookie?: never;
|
|
217
|
+
};
|
|
218
|
+
requestBody: {
|
|
219
|
+
content: {
|
|
220
|
+
"application/json": components["schemas"]["valueRange"];
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
responses: {
|
|
224
|
+
/** @description The appended table. */
|
|
225
|
+
200: {
|
|
226
|
+
headers: {
|
|
227
|
+
[name: string]: unknown;
|
|
228
|
+
};
|
|
229
|
+
content: {
|
|
230
|
+
"application/json": components["schemas"]["appendValuesResponse"];
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
batchUpdateValues: {
|
|
236
|
+
parameters: {
|
|
237
|
+
query?: never;
|
|
238
|
+
header?: never;
|
|
239
|
+
path: {
|
|
240
|
+
spreadsheetId: string;
|
|
241
|
+
};
|
|
242
|
+
cookie?: never;
|
|
243
|
+
};
|
|
244
|
+
requestBody: {
|
|
245
|
+
content: {
|
|
246
|
+
"application/json": components["schemas"]["batchUpdateValuesRequest"];
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
responses: {
|
|
250
|
+
/** @description The updated ranges. */
|
|
251
|
+
200: {
|
|
252
|
+
headers: {
|
|
253
|
+
[name: string]: unknown;
|
|
254
|
+
};
|
|
255
|
+
content: {
|
|
256
|
+
"application/json": components["schemas"]["batchUpdateValuesResponse"];
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
clearValues: {
|
|
262
|
+
parameters: {
|
|
263
|
+
query?: never;
|
|
264
|
+
header?: never;
|
|
265
|
+
path: {
|
|
266
|
+
spreadsheetId: string;
|
|
267
|
+
range: string;
|
|
268
|
+
};
|
|
269
|
+
cookie?: never;
|
|
270
|
+
};
|
|
271
|
+
requestBody: {
|
|
272
|
+
content: {
|
|
273
|
+
"application/json": components["schemas"]["clearValuesRequest"];
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
responses: {
|
|
277
|
+
/** @description The cleared range. */
|
|
278
|
+
200: {
|
|
279
|
+
headers: {
|
|
280
|
+
[name: string]: unknown;
|
|
281
|
+
};
|
|
282
|
+
content: {
|
|
283
|
+
"application/json": components["schemas"]["clearValuesResponse"];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
//# sourceMappingURL=openapi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,KAAK,GAAG;IAClB,+BAA+B,EAAE;Q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H,OAAO,EAAE;oBACP,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;iBACzB,CAAC;gBACF,OAAO,EAAE;oBACP,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,2BAA2B,CAAC,CAAC;iBACxE,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;IACF,WAAW,EAAE;QACX,UAAU,EAAE;YACV,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,EAAE;gBACJ,aAAa,EAAE,MAAM,CAAC;gBACtB,KAAK,EAAE,MAAM,CAAC;aACf,CAAC;YACF,MAAM,CAAC,EAAE,KAAK,CAAC;SAChB,CAAC;QACF,WAAW,EAAE;YACX,OAAO,EAAE;gBACP,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAC;aACjE,CAAC;SACH,CAAC;QACF,SAAS,EAAE;YACT,sCAAsC;YACtC,GAAG,EAAE;gBACH,OAAO,EAAE;oBACP,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;iBACzB,CAAC;gBACF,OAAO,EAAE;oBACP,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAC;iBAClE,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;CACH"}
|
package/dist/openapi.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.js","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Generated from openapi.json. Do not edit. */
|
|
2
|
+
import type { BodyOf, Operation, RequestOf } from "@puppi/sdk";
|
|
3
|
+
import type { operations as spec } from "./openapi.js";
|
|
4
|
+
export type Api = {
|
|
5
|
+
responses: {
|
|
6
|
+
getSpreadsheet: BodyOf<spec["getSpreadsheet"]>;
|
|
7
|
+
getValues: BodyOf<spec["getValues"]>;
|
|
8
|
+
appendValues: BodyOf<spec["appendValues"]>;
|
|
9
|
+
batchUpdateValues: BodyOf<spec["batchUpdateValues"]>;
|
|
10
|
+
clearValues: BodyOf<spec["clearValues"]>;
|
|
11
|
+
};
|
|
12
|
+
requests: {
|
|
13
|
+
appendValues: RequestOf<spec["appendValues"]>;
|
|
14
|
+
batchUpdateValues: RequestOf<spec["batchUpdateValues"]>;
|
|
15
|
+
clearValues: RequestOf<spec["clearValues"]>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const operations: Record<keyof Api["responses"], Operation>;
|
|
19
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,IAAI,IAAI,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,GAAG,GAAG;IAChB,SAAS,EAAE;QACT,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC/C,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QACrC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QAC3C,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACrD,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;KAC1C,CAAC;IACF,QAAQ,EAAE;QACR,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QAC9C,iBAAiB,EAAE,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACxD,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;KAC7C,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,WAAW,CAAC,EAAE,SAAS,CAgChE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Generated from openapi.json. Do not edit. */
|
|
2
|
+
export const operations = {
|
|
3
|
+
getSpreadsheet: {
|
|
4
|
+
method: "get",
|
|
5
|
+
path: "/spreadsheets/{spreadsheetId}",
|
|
6
|
+
query: ["fields"],
|
|
7
|
+
},
|
|
8
|
+
getValues: {
|
|
9
|
+
method: "get",
|
|
10
|
+
path: "/spreadsheets/{spreadsheetId}/values/{range}",
|
|
11
|
+
query: [],
|
|
12
|
+
},
|
|
13
|
+
appendValues: {
|
|
14
|
+
method: "post",
|
|
15
|
+
path: "/spreadsheets/{spreadsheetId}/values/{range}:append",
|
|
16
|
+
query: [
|
|
17
|
+
"valueInputOption",
|
|
18
|
+
"insertDataOption",
|
|
19
|
+
"includeValuesInResponse",
|
|
20
|
+
"responseValueRenderOption",
|
|
21
|
+
"responseDateTimeRenderOption",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
batchUpdateValues: {
|
|
25
|
+
method: "post",
|
|
26
|
+
path: "/spreadsheets/{spreadsheetId}/values:batchUpdate",
|
|
27
|
+
query: [],
|
|
28
|
+
},
|
|
29
|
+
clearValues: {
|
|
30
|
+
method: "post",
|
|
31
|
+
path: "/spreadsheets/{spreadsheetId}/values/{range}:clear",
|
|
32
|
+
query: [],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAqBhD,MAAM,CAAC,MAAM,UAAU,GAA8C;IACnE,cAAc,EAAE;QACd,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,+BAA+B;QACrC,KAAK,EAAE,CAAC,QAAQ,CAAC;KAClB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,8CAA8C;QACpD,KAAK,EAAE,EAAE;KACV;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,qDAAqD;QAC3D,KAAK,EAAE;YACL,kBAAkB;YAClB,kBAAkB;YAClB,yBAAyB;YACzB,2BAA2B;YAC3B,8BAA8B;SAC/B;KACF;IACD,iBAAiB,EAAE;QACjB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,kDAAkD;QACxD,KAAK,EAAE,EAAE;KACV;IACD,WAAW,EAAE;QACX,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,oDAAoD;QAC1D,KAAK,EAAE,EAAE;KACV;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puppi/adapter-google-sheets",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Source connector for the Google Sheets API: bearer auth, read a range, append, overwrite, and clear rows.",
|
|
5
|
+
"homepage": "https://github.com/DashJump/puppi",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/DashJump/puppi/issues"
|
|
8
|
+
},
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/DashJump/puppi.git",
|
|
13
|
+
"directory": "connectors/google-sheets"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@puppi/sdk": "0.4.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@puppi/conformance": "0.1.0",
|
|
36
|
+
"@types/node": "^26.6.5",
|
|
37
|
+
"openapi-sampler": "1.7.4",
|
|
38
|
+
"openapi-typescript": "7.13.0",
|
|
39
|
+
"typescript": "^5.6.3",
|
|
40
|
+
"vite-plus": "1.7.0"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=26"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"generate": "openapi-typescript openapi.json -o src/openapi.ts --export-type --root-types --empty-objects-unknown --default-non-nullable=false && puppi-write-operations openapi.json src/operations.ts && vp fmt --write src/openapi.ts src/operations.ts",
|
|
47
|
+
"build": "tsc -p tsconfig.json",
|
|
48
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p test/tsconfig.json",
|
|
49
|
+
"test": "vp test run --config ../../vite.config.ts"
|
|
50
|
+
}
|
|
6
51
|
}
|