@maxim_mazurok/gapi.client.dataform-v1beta1 0.0.20221217
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/index.d.ts +2623 -0
- package/package.json +20 -0
- package/readme.md +68 -0
- package/tests.ts +515 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.dataform-v1beta1",
|
|
3
|
+
"version": "0.0.20221217",
|
|
4
|
+
"description": "TypeScript typings for Dataform API v1beta1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"email": "maxim@mazurok.com",
|
|
8
|
+
"name": "Maxim Mazurok",
|
|
9
|
+
"url": "https://maxim.mazurok.com"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
14
|
+
},
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/gapi.client": "*",
|
|
18
|
+
"@types/gapi.client.discovery": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# TypeScript typings for Dataform API v1beta1
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
For detailed description please check [documentation](https://cloud.google.com/dataform/docs).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Dataform API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.dataform-v1beta1 --save-dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
You need to initialize Google API client in your code:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
gapi.load('client', () => {
|
|
20
|
+
// now we can use gapi.client
|
|
21
|
+
// ...
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then load api client wrapper:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
gapi.client.load('https://dataform.googleapis.com/$discovery/rest?version=v1beta1', () => {
|
|
29
|
+
// now we can use:
|
|
30
|
+
// gapi.client.dataform
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
|
|
36
|
+
gapi.client.load('dataform', 'v1beta1', () => {
|
|
37
|
+
// now we can use:
|
|
38
|
+
// gapi.client.dataform
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Don't forget to authenticate your client before sending any request to resources:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
// declare client_id registered in Google Developers Console
|
|
46
|
+
var client_id = '',
|
|
47
|
+
scope = [
|
|
48
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
49
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
50
|
+
],
|
|
51
|
+
immediate = true;
|
|
52
|
+
// ...
|
|
53
|
+
|
|
54
|
+
gapi.auth.authorize(
|
|
55
|
+
{ client_id: client_id, scope: scope, immediate: immediate },
|
|
56
|
+
authResult => {
|
|
57
|
+
if (authResult && !authResult.error) {
|
|
58
|
+
/* handle successful authorization */
|
|
59
|
+
} else {
|
|
60
|
+
/* handle authorization error */
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
After that you can use Dataform API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
```
|
package/tests.ts
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.dataform-v1beta1 definition tests */
|
|
2
|
+
// IMPORTANT
|
|
3
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
+
|
|
6
|
+
// Revision: 20221217
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://dataform.googleapis.com/$discovery/rest?version=v1beta1');
|
|
12
|
+
/** now we can use gapi.client.dataform */
|
|
13
|
+
|
|
14
|
+
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
+
/** declare client_id registered in Google Developers Console */
|
|
16
|
+
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
+
const scope = [
|
|
18
|
+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
+
];
|
|
21
|
+
const immediate = false;
|
|
22
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
23
|
+
if (authResult && !authResult.error) {
|
|
24
|
+
/** handle successful authorization */
|
|
25
|
+
run();
|
|
26
|
+
} else {
|
|
27
|
+
/** handle authorization error */
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
async function run() {
|
|
32
|
+
/** Gets information about a location. */
|
|
33
|
+
await gapi.client.dataform.projects.locations.get({
|
|
34
|
+
name: "Test string",
|
|
35
|
+
});
|
|
36
|
+
/** Lists information about the supported locations for this service. */
|
|
37
|
+
await gapi.client.dataform.projects.locations.list({
|
|
38
|
+
filter: "Test string",
|
|
39
|
+
includeUnrevealedLocations: true,
|
|
40
|
+
name: "Test string",
|
|
41
|
+
pageSize: 42,
|
|
42
|
+
pageToken: "Test string",
|
|
43
|
+
});
|
|
44
|
+
/** Creates a new Repository in a given project and location. */
|
|
45
|
+
await gapi.client.dataform.projects.locations.repositories.create({
|
|
46
|
+
parent: "Test string",
|
|
47
|
+
repositoryId: "Test string",
|
|
48
|
+
}, {
|
|
49
|
+
gitRemoteSettings: {
|
|
50
|
+
authenticationTokenSecretVersion: "Test string",
|
|
51
|
+
defaultBranch: "Test string",
|
|
52
|
+
tokenStatus: "Test string",
|
|
53
|
+
url: "Test string",
|
|
54
|
+
},
|
|
55
|
+
name: "Test string",
|
|
56
|
+
npmrcEnvironmentVariablesSecretVersion: "Test string",
|
|
57
|
+
});
|
|
58
|
+
/** Deletes a single Repository. */
|
|
59
|
+
await gapi.client.dataform.projects.locations.repositories.delete({
|
|
60
|
+
force: true,
|
|
61
|
+
name: "Test string",
|
|
62
|
+
});
|
|
63
|
+
/** Fetches a Repository's remote branches. */
|
|
64
|
+
await gapi.client.dataform.projects.locations.repositories.fetchRemoteBranches({
|
|
65
|
+
name: "Test string",
|
|
66
|
+
});
|
|
67
|
+
/** Fetches a single Repository. */
|
|
68
|
+
await gapi.client.dataform.projects.locations.repositories.get({
|
|
69
|
+
name: "Test string",
|
|
70
|
+
});
|
|
71
|
+
/** Lists Repositories in a given project and location. */
|
|
72
|
+
await gapi.client.dataform.projects.locations.repositories.list({
|
|
73
|
+
filter: "Test string",
|
|
74
|
+
orderBy: "Test string",
|
|
75
|
+
pageSize: 42,
|
|
76
|
+
pageToken: "Test string",
|
|
77
|
+
parent: "Test string",
|
|
78
|
+
});
|
|
79
|
+
/** Updates a single Repository. */
|
|
80
|
+
await gapi.client.dataform.projects.locations.repositories.patch({
|
|
81
|
+
name: "Test string",
|
|
82
|
+
updateMask: "Test string",
|
|
83
|
+
}, {
|
|
84
|
+
gitRemoteSettings: {
|
|
85
|
+
authenticationTokenSecretVersion: "Test string",
|
|
86
|
+
defaultBranch: "Test string",
|
|
87
|
+
tokenStatus: "Test string",
|
|
88
|
+
url: "Test string",
|
|
89
|
+
},
|
|
90
|
+
name: "Test string",
|
|
91
|
+
npmrcEnvironmentVariablesSecretVersion: "Test string",
|
|
92
|
+
});
|
|
93
|
+
/** Creates a new CompilationResult in a given project and location. */
|
|
94
|
+
await gapi.client.dataform.projects.locations.repositories.compilationResults.create({
|
|
95
|
+
parent: "Test string",
|
|
96
|
+
}, {
|
|
97
|
+
codeCompilationConfig: {
|
|
98
|
+
assertionSchema: "Test string",
|
|
99
|
+
databaseSuffix: "Test string",
|
|
100
|
+
defaultDatabase: "Test string",
|
|
101
|
+
defaultLocation: "Test string",
|
|
102
|
+
defaultSchema: "Test string",
|
|
103
|
+
schemaSuffix: "Test string",
|
|
104
|
+
tablePrefix: "Test string",
|
|
105
|
+
vars: {
|
|
106
|
+
A: "Test string"
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
compilationErrors: [
|
|
110
|
+
{
|
|
111
|
+
actionTarget: {
|
|
112
|
+
database: "Test string",
|
|
113
|
+
name: "Test string",
|
|
114
|
+
schema: "Test string",
|
|
115
|
+
},
|
|
116
|
+
message: "Test string",
|
|
117
|
+
path: "Test string",
|
|
118
|
+
stack: "Test string",
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
dataformCoreVersion: "Test string",
|
|
122
|
+
gitCommitish: "Test string",
|
|
123
|
+
name: "Test string",
|
|
124
|
+
releaseConfig: "Test string",
|
|
125
|
+
resolvedGitCommitSha: "Test string",
|
|
126
|
+
workspace: "Test string",
|
|
127
|
+
});
|
|
128
|
+
/** Fetches a single CompilationResult. */
|
|
129
|
+
await gapi.client.dataform.projects.locations.repositories.compilationResults.get({
|
|
130
|
+
name: "Test string",
|
|
131
|
+
});
|
|
132
|
+
/** Lists CompilationResults in a given Repository. */
|
|
133
|
+
await gapi.client.dataform.projects.locations.repositories.compilationResults.list({
|
|
134
|
+
pageSize: 42,
|
|
135
|
+
pageToken: "Test string",
|
|
136
|
+
parent: "Test string",
|
|
137
|
+
});
|
|
138
|
+
/** Returns CompilationResultActions in a given CompilationResult. */
|
|
139
|
+
await gapi.client.dataform.projects.locations.repositories.compilationResults.query({
|
|
140
|
+
filter: "Test string",
|
|
141
|
+
name: "Test string",
|
|
142
|
+
pageSize: 42,
|
|
143
|
+
pageToken: "Test string",
|
|
144
|
+
});
|
|
145
|
+
/** Creates a new ReleaseConfig in a given Repository. */
|
|
146
|
+
await gapi.client.dataform.projects.locations.repositories.releaseConfigs.create({
|
|
147
|
+
parent: "Test string",
|
|
148
|
+
releaseConfigId: "Test string",
|
|
149
|
+
}, {
|
|
150
|
+
codeCompilationConfig: {
|
|
151
|
+
assertionSchema: "Test string",
|
|
152
|
+
databaseSuffix: "Test string",
|
|
153
|
+
defaultDatabase: "Test string",
|
|
154
|
+
defaultLocation: "Test string",
|
|
155
|
+
defaultSchema: "Test string",
|
|
156
|
+
schemaSuffix: "Test string",
|
|
157
|
+
tablePrefix: "Test string",
|
|
158
|
+
vars: {
|
|
159
|
+
A: "Test string"
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
cronSchedule: "Test string",
|
|
163
|
+
gitCommitish: "Test string",
|
|
164
|
+
name: "Test string",
|
|
165
|
+
recentScheduledReleaseRecords: [
|
|
166
|
+
{
|
|
167
|
+
compilationResult: "Test string",
|
|
168
|
+
errorStatus: {
|
|
169
|
+
code: 42,
|
|
170
|
+
details: [
|
|
171
|
+
{
|
|
172
|
+
A: 42
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
message: "Test string",
|
|
176
|
+
},
|
|
177
|
+
releaseTime: "Test string",
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
releaseCompilationResult: "Test string",
|
|
181
|
+
timeZone: "Test string",
|
|
182
|
+
});
|
|
183
|
+
/** Deletes a single ReleaseConfig. */
|
|
184
|
+
await gapi.client.dataform.projects.locations.repositories.releaseConfigs.delete({
|
|
185
|
+
name: "Test string",
|
|
186
|
+
});
|
|
187
|
+
/** Fetches a single ReleaseConfig. */
|
|
188
|
+
await gapi.client.dataform.projects.locations.repositories.releaseConfigs.get({
|
|
189
|
+
name: "Test string",
|
|
190
|
+
});
|
|
191
|
+
/** Lists ReleaseConfigs in a given Repository. */
|
|
192
|
+
await gapi.client.dataform.projects.locations.repositories.releaseConfigs.list({
|
|
193
|
+
pageSize: 42,
|
|
194
|
+
pageToken: "Test string",
|
|
195
|
+
parent: "Test string",
|
|
196
|
+
});
|
|
197
|
+
/** Updates a single ReleaseConfig. */
|
|
198
|
+
await gapi.client.dataform.projects.locations.repositories.releaseConfigs.patch({
|
|
199
|
+
name: "Test string",
|
|
200
|
+
updateMask: "Test string",
|
|
201
|
+
}, {
|
|
202
|
+
codeCompilationConfig: {
|
|
203
|
+
assertionSchema: "Test string",
|
|
204
|
+
databaseSuffix: "Test string",
|
|
205
|
+
defaultDatabase: "Test string",
|
|
206
|
+
defaultLocation: "Test string",
|
|
207
|
+
defaultSchema: "Test string",
|
|
208
|
+
schemaSuffix: "Test string",
|
|
209
|
+
tablePrefix: "Test string",
|
|
210
|
+
vars: {
|
|
211
|
+
A: "Test string"
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
cronSchedule: "Test string",
|
|
215
|
+
gitCommitish: "Test string",
|
|
216
|
+
name: "Test string",
|
|
217
|
+
recentScheduledReleaseRecords: [
|
|
218
|
+
{
|
|
219
|
+
compilationResult: "Test string",
|
|
220
|
+
errorStatus: {
|
|
221
|
+
code: 42,
|
|
222
|
+
details: [
|
|
223
|
+
{
|
|
224
|
+
A: 42
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
message: "Test string",
|
|
228
|
+
},
|
|
229
|
+
releaseTime: "Test string",
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
releaseCompilationResult: "Test string",
|
|
233
|
+
timeZone: "Test string",
|
|
234
|
+
});
|
|
235
|
+
/** Creates a new WorkflowConfig in a given Repository. */
|
|
236
|
+
await gapi.client.dataform.projects.locations.repositories.workflowConfigs.create({
|
|
237
|
+
parent: "Test string",
|
|
238
|
+
workflowConfigId: "Test string",
|
|
239
|
+
}, {
|
|
240
|
+
cronSchedule: "Test string",
|
|
241
|
+
invocationConfig: {
|
|
242
|
+
fullyRefreshIncrementalTablesEnabled: true,
|
|
243
|
+
includedTags: [
|
|
244
|
+
"Test string"
|
|
245
|
+
],
|
|
246
|
+
includedTargets: [
|
|
247
|
+
{
|
|
248
|
+
database: "Test string",
|
|
249
|
+
name: "Test string",
|
|
250
|
+
schema: "Test string",
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
transitiveDependenciesIncluded: true,
|
|
254
|
+
transitiveDependentsIncluded: true,
|
|
255
|
+
},
|
|
256
|
+
name: "Test string",
|
|
257
|
+
recentScheduledExecutionRecords: [
|
|
258
|
+
{
|
|
259
|
+
errorStatus: {
|
|
260
|
+
code: 42,
|
|
261
|
+
details: [
|
|
262
|
+
{
|
|
263
|
+
A: 42
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
message: "Test string",
|
|
267
|
+
},
|
|
268
|
+
executionTime: "Test string",
|
|
269
|
+
workflowInvocation: "Test string",
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
releaseConfig: "Test string",
|
|
273
|
+
timeZone: "Test string",
|
|
274
|
+
});
|
|
275
|
+
/** Deletes a single WorkflowConfig. */
|
|
276
|
+
await gapi.client.dataform.projects.locations.repositories.workflowConfigs.delete({
|
|
277
|
+
name: "Test string",
|
|
278
|
+
});
|
|
279
|
+
/** Fetches a single WorkflowConfig. */
|
|
280
|
+
await gapi.client.dataform.projects.locations.repositories.workflowConfigs.get({
|
|
281
|
+
name: "Test string",
|
|
282
|
+
});
|
|
283
|
+
/** Lists WorkflowConfigs in a given Repository. */
|
|
284
|
+
await gapi.client.dataform.projects.locations.repositories.workflowConfigs.list({
|
|
285
|
+
pageSize: 42,
|
|
286
|
+
pageToken: "Test string",
|
|
287
|
+
parent: "Test string",
|
|
288
|
+
});
|
|
289
|
+
/** Updates a single WorkflowConfig. */
|
|
290
|
+
await gapi.client.dataform.projects.locations.repositories.workflowConfigs.patch({
|
|
291
|
+
name: "Test string",
|
|
292
|
+
updateMask: "Test string",
|
|
293
|
+
}, {
|
|
294
|
+
cronSchedule: "Test string",
|
|
295
|
+
invocationConfig: {
|
|
296
|
+
fullyRefreshIncrementalTablesEnabled: true,
|
|
297
|
+
includedTags: [
|
|
298
|
+
"Test string"
|
|
299
|
+
],
|
|
300
|
+
includedTargets: [
|
|
301
|
+
{
|
|
302
|
+
database: "Test string",
|
|
303
|
+
name: "Test string",
|
|
304
|
+
schema: "Test string",
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
transitiveDependenciesIncluded: true,
|
|
308
|
+
transitiveDependentsIncluded: true,
|
|
309
|
+
},
|
|
310
|
+
name: "Test string",
|
|
311
|
+
recentScheduledExecutionRecords: [
|
|
312
|
+
{
|
|
313
|
+
errorStatus: {
|
|
314
|
+
code: 42,
|
|
315
|
+
details: [
|
|
316
|
+
{
|
|
317
|
+
A: 42
|
|
318
|
+
}
|
|
319
|
+
],
|
|
320
|
+
message: "Test string",
|
|
321
|
+
},
|
|
322
|
+
executionTime: "Test string",
|
|
323
|
+
workflowInvocation: "Test string",
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
releaseConfig: "Test string",
|
|
327
|
+
timeZone: "Test string",
|
|
328
|
+
});
|
|
329
|
+
/** Requests cancellation of a running WorkflowInvocation. */
|
|
330
|
+
await gapi.client.dataform.projects.locations.repositories.workflowInvocations.cancel({
|
|
331
|
+
name: "Test string",
|
|
332
|
+
}, {
|
|
333
|
+
});
|
|
334
|
+
/** Creates a new WorkflowInvocation in a given Repository. */
|
|
335
|
+
await gapi.client.dataform.projects.locations.repositories.workflowInvocations.create({
|
|
336
|
+
parent: "Test string",
|
|
337
|
+
}, {
|
|
338
|
+
compilationResult: "Test string",
|
|
339
|
+
invocationConfig: {
|
|
340
|
+
fullyRefreshIncrementalTablesEnabled: true,
|
|
341
|
+
includedTags: [
|
|
342
|
+
"Test string"
|
|
343
|
+
],
|
|
344
|
+
includedTargets: [
|
|
345
|
+
{
|
|
346
|
+
database: "Test string",
|
|
347
|
+
name: "Test string",
|
|
348
|
+
schema: "Test string",
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
transitiveDependenciesIncluded: true,
|
|
352
|
+
transitiveDependentsIncluded: true,
|
|
353
|
+
},
|
|
354
|
+
invocationTiming: {
|
|
355
|
+
endTime: "Test string",
|
|
356
|
+
startTime: "Test string",
|
|
357
|
+
},
|
|
358
|
+
name: "Test string",
|
|
359
|
+
state: "Test string",
|
|
360
|
+
});
|
|
361
|
+
/** Deletes a single WorkflowInvocation. */
|
|
362
|
+
await gapi.client.dataform.projects.locations.repositories.workflowInvocations.delete({
|
|
363
|
+
name: "Test string",
|
|
364
|
+
});
|
|
365
|
+
/** Fetches a single WorkflowInvocation. */
|
|
366
|
+
await gapi.client.dataform.projects.locations.repositories.workflowInvocations.get({
|
|
367
|
+
name: "Test string",
|
|
368
|
+
});
|
|
369
|
+
/** Lists WorkflowInvocations in a given Repository. */
|
|
370
|
+
await gapi.client.dataform.projects.locations.repositories.workflowInvocations.list({
|
|
371
|
+
filter: "Test string",
|
|
372
|
+
orderBy: "Test string",
|
|
373
|
+
pageSize: 42,
|
|
374
|
+
pageToken: "Test string",
|
|
375
|
+
parent: "Test string",
|
|
376
|
+
});
|
|
377
|
+
/** Returns WorkflowInvocationActions in a given WorkflowInvocation. */
|
|
378
|
+
await gapi.client.dataform.projects.locations.repositories.workflowInvocations.query({
|
|
379
|
+
name: "Test string",
|
|
380
|
+
pageSize: 42,
|
|
381
|
+
pageToken: "Test string",
|
|
382
|
+
});
|
|
383
|
+
/** Applies a Git commit for uncommitted files in a Workspace. */
|
|
384
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.commit({
|
|
385
|
+
name: "Test string",
|
|
386
|
+
}, {
|
|
387
|
+
author: {
|
|
388
|
+
emailAddress: "Test string",
|
|
389
|
+
name: "Test string",
|
|
390
|
+
},
|
|
391
|
+
commitMessage: "Test string",
|
|
392
|
+
paths: [
|
|
393
|
+
"Test string"
|
|
394
|
+
],
|
|
395
|
+
});
|
|
396
|
+
/** Creates a new Workspace in a given Repository. */
|
|
397
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.create({
|
|
398
|
+
parent: "Test string",
|
|
399
|
+
workspaceId: "Test string",
|
|
400
|
+
}, {
|
|
401
|
+
name: "Test string",
|
|
402
|
+
});
|
|
403
|
+
/** Deletes a single Workspace. */
|
|
404
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.delete({
|
|
405
|
+
name: "Test string",
|
|
406
|
+
});
|
|
407
|
+
/** Fetches Git diff for an uncommitted file in a Workspace. */
|
|
408
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.fetchFileDiff({
|
|
409
|
+
path: "Test string",
|
|
410
|
+
workspace: "Test string",
|
|
411
|
+
});
|
|
412
|
+
/** Fetches Git statuses for the files in a Workspace. */
|
|
413
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.fetchFileGitStatuses({
|
|
414
|
+
name: "Test string",
|
|
415
|
+
});
|
|
416
|
+
/** Fetches Git ahead/behind against a remote branch. */
|
|
417
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.fetchGitAheadBehind({
|
|
418
|
+
name: "Test string",
|
|
419
|
+
remoteBranch: "Test string",
|
|
420
|
+
});
|
|
421
|
+
/** Fetches a single Workspace. */
|
|
422
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.get({
|
|
423
|
+
name: "Test string",
|
|
424
|
+
});
|
|
425
|
+
/** Installs dependency NPM packages (inside a Workspace). */
|
|
426
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.installNpmPackages({
|
|
427
|
+
workspace: "Test string",
|
|
428
|
+
}, {
|
|
429
|
+
});
|
|
430
|
+
/** Lists Workspaces in a given Repository. */
|
|
431
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.list({
|
|
432
|
+
filter: "Test string",
|
|
433
|
+
orderBy: "Test string",
|
|
434
|
+
pageSize: 42,
|
|
435
|
+
pageToken: "Test string",
|
|
436
|
+
parent: "Test string",
|
|
437
|
+
});
|
|
438
|
+
/** Creates a directory inside a Workspace. */
|
|
439
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.makeDirectory({
|
|
440
|
+
workspace: "Test string",
|
|
441
|
+
}, {
|
|
442
|
+
path: "Test string",
|
|
443
|
+
});
|
|
444
|
+
/** Moves a directory (inside a Workspace), and all of its contents, to a new location. */
|
|
445
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.moveDirectory({
|
|
446
|
+
workspace: "Test string",
|
|
447
|
+
}, {
|
|
448
|
+
newPath: "Test string",
|
|
449
|
+
path: "Test string",
|
|
450
|
+
});
|
|
451
|
+
/** Moves a file (inside a Workspace) to a new location. */
|
|
452
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.moveFile({
|
|
453
|
+
workspace: "Test string",
|
|
454
|
+
}, {
|
|
455
|
+
newPath: "Test string",
|
|
456
|
+
path: "Test string",
|
|
457
|
+
});
|
|
458
|
+
/** Pulls Git commits from the Repository's remote into a Workspace. */
|
|
459
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.pull({
|
|
460
|
+
name: "Test string",
|
|
461
|
+
}, {
|
|
462
|
+
author: {
|
|
463
|
+
emailAddress: "Test string",
|
|
464
|
+
name: "Test string",
|
|
465
|
+
},
|
|
466
|
+
remoteBranch: "Test string",
|
|
467
|
+
});
|
|
468
|
+
/** Pushes Git commits from a Workspace to the Repository's remote. */
|
|
469
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.push({
|
|
470
|
+
name: "Test string",
|
|
471
|
+
}, {
|
|
472
|
+
remoteBranch: "Test string",
|
|
473
|
+
});
|
|
474
|
+
/** Returns the contents of a given Workspace directory. */
|
|
475
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.queryDirectoryContents({
|
|
476
|
+
pageSize: 42,
|
|
477
|
+
pageToken: "Test string",
|
|
478
|
+
path: "Test string",
|
|
479
|
+
workspace: "Test string",
|
|
480
|
+
});
|
|
481
|
+
/** Returns the contents of a file (inside a Workspace). */
|
|
482
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.readFile({
|
|
483
|
+
path: "Test string",
|
|
484
|
+
workspace: "Test string",
|
|
485
|
+
});
|
|
486
|
+
/** Deletes a directory (inside a Workspace) and all of its contents. */
|
|
487
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.removeDirectory({
|
|
488
|
+
workspace: "Test string",
|
|
489
|
+
}, {
|
|
490
|
+
path: "Test string",
|
|
491
|
+
});
|
|
492
|
+
/** Deletes a file (inside a Workspace). */
|
|
493
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.removeFile({
|
|
494
|
+
workspace: "Test string",
|
|
495
|
+
}, {
|
|
496
|
+
path: "Test string",
|
|
497
|
+
});
|
|
498
|
+
/** Performs a Git reset for uncommitted files in a Workspace. */
|
|
499
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.reset({
|
|
500
|
+
name: "Test string",
|
|
501
|
+
}, {
|
|
502
|
+
clean: true,
|
|
503
|
+
paths: [
|
|
504
|
+
"Test string"
|
|
505
|
+
],
|
|
506
|
+
});
|
|
507
|
+
/** Writes to a file (inside a Workspace). */
|
|
508
|
+
await gapi.client.dataform.projects.locations.repositories.workspaces.writeFile({
|
|
509
|
+
workspace: "Test string",
|
|
510
|
+
}, {
|
|
511
|
+
contents: "Test string",
|
|
512
|
+
path: "Test string",
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"lib": ["es6", "dom"],
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"noImplicitThis": true,
|
|
7
|
+
"strictNullChecks": true,
|
|
8
|
+
"baseUrl": "../",
|
|
9
|
+
"typeRoots": [
|
|
10
|
+
"../"
|
|
11
|
+
],
|
|
12
|
+
"types": [],
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"strictFunctionTypes": true
|
|
16
|
+
},
|
|
17
|
+
"files": ["index.d.ts", "tests.ts"]
|
|
18
|
+
}
|