@maxim_mazurok/gapi.client.firebase-v1beta1 0.0.20220811

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/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.firebase-v1beta1",
3
+ "version": "0.0.20220811",
4
+ "description": "TypeScript typings for Firebase Management 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,132 @@
1
+ # TypeScript typings for Firebase Management API v1beta1
2
+
3
+ The Firebase Management API enables programmatic setup and management of Firebase projects, including a project's Firebase resources and Firebase apps.
4
+ For detailed description please check [documentation](https://firebase.google.com).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Firebase Management API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.firebase-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://firebase.googleapis.com/$discovery/rest?version=v1beta1', () => {
29
+ // now we can use:
30
+ // gapi.client.firebase
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('firebase', 'v1beta1', () => {
37
+ // now we can use:
38
+ // gapi.client.firebase
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
+ // View your data across Google Cloud services and see the email address of your Google Account
52
+ 'https://www.googleapis.com/auth/cloud-platform.read-only',
53
+
54
+ // View and administer all your Firebase data and settings
55
+ 'https://www.googleapis.com/auth/firebase',
56
+
57
+ // View all your Firebase data and settings
58
+ 'https://www.googleapis.com/auth/firebase.readonly',
59
+ ],
60
+ immediate = true;
61
+ // ...
62
+
63
+ gapi.auth.authorize(
64
+ { client_id: client_id, scope: scope, immediate: immediate },
65
+ authResult => {
66
+ if (authResult && !authResult.error) {
67
+ /* handle successful authorization */
68
+ } else {
69
+ /* handle authorization error */
70
+ }
71
+ });
72
+ ```
73
+
74
+ After that you can use Firebase Management API resources: <!-- TODO: make this work for multiple namespaces -->
75
+
76
+ ```typescript
77
+
78
+ /*
79
+ Lists each [Google Cloud Platform (GCP) `Project`] (https://cloud.google.com/resource-manager/reference/rest/v1/projects) that can have Firebase resources added to it. A Project will only be listed if: - The caller has sufficient [Google IAM](https://cloud.google.com/iam) permissions to call AddFirebase. - The Project is not already a FirebaseProject. - The Project is not in an Organization which has policies that prevent Firebase resources from being added.
80
+ */
81
+ await gapi.client.firebase.availableProjects.list({ });
82
+
83
+ /*
84
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
85
+ */
86
+ await gapi.client.firebase.operations.get({ name: "name", });
87
+
88
+ /*
89
+ Adds Firebase resources to the specified existing [Google Cloud Platform (GCP) `Project`] (https://cloud.google.com/resource-manager/reference/rest/v1/projects). Since a FirebaseProject is actually also a GCP `Project`, a `FirebaseProject` has the same underlying GCP identifiers (`projectNumber` and `projectId`). This allows for easy interop with Google APIs. The result of this call is an [`Operation`](../../v1beta1/operations). Poll the `Operation` to track the provisioning process by calling GetOperation until [`done`](../../v1beta1/operations#Operation.FIELDS.done) is `true`. When `done` is `true`, the `Operation` has either succeeded or failed. If the `Operation` succeeded, its [`response`](../../v1beta1/operations#Operation.FIELDS.response) is set to a FirebaseProject; if the `Operation` failed, its [`error`](../../v1beta1/operations#Operation.FIELDS.error) is set to a google.rpc.Status. The `Operation` is automatically deleted after completion, so there is no need to call DeleteOperation. This method does not modify any billing account information on the underlying GCP `Project`. To call `AddFirebase`, a project member or service account must have the following permissions (the IAM roles of Editor and Owner contain these permissions): `firebase.projects.update`, `resourcemanager.projects.get`, `serviceusage.services.enable`, and `serviceusage.services.get`.
90
+ */
91
+ await gapi.client.firebase.projects.addFirebase({ project: "project", });
92
+
93
+ /*
94
+ Links the specified FirebaseProject with an existing [Google Analytics account](http://www.google.com/analytics/). Using this call, you can either: - Specify an `analyticsAccountId` to provision a new Google Analytics property within the specified account and associate the new property with the `FirebaseProject`. - Specify an existing `analyticsPropertyId` to associate the property with the `FirebaseProject`. Note that when you call `AddGoogleAnalytics`: 1. The first check determines if any existing data streams in the Google Analytics property correspond to any existing Firebase Apps in the `FirebaseProject` (based on the `packageName` or `bundleId` associated with the data stream). Then, as applicable, the data streams and apps are linked. Note that this auto-linking only applies to `AndroidApps` and `IosApps`. 2. If no corresponding data streams are found for the Firebase Apps, new data streams are provisioned in the Google Analytics property for each of the Firebase Apps. Note that a new data stream is always provisioned for a Web App even if it was previously associated with a data stream in the Analytics property. Learn more about the hierarchy and structure of Google Analytics accounts in the [Analytics documentation](https://support.google.com/analytics/answer/9303323). The result of this call is an [`Operation`](../../v1beta1/operations). Poll the `Operation` to track the provisioning process by calling GetOperation until [`done`](../../v1beta1/operations#Operation.FIELDS.done) is `true`. When `done` is `true`, the `Operation` has either succeeded or failed. If the `Operation` succeeded, its [`response`](../../v1beta1/operations#Operation.FIELDS.response) is set to an AnalyticsDetails; if the `Operation` failed, its [`error`](../../v1beta1/operations#Operation.FIELDS.error) is set to a google.rpc.Status. To call `AddGoogleAnalytics`, a project member must be an Owner for the existing `FirebaseProject` and have the [`Edit` permission](https://support.google.com/analytics/answer/2884495) for the Google Analytics account. If the `FirebaseProject` already has Google Analytics enabled, and you call `AddGoogleAnalytics` using an `analyticsPropertyId` that's different from the currently associated property, then the call will fail. Analytics may have already been enabled in the Firebase console or by specifying `timeZone` and `regionCode` in the call to [`AddFirebase`](../../v1beta1/projects/addFirebase).
95
+ */
96
+ await gapi.client.firebase.projects.addGoogleAnalytics({ parent: "parent", });
97
+
98
+ /*
99
+ Gets the specified FirebaseProject.
100
+ */
101
+ await gapi.client.firebase.projects.get({ name: "name", });
102
+
103
+ /*
104
+ Gets the configuration artifact associated with the specified FirebaseProject, which can be used by servers to simplify initialization. Typically, this configuration is used with the Firebase Admin SDK [initializeApp](https://firebase.google.com/docs/admin/setup#initialize_the_sdk) command.
105
+ */
106
+ await gapi.client.firebase.projects.getAdminSdkConfig({ name: "name", });
107
+
108
+ /*
109
+ Gets the Google Analytics details currently associated with the specified FirebaseProject. If the `FirebaseProject` is not yet linked to Google Analytics, then the response to `GetAnalyticsDetails` is `NOT_FOUND`.
110
+ */
111
+ await gapi.client.firebase.projects.getAnalyticsDetails({ name: "name", });
112
+
113
+ /*
114
+ Lists each FirebaseProject accessible to the caller. The elements are returned in no particular order, but they will be a consistent view of the Projects when additional requests are made with a `pageToken`. This method is eventually consistent with Project mutations, which means newly provisioned Projects and recent modifications to existing Projects might not be reflected in the set of Projects. The list will include only ACTIVE Projects. Use GetFirebaseProject for consistent reads as well as for additional Project details.
115
+ */
116
+ await gapi.client.firebase.projects.list({ });
117
+
118
+ /*
119
+ Updates the attributes of the specified FirebaseProject. All [query parameters](#query-parameters) are required.
120
+ */
121
+ await gapi.client.firebase.projects.patch({ name: "name", });
122
+
123
+ /*
124
+ Unlinks the specified FirebaseProject from its Google Analytics account. This call removes the association of the specified `FirebaseProject` with its current Google Analytics property. However, this call does not delete the Google Analytics resources, such as the Google Analytics property or any data streams. These resources may be re-associated later to the `FirebaseProject` by calling [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics) and specifying the same `analyticsPropertyId`. For Android Apps and iOS Apps, this call re-links data streams with their corresponding apps. However, for Web Apps, this call provisions a *new* data stream for each Web App. To call `RemoveAnalytics`, a project member must be an Owner for the `FirebaseProject`.
125
+ */
126
+ await gapi.client.firebase.projects.removeAnalytics({ parent: "parent", });
127
+
128
+ /*
129
+ Lists all available Apps for the specified FirebaseProject. This is a convenience method. Typically, interaction with an App should be done using the platform-specific service, but some tool use-cases require a summary of all known Apps (such as for App selector interfaces).
130
+ */
131
+ await gapi.client.firebase.projects.searchApps({ parent: "parent", });
132
+ ```
package/tests.ts ADDED
@@ -0,0 +1,392 @@
1
+ /* This is stub file for gapi.client.firebase-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: 20220811
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://firebase.googleapis.com/$discovery/rest?version=v1beta1');
12
+ /** now we can use gapi.client.firebase */
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
+ /** View your data across Google Cloud services and see the email address of your Google Account */
21
+ 'https://www.googleapis.com/auth/cloud-platform.read-only',
22
+ /** View and administer all your Firebase data and settings */
23
+ 'https://www.googleapis.com/auth/firebase',
24
+ /** View all your Firebase data and settings */
25
+ 'https://www.googleapis.com/auth/firebase.readonly',
26
+ ];
27
+ const immediate = false;
28
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
29
+ if (authResult && !authResult.error) {
30
+ /** handle successful authorization */
31
+ run();
32
+ } else {
33
+ /** handle authorization error */
34
+ }
35
+ });
36
+
37
+ async function run() {
38
+ /**
39
+ * Lists each [Google Cloud Platform (GCP) `Project`] (https://cloud.google.com/resource-manager/reference/rest/v1/projects) that can have Firebase resources added to it. A Project will
40
+ * only be listed if: - The caller has sufficient [Google IAM](https://cloud.google.com/iam) permissions to call AddFirebase. - The Project is not already a FirebaseProject. - The Project
41
+ * is not in an Organization which has policies that prevent Firebase resources from being added.
42
+ */
43
+ await gapi.client.firebase.availableProjects.list({
44
+ pageSize: 42,
45
+ pageToken: "Test string",
46
+ });
47
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
48
+ await gapi.client.firebase.operations.get({
49
+ name: "Test string",
50
+ });
51
+ /**
52
+ * Adds Firebase resources to the specified existing [Google Cloud Platform (GCP) `Project`] (https://cloud.google.com/resource-manager/reference/rest/v1/projects). Since a FirebaseProject
53
+ * is actually also a GCP `Project`, a `FirebaseProject` has the same underlying GCP identifiers (`projectNumber` and `projectId`). This allows for easy interop with Google APIs. The
54
+ * result of this call is an [`Operation`](../../v1beta1/operations). Poll the `Operation` to track the provisioning process by calling GetOperation until
55
+ * [`done`](../../v1beta1/operations#Operation.FIELDS.done) is `true`. When `done` is `true`, the `Operation` has either succeeded or failed. If the `Operation` succeeded, its
56
+ * [`response`](../../v1beta1/operations#Operation.FIELDS.response) is set to a FirebaseProject; if the `Operation` failed, its [`error`](../../v1beta1/operations#Operation.FIELDS.error)
57
+ * is set to a google.rpc.Status. The `Operation` is automatically deleted after completion, so there is no need to call DeleteOperation. This method does not modify any billing account
58
+ * information on the underlying GCP `Project`. To call `AddFirebase`, a project member or service account must have the following permissions (the IAM roles of Editor and Owner contain
59
+ * these permissions): `firebase.projects.update`, `resourcemanager.projects.get`, `serviceusage.services.enable`, and `serviceusage.services.get`.
60
+ */
61
+ await gapi.client.firebase.projects.addFirebase({
62
+ project: "Test string",
63
+ }, {
64
+ locationId: "Test string",
65
+ });
66
+ /**
67
+ * Links the specified FirebaseProject with an existing [Google Analytics account](http://www.google.com/analytics/). Using this call, you can either: - Specify an `analyticsAccountId` to
68
+ * provision a new Google Analytics property within the specified account and associate the new property with the `FirebaseProject`. - Specify an existing `analyticsPropertyId` to
69
+ * associate the property with the `FirebaseProject`. Note that when you call `AddGoogleAnalytics`: 1. The first check determines if any existing data streams in the Google Analytics
70
+ * property correspond to any existing Firebase Apps in the `FirebaseProject` (based on the `packageName` or `bundleId` associated with the data stream). Then, as applicable, the data
71
+ * streams and apps are linked. Note that this auto-linking only applies to `AndroidApps` and `IosApps`. 2. If no corresponding data streams are found for the Firebase Apps, new data
72
+ * streams are provisioned in the Google Analytics property for each of the Firebase Apps. Note that a new data stream is always provisioned for a Web App even if it was previously
73
+ * associated with a data stream in the Analytics property. Learn more about the hierarchy and structure of Google Analytics accounts in the [Analytics
74
+ * documentation](https://support.google.com/analytics/answer/9303323). The result of this call is an [`Operation`](../../v1beta1/operations). Poll the `Operation` to track the
75
+ * provisioning process by calling GetOperation until [`done`](../../v1beta1/operations#Operation.FIELDS.done) is `true`. When `done` is `true`, the `Operation` has either succeeded or
76
+ * failed. If the `Operation` succeeded, its [`response`](../../v1beta1/operations#Operation.FIELDS.response) is set to an AnalyticsDetails; if the `Operation` failed, its
77
+ * [`error`](../../v1beta1/operations#Operation.FIELDS.error) is set to a google.rpc.Status. To call `AddGoogleAnalytics`, a project member must be an Owner for the existing
78
+ * `FirebaseProject` and have the [`Edit` permission](https://support.google.com/analytics/answer/2884495) for the Google Analytics account. If the `FirebaseProject` already has Google
79
+ * Analytics enabled, and you call `AddGoogleAnalytics` using an `analyticsPropertyId` that's different from the currently associated property, then the call will fail. Analytics may have
80
+ * already been enabled in the Firebase console or by specifying `timeZone` and `regionCode` in the call to [`AddFirebase`](../../v1beta1/projects/addFirebase).
81
+ */
82
+ await gapi.client.firebase.projects.addGoogleAnalytics({
83
+ parent: "Test string",
84
+ }, {
85
+ analyticsAccountId: "Test string",
86
+ analyticsPropertyId: "Test string",
87
+ });
88
+ /** Gets the specified FirebaseProject. */
89
+ await gapi.client.firebase.projects.get({
90
+ name: "Test string",
91
+ });
92
+ /**
93
+ * Gets the configuration artifact associated with the specified FirebaseProject, which can be used by servers to simplify initialization. Typically, this configuration is used with the
94
+ * Firebase Admin SDK [initializeApp](https://firebase.google.com/docs/admin/setup#initialize_the_sdk) command.
95
+ */
96
+ await gapi.client.firebase.projects.getAdminSdkConfig({
97
+ name: "Test string",
98
+ });
99
+ /**
100
+ * Gets the Google Analytics details currently associated with the specified FirebaseProject. If the `FirebaseProject` is not yet linked to Google Analytics, then the response to
101
+ * `GetAnalyticsDetails` is `NOT_FOUND`.
102
+ */
103
+ await gapi.client.firebase.projects.getAnalyticsDetails({
104
+ name: "Test string",
105
+ });
106
+ /**
107
+ * Lists each FirebaseProject accessible to the caller. The elements are returned in no particular order, but they will be a consistent view of the Projects when additional requests are
108
+ * made with a `pageToken`. This method is eventually consistent with Project mutations, which means newly provisioned Projects and recent modifications to existing Projects might not be
109
+ * reflected in the set of Projects. The list will include only ACTIVE Projects. Use GetFirebaseProject for consistent reads as well as for additional Project details.
110
+ */
111
+ await gapi.client.firebase.projects.list({
112
+ pageSize: 42,
113
+ pageToken: "Test string",
114
+ });
115
+ /** Updates the attributes of the specified FirebaseProject. All [query parameters](#query-parameters) are required. */
116
+ await gapi.client.firebase.projects.patch({
117
+ name: "Test string",
118
+ updateMask: "Test string",
119
+ }, {
120
+ annotations: {
121
+ A: "Test string"
122
+ },
123
+ displayName: "Test string",
124
+ etag: "Test string",
125
+ name: "Test string",
126
+ projectId: "Test string",
127
+ projectNumber: "Test string",
128
+ resources: {
129
+ hostingSite: "Test string",
130
+ locationId: "Test string",
131
+ realtimeDatabaseInstance: "Test string",
132
+ storageBucket: "Test string",
133
+ },
134
+ state: "Test string",
135
+ });
136
+ /**
137
+ * Unlinks the specified FirebaseProject from its Google Analytics account. This call removes the association of the specified `FirebaseProject` with its current Google Analytics property.
138
+ * However, this call does not delete the Google Analytics resources, such as the Google Analytics property or any data streams. These resources may be re-associated later to the
139
+ * `FirebaseProject` by calling [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics) and specifying the same `analyticsPropertyId`. For Android Apps and iOS Apps, this call
140
+ * re-links data streams with their corresponding apps. However, for Web Apps, this call provisions a *new* data stream for each Web App. To call `RemoveAnalytics`, a project member must
141
+ * be an Owner for the `FirebaseProject`.
142
+ */
143
+ await gapi.client.firebase.projects.removeAnalytics({
144
+ parent: "Test string",
145
+ }, {
146
+ analyticsPropertyId: "Test string",
147
+ });
148
+ /**
149
+ * Lists all available Apps for the specified FirebaseProject. This is a convenience method. Typically, interaction with an App should be done using the platform-specific service, but some
150
+ * tool use-cases require a summary of all known Apps (such as for App selector interfaces).
151
+ */
152
+ await gapi.client.firebase.projects.searchApps({
153
+ filter: "Test string",
154
+ pageSize: 42,
155
+ pageToken: "Test string",
156
+ parent: "Test string",
157
+ showDeleted: true,
158
+ });
159
+ /**
160
+ * Requests the creation of a new AndroidApp in the specified FirebaseProject. The result of this call is an `Operation` which can be used to track the provisioning process. The
161
+ * `Operation` is automatically deleted after completion, so there is no need to call `DeleteOperation`.
162
+ */
163
+ await gapi.client.firebase.projects.androidApps.create({
164
+ parent: "Test string",
165
+ }, {
166
+ apiKeyId: "Test string",
167
+ appId: "Test string",
168
+ displayName: "Test string",
169
+ name: "Test string",
170
+ packageName: "Test string",
171
+ projectId: "Test string",
172
+ sha1Hashes: [
173
+ "Test string"
174
+ ],
175
+ sha256Hashes: [
176
+ "Test string"
177
+ ],
178
+ state: "Test string",
179
+ });
180
+ /** Gets the specified AndroidApp. */
181
+ await gapi.client.firebase.projects.androidApps.get({
182
+ name: "Test string",
183
+ });
184
+ /** Gets the configuration artifact associated with the specified AndroidApp. */
185
+ await gapi.client.firebase.projects.androidApps.getConfig({
186
+ name: "Test string",
187
+ });
188
+ /**
189
+ * Lists each AndroidApp associated with the specified FirebaseProject. The elements are returned in no particular order, but will be a consistent view of the Apps when additional requests
190
+ * are made with a `pageToken`.
191
+ */
192
+ await gapi.client.firebase.projects.androidApps.list({
193
+ pageSize: 42,
194
+ pageToken: "Test string",
195
+ parent: "Test string",
196
+ showDeleted: true,
197
+ });
198
+ /** Updates the attributes of the specified AndroidApp. */
199
+ await gapi.client.firebase.projects.androidApps.patch({
200
+ name: "Test string",
201
+ updateMask: "Test string",
202
+ }, {
203
+ apiKeyId: "Test string",
204
+ appId: "Test string",
205
+ displayName: "Test string",
206
+ name: "Test string",
207
+ packageName: "Test string",
208
+ projectId: "Test string",
209
+ sha1Hashes: [
210
+ "Test string"
211
+ ],
212
+ sha256Hashes: [
213
+ "Test string"
214
+ ],
215
+ state: "Test string",
216
+ });
217
+ /** Removes the specified AndroidApp from the project. */
218
+ await gapi.client.firebase.projects.androidApps.remove({
219
+ name: "Test string",
220
+ }, {
221
+ allowMissing: true,
222
+ etag: "Test string",
223
+ validateOnly: true,
224
+ });
225
+ /** Adds a ShaCertificate to the specified AndroidApp. */
226
+ await gapi.client.firebase.projects.androidApps.sha.create({
227
+ parent: "Test string",
228
+ }, {
229
+ certType: "Test string",
230
+ name: "Test string",
231
+ shaHash: "Test string",
232
+ });
233
+ /** Removes a ShaCertificate from the specified AndroidApp. */
234
+ await gapi.client.firebase.projects.androidApps.sha.delete({
235
+ name: "Test string",
236
+ });
237
+ /** Lists the SHA-1 and SHA-256 certificates for the specified AndroidApp. */
238
+ await gapi.client.firebase.projects.androidApps.sha.list({
239
+ parent: "Test string",
240
+ });
241
+ /**
242
+ * Lists the valid Google Cloud Platform (GCP) resource locations for the specified Project (including a FirebaseProject). One of these locations can be selected as the Project's
243
+ * [_default_ GCP resource location](https://firebase.google.com/docs/projects/locations), which is the geographical location where the Project's resources, such as Cloud Firestore, will
244
+ * be provisioned by default. However, if the default GCP resource location has already been set for the Project, then this setting cannot be changed. This call checks for any possible
245
+ * [location restrictions](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations) for the specified Project and, thus, might return a subset of all possible
246
+ * GCP resource locations. To list all GCP resource locations (regardless of any restrictions), call the endpoint without specifying a unique project identifier (that is,
247
+ * `/v1beta1/{parent=projects/-}/listAvailableLocations`). To call `ListAvailableLocations` with a specified project, a member must be at minimum a Viewer of the Project. Calls without a
248
+ * specified project do not require any specific project permissions.
249
+ */
250
+ await gapi.client.firebase.projects.availableLocations.list({
251
+ pageSize: 42,
252
+ pageToken: "Test string",
253
+ parent: "Test string",
254
+ });
255
+ /**
256
+ * Sets the default Google Cloud Platform (GCP) resource location for the specified FirebaseProject. This method creates an App Engine application with a [default Cloud Storage
257
+ * bucket](https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/setting-up-cloud-storage#activating_a_cloud_storage_bucket), located in the specified
258
+ * [`locationId`](#body.request_body.FIELDS.location_id). This location must be one of the available [GCP resource locations](https://firebase.google.com/docs/projects/locations). After
259
+ * the default GCP resource location is finalized, or if it was already set, it cannot be changed. The default GCP resource location for the specified `FirebaseProject` might already be
260
+ * set because either the underlying GCP `Project` already has an App Engine application or `FinalizeDefaultLocation` was previously called with a specified `locationId`. Any new calls to
261
+ * `FinalizeDefaultLocation` with a *different* specified `locationId` will return a 409 error. The result of this call is an [`Operation`](../../v1beta1/operations), which can be used to
262
+ * track the provisioning process. The [`response`](../../v1beta1/operations#Operation.FIELDS.response) type of the `Operation` is google.protobuf.Empty. The `Operation` can be polled by
263
+ * its `name` using GetOperation until `done` is true. When `done` is true, the `Operation` has either succeeded or failed. If the `Operation` has succeeded, its
264
+ * [`response`](../../v1beta1/operations#Operation.FIELDS.response) will be set to a google.protobuf.Empty; if the `Operation` has failed, its `error` will be set to a google.rpc.Status.
265
+ * The `Operation` is automatically deleted after completion, so there is no need to call DeleteOperation. All fields listed in the [request body](#request-body) are required. To call
266
+ * `FinalizeDefaultLocation`, a member must be an Owner of the Project.
267
+ */
268
+ await gapi.client.firebase.projects.defaultLocation.finalize({
269
+ parent: "Test string",
270
+ }, {
271
+ locationId: "Test string",
272
+ });
273
+ /**
274
+ * Requests the creation of a new IosApp in the specified FirebaseProject. The result of this call is an `Operation` which can be used to track the provisioning process. The `Operation` is
275
+ * automatically deleted after completion, so there is no need to call `DeleteOperation`.
276
+ */
277
+ await gapi.client.firebase.projects.iosApps.create({
278
+ parent: "Test string",
279
+ }, {
280
+ apiKeyId: "Test string",
281
+ appId: "Test string",
282
+ appStoreId: "Test string",
283
+ bundleId: "Test string",
284
+ displayName: "Test string",
285
+ name: "Test string",
286
+ projectId: "Test string",
287
+ state: "Test string",
288
+ teamId: "Test string",
289
+ });
290
+ /** Gets the specified IosApp. */
291
+ await gapi.client.firebase.projects.iosApps.get({
292
+ name: "Test string",
293
+ });
294
+ /** Gets the configuration artifact associated with the specified IosApp. */
295
+ await gapi.client.firebase.projects.iosApps.getConfig({
296
+ name: "Test string",
297
+ });
298
+ /**
299
+ * Lists each IosApp associated with the specified FirebaseProject. The elements are returned in no particular order, but will be a consistent view of the Apps when additional requests are
300
+ * made with a `pageToken`.
301
+ */
302
+ await gapi.client.firebase.projects.iosApps.list({
303
+ pageSize: 42,
304
+ pageToken: "Test string",
305
+ parent: "Test string",
306
+ showDeleted: true,
307
+ });
308
+ /** Updates the attributes of the specified IosApp. */
309
+ await gapi.client.firebase.projects.iosApps.patch({
310
+ name: "Test string",
311
+ updateMask: "Test string",
312
+ }, {
313
+ apiKeyId: "Test string",
314
+ appId: "Test string",
315
+ appStoreId: "Test string",
316
+ bundleId: "Test string",
317
+ displayName: "Test string",
318
+ name: "Test string",
319
+ projectId: "Test string",
320
+ state: "Test string",
321
+ teamId: "Test string",
322
+ });
323
+ /** Removes the specified IosApp from the project. */
324
+ await gapi.client.firebase.projects.iosApps.remove({
325
+ name: "Test string",
326
+ }, {
327
+ allowMissing: true,
328
+ etag: "Test string",
329
+ validateOnly: true,
330
+ });
331
+ /**
332
+ * Requests the creation of a new WebApp in the specified FirebaseProject. The result of this call is an `Operation` which can be used to track the provisioning process. The `Operation` is
333
+ * automatically deleted after completion, so there is no need to call `DeleteOperation`.
334
+ */
335
+ await gapi.client.firebase.projects.webApps.create({
336
+ parent: "Test string",
337
+ }, {
338
+ apiKeyId: "Test string",
339
+ appId: "Test string",
340
+ appUrls: [
341
+ "Test string"
342
+ ],
343
+ displayName: "Test string",
344
+ name: "Test string",
345
+ projectId: "Test string",
346
+ state: "Test string",
347
+ webId: "Test string",
348
+ });
349
+ /** Gets the specified WebApp. */
350
+ await gapi.client.firebase.projects.webApps.get({
351
+ name: "Test string",
352
+ });
353
+ /** Gets the configuration artifact associated with the specified WebApp. */
354
+ await gapi.client.firebase.projects.webApps.getConfig({
355
+ name: "Test string",
356
+ });
357
+ /**
358
+ * Lists each WebApp associated with the specified FirebaseProject. The elements are returned in no particular order, but will be a consistent view of the Apps when additional requests are
359
+ * made with a `pageToken`.
360
+ */
361
+ await gapi.client.firebase.projects.webApps.list({
362
+ pageSize: 42,
363
+ pageToken: "Test string",
364
+ parent: "Test string",
365
+ showDeleted: true,
366
+ });
367
+ /** Updates the attributes of the specified WebApp. */
368
+ await gapi.client.firebase.projects.webApps.patch({
369
+ name: "Test string",
370
+ updateMask: "Test string",
371
+ }, {
372
+ apiKeyId: "Test string",
373
+ appId: "Test string",
374
+ appUrls: [
375
+ "Test string"
376
+ ],
377
+ displayName: "Test string",
378
+ name: "Test string",
379
+ projectId: "Test string",
380
+ state: "Test string",
381
+ webId: "Test string",
382
+ });
383
+ /** Removes the specified WebApp from the project. */
384
+ await gapi.client.firebase.projects.webApps.remove({
385
+ name: "Test string",
386
+ }, {
387
+ allowMissing: true,
388
+ etag: "Test string",
389
+ validateOnly: true,
390
+ });
391
+ }
392
+ });
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
+ }
package/tslint.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "dtslint/dtslint.json",
3
+ "rules": {
4
+ "no-redundant-jsdoc": false
5
+ }
6
+ }