Skip to content

Commit 05438b6

Browse files
yoshi-automationsofisl
authored andcommitted
feat(digitalassetlinks)!: update the API
BREAKING CHANGE: This release has breaking changes. #### digitalassetlinks:v1 The following keys were deleted: - resources.assetlinks.methods.bulkCheck.description - resources.assetlinks.methods.bulkCheck.flatPath - resources.assetlinks.methods.bulkCheck.httpMethod - resources.assetlinks.methods.bulkCheck.id - resources.assetlinks.methods.bulkCheck.parameterOrder - resources.assetlinks.methods.bulkCheck.path - resources.assetlinks.methods.bulkCheck.request.$ref - resources.assetlinks.methods.bulkCheck.response.$ref - schemas.BulkCheckRequest.description - schemas.BulkCheckRequest.id - schemas.BulkCheckRequest.properties.allowGoogleInternalDataSources.description - schemas.BulkCheckRequest.properties.allowGoogleInternalDataSources.type - schemas.BulkCheckRequest.properties.defaultRelation.description - schemas.BulkCheckRequest.properties.defaultRelation.type - schemas.BulkCheckRequest.properties.defaultSource.$ref - schemas.BulkCheckRequest.properties.defaultSource.description - schemas.BulkCheckRequest.properties.defaultTarget.$ref - schemas.BulkCheckRequest.properties.defaultTarget.description - schemas.BulkCheckRequest.properties.skipCacheLookup.description - schemas.BulkCheckRequest.properties.skipCacheLookup.type - schemas.BulkCheckRequest.properties.statements.description - schemas.BulkCheckRequest.properties.statements.items.$ref - schemas.BulkCheckRequest.properties.statements.type - schemas.BulkCheckRequest.type - schemas.BulkCheckResponse.description - schemas.BulkCheckResponse.id - schemas.BulkCheckResponse.properties.bulkErrorCode.description - schemas.BulkCheckResponse.properties.bulkErrorCode.enum - schemas.BulkCheckResponse.properties.bulkErrorCode.enumDescriptions - schemas.BulkCheckResponse.properties.bulkErrorCode.type - schemas.BulkCheckResponse.properties.checkResults.description - schemas.BulkCheckResponse.properties.checkResults.items.$ref - schemas.BulkCheckResponse.properties.checkResults.type - schemas.BulkCheckResponse.type - schemas.StatementTemplate.description - schemas.StatementTemplate.id - schemas.StatementTemplate.properties.relation.description - schemas.StatementTemplate.properties.relation.type - schemas.StatementTemplate.properties.source.$ref - schemas.StatementTemplate.properties.source.description - schemas.StatementTemplate.properties.target.$ref - schemas.StatementTemplate.properties.target.description - schemas.StatementTemplate.type The following keys were added: - fullyEncodeReservedExpansion The following keys were changed: - schemas.CheckResponse.properties.errorCode.items.enumDescriptions - schemas.ListResponse.properties.errorCode.items.enumDescriptions
1 parent 5928f7d commit 05438b6

File tree

2 files changed

+4
-273
lines changed

2 files changed

+4
-273
lines changed

‎discovery/digitalassetlinks-v1.json

