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

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 +220 -1
  2. package/package.json +1 -1
  3. package/tests.ts +68 -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: 20230304
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;
@@ -164,6 +186,9 @@ declare namespace gapi.client {
164
186
  /** 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
187
  relationDescriptor?: RelationDescriptor;
166
188
  }
189
+ // tslint:disable-next-line:no-empty-interface
190
+ interface DeleteFile {
191
+ }
167
192
  interface DirectoryEntry {
168
193
  /** A child directory in the directory. */
169
194
  directory?: string;
@@ -201,6 +226,18 @@ declare namespace gapi.client {
201
226
  /** The remote repository's branch names. */
202
227
  branches?: string[];
203
228
  }
229
+ interface FetchRepositoryHistoryResponse {
230
+ /** A list of commit logs, ordered by 'git log' default order. */
231
+ commits?: CommitLogEntry[];
232
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
233
+ nextPageToken?: string;
234
+ }
235
+ interface FileOperation {
236
+ /** Represents the delete operation. */
237
+ deleteFile?: any;
238
+ /** Represents the write operation. */
239
+ writeFile?: WriteFile;
240
+ }
204
241
  interface GitRemoteSettings {
205
242
  /** 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
243
  authenticationTokenSecretVersion?: string;
@@ -424,6 +461,12 @@ declare namespace gapi.client {
424
461
  /** 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
462
  nextPageToken?: string;
426
463
  }
464
+ interface QueryRepositoryDirectoryContentsResponse {
465
+ /** List of entries in the directory. */
466
+ directoryEntries?: DirectoryEntry[];
467
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
468
+ nextPageToken?: string;
469
+ }
427
470
  interface QueryWorkflowInvocationActionsResponse {
428
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. */
429
472
  nextPageToken?: string;
@@ -434,6 +477,10 @@ declare namespace gapi.client {
434
477
  /** The file's contents. */
435
478
  fileContents?: string;
436
479
  }
480
+ interface ReadRepositoryFileResponse {
481
+ /** The file's contents. */
482
+ contents?: string;
483
+ }
437
484
  interface Relation {
438
485
  /**
439
486
  * Additional options that will be provided as key/value pairs into the options clause of a create table/view statement. See
@@ -512,6 +559,15 @@ declare namespace gapi.client {
512
559
  interface Repository {
513
560
  /** Optional. If set, configures this repository to be linked to a Git remote. */
514
561
  gitRemoteSettings?: GitRemoteSettings;
562
+ /**
563
+ * 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
564
+ * root.
565
+ */
566
+ initialCommitFileContents?: { [P in string]: string };
567
+ /** Optional. Input only. An optional initial commit metadata for the Repository. The Repository must not have a value for `git_remote_settings.url`. */
568
+ initialCommitMetadata?: CommitMetadata;
569
+ /** Optional. Repository user labels. */
570
+ labels?: { [P in string]: string };
515
571
  /** Output only. The repository's name. */
516
572
  name?: string;
517
573
  /**
@@ -650,6 +706,10 @@ declare namespace gapi.client {
650
706
  /** Optional. The prefix that should be prepended to all table names. */
651
707
  tablePrefix?: string;
652
708
  }
709
+ interface WriteFile {
710
+ /** The file's contents. */
711
+ contents?: string;
712
+ }
653
713
  interface WriteFileRequest {
654
714
  /** Required. The file's contents. */
655
715
  contents?: string;
@@ -2498,6 +2558,62 @@ declare namespace gapi.client {
2498
2558
  body: WriteFileRequest): Request<{}>;
2499
2559
  }
2500
2560
  interface RepositoriesResource {
2561
+ /** Applies a Git commit to a Repository. The Repository must not have a value for `git_remote_settings.url`. */
2562
+ commit(request: {
2563
+ /** V1 error format. */
2564
+ "$.xgafv"?: string;
2565
+ /** OAuth access token. */
2566
+ access_token?: string;
2567
+ /** Data format for response. */
2568
+ alt?: string;
2569
+ /** JSONP */
2570
+ callback?: string;
2571
+ /** Selector specifying which fields to include in a partial response. */
2572
+ fields?: string;
2573
+ /** 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. */
2574
+ key?: string;
2575
+ /** Required. The repository's name. */
2576
+ name: string;
2577
+ /** OAuth 2.0 token for the current user. */
2578
+ oauth_token?: string;
2579
+ /** Returns response with indentations and line breaks. */
2580
+ prettyPrint?: boolean;
2581
+ /** 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. */
2582
+ quotaUser?: string;
2583
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2584
+ upload_protocol?: string;
2585
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2586
+ uploadType?: string;
2587
+ /** Request body */
2588
+ resource: CommitRepositoryChangesRequest;
2589
+ }): Request<{}>;
2590
+ commit(request: {
2591
+ /** V1 error format. */
2592
+ "$.xgafv"?: string;
2593
+ /** OAuth access token. */
2594
+ access_token?: string;
2595
+ /** Data format for response. */
2596
+ alt?: string;
2597
+ /** JSONP */
2598
+ callback?: string;
2599
+ /** Selector specifying which fields to include in a partial response. */
2600
+ fields?: string;
2601
+ /** 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. */
2602
+ key?: string;
2603
+ /** Required. The repository's name. */
2604
+ name: string;
2605
+ /** OAuth 2.0 token for the current user. */
2606
+ oauth_token?: string;
2607
+ /** Returns response with indentations and line breaks. */
2608
+ prettyPrint?: boolean;
2609
+ /** 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. */
2610
+ quotaUser?: string;
2611
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2612
+ upload_protocol?: string;
2613
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2614
+ uploadType?: string;
2615
+ },
2616
+ body: CommitRepositoryChangesRequest): Request<{}>;
2501
2617
  /** Creates a new Repository in a given project and location. */
2502
2618
  create(request: {
2503
2619
  /** V1 error format. */
@@ -2587,6 +2703,40 @@ declare namespace gapi.client {
2587
2703
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2588
2704
  uploadType?: string;
2589
2705
  }): Request<{}>;
2706
+ /** Fetches a Repository's history of changes. The Repository must not have a value for `git_remote_settings.url`. */
2707
+ fetchHistory(request?: {
2708
+ /** V1 error format. */
2709
+ "$.xgafv"?: string;
2710
+ /** OAuth access token. */
2711
+ access_token?: string;
2712
+ /** Data format for response. */
2713
+ alt?: string;
2714
+ /** JSONP */
2715
+ callback?: string;
2716
+ /** Selector specifying which fields to include in a partial response. */
2717
+ fields?: string;
2718
+ /** 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. */
2719
+ key?: string;
2720
+ /** Required. The repository's name. */
2721
+ name: string;
2722
+ /** OAuth 2.0 token for the current user. */
2723
+ oauth_token?: string;
2724
+ /** Optional. Maximum number of paths to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. */
2725
+ pageSize?: number;
2726
+ /**
2727
+ * Optional. Page token received from a previous `FetchRepositoryHistory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
2728
+ * `FetchRepositoryHistory` must match the call that provided the page token.
2729
+ */
2730
+ pageToken?: string;
2731
+ /** Returns response with indentations and line breaks. */
2732
+ prettyPrint?: boolean;
2733
+ /** 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. */
2734
+ quotaUser?: string;
2735
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2736
+ upload_protocol?: string;
2737
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2738
+ uploadType?: string;
2739
+ }): Request<FetchRepositoryHistoryResponse>;
2590
2740
  /** Fetches a Repository's remote branches. */
2591
2741
  fetchRemoteBranches(request?: {
2592
2742
  /** V1 error format. */
@@ -2777,6 +2927,75 @@ declare namespace gapi.client {
2777
2927
  uploadType?: string;
2778
2928
  },
2779
2929
  body: Repository): Request<Repository>;
2930
+ /** Returns the contents of a given Repository directory. The Repository must not have a value for `git_remote_settings.url`. */
2931
+ queryDirectoryContents(request?: {
2932
+ /** V1 error format. */
2933
+ "$.xgafv"?: string;
2934
+ /** OAuth access token. */
2935
+ access_token?: string;
2936
+ /** Data format for response. */
2937
+ alt?: string;
2938
+ /** JSONP */
2939
+ callback?: string;
2940
+ /** Optional. The Commit SHA for the commit to query from. If unset, the directory will be queried from HEAD. */
2941
+ commitSha?: string;
2942
+ /** Selector specifying which fields to include in a partial response. */
2943
+ fields?: string;
2944
+ /** 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. */
2945
+ key?: string;
2946
+ /** Required. The repository's name. */
2947
+ name: string;
2948
+ /** OAuth 2.0 token for the current user. */
2949
+ oauth_token?: string;
2950
+ /** Optional. Maximum number of paths to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. */
2951
+ pageSize?: number;
2952
+ /**
2953
+ * Optional. Page token received from a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters
2954
+ * provided to `QueryRepositoryDirectoryContents` must match the call that provided the page token.
2955
+ */
2956
+ pageToken?: string;
2957
+ /** Optional. The directory's full path including directory name, relative to root. If left unset, the root is used. */
2958
+ path?: string;
2959
+ /** Returns response with indentations and line breaks. */
2960
+ prettyPrint?: boolean;
2961
+ /** 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. */
2962
+ quotaUser?: string;
2963
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2964
+ upload_protocol?: string;
2965
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2966
+ uploadType?: string;
2967
+ }): Request<QueryRepositoryDirectoryContentsResponse>;
2968
+ /** Returns the contents of a file (inside a Repository). The Repository must not have a value for `git_remote_settings.url`. */
2969
+ readFile(request?: {
2970
+ /** V1 error format. */
2971
+ "$.xgafv"?: string;
2972
+ /** OAuth access token. */
2973
+ access_token?: string;
2974
+ /** Data format for response. */
2975
+ alt?: string;
2976
+ /** JSONP */
2977
+ callback?: string;
2978
+ /** Optional. The commit SHA for the commit to read from. If unset, the file will be read from HEAD. */
2979
+ commitSha?: string;
2980
+ /** Selector specifying which fields to include in a partial response. */
2981
+ fields?: string;
2982
+ /** 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. */
2983
+ key?: string;
2984
+ /** Required. The repository's name. */
2985
+ name: string;
2986
+ /** OAuth 2.0 token for the current user. */
2987
+ oauth_token?: string;
2988
+ /** Required. Full file path to read including filename, from repository root. */
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<ReadRepositoryFileResponse>;
2780
2999
  /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
2781
3000
  setIamPolicy(request: {
2782
3001
  /** 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.20230304",
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: 20230304
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -41,6 +41,27 @@ 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
+ });
44
65
  /** Creates a new Repository in a given project and location. */
45
66
  await gapi.client.dataform.projects.locations.repositories.create({
46
67
  parent: "Test string",
@@ -52,6 +73,19 @@ gapi.load('client', async () => {
52
73
  tokenStatus: "Test string",
53
74
  url: "Test string",
54
75
  },
76
+ initialCommitFileContents: {
77
+ A: "Test string"
78
+ },
79
+ initialCommitMetadata: {
80
+ author: {
81
+ emailAddress: "Test string",
82
+ name: "Test string",
83
+ },
84
+ commitMessage: "Test string",
85
+ },
86
+ labels: {
87
+ A: "Test string"
88
+ },
55
89
  name: "Test string",
56
90
  npmrcEnvironmentVariablesSecretVersion: "Test string",
57
91
  workspaceCompilationOverrides: {
@@ -65,6 +99,12 @@ gapi.load('client', async () => {
65
99
  force: true,
66
100
  name: "Test string",
67
101
  });
102
+ /** Fetches a Repository's history of changes. The Repository must not have a value for `git_remote_settings.url`. */
103
+ await gapi.client.dataform.projects.locations.repositories.fetchHistory({
104
+ name: "Test string",
105
+ pageSize: 42,
106
+ pageToken: "Test string",
107
+ });
68
108
  /** Fetches a Repository's remote branches. */
69
109
  await gapi.client.dataform.projects.locations.repositories.fetchRemoteBranches({
70
110
  name: "Test string",
@@ -97,6 +137,19 @@ gapi.load('client', async () => {
97
137
  tokenStatus: "Test string",
98
138
  url: "Test string",
99
139
  },
140
+ initialCommitFileContents: {
141
+ A: "Test string"
142
+ },
143
+ initialCommitMetadata: {
144
+ author: {
145
+ emailAddress: "Test string",
146
+ name: "Test string",
147
+ },
148
+ commitMessage: "Test string",
149
+ },
150
+ labels: {
151
+ A: "Test string"
152
+ },
100
153
  name: "Test string",
101
154
  npmrcEnvironmentVariablesSecretVersion: "Test string",
102
155
  workspaceCompilationOverrides: {
@@ -105,6 +158,20 @@ gapi.load('client', async () => {
105
158
  tablePrefix: "Test string",
106
159
  },
107
160
  });
161
+ /** Returns the contents of a given Repository directory. The Repository must not have a value for `git_remote_settings.url`. */
162
+ await gapi.client.dataform.projects.locations.repositories.queryDirectoryContents({
163
+ commitSha: "Test string",
164
+ name: "Test string",
165
+ pageSize: 42,
166
+ pageToken: "Test string",
167
+ path: "Test string",
168
+ });
169
+ /** Returns the contents of a file (inside a Repository). The Repository must not have a value for `git_remote_settings.url`. */
170
+ await gapi.client.dataform.projects.locations.repositories.readFile({
171
+ commitSha: "Test string",
172
+ name: "Test string",
173
+ path: "Test string",
174
+ });
108
175
  /** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
109
176
  await gapi.client.dataform.projects.locations.repositories.setIamPolicy({
110
177
  resource: "Test string",