@maxim_mazurok/gapi.client.publicca-v1 0.0.20231114 → 0.0.20231127
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 +86 -118
- package/package.json +6 -6
- package/readme.md +18 -13
- package/tests.ts +0 -41
- package/tsconfig.json +0 -18
- package/tslint.json +0 -6
package/index.d.ts
CHANGED
|
@@ -9,128 +9,96 @@
|
|
|
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://publicca.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20231127
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
16
16
|
declare namespace gapi.client {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
/** Load Public Certificate Authority API v1 */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://publicca.googleapis.com/$discovery/rest?version=v1'
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: 'publicca', version: 'v1'): Promise<void>;
|
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
24
|
+
function load(name: 'publicca', version: 'v1', callback: () => any): void;
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
96
|
-
fields?:
|
|
97
|
-
string;
|
|
98
|
-
/** 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. */
|
|
99
|
-
key?:
|
|
100
|
-
string;
|
|
101
|
-
/** OAuth 2.0 token for the current user. */
|
|
102
|
-
oauth_token?:
|
|
103
|
-
string;
|
|
104
|
-
/**
|
|
105
|
-
* Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is
|
|
106
|
-
* supported.
|
|
107
|
-
*/
|
|
108
|
-
parent:
|
|
109
|
-
string;
|
|
110
|
-
/** Returns response with indentations and line breaks. */
|
|
111
|
-
prettyPrint?:
|
|
112
|
-
boolean;
|
|
113
|
-
/** 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. */
|
|
114
|
-
quotaUser?:
|
|
115
|
-
string;
|
|
116
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
117
|
-
upload_protocol?:
|
|
118
|
-
string;
|
|
119
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
120
|
-
uploadType?:
|
|
121
|
-
string;
|
|
122
|
-
},
|
|
123
|
-
body: ExternalAccountKey): Request<ExternalAccountKey>;
|
|
124
|
-
}
|
|
125
|
-
interface LocationsResource {
|
|
126
|
-
externalAccountKeys:
|
|
127
|
-
ExternalAccountKeysResource;
|
|
128
|
-
}
|
|
129
|
-
interface ProjectsResource {
|
|
130
|
-
locations:
|
|
131
|
-
LocationsResource;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const projects: ProjectsResource;
|
|
26
|
+
namespace publicca {
|
|
27
|
+
interface ExternalAccountKey {
|
|
28
|
+
/** Output only. Base64-URL-encoded HS256 key. It is generated by the PublicCertificateAuthorityService when the ExternalAccountKey is created */
|
|
29
|
+
b64MacKey?: string;
|
|
30
|
+
/** Output only. Key ID. It is generated by the PublicCertificateAuthorityService when the ExternalAccountKey is created */
|
|
31
|
+
keyId?: string;
|
|
32
|
+
/** Output only. Resource name. projects/{project}/locations/{location}/externalAccountKeys/{key_id} */
|
|
33
|
+
name?: string;
|
|
34
|
+
}
|
|
35
|
+
interface ExternalAccountKeysResource {
|
|
36
|
+
/** Creates a new ExternalAccountKey bound to the project. */
|
|
37
|
+
create(request: {
|
|
38
|
+
/** V1 error format. */
|
|
39
|
+
'$.xgafv'?: string;
|
|
40
|
+
/** OAuth access token. */
|
|
41
|
+
access_token?: string;
|
|
42
|
+
/** Data format for response. */
|
|
43
|
+
alt?: string;
|
|
44
|
+
/** JSONP */
|
|
45
|
+
callback?: string;
|
|
46
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
47
|
+
fields?: string;
|
|
48
|
+
/** 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. */
|
|
49
|
+
key?: string;
|
|
50
|
+
/** OAuth 2.0 token for the current user. */
|
|
51
|
+
oauth_token?: string;
|
|
52
|
+
/** Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported. */
|
|
53
|
+
parent: string;
|
|
54
|
+
/** Returns response with indentations and line breaks. */
|
|
55
|
+
prettyPrint?: boolean;
|
|
56
|
+
/** 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. */
|
|
57
|
+
quotaUser?: string;
|
|
58
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
59
|
+
upload_protocol?: string;
|
|
60
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
61
|
+
uploadType?: string;
|
|
62
|
+
/** Request body */
|
|
63
|
+
resource: ExternalAccountKey;
|
|
64
|
+
}): Request<ExternalAccountKey>;
|
|
65
|
+
create(
|
|
66
|
+
request: {
|
|
67
|
+
/** V1 error format. */
|
|
68
|
+
'$.xgafv'?: string;
|
|
69
|
+
/** OAuth access token. */
|
|
70
|
+
access_token?: string;
|
|
71
|
+
/** Data format for response. */
|
|
72
|
+
alt?: string;
|
|
73
|
+
/** JSONP */
|
|
74
|
+
callback?: string;
|
|
75
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
76
|
+
fields?: string;
|
|
77
|
+
/** 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. */
|
|
78
|
+
key?: string;
|
|
79
|
+
/** OAuth 2.0 token for the current user. */
|
|
80
|
+
oauth_token?: string;
|
|
81
|
+
/** Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported. */
|
|
82
|
+
parent: string;
|
|
83
|
+
/** Returns response with indentations and line breaks. */
|
|
84
|
+
prettyPrint?: boolean;
|
|
85
|
+
/** 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. */
|
|
86
|
+
quotaUser?: string;
|
|
87
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
88
|
+
upload_protocol?: string;
|
|
89
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
90
|
+
uploadType?: string;
|
|
91
|
+
},
|
|
92
|
+
body: ExternalAccountKey
|
|
93
|
+
): Request<ExternalAccountKey>;
|
|
94
|
+
}
|
|
95
|
+
interface LocationsResource {
|
|
96
|
+
externalAccountKeys: ExternalAccountKeysResource;
|
|
135
97
|
}
|
|
98
|
+
interface ProjectsResource {
|
|
99
|
+
locations: LocationsResource;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const projects: ProjectsResource;
|
|
103
|
+
}
|
|
136
104
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxim_mazurok/gapi.client.publicca-v1",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20231127",
|
|
4
4
|
"description": "TypeScript typings for Public Certificate Authority API v1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
8
|
+
},
|
|
5
9
|
"license": "MIT",
|
|
6
10
|
"author": {
|
|
7
|
-
"email": "maxim@mazurok.com",
|
|
8
11
|
"name": "Maxim Mazurok",
|
|
12
|
+
"email": "maxim@mazurok.com",
|
|
9
13
|
"url": "https://maxim.mazurok.com"
|
|
10
14
|
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
14
|
-
},
|
|
15
15
|
"types": "index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@types/gapi.client": "*",
|
package/readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TypeScript typings for Public Certificate Authority API v1
|
|
2
2
|
|
|
3
|
-
The Public Certificate Authority API may be used to create and manage ACME external account binding keys associated with Google Trust Services' publicly trusted certificate authority.
|
|
3
|
+
The Public Certificate Authority API may be used to create and manage ACME external account binding keys associated with Google Trust Services' publicly trusted certificate authority.
|
|
4
4
|
For detailed description please check [documentation](https://cloud.google.com/public-certificate-authority/docs).
|
|
5
5
|
|
|
6
6
|
## Installing
|
|
@@ -25,10 +25,13 @@ gapi.load('client', () => {
|
|
|
25
25
|
Then load api client wrapper:
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
|
-
gapi.client.load(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
gapi.client.load(
|
|
29
|
+
'https://publicca.googleapis.com/$discovery/rest?version=v1',
|
|
30
|
+
() => {
|
|
31
|
+
// now we can use:
|
|
32
|
+
// gapi.client.publicca
|
|
33
|
+
}
|
|
34
|
+
);
|
|
32
35
|
```
|
|
33
36
|
|
|
34
37
|
```typescript
|
|
@@ -45,24 +48,26 @@ Don't forget to authenticate your client before sending any request to resources
|
|
|
45
48
|
// declare client_id registered in Google Developers Console
|
|
46
49
|
var client_id = '',
|
|
47
50
|
scope = [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
52
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
53
|
+
],
|
|
54
|
+
immediate = true;
|
|
52
55
|
// ...
|
|
53
56
|
|
|
54
57
|
gapi.auth.authorize(
|
|
55
|
-
{
|
|
58
|
+
{client_id: client_id, scope: scope, immediate: immediate},
|
|
56
59
|
authResult => {
|
|
57
60
|
if (authResult && !authResult.error) {
|
|
58
|
-
|
|
61
|
+
/* handle successful authorization */
|
|
59
62
|
} else {
|
|
60
|
-
|
|
63
|
+
/* handle authorization error */
|
|
61
64
|
}
|
|
62
|
-
}
|
|
65
|
+
}
|
|
66
|
+
);
|
|
63
67
|
```
|
|
64
68
|
|
|
65
69
|
After that you can use Public Certificate Authority API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
66
70
|
|
|
67
71
|
```typescript
|
|
72
|
+
|
|
68
73
|
```
|
package/tests.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/* This is stub file for gapi.client.publicca-v1 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: 20231114
|
|
7
|
-
|
|
8
|
-
gapi.load('client', async () => {
|
|
9
|
-
/** now we can use gapi.client */
|
|
10
|
-
|
|
11
|
-
await gapi.client.load('https://publicca.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
-
/** now we can use gapi.client.publicca */
|
|
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 new ExternalAccountKey bound to the project. */
|
|
33
|
-
await gapi.client.publicca.projects.locations.externalAccountKeys.create({
|
|
34
|
-
parent: "Test string",
|
|
35
|
-
}, {
|
|
36
|
-
b64MacKey: "Test string",
|
|
37
|
-
keyId: "Test string",
|
|
38
|
-
name: "Test string",
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
}
|