Skip to content

Commit

Permalink
feat(digitalassetlinks)!: update the API
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yoshi-automation authored and sofisl committed Jan 29, 2025
1 parent 5928f7d commit 05438b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 273 deletions.
119 changes: 4 additions & 115 deletions discovery/digitalassetlinks-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"description": "Discovers relationships between online assets such as websites or mobile apps.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/digital-asset-links/",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
Expand Down Expand Up @@ -96,21 +97,6 @@
"resources": {
"assetlinks": {
"methods": {
"bulkCheck": {
"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.",
"flatPath": "v1/assetlinks:bulkCheck",
"httpMethod": "POST",
"id": "digitalassetlinks.assetlinks.bulkCheck",
"parameterOrder": [],
"parameters": {},
"path": "v1/assetlinks:bulkCheck",
"request": {
"$ref": "BulkCheckRequest"
},
"response": {
"$ref": "BulkCheckResponse"
}
},
"check": {
"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).",
"flatPath": "v1/assetlinks:check",
Expand Down Expand Up @@ -199,7 +185,7 @@
}
}
},
"revision": "20220129",
"revision": "20241207",
"rootUrl": "https://digitalassetlinks.googleapis.com/",
"schemas": {
"AndroidAppAsset": {
Expand Down Expand Up @@ -232,84 +218,6 @@
},
"type": "object"
},
"BulkCheckRequest": {
"description": "Message used to check for the existence of multiple digital asset links within a single RPC.",
"id": "BulkCheckRequest",
"properties": {
"allowGoogleInternalDataSources": {
"description": "Same configuration as in Check request, all statements checks will use same configurations.",
"type": "boolean"
},
"defaultRelation": {
"description": "If specified, will be used in any given template statement that doesn’t specify a relation.",
"type": "string"
},
"defaultSource": {
"$ref": "Asset",
"description": "If specified, will be used in any given template statement that doesn’t specify a source."
},
"defaultTarget": {
"$ref": "Asset",
"description": "If specified, will be used in any given template statement that doesn’t specify a target."
},
"skipCacheLookup": {
"description": "Same configuration as in Check request, all statements checks will use same configurations.",
"type": "boolean"
},
"statements": {
"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.",
"items": {
"$ref": "StatementTemplate"
},
"type": "array"
}
},
"type": "object"
},
"BulkCheckResponse": {
"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.",
"id": "BulkCheckResponse",
"properties": {
"bulkErrorCode": {
"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.",
"enum": [
"ERROR_CODE_UNSPECIFIED",
"ERROR_CODE_INVALID_QUERY",
"ERROR_CODE_FETCH_ERROR",
"ERROR_CODE_FAILED_SSL_VALIDATION",
"ERROR_CODE_REDIRECT",
"ERROR_CODE_TOO_LARGE",
"ERROR_CODE_MALFORMED_HTTP_RESPONSE",
"ERROR_CODE_WRONG_CONTENT_TYPE",
"ERROR_CODE_MALFORMED_CONTENT",
"ERROR_CODE_SECURE_ASSET_INCLUDES_INSECURE",
"ERROR_CODE_FETCH_BUDGET_EXHAUSTED"
],
"enumDescriptions": [
"",
"Unable to parse query.",
"Unable to fetch the asset links data.",
"Invalid HTTPS certificate .",
"HTTP redirects (e.g, 301) are not allowed.",
"Asset links data exceeds maximum size.",
"Can't parse HTTP response.",
"HTTP Content-type should be application/json.",
"JSON content is malformed.",
"A secure asset includes an insecure asset (security downgrade).",
"Too many includes (maybe a loop)."
],
"type": "string"
},
"checkResults": {
"description": "List of results for each check request. Results are returned in the same order in which they were sent in the request.",
"items": {
"$ref": "CheckResponse"
},
"type": "array"
}
},
"type": "object"
},
"CertificateInfo": {
"description": "Describes an X509 certificate.",
"id": "CertificateInfo",
Expand Down Expand Up @@ -346,7 +254,7 @@
"ERROR_CODE_FETCH_BUDGET_EXHAUSTED"
],
"enumDescriptions": [
"",
"Default value, otherwise unused.",
"Unable to parse query.",
"Unable to fetch the asset links data.",
"Invalid HTTPS certificate .",
Expand Down Expand Up @@ -399,7 +307,7 @@
"ERROR_CODE_FETCH_BUDGET_EXHAUSTED"
],
"enumDescriptions": [
"",
"Default value, otherwise unused.",
"Unable to parse query.",
"Unable to fetch the asset links data.",
"Invalid HTTPS certificate .",
Expand Down Expand Up @@ -449,25 +357,6 @@
},
"type": "object"
},
"StatementTemplate": {
"description": "A single statement to check in a bulk call using BulkCheck. See CheckRequest for details about each field.",
"id": "StatementTemplate",
"properties": {
"relation": {
"description": "The relationship being asserted between the source and target. If omitted, you must specify a BulkCheckRequest.default_relation value to use here.",
"type": "string"
},
"source": {
"$ref": "Asset",
"description": "The source asset that is asserting the statement. If omitted, you must specify a BulkCheckRequest.default_source value to use here."
},
"target": {
"$ref": "Asset",
"description": "The target that the source is declaring the relationship with. If omitted, you must specify a BulkCheckRequest.default_target to use here."
}
},
"type": "object"
},
"WebAsset": {
"description": "Describes a web asset.",
"id": "WebAsset",
Expand Down
158 changes: 0 additions & 158 deletions src/apis/digitalassetlinks/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,48 +152,6 @@ export namespace digitalassetlinks_v1 {
*/
web?: Schema$WebAsset;
}
/**
* Message used to check for the existence of multiple digital asset links within a single RPC.
*/
export interface Schema$BulkCheckRequest {
/**
* Same configuration as in Check request, all statements checks will use same configurations.
*/
allowGoogleInternalDataSources?: boolean | null;
/**
* If specified, will be used in any given template statement that doesn’t specify a relation.
*/
defaultRelation?: string | null;
/**
* If specified, will be used in any given template statement that doesn’t specify a source.
*/
defaultSource?: Schema$Asset;
/**
* If specified, will be used in any given template statement that doesn’t specify a target.
*/
defaultTarget?: Schema$Asset;
/**
* Same configuration as in Check request, all statements checks will use same configurations.
*/
skipCacheLookup?: boolean | null;
/**
* 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.
*/
statements?: Schema$StatementTemplate[];
}
/**
* 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.
*/
export interface Schema$BulkCheckResponse {
/**
* Error code for the entire request. Present only if the entire request failed. Individual check errors will not trigger the presence of this field.
*/
bulkErrorCode?: string | null;
/**
* List of results for each check request. Results are returned in the same order in which they were sent in the request.
*/
checkResults?: Schema$CheckResponse[];
}
/**
* Describes an X509 certificate.
*/
Expand Down Expand Up @@ -262,23 +220,6 @@ export namespace digitalassetlinks_v1 {
*/
target?: Schema$Asset;
}
/**
* A single statement to check in a bulk call using BulkCheck. See CheckRequest for details about each field.
*/
export interface Schema$StatementTemplate {
/**
* The relationship being asserted between the source and target. If omitted, you must specify a BulkCheckRequest.default_relation value to use here.
*/
relation?: string | null;
/**
* The source asset that is asserting the statement. If omitted, you must specify a BulkCheckRequest.default_source value to use here.
*/
source?: Schema$Asset;
/**
* The target that the source is declaring the relationship with. If omitted, you must specify a BulkCheckRequest.default_target to use here.
*/
target?: Schema$Asset;
}
/**
* Describes a web asset.
*/
Expand All @@ -295,98 +236,6 @@ export namespace digitalassetlinks_v1 {
this.context = context;
}

/**
* 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.
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
bulkCheck(
params: Params$Resource$Assetlinks$Bulkcheck,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
bulkCheck(
params?: Params$Resource$Assetlinks$Bulkcheck,
options?: MethodOptions
): GaxiosPromise<Schema$BulkCheckResponse>;
bulkCheck(
params: Params$Resource$Assetlinks$Bulkcheck,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
bulkCheck(
params: Params$Resource$Assetlinks$Bulkcheck,
options: MethodOptions | BodyResponseCallback<Schema$BulkCheckResponse>,
callback: BodyResponseCallback<Schema$BulkCheckResponse>
): void;
bulkCheck(
params: Params$Resource$Assetlinks$Bulkcheck,
callback: BodyResponseCallback<Schema$BulkCheckResponse>
): void;
bulkCheck(callback: BodyResponseCallback<Schema$BulkCheckResponse>): void;
bulkCheck(
paramsOrCallback?:
| Params$Resource$Assetlinks$Bulkcheck
| BodyResponseCallback<Schema$BulkCheckResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$BulkCheckResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$BulkCheckResponse>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$BulkCheckResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Assetlinks$Bulkcheck;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Assetlinks$Bulkcheck;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl =
options.rootUrl || 'https://digitalassetlinks.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/assetlinks:bulkCheck').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
apiVersion: '',
},
options
),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$BulkCheckResponse>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$BulkCheckResponse>(parameters);
}
}

/**
* 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).
*
Expand Down Expand Up @@ -476,13 +325,6 @@ export namespace digitalassetlinks_v1 {
}
}

export interface Params$Resource$Assetlinks$Bulkcheck
extends StandardParameters {
/**
* Request body metadata
*/
requestBody?: Schema$BulkCheckRequest;
}
export interface Params$Resource$Assetlinks$Check extends StandardParameters {
/**
* 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`.
Expand Down

0 comments on commit 05438b6

Please sign in to comment.