Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

DriveLabels

import { DriveLabels } from "https://googleapis.deno.dev/v1/drivelabels:v2.ts";

An API for managing Drive Labels

class DriveLabels {
constructor(client?: CredentialsClient, baseUrl?: string);
async labelsDelete(name: string, opts?: LabelsDeleteOptions): Promise<GoogleProtobufEmpty>;
async labelsDisable(name: string, req: GoogleAppsDriveLabelsV2DisableLabelRequest): Promise<GoogleAppsDriveLabelsV2Label>;
async labelsEnable(name: string, req: GoogleAppsDriveLabelsV2EnableLabelRequest): Promise<GoogleAppsDriveLabelsV2Label>;
async labelsGet(name: string, opts?: LabelsGetOptions): Promise<GoogleAppsDriveLabelsV2Label>;
async labelsLocksList(parent: string, opts?: LabelsLocksListOptions): Promise<GoogleAppsDriveLabelsV2ListLabelLocksResponse>;
async labelsPermissionsBatchDelete(parent: string, req: GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest): Promise<GoogleProtobufEmpty>;
async labelsPermissionsCreate(
parent: string,
): Promise<GoogleAppsDriveLabelsV2LabelPermission>;
async labelsPermissionsDelete(name: string, opts?: LabelsPermissionsDeleteOptions): Promise<GoogleProtobufEmpty>;
async labelsPermissionsList(parent: string, opts?: LabelsPermissionsListOptions): Promise<GoogleAppsDriveLabelsV2ListLabelPermissionsResponse>;
async labelsPublish(name: string, req: GoogleAppsDriveLabelsV2PublishLabelRequest): Promise<GoogleAppsDriveLabelsV2Label>;
async labelsRevisionsLocksList(parent: string, opts?: LabelsRevisionsLocksListOptions): Promise<GoogleAppsDriveLabelsV2ListLabelLocksResponse>;
async labelsRevisionsPermissionsBatchDelete(parent: string, req: GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest): Promise<GoogleProtobufEmpty>;
async labelsRevisionsPermissionsBatchUpdate(parent: string, req: GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsRequest): Promise<GoogleAppsDriveLabelsV2BatchUpdateLabelPermissionsResponse>;
async labelsRevisionsPermissionsCreate(
parent: string,
): Promise<GoogleAppsDriveLabelsV2LabelPermission>;
async labelsRevisionsPermissionsDelete(name: string, opts?: LabelsRevisionsPermissionsDeleteOptions): Promise<GoogleProtobufEmpty>;
async labelsRevisionsPermissionsList(parent: string, opts?: LabelsRevisionsPermissionsListOptions): Promise<GoogleAppsDriveLabelsV2ListLabelPermissionsResponse>;
async labelsRevisionsUpdatePermissions(
parent: string,
): Promise<GoogleAppsDriveLabelsV2LabelPermission>;
async labelsUpdateLabelCopyMode(name: string, req: GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest): Promise<GoogleAppsDriveLabelsV2Label>;
async labelsUpdatePermissions(
parent: string,
): Promise<GoogleAppsDriveLabelsV2LabelPermission>;
async limitsGetLabel(opts?: LimitsGetLabelOptions): Promise<GoogleAppsDriveLabelsV2LabelLimits>;
async usersGetCapabilities(name: string, opts?: UsersGetCapabilitiesOptions): Promise<GoogleAppsDriveLabelsV2UserCapabilities>;
}

§Constructors