Lines changed: 4 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"description": "Discovers relationships between online assets such as websites or mobile apps.",
66
"discoveryVersion": "v1",
77
"documentationLink": "https://developers.google.com/digital-asset-links/",
8+
"fullyEncodeReservedExpansion": true,
89
"icons": {
910
"x16": "http://www.google.com/images/icons/product/search-16.gif",
1011
"x32": "http://www.google.com/images/icons/product/search-32.gif"
@@ -96,21 +97,6 @@
9697
"resources": {
9798
"assetlinks": {
9899
"methods": {
99-
"bulkCheck": {
100-
"description": "Send a bundle of statement checks in a single RPC to minimize latency and service load. Statements need not be all for the same source and/or target. We recommend using this method when you need to check more than one statement in a short period of time.",
101-
"flatPath": "v1/assetlinks:bulkCheck",
102-
"httpMethod": "POST",
103-
"id": "digitalassetlinks.assetlinks.bulkCheck",
104-
"parameterOrder": [],
105-
"parameters": {},
106-
"path": "v1/assetlinks:bulkCheck",
107-
"request": {
108-
"$ref": "BulkCheckRequest"
109-
},
110-
"response": {
111-
"$ref": "BulkCheckResponse"
112-
}
113-
},
114100
"check": {
115101
"description": "Determines whether the specified (directional) relationship exists between the specified source and target assets. The relation describes the intent of the link between the two assets as claimed by the source asset. An example for such relationships is the delegation of privileges or permissions. This command is most often used by infrastructure systems to check preconditions for an action. For example, a client may want to know if it is OK to send a web URL to a particular mobile app instead. The client can check for the relevant asset link from the website to the mobile app to decide if the operation should be allowed. A note about security: if you specify a secure asset as the source, such as an HTTPS website or an Android app, the API will ensure that any statements used to generate the response have been made in a secure way by the owner of that asset. Conversely, if the source asset is an insecure HTTP website (that is, the URL starts with `http://` instead of `https://`), the API cannot verify its statements securely, and it is not possible to ensure that the website's statements have not been altered by a third party. For more information, see the [Digital Asset Links technical design specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md).",
116102
"flatPath": "v1/assetlinks:check",
@@ -199,7 +185,7 @@
199185
}
200186
}
201187
},
202-
"revision": "20220129",
188+
"revision": "20241207",
203189
"rootUrl": "https://digitalassetlinks.googleapis.com/",
204190
"schemas": {
205191
"AndroidAppAsset": {
@@ -232,84 +218,6 @@
232218
},
233219
"type": "object"
234220
},
235-
"BulkCheckRequest": {
236-
"description": "Message used to check for the existence of multiple digital asset links within a single RPC.",
237-
"id": "BulkCheckRequest",
238-
"properties": {
239-
"allowGoogleInternalDataSources": {
240-
"description": "Same configuration as in Check request, all statements checks will use same configurations.",
241-
"type": "boolean"
242-
},
243-
"defaultRelation": {
244-
"description": "If specified, will be used in any given template statement that doesn’t specify a relation.",
245-
"type": "string"
246-
},
247-
"defaultSource": {
248-
"$ref": "Asset",
249-
"description": "If specified, will be used in any given template statement that doesn’t specify a source."
250-
},
251-
"defaultTarget": {
252-
"$ref": "Asset",
253-
"description": "If specified, will be used in any given template statement that doesn’t specify a target."
254-
},
255-
"skipCacheLookup": {
256-
"description": "Same configuration as in Check request, all statements checks will use same configurations.",
257-
"type": "boolean"
258-
},
259-
"statements": {
260-
"description": "List of statements to check. For each statement, you can omit a field if the corresponding default_* field below was supplied. Minimum 1 statement; maximum 1,000 statements. Any additional statements will be ignored.",
261-
"items": {
262-
"$ref": "StatementTemplate"
263-
},
264-
"type": "array"
265-
}
266-
},
267-
"type": "object"
268-
},
269-
"BulkCheckResponse": {
270-
"description": "Response for BulkCheck call. Results are sent in a list in the same order in which they were sent. Individual check errors are described in the appropriate check_results entry. If the entire call fails, the response will include a bulk_error_code field describing the error.",
271-
"id": "BulkCheckResponse",
272-
"properties": {
273-
"bulkErrorCode": {
274-
"description": "Error code for the entire request. Present only if the entire request failed. Individual check errors will not trigger the presence of this field.",
275-
"enum": [
276-
"ERROR_CODE_UNSPECIFIED",
277-
"ERROR_CODE_INVALID_QUERY",
278-
"ERROR_CODE_FETCH_ERROR",
279-
"ERROR_CODE_FAILED_SSL_VALIDATION",
280-
"ERROR_CODE_REDIRECT",
281-
"ERROR_CODE_TOO_LARGE",
282-
"ERROR_CODE_MALFORMED_HTTP_RESPONSE",
283-
"ERROR_CODE_WRONG_CONTENT_TYPE",
284-
"ERROR_CODE_MALFORMED_CONTENT",
285-
"ERROR_CODE_SECURE_ASSET_INCLUDES_INSECURE",
286-
"ERROR_CODE_FETCH_BUDGET_EXHAUSTED"
287-
],
288-
"enumDescriptions": [
289-
"",
290-
"Unable to parse query.",
291-
"Unable to fetch the asset links data.",
292-
"Invalid HTTPS certificate .",
293-
"HTTP redirects (e.g, 301) are not allowed.",
294-
"Asset links data exceeds maximum size.",
295-
"Can't parse HTTP response.",
296-
"HTTP Content-type should be application/json.",
297-
"JSON content is malformed.",
298-
"A secure asset includes an insecure asset (security downgrade).",
299-
"Too many includes (maybe a loop)."
300-
],
301-
"type": "string"
302-
},
303-
"checkResults": {
304-
"description": "List of results for each check request. Results are returned in the same order in which they were sent in the request.",
305-
"items": {
306-
"$ref": "CheckResponse"
307-
},
308-
"type": "array"
309-
}
310-
},
311-
"type": "object"
312-
},
313221
"CertificateInfo": {
314222
"description": "Describes an X509 certificate.",
315223
"id": "CertificateInfo",
@@ -346,7 +254,7 @@
346254
"ERROR_CODE_FETCH_BUDGET_EXHAUSTED"
347255
],
348256
"enumDescriptions": [
349-
"",
257+
"Default value, otherwise unused.",
350258
"Unable to parse query.",
351259
"Unable to fetch the asset links data.",
352260
"Invalid HTTPS certificate .",
@@ -399,7 +307,7 @@
399307
"ERROR_CODE_FETCH_BUDGET_EXHAUSTED"
400308
],
401309
"enumDescriptions": [
402-
"",
310+
"Default value, otherwise unused.",
403311
"Unable to parse query.",
404312
"Unable to fetch the asset links data.",
405313
"Invalid HTTPS certificate .",
@@ -449,25 +357,6 @@
449357
},
450358
"type": "object"
451359
},
452-
"StatementTemplate": {
453-
"description": "A single statement to check in a bulk call using BulkCheck. See CheckRequest for details about each field.",
454-
"id": "StatementTemplate",
455-
"properties": {
456-
"relation": {
457-
"description": "The relationship being asserted between the source and target. If omitted, you must specify a BulkCheckRequest.default_relation value to use here.",
458-
"type": "string"
459-
},
460-
"source": {
461-
"$ref": "Asset",
462-
"description": "The source asset that is asserting the statement. If omitted, you must specify a BulkCheckRequest.default_source value to use here."
463-
},
464-
"target": {
465-
"$ref": "Asset",
466-
"description": "The target that the source is declaring the relationship with. If omitted, you must specify a BulkCheckRequest.default_target to use here."
467-
}
468-
},
469-
"type": "object"
470-
},
471360
"WebAsset": {
472361
"description": "Describes a web asset.",
473362
"id": "WebAsset",

‎src/apis/digitalassetlinks/v1.ts

Lines changed: 0 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -152,48 +152,6 @@ export namespace digitalassetlinks_v1 {
152152
*/
153153
web?: Schema$WebAsset;
154154
}
155-
/**
156-
* Message used to check for the existence of multiple digital asset links within a single RPC.
157-
*/
158-
export interface Schema$BulkCheckRequest {
159-
/**
160-
* Same configuration as in Check request, all statements checks will use same configurations.
161-
*/
162-
allowGoogleInternalDataSources?: boolean | null;
163-
/**
164-
* If specified, will be used in any given template statement that doesn’t specify a relation.
165-
*/
166-
defaultRelation?: string | null;
167-
/**
168-
* If specified, will be used in any given template statement that doesn’t specify a source.
169-
*/
170-
defaultSource?: Schema$Asset;
171-
/**
172-
* If specified, will be used in any given template statement that doesn’t specify a target.
173-
*/
174-
defaultTarget?: Schema$Asset;
175-
/**
176-
* Same configuration as in Check request, all statements checks will use same configurations.
177-
*/
178-
skipCacheLookup?: boolean | null;
179-
/**
180-
* List of statements to check. For each statement, you can omit a field if the corresponding default_* field below was supplied. Minimum 1 statement; maximum 1,000 statements. Any additional statements will be ignored.
181-
*/
182-
statements?: Schema$StatementTemplate[];
183-
}
184-
/**
185-
* Response for BulkCheck call. Results are sent in a list in the same order in which they were sent. Individual check errors are described in the appropriate check_results entry. If the entire call fails, the response will include a bulk_error_code field describing the error.
186-
*/
187-
export interface Schema$BulkCheckResponse {
188-
/**
189-
* Error code for the entire request. Present only if the entire request failed. Individual check errors will not trigger the presence of this field.
190-
*/
191-
bulkErrorCode?: string | null;
192-
/**
193-
* List of results for each check request. Results are returned in the same order in which they were sent in the request.
194-
*/
195-
checkResults?: Schema$CheckResponse[];
196-
}
197155
/**
198156
* Describes an X509 certificate.
199157
*/
@@ -262,23 +220,6 @@ export namespace digitalassetlinks_v1 {
262220
*/
263221
target?: Schema$Asset;
264222
}
265-
/**
266-
* A single statement to check in a bulk call using BulkCheck. See CheckRequest for details about each field.
267-
*/
268-
export interface Schema$StatementTemplate {
269-
/**
270-
* The relationship being asserted between the source and target. If omitted, you must specify a BulkCheckRequest.default_relation value to use here.
271-
*/
272-
relation?: string | null;
273-
/**
274-
* The source asset that is asserting the statement. If omitted, you must specify a BulkCheckRequest.default_source value to use here.
275-
*/
276-
source?: Schema$Asset;
277-
/**
278-
* The target that the source is declaring the relationship with. If omitted, you must specify a BulkCheckRequest.default_target to use here.
279-
*/
280-
target?: Schema$Asset;
281-
}
282223
/**
283224
* Describes a web asset.
284225
*/
@@ -295,98 +236,6 @@ export namespace digitalassetlinks_v1 {
295236
this.context = context;
296237
}
297238

298-
/**
299-
* Send a bundle of statement checks in a single RPC to minimize latency and service load. Statements need not be all for the same source and/or target. We recommend using this method when you need to check more than one statement in a short period of time.
300-
*
301-
* @param params - Parameters for request
302-
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
303-
* @param callback - Optional callback that handles the response.
304-
* @returns A promise if used with async/await, or void if used with a callback.
305-
*/
306-
bulkCheck(
307-
params: Params$Resource$Assetlinks$Bulkcheck,
308-
options: StreamMethodOptions
309-
): GaxiosPromise<Readable>;
310-
bulkCheck(
311-
params?: Params$Resource$Assetlinks$Bulkcheck,
312-
options?: MethodOptions
313-
): GaxiosPromise<Schema$BulkCheckResponse>;
314-
bulkCheck(
315-
params: Params$Resource$Assetlinks$Bulkcheck,
316-
options: StreamMethodOptions | BodyResponseCallback<Readable>,
317-
callback: BodyResponseCallback<Readable>
318-
): void;
319-
bulkCheck(
320-
params: Params$Resource$Assetlinks$Bulkcheck,
321-
options: MethodOptions | BodyResponseCallback<Schema$BulkCheckResponse>,
322-
callback: BodyResponseCallback<Schema$BulkCheckResponse>
323-
): void;
324-
bulkCheck(
325-
params: Params$Resource$Assetlinks$Bulkcheck,
326-
callback: BodyResponseCallback<Schema$BulkCheckResponse>
327-
): void;
328-
bulkCheck(callback: BodyResponseCallback<Schema$BulkCheckResponse>): void;
329-
bulkCheck(
330-
paramsOrCallback?:
331-
| Params$Resource$Assetlinks$Bulkcheck
332-
| BodyResponseCallback<Schema$BulkCheckResponse>
333-
| BodyResponseCallback<Readable>,
334-
optionsOrCallback?:
335-
| MethodOptions
336-
| StreamMethodOptions
337-
| BodyResponseCallback<Schema$BulkCheckResponse>
338-
| BodyResponseCallback<Readable>,
339-
callback?:
340-
| BodyResponseCallback<Schema$BulkCheckResponse>
341-
| BodyResponseCallback<Readable>
342-
):
343-
| void
344-
| GaxiosPromise<Schema$BulkCheckResponse>
345-
| GaxiosPromise<Readable> {
346-
let params = (paramsOrCallback ||
347-
{}) as Params$Resource$Assetlinks$Bulkcheck;
348-
let options = (optionsOrCallback || {}) as MethodOptions;
349-
350-
if (typeof paramsOrCallback === 'function') {
351-
callback = paramsOrCallback;
352-
params = {} as Params$Resource$Assetlinks$Bulkcheck;
353-
options = {};
354-
}
355-
356-
if (typeof optionsOrCallback === 'function') {
357-
callback = optionsOrCallback;
358-
options = {};
359-
}
360-
361-
const rootUrl =
362-
options.rootUrl || 'https://digitalassetlinks.googleapis.com/';
363-
const parameters = {
364-
options: Object.assign(
365-
{
366-
url: (rootUrl + '/v1/assetlinks:bulkCheck').replace(
367-
/([^:]\/)\/+/g,
368-
'$1'
369-
),
370-
method: 'POST',
371-
apiVersion: '',
372-
},
373-
options
374-
),
375-
params,
376-
requiredParams: [],
377-
pathParams: [],
378-
context: this.context,
379-
};
380-
if (callback) {
381-
createAPIRequest<Schema$BulkCheckResponse>(
382-
parameters,
383-
callback as BodyResponseCallback<unknown>
384-
);
385-
} else {
386-
return createAPIRequest<Schema$BulkCheckResponse>(parameters);
387-
}
388-
}
389-
390239
/**
391240
* Determines whether the specified (directional) relationship exists between the specified source and target assets. The relation describes the intent of the link between the two assets as claimed by the source asset. An example for such relationships is the delegation of privileges or permissions. This command is most often used by infrastructure systems to check preconditions for an action. For example, a client may want to know if it is OK to send a web URL to a particular mobile app instead. The client can check for the relevant asset link from the website to the mobile app to decide if the operation should be allowed. A note about security: if you specify a secure asset as the source, such as an HTTPS website or an Android app, the API will ensure that any statements used to generate the response have been made in a secure way by the owner of that asset. Conversely, if the source asset is an insecure HTTP website (that is, the URL starts with `http://` instead of `https://`), the API cannot verify its statements securely, and it is not possible to ensure that the website's statements have not been altered by a third party. For more information, see the [Digital Asset Links technical design specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md).
392241
*
@@ -476,13 +325,6 @@ export namespace digitalassetlinks_v1 {
476325
}
477326
}
478327

479-
export interface Params$Resource$Assetlinks$Bulkcheck
480-
extends StandardParameters {
481-
/**
482-
* Request body metadata
483-
*/
484-
requestBody?: Schema$BulkCheckRequest;
485-
}
486328
export interface Params$Resource$Assetlinks$Check extends StandardParameters {
487329
/**
488330
* Query string for the relation. We identify relations with strings of the format `/`, where `` must be one of a set of pre-defined purpose categories, and `` is a free-form lowercase alphanumeric string that describes the specific use case of the statement. Refer to [our API documentation](/digital-asset-links/v1/relation-strings) for the current list of supported relations. For a query to match an asset link, both the query's and the asset link's relation strings must match exactly. Example: A query with relation `delegate_permission/common.handle_all_urls` matches an asset link with relation `delegate_permission/common.handle_all_urls`.

0 commit comments

Comments
 (0)