@maxim_mazurok/gapi.client.dataform-v1beta1 0.0.20230225 → 0.0.20230311

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 +251 -1
  2. package/package.json +1 -1
  3. package/tests.ts +72 -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: 20230225
12
+ // Revision: 20230311
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -102,6 +102,28 @@ declare namespace gapi.client {
102
102
  /** Required. The commit author's name. */
103
103
  name?: string;
104
104
  }
105
+ interface CommitLogEntry {
106
+ /** The commit author for this commit log entry. */
107
+ author?: CommitAuthor;
108
+ /** The commit message for this commit log entry. */
109
+ commitMessage?: string;
110
+ /** The commit SHA for this commit log entry. */
111
+ commitSha?: string;
112
+ /** Commit timestamp. */
113
+ commitTime?: string;
114
+ }
115
+ interface CommitMetadata {
116
+ /** Required. The commit's author. */
117
+ author?: CommitAuthor;
118
+ /** Optional. The commit's message. */
119
+ commitMessage?: string;
120
+ }
121
+ interface CommitRepositoryChangesRequest {
122
+ /** Required. The changes to commit to the repository. */
123
+ commitMetadata?: CommitMetadata;
124
+ /** A map to the path of the file to the operation. The path is the ull file path including filename, from repository root. */
125
+ fileOperations?: { [P in string]: FileOperation };
126
+ }
105
127
  interface CommitWorkspaceChangesRequest {
106
128
  /** Required. The commit's author. */
107
129
  author?: CommitAuthor;
@@ -160,10 +182,17 @@ declare namespace gapi.client {
160
182
  /** This action's identifier. Unique within the compilation result. */
161
183
  target?: Target;
162
184
  }
185
+ interface ComputeRepositoryAccessTokenStatusResponse {
186
+ /** Indicates the status of the Git access token. */
187
+ tokenStatus?: string;
188
+ }
163
189
  interface Declaration {
164
190
  /** Descriptor for the relation and its columns. Used as documentation only, i.e. values here will result in no changes to the relation's metadata. */
165
191
  relationDescriptor?: RelationDescriptor;
166
192
  }
193
+ // tslint:disable-next-line:no-empty-interface
194
+ interface DeleteFile {
195
+ }
167
196
  interface DirectoryEntry {
168
197
  /** A child directory in the directory. */
169
198
  directory?: string;
@@ -201,6 +230,18 @@ declare namespace gapi.client {
201
230
  /** The remote repository's branch names. */
202
231
  branches?: string[];
203
232
  }
233
+ interface FetchRepositoryHistoryResponse {
234
+ /** A list of commit logs, ordered by 'git log' default order. */
235
+ commits?: CommitLogEntry[];
236
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
237
+ nextPageToken?: string;
238
+ }
239
+ interface FileOperation {
240
+ /** Represents the delete operation. */
241
+ deleteFile?: any;
242
+ /** Represents the write operation. */
243
+ writeFile?: WriteFile;
244
+ }
204
245
  interface GitRemoteSettings {
205
246
  /** 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/*`. */
206
247
  authenticationTokenSecretVersion?: string;
@@ -424,6 +465,12 @@ declare namespace gapi.client {
424
465
  /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
425
466
  nextPageToken?: string;
426
467
  }
468
+ interface QueryRepositoryDirectoryContentsResponse {
469
+ /** List of entries in the directory. */
470
+ directoryEntries?: DirectoryEntry[];
471
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
472
+ nextPageToken?: string;
473
+ }
427
474
  interface QueryWorkflowInvocationActionsResponse {
428
475
  /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
429
476
  nextPageToken?: string;
@@ -434,6 +481,10 @@ declare namespace gapi.client {
434
481
  /** The file's contents. */
435
482
  fileContents?: string;
436
483
  }
484
+ interface ReadRepositoryFileResponse {
485
+ /** The file's contents. */
486
+ contents?: string;
487
+ }
437
488
  interface Relation {
438
489
  /**
439
490
  * Additional options that will be provided as key/value pairs into the options clause of a create table/view statement. See
@@ -512,6 +563,15 @@ declare namespace gapi.client {
512
563
  interface Repository {
513
564
  /** Optional. If set, configures this repository to be linked to a Git remote. */
514
565
  gitRemoteSettings?: GitRemoteSettings;
566
+ /**
567
+ * Optional. Input only. The initial commit file contents. Represented as map from file path to contents. The path is the full file path to commit including filename, from repository
568
+ * root.
569
+ */
570
+ initialCommitFileContents?: { [P in string]: string };
571
+ /** Optional. Input only. An optional initial commit metadata for the Repository. The Repository must not have a value for `git_remote_settings.url`. */
572
+ initialCommitMetadata?: CommitMetadata;
573
+ /** Optional. Repository user labels. */
574
+ labels?: { [P in string]: string };
515
575
  /** Output only. The repository's name. */
516
576
  name?: string;
517
577
  /**
@@ -650,6 +710,10 @@ declare namespace gapi.client {
650
710
  /** Optional. The prefix that should be prepended to all table names. */
651
711
  tablePrefix?: string;
652
712
  }
713
+ interface WriteFile {
714
+ /** The file's contents. */
715
+ contents?: string;
716
+ }
653
717
  interface WriteFileRequest {
654
718
  /** Required. The file's contents. */
655
719
  contents?: string;
@@ -2498,6 +2562,89 @@ declare namespace gapi.client {
2498
2562
  body: WriteFileRequest): Request<{}>;
2499
2563
  }
2500
2564
  interface RepositoriesResource {
2565
+ /** Applies a Git commit to a Repository. The Repository must not have a value for `git_remote_settings.url`. */
2566
+ commit(request: {
2567
+ /** V1 error format. */
2568
+ "$.xgafv"?: string;
2569
+ /** OAuth access token. */
2570
+ access_token?: string;
2571
+ /** Data format for response. */
2572
+ alt?: string;
2573
+ /** JSONP */
2574
+ callback?: string;
2575
+ /** Selector specifying which fields to include in a partial response. */
2576
+ fields?: string;
2577
+ /** 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. */
2578
+ key?: string;
2579
+ /** Required. The repository's name. */
2580
+ name: string;
2581
+ /** OAuth 2.0 token for the current user. */
2582
+ oauth_token?: string;
2583
+ /** Returns response with indentations and line breaks. */
2584
+ prettyPrint?: boolean;
2585
+ /** 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. */
2586
+ quotaUser?: string;
2587
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2588
+ upload_protocol?: string;
2589
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2590
+ uploadType?: string;
2591
+ /** Request body */
2592
+ resource: CommitRepositoryChangesRequest;
2593
+ }): Request<{}>;
2594
+ commit(request: {
2595
+ /** V1 error format. */
2596
+ "$.xgafv"?: string;
2597
+ /** OAuth access token. */
2598
+ access_token?: string;
2599
+ /** Data format for response. */
2600
+ alt?: string;
2601
+ /** JSONP */
2602
+ callback?: string;
2603
+ /** Selector specifying which fields to include in a partial response. */
2604
+ fields?: string;
2605
+ /** 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. */
2606
+ key?: string;
2607
+ /** Required. The repository's name. */
2608
+ name: string;
2609
+ /** OAuth 2.0 token for the current user. */
2610
+ oauth_token?: string;
2611
+ /** Returns response with indentations and line breaks. */
2612
+ prettyPrint?: boolean;
2613
+ /** 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. */
2614
+ quotaUser?: string;
2615
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2616
+ upload_protocol?: string;
2617
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2618
+ uploadType?: string;
2619
+ },
2620
+ body: CommitRepositoryChangesRequest): Request<{}>;
2621
+ /** Computes a Repository's Git access token status. */
2622
+ computeAccessTokenStatus(request?: {
2623
+ /** V1 error format. */
2624
+ "$.xgafv"?: string;
2625
+ /** OAuth access token. */
2626
+ access_token?: string;
2627
+ /** Data format for response. */
2628
+ alt?: string;
2629
+ /** JSONP */
2630
+ callback?: string;
2631
+ /** Selector specifying which fields to include in a partial response. */
2632
+ fields?: string;
2633
+ /** 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. */
2634
+ key?: string;
2635
+ /** Required. The repository's name. */
2636
+ name: string;
2637
+ /** OAuth 2.0 token for the current user. */
2638
+ oauth_token?: string;
2639
+ /** Returns response with indentations and line breaks. */
2640
+ prettyPrint?: boolean;
2641
+ /** 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. */
2642
+ quotaUser?: string;
2643
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2644
+ upload_protocol?: string;
2645
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2646
+ uploadType?: string;
2647
+ }): Request<ComputeRepositoryAccessTokenStatusResponse>;
2501
2648
  /** Creates a new Repository in a given project and location. */
2502
2649
  create(request: {
2503
2650
  /** V1 error format. */
@@ -2587,6 +2734,40 @@ declare namespace gapi.client {
2587
2734
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2588
2735
  uploadType?: string;
2589
2736
  }): Request<{}>;
2737
+ /** Fetches a Repository's history of commits. The Repository must not have a value for `git_remote_settings.url`. */
2738
+ fetchHistory(request?: {
2739
+ /** V1 error format. */
2740
+ "$.xgafv"?: string;
2741
+ /** OAuth access token. */
2742
+ access_token?: string;
2743
+ /** Data format for response. */
2744
+ alt?: string;
2745
+ /** JSONP */
2746
+ callback?: string;
2747
+ /** Selector specifying which fields to include in a partial response. */
2748
+ fields?: string;
2749
+ /** 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. */
2750
+ key?: string;
2751
+ /** Required. The repository's name. */
2752
+ name: string;
2753
+ /** OAuth 2.0 token for the current user. */
2754
+ oauth_token?: string;
2755
+ /** Optional. Maximum number of commits to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. */
2756
+ pageSize?: number;
2757
+ /**
2758
+ * Optional. Page token received from a previous `FetchRepositoryHistory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
2759
+ * `FetchRepositoryHistory` must match the call that provided the page token.
2760
+ */
2761
+ pageToken?: string;
2762
+ /** Returns response with indentations and line breaks. */
2763
+ prettyPrint?: boolean;
2764
+ /** 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. */
2765
+ quotaUser?: string;
2766
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2767
+ upload_protocol?: string;
2768
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2769
+ uploadType?: string;
2770
+ }): Request<FetchRepositoryHistoryResponse>;
2590
2771
  /** Fetches a Repository's remote branches. */
2591
2772
  fetchRemoteBranches(request?: {
2592
2773
  /** V1 error format. */
@@ -2777,6 +2958,75 @@ declare namespace gapi.client {
2777
2958
  uploadType?: string;
2778
2959
  },
2779
2960
  body: Repository): Request<Repository>;
2961
+ /** Returns the contents of a given Repository directory. The Repository must not have a value for `git_remote_settings.url`. */
2962
+ queryDirectoryContents(request?: {
2963
+ /** V1 error format. */
2964
+ "$.xgafv"?: string;
2965
+ /** OAuth access token. */
2966
+ access_token?: string;
2967
+ /** Data format for response. */
2968
+ alt?: string;
2969
+ /** JSONP */
2970
+ callback?: string;
2971
+ /** Optional. The Commit SHA for the commit to query from. If unset, the directory will be queried from HEAD. */
2972
+ commitSha?: string;
2973
+ /** Selector specifying which fields to include in a partial response. */
2974
+ fields?: string;
2975
+ /** 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. */
2976
+ key?: string;
2977
+ /** Required. The repository's name. */
2978
+ name: string;
2979
+ /** OAuth 2.0 token for the current user. */
2980
+ oauth_token?: string;
2981
+ /** Optional. Maximum number of paths to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. */
2982
+ pageSize?: number;
2983
+ /**
2984
+ * Optional. Page token received from a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters
2985
+ * provided to `QueryRepositoryDirectoryContents` must match the call that provided the page token.
2986
+ */
2987
+ pageToken?: string;
2988
+ /** Optional. The directory's full path including directory name, relative to root. If left unset, the root is used. */
2989
+ path?: string;
2990
+ /** Returns response with indentations and line breaks. */
2991
+ prettyPrint?: boolean;
2992
+ /** 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. */
2993
+ quotaUser?: string;
2994
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2995
+ upload_protocol?: string;
2996
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2997
+ uploadType?: string;
2998
+ }): Request<QueryRepositoryDirectoryContentsResponse>;
2999
+ /** Returns the contents of a file (inside a Repository). The Repository must not have a value for `git_remote_settings.url`. */
3000
+ readFile(request?: {
3001
+ /** V1 error format. */
3002
+ "$.xgafv"?: string;
3003
+ /** OAuth access token. */
3004
+ access_token?: string;
3005
+ /** Data format for response. */
3006
+ alt?: string;
3007
+ /** JSONP */
3008
+ callback?: string;
3009
+ /** Optional. The commit SHA for the commit to read from. If unset, the file will be read from HEAD. */
3010
+ commitSha?: string;
3011
+ /** Selector specifying which fields to include in a partial response. */
3012
+ fields?: string;
3013
+ /** 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. */
3014
+ key?: string;
3015
+ /** Required. The repository's name. */
3016
+ name: string;
3017
+ /** OAuth 2.0 token for the current user. */
3018
+ oauth_token?: string;
3019
+ /** Required. Full file path to read including filename, from repository root. */
3020
+ path?: string;
3021
+ /** Returns response with indentations and line breaks. */
3022
+ prettyPrint?: boolean;
3023
+ /** 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. */
3024
+ quotaUser?: string;
3025
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3026
+ upload_protocol?: string;
3027
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3028
+ uploadType?: string;
3029
+ }): Request<ReadRepositoryFileResponse>;
2780
3030
  /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
2781
3031
  setIamPolicy(request: {
2782
3032
  /** 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.20230225",
3
+ "version": "0.0.20230311",
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: 20230225
6
+ // Revision: 20230311
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -41,6 +41,31 @@ gapi.load('client', async () => {
41
41
  pageSize: 42,
42
42
  pageToken: "Test string",
43
43
  });
44
+ /** Applies a Git commit to a Repository. The Repository must not have a value for `git_remote_settings.url`. */
45
+ await gapi.client.dataform.projects.locations.repositories.commit({
46
+ name: "Test string",
47
+ }, {
48
+ commitMetadata: {
49
+ author: {
50
+ emailAddress: "Test string",
51
+ name: "Test string",
52
+ },
53
+ commitMessage: "Test string",
54
+ },
55
+ fileOperations: {
56
+ A: {
57
+ deleteFile: {
58
+ },
59
+ writeFile: {
60
+ contents: "Test string",
61
+ },
62
+ }
63
+ },
64
+ });
65
+ /** Computes a Repository's Git access token status. */
66
+ await gapi.client.dataform.projects.locations.repositories.computeAccessTokenStatus({
67
+ name: "Test string",
68
+ });
44
69
  /** Creates a new Repository in a given project and location. */
45
70
  await gapi.client.dataform.projects.locations.repositories.create({
46
71
  parent: "Test string",
@@ -52,6 +77,19 @@ gapi.load('client', async () => {
52
77
  tokenStatus: "Test string",
53
78
  url: "Test string",
54
79
  },
80
+ initialCommitFileContents: {
81
+ A: "Test string"
82
+ },
83
+ initialCommitMetadata: {
84
+ author: {
85
+ emailAddress: "Test string",
86
+ name: "Test string",
87
+ },
88
+ commitMessage: "Test string",
89
+ },
90
+ labels: {
91
+ A: "Test string"
92
+ },
55
93
  name: "Test string",
56
94
  npmrcEnvironmentVariablesSecretVersion: "Test string",
57
95
  workspaceCompilationOverrides: {
@@ -65,6 +103,12 @@ gapi.load('client', async () => {
65
103
  force: true,
66
104
  name: "Test string",
67
105
  });
106
+ /** Fetches a Repository's history of commits. The Repository must not have a value for `git_remote_settings.url`. */
107
+ await gapi.client.dataform.projects.locations.repositories.fetchHistory({
108
+ name: "Test string",
109
+ pageSize: 42,
110
+ pageToken: "Test string",
111
+ });
68
112
  /** Fetches a Repository's remote branches. */
69
113
  await gapi.client.dataform.projects.locations.repositories.fetchRemoteBranches({
70
114
  name: "Test string",
@@ -97,6 +141,19 @@ gapi.load('client', async () => {
97
141
  tokenStatus: "Test string",
98
142
  url: "Test string",
99
143
  },
144
+ initialCommitFileContents: {
145
+ A: "Test string"
146
+ },
147
+ initialCommitMetadata: {
148
+ author: {
149
+ emailAddress: "Test string",
150
+ name: "Test string",
151
+ },
152
+ commitMessage: "Test string",
153
+ },
154
+ labels: {
155
+ A: "Test string"
156
+ },
100
157
  name: "Test string",
101
158
  npmrcEnvironmentVariablesSecretVersion: "Test string",
102
159
  workspaceCompilationOverrides: {
@@ -105,6 +162,20 @@ gapi.load('client', async () => {
105
162
  tablePrefix: "Test string",
106
163
  },
107
164
  });
165
+ /** Returns the contents of a given Repository directory. The Repository must not have a value for `git_remote_settings.url`. */
166
+ await gapi.client.dataform.projects.locations.repositories.queryDirectoryContents({
167
+ commitSha: "Test string",
168
+ name: "Test string",
169
+ pageSize: 42,
170
+ pageToken: "Test string",
171
+ path: "Test string",
172
+ });
173
+ /** Returns the contents of a file (inside a Repository). The Repository must not have a value for `git_remote_settings.url`. */
174
+ await gapi.client.dataform.projects.locations.repositories.readFile({
175
+ commitSha: "Test string",
176
+ name: "Test string",
177
+ path: "Test string",
178
+ });
108
179
  /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
109
180
  await gapi.client.dataform.projects.locations.repositories.setIamPolicy({
110
181
  resource: "Test string",