§
new DriveLabels(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§

Creates a new Label.

§
labelsDelete(name: string, opts?: LabelsDeleteOptions): Promise<GoogleProtobufEmpty>
[src]

Permanently deletes a Label and related metadata on Drive Items. Once deleted, the Label and related Drive item metadata will be deleted. Only draft Labels, and disabled Labels may be deleted.

@param name

Required. Label resource name.

§

Updates a single Label by applying a set of update requests resulting in a new draft revision. The batch update is all-or-nothing: If any of the update requests are invalid, no changes are applied. The resulting draft revision must be published before the changes may be used with Drive Items.

@param name

Required. The resource name of the Label to update.

§

Disable a published Label. Disabling a Label will result in a new disabled published revision based on the current published revision. If there is a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted. Once disabled, a label may be deleted with DeleteLabel.

@param name

Required. Label resource name.

§

Enable a disabled Label and restore it to its published state. This will result in a new published revision based on the current disabled published revision. If there is an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.

@param name

Required. Label resource name.

§
labelsGet(name: string, opts?: LabelsGetOptions): Promise<GoogleAppsDriveLabelsV2Label>
[src]

Get a label by its resource name. Resource name may be any of: * labels/{id} - See labels/{id}@latest * labels/{id}@latest - Gets the latest revision of the label. * labels/{id}@published - Gets the current published revision of the label. * labels/{id}@{revision_id} - Gets the label at the specified revision ID.

@param name

Required. Label resource name. May be any of: * labels/{id} (equivalent to labels/{id}@latest) * labels/{id}@latest * labels/{id}@published * labels/{id}@{revision_id}

§
labelsLocksList(parent: string, opts?: LabelsLocksListOptions): Promise<GoogleAppsDriveLabelsV2ListLabelLocksResponse>
[src]

Lists the LabelLocks on a Label.

@param parent

Required. Label on which Locks are applied. Format: labels/{label}

§
labelsPermissionsBatchDelete(parent: string, req: GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest): Promise<GoogleProtobufEmpty>
[src]

Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param parent

Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

§

Updates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param parent

Required. The parent Label resource name shared by all permissions being updated. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

§

Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param parent

Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}

§
labelsPermissionsDelete(name: string, opts?: LabelsPermissionsDeleteOptions): Promise<GoogleProtobufEmpty>
[src]

Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param name

Required. Label Permission resource name.

§
labelsPermissionsList(parent: string, opts?: LabelsPermissionsListOptions): Promise<GoogleAppsDriveLabelsV2ListLabelPermissionsResponse>
[src]

Lists a Label's permissions.

@param parent

Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}

§

Publish all draft changes to the Label. Once published, the Label may not return to its draft state. See google.apps.drive.labels.v2.Lifecycle for more information. Publishing a Label will result in a new published revision. All previous draft revisions will be deleted. Previous published revisions will be kept but are subject to automated deletion as needed. Once published, some changes are no longer permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the Label will be rejected. For example, the following changes to a Label will be rejected after the Label is published: * The label cannot be directly deleted. It must be disabled first, then deleted. * Field.FieldType cannot be changed. * Changes to Field validation options cannot reject something that was previously accepted. * Reducing the max entries.

@param name

Required. Label resource name.

§
labelsRevisionsLocksList(parent: string, opts?: LabelsRevisionsLocksListOptions): Promise<GoogleAppsDriveLabelsV2ListLabelLocksResponse>
[src]

Lists the LabelLocks on a Label.

@param parent

Required. Label on which Locks are applied. Format: labels/{label}

§
labelsRevisionsPermissionsBatchDelete(parent: string, req: GoogleAppsDriveLabelsV2BatchDeleteLabelPermissionsRequest): Promise<GoogleProtobufEmpty>
[src]

Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param parent

Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

§

Updates Label permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param parent

Required. The parent Label resource name shared by all permissions being updated. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

§

Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param parent

Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}

§
labelsRevisionsPermissionsDelete(name: string, opts?: LabelsRevisionsPermissionsDeleteOptions): Promise<GoogleProtobufEmpty>
[src]

Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param name

Required. Label Permission resource name.

§
labelsRevisionsPermissionsList(parent: string, opts?: LabelsRevisionsPermissionsListOptions): Promise<GoogleAppsDriveLabelsV2ListLabelPermissionsResponse>
[src]

Lists a Label's permissions.

@param parent

Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}

§

Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param parent

Required. The parent Label resource name.

§
labelsUpdateLabelCopyMode(name: string, req: GoogleAppsDriveLabelsV2UpdateLabelCopyModeRequest): Promise<GoogleAppsDriveLabelsV2Label>
[src]

Updates a Label's CopyMode. Changes to this policy are not revisioned, do not require publishing, and take effect immediately.

@param name

Required. The resource name of the Label to update.

§

Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

@param parent

Required. The parent Label resource name.

§

Get the constraints on the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title.

§
usersGetCapabilities(name: string, opts?: UsersGetCapabilitiesOptions): Promise<GoogleAppsDriveLabelsV2UserCapabilities>
[src]

Gets the user capabilities.

@param name

Required. The resource name of the user. Only "users/me/capabilities" is supported.