@maxim_mazurok/gapi.client.cloudlocationfinder-v1 0.0.20250825
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 +119 -0
- package/package.json +20 -0
- package/readme.md +74 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Cloud Location Finder API v1 0.0 */
|
|
2
|
+
// Project: https://cloud.google.com/location-finder/docs
|
|
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
|
+
|
|
8
|
+
// IMPORTANT
|
|
9
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
|
+
// Generated from: https://cloudlocationfinder.googleapis.com/$discovery/rest?version=v1
|
|
12
|
+
// Revision: 20250825
|
|
13
|
+
|
|
14
|
+
/// <reference types="gapi.client" />
|
|
15
|
+
|
|
16
|
+
declare namespace gapi.client {
|
|
17
|
+
/** Load Cloud Location Finder API v1 */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://cloudlocationfinder.googleapis.com/$discovery/rest?version=v1',
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: 'cloudlocationfinder', version: 'v1'): Promise<void>;
|
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
24
|
+
function load(
|
|
25
|
+
name: 'cloudlocationfinder',
|
|
26
|
+
version: 'v1',
|
|
27
|
+
callback: () => any,
|
|
28
|
+
): void;
|
|
29
|
+
|
|
30
|
+
namespace cloudlocationfinder {
|
|
31
|
+
interface ListLocationsResponse {
|
|
32
|
+
/** A list of locations that matches the specified filter in the request. */
|
|
33
|
+
locations?: Location[];
|
|
34
|
+
/** The standard List next-page token. */
|
|
35
|
+
nextPageToken?: string;
|
|
36
|
+
}
|
|
37
|
+
interface Location {
|
|
38
|
+
/** The friendly name for this location, typically a nearby city name. For example, "Tokyo". */
|
|
39
|
+
displayName?: string;
|
|
40
|
+
/** Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} */
|
|
41
|
+
labels?: {[P in string]: string};
|
|
42
|
+
/** The canonical id for this location. For example: `"us-east1"`. */
|
|
43
|
+
locationId?: string;
|
|
44
|
+
/** Service-specific metadata. For example the available capacity at the given location. */
|
|
45
|
+
metadata?: {[P in string]: any};
|
|
46
|
+
/** Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */
|
|
47
|
+
name?: string;
|
|
48
|
+
}
|
|
49
|
+
interface LocationsResource {
|
|
50
|
+
/** Gets information about a location. */
|
|
51
|
+
get(request?: {
|
|
52
|
+
/** V1 error format. */
|
|
53
|
+
'$.xgafv'?: string;
|
|
54
|
+
/** OAuth access token. */
|
|
55
|
+
access_token?: string;
|
|
56
|
+
/** Data format for response. */
|
|
57
|
+
alt?: string;
|
|
58
|
+
/** JSONP */
|
|
59
|
+
callback?: string;
|
|
60
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
61
|
+
fields?: string;
|
|
62
|
+
/** 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. */
|
|
63
|
+
key?: string;
|
|
64
|
+
/** Resource name for the location. */
|
|
65
|
+
name: string;
|
|
66
|
+
/** OAuth 2.0 token for the current user. */
|
|
67
|
+
oauth_token?: string;
|
|
68
|
+
/** Returns response with indentations and line breaks. */
|
|
69
|
+
prettyPrint?: boolean;
|
|
70
|
+
/** 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. */
|
|
71
|
+
quotaUser?: string;
|
|
72
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
73
|
+
upload_protocol?: string;
|
|
74
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
75
|
+
uploadType?: string;
|
|
76
|
+
}): Request<Location>;
|
|
77
|
+
/** Lists information about the supported locations for this service. */
|
|
78
|
+
list(request?: {
|
|
79
|
+
/** V1 error format. */
|
|
80
|
+
'$.xgafv'?: string;
|
|
81
|
+
/** OAuth access token. */
|
|
82
|
+
access_token?: string;
|
|
83
|
+
/** Data format for response. */
|
|
84
|
+
alt?: string;
|
|
85
|
+
/** JSONP */
|
|
86
|
+
callback?: string;
|
|
87
|
+
/** Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage. */
|
|
88
|
+
extraLocationTypes?: string | string[];
|
|
89
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
90
|
+
fields?: string;
|
|
91
|
+
/** A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). */
|
|
92
|
+
filter?: string;
|
|
93
|
+
/** 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. */
|
|
94
|
+
key?: string;
|
|
95
|
+
/** The resource that owns the locations collection, if applicable. */
|
|
96
|
+
name: string;
|
|
97
|
+
/** OAuth 2.0 token for the current user. */
|
|
98
|
+
oauth_token?: string;
|
|
99
|
+
/** The maximum number of results to return. If not set, the service selects a default. */
|
|
100
|
+
pageSize?: number;
|
|
101
|
+
/** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */
|
|
102
|
+
pageToken?: string;
|
|
103
|
+
/** Returns response with indentations and line breaks. */
|
|
104
|
+
prettyPrint?: boolean;
|
|
105
|
+
/** 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. */
|
|
106
|
+
quotaUser?: string;
|
|
107
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
108
|
+
upload_protocol?: string;
|
|
109
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
110
|
+
uploadType?: string;
|
|
111
|
+
}): Request<ListLocationsResponse>;
|
|
112
|
+
}
|
|
113
|
+
interface ProjectsResource {
|
|
114
|
+
locations: LocationsResource;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const projects: ProjectsResource;
|
|
118
|
+
}
|
|
119
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.cloudlocationfinder-v1",
|
|
3
|
+
"version": "0.0.20250825",
|
|
4
|
+
"description": "TypeScript typings for Cloud Location Finder API v1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "Maxim Mazurok",
|
|
12
|
+
"email": "maxim@mazurok.com",
|
|
13
|
+
"url": "https://maxim.mazurok.com"
|
|
14
|
+
},
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/gapi.client": "*",
|
|
18
|
+
"@types/gapi.client.discovery-v1": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# TypeScript typings for Cloud Location Finder API v1
|
|
2
|
+
|
|
3
|
+
For detailed description please check [documentation](https://cloud.google.com/location-finder/docs).
|
|
4
|
+
|
|
5
|
+
## Installing
|
|
6
|
+
|
|
7
|
+
Install typings for Cloud Location Finder API:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm install @types/gapi.client.cloudlocationfinder-v1 --save-dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
You need to initialize Google API client in your code:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
gapi.load('client', () => {
|
|
19
|
+
// now we can use gapi.client
|
|
20
|
+
// ...
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then load api client wrapper:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
gapi.client.load(
|
|
28
|
+
'https://cloudlocationfinder.googleapis.com/$discovery/rest?version=v1',
|
|
29
|
+
() => {
|
|
30
|
+
// now we can use:
|
|
31
|
+
// gapi.client.cloudlocationfinder
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
|
|
38
|
+
gapi.client.load('cloudlocationfinder', 'v1', () => {
|
|
39
|
+
// now we can use:
|
|
40
|
+
// gapi.client.cloudlocationfinder
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Don't forget to authenticate your client before sending any request to resources:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
// declare client_id registered in Google Developers Console
|
|
48
|
+
var client_id = '',
|
|
49
|
+
scope = [
|
|
50
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
51
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
52
|
+
],
|
|
53
|
+
immediate = true;
|
|
54
|
+
// ...
|
|
55
|
+
|
|
56
|
+
gapi.auth.authorize(
|
|
57
|
+
{client_id: client_id, scope: scope, immediate: immediate},
|
|
58
|
+
authResult => {
|
|
59
|
+
if (authResult && !authResult.error) {
|
|
60
|
+
/* handle successful authorization */
|
|
61
|
+
} else {
|
|
62
|
+
/* handle authorization error */
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
After that you can use Cloud Location Finder API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.cloudlocationfinder-v1#Provenance:~:text=none-,Provenance,-Built%20and%20signed)
|