@maxim_mazurok/gapi.client.firebaseml-v1beta2 0.0.20220810

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,399 @@
1
+ /* Type definitions for non-npm package Firebase ML API v1beta2 0.0 */
2
+ // Project: https://firebase.google.com
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://firebaseml.googleapis.com/$discovery/rest?version=v1beta2
13
+ // Revision: 20220810
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Firebase ML API v1beta2 */
19
+ function load(urlOrObject: "https://firebaseml.googleapis.com/$discovery/rest?version=v1beta2"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "firebaseml", version: "v1beta2"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "firebaseml", version: "v1beta2", callback: () => any): void;
24
+
25
+ namespace firebaseml {
26
+ interface DownloadModelResponse {
27
+ /** Output only. A download URI for the model/zip file. */
28
+ downloadUri?: string;
29
+ /** Output only. The time that the download URI link expires. If the link has expired, the REST call must be repeated. */
30
+ expireTime?: string;
31
+ /** Output only. The format of the model being downloaded. */
32
+ modelFormat?: string;
33
+ /** Output only. The size of the file(s), if this information is available. */
34
+ sizeBytes?: string;
35
+ }
36
+ // tslint:disable-next-line:no-empty-interface
37
+ interface Empty {
38
+ }
39
+ interface ListModelsResponse {
40
+ /** The list of models */
41
+ models?: Model[];
42
+ /** Token to retrieve the next page of results, or empty if there are no more results in the list. */
43
+ nextPageToken?: string;
44
+ }
45
+ interface Model {
46
+ /** Output only. Lists operation ids associated with this model whose status is NOT done. */
47
+ activeOperations?: Operation[];
48
+ /** Output only. Timestamp when this model was created in Firebase ML. */
49
+ createTime?: string;
50
+ /**
51
+ * Required. The name of the model to create. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores(_) and ASCII digits 0-9. It
52
+ * must start with a letter.
53
+ */
54
+ displayName?: string;
55
+ /** Output only. See RFC7232 https://tools.ietf.org/html/rfc7232#section-2.3 */
56
+ etag?: string;
57
+ /** Output only. The model_hash will change if a new file is available for download. */
58
+ modelHash?: string;
59
+ /** The resource name of the Model. Model names have the form `projects/{project_id}/models/{model_id}` The name is ignored when creating a model. */
60
+ name?: string;
61
+ /** State common to all model types. Includes publishing and validation information. */
62
+ state?: ModelState;
63
+ /** User defined tags which can be used to group/filter models during listing */
64
+ tags?: string[];
65
+ /** A TFLite Model */
66
+ tfliteModel?: TfLiteModel;
67
+ /** Output only. Timestamp when this model was updated in Firebase ML. */
68
+ updateTime?: string;
69
+ }
70
+ interface ModelOperationMetadata {
71
+ basicOperationStatus?: string;
72
+ /** The name of the model we are creating/updating The name must have the form `projects/{project_id}/models/{model_id}` */
73
+ name?: string;
74
+ }
75
+ interface ModelState {
76
+ /** Indicates if this model has been published. */
77
+ published?: boolean;
78
+ /**
79
+ * Output only. Indicates the latest validation error on the model if any. A model may have validation errors if there were problems during the model creation/update. e.g. in the case
80
+ * of a TfLiteModel, if a tflite model file was missing or in the wrong format. This field will be empty for valid models.
81
+ */
82
+ validationError?: Status;
83
+ }
84
+ interface Operation {
85
+ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
86
+ done?: boolean;
87
+ /** The error result of the operation in case of failure or cancellation. */
88
+ error?: Status;
89
+ /**
90
+ * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such
91
+ * metadata. Any method that returns a long-running operation should document the metadata type, if any.
92
+ */
93
+ metadata?: { [P in string]: any };
94
+ /**
95
+ * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending
96
+ * with `operations/{unique_id}`.
97
+ */
98
+ name?: string;
99
+ /**
100
+ * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the
101
+ * original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the
102
+ * original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
103
+ */
104
+ response?: { [P in string]: any };
105
+ }
106
+ interface Status {
107
+ /** The status code, which should be an enum value of google.rpc.Code. */
108
+ code?: number;
109
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
110
+ details?: Array<{ [P in string]: any }>;
111
+ /**
112
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
113
+ * client.
114
+ */
115
+ message?: string;
116
+ }
117
+ interface TfLiteModel {
118
+ /**
119
+ * The AutoML model id referencing a model you created with the AutoML API. The name should have format 'projects//locations//models/' (This is the model resource name returned from
120
+ * the AutoML API)
121
+ */
122
+ automlModel?: string;
123
+ /**
124
+ * The TfLite file containing the model. (Stored in Google Cloud). The gcs_tflite_uri should have form: gs://some-bucket/some-model.tflite Note: If you update the file in the original
125
+ * location, it is necessary to call UpdateModel for ML to pick up and validate the updated file.
126
+ */
127
+ gcsTfliteUri?: string;
128
+ /** Output only. The size of the TFLite model */
129
+ sizeBytes?: string;
130
+ }
131
+ interface ModelsResource {
132
+ /** Creates a model in Firebase ML. The longrunning operation will eventually return a Model */
133
+ create(request: {
134
+ /** V1 error format. */
135
+ "$.xgafv"?: string;
136
+ /** OAuth access token. */
137
+ access_token?: string;
138
+ /** Data format for response. */
139
+ alt?: string;
140
+ /** JSONP */
141
+ callback?: string;
142
+ /** Selector specifying which fields to include in a partial response. */
143
+ fields?: string;
144
+ /** 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. */
145
+ key?: string;
146
+ /** OAuth 2.0 token for the current user. */
147
+ oauth_token?: string;
148
+ /** Required. The parent project resource where the model is to be created. The parent must have the form `projects/{project_id}` */
149
+ parent: string;
150
+ /** Returns response with indentations and line breaks. */
151
+ prettyPrint?: boolean;
152
+ /** 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. */
153
+ quotaUser?: string;
154
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
155
+ upload_protocol?: string;
156
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
157
+ uploadType?: string;
158
+ /** Request body */
159
+ resource: Model;
160
+ }): Request<Operation>;
161
+ create(request: {
162
+ /** V1 error format. */
163
+ "$.xgafv"?: string;
164
+ /** OAuth access token. */
165
+ access_token?: string;
166
+ /** Data format for response. */
167
+ alt?: string;
168
+ /** JSONP */
169
+ callback?: string;
170
+ /** Selector specifying which fields to include in a partial response. */
171
+ fields?: string;
172
+ /** 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. */
173
+ key?: string;
174
+ /** OAuth 2.0 token for the current user. */
175
+ oauth_token?: string;
176
+ /** Required. The parent project resource where the model is to be created. The parent must have the form `projects/{project_id}` */
177
+ parent: string;
178
+ /** Returns response with indentations and line breaks. */
179
+ prettyPrint?: boolean;
180
+ /** 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. */
181
+ quotaUser?: string;
182
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
183
+ upload_protocol?: string;
184
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
185
+ uploadType?: string;
186
+ },
187
+ body: Model): Request<Operation>;
188
+ /** Deletes a model */
189
+ delete(request?: {
190
+ /** V1 error format. */
191
+ "$.xgafv"?: string;
192
+ /** OAuth access token. */
193
+ access_token?: string;
194
+ /** Data format for response. */
195
+ alt?: string;
196
+ /** JSONP */
197
+ callback?: string;
198
+ /** Selector specifying which fields to include in a partial response. */
199
+ fields?: string;
200
+ /** 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. */
201
+ key?: string;
202
+ /** Required. The name of the model to delete. The name must have the form `projects/{project_id}/models/{model_id}` */
203
+ name: string;
204
+ /** OAuth 2.0 token for the current user. */
205
+ oauth_token?: string;
206
+ /** Returns response with indentations and line breaks. */
207
+ prettyPrint?: boolean;
208
+ /** 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. */
209
+ quotaUser?: string;
210
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
211
+ upload_protocol?: string;
212
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
213
+ uploadType?: string;
214
+ }): Request<{}>;
215
+ /** Gets Download information for a model. This is meant for downloading model resources onto devices. It gives very limited information about the model. */
216
+ download(request?: {
217
+ /** V1 error format. */
218
+ "$.xgafv"?: string;
219
+ /** OAuth access token. */
220
+ access_token?: string;
221
+ /** Data format for response. */
222
+ alt?: string;
223
+ /** JSONP */
224
+ callback?: string;
225
+ /** Selector specifying which fields to include in a partial response. */
226
+ fields?: string;
227
+ /** 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. */
228
+ key?: string;
229
+ /** Required. The name of the model to download. The name must have the form `projects/{project}/models/{model}` */
230
+ name: string;
231
+ /** OAuth 2.0 token for the current user. */
232
+ oauth_token?: string;
233
+ /** Returns response with indentations and line breaks. */
234
+ prettyPrint?: boolean;
235
+ /** 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. */
236
+ quotaUser?: string;
237
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
238
+ upload_protocol?: string;
239
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
240
+ uploadType?: string;
241
+ }): Request<DownloadModelResponse>;
242
+ /** Gets a model resource. */
243
+ get(request?: {
244
+ /** V1 error format. */
245
+ "$.xgafv"?: string;
246
+ /** OAuth access token. */
247
+ access_token?: string;
248
+ /** Data format for response. */
249
+ alt?: string;
250
+ /** JSONP */
251
+ callback?: string;
252
+ /** Selector specifying which fields to include in a partial response. */
253
+ fields?: string;
254
+ /** 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. */
255
+ key?: string;
256
+ /** Required. The name of the model to get. The name must have the form `projects/{project_id}/models/{model_id}` */
257
+ name: string;
258
+ /** OAuth 2.0 token for the current user. */
259
+ oauth_token?: string;
260
+ /** Returns response with indentations and line breaks. */
261
+ prettyPrint?: boolean;
262
+ /** 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. */
263
+ quotaUser?: string;
264
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
265
+ upload_protocol?: string;
266
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
267
+ uploadType?: string;
268
+ }): Request<Model>;
269
+ /** Lists the models */
270
+ list(request?: {
271
+ /** V1 error format. */
272
+ "$.xgafv"?: string;
273
+ /** OAuth access token. */
274
+ access_token?: string;
275
+ /** Data format for response. */
276
+ alt?: string;
277
+ /** JSONP */
278
+ callback?: string;
279
+ /** Selector specifying which fields to include in a partial response. */
280
+ fields?: string;
281
+ /** A filter for the list e.g. 'tags: abc' to list models which are tagged with "abc" */
282
+ filter?: string;
283
+ /** 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. */
284
+ key?: string;
285
+ /** OAuth 2.0 token for the current user. */
286
+ oauth_token?: string;
287
+ /** The maximum number of items to return */
288
+ pageSize?: number;
289
+ /** The next_page_token value returned from a previous List request, if any. */
290
+ pageToken?: string;
291
+ /** Required. The name of the parent to list models for. The parent must have the form `projects/{project_id}' */
292
+ parent: string;
293
+ /** Returns response with indentations and line breaks. */
294
+ prettyPrint?: boolean;
295
+ /** 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. */
296
+ quotaUser?: string;
297
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
298
+ upload_protocol?: string;
299
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
300
+ uploadType?: string;
301
+ }): Request<ListModelsResponse>;
302
+ /** Updates a model. The longrunning operation will eventually return a Model. */
303
+ patch(request: {
304
+ /** V1 error format. */
305
+ "$.xgafv"?: string;
306
+ /** OAuth access token. */
307
+ access_token?: string;
308
+ /** Data format for response. */
309
+ alt?: string;
310
+ /** JSONP */
311
+ callback?: string;
312
+ /** Selector specifying which fields to include in a partial response. */
313
+ fields?: string;
314
+ /** 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. */
315
+ key?: string;
316
+ /** The resource name of the Model. Model names have the form `projects/{project_id}/models/{model_id}` The name is ignored when creating a model. */
317
+ name: string;
318
+ /** OAuth 2.0 token for the current user. */
319
+ oauth_token?: string;
320
+ /** Returns response with indentations and line breaks. */
321
+ prettyPrint?: boolean;
322
+ /** 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. */
323
+ quotaUser?: string;
324
+ /** The update mask */
325
+ updateMask?: string;
326
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
327
+ upload_protocol?: string;
328
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
329
+ uploadType?: string;
330
+ /** Request body */
331
+ resource: Model;
332
+ }): Request<Operation>;
333
+ patch(request: {
334
+ /** V1 error format. */
335
+ "$.xgafv"?: string;
336
+ /** OAuth access token. */
337
+ access_token?: string;
338
+ /** Data format for response. */
339
+ alt?: string;
340
+ /** JSONP */
341
+ callback?: string;
342
+ /** Selector specifying which fields to include in a partial response. */
343
+ fields?: string;
344
+ /** 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. */
345
+ key?: string;
346
+ /** The resource name of the Model. Model names have the form `projects/{project_id}/models/{model_id}` The name is ignored when creating a model. */
347
+ name: string;
348
+ /** OAuth 2.0 token for the current user. */
349
+ oauth_token?: string;
350
+ /** Returns response with indentations and line breaks. */
351
+ prettyPrint?: boolean;
352
+ /** 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. */
353
+ quotaUser?: string;
354
+ /** The update mask */
355
+ updateMask?: string;
356
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
357
+ upload_protocol?: string;
358
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
359
+ uploadType?: string;
360
+ },
361
+ body: Model): Request<Operation>;
362
+ }
363
+ interface OperationsResource {
364
+ /** 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. */
365
+ get(request?: {
366
+ /** V1 error format. */
367
+ "$.xgafv"?: string;
368
+ /** OAuth access token. */
369
+ access_token?: string;
370
+ /** Data format for response. */
371
+ alt?: string;
372
+ /** JSONP */
373
+ callback?: string;
374
+ /** Selector specifying which fields to include in a partial response. */
375
+ fields?: string;
376
+ /** 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. */
377
+ key?: string;
378
+ /** The name of the operation resource. */
379
+ name: string;
380
+ /** OAuth 2.0 token for the current user. */
381
+ oauth_token?: string;
382
+ /** Returns response with indentations and line breaks. */
383
+ prettyPrint?: boolean;
384
+ /** 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. */
385
+ quotaUser?: string;
386
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
387
+ upload_protocol?: string;
388
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
389
+ uploadType?: string;
390
+ }): Request<Operation>;
391
+ }
392
+ interface ProjectsResource {
393
+ models: ModelsResource;
394
+ operations: OperationsResource;
395
+ }
396
+
397
+ const projects: ProjectsResource;
398
+ }
399
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.firebaseml-v1beta2",
3
+ "version": "0.0.20220810",
4
+ "description": "TypeScript typings for Firebase ML API v1beta2",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "maxim@mazurok.com",
8
+ "name": "Maxim Mazurok",
9
+ "url": "https://maxim.mazurok.com"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,68 @@
1
+ # TypeScript typings for Firebase ML API v1beta2
2
+
3
+ Access custom machine learning models hosted via Firebase ML.
4
+ For detailed description please check [documentation](https://firebase.google.com).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Firebase ML API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.firebaseml-v1beta2 --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://firebaseml.googleapis.com/$discovery/rest?version=v1beta2', () => {
29
+ // now we can use:
30
+ // gapi.client.firebaseml
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('firebaseml', 'v1beta2', () => {
37
+ // now we can use:
38
+ // gapi.client.firebaseml
39
+ });
40
+ ```
41
+
42
+ Don't forget to authenticate your client before sending any request to resources:
43
+
44
+ ```typescript
45
+ // declare client_id registered in Google Developers Console
46
+ var client_id = '',
47
+ scope = [
48
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
49
+ 'https://www.googleapis.com/auth/cloud-platform',
50
+ ],
51
+ immediate = true;
52
+ // ...
53
+
54
+ gapi.auth.authorize(
55
+ { client_id: client_id, scope: scope, immediate: immediate },
56
+ authResult => {
57
+ if (authResult && !authResult.error) {
58
+ /* handle successful authorization */
59
+ } else {
60
+ /* handle authorization error */
61
+ }
62
+ });
63
+ ```
64
+
65
+ After that you can use Firebase ML API resources: <!-- TODO: make this work for multiple namespaces -->
66
+
67
+ ```typescript
68
+ ```
package/tests.ts ADDED
@@ -0,0 +1,161 @@
1
+ /* This is stub file for gapi.client.firebaseml-v1beta2 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: 20220810
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://firebaseml.googleapis.com/$discovery/rest?version=v1beta2');
12
+ /** now we can use gapi.client.firebaseml */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
+ 'https://www.googleapis.com/auth/cloud-platform',
20
+ ];
21
+ const immediate = false;
22
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
+ if (authResult && !authResult.error) {
24
+ /** handle successful authorization */
25
+ run();
26
+ } else {
27
+ /** handle authorization error */
28
+ }
29
+ });
30
+
31
+ async function run() {
32
+ /** Creates a model in Firebase ML. The longrunning operation will eventually return a Model */
33
+ await gapi.client.firebaseml.projects.models.create({
34
+ parent: "Test string",
35
+ }, {
36
+ activeOperations: [
37
+ {
38
+ done: true,
39
+ error: {
40
+ code: 42,
41
+ details: [
42
+ {
43
+ A: 42
44
+ }
45
+ ],
46
+ message: "Test string",
47
+ },
48
+ metadata: {
49
+ A: 42
50
+ },
51
+ name: "Test string",
52
+ response: {
53
+ A: 42
54
+ },
55
+ }
56
+ ],
57
+ createTime: "Test string",
58
+ displayName: "Test string",
59
+ etag: "Test string",
60
+ modelHash: "Test string",
61
+ name: "Test string",
62
+ state: {
63
+ published: true,
64
+ validationError: {
65
+ code: 42,
66
+ details: [
67
+ {
68
+ A: 42
69
+ }
70
+ ],
71
+ message: "Test string",
72
+ },
73
+ },
74
+ tags: [
75
+ "Test string"
76
+ ],
77
+ tfliteModel: {
78
+ automlModel: "Test string",
79
+ gcsTfliteUri: "Test string",
80
+ sizeBytes: "Test string",
81
+ },
82
+ updateTime: "Test string",
83
+ });
84
+ /** Deletes a model */
85
+ await gapi.client.firebaseml.projects.models.delete({
86
+ name: "Test string",
87
+ });
88
+ /** Gets Download information for a model. This is meant for downloading model resources onto devices. It gives very limited information about the model. */
89
+ await gapi.client.firebaseml.projects.models.download({
90
+ name: "Test string",
91
+ });
92
+ /** Gets a model resource. */
93
+ await gapi.client.firebaseml.projects.models.get({
94
+ name: "Test string",
95
+ });
96
+ /** Lists the models */
97
+ await gapi.client.firebaseml.projects.models.list({
98
+ filter: "Test string",
99
+ pageSize: 42,
100
+ pageToken: "Test string",
101
+ parent: "Test string",
102
+ });
103
+ /** Updates a model. The longrunning operation will eventually return a Model. */
104
+ await gapi.client.firebaseml.projects.models.patch({
105
+ name: "Test string",
106
+ updateMask: "Test string",
107
+ }, {
108
+ activeOperations: [
109
+ {
110
+ done: true,
111
+ error: {
112
+ code: 42,
113
+ details: [
114
+ {
115
+ A: 42
116
+ }
117
+ ],
118
+ message: "Test string",
119
+ },
120
+ metadata: {
121
+ A: 42
122
+ },
123
+ name: "Test string",
124
+ response: {
125
+ A: 42
126
+ },
127
+ }
128
+ ],
129
+ createTime: "Test string",
130
+ displayName: "Test string",
131
+ etag: "Test string",
132
+ modelHash: "Test string",
133
+ name: "Test string",
134
+ state: {
135
+ published: true,
136
+ validationError: {
137
+ code: 42,
138
+ details: [
139
+ {
140
+ A: 42
141
+ }
142
+ ],
143
+ message: "Test string",
144
+ },
145
+ },
146
+ tags: [
147
+ "Test string"
148
+ ],
149
+ tfliteModel: {
150
+ automlModel: "Test string",
151
+ gcsTfliteUri: "Test string",
152
+ sizeBytes: "Test string",
153
+ },
154
+ updateTime: "Test string",
155
+ });
156
+ /** 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. */
157
+ await gapi.client.firebaseml.projects.operations.get({
158
+ name: "Test string",
159
+ });
160
+ }
161
+ });
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
+ }