@maxim_mazurok/gapi.client.dataform-v1beta1 0.0.20230707 → 0.0.20230728

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.
Files changed (3) hide show
  1. package/index.d.ts +315 -2
  2. package/package.json +1 -1
  3. package/tests.ts +53 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://dataform.googleapis.com/$discovery/rest?version=v1beta1
12
- // Revision: 20230707
12
+ // Revision: 20230728
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -125,6 +125,42 @@ declare namespace gapi.client {
125
125
  name?:
126
126
  string;
127
127
  }
128
+ interface CommitLogEntry {
129
+ /** The commit author for this commit log entry. */
130
+ author?:
131
+ CommitAuthor;
132
+ /** The commit message for this commit log entry. */
133
+ commitMessage?:
134
+ string;
135
+ /** The commit SHA for this commit log entry. */
136
+ commitSha?:
137
+ string;
138
+ /** Commit timestamp. */
139
+ commitTime?:
140
+ string;
141
+ }
142
+ interface CommitMetadata {
143
+ /** Required. The commit's author. */
144
+ author?:
145
+ CommitAuthor;
146
+ /** Optional. The commit's message. */
147
+ commitMessage?:
148
+ string;
149
+ }
150
+ interface CommitRepositoryChangesRequest {
151
+ /** Required. The changes to commit to the repository. */
152
+ commitMetadata?:
153
+ CommitMetadata;
154
+ /** A map to the path of the file to the operation. The path is the ull file path including filename, from repository root. */
155
+ fileOperations?:
156
+ { [P in string]: FileOperation };
157
+ /**
158
+ * Optional. The commit SHA which must be the repository's current HEAD before applying this commit; otherwise this request will fail. If unset, no validation on the current HEAD
159
+ * commit SHA is performed.
160
+ */
161
+ requiredHeadCommitSha?:
162
+ string;
163
+ }
128
164
  interface CommitWorkspaceChangesRequest {
129
165
  /** Required. The commit's author. */
130
166
  author?:
@@ -215,6 +251,9 @@ declare namespace gapi.client {
215
251
  relationDescriptor?:
216
252
  RelationDescriptor;
217
253
  }
254
+ // tslint:disable-next-line:no-empty-interface
255
+ interface DeleteFile {
256
+ }
218
257
  interface DirectoryEntry {
219
258
  /** A child directory in the directory. */
220
259
  directory?:
@@ -263,8 +302,24 @@ declare namespace gapi.client {
263
302
  branches?:
264
303
  string[];
265
304
  }
305
+ interface FetchRepositoryHistoryResponse {
306
+ /** A list of commit logs, ordered by 'git log' default order. */
307
+ commits?:
308
+ CommitLogEntry[];
309
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
310
+ nextPageToken?:
311
+ string;
312
+ }
313
+ interface FileOperation {
314
+ /** Represents the delete operation. */
315
+ deleteFile?:
316
+ any;
317
+ /** Represents the write operation. */
318
+ writeFile?:
319
+ WriteFile;
320
+ }
266
321
  interface GitRemoteSettings {
267
- /** Required. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format `projects/*‍/secrets/*‍/versions/*`. */
322
+ /** Optional. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format `projects/*‍/secrets/*‍/versions/*`. */
268
323
  authenticationTokenSecretVersion?:
269
324
  string;
270
325
  /** Required. The Git remote's default branch name. */
@@ -562,6 +617,14 @@ declare namespace gapi.client {
562
617
  nextPageToken?:
563
618
  string;
564
619
  }
620
+ interface QueryRepositoryDirectoryContentsResponse {
621
+ /** List of entries in the directory. */
622
+ directoryEntries?:
623
+ DirectoryEntry[];
624
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
625
+ nextPageToken?:
626
+ string;
627
+ }
565
628
  interface QueryWorkflowInvocationActionsResponse {
566
629
  /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
567
630
  nextPageToken?:
@@ -575,6 +638,11 @@ declare namespace gapi.client {
575
638
  fileContents?:
576
639
  string;
577
640
  }
641
+ interface ReadRepositoryFileResponse {
642
+ /** The file's contents. */
643
+ contents?:
644
+ string;
645
+ }
578
646
  interface Relation {
579
647
  /**
580
648
  * Additional options that will be provided as key/value pairs into the options clause of a create table/view statement. See
@@ -680,9 +748,15 @@ declare namespace gapi.client {
680
748
  string;
681
749
  }
682
750
  interface Repository {
751
+ /** Optional. The repository's user-friendly name. */
752
+ displayName?:
753
+ string;
683
754
  /** Optional. If set, configures this repository to be linked to a Git remote. */
684
755
  gitRemoteSettings?:
685
756
  GitRemoteSettings;
757
+ /** Optional. Repository user labels. */
758
+ labels?:
759
+ { [P in string]: string };
686
760
  /** Output only. The repository's name. */
687
761
  name?:
688
762
  string;
@@ -695,6 +769,12 @@ declare namespace gapi.client {
695
769
  /** Optional. The service account to run workflow invocations under. */
696
770
  serviceAccount?:
697
771
  string;
772
+ /**
773
+ * Optional. Input only. If set to true, the authenticated user will be granted the roles/dataform.admin role on the created repository. To modify access to the created repository
774
+ * later apply setIamPolicy from https://cloud.google.com/dataform/reference/rest#rest-resource:-v1beta1.projects.locations.repositories
775
+ */
776
+ setAuthenticatedUserAdmin?:
777
+ boolean;
698
778
  /**
699
779
  * Optional. If set, fields of `workspace_compilation_overrides` override the default compilation settings that are specified in dataform.json when creating workspace-scoped
700
780
  * compilation results. See documentation for `WorkspaceCompilationOverrides` for more information.
@@ -871,6 +951,11 @@ declare namespace gapi.client {
871
951
  tablePrefix?:
872
952
  string;
873
953
  }
954
+ interface WriteFile {
955
+ /** The file's contents. */
956
+ contents?:
957
+ string;
958
+ }
874
959
  interface WriteFileRequest {
875
960
  /** Required. The file's contents. */
876
961
  contents?:
@@ -3520,6 +3605,87 @@ declare namespace gapi.client {
3520
3605
  body: WriteFileRequest): Request<{}>;
3521
3606
  }
3522
3607
  interface RepositoriesResource {
3608
+ /** Applies a Git commit to a Repository. The Repository must not have a value for `git_remote_settings.url`. */
3609
+ commit(request: {
3610
+ /** V1 error format. */
3611
+ "$.xgafv"?:
3612
+ string;
3613
+ /** OAuth access token. */
3614
+ access_token?:
3615
+ string;
3616
+ /** Data format for response. */
3617
+ alt?:
3618
+ string;
3619
+ /** JSONP */
3620
+ callback?:
3621
+ string;
3622
+ /** Selector specifying which fields to include in a partial response. */
3623
+ fields?:
3624
+ string;
3625
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3626
+ key?:
3627
+ string;
3628
+ /** Required. The repository's name. */
3629
+ name:
3630
+ string;
3631
+ /** OAuth 2.0 token for the current user. */
3632
+ oauth_token?:
3633
+ string;
3634
+ /** Returns response with indentations and line breaks. */
3635
+ prettyPrint?:
3636
+ boolean;
3637
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3638
+ quotaUser?:
3639
+ string;
3640
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3641
+ upload_protocol?:
3642
+ string;
3643
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3644
+ uploadType?:
3645
+ string;
3646
+ /** Request body */
3647
+ resource:
3648
+ CommitRepositoryChangesRequest;
3649
+ }): Request<{}>;
3650
+ commit(request: {
3651
+ /** V1 error format. */
3652
+ "$.xgafv"?:
3653
+ string;
3654
+ /** OAuth access token. */
3655
+ access_token?:
3656
+ string;
3657
+ /** Data format for response. */
3658
+ alt?:
3659
+ string;
3660
+ /** JSONP */
3661
+ callback?:
3662
+ string;
3663
+ /** Selector specifying which fields to include in a partial response. */
3664
+ fields?:
3665
+ string;
3666
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3667
+ key?:
3668
+ string;
3669
+ /** Required. The repository's name. */
3670
+ name:
3671
+ string;
3672
+ /** OAuth 2.0 token for the current user. */
3673
+ oauth_token?:
3674
+ string;
3675
+ /** Returns response with indentations and line breaks. */
3676
+ prettyPrint?:
3677
+ boolean;
3678
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3679
+ quotaUser?:
3680
+ string;
3681
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3682
+ upload_protocol?:
3683
+ string;
3684
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3685
+ uploadType?:
3686
+ string;
3687
+ },
3688
+ body: CommitRepositoryChangesRequest): Request<{}>;
3523
3689
  /** Computes a Repository's Git access token status. */
3524
3690
  computeAccessTokenStatus(request?: {
3525
3691
  /** V1 error format. */
@@ -3688,6 +3854,54 @@ declare namespace gapi.client {
3688
3854
  uploadType?:
3689
3855
  string;
3690
3856
  }): Request<{}>;
3857
+ /** Fetches a Repository's history of commits. The Repository must not have a value for `git_remote_settings.url`. */
3858
+ fetchHistory(request?: {
3859
+ /** V1 error format. */
3860
+ "$.xgafv"?:
3861
+ string;
3862
+ /** OAuth access token. */
3863
+ access_token?:
3864
+ string;
3865
+ /** Data format for response. */
3866
+ alt?:
3867
+ string;
3868
+ /** JSONP */
3869
+ callback?:
3870
+ string;
3871
+ /** Selector specifying which fields to include in a partial response. */
3872
+ fields?:
3873
+ string;
3874
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3875
+ key?:
3876
+ string;
3877
+ /** Required. The repository's name. */
3878
+ name:
3879
+ string;
3880
+ /** OAuth 2.0 token for the current user. */
3881
+ oauth_token?:
3882
+ string;
3883
+ /** Optional. Maximum number of commits to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. */
3884
+ pageSize?:
3885
+ number;
3886
+ /**
3887
+ * Optional. Page token received from a previous `FetchRepositoryHistory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
3888
+ * `FetchRepositoryHistory` must match the call that provided the page token.
3889
+ */
3890
+ pageToken?:
3891
+ string;
3892
+ /** Returns response with indentations and line breaks. */
3893
+ prettyPrint?:
3894
+ boolean;
3895
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3896
+ quotaUser?:
3897
+ string;
3898
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3899
+ upload_protocol?:
3900
+ string;
3901
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3902
+ uploadType?:
3903
+ string;
3904
+ }): Request<FetchRepositoryHistoryResponse>;
3691
3905
  /** Fetches a Repository's remote branches. */
3692
3906
  fetchRemoteBranches(request?: {
3693
3907
  /** V1 error format. */
@@ -3958,6 +4172,105 @@ declare namespace gapi.client {
3958
4172
  string;
3959
4173
  },
3960
4174
  body: Repository): Request<Repository>;
4175
+ /** Returns the contents of a given Repository directory. The Repository must not have a value for `git_remote_settings.url`. */
4176
+ queryDirectoryContents(request?: {
4177
+ /** V1 error format. */
4178
+ "$.xgafv"?:
4179
+ string;
4180
+ /** OAuth access token. */
4181
+ access_token?:
4182
+ string;
4183
+ /** Data format for response. */
4184
+ alt?:
4185
+ string;
4186
+ /** JSONP */
4187
+ callback?:
4188
+ string;
4189
+ /** Optional. The Commit SHA for the commit to query from. If unset, the directory will be queried from HEAD. */
4190
+ commitSha?:
4191
+ string;
4192
+ /** Selector specifying which fields to include in a partial response. */
4193
+ fields?:
4194
+ string;
4195
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
4196
+ key?:
4197
+ string;
4198
+ /** Required. The repository's name. */
4199
+ name:
4200
+ string;
4201
+ /** OAuth 2.0 token for the current user. */
4202
+ oauth_token?:
4203
+ string;
4204
+ /** Optional. Maximum number of paths to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. */
4205
+ pageSize?:
4206
+ number;
4207
+ /**
4208
+ * Optional. Page token received from a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters
4209
+ * provided to `QueryRepositoryDirectoryContents` must match the call that provided the page token.
4210
+ */
4211
+ pageToken?:
4212
+ string;
4213
+ /** Optional. The directory's full path including directory name, relative to root. If left unset, the root is used. */
4214
+ path?:
4215
+ string;
4216
+ /** Returns response with indentations and line breaks. */
4217
+ prettyPrint?:
4218
+ boolean;
4219
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
4220
+ quotaUser?:
4221
+ string;
4222
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4223
+ upload_protocol?:
4224
+ string;
4225
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4226
+ uploadType?:
4227
+ string;
4228
+ }): Request<QueryRepositoryDirectoryContentsResponse>;
4229
+ /** Returns the contents of a file (inside a Repository). The Repository must not have a value for `git_remote_settings.url`. */
4230
+ readFile(request?: {
4231
+ /** V1 error format. */
4232
+ "$.xgafv"?:
4233
+ string;
4234
+ /** OAuth access token. */
4235
+ access_token?:
4236
+ string;
4237
+ /** Data format for response. */
4238
+ alt?:
4239
+ string;
4240
+ /** JSONP */
4241
+ callback?:
4242
+ string;
4243
+ /** Optional. The commit SHA for the commit to read from. If unset, the file will be read from HEAD. */
4244
+ commitSha?:
4245
+ string;
4246
+ /** Selector specifying which fields to include in a partial response. */
4247
+ fields?:
4248
+ string;
4249
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
4250
+ key?:
4251
+ string;
4252
+ /** Required. The repository's name. */
4253
+ name:
4254
+ string;
4255
+ /** OAuth 2.0 token for the current user. */
4256
+ oauth_token?:
4257
+ string;
4258
+ /** Required. Full file path to read including filename, from repository root. */
4259
+ path?:
4260
+ string;
4261
+ /** Returns response with indentations and line breaks. */
4262
+ prettyPrint?:
4263
+ boolean;
4264
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
4265
+ quotaUser?:
4266
+ string;
4267
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4268
+ upload_protocol?:
4269
+ string;
4270
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4271
+ uploadType?:
4272
+ string;
4273
+ }): Request<ReadRepositoryFileResponse>;
3961
4274
  /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
3962
4275
  setIamPolicy(request: {
3963
4276
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.dataform-v1beta1",
3
- "version": "0.0.20230707",
3
+ "version": "0.0.20230728",
4
4
  "description": "TypeScript typings for Dataform API v1beta1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230707
6
+ // Revision: 20230728
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -40,6 +40,28 @@ gapi.load('client', async () => {
40
40
  pageSize: 42,
41
41
  pageToken: "Test string",
42
42
  });
43
+ /** Applies a Git commit to a Repository. The Repository must not have a value for `git_remote_settings.url`. */
44
+ await gapi.client.dataform.projects.locations.repositories.commit({
45
+ name: "Test string",
46
+ }, {
47
+ commitMetadata: {
48
+ author: {
49
+ emailAddress: "Test string",
50
+ name: "Test string",
51
+ },
52
+ commitMessage: "Test string",
53
+ },
54
+ fileOperations: {
55
+ A: {
56
+ deleteFile: {
57
+ },
58
+ writeFile: {
59
+ contents: "Test string",
60
+ },
61
+ }
62
+ },
63
+ requiredHeadCommitSha: "Test string",
64
+ });
43
65
  /** Computes a Repository's Git access token status. */
44
66
  await gapi.client.dataform.projects.locations.repositories.computeAccessTokenStatus({
45
67
  name: "Test string",
@@ -49,15 +71,20 @@ gapi.load('client', async () => {
49
71
  parent: "Test string",
50
72
  repositoryId: "Test string",
51
73
  }, {
74
+ displayName: "Test string",
52
75
  gitRemoteSettings: {
53
76
  authenticationTokenSecretVersion: "Test string",
54
77
  defaultBranch: "Test string",
55
78
  tokenStatus: "Test string",
56
79
  url: "Test string",
57
80
  },
81
+ labels: {
82
+ A: "Test string"
83
+ },
58
84
  name: "Test string",
59
85
  npmrcEnvironmentVariablesSecretVersion: "Test string",
60
86
  serviceAccount: "Test string",
87
+ setAuthenticatedUserAdmin: true,
61
88
  workspaceCompilationOverrides: {
62
89
  defaultDatabase: "Test string",
63
90
  schemaSuffix: "Test string",
@@ -69,6 +96,12 @@ gapi.load('client', async () => {
69
96
  force: true,
70
97
  name: "Test string",
71
98
  });
99
+ /** Fetches a Repository's history of commits. The Repository must not have a value for `git_remote_settings.url`. */
100
+ await gapi.client.dataform.projects.locations.repositories.fetchHistory({
101
+ name: "Test string",
102
+ pageSize: 42,
103
+ pageToken: "Test string",
104
+ });
72
105
  /** Fetches a Repository's remote branches. */
73
106
  await gapi.client.dataform.projects.locations.repositories.fetchRemoteBranches({
74
107
  name: "Test string",
@@ -95,21 +128,40 @@ gapi.load('client', async () => {
95
128
  name: "Test string",
96
129
  updateMask: "Test string",
97
130
  }, {
131
+ displayName: "Test string",
98
132
  gitRemoteSettings: {
99
133
  authenticationTokenSecretVersion: "Test string",
100
134
  defaultBranch: "Test string",
101
135
  tokenStatus: "Test string",
102
136
  url: "Test string",
103
137
  },
138
+ labels: {
139
+ A: "Test string"
140
+ },
104
141
  name: "Test string",
105
142
  npmrcEnvironmentVariablesSecretVersion: "Test string",
106
143
  serviceAccount: "Test string",
144
+ setAuthenticatedUserAdmin: true,
107
145
  workspaceCompilationOverrides: {
108
146
  defaultDatabase: "Test string",
109
147
  schemaSuffix: "Test string",
110
148
  tablePrefix: "Test string",
111
149
  },
112
150
  });
151
+ /** Returns the contents of a given Repository directory. The Repository must not have a value for `git_remote_settings.url`. */
152
+ await gapi.client.dataform.projects.locations.repositories.queryDirectoryContents({
153
+ commitSha: "Test string",
154
+ name: "Test string",
155
+ pageSize: 42,
156
+ pageToken: "Test string",
157
+ path: "Test string",
158
+ });
159
+ /** Returns the contents of a file (inside a Repository). The Repository must not have a value for `git_remote_settings.url`. */
160
+ await gapi.client.dataform.projects.locations.repositories.readFile({
161
+ commitSha: "Test string",
162
+ name: "Test string",
163
+ path: "Test string",
164
+ });
113
165
  /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
114
166
  await gapi.client.dataform.projects.locations.repositories.setIamPolicy({
115
167
  resource: "Test string",