From 2590de03427dc9ef78e7811f5322a985d9d66e2b Mon Sep 17 00:00:00 2001 From: ukumar-ks Date: Fri, 3 Jul 2026 15:36:25 +0530 Subject: [PATCH 1/2] Nsf protobuf update --- keeperapi/scripts/generate-proto.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keeperapi/scripts/generate-proto.mjs b/keeperapi/scripts/generate-proto.mjs index a1060d0a..778e6e81 100644 --- a/keeperapi/scripts/generate-proto.mjs +++ b/keeperapi/scripts/generate-proto.mjs @@ -27,6 +27,8 @@ const PROTO_FILES = [ 'record_endpoints.proto', 'remove.proto', 'workflow.proto', + 'folder_access.proto', + 'record_details.proto', ] // Explicit filename overrides. 'folder' (lowercase) collides with 'Folder' on case-insensitive From 1651e554ac28a884eff670c5beda31413e26831b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 3 Jul 2026 10:10:37 +0000 Subject: [PATCH 2/2] chore: regenerate protobuf files --- keeperapi/src/proto.d.ts | 5769 +++++++++++++++++++------------ keeperapi/src/proto/Remove.js | 1249 +++++++ keeperapi/src/proto/Router.js | 36 + keeperapi/src/proto/Workflow.js | 1 - keeperapi/src/proto/index.js | 1 + keeperapi/src/proto/keeper.js | 521 +++ keeperapi/src/proto/record.js | 1948 +++++++++++ 7 files changed, 7380 insertions(+), 2145 deletions(-) create mode 100644 keeperapi/src/proto/keeper.js diff --git a/keeperapi/src/proto.d.ts b/keeperapi/src/proto.d.ts index 91690ea5..771a401c 100644 --- a/keeperapi/src/proto.d.ts +++ b/keeperapi/src/proto.d.ts @@ -69718,1445 +69718,2231 @@ export namespace record { */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } -} -/** Namespace Upsell. */ -export namespace Upsell { + /** Namespace details. */ + namespace details { - /** Properties of an UpsellRequest. */ - interface IUpsellRequest { + /** Represents a RecordDetailsService */ + class RecordDetailsService extends $protobuf.rpc.Service { - /** UpsellRequest email */ - email?: (string|null); + /** + * Constructs a new RecordDetailsService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** UpsellRequest locale */ - locale?: (string|null); + /** + * Creates new RecordDetailsService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): RecordDetailsService; - /** UpsellRequest clientVersion */ - clientVersion?: (string|null); + /** + * Calls GetRecordData. + * @param request RecordDataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecordDataResponse + */ + public getRecordData(request: record.v3.details.IRecordDataRequest, callback: record.v3.details.RecordDetailsService.GetRecordDataCallback): void; - /** UpsellRequest sessionToken */ - sessionToken?: (string|null); - } + /** + * Calls GetRecordData. + * @param request RecordDataRequest message or plain object + * @returns Promise + */ + public getRecordData(request: record.v3.details.IRecordDataRequest): Promise; - /** Represents an UpsellRequest. */ - class UpsellRequest implements IUpsellRequest { + /** + * Calls GetRecordAccessors. + * @param request RecordAccessRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecordAccessResponse + */ + public getRecordAccessors(request: record.v3.details.IRecordAccessRequest, callback: record.v3.details.RecordDetailsService.GetRecordAccessorsCallback): void; - /** - * Constructs a new UpsellRequest. - * @param [properties] Properties to set - */ - constructor(properties?: Upsell.IUpsellRequest); + /** + * Calls GetRecordAccessors. + * @param request RecordAccessRequest message or plain object + * @returns Promise + */ + public getRecordAccessors(request: record.v3.details.IRecordAccessRequest): Promise; - /** UpsellRequest email. */ - public email: string; + /** + * Calls GetRecordAccessorDetails. + * @param request RecordAccessorDetailsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecordAccessorDetailsResponse + */ + public getRecordAccessorDetails(request: record.v3.details.IRecordAccessorDetailsRequest, callback: record.v3.details.RecordDetailsService.GetRecordAccessorDetailsCallback): void; - /** UpsellRequest locale. */ - public locale: string; + /** + * Calls GetRecordAccessorDetails. + * @param request RecordAccessorDetailsRequest message or plain object + * @returns Promise + */ + public getRecordAccessorDetails(request: record.v3.details.IRecordAccessorDetailsRequest): Promise; + } - /** UpsellRequest clientVersion. */ - public clientVersion: string; + namespace RecordDetailsService { - /** UpsellRequest sessionToken. */ - public sessionToken: string; + /** + * Callback as used by {@link record.v3.details.RecordDetailsService#getRecordData}. + * @param error Error, if any + * @param [response] RecordDataResponse + */ + type GetRecordDataCallback = (error: (Error|null), response?: record.v3.details.RecordDataResponse) => void; - /** - * Creates a new UpsellRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpsellRequest instance - */ - public static create(properties?: Upsell.IUpsellRequest): Upsell.UpsellRequest; + /** + * Callback as used by {@link record.v3.details.RecordDetailsService#getRecordAccessors}. + * @param error Error, if any + * @param [response] RecordAccessResponse + */ + type GetRecordAccessorsCallback = (error: (Error|null), response?: record.v3.details.RecordAccessResponse) => void; - /** - * Encodes the specified UpsellRequest message. Does not implicitly {@link Upsell.UpsellRequest.verify|verify} messages. - * @param message UpsellRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: Upsell.IUpsellRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link record.v3.details.RecordDetailsService#getRecordAccessorDetails}. + * @param error Error, if any + * @param [response] RecordAccessorDetailsResponse + */ + type GetRecordAccessorDetailsCallback = (error: (Error|null), response?: record.v3.details.RecordAccessorDetailsResponse) => void; + } - /** - * Decodes an UpsellRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpsellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Upsell.UpsellRequest; + /** Properties of a RecordDataRequest. */ + interface IRecordDataRequest { - /** - * Creates an UpsellRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpsellRequest - */ - public static fromObject(object: { [k: string]: any }): Upsell.UpsellRequest; + /** + * represents the client time in milliseconds. Client time is used to + * adjust the record client_modified_time for each record. + */ + clientTime?: (number|null); - /** - * Creates a plain object from an UpsellRequest message. Also converts values to other types if specified. - * @param message UpsellRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: Upsell.UpsellRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** the list of record UIDs to retrieve information for. */ + recordUids?: (Uint8Array[]|null); + } - /** - * Converts this UpsellRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a record data request. Record details include the record [meta]data (title, color, etc.) */ + class RecordDataRequest implements IRecordDataRequest { - /** - * Gets the default type url for UpsellRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new RecordDataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: record.v3.details.IRecordDataRequest); - /** Properties of an UpsellResponse. */ - interface IUpsellResponse { + /** + * represents the client time in milliseconds. Client time is used to + * adjust the record client_modified_time for each record. + */ + public clientTime: number; - /** UpsellResponse UpsellBanner */ - UpsellBanner?: (Upsell.IUpsellBanner[]|null); - } + /** the list of record UIDs to retrieve information for. */ + public recordUids: Uint8Array[]; - /** Represents an UpsellResponse. */ - class UpsellResponse implements IUpsellResponse { + /** + * Creates a new RecordDataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordDataRequest instance + */ + public static create(properties?: record.v3.details.IRecordDataRequest): record.v3.details.RecordDataRequest; - /** - * Constructs a new UpsellResponse. - * @param [properties] Properties to set - */ - constructor(properties?: Upsell.IUpsellResponse); + /** + * Encodes the specified RecordDataRequest message. Does not implicitly {@link record.v3.details.RecordDataRequest.verify|verify} messages. + * @param message RecordDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: record.v3.details.IRecordDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** UpsellResponse UpsellBanner. */ - public UpsellBanner: Upsell.IUpsellBanner[]; + /** + * Decodes a RecordDataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): record.v3.details.RecordDataRequest; - /** - * Creates a new UpsellResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UpsellResponse instance - */ - public static create(properties?: Upsell.IUpsellResponse): Upsell.UpsellResponse; + /** + * Creates a RecordDataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordDataRequest + */ + public static fromObject(object: { [k: string]: any }): record.v3.details.RecordDataRequest; - /** - * Encodes the specified UpsellResponse message. Does not implicitly {@link Upsell.UpsellResponse.verify|verify} messages. - * @param message UpsellResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: Upsell.IUpsellResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a RecordDataRequest message. Also converts values to other types if specified. + * @param message RecordDataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: record.v3.details.RecordDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes an UpsellResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpsellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Upsell.UpsellResponse; + /** + * Converts this RecordDataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates an UpsellResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpsellResponse - */ - public static fromObject(object: { [k: string]: any }): Upsell.UpsellResponse; + /** + * Gets the default type url for RecordDataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from an UpsellResponse message. Also converts values to other types if specified. - * @param message UpsellResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: Upsell.UpsellResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a RecordDataResponse. */ + interface IRecordDataResponse { - /** - * Converts this UpsellResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** The data associated with the record. */ + data?: (Records.IRecordData[]|null); - /** - * Gets the default type url for UpsellResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * A list of record UIDs from the request that the calling user does not have access to. + * Each UID in this list corresponds to a record the user has no permission to access. + */ + forbiddenRecords?: (Uint8Array[]|null); + } - /** Properties of an UpsellBanner. */ - interface IUpsellBanner { + /** Response message containing records' data and a list of inaccessible records for the calling user. */ + class RecordDataResponse implements IRecordDataResponse { - /** UpsellBanner bannerId */ - bannerId?: (number|null); + /** + * Constructs a new RecordDataResponse. + * @param [properties] Properties to set + */ + constructor(properties?: record.v3.details.IRecordDataResponse); - /** UpsellBanner bannerOkAction */ - bannerOkAction?: (string|null); + /** The data associated with the record. */ + public data: Records.IRecordData[]; - /** UpsellBanner bannerOkButton */ - bannerOkButton?: (string|null); + /** + * A list of record UIDs from the request that the calling user does not have access to. + * Each UID in this list corresponds to a record the user has no permission to access. + */ + public forbiddenRecords: Uint8Array[]; - /** UpsellBanner bannerCancelAction */ - bannerCancelAction?: (string|null); + /** + * Creates a new RecordDataResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordDataResponse instance + */ + public static create(properties?: record.v3.details.IRecordDataResponse): record.v3.details.RecordDataResponse; - /** UpsellBanner bannerCancelButton */ - bannerCancelButton?: (string|null); + /** + * Encodes the specified RecordDataResponse message. Does not implicitly {@link record.v3.details.RecordDataResponse.verify|verify} messages. + * @param message RecordDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: record.v3.details.IRecordDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** UpsellBanner bannerMessage */ - bannerMessage?: (string|null); + /** + * Decodes a RecordDataResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): record.v3.details.RecordDataResponse; - /** UpsellBanner locale */ - locale?: (string|null); - } + /** + * Creates a RecordDataResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordDataResponse + */ + public static fromObject(object: { [k: string]: any }): record.v3.details.RecordDataResponse; - /** Represents an UpsellBanner. */ - class UpsellBanner implements IUpsellBanner { + /** + * Creates a plain object from a RecordDataResponse message. Also converts values to other types if specified. + * @param message RecordDataResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: record.v3.details.RecordDataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new UpsellBanner. - * @param [properties] Properties to set - */ - constructor(properties?: Upsell.IUpsellBanner); + /** + * Converts this RecordDataResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UpsellBanner bannerId. */ - public bannerId: number; + /** + * Gets the default type url for RecordDataResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** UpsellBanner bannerOkAction. */ - public bannerOkAction: string; + /** Properties of a RecordAccessRequest. */ + interface IRecordAccessRequest { - /** UpsellBanner bannerOkButton. */ - public bannerOkButton: string; + /** the list of record UIDs to retrieve information for. */ + recordUids?: (Uint8Array[]|null); - /** UpsellBanner bannerCancelAction. */ - public bannerCancelAction: string; + /** + * Pagination parameters. + * If not provided, uses defaults (page 0, size 100). + */ + page?: (keeper.api.common.IPage|null); + } - /** UpsellBanner bannerCancelButton. */ - public bannerCancelButton: string; + /** + * Represents a record accessors request. Record details include whom the record has been + * shared with (user or team), and what role and permissions the accessors have over the record. + */ + class RecordAccessRequest implements IRecordAccessRequest { - /** UpsellBanner bannerMessage. */ - public bannerMessage: string; + /** + * Constructs a new RecordAccessRequest. + * @param [properties] Properties to set + */ + constructor(properties?: record.v3.details.IRecordAccessRequest); - /** UpsellBanner locale. */ - public locale: string; + /** the list of record UIDs to retrieve information for. */ + public recordUids: Uint8Array[]; - /** - * Creates a new UpsellBanner instance using the specified properties. - * @param [properties] Properties to set - * @returns UpsellBanner instance - */ - public static create(properties?: Upsell.IUpsellBanner): Upsell.UpsellBanner; + /** + * Pagination parameters. + * If not provided, uses defaults (page 0, size 100). + */ + public page?: (keeper.api.common.IPage|null); - /** - * Encodes the specified UpsellBanner message. Does not implicitly {@link Upsell.UpsellBanner.verify|verify} messages. - * @param message UpsellBanner message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: Upsell.IUpsellBanner, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new RecordAccessRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordAccessRequest instance + */ + public static create(properties?: record.v3.details.IRecordAccessRequest): record.v3.details.RecordAccessRequest; - /** - * Decodes an UpsellBanner message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpsellBanner - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Upsell.UpsellBanner; + /** + * Encodes the specified RecordAccessRequest message. Does not implicitly {@link record.v3.details.RecordAccessRequest.verify|verify} messages. + * @param message RecordAccessRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: record.v3.details.IRecordAccessRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an UpsellBanner message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpsellBanner - */ - public static fromObject(object: { [k: string]: any }): Upsell.UpsellBanner; + /** + * Decodes a RecordAccessRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordAccessRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): record.v3.details.RecordAccessRequest; - /** - * Creates a plain object from an UpsellBanner message. Also converts values to other types if specified. - * @param message UpsellBanner - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: Upsell.UpsellBanner, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a RecordAccessRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordAccessRequest + */ + public static fromObject(object: { [k: string]: any }): record.v3.details.RecordAccessRequest; - /** - * Converts this UpsellBanner to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a RecordAccessRequest message. Also converts values to other types if specified. + * @param message RecordAccessRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: record.v3.details.RecordAccessRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for UpsellBanner - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this RecordAccessRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ClientType enum. */ - enum ClientType { - DEFAULT_CLIENT_TYPE = 0, - ALL = 1, - ANDROID = 2, - IOS = 3, - MICROSOFT = 4, - WEBAPP = 5 - } + /** + * Gets the default type url for RecordAccessRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ClientVersion enum. */ - enum ClientVersion { - DEFAULT_VERSION = 0, - SUPPORTS_ALL = 1, - BASEVERSION = 14, - ABOVERANGE = 15 - } -} + /** Properties of a RecordAccessResponse. */ + interface IRecordAccessResponse { -/** Namespace BI. */ -export namespace BI { + /** List of record access permissions, detailing the accessors and their roles. */ + recordAccesses?: (record.v3.details.IRecordAccess[]|null); - /** Currency enum. */ - enum Currency { - UNKNOWN = 0, - USD = 1, - GBP = 2, - JPY = 3, - EUR = 4, - AUD = 5, - CAD = 6 - } + /** + * A list of record UIDs from the request that the calling user does not have access to. + * Each UID in this list corresponds to a record the user has no permission to access. + */ + forbiddenRecords?: (Uint8Array[]|null); - /** Properties of a ValidateSessionTokenRequest. */ - interface IValidateSessionTokenRequest { + /** + * Pagination metadata for this response. + * Contains current page info, total count, and whether more pages exist. + */ + pageInfo?: (keeper.api.common.IPageInfo|null); + } - /** ValidateSessionTokenRequest encryptedSessionToken */ - encryptedSessionToken?: (Uint8Array|null); + /** Response message containing records' accesses and a list of inaccessible records for the calling user. */ + class RecordAccessResponse implements IRecordAccessResponse { - /** ValidateSessionTokenRequest returnMcEnterpiseIds */ - returnMcEnterpiseIds?: (boolean|null); + /** + * Constructs a new RecordAccessResponse. + * @param [properties] Properties to set + */ + constructor(properties?: record.v3.details.IRecordAccessResponse); - /** ValidateSessionTokenRequest ip */ - ip?: (string|null); - } + /** List of record access permissions, detailing the accessors and their roles. */ + public recordAccesses: record.v3.details.IRecordAccess[]; - /** Represents a ValidateSessionTokenRequest. */ - class ValidateSessionTokenRequest implements IValidateSessionTokenRequest { + /** + * A list of record UIDs from the request that the calling user does not have access to. + * Each UID in this list corresponds to a record the user has no permission to access. + */ + public forbiddenRecords: Uint8Array[]; - /** - * Constructs a new ValidateSessionTokenRequest. - * @param [properties] Properties to set - */ - constructor(properties?: BI.IValidateSessionTokenRequest); + /** + * Pagination metadata for this response. + * Contains current page info, total count, and whether more pages exist. + */ + public pageInfo?: (keeper.api.common.IPageInfo|null); - /** ValidateSessionTokenRequest encryptedSessionToken. */ - public encryptedSessionToken: Uint8Array; + /** + * Creates a new RecordAccessResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordAccessResponse instance + */ + public static create(properties?: record.v3.details.IRecordAccessResponse): record.v3.details.RecordAccessResponse; - /** ValidateSessionTokenRequest returnMcEnterpiseIds. */ - public returnMcEnterpiseIds: boolean; + /** + * Encodes the specified RecordAccessResponse message. Does not implicitly {@link record.v3.details.RecordAccessResponse.verify|verify} messages. + * @param message RecordAccessResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: record.v3.details.IRecordAccessResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** ValidateSessionTokenRequest ip. */ - public ip: string; + /** + * Decodes a RecordAccessResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordAccessResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): record.v3.details.RecordAccessResponse; - /** - * Creates a new ValidateSessionTokenRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateSessionTokenRequest instance - */ - public static create(properties?: BI.IValidateSessionTokenRequest): BI.ValidateSessionTokenRequest; + /** + * Creates a RecordAccessResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordAccessResponse + */ + public static fromObject(object: { [k: string]: any }): record.v3.details.RecordAccessResponse; - /** - * Encodes the specified ValidateSessionTokenRequest message. Does not implicitly {@link BI.ValidateSessionTokenRequest.verify|verify} messages. - * @param message ValidateSessionTokenRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: BI.IValidateSessionTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a RecordAccessResponse message. Also converts values to other types if specified. + * @param message RecordAccessResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: record.v3.details.RecordAccessResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ValidateSessionTokenRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateSessionTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.ValidateSessionTokenRequest; + /** + * Converts this RecordAccessResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a ValidateSessionTokenRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateSessionTokenRequest - */ - public static fromObject(object: { [k: string]: any }): BI.ValidateSessionTokenRequest; + /** + * Gets the default type url for RecordAccessResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from a ValidateSessionTokenRequest message. Also converts values to other types if specified. - * @param message ValidateSessionTokenRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: BI.ValidateSessionTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a RecordAccessorDetailsRequest. */ + interface IRecordAccessorDetailsRequest { - /** - * Converts this ValidateSessionTokenRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** The record UID to retrieve information for. */ + recordUid?: (Uint8Array|null); - /** - * Gets the default type url for ValidateSessionTokenRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** The accessor UID (user or team) to retrieve information for. */ + accessorUid?: (Uint8Array|null); - /** Properties of a ValidateSessionTokenResponse. */ - interface IValidateSessionTokenResponse { + /** + * Pagination parameters. + * If not provided, uses defaults (page 0, size 100). + */ + page?: (keeper.api.common.IPage|null); + } - /** ValidateSessionTokenResponse username */ - username?: (string|null); + /** Represents a record accessor details request. */ + class RecordAccessorDetailsRequest implements IRecordAccessorDetailsRequest { - /** ValidateSessionTokenResponse userId */ - userId?: (number|null); + /** + * Constructs a new RecordAccessorDetailsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: record.v3.details.IRecordAccessorDetailsRequest); - /** ValidateSessionTokenResponse enterpriseUserId */ - enterpriseUserId?: (number|null); + /** The record UID to retrieve information for. */ + public recordUid: Uint8Array; - /** ValidateSessionTokenResponse status */ - status?: (BI.ValidateSessionTokenResponse.Status|null); + /** The accessor UID (user or team) to retrieve information for. */ + public accessorUid: Uint8Array; - /** ValidateSessionTokenResponse statusMessage */ - statusMessage?: (string|null); + /** + * Pagination parameters. + * If not provided, uses defaults (page 0, size 100). + */ + public page?: (keeper.api.common.IPage|null); - /** ValidateSessionTokenResponse mcEnterpriseIds */ - mcEnterpriseIds?: (number[]|null); + /** + * Creates a new RecordAccessorDetailsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordAccessorDetailsRequest instance + */ + public static create(properties?: record.v3.details.IRecordAccessorDetailsRequest): record.v3.details.RecordAccessorDetailsRequest; - /** ValidateSessionTokenResponse hasMSPPermission */ - hasMSPPermission?: (boolean|null); + /** + * Encodes the specified RecordAccessorDetailsRequest message. Does not implicitly {@link record.v3.details.RecordAccessorDetailsRequest.verify|verify} messages. + * @param message RecordAccessorDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: record.v3.details.IRecordAccessorDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ValidateSessionTokenResponse deletedMcEnterpriseIds */ - deletedMcEnterpriseIds?: (number[]|null); - } + /** + * Decodes a RecordAccessorDetailsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordAccessorDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): record.v3.details.RecordAccessorDetailsRequest; - /** Represents a ValidateSessionTokenResponse. */ - class ValidateSessionTokenResponse implements IValidateSessionTokenResponse { + /** + * Creates a RecordAccessorDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordAccessorDetailsRequest + */ + public static fromObject(object: { [k: string]: any }): record.v3.details.RecordAccessorDetailsRequest; - /** - * Constructs a new ValidateSessionTokenResponse. - * @param [properties] Properties to set - */ - constructor(properties?: BI.IValidateSessionTokenResponse); + /** + * Creates a plain object from a RecordAccessorDetailsRequest message. Also converts values to other types if specified. + * @param message RecordAccessorDetailsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: record.v3.details.RecordAccessorDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ValidateSessionTokenResponse username. */ - public username: string; + /** + * Converts this RecordAccessorDetailsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ValidateSessionTokenResponse userId. */ - public userId: number; + /** + * Gets the default type url for RecordAccessorDetailsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ValidateSessionTokenResponse enterpriseUserId. */ - public enterpriseUserId: number; + /** Properties of a RecordAccessorDetailsResponse. */ + interface IRecordAccessorDetailsResponse { - /** ValidateSessionTokenResponse status. */ - public status: BI.ValidateSessionTokenResponse.Status; + /** Set if has direct access to the record. */ + recordAccessData?: (Folder.IRecordAccessData|null); - /** ValidateSessionTokenResponse statusMessage. */ - public statusMessage: string; + /** The list of folder the user has access and that contain the record. */ + folderAccessData?: (Folder.IFolderAccessData[]|null); - /** ValidateSessionTokenResponse mcEnterpriseIds. */ - public mcEnterpriseIds: number[]; + /** + * Pagination metadata for this response. + * Contains current page info, total count, and whether more pages exist. + */ + pageInfo?: (keeper.api.common.IPageInfo|null); + } - /** ValidateSessionTokenResponse hasMSPPermission. */ - public hasMSPPermission: boolean; + /** + * Represents a record accessor details response. + * Record accessor details include information on how a specific accessor obtained access to a record. + */ + class RecordAccessorDetailsResponse implements IRecordAccessorDetailsResponse { - /** ValidateSessionTokenResponse deletedMcEnterpriseIds. */ - public deletedMcEnterpriseIds: number[]; + /** + * Constructs a new RecordAccessorDetailsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: record.v3.details.IRecordAccessorDetailsResponse); - /** - * Creates a new ValidateSessionTokenResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateSessionTokenResponse instance - */ - public static create(properties?: BI.IValidateSessionTokenResponse): BI.ValidateSessionTokenResponse; + /** Set if has direct access to the record. */ + public recordAccessData?: (Folder.IRecordAccessData|null); - /** - * Encodes the specified ValidateSessionTokenResponse message. Does not implicitly {@link BI.ValidateSessionTokenResponse.verify|verify} messages. - * @param message ValidateSessionTokenResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: BI.IValidateSessionTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** The list of folder the user has access and that contain the record. */ + public folderAccessData: Folder.IFolderAccessData[]; - /** - * Decodes a ValidateSessionTokenResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateSessionTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.ValidateSessionTokenResponse; + /** + * * Pagination metadata for this response. + * * Contains current page info, total count, and whether more pages exist. + */ + public pageInfo?: (keeper.api.common.IPageInfo|null); - /** - * Creates a ValidateSessionTokenResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateSessionTokenResponse - */ - public static fromObject(object: { [k: string]: any }): BI.ValidateSessionTokenResponse; + /** + * Creates a new RecordAccessorDetailsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordAccessorDetailsResponse instance + */ + public static create(properties?: record.v3.details.IRecordAccessorDetailsResponse): record.v3.details.RecordAccessorDetailsResponse; - /** - * Creates a plain object from a ValidateSessionTokenResponse message. Also converts values to other types if specified. - * @param message ValidateSessionTokenResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: BI.ValidateSessionTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified RecordAccessorDetailsResponse message. Does not implicitly {@link record.v3.details.RecordAccessorDetailsResponse.verify|verify} messages. + * @param message RecordAccessorDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: record.v3.details.IRecordAccessorDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ValidateSessionTokenResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a RecordAccessorDetailsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordAccessorDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): record.v3.details.RecordAccessorDetailsResponse; - /** - * Gets the default type url for ValidateSessionTokenResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a RecordAccessorDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordAccessorDetailsResponse + */ + public static fromObject(object: { [k: string]: any }): record.v3.details.RecordAccessorDetailsResponse; - namespace ValidateSessionTokenResponse { + /** + * Creates a plain object from a RecordAccessorDetailsResponse message. Also converts values to other types if specified. + * @param message RecordAccessorDetailsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: record.v3.details.RecordAccessorDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Status enum. */ - enum Status { - VALID = 0, - NOT_VALID = 1, - EXPIRED = 2, - IP_BLOCKED = 3, - INVALID_CLIENT_VERSION = 4 - } - } + /** + * Converts this RecordAccessorDetailsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a SubscriptionStatusRequest. */ - interface ISubscriptionStatusRequest { - } + /** + * Gets the default type url for RecordAccessorDetailsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a SubscriptionStatusRequest. */ - class SubscriptionStatusRequest implements ISubscriptionStatusRequest { + /** Properties of a RecordAccess. */ + interface IRecordAccess { - /** - * Constructs a new SubscriptionStatusRequest. - * @param [properties] Properties to set - */ - constructor(properties?: BI.ISubscriptionStatusRequest); + /** Core access details including permissions, role, and metadata. */ + data?: (Folder.IRecordAccessData|null); - /** - * Creates a new SubscriptionStatusRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SubscriptionStatusRequest instance - */ - public static create(properties?: BI.ISubscriptionStatusRequest): BI.SubscriptionStatusRequest; + /** The record accessor. */ + accessorInfo?: (record.v3.details.IAccessorInfo|null); + } - /** - * Encodes the specified SubscriptionStatusRequest message. Does not implicitly {@link BI.SubscriptionStatusRequest.verify|verify} messages. - * @param message SubscriptionStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: BI.ISubscriptionStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Describes the access a user has to a specific record. + * Includes ownership, access roles, and additional sharing metadata. + */ + class RecordAccess implements IRecordAccess { - /** - * Decodes a SubscriptionStatusRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SubscriptionStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.SubscriptionStatusRequest; + /** + * Constructs a new RecordAccess. + * @param [properties] Properties to set + */ + constructor(properties?: record.v3.details.IRecordAccess); - /** - * Creates a SubscriptionStatusRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SubscriptionStatusRequest - */ - public static fromObject(object: { [k: string]: any }): BI.SubscriptionStatusRequest; + /** Core access details including permissions, role, and metadata. */ + public data?: (Folder.IRecordAccessData|null); - /** - * Creates a plain object from a SubscriptionStatusRequest message. Also converts values to other types if specified. - * @param message SubscriptionStatusRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: BI.SubscriptionStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** The record accessor. */ + public accessorInfo?: (record.v3.details.IAccessorInfo|null); - /** - * Converts this SubscriptionStatusRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new RecordAccess instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordAccess instance + */ + public static create(properties?: record.v3.details.IRecordAccess): record.v3.details.RecordAccess; - /** - * Gets the default type url for SubscriptionStatusRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified RecordAccess message. Does not implicitly {@link record.v3.details.RecordAccess.verify|verify} messages. + * @param message RecordAccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: record.v3.details.IRecordAccess, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a SubscriptionStatusResponse. */ - interface ISubscriptionStatusResponse { - - /** SubscriptionStatusResponse autoRenewal */ - autoRenewal?: (BI.IAutoRenewal|null); - - /** SubscriptionStatusResponse currentPaymentMethod */ - currentPaymentMethod?: (BI.IPaymentMethod|null); - - /** SubscriptionStatusResponse checkoutLink */ - checkoutLink?: (string|null); - - /** SubscriptionStatusResponse licenseCreateDate */ - licenseCreateDate?: (number|null); + /** + * Decodes a RecordAccess message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordAccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): record.v3.details.RecordAccess; - /** SubscriptionStatusResponse isDistributor */ - isDistributor?: (boolean|null); + /** + * Creates a RecordAccess message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordAccess + */ + public static fromObject(object: { [k: string]: any }): record.v3.details.RecordAccess; - /** SubscriptionStatusResponse isLegacyMsp */ - isLegacyMsp?: (boolean|null); + /** + * Creates a plain object from a RecordAccess message. Also converts values to other types if specified. + * @param message RecordAccess + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: record.v3.details.RecordAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SubscriptionStatusResponse licenseStats */ - licenseStats?: (BI.ILicenseStats[]|null); + /** + * Converts this RecordAccess to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SubscriptionStatusResponse gradientStatus */ - gradientStatus?: (BI.GradientIntegrationStatus|null); + /** + * Gets the default type url for RecordAccess + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SubscriptionStatusResponse hideTrialBanner */ - hideTrialBanner?: (boolean|null); + /** Properties of an AccessorInfo. */ + interface IAccessorInfo { - /** SubscriptionStatusResponse gradientLastSyncDate */ - gradientLastSyncDate?: (string|null); + /** accessor name */ + name?: (string|null); + } - /** SubscriptionStatusResponse gradientNextSyncDate */ - gradientNextSyncDate?: (string|null); + /** The entity representing the record accessor. Either a team or a user */ + class AccessorInfo implements IAccessorInfo { - /** SubscriptionStatusResponse isGradientMappingPending */ - isGradientMappingPending?: (boolean|null); + /** + * Constructs a new AccessorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: record.v3.details.IAccessorInfo); - /** SubscriptionStatusResponse nhi */ - nhi?: (BI.INhiBilling|null); + /** accessor name */ + public name: string; - /** SubscriptionStatusResponse freeKsmApiCallsCount */ - freeKsmApiCallsCount?: (number|null); + /** + * Creates a new AccessorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessorInfo instance + */ + public static create(properties?: record.v3.details.IAccessorInfo): record.v3.details.AccessorInfo; - /** SubscriptionStatusResponse ksm */ - ksm?: (BI.IKsmBilling|null); - } + /** + * Encodes the specified AccessorInfo message. Does not implicitly {@link record.v3.details.AccessorInfo.verify|verify} messages. + * @param message AccessorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: record.v3.details.IAccessorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a SubscriptionStatusResponse. */ - class SubscriptionStatusResponse implements ISubscriptionStatusResponse { + /** + * Decodes an AccessorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): record.v3.details.AccessorInfo; - /** - * Constructs a new SubscriptionStatusResponse. - * @param [properties] Properties to set - */ - constructor(properties?: BI.ISubscriptionStatusResponse); + /** + * Creates an AccessorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessorInfo + */ + public static fromObject(object: { [k: string]: any }): record.v3.details.AccessorInfo; - /** SubscriptionStatusResponse autoRenewal. */ - public autoRenewal?: (BI.IAutoRenewal|null); + /** + * Creates a plain object from an AccessorInfo message. Also converts values to other types if specified. + * @param message AccessorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: record.v3.details.AccessorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SubscriptionStatusResponse currentPaymentMethod. */ - public currentPaymentMethod?: (BI.IPaymentMethod|null); + /** + * Converts this AccessorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SubscriptionStatusResponse checkoutLink. */ - public checkoutLink: string; + /** + * Gets the default type url for AccessorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } +} - /** SubscriptionStatusResponse licenseCreateDate. */ - public licenseCreateDate: number; +/** Namespace Upsell. */ +export namespace Upsell { - /** SubscriptionStatusResponse isDistributor. */ - public isDistributor: boolean; + /** Properties of an UpsellRequest. */ + interface IUpsellRequest { - /** SubscriptionStatusResponse isLegacyMsp. */ - public isLegacyMsp: boolean; + /** UpsellRequest email */ + email?: (string|null); - /** SubscriptionStatusResponse licenseStats. */ - public licenseStats: BI.ILicenseStats[]; + /** UpsellRequest locale */ + locale?: (string|null); - /** SubscriptionStatusResponse gradientStatus. */ - public gradientStatus: BI.GradientIntegrationStatus; + /** UpsellRequest clientVersion */ + clientVersion?: (string|null); - /** SubscriptionStatusResponse hideTrialBanner. */ - public hideTrialBanner: boolean; + /** UpsellRequest sessionToken */ + sessionToken?: (string|null); + } - /** SubscriptionStatusResponse gradientLastSyncDate. */ - public gradientLastSyncDate: string; + /** Represents an UpsellRequest. */ + class UpsellRequest implements IUpsellRequest { - /** SubscriptionStatusResponse gradientNextSyncDate. */ - public gradientNextSyncDate: string; + /** + * Constructs a new UpsellRequest. + * @param [properties] Properties to set + */ + constructor(properties?: Upsell.IUpsellRequest); - /** SubscriptionStatusResponse isGradientMappingPending. */ - public isGradientMappingPending: boolean; + /** UpsellRequest email. */ + public email: string; - /** SubscriptionStatusResponse nhi. */ - public nhi?: (BI.INhiBilling|null); + /** UpsellRequest locale. */ + public locale: string; - /** SubscriptionStatusResponse freeKsmApiCallsCount. */ - public freeKsmApiCallsCount: number; + /** UpsellRequest clientVersion. */ + public clientVersion: string; - /** SubscriptionStatusResponse ksm. */ - public ksm?: (BI.IKsmBilling|null); + /** UpsellRequest sessionToken. */ + public sessionToken: string; /** - * Creates a new SubscriptionStatusResponse instance using the specified properties. + * Creates a new UpsellRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SubscriptionStatusResponse instance + * @returns UpsellRequest instance */ - public static create(properties?: BI.ISubscriptionStatusResponse): BI.SubscriptionStatusResponse; + public static create(properties?: Upsell.IUpsellRequest): Upsell.UpsellRequest; /** - * Encodes the specified SubscriptionStatusResponse message. Does not implicitly {@link BI.SubscriptionStatusResponse.verify|verify} messages. - * @param message SubscriptionStatusResponse message or plain object to encode + * Encodes the specified UpsellRequest message. Does not implicitly {@link Upsell.UpsellRequest.verify|verify} messages. + * @param message UpsellRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: BI.ISubscriptionStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: Upsell.IUpsellRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SubscriptionStatusResponse message from the specified reader or buffer. + * Decodes an UpsellRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SubscriptionStatusResponse + * @returns UpsellRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.SubscriptionStatusResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Upsell.UpsellRequest; /** - * Creates a SubscriptionStatusResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpsellRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SubscriptionStatusResponse + * @returns UpsellRequest */ - public static fromObject(object: { [k: string]: any }): BI.SubscriptionStatusResponse; + public static fromObject(object: { [k: string]: any }): Upsell.UpsellRequest; /** - * Creates a plain object from a SubscriptionStatusResponse message. Also converts values to other types if specified. - * @param message SubscriptionStatusResponse + * Creates a plain object from an UpsellRequest message. Also converts values to other types if specified. + * @param message UpsellRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: BI.SubscriptionStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: Upsell.UpsellRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SubscriptionStatusResponse to JSON. + * Converts this UpsellRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SubscriptionStatusResponse + * Gets the default type url for UpsellRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a KsmBilling. */ - interface IKsmBilling { - - /** KsmBilling billingStartTimestamp */ - billingStartTimestamp?: (number|null); - - /** KsmBilling billingEndTimestamp */ - billingEndTimestamp?: (number|null); - - /** KsmBilling currentTierId */ - currentTierId?: (number|null); - - /** KsmBilling enterpriseBlocks */ - enterpriseBlocks?: (number|null); + /** Properties of an UpsellResponse. */ + interface IUpsellResponse { - /** KsmBilling currentTierCeiling */ - currentTierCeiling?: (number|null); + /** UpsellResponse UpsellBanner */ + UpsellBanner?: (Upsell.IUpsellBanner[]|null); } - /** Represents a KsmBilling. */ - class KsmBilling implements IKsmBilling { + /** Represents an UpsellResponse. */ + class UpsellResponse implements IUpsellResponse { /** - * Constructs a new KsmBilling. + * Constructs a new UpsellResponse. * @param [properties] Properties to set */ - constructor(properties?: BI.IKsmBilling); - - /** KsmBilling billingStartTimestamp. */ - public billingStartTimestamp: number; - - /** KsmBilling billingEndTimestamp. */ - public billingEndTimestamp: number; - - /** KsmBilling currentTierId. */ - public currentTierId: number; - - /** KsmBilling enterpriseBlocks. */ - public enterpriseBlocks: number; + constructor(properties?: Upsell.IUpsellResponse); - /** KsmBilling currentTierCeiling. */ - public currentTierCeiling: number; + /** UpsellResponse UpsellBanner. */ + public UpsellBanner: Upsell.IUpsellBanner[]; /** - * Creates a new KsmBilling instance using the specified properties. + * Creates a new UpsellResponse instance using the specified properties. * @param [properties] Properties to set - * @returns KsmBilling instance + * @returns UpsellResponse instance */ - public static create(properties?: BI.IKsmBilling): BI.KsmBilling; + public static create(properties?: Upsell.IUpsellResponse): Upsell.UpsellResponse; /** - * Encodes the specified KsmBilling message. Does not implicitly {@link BI.KsmBilling.verify|verify} messages. - * @param message KsmBilling message or plain object to encode + * Encodes the specified UpsellResponse message. Does not implicitly {@link Upsell.UpsellResponse.verify|verify} messages. + * @param message UpsellResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: BI.IKsmBilling, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: Upsell.IUpsellResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KsmBilling message from the specified reader or buffer. + * Decodes an UpsellResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KsmBilling + * @returns UpsellResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.KsmBilling; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Upsell.UpsellResponse; /** - * Creates a KsmBilling message from a plain object. Also converts values to their respective internal types. + * Creates an UpsellResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KsmBilling + * @returns UpsellResponse */ - public static fromObject(object: { [k: string]: any }): BI.KsmBilling; + public static fromObject(object: { [k: string]: any }): Upsell.UpsellResponse; /** - * Creates a plain object from a KsmBilling message. Also converts values to other types if specified. - * @param message KsmBilling + * Creates a plain object from an UpsellResponse message. Also converts values to other types if specified. + * @param message UpsellResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: BI.KsmBilling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: Upsell.UpsellResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KsmBilling to JSON. + * Converts this UpsellResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KsmBilling + * Gets the default type url for UpsellResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NhiBilling. */ - interface INhiBilling { + /** Properties of an UpsellBanner. */ + interface IUpsellBanner { - /** NhiBilling billingStartTimestamp */ - billingStartTimestamp?: (number|null); + /** UpsellBanner bannerId */ + bannerId?: (number|null); - /** NhiBilling billingEndTimestamp */ - billingEndTimestamp?: (number|null); + /** UpsellBanner bannerOkAction */ + bannerOkAction?: (string|null); - /** NhiBilling currentTierId */ - currentTierId?: (number|null); + /** UpsellBanner bannerOkButton */ + bannerOkButton?: (string|null); - /** NhiBilling enterpriseBlocks */ - enterpriseBlocks?: (number|null); + /** UpsellBanner bannerCancelAction */ + bannerCancelAction?: (string|null); - /** NhiBilling currentTierCeiling */ - currentTierCeiling?: (number|null); + /** UpsellBanner bannerCancelButton */ + bannerCancelButton?: (string|null); - /** NhiBilling billingPeriods */ - billingPeriods?: (BI.INhiBillingPeriod[]|null); + /** UpsellBanner bannerMessage */ + bannerMessage?: (string|null); + + /** UpsellBanner locale */ + locale?: (string|null); } - /** Represents a NhiBilling. */ - class NhiBilling implements INhiBilling { + /** Represents an UpsellBanner. */ + class UpsellBanner implements IUpsellBanner { /** - * Constructs a new NhiBilling. + * Constructs a new UpsellBanner. * @param [properties] Properties to set */ - constructor(properties?: BI.INhiBilling); + constructor(properties?: Upsell.IUpsellBanner); - /** NhiBilling billingStartTimestamp. */ - public billingStartTimestamp: number; + /** UpsellBanner bannerId. */ + public bannerId: number; - /** NhiBilling billingEndTimestamp. */ - public billingEndTimestamp: number; + /** UpsellBanner bannerOkAction. */ + public bannerOkAction: string; - /** NhiBilling currentTierId. */ - public currentTierId: number; + /** UpsellBanner bannerOkButton. */ + public bannerOkButton: string; - /** NhiBilling enterpriseBlocks. */ - public enterpriseBlocks: number; + /** UpsellBanner bannerCancelAction. */ + public bannerCancelAction: string; - /** NhiBilling currentTierCeiling. */ - public currentTierCeiling: number; + /** UpsellBanner bannerCancelButton. */ + public bannerCancelButton: string; - /** NhiBilling billingPeriods. */ - public billingPeriods: BI.INhiBillingPeriod[]; + /** UpsellBanner bannerMessage. */ + public bannerMessage: string; + + /** UpsellBanner locale. */ + public locale: string; /** - * Creates a new NhiBilling instance using the specified properties. + * Creates a new UpsellBanner instance using the specified properties. * @param [properties] Properties to set - * @returns NhiBilling instance + * @returns UpsellBanner instance */ - public static create(properties?: BI.INhiBilling): BI.NhiBilling; + public static create(properties?: Upsell.IUpsellBanner): Upsell.UpsellBanner; /** - * Encodes the specified NhiBilling message. Does not implicitly {@link BI.NhiBilling.verify|verify} messages. - * @param message NhiBilling message or plain object to encode + * Encodes the specified UpsellBanner message. Does not implicitly {@link Upsell.UpsellBanner.verify|verify} messages. + * @param message UpsellBanner message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: BI.INhiBilling, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: Upsell.IUpsellBanner, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NhiBilling message from the specified reader or buffer. + * Decodes an UpsellBanner message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NhiBilling + * @returns UpsellBanner * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.NhiBilling; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Upsell.UpsellBanner; /** - * Creates a NhiBilling message from a plain object. Also converts values to their respective internal types. + * Creates an UpsellBanner message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NhiBilling + * @returns UpsellBanner */ - public static fromObject(object: { [k: string]: any }): BI.NhiBilling; + public static fromObject(object: { [k: string]: any }): Upsell.UpsellBanner; /** - * Creates a plain object from a NhiBilling message. Also converts values to other types if specified. - * @param message NhiBilling + * Creates a plain object from an UpsellBanner message. Also converts values to other types if specified. + * @param message UpsellBanner * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: BI.NhiBilling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: Upsell.UpsellBanner, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NhiBilling to JSON. + * Converts this UpsellBanner to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NhiBilling + * Gets the default type url for UpsellBanner * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NhiBillingPeriod. */ - interface INhiBillingPeriod { + /** ClientType enum. */ + enum ClientType { + DEFAULT_CLIENT_TYPE = 0, + ALL = 1, + ANDROID = 2, + IOS = 3, + MICROSOFT = 4, + WEBAPP = 5 + } - /** NhiBillingPeriod startTimestamp */ - startTimestamp?: (number|null); + /** ClientVersion enum. */ + enum ClientVersion { + DEFAULT_VERSION = 0, + SUPPORTS_ALL = 1, + BASEVERSION = 14, + ABOVERANGE = 15 + } +} - /** NhiBillingPeriod endTimestamp */ - endTimestamp?: (number|null); +/** Namespace BI. */ +export namespace BI { + + /** Currency enum. */ + enum Currency { + UNKNOWN = 0, + USD = 1, + GBP = 2, + JPY = 3, + EUR = 4, + AUD = 5, + CAD = 6 } - /** Represents a NhiBillingPeriod. */ - class NhiBillingPeriod implements INhiBillingPeriod { + /** Properties of a ValidateSessionTokenRequest. */ + interface IValidateSessionTokenRequest { + + /** ValidateSessionTokenRequest encryptedSessionToken */ + encryptedSessionToken?: (Uint8Array|null); + + /** ValidateSessionTokenRequest returnMcEnterpiseIds */ + returnMcEnterpiseIds?: (boolean|null); + + /** ValidateSessionTokenRequest ip */ + ip?: (string|null); + } + + /** Represents a ValidateSessionTokenRequest. */ + class ValidateSessionTokenRequest implements IValidateSessionTokenRequest { /** - * Constructs a new NhiBillingPeriod. + * Constructs a new ValidateSessionTokenRequest. * @param [properties] Properties to set */ - constructor(properties?: BI.INhiBillingPeriod); + constructor(properties?: BI.IValidateSessionTokenRequest); - /** NhiBillingPeriod startTimestamp. */ - public startTimestamp: number; + /** ValidateSessionTokenRequest encryptedSessionToken. */ + public encryptedSessionToken: Uint8Array; - /** NhiBillingPeriod endTimestamp. */ - public endTimestamp: number; + /** ValidateSessionTokenRequest returnMcEnterpiseIds. */ + public returnMcEnterpiseIds: boolean; + + /** ValidateSessionTokenRequest ip. */ + public ip: string; /** - * Creates a new NhiBillingPeriod instance using the specified properties. + * Creates a new ValidateSessionTokenRequest instance using the specified properties. * @param [properties] Properties to set - * @returns NhiBillingPeriod instance + * @returns ValidateSessionTokenRequest instance */ - public static create(properties?: BI.INhiBillingPeriod): BI.NhiBillingPeriod; + public static create(properties?: BI.IValidateSessionTokenRequest): BI.ValidateSessionTokenRequest; /** - * Encodes the specified NhiBillingPeriod message. Does not implicitly {@link BI.NhiBillingPeriod.verify|verify} messages. - * @param message NhiBillingPeriod message or plain object to encode + * Encodes the specified ValidateSessionTokenRequest message. Does not implicitly {@link BI.ValidateSessionTokenRequest.verify|verify} messages. + * @param message ValidateSessionTokenRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: BI.INhiBillingPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: BI.IValidateSessionTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NhiBillingPeriod message from the specified reader or buffer. + * Decodes a ValidateSessionTokenRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NhiBillingPeriod + * @returns ValidateSessionTokenRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.NhiBillingPeriod; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.ValidateSessionTokenRequest; /** - * Creates a NhiBillingPeriod message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateSessionTokenRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NhiBillingPeriod + * @returns ValidateSessionTokenRequest */ - public static fromObject(object: { [k: string]: any }): BI.NhiBillingPeriod; + public static fromObject(object: { [k: string]: any }): BI.ValidateSessionTokenRequest; /** - * Creates a plain object from a NhiBillingPeriod message. Also converts values to other types if specified. - * @param message NhiBillingPeriod + * Creates a plain object from a ValidateSessionTokenRequest message. Also converts values to other types if specified. + * @param message ValidateSessionTokenRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: BI.NhiBillingPeriod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: BI.ValidateSessionTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NhiBillingPeriod to JSON. + * Converts this ValidateSessionTokenRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NhiBillingPeriod + * Gets the default type url for ValidateSessionTokenRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LicenseStats. */ - interface ILicenseStats { + /** Properties of a ValidateSessionTokenResponse. */ + interface IValidateSessionTokenResponse { - /** LicenseStats type */ - type?: (BI.LicenseStats.Type|null); + /** ValidateSessionTokenResponse username */ + username?: (string|null); - /** LicenseStats available */ - available?: (number|null); + /** ValidateSessionTokenResponse userId */ + userId?: (number|null); - /** LicenseStats used */ - used?: (number|null); + /** ValidateSessionTokenResponse enterpriseUserId */ + enterpriseUserId?: (number|null); + + /** ValidateSessionTokenResponse status */ + status?: (BI.ValidateSessionTokenResponse.Status|null); + + /** ValidateSessionTokenResponse statusMessage */ + statusMessage?: (string|null); + + /** ValidateSessionTokenResponse mcEnterpriseIds */ + mcEnterpriseIds?: (number[]|null); + + /** ValidateSessionTokenResponse hasMSPPermission */ + hasMSPPermission?: (boolean|null); + + /** ValidateSessionTokenResponse deletedMcEnterpriseIds */ + deletedMcEnterpriseIds?: (number[]|null); } - /** Represents a LicenseStats. */ - class LicenseStats implements ILicenseStats { + /** Represents a ValidateSessionTokenResponse. */ + class ValidateSessionTokenResponse implements IValidateSessionTokenResponse { /** - * Constructs a new LicenseStats. + * Constructs a new ValidateSessionTokenResponse. * @param [properties] Properties to set */ - constructor(properties?: BI.ILicenseStats); + constructor(properties?: BI.IValidateSessionTokenResponse); - /** LicenseStats type. */ - public type: BI.LicenseStats.Type; + /** ValidateSessionTokenResponse username. */ + public username: string; - /** LicenseStats available. */ - public available: number; + /** ValidateSessionTokenResponse userId. */ + public userId: number; - /** LicenseStats used. */ - public used: number; + /** ValidateSessionTokenResponse enterpriseUserId. */ + public enterpriseUserId: number; + + /** ValidateSessionTokenResponse status. */ + public status: BI.ValidateSessionTokenResponse.Status; + + /** ValidateSessionTokenResponse statusMessage. */ + public statusMessage: string; + + /** ValidateSessionTokenResponse mcEnterpriseIds. */ + public mcEnterpriseIds: number[]; + + /** ValidateSessionTokenResponse hasMSPPermission. */ + public hasMSPPermission: boolean; + + /** ValidateSessionTokenResponse deletedMcEnterpriseIds. */ + public deletedMcEnterpriseIds: number[]; /** - * Creates a new LicenseStats instance using the specified properties. + * Creates a new ValidateSessionTokenResponse instance using the specified properties. * @param [properties] Properties to set - * @returns LicenseStats instance + * @returns ValidateSessionTokenResponse instance */ - public static create(properties?: BI.ILicenseStats): BI.LicenseStats; + public static create(properties?: BI.IValidateSessionTokenResponse): BI.ValidateSessionTokenResponse; /** - * Encodes the specified LicenseStats message. Does not implicitly {@link BI.LicenseStats.verify|verify} messages. - * @param message LicenseStats message or plain object to encode + * Encodes the specified ValidateSessionTokenResponse message. Does not implicitly {@link BI.ValidateSessionTokenResponse.verify|verify} messages. + * @param message ValidateSessionTokenResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: BI.ILicenseStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: BI.IValidateSessionTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LicenseStats message from the specified reader or buffer. + * Decodes a ValidateSessionTokenResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LicenseStats + * @returns ValidateSessionTokenResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.LicenseStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.ValidateSessionTokenResponse; /** - * Creates a LicenseStats message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateSessionTokenResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LicenseStats + * @returns ValidateSessionTokenResponse */ - public static fromObject(object: { [k: string]: any }): BI.LicenseStats; + public static fromObject(object: { [k: string]: any }): BI.ValidateSessionTokenResponse; /** - * Creates a plain object from a LicenseStats message. Also converts values to other types if specified. - * @param message LicenseStats + * Creates a plain object from a ValidateSessionTokenResponse message. Also converts values to other types if specified. + * @param message ValidateSessionTokenResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: BI.LicenseStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: BI.ValidateSessionTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LicenseStats to JSON. + * Converts this ValidateSessionTokenResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LicenseStats + * Gets the default type url for ValidateSessionTokenResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace LicenseStats { + namespace ValidateSessionTokenResponse { - /** Type enum. */ - enum Type { - LICENSE_STAT_UNKNOWN = 0, - MSP_BASE = 1, - MC_BUSINESS = 2, - MC_BUSINESS_PLUS = 3, - MC_ENTERPRISE = 4, - MC_ENTERPRISE_PLUS = 5, - B2B_BUSINESS_STARTER = 6, - B2B_BUSINESS = 7, - B2B_ENTERPRISE = 8 + /** Status enum. */ + enum Status { + VALID = 0, + NOT_VALID = 1, + EXPIRED = 2, + IP_BLOCKED = 3, + INVALID_CLIENT_VERSION = 4 } } - /** Properties of an AutoRenewal. */ - interface IAutoRenewal { - - /** AutoRenewal nextOn */ - nextOn?: (number|null); - - /** AutoRenewal daysLeft */ - daysLeft?: (number|null); - - /** AutoRenewal isTrial */ - isTrial?: (boolean|null); + /** Properties of a SubscriptionStatusRequest. */ + interface ISubscriptionStatusRequest { } - /** Represents an AutoRenewal. */ - class AutoRenewal implements IAutoRenewal { + /** Represents a SubscriptionStatusRequest. */ + class SubscriptionStatusRequest implements ISubscriptionStatusRequest { /** - * Constructs a new AutoRenewal. + * Constructs a new SubscriptionStatusRequest. * @param [properties] Properties to set */ - constructor(properties?: BI.IAutoRenewal); - - /** AutoRenewal nextOn. */ - public nextOn: number; - - /** AutoRenewal daysLeft. */ - public daysLeft: number; - - /** AutoRenewal isTrial. */ - public isTrial: boolean; + constructor(properties?: BI.ISubscriptionStatusRequest); /** - * Creates a new AutoRenewal instance using the specified properties. + * Creates a new SubscriptionStatusRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AutoRenewal instance + * @returns SubscriptionStatusRequest instance */ - public static create(properties?: BI.IAutoRenewal): BI.AutoRenewal; + public static create(properties?: BI.ISubscriptionStatusRequest): BI.SubscriptionStatusRequest; /** - * Encodes the specified AutoRenewal message. Does not implicitly {@link BI.AutoRenewal.verify|verify} messages. - * @param message AutoRenewal message or plain object to encode + * Encodes the specified SubscriptionStatusRequest message. Does not implicitly {@link BI.SubscriptionStatusRequest.verify|verify} messages. + * @param message SubscriptionStatusRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: BI.IAutoRenewal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: BI.ISubscriptionStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AutoRenewal message from the specified reader or buffer. + * Decodes a SubscriptionStatusRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AutoRenewal + * @returns SubscriptionStatusRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.AutoRenewal; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.SubscriptionStatusRequest; /** - * Creates an AutoRenewal message from a plain object. Also converts values to their respective internal types. + * Creates a SubscriptionStatusRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AutoRenewal + * @returns SubscriptionStatusRequest */ - public static fromObject(object: { [k: string]: any }): BI.AutoRenewal; + public static fromObject(object: { [k: string]: any }): BI.SubscriptionStatusRequest; /** - * Creates a plain object from an AutoRenewal message. Also converts values to other types if specified. - * @param message AutoRenewal + * Creates a plain object from a SubscriptionStatusRequest message. Also converts values to other types if specified. + * @param message SubscriptionStatusRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: BI.AutoRenewal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: BI.SubscriptionStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AutoRenewal to JSON. + * Converts this SubscriptionStatusRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AutoRenewal + * Gets the default type url for SubscriptionStatusRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PaymentMethod. */ - interface IPaymentMethod { + /** Properties of a SubscriptionStatusResponse. */ + interface ISubscriptionStatusResponse { - /** PaymentMethod type */ - type?: (BI.PaymentMethod.Type|null); + /** SubscriptionStatusResponse autoRenewal */ + autoRenewal?: (BI.IAutoRenewal|null); - /** PaymentMethod card */ - card?: (BI.PaymentMethod.ICard|null); + /** SubscriptionStatusResponse currentPaymentMethod */ + currentPaymentMethod?: (BI.IPaymentMethod|null); - /** PaymentMethod sepa */ - sepa?: (BI.PaymentMethod.ISepa|null); + /** SubscriptionStatusResponse checkoutLink */ + checkoutLink?: (string|null); - /** PaymentMethod paypal */ - paypal?: (BI.PaymentMethod.IPaypal|null); + /** SubscriptionStatusResponse licenseCreateDate */ + licenseCreateDate?: (number|null); - /** PaymentMethod failedBilling */ - failedBilling?: (boolean|null); + /** SubscriptionStatusResponse isDistributor */ + isDistributor?: (boolean|null); - /** PaymentMethod vendor */ - vendor?: (BI.PaymentMethod.IVendor|null); + /** SubscriptionStatusResponse isLegacyMsp */ + isLegacyMsp?: (boolean|null); - /** PaymentMethod purchaseOrder */ - purchaseOrder?: (BI.PaymentMethod.IPurchaseOrder|null); - } + /** SubscriptionStatusResponse licenseStats */ + licenseStats?: (BI.ILicenseStats[]|null); - /** Represents a PaymentMethod. */ - class PaymentMethod implements IPaymentMethod { + /** SubscriptionStatusResponse gradientStatus */ + gradientStatus?: (BI.GradientIntegrationStatus|null); - /** - * Constructs a new PaymentMethod. - * @param [properties] Properties to set - */ - constructor(properties?: BI.IPaymentMethod); + /** SubscriptionStatusResponse hideTrialBanner */ + hideTrialBanner?: (boolean|null); - /** PaymentMethod type. */ - public type: BI.PaymentMethod.Type; + /** SubscriptionStatusResponse gradientLastSyncDate */ + gradientLastSyncDate?: (string|null); - /** PaymentMethod card. */ - public card?: (BI.PaymentMethod.ICard|null); + /** SubscriptionStatusResponse gradientNextSyncDate */ + gradientNextSyncDate?: (string|null); - /** PaymentMethod sepa. */ - public sepa?: (BI.PaymentMethod.ISepa|null); + /** SubscriptionStatusResponse isGradientMappingPending */ + isGradientMappingPending?: (boolean|null); - /** PaymentMethod paypal. */ - public paypal?: (BI.PaymentMethod.IPaypal|null); + /** SubscriptionStatusResponse nhi */ + nhi?: (BI.INhiBilling|null); - /** PaymentMethod failedBilling. */ - public failedBilling: boolean; + /** SubscriptionStatusResponse freeKsmApiCallsCount */ + freeKsmApiCallsCount?: (number|null); - /** PaymentMethod vendor. */ - public vendor?: (BI.PaymentMethod.IVendor|null); + /** SubscriptionStatusResponse ksm */ + ksm?: (BI.IKsmBilling|null); + } - /** PaymentMethod purchaseOrder. */ - public purchaseOrder?: (BI.PaymentMethod.IPurchaseOrder|null); + /** Represents a SubscriptionStatusResponse. */ + class SubscriptionStatusResponse implements ISubscriptionStatusResponse { /** - * Creates a new PaymentMethod instance using the specified properties. + * Constructs a new SubscriptionStatusResponse. * @param [properties] Properties to set - * @returns PaymentMethod instance */ - public static create(properties?: BI.IPaymentMethod): BI.PaymentMethod; + constructor(properties?: BI.ISubscriptionStatusResponse); - /** - * Encodes the specified PaymentMethod message. Does not implicitly {@link BI.PaymentMethod.verify|verify} messages. - * @param message PaymentMethod message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: BI.IPaymentMethod, writer?: $protobuf.Writer): $protobuf.Writer; + /** SubscriptionStatusResponse autoRenewal. */ + public autoRenewal?: (BI.IAutoRenewal|null); - /** - * Decodes a PaymentMethod message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PaymentMethod - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.PaymentMethod; + /** SubscriptionStatusResponse currentPaymentMethod. */ + public currentPaymentMethod?: (BI.IPaymentMethod|null); - /** - * Creates a PaymentMethod message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PaymentMethod - */ - public static fromObject(object: { [k: string]: any }): BI.PaymentMethod; + /** SubscriptionStatusResponse checkoutLink. */ + public checkoutLink: string; - /** - * Creates a plain object from a PaymentMethod message. Also converts values to other types if specified. - * @param message PaymentMethod - * @param [options] Conversion options - * @returns Plain object + /** SubscriptionStatusResponse licenseCreateDate. */ + public licenseCreateDate: number; + + /** SubscriptionStatusResponse isDistributor. */ + public isDistributor: boolean; + + /** SubscriptionStatusResponse isLegacyMsp. */ + public isLegacyMsp: boolean; + + /** SubscriptionStatusResponse licenseStats. */ + public licenseStats: BI.ILicenseStats[]; + + /** SubscriptionStatusResponse gradientStatus. */ + public gradientStatus: BI.GradientIntegrationStatus; + + /** SubscriptionStatusResponse hideTrialBanner. */ + public hideTrialBanner: boolean; + + /** SubscriptionStatusResponse gradientLastSyncDate. */ + public gradientLastSyncDate: string; + + /** SubscriptionStatusResponse gradientNextSyncDate. */ + public gradientNextSyncDate: string; + + /** SubscriptionStatusResponse isGradientMappingPending. */ + public isGradientMappingPending: boolean; + + /** SubscriptionStatusResponse nhi. */ + public nhi?: (BI.INhiBilling|null); + + /** SubscriptionStatusResponse freeKsmApiCallsCount. */ + public freeKsmApiCallsCount: number; + + /** SubscriptionStatusResponse ksm. */ + public ksm?: (BI.IKsmBilling|null); + + /** + * Creates a new SubscriptionStatusResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SubscriptionStatusResponse instance */ - public static toObject(message: BI.PaymentMethod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static create(properties?: BI.ISubscriptionStatusResponse): BI.SubscriptionStatusResponse; /** - * Converts this PaymentMethod to JSON. + * Encodes the specified SubscriptionStatusResponse message. Does not implicitly {@link BI.SubscriptionStatusResponse.verify|verify} messages. + * @param message SubscriptionStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: BI.ISubscriptionStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubscriptionStatusResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubscriptionStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.SubscriptionStatusResponse; + + /** + * Creates a SubscriptionStatusResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubscriptionStatusResponse + */ + public static fromObject(object: { [k: string]: any }): BI.SubscriptionStatusResponse; + + /** + * Creates a plain object from a SubscriptionStatusResponse message. Also converts values to other types if specified. + * @param message SubscriptionStatusResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: BI.SubscriptionStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubscriptionStatusResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PaymentMethod + * Gets the default type url for SubscriptionStatusResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace PaymentMethod { + /** Properties of a KsmBilling. */ + interface IKsmBilling { - /** Type enum. */ - enum Type { - CARD = 0, - SEPA = 1, - PAYPAL = 2, - NONE = 3, - VENDOR = 4, - PURCHASEORDER = 5 - } + /** KsmBilling billingStartTimestamp */ + billingStartTimestamp?: (number|null); - /** Properties of a Card. */ - interface ICard { + /** KsmBilling billingEndTimestamp */ + billingEndTimestamp?: (number|null); - /** Card last4 */ - last4?: (string|null); + /** KsmBilling currentTierId */ + currentTierId?: (number|null); - /** Card brand */ - brand?: (string|null); - } + /** KsmBilling enterpriseBlocks */ + enterpriseBlocks?: (number|null); - /** Represents a Card. */ - class Card implements ICard { + /** KsmBilling currentTierCeiling */ + currentTierCeiling?: (number|null); + } - /** - * Constructs a new Card. - * @param [properties] Properties to set - */ - constructor(properties?: BI.PaymentMethod.ICard); + /** Represents a KsmBilling. */ + class KsmBilling implements IKsmBilling { - /** Card last4. */ - public last4: string; + /** + * Constructs a new KsmBilling. + * @param [properties] Properties to set + */ + constructor(properties?: BI.IKsmBilling); - /** Card brand. */ - public brand: string; + /** KsmBilling billingStartTimestamp. */ + public billingStartTimestamp: number; - /** - * Creates a new Card instance using the specified properties. - * @param [properties] Properties to set - * @returns Card instance - */ - public static create(properties?: BI.PaymentMethod.ICard): BI.PaymentMethod.Card; + /** KsmBilling billingEndTimestamp. */ + public billingEndTimestamp: number; - /** - * Encodes the specified Card message. Does not implicitly {@link BI.PaymentMethod.Card.verify|verify} messages. - * @param message Card message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: BI.PaymentMethod.ICard, writer?: $protobuf.Writer): $protobuf.Writer; + /** KsmBilling currentTierId. */ + public currentTierId: number; - /** - * Decodes a Card message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Card - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.PaymentMethod.Card; + /** KsmBilling enterpriseBlocks. */ + public enterpriseBlocks: number; - /** - * Creates a Card message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Card - */ - public static fromObject(object: { [k: string]: any }): BI.PaymentMethod.Card; + /** KsmBilling currentTierCeiling. */ + public currentTierCeiling: number; - /** - * Creates a plain object from a Card message. Also converts values to other types if specified. - * @param message Card - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: BI.PaymentMethod.Card, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new KsmBilling instance using the specified properties. + * @param [properties] Properties to set + * @returns KsmBilling instance + */ + public static create(properties?: BI.IKsmBilling): BI.KsmBilling; - /** - * Converts this Card to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified KsmBilling message. Does not implicitly {@link BI.KsmBilling.verify|verify} messages. + * @param message KsmBilling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: BI.IKsmBilling, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for Card - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a KsmBilling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KsmBilling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.KsmBilling; - /** Properties of a Sepa. */ - interface ISepa { + /** + * Creates a KsmBilling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KsmBilling + */ + public static fromObject(object: { [k: string]: any }): BI.KsmBilling; - /** Sepa last4 */ - last4?: (string|null); + /** + * Creates a plain object from a KsmBilling message. Also converts values to other types if specified. + * @param message KsmBilling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: BI.KsmBilling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Sepa country */ - country?: (string|null); - } + /** + * Converts this KsmBilling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a Sepa. */ - class Sepa implements ISepa { + /** + * Gets the default type url for KsmBilling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new Sepa. - * @param [properties] Properties to set - */ - constructor(properties?: BI.PaymentMethod.ISepa); + /** Properties of a NhiBilling. */ + interface INhiBilling { - /** Sepa last4. */ - public last4: string; + /** NhiBilling billingStartTimestamp */ + billingStartTimestamp?: (number|null); - /** Sepa country. */ - public country: string; + /** NhiBilling billingEndTimestamp */ + billingEndTimestamp?: (number|null); - /** + /** NhiBilling currentTierId */ + currentTierId?: (number|null); + + /** NhiBilling enterpriseBlocks */ + enterpriseBlocks?: (number|null); + + /** NhiBilling currentTierCeiling */ + currentTierCeiling?: (number|null); + + /** NhiBilling billingPeriods */ + billingPeriods?: (BI.INhiBillingPeriod[]|null); + } + + /** Represents a NhiBilling. */ + class NhiBilling implements INhiBilling { + + /** + * Constructs a new NhiBilling. + * @param [properties] Properties to set + */ + constructor(properties?: BI.INhiBilling); + + /** NhiBilling billingStartTimestamp. */ + public billingStartTimestamp: number; + + /** NhiBilling billingEndTimestamp. */ + public billingEndTimestamp: number; + + /** NhiBilling currentTierId. */ + public currentTierId: number; + + /** NhiBilling enterpriseBlocks. */ + public enterpriseBlocks: number; + + /** NhiBilling currentTierCeiling. */ + public currentTierCeiling: number; + + /** NhiBilling billingPeriods. */ + public billingPeriods: BI.INhiBillingPeriod[]; + + /** + * Creates a new NhiBilling instance using the specified properties. + * @param [properties] Properties to set + * @returns NhiBilling instance + */ + public static create(properties?: BI.INhiBilling): BI.NhiBilling; + + /** + * Encodes the specified NhiBilling message. Does not implicitly {@link BI.NhiBilling.verify|verify} messages. + * @param message NhiBilling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: BI.INhiBilling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NhiBilling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NhiBilling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.NhiBilling; + + /** + * Creates a NhiBilling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NhiBilling + */ + public static fromObject(object: { [k: string]: any }): BI.NhiBilling; + + /** + * Creates a plain object from a NhiBilling message. Also converts values to other types if specified. + * @param message NhiBilling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: BI.NhiBilling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NhiBilling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NhiBilling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NhiBillingPeriod. */ + interface INhiBillingPeriod { + + /** NhiBillingPeriod startTimestamp */ + startTimestamp?: (number|null); + + /** NhiBillingPeriod endTimestamp */ + endTimestamp?: (number|null); + } + + /** Represents a NhiBillingPeriod. */ + class NhiBillingPeriod implements INhiBillingPeriod { + + /** + * Constructs a new NhiBillingPeriod. + * @param [properties] Properties to set + */ + constructor(properties?: BI.INhiBillingPeriod); + + /** NhiBillingPeriod startTimestamp. */ + public startTimestamp: number; + + /** NhiBillingPeriod endTimestamp. */ + public endTimestamp: number; + + /** + * Creates a new NhiBillingPeriod instance using the specified properties. + * @param [properties] Properties to set + * @returns NhiBillingPeriod instance + */ + public static create(properties?: BI.INhiBillingPeriod): BI.NhiBillingPeriod; + + /** + * Encodes the specified NhiBillingPeriod message. Does not implicitly {@link BI.NhiBillingPeriod.verify|verify} messages. + * @param message NhiBillingPeriod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: BI.INhiBillingPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NhiBillingPeriod message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NhiBillingPeriod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.NhiBillingPeriod; + + /** + * Creates a NhiBillingPeriod message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NhiBillingPeriod + */ + public static fromObject(object: { [k: string]: any }): BI.NhiBillingPeriod; + + /** + * Creates a plain object from a NhiBillingPeriod message. Also converts values to other types if specified. + * @param message NhiBillingPeriod + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: BI.NhiBillingPeriod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NhiBillingPeriod to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NhiBillingPeriod + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LicenseStats. */ + interface ILicenseStats { + + /** LicenseStats type */ + type?: (BI.LicenseStats.Type|null); + + /** LicenseStats available */ + available?: (number|null); + + /** LicenseStats used */ + used?: (number|null); + } + + /** Represents a LicenseStats. */ + class LicenseStats implements ILicenseStats { + + /** + * Constructs a new LicenseStats. + * @param [properties] Properties to set + */ + constructor(properties?: BI.ILicenseStats); + + /** LicenseStats type. */ + public type: BI.LicenseStats.Type; + + /** LicenseStats available. */ + public available: number; + + /** LicenseStats used. */ + public used: number; + + /** + * Creates a new LicenseStats instance using the specified properties. + * @param [properties] Properties to set + * @returns LicenseStats instance + */ + public static create(properties?: BI.ILicenseStats): BI.LicenseStats; + + /** + * Encodes the specified LicenseStats message. Does not implicitly {@link BI.LicenseStats.verify|verify} messages. + * @param message LicenseStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: BI.ILicenseStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LicenseStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LicenseStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.LicenseStats; + + /** + * Creates a LicenseStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LicenseStats + */ + public static fromObject(object: { [k: string]: any }): BI.LicenseStats; + + /** + * Creates a plain object from a LicenseStats message. Also converts values to other types if specified. + * @param message LicenseStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: BI.LicenseStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LicenseStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LicenseStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LicenseStats { + + /** Type enum. */ + enum Type { + LICENSE_STAT_UNKNOWN = 0, + MSP_BASE = 1, + MC_BUSINESS = 2, + MC_BUSINESS_PLUS = 3, + MC_ENTERPRISE = 4, + MC_ENTERPRISE_PLUS = 5, + B2B_BUSINESS_STARTER = 6, + B2B_BUSINESS = 7, + B2B_ENTERPRISE = 8 + } + } + + /** Properties of an AutoRenewal. */ + interface IAutoRenewal { + + /** AutoRenewal nextOn */ + nextOn?: (number|null); + + /** AutoRenewal daysLeft */ + daysLeft?: (number|null); + + /** AutoRenewal isTrial */ + isTrial?: (boolean|null); + } + + /** Represents an AutoRenewal. */ + class AutoRenewal implements IAutoRenewal { + + /** + * Constructs a new AutoRenewal. + * @param [properties] Properties to set + */ + constructor(properties?: BI.IAutoRenewal); + + /** AutoRenewal nextOn. */ + public nextOn: number; + + /** AutoRenewal daysLeft. */ + public daysLeft: number; + + /** AutoRenewal isTrial. */ + public isTrial: boolean; + + /** + * Creates a new AutoRenewal instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoRenewal instance + */ + public static create(properties?: BI.IAutoRenewal): BI.AutoRenewal; + + /** + * Encodes the specified AutoRenewal message. Does not implicitly {@link BI.AutoRenewal.verify|verify} messages. + * @param message AutoRenewal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: BI.IAutoRenewal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoRenewal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoRenewal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.AutoRenewal; + + /** + * Creates an AutoRenewal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoRenewal + */ + public static fromObject(object: { [k: string]: any }): BI.AutoRenewal; + + /** + * Creates a plain object from an AutoRenewal message. Also converts values to other types if specified. + * @param message AutoRenewal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: BI.AutoRenewal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoRenewal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoRenewal + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PaymentMethod. */ + interface IPaymentMethod { + + /** PaymentMethod type */ + type?: (BI.PaymentMethod.Type|null); + + /** PaymentMethod card */ + card?: (BI.PaymentMethod.ICard|null); + + /** PaymentMethod sepa */ + sepa?: (BI.PaymentMethod.ISepa|null); + + /** PaymentMethod paypal */ + paypal?: (BI.PaymentMethod.IPaypal|null); + + /** PaymentMethod failedBilling */ + failedBilling?: (boolean|null); + + /** PaymentMethod vendor */ + vendor?: (BI.PaymentMethod.IVendor|null); + + /** PaymentMethod purchaseOrder */ + purchaseOrder?: (BI.PaymentMethod.IPurchaseOrder|null); + } + + /** Represents a PaymentMethod. */ + class PaymentMethod implements IPaymentMethod { + + /** + * Constructs a new PaymentMethod. + * @param [properties] Properties to set + */ + constructor(properties?: BI.IPaymentMethod); + + /** PaymentMethod type. */ + public type: BI.PaymentMethod.Type; + + /** PaymentMethod card. */ + public card?: (BI.PaymentMethod.ICard|null); + + /** PaymentMethod sepa. */ + public sepa?: (BI.PaymentMethod.ISepa|null); + + /** PaymentMethod paypal. */ + public paypal?: (BI.PaymentMethod.IPaypal|null); + + /** PaymentMethod failedBilling. */ + public failedBilling: boolean; + + /** PaymentMethod vendor. */ + public vendor?: (BI.PaymentMethod.IVendor|null); + + /** PaymentMethod purchaseOrder. */ + public purchaseOrder?: (BI.PaymentMethod.IPurchaseOrder|null); + + /** + * Creates a new PaymentMethod instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentMethod instance + */ + public static create(properties?: BI.IPaymentMethod): BI.PaymentMethod; + + /** + * Encodes the specified PaymentMethod message. Does not implicitly {@link BI.PaymentMethod.verify|verify} messages. + * @param message PaymentMethod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: BI.IPaymentMethod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PaymentMethod message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentMethod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.PaymentMethod; + + /** + * Creates a PaymentMethod message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentMethod + */ + public static fromObject(object: { [k: string]: any }): BI.PaymentMethod; + + /** + * Creates a plain object from a PaymentMethod message. Also converts values to other types if specified. + * @param message PaymentMethod + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: BI.PaymentMethod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PaymentMethod to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PaymentMethod + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PaymentMethod { + + /** Type enum. */ + enum Type { + CARD = 0, + SEPA = 1, + PAYPAL = 2, + NONE = 3, + VENDOR = 4, + PURCHASEORDER = 5 + } + + /** Properties of a Card. */ + interface ICard { + + /** Card last4 */ + last4?: (string|null); + + /** Card brand */ + brand?: (string|null); + } + + /** Represents a Card. */ + class Card implements ICard { + + /** + * Constructs a new Card. + * @param [properties] Properties to set + */ + constructor(properties?: BI.PaymentMethod.ICard); + + /** Card last4. */ + public last4: string; + + /** Card brand. */ + public brand: string; + + /** + * Creates a new Card instance using the specified properties. + * @param [properties] Properties to set + * @returns Card instance + */ + public static create(properties?: BI.PaymentMethod.ICard): BI.PaymentMethod.Card; + + /** + * Encodes the specified Card message. Does not implicitly {@link BI.PaymentMethod.Card.verify|verify} messages. + * @param message Card message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: BI.PaymentMethod.ICard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Card message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Card + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): BI.PaymentMethod.Card; + + /** + * Creates a Card message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Card + */ + public static fromObject(object: { [k: string]: any }): BI.PaymentMethod.Card; + + /** + * Creates a plain object from a Card message. Also converts values to other types if specified. + * @param message Card + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: BI.PaymentMethod.Card, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Card to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Card + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Sepa. */ + interface ISepa { + + /** Sepa last4 */ + last4?: (string|null); + + /** Sepa country */ + country?: (string|null); + } + + /** Represents a Sepa. */ + class Sepa implements ISepa { + + /** + * Constructs a new Sepa. + * @param [properties] Properties to set + */ + constructor(properties?: BI.PaymentMethod.ISepa); + + /** Sepa last4. */ + public last4: string; + + /** Sepa country. */ + public country: string; + + /** * Creates a new Sepa instance using the specified properties. * @param [properties] Properties to set * @returns Sepa instance @@ -82342,6 +83128,9 @@ export namespace Router { /** RouterRotationInfo disabled */ disabled?: (boolean|null); + + /** RouterRotationInfo scripts */ + scripts?: (Uint8Array[]|null); } /** Represents a RouterRotationInfo. */ @@ -82380,6 +83169,9 @@ export namespace Router { /** RouterRotationInfo disabled. */ public disabled: boolean; + /** RouterRotationInfo scripts. */ + public scripts: Uint8Array[]; + /** * Creates a new RouterRotationInfo instance using the specified properties. * @param [properties] Properties to set @@ -89135,2145 +89927,2622 @@ export namespace PAM { public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.GetNhiUidsResponse; /** - * Creates a GetNhiUidsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetNhiUidsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNhiUidsResponse + */ + public static fromObject(object: { [k: string]: any }): PAM.GetNhiUidsResponse; + + /** + * Creates a plain object from a GetNhiUidsResponse message. Also converts values to other types if specified. + * @param message GetNhiUidsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: PAM.GetNhiUidsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNhiUidsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNhiUidsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetNhiKsmEffectiveDateRequest. */ + interface ISetNhiKsmEffectiveDateRequest { + + /** SetNhiKsmEffectiveDateRequest effectiveDate */ + effectiveDate?: (number|null); + } + + /** Represents a SetNhiKsmEffectiveDateRequest. */ + class SetNhiKsmEffectiveDateRequest implements ISetNhiKsmEffectiveDateRequest { + + /** + * Constructs a new SetNhiKsmEffectiveDateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: PAM.ISetNhiKsmEffectiveDateRequest); + + /** SetNhiKsmEffectiveDateRequest effectiveDate. */ + public effectiveDate: number; + + /** + * Creates a new SetNhiKsmEffectiveDateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetNhiKsmEffectiveDateRequest instance + */ + public static create(properties?: PAM.ISetNhiKsmEffectiveDateRequest): PAM.SetNhiKsmEffectiveDateRequest; + + /** + * Encodes the specified SetNhiKsmEffectiveDateRequest message. Does not implicitly {@link PAM.SetNhiKsmEffectiveDateRequest.verify|verify} messages. + * @param message SetNhiKsmEffectiveDateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: PAM.ISetNhiKsmEffectiveDateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetNhiKsmEffectiveDateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetNhiKsmEffectiveDateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.SetNhiKsmEffectiveDateRequest; + + /** + * Creates a SetNhiKsmEffectiveDateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetNhiKsmEffectiveDateRequest + */ + public static fromObject(object: { [k: string]: any }): PAM.SetNhiKsmEffectiveDateRequest; + + /** + * Creates a plain object from a SetNhiKsmEffectiveDateRequest message. Also converts values to other types if specified. + * @param message SetNhiKsmEffectiveDateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: PAM.SetNhiKsmEffectiveDateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetNhiKsmEffectiveDateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetNhiKsmEffectiveDateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetNhiKsmEffectiveDateResponse. */ + interface IGetNhiKsmEffectiveDateResponse { + + /** GetNhiKsmEffectiveDateResponse effectiveDate */ + effectiveDate?: (number|null); + + /** GetNhiKsmEffectiveDateResponse defaultDate */ + defaultDate?: (number|null); + } + + /** Represents a GetNhiKsmEffectiveDateResponse. */ + class GetNhiKsmEffectiveDateResponse implements IGetNhiKsmEffectiveDateResponse { + + /** + * Constructs a new GetNhiKsmEffectiveDateResponse. + * @param [properties] Properties to set + */ + constructor(properties?: PAM.IGetNhiKsmEffectiveDateResponse); + + /** GetNhiKsmEffectiveDateResponse effectiveDate. */ + public effectiveDate: number; + + /** GetNhiKsmEffectiveDateResponse defaultDate. */ + public defaultDate: number; + + /** + * Creates a new GetNhiKsmEffectiveDateResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNhiKsmEffectiveDateResponse instance + */ + public static create(properties?: PAM.IGetNhiKsmEffectiveDateResponse): PAM.GetNhiKsmEffectiveDateResponse; + + /** + * Encodes the specified GetNhiKsmEffectiveDateResponse message. Does not implicitly {@link PAM.GetNhiKsmEffectiveDateResponse.verify|verify} messages. + * @param message GetNhiKsmEffectiveDateResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: PAM.IGetNhiKsmEffectiveDateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNhiKsmEffectiveDateResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNhiKsmEffectiveDateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.GetNhiKsmEffectiveDateResponse; + + /** + * Creates a GetNhiKsmEffectiveDateResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNhiKsmEffectiveDateResponse + */ + public static fromObject(object: { [k: string]: any }): PAM.GetNhiKsmEffectiveDateResponse; + + /** + * Creates a plain object from a GetNhiKsmEffectiveDateResponse message. Also converts values to other types if specified. + * @param message GetNhiKsmEffectiveDateResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: PAM.GetNhiKsmEffectiveDateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNhiKsmEffectiveDateResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNhiKsmEffectiveDateResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PAMUniversalSyncPreCheckRequest. */ + interface IPAMUniversalSyncPreCheckRequest { + + /** PAMUniversalSyncPreCheckRequest networkUid */ + networkUid?: (Uint8Array|null); + + /** PAMUniversalSyncPreCheckRequest folderUids */ + folderUids?: (Uint8Array[]|null); + } + + /** Represents a PAMUniversalSyncPreCheckRequest. */ + class PAMUniversalSyncPreCheckRequest implements IPAMUniversalSyncPreCheckRequest { + + /** + * Constructs a new PAMUniversalSyncPreCheckRequest. + * @param [properties] Properties to set + */ + constructor(properties?: PAM.IPAMUniversalSyncPreCheckRequest); + + /** PAMUniversalSyncPreCheckRequest networkUid. */ + public networkUid: Uint8Array; + + /** PAMUniversalSyncPreCheckRequest folderUids. */ + public folderUids: Uint8Array[]; + + /** + * Creates a new PAMUniversalSyncPreCheckRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PAMUniversalSyncPreCheckRequest instance + */ + public static create(properties?: PAM.IPAMUniversalSyncPreCheckRequest): PAM.PAMUniversalSyncPreCheckRequest; + + /** + * Encodes the specified PAMUniversalSyncPreCheckRequest message. Does not implicitly {@link PAM.PAMUniversalSyncPreCheckRequest.verify|verify} messages. + * @param message PAMUniversalSyncPreCheckRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: PAM.IPAMUniversalSyncPreCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PAMUniversalSyncPreCheckRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PAMUniversalSyncPreCheckRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.PAMUniversalSyncPreCheckRequest; + + /** + * Creates a PAMUniversalSyncPreCheckRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNhiUidsResponse + * @returns PAMUniversalSyncPreCheckRequest */ - public static fromObject(object: { [k: string]: any }): PAM.GetNhiUidsResponse; + public static fromObject(object: { [k: string]: any }): PAM.PAMUniversalSyncPreCheckRequest; /** - * Creates a plain object from a GetNhiUidsResponse message. Also converts values to other types if specified. - * @param message GetNhiUidsResponse + * Creates a plain object from a PAMUniversalSyncPreCheckRequest message. Also converts values to other types if specified. + * @param message PAMUniversalSyncPreCheckRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: PAM.GetNhiUidsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: PAM.PAMUniversalSyncPreCheckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNhiUidsResponse to JSON. + * Converts this PAMUniversalSyncPreCheckRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetNhiUidsResponse + * Gets the default type url for PAMUniversalSyncPreCheckRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetNhiKsmEffectiveDateRequest. */ - interface ISetNhiKsmEffectiveDateRequest { + /** Properties of a PAMUniversalSyncPreCheckResult. */ + interface IPAMUniversalSyncPreCheckResult { - /** SetNhiKsmEffectiveDateRequest effectiveDate */ - effectiveDate?: (number|null); + /** PAMUniversalSyncPreCheckResult folderUid */ + folderUid?: (Uint8Array|null); + + /** PAMUniversalSyncPreCheckResult isUsed */ + isUsed?: (boolean|null); } - /** Represents a SetNhiKsmEffectiveDateRequest. */ - class SetNhiKsmEffectiveDateRequest implements ISetNhiKsmEffectiveDateRequest { + /** Represents a PAMUniversalSyncPreCheckResult. */ + class PAMUniversalSyncPreCheckResult implements IPAMUniversalSyncPreCheckResult { /** - * Constructs a new SetNhiKsmEffectiveDateRequest. + * Constructs a new PAMUniversalSyncPreCheckResult. * @param [properties] Properties to set */ - constructor(properties?: PAM.ISetNhiKsmEffectiveDateRequest); + constructor(properties?: PAM.IPAMUniversalSyncPreCheckResult); - /** SetNhiKsmEffectiveDateRequest effectiveDate. */ - public effectiveDate: number; + /** PAMUniversalSyncPreCheckResult folderUid. */ + public folderUid: Uint8Array; + + /** PAMUniversalSyncPreCheckResult isUsed. */ + public isUsed: boolean; /** - * Creates a new SetNhiKsmEffectiveDateRequest instance using the specified properties. + * Creates a new PAMUniversalSyncPreCheckResult instance using the specified properties. * @param [properties] Properties to set - * @returns SetNhiKsmEffectiveDateRequest instance + * @returns PAMUniversalSyncPreCheckResult instance */ - public static create(properties?: PAM.ISetNhiKsmEffectiveDateRequest): PAM.SetNhiKsmEffectiveDateRequest; + public static create(properties?: PAM.IPAMUniversalSyncPreCheckResult): PAM.PAMUniversalSyncPreCheckResult; /** - * Encodes the specified SetNhiKsmEffectiveDateRequest message. Does not implicitly {@link PAM.SetNhiKsmEffectiveDateRequest.verify|verify} messages. - * @param message SetNhiKsmEffectiveDateRequest message or plain object to encode + * Encodes the specified PAMUniversalSyncPreCheckResult message. Does not implicitly {@link PAM.PAMUniversalSyncPreCheckResult.verify|verify} messages. + * @param message PAMUniversalSyncPreCheckResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: PAM.ISetNhiKsmEffectiveDateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: PAM.IPAMUniversalSyncPreCheckResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetNhiKsmEffectiveDateRequest message from the specified reader or buffer. + * Decodes a PAMUniversalSyncPreCheckResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetNhiKsmEffectiveDateRequest + * @returns PAMUniversalSyncPreCheckResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.SetNhiKsmEffectiveDateRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.PAMUniversalSyncPreCheckResult; /** - * Creates a SetNhiKsmEffectiveDateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PAMUniversalSyncPreCheckResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetNhiKsmEffectiveDateRequest + * @returns PAMUniversalSyncPreCheckResult */ - public static fromObject(object: { [k: string]: any }): PAM.SetNhiKsmEffectiveDateRequest; + public static fromObject(object: { [k: string]: any }): PAM.PAMUniversalSyncPreCheckResult; /** - * Creates a plain object from a SetNhiKsmEffectiveDateRequest message. Also converts values to other types if specified. - * @param message SetNhiKsmEffectiveDateRequest + * Creates a plain object from a PAMUniversalSyncPreCheckResult message. Also converts values to other types if specified. + * @param message PAMUniversalSyncPreCheckResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: PAM.SetNhiKsmEffectiveDateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: PAM.PAMUniversalSyncPreCheckResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetNhiKsmEffectiveDateRequest to JSON. + * Converts this PAMUniversalSyncPreCheckResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetNhiKsmEffectiveDateRequest + * Gets the default type url for PAMUniversalSyncPreCheckResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetNhiKsmEffectiveDateResponse. */ - interface IGetNhiKsmEffectiveDateResponse { - - /** GetNhiKsmEffectiveDateResponse effectiveDate */ - effectiveDate?: (number|null); + /** Properties of a PAMUniversalSyncPreCheckResponse. */ + interface IPAMUniversalSyncPreCheckResponse { - /** GetNhiKsmEffectiveDateResponse defaultDate */ - defaultDate?: (number|null); + /** PAMUniversalSyncPreCheckResponse results */ + results?: (PAM.IPAMUniversalSyncPreCheckResult[]|null); } - /** Represents a GetNhiKsmEffectiveDateResponse. */ - class GetNhiKsmEffectiveDateResponse implements IGetNhiKsmEffectiveDateResponse { + /** Represents a PAMUniversalSyncPreCheckResponse. */ + class PAMUniversalSyncPreCheckResponse implements IPAMUniversalSyncPreCheckResponse { /** - * Constructs a new GetNhiKsmEffectiveDateResponse. + * Constructs a new PAMUniversalSyncPreCheckResponse. * @param [properties] Properties to set */ - constructor(properties?: PAM.IGetNhiKsmEffectiveDateResponse); - - /** GetNhiKsmEffectiveDateResponse effectiveDate. */ - public effectiveDate: number; + constructor(properties?: PAM.IPAMUniversalSyncPreCheckResponse); - /** GetNhiKsmEffectiveDateResponse defaultDate. */ - public defaultDate: number; + /** PAMUniversalSyncPreCheckResponse results. */ + public results: PAM.IPAMUniversalSyncPreCheckResult[]; /** - * Creates a new GetNhiKsmEffectiveDateResponse instance using the specified properties. + * Creates a new PAMUniversalSyncPreCheckResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetNhiKsmEffectiveDateResponse instance + * @returns PAMUniversalSyncPreCheckResponse instance */ - public static create(properties?: PAM.IGetNhiKsmEffectiveDateResponse): PAM.GetNhiKsmEffectiveDateResponse; + public static create(properties?: PAM.IPAMUniversalSyncPreCheckResponse): PAM.PAMUniversalSyncPreCheckResponse; /** - * Encodes the specified GetNhiKsmEffectiveDateResponse message. Does not implicitly {@link PAM.GetNhiKsmEffectiveDateResponse.verify|verify} messages. - * @param message GetNhiKsmEffectiveDateResponse message or plain object to encode + * Encodes the specified PAMUniversalSyncPreCheckResponse message. Does not implicitly {@link PAM.PAMUniversalSyncPreCheckResponse.verify|verify} messages. + * @param message PAMUniversalSyncPreCheckResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: PAM.IGetNhiKsmEffectiveDateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: PAM.IPAMUniversalSyncPreCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNhiKsmEffectiveDateResponse message from the specified reader or buffer. + * Decodes a PAMUniversalSyncPreCheckResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetNhiKsmEffectiveDateResponse + * @returns PAMUniversalSyncPreCheckResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.GetNhiKsmEffectiveDateResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.PAMUniversalSyncPreCheckResponse; /** - * Creates a GetNhiKsmEffectiveDateResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PAMUniversalSyncPreCheckResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNhiKsmEffectiveDateResponse + * @returns PAMUniversalSyncPreCheckResponse */ - public static fromObject(object: { [k: string]: any }): PAM.GetNhiKsmEffectiveDateResponse; + public static fromObject(object: { [k: string]: any }): PAM.PAMUniversalSyncPreCheckResponse; /** - * Creates a plain object from a GetNhiKsmEffectiveDateResponse message. Also converts values to other types if specified. - * @param message GetNhiKsmEffectiveDateResponse + * Creates a plain object from a PAMUniversalSyncPreCheckResponse message. Also converts values to other types if specified. + * @param message PAMUniversalSyncPreCheckResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: PAM.GetNhiKsmEffectiveDateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: PAM.PAMUniversalSyncPreCheckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNhiKsmEffectiveDateResponse to JSON. + * Converts this PAMUniversalSyncPreCheckResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for GetNhiKsmEffectiveDateResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for PAMUniversalSyncPreCheckResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } +} + +/** Namespace folder. */ +export namespace folder { + + /** Namespace v3. */ + namespace v3 { + + /** Namespace remove. */ + namespace remove { + + /** Represents a RemoveService */ + class RemoveService extends $protobuf.rpc.Service { + + /** + * Constructs a new RemoveService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new RemoveService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): RemoveService; + + /** + * Preview or execute record removal from folders. + * PREVIEW: Computes impact metrics and returns a signed confirmation token. + * CONFIRM: Validates token and executes the removal operation. + * @param request RemoveRecordRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RemoveResponse + */ + public removeRecord(request: folder.v3.remove.IRemoveRecordRequest, callback: folder.v3.remove.RemoveService.RemoveRecordCallback): void; + + /** + * Preview or execute record removal from folders. + * PREVIEW: Computes impact metrics and returns a signed confirmation token. + * CONFIRM: Validates token and executes the removal operation. + * @param request RemoveRecordRequest message or plain object + * @returns Promise + */ + public removeRecord(request: folder.v3.remove.IRemoveRecordRequest): Promise; + + /** + * Preview or execute folder deletion. + * PREVIEW: Computes impact metrics and returns a signed confirmation token. + * CONFIRM: Validates token and executes the deletion operation. + * @param request RemoveFolderRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RemoveResponse + */ + public removeFolder(request: folder.v3.remove.IRemoveFolderRequest, callback: folder.v3.remove.RemoveService.RemoveFolderCallback): void; + + /** + * Preview or execute folder deletion. + * PREVIEW: Computes impact metrics and returns a signed confirmation token. + * CONFIRM: Validates token and executes the deletion operation. + * @param request RemoveFolderRequest message or plain object + * @returns Promise + */ + public removeFolder(request: folder.v3.remove.IRemoveFolderRequest): Promise; + + /** + * Restore records and/or folders from the caller's trashcan into a target folder (KA-8144). + * Each input item is validated independently; failures are reported per-item via + * TrashcanRestoreResponse.results — a failed item does not poison the batch. + * @param request TrashcanRestoreRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TrashcanRestoreResponse + */ + public trashcanRestore(request: folder.v3.remove.ITrashcanRestoreRequest, callback: folder.v3.remove.RemoveService.TrashcanRestoreCallback): void; + + /** + * Restore records and/or folders from the caller's trashcan into a target folder (KA-8144). + * Each input item is validated independently; failures are reported per-item via + * TrashcanRestoreResponse.results — a failed item does not poison the batch. + * @param request TrashcanRestoreRequest message or plain object + * @returns Promise + */ + public trashcanRestore(request: folder.v3.remove.ITrashcanRestoreRequest): Promise; + } + + namespace RemoveService { + + /** + * Callback as used by {@link folder.v3.remove.RemoveService#removeRecord}. + * @param error Error, if any + * @param [response] RemoveResponse + */ + type RemoveRecordCallback = (error: (Error|null), response?: folder.v3.remove.RemoveResponse) => void; + + /** + * Callback as used by {@link folder.v3.remove.RemoveService#removeFolder}. + * @param error Error, if any + * @param [response] RemoveResponse + */ + type RemoveFolderCallback = (error: (Error|null), response?: folder.v3.remove.RemoveResponse) => void; + + /** + * Callback as used by {@link folder.v3.remove.RemoveService#trashcanRestore}. + * @param error Error, if any + * @param [response] TrashcanRestoreResponse + */ + type TrashcanRestoreCallback = (error: (Error|null), response?: folder.v3.remove.TrashcanRestoreResponse) => void; + } + + /** RemoveAction enum. */ + enum RemoveAction { + REMOVE_ACTION_PREVIEW = 0, + REMOVE_ACTION_CONFIRM = 1 + } + + /** RecordOperationType enum. */ + enum RecordOperationType { + RECORD_OPERATION_UNKNOWN = 0, + UNLINK_FROM_FOLDER = 1, + MOVE_TO_FOLDER_TRASH = 2, + MOVE_TO_OWNER_TRASH = 3 + } - /** Properties of a PAMUniversalSyncPreCheckRequest. */ - interface IPAMUniversalSyncPreCheckRequest { + /** FolderOperationType enum. */ + enum FolderOperationType { + FOLDER_OPERATION_UNKNOWN = 0, + FOLDER_MOVE_TO_FOLDER_TRASH = 1, + FOLDER_MOVE_TO_OWNER_TRASH = 2, + FOLDER_DELETE_PERMANENT = 3 + } - /** PAMUniversalSyncPreCheckRequest networkUid */ - networkUid?: (Uint8Array|null); + /** RemoveErrorCode enum. */ + enum RemoveErrorCode { + REMOVE_ERROR_UNKNOWN = 0, + REMOVE_ERROR_NOT_FOUND = 1, + REMOVE_ERROR_ACCESS_DENIED = 2, + REMOVE_ERROR_TRASHCAN_FOLDER = 3, + REMOVE_ERROR_ROOT_FOLDER = 4, + REMOVE_ERROR_DESCENDANT_DENIED = 5 + } - /** PAMUniversalSyncPreCheckRequest folderUids */ - folderUids?: (Uint8Array[]|null); - } + /** RemoveStatus enum. */ + enum RemoveStatus { + REMOVE_STATUS_UNKNOWN = 0, + REMOVE_STATUS_SUCCESS = 1, + REMOVE_STATUS_STALE_PREVIEW = 2, + REMOVE_STATUS_TOKEN_EXPIRED = 3, + REMOVE_STATUS_TOKEN_INVALID = 4, + REMOVE_STATUS_ACCESS_DENIED = 5, + REMOVE_STATUS_VALIDATION_ERROR = 6 + } - /** Represents a PAMUniversalSyncPreCheckRequest. */ - class PAMUniversalSyncPreCheckRequest implements IPAMUniversalSyncPreCheckRequest { + /** Properties of a RecordRemoval. */ + interface IRecordRemoval { - /** - * Constructs a new PAMUniversalSyncPreCheckRequest. - * @param [properties] Properties to set - */ - constructor(properties?: PAM.IPAMUniversalSyncPreCheckRequest); + /** RecordRemoval folderUid */ + folderUid?: (Uint8Array|null); - /** PAMUniversalSyncPreCheckRequest networkUid. */ - public networkUid: Uint8Array; + /** RecordRemoval recordUid */ + recordUid?: (Uint8Array|null); - /** PAMUniversalSyncPreCheckRequest folderUids. */ - public folderUids: Uint8Array[]; + /** RecordRemoval operationType */ + operationType?: (folder.v3.remove.RecordOperationType|null); + } - /** - * Creates a new PAMUniversalSyncPreCheckRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PAMUniversalSyncPreCheckRequest instance - */ - public static create(properties?: PAM.IPAMUniversalSyncPreCheckRequest): PAM.PAMUniversalSyncPreCheckRequest; + /** Represents a RecordRemoval. */ + class RecordRemoval implements IRecordRemoval { - /** - * Encodes the specified PAMUniversalSyncPreCheckRequest message. Does not implicitly {@link PAM.PAMUniversalSyncPreCheckRequest.verify|verify} messages. - * @param message PAMUniversalSyncPreCheckRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: PAM.IPAMUniversalSyncPreCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new RecordRemoval. + * @param [properties] Properties to set + */ + constructor(properties?: folder.v3.remove.IRecordRemoval); - /** - * Decodes a PAMUniversalSyncPreCheckRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PAMUniversalSyncPreCheckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.PAMUniversalSyncPreCheckRequest; + /** RecordRemoval folderUid. */ + public folderUid: Uint8Array; - /** - * Creates a PAMUniversalSyncPreCheckRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PAMUniversalSyncPreCheckRequest - */ - public static fromObject(object: { [k: string]: any }): PAM.PAMUniversalSyncPreCheckRequest; + /** RecordRemoval recordUid. */ + public recordUid: Uint8Array; - /** - * Creates a plain object from a PAMUniversalSyncPreCheckRequest message. Also converts values to other types if specified. - * @param message PAMUniversalSyncPreCheckRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: PAM.PAMUniversalSyncPreCheckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** RecordRemoval operationType. */ + public operationType: folder.v3.remove.RecordOperationType; - /** - * Converts this PAMUniversalSyncPreCheckRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new RecordRemoval instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordRemoval instance + */ + public static create(properties?: folder.v3.remove.IRecordRemoval): folder.v3.remove.RecordRemoval; - /** - * Gets the default type url for PAMUniversalSyncPreCheckRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified RecordRemoval message. Does not implicitly {@link folder.v3.remove.RecordRemoval.verify|verify} messages. + * @param message RecordRemoval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: folder.v3.remove.IRecordRemoval, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a PAMUniversalSyncPreCheckResult. */ - interface IPAMUniversalSyncPreCheckResult { + /** + * Decodes a RecordRemoval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordRemoval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RecordRemoval; - /** PAMUniversalSyncPreCheckResult folderUid */ - folderUid?: (Uint8Array|null); + /** + * Creates a RecordRemoval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordRemoval + */ + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RecordRemoval; - /** PAMUniversalSyncPreCheckResult isUsed */ - isUsed?: (boolean|null); - } + /** + * Creates a plain object from a RecordRemoval message. Also converts values to other types if specified. + * @param message RecordRemoval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: folder.v3.remove.RecordRemoval, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a PAMUniversalSyncPreCheckResult. */ - class PAMUniversalSyncPreCheckResult implements IPAMUniversalSyncPreCheckResult { + /** + * Converts this RecordRemoval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new PAMUniversalSyncPreCheckResult. - * @param [properties] Properties to set - */ - constructor(properties?: PAM.IPAMUniversalSyncPreCheckResult); + /** + * Gets the default type url for RecordRemoval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** PAMUniversalSyncPreCheckResult folderUid. */ - public folderUid: Uint8Array; + /** Properties of a FolderRemoval. */ + interface IFolderRemoval { - /** PAMUniversalSyncPreCheckResult isUsed. */ - public isUsed: boolean; + /** FolderRemoval folderUid */ + folderUid?: (Uint8Array|null); - /** - * Creates a new PAMUniversalSyncPreCheckResult instance using the specified properties. - * @param [properties] Properties to set - * @returns PAMUniversalSyncPreCheckResult instance - */ - public static create(properties?: PAM.IPAMUniversalSyncPreCheckResult): PAM.PAMUniversalSyncPreCheckResult; + /** FolderRemoval operationType */ + operationType?: (folder.v3.remove.FolderOperationType|null); + } - /** - * Encodes the specified PAMUniversalSyncPreCheckResult message. Does not implicitly {@link PAM.PAMUniversalSyncPreCheckResult.verify|verify} messages. - * @param message PAMUniversalSyncPreCheckResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: PAM.IPAMUniversalSyncPreCheckResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a FolderRemoval. */ + class FolderRemoval implements IFolderRemoval { - /** - * Decodes a PAMUniversalSyncPreCheckResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PAMUniversalSyncPreCheckResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.PAMUniversalSyncPreCheckResult; + /** + * Constructs a new FolderRemoval. + * @param [properties] Properties to set + */ + constructor(properties?: folder.v3.remove.IFolderRemoval); - /** - * Creates a PAMUniversalSyncPreCheckResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PAMUniversalSyncPreCheckResult - */ - public static fromObject(object: { [k: string]: any }): PAM.PAMUniversalSyncPreCheckResult; + /** FolderRemoval folderUid. */ + public folderUid: Uint8Array; - /** - * Creates a plain object from a PAMUniversalSyncPreCheckResult message. Also converts values to other types if specified. - * @param message PAMUniversalSyncPreCheckResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: PAM.PAMUniversalSyncPreCheckResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FolderRemoval operationType. */ + public operationType: folder.v3.remove.FolderOperationType; - /** - * Converts this PAMUniversalSyncPreCheckResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new FolderRemoval instance using the specified properties. + * @param [properties] Properties to set + * @returns FolderRemoval instance + */ + public static create(properties?: folder.v3.remove.IFolderRemoval): folder.v3.remove.FolderRemoval; - /** - * Gets the default type url for PAMUniversalSyncPreCheckResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified FolderRemoval message. Does not implicitly {@link folder.v3.remove.FolderRemoval.verify|verify} messages. + * @param message FolderRemoval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: folder.v3.remove.IFolderRemoval, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a PAMUniversalSyncPreCheckResponse. */ - interface IPAMUniversalSyncPreCheckResponse { + /** + * Decodes a FolderRemoval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FolderRemoval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.FolderRemoval; - /** PAMUniversalSyncPreCheckResponse results */ - results?: (PAM.IPAMUniversalSyncPreCheckResult[]|null); - } + /** + * Creates a FolderRemoval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FolderRemoval + */ + public static fromObject(object: { [k: string]: any }): folder.v3.remove.FolderRemoval; - /** Represents a PAMUniversalSyncPreCheckResponse. */ - class PAMUniversalSyncPreCheckResponse implements IPAMUniversalSyncPreCheckResponse { + /** + * Creates a plain object from a FolderRemoval message. Also converts values to other types if specified. + * @param message FolderRemoval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: folder.v3.remove.FolderRemoval, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new PAMUniversalSyncPreCheckResponse. - * @param [properties] Properties to set - */ - constructor(properties?: PAM.IPAMUniversalSyncPreCheckResponse); + /** + * Converts this FolderRemoval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** PAMUniversalSyncPreCheckResponse results. */ - public results: PAM.IPAMUniversalSyncPreCheckResult[]; + /** + * Gets the default type url for FolderRemoval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a new PAMUniversalSyncPreCheckResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PAMUniversalSyncPreCheckResponse instance - */ - public static create(properties?: PAM.IPAMUniversalSyncPreCheckResponse): PAM.PAMUniversalSyncPreCheckResponse; + /** Properties of a RemoveRecordRequest. */ + interface IRemoveRecordRequest { - /** - * Encodes the specified PAMUniversalSyncPreCheckResponse message. Does not implicitly {@link PAM.PAMUniversalSyncPreCheckResponse.verify|verify} messages. - * @param message PAMUniversalSyncPreCheckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: PAM.IPAMUniversalSyncPreCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** RemoveRecordRequest action */ + action?: (folder.v3.remove.RemoveAction|null); - /** - * Decodes a PAMUniversalSyncPreCheckResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PAMUniversalSyncPreCheckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): PAM.PAMUniversalSyncPreCheckResponse; + /** RemoveRecordRequest records */ + records?: (folder.v3.remove.IRecordRemoval[]|null); - /** - * Creates a PAMUniversalSyncPreCheckResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PAMUniversalSyncPreCheckResponse - */ - public static fromObject(object: { [k: string]: any }): PAM.PAMUniversalSyncPreCheckResponse; + /** RemoveRecordRequest confirmationToken */ + confirmationToken?: (Uint8Array|null); + } - /** - * Creates a plain object from a PAMUniversalSyncPreCheckResponse message. Also converts values to other types if specified. - * @param message PAMUniversalSyncPreCheckResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: PAM.PAMUniversalSyncPreCheckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a RemoveRecordRequest. */ + class RemoveRecordRequest implements IRemoveRecordRequest { - /** - * Converts this PAMUniversalSyncPreCheckResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Constructs a new RemoveRecordRequest. + * @param [properties] Properties to set + */ + constructor(properties?: folder.v3.remove.IRemoveRecordRequest); - /** - * Gets the default type url for PAMUniversalSyncPreCheckResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } -} + /** RemoveRecordRequest action. */ + public action: folder.v3.remove.RemoveAction; -/** Namespace folder. */ -export namespace folder { + /** RemoveRecordRequest records. */ + public records: folder.v3.remove.IRecordRemoval[]; - /** Namespace v3. */ - namespace v3 { + /** RemoveRecordRequest confirmationToken. */ + public confirmationToken: Uint8Array; - /** Namespace remove. */ - namespace remove { + /** + * Creates a new RemoveRecordRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveRecordRequest instance + */ + public static create(properties?: folder.v3.remove.IRemoveRecordRequest): folder.v3.remove.RemoveRecordRequest; - /** Represents a RemoveService */ - class RemoveService extends $protobuf.rpc.Service { + /** + * Encodes the specified RemoveRecordRequest message. Does not implicitly {@link folder.v3.remove.RemoveRecordRequest.verify|verify} messages. + * @param message RemoveRecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: folder.v3.remove.IRemoveRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new RemoveService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Decodes a RemoveRecordRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveRecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemoveRecordRequest; /** - * Creates new RemoveService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a RemoveRecordRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveRecordRequest */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): RemoveService; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemoveRecordRequest; /** - * Preview or execute record removal from folders. - * PREVIEW: Computes impact metrics and returns a signed confirmation token. - * CONFIRM: Validates token and executes the removal operation. - * @param request RemoveRecordRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RemoveResponse + * Creates a plain object from a RemoveRecordRequest message. Also converts values to other types if specified. + * @param message RemoveRecordRequest + * @param [options] Conversion options + * @returns Plain object */ - public removeRecord(request: folder.v3.remove.IRemoveRecordRequest, callback: folder.v3.remove.RemoveService.RemoveRecordCallback): void; + public static toObject(message: folder.v3.remove.RemoveRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Preview or execute record removal from folders. - * PREVIEW: Computes impact metrics and returns a signed confirmation token. - * CONFIRM: Validates token and executes the removal operation. - * @param request RemoveRecordRequest message or plain object - * @returns Promise + * Converts this RemoveRecordRequest to JSON. + * @returns JSON object */ - public removeRecord(request: folder.v3.remove.IRemoveRecordRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Preview or execute folder deletion. - * PREVIEW: Computes impact metrics and returns a signed confirmation token. - * CONFIRM: Validates token and executes the deletion operation. - * @param request RemoveFolderRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RemoveResponse + * Gets the default type url for RemoveRecordRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public removeFolder(request: folder.v3.remove.IRemoveFolderRequest, callback: folder.v3.remove.RemoveService.RemoveFolderCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveFolderRequest. */ + interface IRemoveFolderRequest { + + /** RemoveFolderRequest action */ + action?: (folder.v3.remove.RemoveAction|null); + + /** RemoveFolderRequest folders */ + folders?: (folder.v3.remove.IFolderRemoval[]|null); + + /** RemoveFolderRequest confirmationToken */ + confirmationToken?: (Uint8Array|null); + } + + /** Represents a RemoveFolderRequest. */ + class RemoveFolderRequest implements IRemoveFolderRequest { /** - * Preview or execute folder deletion. - * PREVIEW: Computes impact metrics and returns a signed confirmation token. - * CONFIRM: Validates token and executes the deletion operation. - * @param request RemoveFolderRequest message or plain object - * @returns Promise + * Constructs a new RemoveFolderRequest. + * @param [properties] Properties to set */ - public removeFolder(request: folder.v3.remove.IRemoveFolderRequest): Promise; + constructor(properties?: folder.v3.remove.IRemoveFolderRequest); + + /** RemoveFolderRequest action. */ + public action: folder.v3.remove.RemoveAction; + + /** RemoveFolderRequest folders. */ + public folders: folder.v3.remove.IFolderRemoval[]; + + /** RemoveFolderRequest confirmationToken. */ + public confirmationToken: Uint8Array; /** - * Restore records and/or folders from the caller's trashcan into a target folder (KA-8144). - * Each input item is validated independently; failures are reported per-item via - * TrashcanRestoreResponse.results — a failed item does not poison the batch. - * @param request TrashcanRestoreRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TrashcanRestoreResponse + * Creates a new RemoveFolderRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveFolderRequest instance + */ + public static create(properties?: folder.v3.remove.IRemoveFolderRequest): folder.v3.remove.RemoveFolderRequest; + + /** + * Encodes the specified RemoveFolderRequest message. Does not implicitly {@link folder.v3.remove.RemoveFolderRequest.verify|verify} messages. + * @param message RemoveFolderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public trashcanRestore(request: folder.v3.remove.ITrashcanRestoreRequest, callback: folder.v3.remove.RemoveService.TrashcanRestoreCallback): void; + public static encode(message: folder.v3.remove.IRemoveFolderRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Restore records and/or folders from the caller's trashcan into a target folder (KA-8144). - * Each input item is validated independently; failures are reported per-item via - * TrashcanRestoreResponse.results — a failed item does not poison the batch. - * @param request TrashcanRestoreRequest message or plain object - * @returns Promise + * Decodes a RemoveFolderRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveFolderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public trashcanRestore(request: folder.v3.remove.ITrashcanRestoreRequest): Promise; - } - - namespace RemoveService { + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemoveFolderRequest; /** - * Callback as used by {@link folder.v3.remove.RemoveService#removeRecord}. - * @param error Error, if any - * @param [response] RemoveResponse + * Creates a RemoveFolderRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveFolderRequest */ - type RemoveRecordCallback = (error: (Error|null), response?: folder.v3.remove.RemoveResponse) => void; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemoveFolderRequest; /** - * Callback as used by {@link folder.v3.remove.RemoveService#removeFolder}. - * @param error Error, if any - * @param [response] RemoveResponse + * Creates a plain object from a RemoveFolderRequest message. Also converts values to other types if specified. + * @param message RemoveFolderRequest + * @param [options] Conversion options + * @returns Plain object */ - type RemoveFolderCallback = (error: (Error|null), response?: folder.v3.remove.RemoveResponse) => void; + public static toObject(message: folder.v3.remove.RemoveFolderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link folder.v3.remove.RemoveService#trashcanRestore}. - * @param error Error, if any - * @param [response] TrashcanRestoreResponse + * Converts this RemoveFolderRequest to JSON. + * @returns JSON object */ - type TrashcanRestoreCallback = (error: (Error|null), response?: folder.v3.remove.TrashcanRestoreResponse) => void; - } - - /** RemoveAction enum. */ - enum RemoveAction { - REMOVE_ACTION_PREVIEW = 0, - REMOVE_ACTION_CONFIRM = 1 - } - - /** RecordOperationType enum. */ - enum RecordOperationType { - RECORD_OPERATION_UNKNOWN = 0, - UNLINK_FROM_FOLDER = 1, - MOVE_TO_FOLDER_TRASH = 2, - MOVE_TO_OWNER_TRASH = 3 - } - - /** FolderOperationType enum. */ - enum FolderOperationType { - FOLDER_OPERATION_UNKNOWN = 0, - FOLDER_MOVE_TO_FOLDER_TRASH = 1, - FOLDER_MOVE_TO_OWNER_TRASH = 2, - FOLDER_DELETE_PERMANENT = 3 - } + public toJSON(): { [k: string]: any }; - /** RemoveErrorCode enum. */ - enum RemoveErrorCode { - REMOVE_ERROR_UNKNOWN = 0, - REMOVE_ERROR_NOT_FOUND = 1, - REMOVE_ERROR_ACCESS_DENIED = 2, - REMOVE_ERROR_TRASHCAN_FOLDER = 3, - REMOVE_ERROR_ROOT_FOLDER = 4, - REMOVE_ERROR_DESCENDANT_DENIED = 5 + /** + * Gets the default type url for RemoveFolderRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** RemoveStatus enum. */ - enum RemoveStatus { - REMOVE_STATUS_UNKNOWN = 0, - REMOVE_STATUS_SUCCESS = 1, - REMOVE_STATUS_STALE_PREVIEW = 2, - REMOVE_STATUS_TOKEN_EXPIRED = 3, - REMOVE_STATUS_TOKEN_INVALID = 4, - REMOVE_STATUS_ACCESS_DENIED = 5, - REMOVE_STATUS_VALIDATION_ERROR = 6 - } + /** Properties of a RemoveResponse. */ + interface IRemoveResponse { - /** Properties of a RecordRemoval. */ - interface IRecordRemoval { + /** RemoveResponse confirmationToken */ + confirmationToken?: (Uint8Array|null); - /** RecordRemoval folderUid */ - folderUid?: (Uint8Array|null); + /** RemoveResponse tokenExpiresAt */ + tokenExpiresAt?: (number|null); - /** RecordRemoval recordUid */ - recordUid?: (Uint8Array|null); + /** RemoveResponse results */ + results?: (folder.v3.remove.IRemoveResult[]|null); - /** RecordRemoval operationType */ - operationType?: (folder.v3.remove.RecordOperationType|null); + /** RemoveResponse errorMessage */ + errorMessage?: (string|null); } - /** Represents a RecordRemoval. */ - class RecordRemoval implements IRecordRemoval { + /** + * Response for remove operations (both record and folder). + * + * For PREVIEW: Contains confirmation_token and per-item results with impact. + * For CONFIRM: Contains per-item results with execution status. + */ + class RemoveResponse implements IRemoveResponse { /** - * Constructs a new RecordRemoval. + * Constructs a new RemoveResponse. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRecordRemoval); + constructor(properties?: folder.v3.remove.IRemoveResponse); - /** RecordRemoval folderUid. */ - public folderUid: Uint8Array; + /** RemoveResponse confirmationToken. */ + public confirmationToken: Uint8Array; - /** RecordRemoval recordUid. */ - public recordUid: Uint8Array; + /** RemoveResponse tokenExpiresAt. */ + public tokenExpiresAt: number; - /** RecordRemoval operationType. */ - public operationType: folder.v3.remove.RecordOperationType; + /** RemoveResponse results. */ + public results: folder.v3.remove.IRemoveResult[]; + + /** RemoveResponse errorMessage. */ + public errorMessage: string; /** - * Creates a new RecordRemoval instance using the specified properties. + * Creates a new RemoveResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RecordRemoval instance + * @returns RemoveResponse instance */ - public static create(properties?: folder.v3.remove.IRecordRemoval): folder.v3.remove.RecordRemoval; + public static create(properties?: folder.v3.remove.IRemoveResponse): folder.v3.remove.RemoveResponse; /** - * Encodes the specified RecordRemoval message. Does not implicitly {@link folder.v3.remove.RecordRemoval.verify|verify} messages. - * @param message RecordRemoval message or plain object to encode + * Encodes the specified RemoveResponse message. Does not implicitly {@link folder.v3.remove.RemoveResponse.verify|verify} messages. + * @param message RemoveResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRecordRemoval, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IRemoveResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RecordRemoval message from the specified reader or buffer. + * Decodes a RemoveResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RecordRemoval + * @returns RemoveResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RecordRemoval; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemoveResponse; /** - * Creates a RecordRemoval message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RecordRemoval + * @returns RemoveResponse */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RecordRemoval; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemoveResponse; /** - * Creates a plain object from a RecordRemoval message. Also converts values to other types if specified. - * @param message RecordRemoval + * Creates a plain object from a RemoveResponse message. Also converts values to other types if specified. + * @param message RemoveResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RecordRemoval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.RemoveResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RecordRemoval to JSON. + * Converts this RemoveResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RecordRemoval + * Gets the default type url for RemoveResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FolderRemoval. */ - interface IFolderRemoval { + /** Properties of a RemoveResult. */ + interface IRemoveResult { - /** FolderRemoval folderUid */ + /** RemoveResult itemUid */ + itemUid?: (Uint8Array|null); + + /** RemoveResult folderUid */ folderUid?: (Uint8Array|null); - /** FolderRemoval operationType */ - operationType?: (folder.v3.remove.FolderOperationType|null); + /** RemoveResult status */ + status?: (folder.v3.remove.RemoveStatus|null); + + /** RemoveResult impact */ + impact?: (folder.v3.remove.IImpact|null); + + /** RemoveResult error */ + error?: (folder.v3.remove.IItemError|null); } - /** Represents a FolderRemoval. */ - class FolderRemoval implements IFolderRemoval { + /** Per-item result for a single record or folder. */ + class RemoveResult implements IRemoveResult { /** - * Constructs a new FolderRemoval. + * Constructs a new RemoveResult. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IFolderRemoval); + constructor(properties?: folder.v3.remove.IRemoveResult); - /** FolderRemoval folderUid. */ + /** RemoveResult itemUid. */ + public itemUid: Uint8Array; + + /** RemoveResult folderUid. */ public folderUid: Uint8Array; - /** FolderRemoval operationType. */ - public operationType: folder.v3.remove.FolderOperationType; + /** RemoveResult status. */ + public status: folder.v3.remove.RemoveStatus; + + /** RemoveResult impact. */ + public impact?: (folder.v3.remove.IImpact|null); + + /** RemoveResult error. */ + public error?: (folder.v3.remove.IItemError|null); /** - * Creates a new FolderRemoval instance using the specified properties. + * Creates a new RemoveResult instance using the specified properties. * @param [properties] Properties to set - * @returns FolderRemoval instance + * @returns RemoveResult instance */ - public static create(properties?: folder.v3.remove.IFolderRemoval): folder.v3.remove.FolderRemoval; + public static create(properties?: folder.v3.remove.IRemoveResult): folder.v3.remove.RemoveResult; /** - * Encodes the specified FolderRemoval message. Does not implicitly {@link folder.v3.remove.FolderRemoval.verify|verify} messages. - * @param message FolderRemoval message or plain object to encode + * Encodes the specified RemoveResult message. Does not implicitly {@link folder.v3.remove.RemoveResult.verify|verify} messages. + * @param message RemoveResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IFolderRemoval, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IRemoveResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FolderRemoval message from the specified reader or buffer. + * Decodes a RemoveResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FolderRemoval + * @returns RemoveResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.FolderRemoval; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemoveResult; /** - * Creates a FolderRemoval message from a plain object. Also converts values to their respective internal types. + * Creates a RemoveResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FolderRemoval + * @returns RemoveResult */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.FolderRemoval; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemoveResult; /** - * Creates a plain object from a FolderRemoval message. Also converts values to other types if specified. - * @param message FolderRemoval + * Creates a plain object from a RemoveResult message. Also converts values to other types if specified. + * @param message RemoveResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.FolderRemoval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.RemoveResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FolderRemoval to JSON. + * Converts this RemoveResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FolderRemoval + * Gets the default type url for RemoveResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RemoveRecordRequest. */ - interface IRemoveRecordRequest { + /** Properties of an Impact. */ + interface IImpact { + + /** Impact foldersCount */ + foldersCount?: (number|null); + + /** Impact recordsCount */ + recordsCount?: (number|null); - /** RemoveRecordRequest action */ - action?: (folder.v3.remove.RemoveAction|null); + /** Impact affectedUsersCount */ + affectedUsersCount?: (number|null); - /** RemoveRecordRequest records */ - records?: (folder.v3.remove.IRecordRemoval[]|null); + /** Impact affectedTeamsCount */ + affectedTeamsCount?: (number|null); - /** RemoveRecordRequest confirmationToken */ - confirmationToken?: (Uint8Array|null); + /** Impact recordInfo */ + recordInfo?: (folder.v3.remove.IRecordInfo[]|null); + + /** Impact warnings */ + warnings?: (string[]|null); } - /** Represents a RemoveRecordRequest. */ - class RemoveRecordRequest implements IRemoveRecordRequest { + /** Impact metrics for a single item (record or folder tree). */ + class Impact implements IImpact { /** - * Constructs a new RemoveRecordRequest. + * Constructs a new Impact. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRemoveRecordRequest); + constructor(properties?: folder.v3.remove.IImpact); - /** RemoveRecordRequest action. */ - public action: folder.v3.remove.RemoveAction; + /** Impact foldersCount. */ + public foldersCount: number; - /** RemoveRecordRequest records. */ - public records: folder.v3.remove.IRecordRemoval[]; + /** Impact recordsCount. */ + public recordsCount: number; - /** RemoveRecordRequest confirmationToken. */ - public confirmationToken: Uint8Array; + /** Impact affectedUsersCount. */ + public affectedUsersCount: number; + + /** Impact affectedTeamsCount. */ + public affectedTeamsCount: number; + + /** Impact recordInfo. */ + public recordInfo: folder.v3.remove.IRecordInfo[]; + + /** Impact warnings. */ + public warnings: string[]; /** - * Creates a new RemoveRecordRequest instance using the specified properties. + * Creates a new Impact instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveRecordRequest instance + * @returns Impact instance */ - public static create(properties?: folder.v3.remove.IRemoveRecordRequest): folder.v3.remove.RemoveRecordRequest; + public static create(properties?: folder.v3.remove.IImpact): folder.v3.remove.Impact; /** - * Encodes the specified RemoveRecordRequest message. Does not implicitly {@link folder.v3.remove.RemoveRecordRequest.verify|verify} messages. - * @param message RemoveRecordRequest message or plain object to encode + * Encodes the specified Impact message. Does not implicitly {@link folder.v3.remove.Impact.verify|verify} messages. + * @param message Impact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRemoveRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IImpact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveRecordRequest message from the specified reader or buffer. + * Decodes an Impact message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveRecordRequest + * @returns Impact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemoveRecordRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.Impact; /** - * Creates a RemoveRecordRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Impact message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveRecordRequest + * @returns Impact */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemoveRecordRequest; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.Impact; /** - * Creates a plain object from a RemoveRecordRequest message. Also converts values to other types if specified. - * @param message RemoveRecordRequest + * Creates a plain object from an Impact message. Also converts values to other types if specified. + * @param message Impact * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RemoveRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.Impact, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveRecordRequest to JSON. + * Converts this Impact to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RemoveRecordRequest + * Gets the default type url for Impact * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RemoveFolderRequest. */ - interface IRemoveFolderRequest { - - /** RemoveFolderRequest action */ - action?: (folder.v3.remove.RemoveAction|null); + /** Properties of a RecordInfo. */ + interface IRecordInfo { - /** RemoveFolderRequest folders */ - folders?: (folder.v3.remove.IFolderRemoval[]|null); + /** RecordInfo recordUid */ + recordUid?: (Uint8Array|null); - /** RemoveFolderRequest confirmationToken */ - confirmationToken?: (Uint8Array|null); + /** RecordInfo locationsCount */ + locationsCount?: (number|null); } - /** Represents a RemoveFolderRequest. */ - class RemoveFolderRequest implements IRemoveFolderRequest { + /** + * Additional info for a record being removed. + * Only populated for MOVE_TO_OWNER_TRASH to show "also in X other folders". + */ + class RecordInfo implements IRecordInfo { /** - * Constructs a new RemoveFolderRequest. + * Constructs a new RecordInfo. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRemoveFolderRequest); - - /** RemoveFolderRequest action. */ - public action: folder.v3.remove.RemoveAction; + constructor(properties?: folder.v3.remove.IRecordInfo); - /** RemoveFolderRequest folders. */ - public folders: folder.v3.remove.IFolderRemoval[]; + /** RecordInfo recordUid. */ + public recordUid: Uint8Array; - /** RemoveFolderRequest confirmationToken. */ - public confirmationToken: Uint8Array; + /** RecordInfo locationsCount. */ + public locationsCount: number; /** - * Creates a new RemoveFolderRequest instance using the specified properties. + * Creates a new RecordInfo instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveFolderRequest instance + * @returns RecordInfo instance */ - public static create(properties?: folder.v3.remove.IRemoveFolderRequest): folder.v3.remove.RemoveFolderRequest; + public static create(properties?: folder.v3.remove.IRecordInfo): folder.v3.remove.RecordInfo; /** - * Encodes the specified RemoveFolderRequest message. Does not implicitly {@link folder.v3.remove.RemoveFolderRequest.verify|verify} messages. - * @param message RemoveFolderRequest message or plain object to encode + * Encodes the specified RecordInfo message. Does not implicitly {@link folder.v3.remove.RecordInfo.verify|verify} messages. + * @param message RecordInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRemoveFolderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IRecordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveFolderRequest message from the specified reader or buffer. + * Decodes a RecordInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveFolderRequest + * @returns RecordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemoveFolderRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RecordInfo; /** - * Creates a RemoveFolderRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RecordInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveFolderRequest + * @returns RecordInfo */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemoveFolderRequest; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RecordInfo; /** - * Creates a plain object from a RemoveFolderRequest message. Also converts values to other types if specified. - * @param message RemoveFolderRequest + * Creates a plain object from a RecordInfo message. Also converts values to other types if specified. + * @param message RecordInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RemoveFolderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.RecordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveFolderRequest to JSON. + * Converts this RecordInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RemoveFolderRequest + * Gets the default type url for RecordInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RemoveResponse. */ - interface IRemoveResponse { - - /** RemoveResponse confirmationToken */ - confirmationToken?: (Uint8Array|null); - - /** RemoveResponse tokenExpiresAt */ - tokenExpiresAt?: (number|null); + /** Properties of an ItemError. */ + interface IItemError { - /** RemoveResponse results */ - results?: (folder.v3.remove.IRemoveResult[]|null); + /** ItemError code */ + code?: (folder.v3.remove.RemoveErrorCode|null); - /** RemoveResponse errorMessage */ - errorMessage?: (string|null); + /** ItemError message */ + message?: (string|null); } - /** - * Response for remove operations (both record and folder). - * - * For PREVIEW: Contains confirmation_token and per-item results with impact. - * For CONFIRM: Contains per-item results with execution status. - */ - class RemoveResponse implements IRemoveResponse { + /** Error details for a failed item. */ + class ItemError implements IItemError { /** - * Constructs a new RemoveResponse. + * Constructs a new ItemError. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRemoveResponse); - - /** RemoveResponse confirmationToken. */ - public confirmationToken: Uint8Array; - - /** RemoveResponse tokenExpiresAt. */ - public tokenExpiresAt: number; + constructor(properties?: folder.v3.remove.IItemError); - /** RemoveResponse results. */ - public results: folder.v3.remove.IRemoveResult[]; + /** ItemError code. */ + public code: folder.v3.remove.RemoveErrorCode; - /** RemoveResponse errorMessage. */ - public errorMessage: string; + /** ItemError message. */ + public message: string; /** - * Creates a new RemoveResponse instance using the specified properties. + * Creates a new ItemError instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveResponse instance + * @returns ItemError instance */ - public static create(properties?: folder.v3.remove.IRemoveResponse): folder.v3.remove.RemoveResponse; + public static create(properties?: folder.v3.remove.IItemError): folder.v3.remove.ItemError; /** - * Encodes the specified RemoveResponse message. Does not implicitly {@link folder.v3.remove.RemoveResponse.verify|verify} messages. - * @param message RemoveResponse message or plain object to encode + * Encodes the specified ItemError message. Does not implicitly {@link folder.v3.remove.ItemError.verify|verify} messages. + * @param message ItemError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRemoveResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IItemError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveResponse message from the specified reader or buffer. + * Decodes an ItemError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveResponse + * @returns ItemError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemoveResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.ItemError; /** - * Creates a RemoveResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ItemError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveResponse + * @returns ItemError */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemoveResponse; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.ItemError; /** - * Creates a plain object from a RemoveResponse message. Also converts values to other types if specified. - * @param message RemoveResponse + * Creates a plain object from an ItemError message. Also converts values to other types if specified. + * @param message ItemError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RemoveResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.ItemError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveResponse to JSON. + * Converts this ItemError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RemoveResponse + * Gets the default type url for ItemError * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RemoveResult. */ - interface IRemoveResult { + /** Properties of a RemovalTokenPayload. */ + interface IRemovalTokenPayload { - /** RemoveResult itemUid */ - itemUid?: (Uint8Array|null); + /** RemovalTokenPayload itemFingerprints */ + itemFingerprints?: (folder.v3.remove.IItemFingerprint[]|null); - /** RemoveResult folderUid */ - folderUid?: (Uint8Array|null); + /** RemovalTokenPayload userId */ + userId?: (number|null); - /** RemoveResult status */ - status?: (folder.v3.remove.RemoveStatus|null); + /** RemovalTokenPayload deviceId */ + deviceId?: (number|null); - /** RemoveResult impact */ - impact?: (folder.v3.remove.IImpact|null); + /** RemovalTokenPayload sessionUid */ + sessionUid?: (Uint8Array|null); - /** RemoveResult error */ - error?: (folder.v3.remove.IItemError|null); + /** RemovalTokenPayload expiresAtMillis */ + expiresAtMillis?: (number|null); } - /** Per-item result for a single record or folder. */ - class RemoveResult implements IRemoveResult { + /** Internal token payload (not exposed in API, just for serialization) */ + class RemovalTokenPayload implements IRemovalTokenPayload { /** - * Constructs a new RemoveResult. + * Constructs a new RemovalTokenPayload. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRemoveResult); + constructor(properties?: folder.v3.remove.IRemovalTokenPayload); - /** RemoveResult itemUid. */ - public itemUid: Uint8Array; + /** RemovalTokenPayload itemFingerprints. */ + public itemFingerprints: folder.v3.remove.IItemFingerprint[]; - /** RemoveResult folderUid. */ - public folderUid: Uint8Array; + /** RemovalTokenPayload userId. */ + public userId: number; - /** RemoveResult status. */ - public status: folder.v3.remove.RemoveStatus; + /** RemovalTokenPayload deviceId. */ + public deviceId: number; - /** RemoveResult impact. */ - public impact?: (folder.v3.remove.IImpact|null); + /** RemovalTokenPayload sessionUid. */ + public sessionUid: Uint8Array; - /** RemoveResult error. */ - public error?: (folder.v3.remove.IItemError|null); + /** RemovalTokenPayload expiresAtMillis. */ + public expiresAtMillis: number; /** - * Creates a new RemoveResult instance using the specified properties. + * Creates a new RemovalTokenPayload instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveResult instance + * @returns RemovalTokenPayload instance */ - public static create(properties?: folder.v3.remove.IRemoveResult): folder.v3.remove.RemoveResult; + public static create(properties?: folder.v3.remove.IRemovalTokenPayload): folder.v3.remove.RemovalTokenPayload; /** - * Encodes the specified RemoveResult message. Does not implicitly {@link folder.v3.remove.RemoveResult.verify|verify} messages. - * @param message RemoveResult message or plain object to encode + * Encodes the specified RemovalTokenPayload message. Does not implicitly {@link folder.v3.remove.RemovalTokenPayload.verify|verify} messages. + * @param message RemovalTokenPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRemoveResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IRemovalTokenPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveResult message from the specified reader or buffer. + * Decodes a RemovalTokenPayload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveResult + * @returns RemovalTokenPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemoveResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemovalTokenPayload; /** - * Creates a RemoveResult message from a plain object. Also converts values to their respective internal types. + * Creates a RemovalTokenPayload message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveResult + * @returns RemovalTokenPayload */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemoveResult; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemovalTokenPayload; /** - * Creates a plain object from a RemoveResult message. Also converts values to other types if specified. - * @param message RemoveResult + * Creates a plain object from a RemovalTokenPayload message. Also converts values to other types if specified. + * @param message RemovalTokenPayload * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RemoveResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.RemovalTokenPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveResult to JSON. + * Converts this RemovalTokenPayload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RemoveResult + * Gets the default type url for RemovalTokenPayload * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Impact. */ - interface IImpact { - - /** Impact foldersCount */ - foldersCount?: (number|null); - - /** Impact recordsCount */ - recordsCount?: (number|null); - - /** Impact affectedUsersCount */ - affectedUsersCount?: (number|null); + /** Properties of an ItemFingerprint. */ + interface IItemFingerprint { - /** Impact affectedTeamsCount */ - affectedTeamsCount?: (number|null); + /** ItemFingerprint record */ + record?: (folder.v3.remove.IRecordTarget|null); - /** Impact recordInfo */ - recordInfo?: (folder.v3.remove.IRecordInfo[]|null); + /** ItemFingerprint folder */ + folder?: (folder.v3.remove.IFolderTarget|null); - /** Impact warnings */ - warnings?: (string[]|null); + /** ItemFingerprint fingerprint */ + fingerprint?: (Uint8Array|null); } - /** Impact metrics for a single item (record or folder tree). */ - class Impact implements IImpact { + /** Represents an ItemFingerprint. */ + class ItemFingerprint implements IItemFingerprint { /** - * Constructs a new Impact. + * Constructs a new ItemFingerprint. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IImpact); - - /** Impact foldersCount. */ - public foldersCount: number; - - /** Impact recordsCount. */ - public recordsCount: number; + constructor(properties?: folder.v3.remove.IItemFingerprint); - /** Impact affectedUsersCount. */ - public affectedUsersCount: number; + /** ItemFingerprint record. */ + public record?: (folder.v3.remove.IRecordTarget|null); - /** Impact affectedTeamsCount. */ - public affectedTeamsCount: number; + /** ItemFingerprint folder. */ + public folder?: (folder.v3.remove.IFolderTarget|null); - /** Impact recordInfo. */ - public recordInfo: folder.v3.remove.IRecordInfo[]; + /** ItemFingerprint fingerprint. */ + public fingerprint: Uint8Array; - /** Impact warnings. */ - public warnings: string[]; + /** ItemFingerprint target. */ + public target?: ("record"|"folder"); /** - * Creates a new Impact instance using the specified properties. + * Creates a new ItemFingerprint instance using the specified properties. * @param [properties] Properties to set - * @returns Impact instance + * @returns ItemFingerprint instance */ - public static create(properties?: folder.v3.remove.IImpact): folder.v3.remove.Impact; + public static create(properties?: folder.v3.remove.IItemFingerprint): folder.v3.remove.ItemFingerprint; /** - * Encodes the specified Impact message. Does not implicitly {@link folder.v3.remove.Impact.verify|verify} messages. - * @param message Impact message or plain object to encode + * Encodes the specified ItemFingerprint message. Does not implicitly {@link folder.v3.remove.ItemFingerprint.verify|verify} messages. + * @param message ItemFingerprint message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IImpact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IItemFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Impact message from the specified reader or buffer. + * Decodes an ItemFingerprint message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Impact + * @returns ItemFingerprint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.Impact; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.ItemFingerprint; /** - * Creates an Impact message from a plain object. Also converts values to their respective internal types. + * Creates an ItemFingerprint message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Impact + * @returns ItemFingerprint */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.Impact; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.ItemFingerprint; /** - * Creates a plain object from an Impact message. Also converts values to other types if specified. - * @param message Impact + * Creates a plain object from an ItemFingerprint message. Also converts values to other types if specified. + * @param message ItemFingerprint * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.Impact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.ItemFingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Impact to JSON. + * Converts this ItemFingerprint to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Impact + * Gets the default type url for ItemFingerprint * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RecordInfo. */ - interface IRecordInfo { + /** Properties of a RecordTarget. */ + interface IRecordTarget { - /** RecordInfo recordUid */ + /** RecordTarget folderUid */ + folderUid?: (Uint8Array|null); + + /** RecordTarget recordUid */ recordUid?: (Uint8Array|null); - /** RecordInfo locationsCount */ - locationsCount?: (number|null); + /** RecordTarget operationType */ + operationType?: (folder.v3.remove.RecordOperationType|null); } - /** - * Additional info for a record being removed. - * Only populated for MOVE_TO_OWNER_TRASH to show "also in X other folders". - */ - class RecordInfo implements IRecordInfo { + /** Represents a RecordTarget. */ + class RecordTarget implements IRecordTarget { /** - * Constructs a new RecordInfo. + * Constructs a new RecordTarget. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRecordInfo); + constructor(properties?: folder.v3.remove.IRecordTarget); - /** RecordInfo recordUid. */ + /** RecordTarget folderUid. */ + public folderUid: Uint8Array; + + /** RecordTarget recordUid. */ public recordUid: Uint8Array; - /** RecordInfo locationsCount. */ - public locationsCount: number; + /** RecordTarget operationType. */ + public operationType: folder.v3.remove.RecordOperationType; /** - * Creates a new RecordInfo instance using the specified properties. + * Creates a new RecordTarget instance using the specified properties. * @param [properties] Properties to set - * @returns RecordInfo instance + * @returns RecordTarget instance */ - public static create(properties?: folder.v3.remove.IRecordInfo): folder.v3.remove.RecordInfo; + public static create(properties?: folder.v3.remove.IRecordTarget): folder.v3.remove.RecordTarget; /** - * Encodes the specified RecordInfo message. Does not implicitly {@link folder.v3.remove.RecordInfo.verify|verify} messages. - * @param message RecordInfo message or plain object to encode + * Encodes the specified RecordTarget message. Does not implicitly {@link folder.v3.remove.RecordTarget.verify|verify} messages. + * @param message RecordTarget message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRecordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IRecordTarget, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RecordInfo message from the specified reader or buffer. + * Decodes a RecordTarget message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RecordInfo + * @returns RecordTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RecordInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RecordTarget; /** - * Creates a RecordInfo message from a plain object. Also converts values to their respective internal types. + * Creates a RecordTarget message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RecordInfo + * @returns RecordTarget */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RecordInfo; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RecordTarget; /** - * Creates a plain object from a RecordInfo message. Also converts values to other types if specified. - * @param message RecordInfo + * Creates a plain object from a RecordTarget message. Also converts values to other types if specified. + * @param message RecordTarget * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RecordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.RecordTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RecordInfo to JSON. + * Converts this RecordTarget to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RecordInfo + * Gets the default type url for RecordTarget * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ItemError. */ - interface IItemError { + /** Properties of a FolderTarget. */ + interface IFolderTarget { - /** ItemError code */ - code?: (folder.v3.remove.RemoveErrorCode|null); + /** FolderTarget folderUid */ + folderUid?: (Uint8Array|null); - /** ItemError message */ - message?: (string|null); + /** FolderTarget operationType */ + operationType?: (folder.v3.remove.FolderOperationType|null); } - /** Error details for a failed item. */ - class ItemError implements IItemError { + /** Represents a FolderTarget. */ + class FolderTarget implements IFolderTarget { /** - * Constructs a new ItemError. + * Constructs a new FolderTarget. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IItemError); + constructor(properties?: folder.v3.remove.IFolderTarget); - /** ItemError code. */ - public code: folder.v3.remove.RemoveErrorCode; + /** FolderTarget folderUid. */ + public folderUid: Uint8Array; - /** ItemError message. */ - public message: string; + /** FolderTarget operationType. */ + public operationType: folder.v3.remove.FolderOperationType; /** - * Creates a new ItemError instance using the specified properties. + * Creates a new FolderTarget instance using the specified properties. * @param [properties] Properties to set - * @returns ItemError instance + * @returns FolderTarget instance */ - public static create(properties?: folder.v3.remove.IItemError): folder.v3.remove.ItemError; + public static create(properties?: folder.v3.remove.IFolderTarget): folder.v3.remove.FolderTarget; /** - * Encodes the specified ItemError message. Does not implicitly {@link folder.v3.remove.ItemError.verify|verify} messages. - * @param message ItemError message or plain object to encode + * Encodes the specified FolderTarget message. Does not implicitly {@link folder.v3.remove.FolderTarget.verify|verify} messages. + * @param message FolderTarget message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IItemError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IFolderTarget, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ItemError message from the specified reader or buffer. + * Decodes a FolderTarget message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ItemError + * @returns FolderTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.ItemError; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.FolderTarget; /** - * Creates an ItemError message from a plain object. Also converts values to their respective internal types. + * Creates a FolderTarget message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ItemError + * @returns FolderTarget */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.ItemError; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.FolderTarget; /** - * Creates a plain object from an ItemError message. Also converts values to other types if specified. - * @param message ItemError + * Creates a plain object from a FolderTarget message. Also converts values to other types if specified. + * @param message FolderTarget * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.ItemError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.FolderTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ItemError to JSON. + * Converts this FolderTarget to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ItemError + * Gets the default type url for FolderTarget * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RemovalTokenPayload. */ - interface IRemovalTokenPayload { + /** RestoreStatus enum. */ + enum RestoreStatus { + RESTORE_STATUS_UNKNOWN = 0, + RS_SUCCESS = 1, + RS_NOT_IN_TRASHCAN = 2, + RS_ACCESS_DENIED = 3, + RS_TARGET_FOLDER_NOT_FOUND = 4, + RS_ALREADY_EXISTS_IN_TARGET = 5, + RS_FAIL = 6 + } - /** RemovalTokenPayload itemFingerprints */ - itemFingerprints?: (folder.v3.remove.IItemFingerprint[]|null); + /** RestoreItemType enum. */ + enum RestoreItemType { + RESTORE_ITEM_UNKNOWN = 0, + RESTORE_ITEM_RECORD = 1, + RESTORE_ITEM_FOLDER = 2 + } - /** RemovalTokenPayload userId */ - userId?: (number|null); + /** Properties of a RestoreResult. */ + interface IRestoreResult { - /** RemovalTokenPayload deviceId */ - deviceId?: (number|null); + /** RestoreResult itemUid */ + itemUid?: (Uint8Array|null); - /** RemovalTokenPayload sessionUid */ - sessionUid?: (Uint8Array|null); + /** RestoreResult itemType */ + itemType?: (folder.v3.remove.RestoreItemType|null); - /** RemovalTokenPayload expiresAtMillis */ - expiresAtMillis?: (number|null); + /** RestoreResult status */ + status?: (folder.v3.remove.RestoreStatus|null); + + /** RestoreResult errorMessage */ + errorMessage?: (string|null); } - /** Internal token payload (not exposed in API, just for serialization) */ - class RemovalTokenPayload implements IRemovalTokenPayload { + /** Represents a RestoreResult. */ + class RestoreResult implements IRestoreResult { /** - * Constructs a new RemovalTokenPayload. + * Constructs a new RestoreResult. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRemovalTokenPayload); - - /** RemovalTokenPayload itemFingerprints. */ - public itemFingerprints: folder.v3.remove.IItemFingerprint[]; + constructor(properties?: folder.v3.remove.IRestoreResult); - /** RemovalTokenPayload userId. */ - public userId: number; + /** RestoreResult itemUid. */ + public itemUid: Uint8Array; - /** RemovalTokenPayload deviceId. */ - public deviceId: number; + /** RestoreResult itemType. */ + public itemType: folder.v3.remove.RestoreItemType; - /** RemovalTokenPayload sessionUid. */ - public sessionUid: Uint8Array; + /** RestoreResult status. */ + public status: folder.v3.remove.RestoreStatus; - /** RemovalTokenPayload expiresAtMillis. */ - public expiresAtMillis: number; + /** RestoreResult errorMessage. */ + public errorMessage: string; /** - * Creates a new RemovalTokenPayload instance using the specified properties. + * Creates a new RestoreResult instance using the specified properties. * @param [properties] Properties to set - * @returns RemovalTokenPayload instance + * @returns RestoreResult instance */ - public static create(properties?: folder.v3.remove.IRemovalTokenPayload): folder.v3.remove.RemovalTokenPayload; + public static create(properties?: folder.v3.remove.IRestoreResult): folder.v3.remove.RestoreResult; /** - * Encodes the specified RemovalTokenPayload message. Does not implicitly {@link folder.v3.remove.RemovalTokenPayload.verify|verify} messages. - * @param message RemovalTokenPayload message or plain object to encode + * Encodes the specified RestoreResult message. Does not implicitly {@link folder.v3.remove.RestoreResult.verify|verify} messages. + * @param message RestoreResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRemovalTokenPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IRestoreResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemovalTokenPayload message from the specified reader or buffer. + * Decodes a RestoreResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemovalTokenPayload + * @returns RestoreResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RemovalTokenPayload; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RestoreResult; /** - * Creates a RemovalTokenPayload message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemovalTokenPayload + * @returns RestoreResult */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RemovalTokenPayload; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RestoreResult; /** - * Creates a plain object from a RemovalTokenPayload message. Also converts values to other types if specified. - * @param message RemovalTokenPayload + * Creates a plain object from a RestoreResult message. Also converts values to other types if specified. + * @param message RestoreResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RemovalTokenPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.RestoreResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemovalTokenPayload to JSON. + * Converts this RestoreResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RemovalTokenPayload + * Gets the default type url for RestoreResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ItemFingerprint. */ - interface IItemFingerprint { - - /** ItemFingerprint record */ - record?: (folder.v3.remove.IRecordTarget|null); + /** Properties of a TrashcanRestoreResponse. */ + interface ITrashcanRestoreResponse { - /** ItemFingerprint folder */ - folder?: (folder.v3.remove.IFolderTarget|null); + /** TrashcanRestoreResponse results */ + results?: (folder.v3.remove.IRestoreResult[]|null); - /** ItemFingerprint fingerprint */ - fingerprint?: (Uint8Array|null); + /** TrashcanRestoreResponse errorMessage */ + errorMessage?: (string|null); } - /** Represents an ItemFingerprint. */ - class ItemFingerprint implements IItemFingerprint { + /** Represents a TrashcanRestoreResponse. */ + class TrashcanRestoreResponse implements ITrashcanRestoreResponse { /** - * Constructs a new ItemFingerprint. + * Constructs a new TrashcanRestoreResponse. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IItemFingerprint); - - /** ItemFingerprint record. */ - public record?: (folder.v3.remove.IRecordTarget|null); - - /** ItemFingerprint folder. */ - public folder?: (folder.v3.remove.IFolderTarget|null); + constructor(properties?: folder.v3.remove.ITrashcanRestoreResponse); - /** ItemFingerprint fingerprint. */ - public fingerprint: Uint8Array; + /** TrashcanRestoreResponse results. */ + public results: folder.v3.remove.IRestoreResult[]; - /** ItemFingerprint target. */ - public target?: ("record"|"folder"); + /** TrashcanRestoreResponse errorMessage. */ + public errorMessage: string; /** - * Creates a new ItemFingerprint instance using the specified properties. + * Creates a new TrashcanRestoreResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ItemFingerprint instance + * @returns TrashcanRestoreResponse instance */ - public static create(properties?: folder.v3.remove.IItemFingerprint): folder.v3.remove.ItemFingerprint; + public static create(properties?: folder.v3.remove.ITrashcanRestoreResponse): folder.v3.remove.TrashcanRestoreResponse; /** - * Encodes the specified ItemFingerprint message. Does not implicitly {@link folder.v3.remove.ItemFingerprint.verify|verify} messages. - * @param message ItemFingerprint message or plain object to encode + * Encodes the specified TrashcanRestoreResponse message. Does not implicitly {@link folder.v3.remove.TrashcanRestoreResponse.verify|verify} messages. + * @param message TrashcanRestoreResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IItemFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.ITrashcanRestoreResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ItemFingerprint message from the specified reader or buffer. + * Decodes a TrashcanRestoreResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ItemFingerprint + * @returns TrashcanRestoreResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.ItemFingerprint; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.TrashcanRestoreResponse; /** - * Creates an ItemFingerprint message from a plain object. Also converts values to their respective internal types. + * Creates a TrashcanRestoreResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ItemFingerprint + * @returns TrashcanRestoreResponse */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.ItemFingerprint; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.TrashcanRestoreResponse; /** - * Creates a plain object from an ItemFingerprint message. Also converts values to other types if specified. - * @param message ItemFingerprint + * Creates a plain object from a TrashcanRestoreResponse message. Also converts values to other types if specified. + * @param message TrashcanRestoreResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.ItemFingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.TrashcanRestoreResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ItemFingerprint to JSON. + * Converts this TrashcanRestoreResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ItemFingerprint + * Gets the default type url for TrashcanRestoreResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RecordTarget. */ - interface IRecordTarget { - - /** RecordTarget folderUid */ - folderUid?: (Uint8Array|null); + /** Properties of a RestoreRecord. */ + interface IRestoreRecord { - /** RecordTarget recordUid */ + /** RestoreRecord recordUid */ recordUid?: (Uint8Array|null); - /** RecordTarget operationType */ - operationType?: (folder.v3.remove.RecordOperationType|null); + /** RestoreRecord encryptedRecordKey */ + encryptedRecordKey?: (Uint8Array|null); + + /** RestoreRecord sourceFolderUid */ + sourceFolderUid?: (Uint8Array|null); } - /** Represents a RecordTarget. */ - class RecordTarget implements IRecordTarget { + /** Represents a RestoreRecord. */ + class RestoreRecord implements IRestoreRecord { /** - * Constructs a new RecordTarget. + * Constructs a new RestoreRecord. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRecordTarget); - - /** RecordTarget folderUid. */ - public folderUid: Uint8Array; + constructor(properties?: folder.v3.remove.IRestoreRecord); - /** RecordTarget recordUid. */ + /** RestoreRecord recordUid. */ public recordUid: Uint8Array; - /** RecordTarget operationType. */ - public operationType: folder.v3.remove.RecordOperationType; + /** RestoreRecord encryptedRecordKey. */ + public encryptedRecordKey: Uint8Array; + + /** RestoreRecord sourceFolderUid. */ + public sourceFolderUid: Uint8Array; /** - * Creates a new RecordTarget instance using the specified properties. + * Creates a new RestoreRecord instance using the specified properties. * @param [properties] Properties to set - * @returns RecordTarget instance + * @returns RestoreRecord instance */ - public static create(properties?: folder.v3.remove.IRecordTarget): folder.v3.remove.RecordTarget; + public static create(properties?: folder.v3.remove.IRestoreRecord): folder.v3.remove.RestoreRecord; /** - * Encodes the specified RecordTarget message. Does not implicitly {@link folder.v3.remove.RecordTarget.verify|verify} messages. - * @param message RecordTarget message or plain object to encode + * Encodes the specified RestoreRecord message. Does not implicitly {@link folder.v3.remove.RestoreRecord.verify|verify} messages. + * @param message RestoreRecord message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRecordTarget, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IRestoreRecord, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RecordTarget message from the specified reader or buffer. + * Decodes a RestoreRecord message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RecordTarget + * @returns RestoreRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RecordTarget; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RestoreRecord; /** - * Creates a RecordTarget message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreRecord message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RecordTarget + * @returns RestoreRecord */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RecordTarget; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RestoreRecord; /** - * Creates a plain object from a RecordTarget message. Also converts values to other types if specified. - * @param message RecordTarget + * Creates a plain object from a RestoreRecord message. Also converts values to other types if specified. + * @param message RestoreRecord * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RecordTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.RestoreRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RecordTarget to JSON. + * Converts this RestoreRecord to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RecordTarget + * Gets the default type url for RestoreRecord * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FolderTarget. */ - interface IFolderTarget { + /** Properties of a RestoreFolder. */ + interface IRestoreFolder { - /** FolderTarget folderUid */ + /** RestoreFolder folderUid */ folderUid?: (Uint8Array|null); - /** FolderTarget operationType */ - operationType?: (folder.v3.remove.FolderOperationType|null); + /** RestoreFolder encryptedFolderKey */ + encryptedFolderKey?: (Uint8Array|null); } - /** Represents a FolderTarget. */ - class FolderTarget implements IFolderTarget { + /** Represents a RestoreFolder. */ + class RestoreFolder implements IRestoreFolder { /** - * Constructs a new FolderTarget. + * Constructs a new RestoreFolder. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IFolderTarget); + constructor(properties?: folder.v3.remove.IRestoreFolder); - /** FolderTarget folderUid. */ + /** RestoreFolder folderUid. */ public folderUid: Uint8Array; - /** FolderTarget operationType. */ - public operationType: folder.v3.remove.FolderOperationType; + /** RestoreFolder encryptedFolderKey. */ + public encryptedFolderKey: Uint8Array; /** - * Creates a new FolderTarget instance using the specified properties. + * Creates a new RestoreFolder instance using the specified properties. * @param [properties] Properties to set - * @returns FolderTarget instance + * @returns RestoreFolder instance */ - public static create(properties?: folder.v3.remove.IFolderTarget): folder.v3.remove.FolderTarget; + public static create(properties?: folder.v3.remove.IRestoreFolder): folder.v3.remove.RestoreFolder; /** - * Encodes the specified FolderTarget message. Does not implicitly {@link folder.v3.remove.FolderTarget.verify|verify} messages. - * @param message FolderTarget message or plain object to encode + * Encodes the specified RestoreFolder message. Does not implicitly {@link folder.v3.remove.RestoreFolder.verify|verify} messages. + * @param message RestoreFolder message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IFolderTarget, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.IRestoreFolder, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FolderTarget message from the specified reader or buffer. + * Decodes a RestoreFolder message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FolderTarget + * @returns RestoreFolder * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.FolderTarget; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RestoreFolder; /** - * Creates a FolderTarget message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreFolder message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FolderTarget + * @returns RestoreFolder */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.FolderTarget; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.RestoreFolder; /** - * Creates a plain object from a FolderTarget message. Also converts values to other types if specified. - * @param message FolderTarget + * Creates a plain object from a RestoreFolder message. Also converts values to other types if specified. + * @param message RestoreFolder * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.FolderTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.RestoreFolder, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FolderTarget to JSON. + * Converts this RestoreFolder to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FolderTarget + * Gets the default type url for RestoreFolder * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** RestoreStatus enum. */ - enum RestoreStatus { - RESTORE_STATUS_UNKNOWN = 0, - RS_SUCCESS = 1, - RS_NOT_IN_TRASHCAN = 2, - RS_ACCESS_DENIED = 3, - RS_TARGET_FOLDER_NOT_FOUND = 4, - RS_ALREADY_EXISTS_IN_TARGET = 5, - RS_FAIL = 6 - } - - /** RestoreItemType enum. */ - enum RestoreItemType { - RESTORE_ITEM_UNKNOWN = 0, - RESTORE_ITEM_RECORD = 1, - RESTORE_ITEM_FOLDER = 2 - } - - /** Properties of a RestoreResult. */ - interface IRestoreResult { - - /** RestoreResult itemUid */ - itemUid?: (Uint8Array|null); + /** Properties of a TrashcanRestoreRequest. */ + interface ITrashcanRestoreRequest { - /** RestoreResult itemType */ - itemType?: (folder.v3.remove.RestoreItemType|null); + /** TrashcanRestoreRequest records */ + records?: (folder.v3.remove.IRestoreRecord[]|null); - /** RestoreResult status */ - status?: (folder.v3.remove.RestoreStatus|null); + /** TrashcanRestoreRequest folders */ + folders?: (folder.v3.remove.IRestoreFolder[]|null); - /** RestoreResult errorMessage */ - errorMessage?: (string|null); + /** TrashcanRestoreRequest targetFolderUid */ + targetFolderUid?: (Uint8Array|null); } - /** Represents a RestoreResult. */ - class RestoreResult implements IRestoreResult { + /** Represents a TrashcanRestoreRequest. */ + class TrashcanRestoreRequest implements ITrashcanRestoreRequest { /** - * Constructs a new RestoreResult. + * Constructs a new TrashcanRestoreRequest. * @param [properties] Properties to set */ - constructor(properties?: folder.v3.remove.IRestoreResult); - - /** RestoreResult itemUid. */ - public itemUid: Uint8Array; + constructor(properties?: folder.v3.remove.ITrashcanRestoreRequest); - /** RestoreResult itemType. */ - public itemType: folder.v3.remove.RestoreItemType; + /** TrashcanRestoreRequest records. */ + public records: folder.v3.remove.IRestoreRecord[]; - /** RestoreResult status. */ - public status: folder.v3.remove.RestoreStatus; + /** TrashcanRestoreRequest folders. */ + public folders: folder.v3.remove.IRestoreFolder[]; - /** RestoreResult errorMessage. */ - public errorMessage: string; + /** TrashcanRestoreRequest targetFolderUid. */ + public targetFolderUid: Uint8Array; /** - * Creates a new RestoreResult instance using the specified properties. + * Creates a new TrashcanRestoreRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreResult instance + * @returns TrashcanRestoreRequest instance */ - public static create(properties?: folder.v3.remove.IRestoreResult): folder.v3.remove.RestoreResult; + public static create(properties?: folder.v3.remove.ITrashcanRestoreRequest): folder.v3.remove.TrashcanRestoreRequest; /** - * Encodes the specified RestoreResult message. Does not implicitly {@link folder.v3.remove.RestoreResult.verify|verify} messages. - * @param message RestoreResult message or plain object to encode + * Encodes the specified TrashcanRestoreRequest message. Does not implicitly {@link folder.v3.remove.TrashcanRestoreRequest.verify|verify} messages. + * @param message TrashcanRestoreRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: folder.v3.remove.IRestoreResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: folder.v3.remove.ITrashcanRestoreRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreResult message from the specified reader or buffer. + * Decodes a TrashcanRestoreRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreResult + * @returns TrashcanRestoreRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RestoreResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.TrashcanRestoreRequest; /** - * Creates a RestoreResult message from a plain object. Also converts values to their respective internal types. + * Creates a TrashcanRestoreRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreResult + * @returns TrashcanRestoreRequest */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RestoreResult; + public static fromObject(object: { [k: string]: any }): folder.v3.remove.TrashcanRestoreRequest; /** - * Creates a plain object from a RestoreResult message. Also converts values to other types if specified. - * @param message RestoreResult + * Creates a plain object from a TrashcanRestoreRequest message. Also converts values to other types if specified. + * @param message TrashcanRestoreRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: folder.v3.remove.RestoreResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: folder.v3.remove.TrashcanRestoreRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreResult to JSON. + * Converts this TrashcanRestoreRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RestoreResult + * Gets the default type url for TrashcanRestoreRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a TrashcanRestoreResponse. */ - interface ITrashcanRestoreResponse { + /** RPC service for folder operations. */ + class FolderService extends $protobuf.rpc.Service { - /** TrashcanRestoreResponse results */ - results?: (folder.v3.remove.IRestoreResult[]|null); + /** + * Constructs a new FolderService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** TrashcanRestoreResponse errorMessage */ - errorMessage?: (string|null); - } + /** + * Creates new FolderService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): FolderService; - /** Represents a TrashcanRestoreResponse. */ - class TrashcanRestoreResponse implements ITrashcanRestoreResponse { + /** + * Retrieve users and teams with access to specified folders. + * Requires can_change_user_permissions permission or Share Admin/MC Admin privileges. + * @param request GetFolderAccessRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetFolderAccessResponse + */ + public getFolderAccess(request: folder.v3.IGetFolderAccessRequest, callback: folder.v3.FolderService.GetFolderAccessCallback): void; - /** - * Constructs a new TrashcanRestoreResponse. - * @param [properties] Properties to set - */ - constructor(properties?: folder.v3.remove.ITrashcanRestoreResponse); + /** + * Retrieve users and teams with access to specified folders. + * Requires can_change_user_permissions permission or Share Admin/MC Admin privileges. + * @param request GetFolderAccessRequest message or plain object + * @returns Promise + */ + public getFolderAccess(request: folder.v3.IGetFolderAccessRequest): Promise; + } - /** TrashcanRestoreResponse results. */ - public results: folder.v3.remove.IRestoreResult[]; + namespace FolderService { - /** TrashcanRestoreResponse errorMessage. */ - public errorMessage: string; + /** + * Callback as used by {@link folder.v3.FolderService#getFolderAccess}. + * @param error Error, if any + * @param [response] GetFolderAccessResponse + */ + type GetFolderAccessCallback = (error: (Error|null), response?: folder.v3.GetFolderAccessResponse) => void; + } - /** - * Creates a new TrashcanRestoreResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TrashcanRestoreResponse instance - */ - public static create(properties?: folder.v3.remove.ITrashcanRestoreResponse): folder.v3.remove.TrashcanRestoreResponse; + /** Properties of a GetFolderAccessRequest. */ + interface IGetFolderAccessRequest { + + /** List of folder UIDs to query (max: 100) */ + folderUid?: (Uint8Array[]|null); + + /** + * Continuation token for pagination. + * Contains the last_modified timestamp from the previous page. + * Omit for the first page. + */ + continuationToken?: (folder.v3.IContinuationToken|null); + + /** + * Maximum number of accessors to return per page. + * Default: 100, Max: 1000 + */ + pageSize?: (number|null); + } + + /** + * Request to retrieve folder accessors (users and teams with access to folders). + * Supports cursor-based pagination using last_modified timestamps. + */ + class GetFolderAccessRequest implements IGetFolderAccessRequest { + + /** + * Constructs a new GetFolderAccessRequest. + * @param [properties] Properties to set + */ + constructor(properties?: folder.v3.IGetFolderAccessRequest); + + /** List of folder UIDs to query (max: 100) */ + public folderUid: Uint8Array[]; + + /** + * Continuation token for pagination. + * Contains the last_modified timestamp from the previous page. + * Omit for the first page. + */ + public continuationToken?: (folder.v3.IContinuationToken|null); + + /** + * Maximum number of accessors to return per page. + * Default: 100, Max: 1000 + */ + public pageSize?: (number|null); + + /** + * Creates a new GetFolderAccessRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFolderAccessRequest instance + */ + public static create(properties?: folder.v3.IGetFolderAccessRequest): folder.v3.GetFolderAccessRequest; + + /** + * Encodes the specified GetFolderAccessRequest message. Does not implicitly {@link folder.v3.GetFolderAccessRequest.verify|verify} messages. + * @param message GetFolderAccessRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: folder.v3.IGetFolderAccessRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFolderAccessRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFolderAccessRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.GetFolderAccessRequest; + + /** + * Creates a GetFolderAccessRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFolderAccessRequest + */ + public static fromObject(object: { [k: string]: any }): folder.v3.GetFolderAccessRequest; + + /** + * Creates a plain object from a GetFolderAccessRequest message. Also converts values to other types if specified. + * @param message GetFolderAccessRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: folder.v3.GetFolderAccessRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFolderAccessRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFolderAccessRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFolderAccessResponse. */ + interface IGetFolderAccessResponse { + + /** Per-folder results (either success with accessors or error) */ + folderAccessResults?: (folder.v3.IGetFolderAccessResult[]|null); + + /** Continuation token for the next page (only present if hasMore is true) */ + continuationToken?: (folder.v3.IContinuationToken|null); - /** - * Encodes the specified TrashcanRestoreResponse message. Does not implicitly {@link folder.v3.remove.TrashcanRestoreResponse.verify|verify} messages. - * @param message TrashcanRestoreResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: folder.v3.remove.ITrashcanRestoreResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** True if more results exist beyond this page */ + hasMore?: (boolean|null); + } - /** - * Decodes a TrashcanRestoreResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TrashcanRestoreResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.TrashcanRestoreResponse; + /** Response containing folder accessors with pagination support. */ + class GetFolderAccessResponse implements IGetFolderAccessResponse { - /** - * Creates a TrashcanRestoreResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TrashcanRestoreResponse - */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.TrashcanRestoreResponse; + /** + * Constructs a new GetFolderAccessResponse. + * @param [properties] Properties to set + */ + constructor(properties?: folder.v3.IGetFolderAccessResponse); - /** - * Creates a plain object from a TrashcanRestoreResponse message. Also converts values to other types if specified. - * @param message TrashcanRestoreResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: folder.v3.remove.TrashcanRestoreResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Per-folder results (either success with accessors or error) */ + public folderAccessResults: folder.v3.IGetFolderAccessResult[]; - /** - * Converts this TrashcanRestoreResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Continuation token for the next page (only present if hasMore is true) */ + public continuationToken?: (folder.v3.IContinuationToken|null); - /** - * Gets the default type url for TrashcanRestoreResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** True if more results exist beyond this page */ + public hasMore: boolean; - /** Properties of a RestoreRecord. */ - interface IRestoreRecord { + /** + * Creates a new GetFolderAccessResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFolderAccessResponse instance + */ + public static create(properties?: folder.v3.IGetFolderAccessResponse): folder.v3.GetFolderAccessResponse; - /** RestoreRecord recordUid */ - recordUid?: (Uint8Array|null); + /** + * Encodes the specified GetFolderAccessResponse message. Does not implicitly {@link folder.v3.GetFolderAccessResponse.verify|verify} messages. + * @param message GetFolderAccessResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: folder.v3.IGetFolderAccessResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** RestoreRecord encryptedRecordKey */ - encryptedRecordKey?: (Uint8Array|null); + /** + * Decodes a GetFolderAccessResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFolderAccessResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.GetFolderAccessResponse; - /** RestoreRecord sourceFolderUid */ - sourceFolderUid?: (Uint8Array|null); - } + /** + * Creates a GetFolderAccessResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFolderAccessResponse + */ + public static fromObject(object: { [k: string]: any }): folder.v3.GetFolderAccessResponse; - /** Represents a RestoreRecord. */ - class RestoreRecord implements IRestoreRecord { + /** + * Creates a plain object from a GetFolderAccessResponse message. Also converts values to other types if specified. + * @param message GetFolderAccessResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: folder.v3.GetFolderAccessResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new RestoreRecord. - * @param [properties] Properties to set - */ - constructor(properties?: folder.v3.remove.IRestoreRecord); + /** + * Converts this GetFolderAccessResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RestoreRecord recordUid. */ - public recordUid: Uint8Array; + /** + * Gets the default type url for GetFolderAccessResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** RestoreRecord encryptedRecordKey. */ - public encryptedRecordKey: Uint8Array; + /** Properties of a ContinuationToken. */ + interface IContinuationToken { - /** RestoreRecord sourceFolderUid. */ - public sourceFolderUid: Uint8Array; + /** Unix timestamp in milliseconds of the last processed accessor */ + lastModified?: (number|null); + } - /** - * Creates a new RestoreRecord instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreRecord instance - */ - public static create(properties?: folder.v3.remove.IRestoreRecord): folder.v3.remove.RestoreRecord; + /** + * Cursor for cursor-based pagination. + * Contains the timestamp of the last processed item. + */ + class ContinuationToken implements IContinuationToken { - /** - * Encodes the specified RestoreRecord message. Does not implicitly {@link folder.v3.remove.RestoreRecord.verify|verify} messages. - * @param message RestoreRecord message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: folder.v3.remove.IRestoreRecord, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new ContinuationToken. + * @param [properties] Properties to set + */ + constructor(properties?: folder.v3.IContinuationToken); - /** - * Decodes a RestoreRecord message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreRecord - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RestoreRecord; + /** Unix timestamp in milliseconds of the last processed accessor */ + public lastModified: number; - /** - * Creates a RestoreRecord message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreRecord - */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RestoreRecord; + /** + * Creates a new ContinuationToken instance using the specified properties. + * @param [properties] Properties to set + * @returns ContinuationToken instance + */ + public static create(properties?: folder.v3.IContinuationToken): folder.v3.ContinuationToken; - /** - * Creates a plain object from a RestoreRecord message. Also converts values to other types if specified. - * @param message RestoreRecord - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: folder.v3.remove.RestoreRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ContinuationToken message. Does not implicitly {@link folder.v3.ContinuationToken.verify|verify} messages. + * @param message ContinuationToken message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: folder.v3.IContinuationToken, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this RestoreRecord to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a ContinuationToken message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContinuationToken + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.ContinuationToken; - /** - * Gets the default type url for RestoreRecord - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a ContinuationToken message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContinuationToken + */ + public static fromObject(object: { [k: string]: any }): folder.v3.ContinuationToken; - /** Properties of a RestoreFolder. */ - interface IRestoreFolder { + /** + * Creates a plain object from a ContinuationToken message. Also converts values to other types if specified. + * @param message ContinuationToken + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: folder.v3.ContinuationToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** RestoreFolder folderUid */ - folderUid?: (Uint8Array|null); + /** + * Converts this ContinuationToken to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RestoreFolder encryptedFolderKey */ - encryptedFolderKey?: (Uint8Array|null); - } + /** + * Gets the default type url for ContinuationToken + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a RestoreFolder. */ - class RestoreFolder implements IRestoreFolder { + /** Properties of a GetFolderAccessResult. */ + interface IGetFolderAccessResult { - /** - * Constructs a new RestoreFolder. - * @param [properties] Properties to set - */ - constructor(properties?: folder.v3.remove.IRestoreFolder); + /** Folder UID this result applies to */ + folderUid?: (Uint8Array|null); - /** RestoreFolder folderUid. */ - public folderUid: Uint8Array; + /** List of users/teams with access to this folder (populated on success) */ + accessors?: (Folder.IFolderAccessData[]|null); - /** RestoreFolder encryptedFolderKey. */ - public encryptedFolderKey: Uint8Array; + /** Error information (populated on failure, mutually exclusive with accessors) */ + error?: (folder.v3.IFolderAccessError|null); + } - /** - * Creates a new RestoreFolder instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreFolder instance - */ - public static create(properties?: folder.v3.remove.IRestoreFolder): folder.v3.remove.RestoreFolder; + /** + * Result for a single folder. + * Contains either a list of accessors (success) or an error (failure). + */ + class GetFolderAccessResult implements IGetFolderAccessResult { - /** - * Encodes the specified RestoreFolder message. Does not implicitly {@link folder.v3.remove.RestoreFolder.verify|verify} messages. - * @param message RestoreFolder message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: folder.v3.remove.IRestoreFolder, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GetFolderAccessResult. + * @param [properties] Properties to set + */ + constructor(properties?: folder.v3.IGetFolderAccessResult); - /** - * Decodes a RestoreFolder message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreFolder - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.RestoreFolder; + /** Folder UID this result applies to */ + public folderUid: Uint8Array; - /** - * Creates a RestoreFolder message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreFolder - */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.RestoreFolder; + /** List of users/teams with access to this folder (populated on success) */ + public accessors: Folder.IFolderAccessData[]; - /** - * Creates a plain object from a RestoreFolder message. Also converts values to other types if specified. - * @param message RestoreFolder - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: folder.v3.remove.RestoreFolder, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Error information (populated on failure, mutually exclusive with accessors) */ + public error?: (folder.v3.IFolderAccessError|null); + + /** + * Creates a new GetFolderAccessResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFolderAccessResult instance + */ + public static create(properties?: folder.v3.IGetFolderAccessResult): folder.v3.GetFolderAccessResult; + + /** + * Encodes the specified GetFolderAccessResult message. Does not implicitly {@link folder.v3.GetFolderAccessResult.verify|verify} messages. + * @param message GetFolderAccessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: folder.v3.IGetFolderAccessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFolderAccessResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFolderAccessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.GetFolderAccessResult; - /** - * Converts this RestoreFolder to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a GetFolderAccessResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFolderAccessResult + */ + public static fromObject(object: { [k: string]: any }): folder.v3.GetFolderAccessResult; - /** - * Gets the default type url for RestoreFolder - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a GetFolderAccessResult message. Also converts values to other types if specified. + * @param message GetFolderAccessResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: folder.v3.GetFolderAccessResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a TrashcanRestoreRequest. */ - interface ITrashcanRestoreRequest { + /** + * Converts this GetFolderAccessResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** TrashcanRestoreRequest records */ - records?: (folder.v3.remove.IRestoreRecord[]|null); + /** + * Gets the default type url for GetFolderAccessResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** TrashcanRestoreRequest folders */ - folders?: (folder.v3.remove.IRestoreFolder[]|null); + /** Properties of a FolderAccessError. */ + interface IFolderAccessError { - /** TrashcanRestoreRequest targetFolderUid */ - targetFolderUid?: (Uint8Array|null); - } + /** Status code (e.g., NOT_FOUND, ACCESS_DENIED) */ + status?: (Folder.FolderModifyStatus|null); - /** Represents a TrashcanRestoreRequest. */ - class TrashcanRestoreRequest implements ITrashcanRestoreRequest { + /** Human-readable error message */ + message?: (string|null); + } - /** - * Constructs a new TrashcanRestoreRequest. - * @param [properties] Properties to set - */ - constructor(properties?: folder.v3.remove.ITrashcanRestoreRequest); + /** Error information for a folder that couldn't be processed. */ + class FolderAccessError implements IFolderAccessError { - /** TrashcanRestoreRequest records. */ - public records: folder.v3.remove.IRestoreRecord[]; + /** + * Constructs a new FolderAccessError. + * @param [properties] Properties to set + */ + constructor(properties?: folder.v3.IFolderAccessError); - /** TrashcanRestoreRequest folders. */ - public folders: folder.v3.remove.IRestoreFolder[]; + /** Status code (e.g., NOT_FOUND, ACCESS_DENIED) */ + public status: Folder.FolderModifyStatus; - /** TrashcanRestoreRequest targetFolderUid. */ - public targetFolderUid: Uint8Array; + /** Human-readable error message */ + public message: string; - /** - * Creates a new TrashcanRestoreRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TrashcanRestoreRequest instance - */ - public static create(properties?: folder.v3.remove.ITrashcanRestoreRequest): folder.v3.remove.TrashcanRestoreRequest; + /** + * Creates a new FolderAccessError instance using the specified properties. + * @param [properties] Properties to set + * @returns FolderAccessError instance + */ + public static create(properties?: folder.v3.IFolderAccessError): folder.v3.FolderAccessError; - /** - * Encodes the specified TrashcanRestoreRequest message. Does not implicitly {@link folder.v3.remove.TrashcanRestoreRequest.verify|verify} messages. - * @param message TrashcanRestoreRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: folder.v3.remove.ITrashcanRestoreRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FolderAccessError message. Does not implicitly {@link folder.v3.FolderAccessError.verify|verify} messages. + * @param message FolderAccessError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: folder.v3.IFolderAccessError, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a TrashcanRestoreRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TrashcanRestoreRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.remove.TrashcanRestoreRequest; + /** + * Decodes a FolderAccessError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FolderAccessError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): folder.v3.FolderAccessError; - /** - * Creates a TrashcanRestoreRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TrashcanRestoreRequest - */ - public static fromObject(object: { [k: string]: any }): folder.v3.remove.TrashcanRestoreRequest; + /** + * Creates a FolderAccessError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FolderAccessError + */ + public static fromObject(object: { [k: string]: any }): folder.v3.FolderAccessError; - /** - * Creates a plain object from a TrashcanRestoreRequest message. Also converts values to other types if specified. - * @param message TrashcanRestoreRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: folder.v3.remove.TrashcanRestoreRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a FolderAccessError message. Also converts values to other types if specified. + * @param message FolderAccessError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: folder.v3.FolderAccessError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this TrashcanRestoreRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this FolderAccessError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for TrashcanRestoreRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for FolderAccessError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -92800,3 +94069,215 @@ export namespace Workflow { public static getTypeUrl(typeUrlPrefix?: string): string; } } + +/** Namespace keeper. */ +export namespace keeper { + + /** Namespace api. */ + namespace api { + + /** Namespace common. */ + namespace common { + + /** Properties of a Page. */ + interface IPage { + + /** + * Zero-indexed page number. + * Default: 0 (first page) + */ + pageNumber?: (number|null); + + /** Number of items per page. */ + pageSize?: (number|null); + + /** Use as cursor to the next page. */ + cursorToken?: (string|null); + } + + /** + * Pagination parameters for paginated requests. + * Used to specify which page of results to retrieve. + */ + class Page implements IPage { + + /** + * Constructs a new Page. + * @param [properties] Properties to set + */ + constructor(properties?: keeper.api.common.IPage); + + /** + * Zero-indexed page number. + * Default: 0 (first page) + */ + public pageNumber: number; + + /** Number of items per page. */ + public pageSize: number; + + /** Use as cursor to the next page. */ + public cursorToken: string; + + /** + * Creates a new Page instance using the specified properties. + * @param [properties] Properties to set + * @returns Page instance + */ + public static create(properties?: keeper.api.common.IPage): keeper.api.common.Page; + + /** + * Encodes the specified Page message. Does not implicitly {@link keeper.api.common.Page.verify|verify} messages. + * @param message Page message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: keeper.api.common.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Page message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Page + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): keeper.api.common.Page; + + /** + * Creates a Page message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Page + */ + public static fromObject(object: { [k: string]: any }): keeper.api.common.Page; + + /** + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @param message Page + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: keeper.api.common.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Page to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Page + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PageInfo. */ + interface IPageInfo { + + /** Current page number (zero-indexed). */ + pageNumber?: (number|null); + + /** Number of items per page. */ + pageSize?: (number|null); + + /** Total number of items available across all pages. */ + totalCount?: (number|null); + + /** + * Indicates whether more pages are available. + * True if (page_number + 1) * page_size < total_count + */ + hasMore?: (boolean|null); + + /** Use as cursor to the next page. */ + cursorToken?: (string|null); + } + + /** + * Pagination metadata included in paginated responses. + * Provides information about the current page and total available items. + */ + class PageInfo implements IPageInfo { + + /** + * Constructs a new PageInfo. + * @param [properties] Properties to set + */ + constructor(properties?: keeper.api.common.IPageInfo); + + /** Current page number (zero-indexed). */ + public pageNumber: number; + + /** Number of items per page. */ + public pageSize: number; + + /** Total number of items available across all pages. */ + public totalCount: number; + + /** + * Indicates whether more pages are available. + * True if (page_number + 1) * page_size < total_count + */ + public hasMore: boolean; + + /** Use as cursor to the next page. */ + public cursorToken: string; + + /** + * Creates a new PageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PageInfo instance + */ + public static create(properties?: keeper.api.common.IPageInfo): keeper.api.common.PageInfo; + + /** + * Encodes the specified PageInfo message. Does not implicitly {@link keeper.api.common.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: keeper.api.common.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PageInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): keeper.api.common.PageInfo; + + /** + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PageInfo + */ + public static fromObject(object: { [k: string]: any }): keeper.api.common.PageInfo; + + /** + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @param message PageInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: keeper.api.common.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PageInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PageInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } +} diff --git a/keeperapi/src/proto/Remove.js b/keeperapi/src/proto/Remove.js index 82045ec2..a030f09a 100644 --- a/keeperapi/src/proto/Remove.js +++ b/keeperapi/src/proto/Remove.js @@ -4938,6 +4938,1255 @@ export const folder = $root.folder = (() => { return remove; })(); + v3.FolderService = (function() { + + /** + * Constructs a new FolderService service. + * @memberof folder.v3 + * @classdesc RPC service for folder operations. + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function FolderService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (FolderService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = FolderService; + + /** + * Creates new FolderService service using the specified rpc implementation. + * @function create + * @memberof folder.v3.FolderService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {FolderService} RPC service. Useful where requests and/or responses are streamed. + */ + FolderService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link folder.v3.FolderService#getFolderAccess}. + * @memberof folder.v3.FolderService + * @typedef GetFolderAccessCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {folder.v3.GetFolderAccessResponse} [response] GetFolderAccessResponse + */ + + /** + * Retrieve users and teams with access to specified folders. + * Requires can_change_user_permissions permission or Share Admin/MC Admin privileges. + * @function getFolderAccess + * @memberof folder.v3.FolderService + * @instance + * @param {folder.v3.IGetFolderAccessRequest} request GetFolderAccessRequest message or plain object + * @param {folder.v3.FolderService.GetFolderAccessCallback} callback Node-style callback called with the error, if any, and GetFolderAccessResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FolderService.prototype.getFolderAccess = function getFolderAccess(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getFolderAccess, $root.folder.v3.GetFolderAccessRequest, $root.folder.v3.GetFolderAccessResponse, request, callback); + }, "name", { value: "GetFolderAccess" }); + + /** + * Retrieve users and teams with access to specified folders. + * Requires can_change_user_permissions permission or Share Admin/MC Admin privileges. + * @function getFolderAccess + * @memberof folder.v3.FolderService + * @instance + * @param {folder.v3.IGetFolderAccessRequest} request GetFolderAccessRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return FolderService; + })(); + + v3.GetFolderAccessRequest = (function() { + + /** + * Properties of a GetFolderAccessRequest. + * @memberof folder.v3 + * @interface IGetFolderAccessRequest + * @property {Array.|null} [folderUid] List of folder UIDs to query (max: 100) + * @property {folder.v3.IContinuationToken|null} [continuationToken] Continuation token for pagination. + * Contains the last_modified timestamp from the previous page. + * Omit for the first page. + * @property {number|null} [pageSize] Maximum number of accessors to return per page. + * Default: 100, Max: 1000 + */ + + /** + * Constructs a new GetFolderAccessRequest. + * @memberof folder.v3 + * @classdesc Request to retrieve folder accessors (users and teams with access to folders). + * Supports cursor-based pagination using last_modified timestamps. + * @implements IGetFolderAccessRequest + * @constructor + * @param {folder.v3.IGetFolderAccessRequest=} [properties] Properties to set + */ + function GetFolderAccessRequest(properties) { + this.folderUid = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * List of folder UIDs to query (max: 100) + * @member {Array.} folderUid + * @memberof folder.v3.GetFolderAccessRequest + * @instance + */ + GetFolderAccessRequest.prototype.folderUid = $util.emptyArray; + + /** + * Continuation token for pagination. + * Contains the last_modified timestamp from the previous page. + * Omit for the first page. + * @member {folder.v3.IContinuationToken|null|undefined} continuationToken + * @memberof folder.v3.GetFolderAccessRequest + * @instance + */ + GetFolderAccessRequest.prototype.continuationToken = null; + + /** + * Maximum number of accessors to return per page. + * Default: 100, Max: 1000 + * @member {number|null|undefined} pageSize + * @memberof folder.v3.GetFolderAccessRequest + * @instance + */ + GetFolderAccessRequest.prototype.pageSize = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GetFolderAccessRequest.prototype, "_continuationToken", { + get: $util.oneOfGetter($oneOfFields = ["continuationToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GetFolderAccessRequest.prototype, "_pageSize", { + get: $util.oneOfGetter($oneOfFields = ["pageSize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetFolderAccessRequest instance using the specified properties. + * @function create + * @memberof folder.v3.GetFolderAccessRequest + * @static + * @param {folder.v3.IGetFolderAccessRequest=} [properties] Properties to set + * @returns {folder.v3.GetFolderAccessRequest} GetFolderAccessRequest instance + */ + GetFolderAccessRequest.create = function create(properties) { + return new GetFolderAccessRequest(properties); + }; + + /** + * Encodes the specified GetFolderAccessRequest message. Does not implicitly {@link folder.v3.GetFolderAccessRequest.verify|verify} messages. + * @function encode + * @memberof folder.v3.GetFolderAccessRequest + * @static + * @param {folder.v3.IGetFolderAccessRequest} message GetFolderAccessRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFolderAccessRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.folderUid != null && message.folderUid.length) + for (let i = 0; i < message.folderUid.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.folderUid[i]); + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) + $root.folder.v3.ContinuationToken.encode(message.continuationToken, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Decodes a GetFolderAccessRequest message from the specified reader or buffer. + * @function decode + * @memberof folder.v3.GetFolderAccessRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {folder.v3.GetFolderAccessRequest} GetFolderAccessRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFolderAccessRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.folder.v3.GetFolderAccessRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.folderUid && message.folderUid.length)) + message.folderUid = []; + message.folderUid.push(reader.bytes()); + break; + } + case 2: { + message.continuationToken = $root.folder.v3.ContinuationToken.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a GetFolderAccessRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof folder.v3.GetFolderAccessRequest + * @static + * @param {Object.} object Plain object + * @returns {folder.v3.GetFolderAccessRequest} GetFolderAccessRequest + */ + GetFolderAccessRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.folder.v3.GetFolderAccessRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.GetFolderAccessRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.folder.v3.GetFolderAccessRequest(); + if (object.folderUid) { + if (!Array.isArray(object.folderUid)) + throw TypeError(".folder.v3.GetFolderAccessRequest.folderUid: array expected"); + message.folderUid = []; + for (let i = 0; i < object.folderUid.length; ++i) + if (typeof object.folderUid[i] === "string") + $util.base64.decode(object.folderUid[i], message.folderUid[i] = $util.newBuffer($util.base64.length(object.folderUid[i])), 0); + else if (object.folderUid[i].length >= 0) + message.folderUid[i] = object.folderUid[i]; + } + if (object.continuationToken != null) { + if (!$util.isObject(object.continuationToken)) + throw TypeError(".folder.v3.GetFolderAccessRequest.continuationToken: object expected"); + message.continuationToken = $root.folder.v3.ContinuationToken.fromObject(object.continuationToken, long + 1); + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a GetFolderAccessRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof folder.v3.GetFolderAccessRequest + * @static + * @param {folder.v3.GetFolderAccessRequest} message GetFolderAccessRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFolderAccessRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) + object.folderUid = []; + if (message.folderUid && message.folderUid.length) { + object.folderUid = []; + for (let j = 0; j < message.folderUid.length; ++j) + object.folderUid[j] = options.bytes === String ? $util.base64.encode(message.folderUid[j], 0, message.folderUid[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid[j]) : message.folderUid[j]; + } + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) { + object.continuationToken = $root.folder.v3.ContinuationToken.toObject(message.continuationToken, options, q + 1); + if (options.oneofs) + object._continuationToken = "continuationToken"; + } + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) { + object.pageSize = message.pageSize; + if (options.oneofs) + object._pageSize = "pageSize"; + } + return object; + }; + + /** + * Converts this GetFolderAccessRequest to JSON. + * @function toJSON + * @memberof folder.v3.GetFolderAccessRequest + * @instance + * @returns {Object.} JSON object + */ + GetFolderAccessRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFolderAccessRequest + * @function getTypeUrl + * @memberof folder.v3.GetFolderAccessRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFolderAccessRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/folder.v3.GetFolderAccessRequest"; + }; + + return GetFolderAccessRequest; + })(); + + v3.GetFolderAccessResponse = (function() { + + /** + * Properties of a GetFolderAccessResponse. + * @memberof folder.v3 + * @interface IGetFolderAccessResponse + * @property {Array.|null} [folderAccessResults] Per-folder results (either success with accessors or error) + * @property {folder.v3.IContinuationToken|null} [continuationToken] Continuation token for the next page (only present if hasMore is true) + * @property {boolean|null} [hasMore] True if more results exist beyond this page + */ + + /** + * Constructs a new GetFolderAccessResponse. + * @memberof folder.v3 + * @classdesc Response containing folder accessors with pagination support. + * @implements IGetFolderAccessResponse + * @constructor + * @param {folder.v3.IGetFolderAccessResponse=} [properties] Properties to set + */ + function GetFolderAccessResponse(properties) { + this.folderAccessResults = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Per-folder results (either success with accessors or error) + * @member {Array.} folderAccessResults + * @memberof folder.v3.GetFolderAccessResponse + * @instance + */ + GetFolderAccessResponse.prototype.folderAccessResults = $util.emptyArray; + + /** + * Continuation token for the next page (only present if hasMore is true) + * @member {folder.v3.IContinuationToken|null|undefined} continuationToken + * @memberof folder.v3.GetFolderAccessResponse + * @instance + */ + GetFolderAccessResponse.prototype.continuationToken = null; + + /** + * True if more results exist beyond this page + * @member {boolean} hasMore + * @memberof folder.v3.GetFolderAccessResponse + * @instance + */ + GetFolderAccessResponse.prototype.hasMore = false; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GetFolderAccessResponse.prototype, "_continuationToken", { + get: $util.oneOfGetter($oneOfFields = ["continuationToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetFolderAccessResponse instance using the specified properties. + * @function create + * @memberof folder.v3.GetFolderAccessResponse + * @static + * @param {folder.v3.IGetFolderAccessResponse=} [properties] Properties to set + * @returns {folder.v3.GetFolderAccessResponse} GetFolderAccessResponse instance + */ + GetFolderAccessResponse.create = function create(properties) { + return new GetFolderAccessResponse(properties); + }; + + /** + * Encodes the specified GetFolderAccessResponse message. Does not implicitly {@link folder.v3.GetFolderAccessResponse.verify|verify} messages. + * @function encode + * @memberof folder.v3.GetFolderAccessResponse + * @static + * @param {folder.v3.IGetFolderAccessResponse} message GetFolderAccessResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFolderAccessResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.folderAccessResults != null && message.folderAccessResults.length) + for (let i = 0; i < message.folderAccessResults.length; ++i) + $root.folder.v3.GetFolderAccessResult.encode(message.folderAccessResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) + $root.folder.v3.ContinuationToken.encode(message.continuationToken, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.hasMore); + return writer; + }; + + /** + * Decodes a GetFolderAccessResponse message from the specified reader or buffer. + * @function decode + * @memberof folder.v3.GetFolderAccessResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {folder.v3.GetFolderAccessResponse} GetFolderAccessResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFolderAccessResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.folder.v3.GetFolderAccessResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.folderAccessResults && message.folderAccessResults.length)) + message.folderAccessResults = []; + message.folderAccessResults.push($root.folder.v3.GetFolderAccessResult.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.continuationToken = $root.folder.v3.ContinuationToken.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.hasMore = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a GetFolderAccessResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof folder.v3.GetFolderAccessResponse + * @static + * @param {Object.} object Plain object + * @returns {folder.v3.GetFolderAccessResponse} GetFolderAccessResponse + */ + GetFolderAccessResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.folder.v3.GetFolderAccessResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.GetFolderAccessResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.folder.v3.GetFolderAccessResponse(); + if (object.folderAccessResults) { + if (!Array.isArray(object.folderAccessResults)) + throw TypeError(".folder.v3.GetFolderAccessResponse.folderAccessResults: array expected"); + message.folderAccessResults = []; + for (let i = 0; i < object.folderAccessResults.length; ++i) { + if (!$util.isObject(object.folderAccessResults[i])) + throw TypeError(".folder.v3.GetFolderAccessResponse.folderAccessResults: object expected"); + message.folderAccessResults[i] = $root.folder.v3.GetFolderAccessResult.fromObject(object.folderAccessResults[i], long + 1); + } + } + if (object.continuationToken != null) { + if (!$util.isObject(object.continuationToken)) + throw TypeError(".folder.v3.GetFolderAccessResponse.continuationToken: object expected"); + message.continuationToken = $root.folder.v3.ContinuationToken.fromObject(object.continuationToken, long + 1); + } + if (object.hasMore != null) + message.hasMore = Boolean(object.hasMore); + return message; + }; + + /** + * Creates a plain object from a GetFolderAccessResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof folder.v3.GetFolderAccessResponse + * @static + * @param {folder.v3.GetFolderAccessResponse} message GetFolderAccessResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFolderAccessResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) + object.folderAccessResults = []; + if (options.defaults) + object.hasMore = false; + if (message.folderAccessResults && message.folderAccessResults.length) { + object.folderAccessResults = []; + for (let j = 0; j < message.folderAccessResults.length; ++j) + object.folderAccessResults[j] = $root.folder.v3.GetFolderAccessResult.toObject(message.folderAccessResults[j], options, q + 1); + } + if (message.continuationToken != null && Object.hasOwnProperty.call(message, "continuationToken")) { + object.continuationToken = $root.folder.v3.ContinuationToken.toObject(message.continuationToken, options, q + 1); + if (options.oneofs) + object._continuationToken = "continuationToken"; + } + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) + object.hasMore = message.hasMore; + return object; + }; + + /** + * Converts this GetFolderAccessResponse to JSON. + * @function toJSON + * @memberof folder.v3.GetFolderAccessResponse + * @instance + * @returns {Object.} JSON object + */ + GetFolderAccessResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFolderAccessResponse + * @function getTypeUrl + * @memberof folder.v3.GetFolderAccessResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFolderAccessResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/folder.v3.GetFolderAccessResponse"; + }; + + return GetFolderAccessResponse; + })(); + + v3.ContinuationToken = (function() { + + /** + * Properties of a ContinuationToken. + * @memberof folder.v3 + * @interface IContinuationToken + * @property {number|null} [lastModified] Unix timestamp in milliseconds of the last processed accessor + */ + + /** + * Constructs a new ContinuationToken. + * @memberof folder.v3 + * @classdesc Cursor for cursor-based pagination. + * Contains the timestamp of the last processed item. + * @implements IContinuationToken + * @constructor + * @param {folder.v3.IContinuationToken=} [properties] Properties to set + */ + function ContinuationToken(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Unix timestamp in milliseconds of the last processed accessor + * @member {number} lastModified + * @memberof folder.v3.ContinuationToken + * @instance + */ + ContinuationToken.prototype.lastModified = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ContinuationToken instance using the specified properties. + * @function create + * @memberof folder.v3.ContinuationToken + * @static + * @param {folder.v3.IContinuationToken=} [properties] Properties to set + * @returns {folder.v3.ContinuationToken} ContinuationToken instance + */ + ContinuationToken.create = function create(properties) { + return new ContinuationToken(properties); + }; + + /** + * Encodes the specified ContinuationToken message. Does not implicitly {@link folder.v3.ContinuationToken.verify|verify} messages. + * @function encode + * @memberof folder.v3.ContinuationToken + * @static + * @param {folder.v3.IContinuationToken} message ContinuationToken message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContinuationToken.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lastModified); + return writer; + }; + + /** + * Decodes a ContinuationToken message from the specified reader or buffer. + * @function decode + * @memberof folder.v3.ContinuationToken + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {folder.v3.ContinuationToken} ContinuationToken + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContinuationToken.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.folder.v3.ContinuationToken(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lastModified = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a ContinuationToken message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof folder.v3.ContinuationToken + * @static + * @param {Object.} object Plain object + * @returns {folder.v3.ContinuationToken} ContinuationToken + */ + ContinuationToken.fromObject = function fromObject(object, long) { + if (object instanceof $root.folder.v3.ContinuationToken) + return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.ContinuationToken: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.folder.v3.ContinuationToken(); + if (object.lastModified != null) + if ($util.Long) + message.lastModified = $util.Long.fromValue(object.lastModified, false); + else if (typeof object.lastModified === "string") + message.lastModified = parseInt(object.lastModified, 10); + else if (typeof object.lastModified === "number") + message.lastModified = object.lastModified; + else if (typeof object.lastModified === "object") + message.lastModified = new $util.LongBits(object.lastModified.low >>> 0, object.lastModified.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ContinuationToken message. Also converts values to other types if specified. + * @function toObject + * @memberof folder.v3.ContinuationToken + * @static + * @param {folder.v3.ContinuationToken} message ContinuationToken + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContinuationToken.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.lastModified = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.lastModified = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.lastModified = typeof message.lastModified === "number" ? BigInt(message.lastModified) : $util.Long.fromBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0, false).toBigInt(); + else if (typeof message.lastModified === "number") + object.lastModified = options.longs === String ? String(message.lastModified) : message.lastModified; + else + object.lastModified = options.longs === String ? $util.Long.prototype.toString.call(message.lastModified) : options.longs === Number ? new $util.LongBits(message.lastModified.low >>> 0, message.lastModified.high >>> 0).toNumber() : message.lastModified; + return object; + }; + + /** + * Converts this ContinuationToken to JSON. + * @function toJSON + * @memberof folder.v3.ContinuationToken + * @instance + * @returns {Object.} JSON object + */ + ContinuationToken.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContinuationToken + * @function getTypeUrl + * @memberof folder.v3.ContinuationToken + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContinuationToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/folder.v3.ContinuationToken"; + }; + + return ContinuationToken; + })(); + + v3.GetFolderAccessResult = (function() { + + /** + * Properties of a GetFolderAccessResult. + * @memberof folder.v3 + * @interface IGetFolderAccessResult + * @property {Uint8Array|null} [folderUid] Folder UID this result applies to + * @property {Array.|null} [accessors] List of users/teams with access to this folder (populated on success) + * @property {folder.v3.IFolderAccessError|null} [error] Error information (populated on failure, mutually exclusive with accessors) + */ + + /** + * Constructs a new GetFolderAccessResult. + * @memberof folder.v3 + * @classdesc Result for a single folder. + * Contains either a list of accessors (success) or an error (failure). + * @implements IGetFolderAccessResult + * @constructor + * @param {folder.v3.IGetFolderAccessResult=} [properties] Properties to set + */ + function GetFolderAccessResult(properties) { + this.accessors = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Folder UID this result applies to + * @member {Uint8Array} folderUid + * @memberof folder.v3.GetFolderAccessResult + * @instance + */ + GetFolderAccessResult.prototype.folderUid = $util.newBuffer([]); + + /** + * List of users/teams with access to this folder (populated on success) + * @member {Array.} accessors + * @memberof folder.v3.GetFolderAccessResult + * @instance + */ + GetFolderAccessResult.prototype.accessors = $util.emptyArray; + + /** + * Error information (populated on failure, mutually exclusive with accessors) + * @member {folder.v3.IFolderAccessError|null|undefined} error + * @memberof folder.v3.GetFolderAccessResult + * @instance + */ + GetFolderAccessResult.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GetFolderAccessResult.prototype, "_error", { + get: $util.oneOfGetter($oneOfFields = ["error"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetFolderAccessResult instance using the specified properties. + * @function create + * @memberof folder.v3.GetFolderAccessResult + * @static + * @param {folder.v3.IGetFolderAccessResult=} [properties] Properties to set + * @returns {folder.v3.GetFolderAccessResult} GetFolderAccessResult instance + */ + GetFolderAccessResult.create = function create(properties) { + return new GetFolderAccessResult(properties); + }; + + /** + * Encodes the specified GetFolderAccessResult message. Does not implicitly {@link folder.v3.GetFolderAccessResult.verify|verify} messages. + * @function encode + * @memberof folder.v3.GetFolderAccessResult + * @static + * @param {folder.v3.IGetFolderAccessResult} message GetFolderAccessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFolderAccessResult.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.folderUid); + if (message.accessors != null && message.accessors.length) + for (let i = 0; i < message.accessors.length; ++i) + $root.Folder.FolderAccessData.encode(message.accessors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.folder.v3.FolderAccessError.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Decodes a GetFolderAccessResult message from the specified reader or buffer. + * @function decode + * @memberof folder.v3.GetFolderAccessResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {folder.v3.GetFolderAccessResult} GetFolderAccessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFolderAccessResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.folder.v3.GetFolderAccessResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.folderUid = reader.bytes(); + break; + } + case 2: { + if (!(message.accessors && message.accessors.length)) + message.accessors = []; + message.accessors.push($root.Folder.FolderAccessData.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.error = $root.folder.v3.FolderAccessError.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a GetFolderAccessResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof folder.v3.GetFolderAccessResult + * @static + * @param {Object.} object Plain object + * @returns {folder.v3.GetFolderAccessResult} GetFolderAccessResult + */ + GetFolderAccessResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.folder.v3.GetFolderAccessResult) + return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.GetFolderAccessResult: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.folder.v3.GetFolderAccessResult(); + if (object.folderUid != null) + if (typeof object.folderUid === "string") + $util.base64.decode(object.folderUid, message.folderUid = $util.newBuffer($util.base64.length(object.folderUid)), 0); + else if (object.folderUid.length >= 0) + message.folderUid = object.folderUid; + if (object.accessors) { + if (!Array.isArray(object.accessors)) + throw TypeError(".folder.v3.GetFolderAccessResult.accessors: array expected"); + message.accessors = []; + for (let i = 0; i < object.accessors.length; ++i) { + if (!$util.isObject(object.accessors[i])) + throw TypeError(".folder.v3.GetFolderAccessResult.accessors: object expected"); + message.accessors[i] = $root.Folder.FolderAccessData.fromObject(object.accessors[i], long + 1); + } + } + if (object.error != null) { + if (!$util.isObject(object.error)) + throw TypeError(".folder.v3.GetFolderAccessResult.error: object expected"); + message.error = $root.folder.v3.FolderAccessError.fromObject(object.error, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetFolderAccessResult message. Also converts values to other types if specified. + * @function toObject + * @memberof folder.v3.GetFolderAccessResult + * @static + * @param {folder.v3.GetFolderAccessResult} message GetFolderAccessResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFolderAccessResult.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) + object.accessors = []; + if (options.defaults) + if (options.bytes === String) + object.folderUid = ""; + else { + object.folderUid = []; + if (options.bytes !== Array) + object.folderUid = $util.newBuffer(object.folderUid); + } + if (message.folderUid != null && Object.hasOwnProperty.call(message, "folderUid")) + object.folderUid = options.bytes === String ? $util.base64.encode(message.folderUid, 0, message.folderUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.folderUid) : message.folderUid; + if (message.accessors && message.accessors.length) { + object.accessors = []; + for (let j = 0; j < message.accessors.length; ++j) + object.accessors[j] = $root.Folder.FolderAccessData.toObject(message.accessors[j], options, q + 1); + } + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + object.error = $root.folder.v3.FolderAccessError.toObject(message.error, options, q + 1); + if (options.oneofs) + object._error = "error"; + } + return object; + }; + + /** + * Converts this GetFolderAccessResult to JSON. + * @function toJSON + * @memberof folder.v3.GetFolderAccessResult + * @instance + * @returns {Object.} JSON object + */ + GetFolderAccessResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFolderAccessResult + * @function getTypeUrl + * @memberof folder.v3.GetFolderAccessResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFolderAccessResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/folder.v3.GetFolderAccessResult"; + }; + + return GetFolderAccessResult; + })(); + + v3.FolderAccessError = (function() { + + /** + * Properties of a FolderAccessError. + * @memberof folder.v3 + * @interface IFolderAccessError + * @property {Folder.FolderModifyStatus|null} [status] Status code (e.g., NOT_FOUND, ACCESS_DENIED) + * @property {string|null} [message] Human-readable error message + */ + + /** + * Constructs a new FolderAccessError. + * @memberof folder.v3 + * @classdesc Error information for a folder that couldn't be processed. + * @implements IFolderAccessError + * @constructor + * @param {folder.v3.IFolderAccessError=} [properties] Properties to set + */ + function FolderAccessError(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code (e.g., NOT_FOUND, ACCESS_DENIED) + * @member {Folder.FolderModifyStatus} status + * @memberof folder.v3.FolderAccessError + * @instance + */ + FolderAccessError.prototype.status = 0; + + /** + * Human-readable error message + * @member {string} message + * @memberof folder.v3.FolderAccessError + * @instance + */ + FolderAccessError.prototype.message = ""; + + /** + * Creates a new FolderAccessError instance using the specified properties. + * @function create + * @memberof folder.v3.FolderAccessError + * @static + * @param {folder.v3.IFolderAccessError=} [properties] Properties to set + * @returns {folder.v3.FolderAccessError} FolderAccessError instance + */ + FolderAccessError.create = function create(properties) { + return new FolderAccessError(properties); + }; + + /** + * Encodes the specified FolderAccessError message. Does not implicitly {@link folder.v3.FolderAccessError.verify|verify} messages. + * @function encode + * @memberof folder.v3.FolderAccessError + * @static + * @param {folder.v3.IFolderAccessError} message FolderAccessError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FolderAccessError.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Decodes a FolderAccessError message from the specified reader or buffer. + * @function decode + * @memberof folder.v3.FolderAccessError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {folder.v3.FolderAccessError} FolderAccessError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FolderAccessError.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.folder.v3.FolderAccessError(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.status = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a FolderAccessError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof folder.v3.FolderAccessError + * @static + * @param {Object.} object Plain object + * @returns {folder.v3.FolderAccessError} FolderAccessError + */ + FolderAccessError.fromObject = function fromObject(object, long) { + if (object instanceof $root.folder.v3.FolderAccessError) + return object; + if (!$util.isObject(object)) + throw TypeError(".folder.v3.FolderAccessError: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.folder.v3.FolderAccessError(); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "SUCCESS": + case 0: + message.status = 0; + break; + case "BAD_REQUEST": + case 1: + message.status = 1; + break; + case "ACCESS_DENIED": + case 2: + message.status = 2; + break; + case "NOT_FOUND": + case 3: + message.status = 3; + break; + } + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a FolderAccessError message. Also converts values to other types if specified. + * @function toObject + * @memberof folder.v3.FolderAccessError + * @static + * @param {folder.v3.FolderAccessError} message FolderAccessError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FolderAccessError.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) { + object.status = options.enums === String ? "SUCCESS" : 0; + object.message = ""; + } + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + object.status = options.enums === String ? $root.Folder.FolderModifyStatus[message.status] === undefined ? message.status : $root.Folder.FolderModifyStatus[message.status] : message.status; + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + object.message = message.message; + return object; + }; + + /** + * Converts this FolderAccessError to JSON. + * @function toJSON + * @memberof folder.v3.FolderAccessError + * @instance + * @returns {Object.} JSON object + */ + FolderAccessError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FolderAccessError + * @function getTypeUrl + * @memberof folder.v3.FolderAccessError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FolderAccessError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/folder.v3.FolderAccessError"; + }; + + return FolderAccessError; + })(); + return v3; })(); diff --git a/keeperapi/src/proto/Router.js b/keeperapi/src/proto/Router.js index 58dd9eaa..cc89f289 100644 --- a/keeperapi/src/proto/Router.js +++ b/keeperapi/src/proto/Router.js @@ -2358,6 +2358,7 @@ export const Router = $root.Router = (() => { * @property {string|null} [scriptName] RouterRotationInfo scriptName * @property {string|null} [pwdComplexity] RouterRotationInfo pwdComplexity * @property {boolean|null} [disabled] RouterRotationInfo disabled + * @property {Array.|null} [scripts] RouterRotationInfo scripts */ /** @@ -2369,6 +2370,7 @@ export const Router = $root.Router = (() => { * @param {Router.IRouterRotationInfo=} [properties] Properties to set */ function RouterRotationInfo(properties) { + this.scripts = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null && keys[i] !== "__proto__") @@ -2447,6 +2449,14 @@ export const Router = $root.Router = (() => { */ RouterRotationInfo.prototype.disabled = false; + /** + * RouterRotationInfo scripts. + * @member {Array.} scripts + * @memberof Router.RouterRotationInfo + * @instance + */ + RouterRotationInfo.prototype.scripts = $util.emptyArray; + /** * Creates a new RouterRotationInfo instance using the specified properties. * @function create @@ -2493,6 +2503,9 @@ export const Router = $root.Router = (() => { writer.uint32(/* id 8, wireType 2 =*/66).string(message.pwdComplexity); if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.disabled); + if (message.scripts != null && message.scripts.length) + for (let i = 0; i < message.scripts.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.scripts[i]); return writer; }; @@ -2556,6 +2569,12 @@ export const Router = $root.Router = (() => { message.disabled = reader.bool(); break; } + case 10: { + if (!(message.scripts && message.scripts.length)) + message.scripts = []; + message.scripts.push(reader.bytes()); + break; + } default: reader.skipType(tag & 7, long); break; @@ -2638,6 +2657,16 @@ export const Router = $root.Router = (() => { message.pwdComplexity = String(object.pwdComplexity); if (object.disabled != null) message.disabled = Boolean(object.disabled); + if (object.scripts) { + if (!Array.isArray(object.scripts)) + throw TypeError(".Router.RouterRotationInfo.scripts: array expected"); + message.scripts = []; + for (let i = 0; i < object.scripts.length; ++i) + if (typeof object.scripts[i] === "string") + $util.base64.decode(object.scripts[i], message.scripts[i] = $util.newBuffer($util.base64.length(object.scripts[i])), 0); + else if (object.scripts[i].length >= 0) + message.scripts[i] = object.scripts[i]; + } return message; }; @@ -2658,6 +2687,8 @@ export const Router = $root.Router = (() => { if (q > $util.recursionLimit) throw Error("max depth exceeded"); let object = {}; + if (options.arrays || options.defaults) + object.scripts = []; if (options.defaults) { object.status = options.enums === String ? "RRS_ONLINE" : 0; if (options.bytes === String) @@ -2714,6 +2745,11 @@ export const Router = $root.Router = (() => { object.pwdComplexity = message.pwdComplexity; if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) object.disabled = message.disabled; + if (message.scripts && message.scripts.length) { + object.scripts = []; + for (let j = 0; j < message.scripts.length; ++j) + object.scripts[j] = options.bytes === String ? $util.base64.encode(message.scripts[j], 0, message.scripts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.scripts[j]) : message.scripts[j]; + } return object; }; diff --git a/keeperapi/src/proto/Workflow.js b/keeperapi/src/proto/Workflow.js index 5cb05206..b2e5b099 100644 --- a/keeperapi/src/proto/Workflow.js +++ b/keeperapi/src/proto/Workflow.js @@ -4594,4 +4594,3 @@ export const Workflow = $root.Workflow = (() => { return Workflow; })(); - diff --git a/keeperapi/src/proto/index.js b/keeperapi/src/proto/index.js index f1788c17..25b1a451 100644 --- a/keeperapi/src/proto/index.js +++ b/keeperapi/src/proto/index.js @@ -24,3 +24,4 @@ export { Router } from './Router.js'; export { PAM } from './PAM.js'; export { folder } from './Remove.js'; export { Workflow } from './Workflow.js'; +export { keeper } from './keeper.js'; diff --git a/keeperapi/src/proto/keeper.js b/keeperapi/src/proto/keeper.js new file mode 100644 index 00000000..68b56721 --- /dev/null +++ b/keeperapi/src/proto/keeper.js @@ -0,0 +1,521 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import { $protobuf, $Reader, $Writer, $util, $root } from './root.js'; + +export const keeper = $root.keeper = (() => { + + /** + * Namespace keeper. + * @exports keeper + * @namespace + */ + const keeper = {}; + + keeper.api = (function() { + + /** + * Namespace api. + * @memberof keeper + * @namespace + */ + const api = {}; + + api.common = (function() { + + /** + * Namespace common. + * @memberof keeper.api + * @namespace + */ + const common = {}; + + common.Page = (function() { + + /** + * Properties of a Page. + * @memberof keeper.api.common + * @interface IPage + * @property {number|null} [pageNumber] Zero-indexed page number. + * Default: 0 (first page) + * @property {number|null} [pageSize] Number of items per page. + * @property {string|null} [cursorToken] Use as cursor to the next page. + */ + + /** + * Constructs a new Page. + * @memberof keeper.api.common + * @classdesc Pagination parameters for paginated requests. + * Used to specify which page of results to retrieve. + * @implements IPage + * @constructor + * @param {keeper.api.common.IPage=} [properties] Properties to set + */ + function Page(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Zero-indexed page number. + * Default: 0 (first page) + * @member {number} pageNumber + * @memberof keeper.api.common.Page + * @instance + */ + Page.prototype.pageNumber = 0; + + /** + * Number of items per page. + * @member {number} pageSize + * @memberof keeper.api.common.Page + * @instance + */ + Page.prototype.pageSize = 0; + + /** + * Use as cursor to the next page. + * @member {string} cursorToken + * @memberof keeper.api.common.Page + * @instance + */ + Page.prototype.cursorToken = ""; + + /** + * Creates a new Page instance using the specified properties. + * @function create + * @memberof keeper.api.common.Page + * @static + * @param {keeper.api.common.IPage=} [properties] Properties to set + * @returns {keeper.api.common.Page} Page instance + */ + Page.create = function create(properties) { + return new Page(properties); + }; + + /** + * Encodes the specified Page message. Does not implicitly {@link keeper.api.common.Page.verify|verify} messages. + * @function encode + * @memberof keeper.api.common.Page + * @static + * @param {keeper.api.common.IPage} message Page message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Page.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageNumber); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.cursorToken != null && Object.hasOwnProperty.call(message, "cursorToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cursorToken); + return writer; + }; + + /** + * Decodes a Page message from the specified reader or buffer. + * @function decode + * @memberof keeper.api.common.Page + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {keeper.api.common.Page} Page + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Page.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.keeper.api.common.Page(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pageNumber = reader.int32(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.cursorToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a Page message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof keeper.api.common.Page + * @static + * @param {Object.} object Plain object + * @returns {keeper.api.common.Page} Page + */ + Page.fromObject = function fromObject(object, long) { + if (object instanceof $root.keeper.api.common.Page) + return object; + if (!$util.isObject(object)) + throw TypeError(".keeper.api.common.Page: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.keeper.api.common.Page(); + if (object.pageNumber != null) + message.pageNumber = object.pageNumber | 0; + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.cursorToken != null) + message.cursorToken = String(object.cursorToken); + return message; + }; + + /** + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @function toObject + * @memberof keeper.api.common.Page + * @static + * @param {keeper.api.common.Page} message Page + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Page.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) { + object.pageNumber = 0; + object.pageSize = 0; + object.cursorToken = ""; + } + if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber")) + object.pageNumber = message.pageNumber; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.cursorToken != null && Object.hasOwnProperty.call(message, "cursorToken")) + object.cursorToken = message.cursorToken; + return object; + }; + + /** + * Converts this Page to JSON. + * @function toJSON + * @memberof keeper.api.common.Page + * @instance + * @returns {Object.} JSON object + */ + Page.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Page + * @function getTypeUrl + * @memberof keeper.api.common.Page + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/keeper.api.common.Page"; + }; + + return Page; + })(); + + common.PageInfo = (function() { + + /** + * Properties of a PageInfo. + * @memberof keeper.api.common + * @interface IPageInfo + * @property {number|null} [pageNumber] Current page number (zero-indexed). + * @property {number|null} [pageSize] Number of items per page. + * @property {number|null} [totalCount] Total number of items available across all pages. + * @property {boolean|null} [hasMore] Indicates whether more pages are available. + * True if (page_number + 1) * page_size < total_count + * @property {string|null} [cursorToken] Use as cursor to the next page. + */ + + /** + * Constructs a new PageInfo. + * @memberof keeper.api.common + * @classdesc Pagination metadata included in paginated responses. + * Provides information about the current page and total available items. + * @implements IPageInfo + * @constructor + * @param {keeper.api.common.IPageInfo=} [properties] Properties to set + */ + function PageInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Current page number (zero-indexed). + * @member {number} pageNumber + * @memberof keeper.api.common.PageInfo + * @instance + */ + PageInfo.prototype.pageNumber = 0; + + /** + * Number of items per page. + * @member {number} pageSize + * @memberof keeper.api.common.PageInfo + * @instance + */ + PageInfo.prototype.pageSize = 0; + + /** + * Total number of items available across all pages. + * @member {number} totalCount + * @memberof keeper.api.common.PageInfo + * @instance + */ + PageInfo.prototype.totalCount = 0; + + /** + * Indicates whether more pages are available. + * True if (page_number + 1) * page_size < total_count + * @member {boolean} hasMore + * @memberof keeper.api.common.PageInfo + * @instance + */ + PageInfo.prototype.hasMore = false; + + /** + * Use as cursor to the next page. + * @member {string} cursorToken + * @memberof keeper.api.common.PageInfo + * @instance + */ + PageInfo.prototype.cursorToken = ""; + + /** + * Creates a new PageInfo instance using the specified properties. + * @function create + * @memberof keeper.api.common.PageInfo + * @static + * @param {keeper.api.common.IPageInfo=} [properties] Properties to set + * @returns {keeper.api.common.PageInfo} PageInfo instance + */ + PageInfo.create = function create(properties) { + return new PageInfo(properties); + }; + + /** + * Encodes the specified PageInfo message. Does not implicitly {@link keeper.api.common.PageInfo.verify|verify} messages. + * @function encode + * @memberof keeper.api.common.PageInfo + * @static + * @param {keeper.api.common.IPageInfo} message PageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageNumber); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalCount); + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.hasMore); + if (message.cursorToken != null && Object.hasOwnProperty.call(message, "cursorToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.cursorToken); + return writer; + }; + + /** + * Decodes a PageInfo message from the specified reader or buffer. + * @function decode + * @memberof keeper.api.common.PageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {keeper.api.common.PageInfo} PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.keeper.api.common.PageInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pageNumber = reader.int32(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.totalCount = reader.int32(); + break; + } + case 4: { + message.hasMore = reader.bool(); + break; + } + case 5: { + message.cursorToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof keeper.api.common.PageInfo + * @static + * @param {Object.} object Plain object + * @returns {keeper.api.common.PageInfo} PageInfo + */ + PageInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.keeper.api.common.PageInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".keeper.api.common.PageInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.keeper.api.common.PageInfo(); + if (object.pageNumber != null) + message.pageNumber = object.pageNumber | 0; + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.totalCount != null) + message.totalCount = object.totalCount | 0; + if (object.hasMore != null) + message.hasMore = Boolean(object.hasMore); + if (object.cursorToken != null) + message.cursorToken = String(object.cursorToken); + return message; + }; + + /** + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof keeper.api.common.PageInfo + * @static + * @param {keeper.api.common.PageInfo} message PageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) { + object.pageNumber = 0; + object.pageSize = 0; + object.totalCount = 0; + object.hasMore = false; + object.cursorToken = ""; + } + if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber")) + object.pageNumber = message.pageNumber; + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + object.pageSize = message.pageSize; + if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) + object.totalCount = message.totalCount; + if (message.hasMore != null && Object.hasOwnProperty.call(message, "hasMore")) + object.hasMore = message.hasMore; + if (message.cursorToken != null && Object.hasOwnProperty.call(message, "cursorToken")) + object.cursorToken = message.cursorToken; + return object; + }; + + /** + * Converts this PageInfo to JSON. + * @function toJSON + * @memberof keeper.api.common.PageInfo + * @instance + * @returns {Object.} JSON object + */ + PageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PageInfo + * @function getTypeUrl + * @memberof keeper.api.common.PageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/keeper.api.common.PageInfo"; + }; + + return PageInfo; + })(); + + return common; + })(); + + return api; + })(); + + return keeper; +})(); + diff --git a/keeperapi/src/proto/record.js b/keeperapi/src/proto/record.js index ce1db49e..0fc3a988 100644 --- a/keeperapi/src/proto/record.js +++ b/keeperapi/src/proto/record.js @@ -2542,6 +2542,1954 @@ export const record = $root.record = (() => { return RecordAdd; })(); + v3.details = (function() { + + /** + * Namespace details. + * @memberof record.v3 + * @namespace + */ + const details = {}; + + details.RecordDetailsService = (function() { + + /** + * Constructs a new RecordDetailsService service. + * @memberof record.v3.details + * @classdesc Represents a RecordDetailsService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function RecordDetailsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (RecordDetailsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RecordDetailsService; + + /** + * Creates new RecordDetailsService service using the specified rpc implementation. + * @function create + * @memberof record.v3.details.RecordDetailsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {RecordDetailsService} RPC service. Useful where requests and/or responses are streamed. + */ + RecordDetailsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link record.v3.details.RecordDetailsService#getRecordData}. + * @memberof record.v3.details.RecordDetailsService + * @typedef GetRecordDataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {record.v3.details.RecordDataResponse} [response] RecordDataResponse + */ + + /** + * Calls GetRecordData. + * @function getRecordData + * @memberof record.v3.details.RecordDetailsService + * @instance + * @param {record.v3.details.IRecordDataRequest} request RecordDataRequest message or plain object + * @param {record.v3.details.RecordDetailsService.GetRecordDataCallback} callback Node-style callback called with the error, if any, and RecordDataResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RecordDetailsService.prototype.getRecordData = function getRecordData(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getRecordData, $root.record.v3.details.RecordDataRequest, $root.record.v3.details.RecordDataResponse, request, callback); + }, "name", { value: "GetRecordData" }); + + /** + * Calls GetRecordData. + * @function getRecordData + * @memberof record.v3.details.RecordDetailsService + * @instance + * @param {record.v3.details.IRecordDataRequest} request RecordDataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link record.v3.details.RecordDetailsService#getRecordAccessors}. + * @memberof record.v3.details.RecordDetailsService + * @typedef GetRecordAccessorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {record.v3.details.RecordAccessResponse} [response] RecordAccessResponse + */ + + /** + * Calls GetRecordAccessors. + * @function getRecordAccessors + * @memberof record.v3.details.RecordDetailsService + * @instance + * @param {record.v3.details.IRecordAccessRequest} request RecordAccessRequest message or plain object + * @param {record.v3.details.RecordDetailsService.GetRecordAccessorsCallback} callback Node-style callback called with the error, if any, and RecordAccessResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RecordDetailsService.prototype.getRecordAccessors = function getRecordAccessors(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getRecordAccessors, $root.record.v3.details.RecordAccessRequest, $root.record.v3.details.RecordAccessResponse, request, callback); + }, "name", { value: "GetRecordAccessors" }); + + /** + * Calls GetRecordAccessors. + * @function getRecordAccessors + * @memberof record.v3.details.RecordDetailsService + * @instance + * @param {record.v3.details.IRecordAccessRequest} request RecordAccessRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link record.v3.details.RecordDetailsService#getRecordAccessorDetails}. + * @memberof record.v3.details.RecordDetailsService + * @typedef GetRecordAccessorDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {record.v3.details.RecordAccessorDetailsResponse} [response] RecordAccessorDetailsResponse + */ + + /** + * Calls GetRecordAccessorDetails. + * @function getRecordAccessorDetails + * @memberof record.v3.details.RecordDetailsService + * @instance + * @param {record.v3.details.IRecordAccessorDetailsRequest} request RecordAccessorDetailsRequest message or plain object + * @param {record.v3.details.RecordDetailsService.GetRecordAccessorDetailsCallback} callback Node-style callback called with the error, if any, and RecordAccessorDetailsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RecordDetailsService.prototype.getRecordAccessorDetails = function getRecordAccessorDetails(request, callback) { + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getRecordAccessorDetails, $root.record.v3.details.RecordAccessorDetailsRequest, $root.record.v3.details.RecordAccessorDetailsResponse, request, callback); + }, "name", { value: "GetRecordAccessorDetails" }); + + /** + * Calls GetRecordAccessorDetails. + * @function getRecordAccessorDetails + * @memberof record.v3.details.RecordDetailsService + * @instance + * @param {record.v3.details.IRecordAccessorDetailsRequest} request RecordAccessorDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return RecordDetailsService; + })(); + + details.RecordDataRequest = (function() { + + /** + * Properties of a RecordDataRequest. + * @memberof record.v3.details + * @interface IRecordDataRequest + * @property {number|null} [clientTime] represents the client time in milliseconds. Client time is used to + * adjust the record client_modified_time for each record. + * @property {Array.|null} [recordUids] the list of record UIDs to retrieve information for. + */ + + /** + * Constructs a new RecordDataRequest. + * @memberof record.v3.details + * @classdesc Represents a record data request. Record details include the record [meta]data (title, color, etc.) + * @implements IRecordDataRequest + * @constructor + * @param {record.v3.details.IRecordDataRequest=} [properties] Properties to set + */ + function RecordDataRequest(properties) { + this.recordUids = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * represents the client time in milliseconds. Client time is used to + * adjust the record client_modified_time for each record. + * @member {number} clientTime + * @memberof record.v3.details.RecordDataRequest + * @instance + */ + RecordDataRequest.prototype.clientTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * the list of record UIDs to retrieve information for. + * @member {Array.} recordUids + * @memberof record.v3.details.RecordDataRequest + * @instance + */ + RecordDataRequest.prototype.recordUids = $util.emptyArray; + + /** + * Creates a new RecordDataRequest instance using the specified properties. + * @function create + * @memberof record.v3.details.RecordDataRequest + * @static + * @param {record.v3.details.IRecordDataRequest=} [properties] Properties to set + * @returns {record.v3.details.RecordDataRequest} RecordDataRequest instance + */ + RecordDataRequest.create = function create(properties) { + return new RecordDataRequest(properties); + }; + + /** + * Encodes the specified RecordDataRequest message. Does not implicitly {@link record.v3.details.RecordDataRequest.verify|verify} messages. + * @function encode + * @memberof record.v3.details.RecordDataRequest + * @static + * @param {record.v3.details.IRecordDataRequest} message RecordDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordDataRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.clientTime); + if (message.recordUids != null && message.recordUids.length) + for (let i = 0; i < message.recordUids.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.recordUids[i]); + return writer; + }; + + /** + * Decodes a RecordDataRequest message from the specified reader or buffer. + * @function decode + * @memberof record.v3.details.RecordDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {record.v3.details.RecordDataRequest} RecordDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordDataRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.record.v3.details.RecordDataRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.clientTime = reader.int64(); + break; + } + case 3: { + if (!(message.recordUids && message.recordUids.length)) + message.recordUids = []; + message.recordUids.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a RecordDataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof record.v3.details.RecordDataRequest + * @static + * @param {Object.} object Plain object + * @returns {record.v3.details.RecordDataRequest} RecordDataRequest + */ + RecordDataRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.record.v3.details.RecordDataRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.details.RecordDataRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.record.v3.details.RecordDataRequest(); + if (object.clientTime != null) + if ($util.Long) + message.clientTime = $util.Long.fromValue(object.clientTime, false); + else if (typeof object.clientTime === "string") + message.clientTime = parseInt(object.clientTime, 10); + else if (typeof object.clientTime === "number") + message.clientTime = object.clientTime; + else if (typeof object.clientTime === "object") + message.clientTime = new $util.LongBits(object.clientTime.low >>> 0, object.clientTime.high >>> 0).toNumber(); + if (object.recordUids) { + if (!Array.isArray(object.recordUids)) + throw TypeError(".record.v3.details.RecordDataRequest.recordUids: array expected"); + message.recordUids = []; + for (let i = 0; i < object.recordUids.length; ++i) + if (typeof object.recordUids[i] === "string") + $util.base64.decode(object.recordUids[i], message.recordUids[i] = $util.newBuffer($util.base64.length(object.recordUids[i])), 0); + else if (object.recordUids[i].length >= 0) + message.recordUids[i] = object.recordUids[i]; + } + return message; + }; + + /** + * Creates a plain object from a RecordDataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof record.v3.details.RecordDataRequest + * @static + * @param {record.v3.details.RecordDataRequest} message RecordDataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordDataRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) + object.recordUids = []; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.clientTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + } else + object.clientTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.clientTime != null && Object.hasOwnProperty.call(message, "clientTime")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.clientTime = typeof message.clientTime === "number" ? BigInt(message.clientTime) : $util.Long.fromBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0, false).toBigInt(); + else if (typeof message.clientTime === "number") + object.clientTime = options.longs === String ? String(message.clientTime) : message.clientTime; + else + object.clientTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientTime) : options.longs === Number ? new $util.LongBits(message.clientTime.low >>> 0, message.clientTime.high >>> 0).toNumber() : message.clientTime; + if (message.recordUids && message.recordUids.length) { + object.recordUids = []; + for (let j = 0; j < message.recordUids.length; ++j) + object.recordUids[j] = options.bytes === String ? $util.base64.encode(message.recordUids[j], 0, message.recordUids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUids[j]) : message.recordUids[j]; + } + return object; + }; + + /** + * Converts this RecordDataRequest to JSON. + * @function toJSON + * @memberof record.v3.details.RecordDataRequest + * @instance + * @returns {Object.} JSON object + */ + RecordDataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordDataRequest + * @function getTypeUrl + * @memberof record.v3.details.RecordDataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordDataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/record.v3.details.RecordDataRequest"; + }; + + return RecordDataRequest; + })(); + + details.RecordDataResponse = (function() { + + /** + * Properties of a RecordDataResponse. + * @memberof record.v3.details + * @interface IRecordDataResponse + * @property {Array.|null} [data] The data associated with the record. + * @property {Array.|null} [forbiddenRecords] A list of record UIDs from the request that the calling user does not have access to. + * Each UID in this list corresponds to a record the user has no permission to access. + */ + + /** + * Constructs a new RecordDataResponse. + * @memberof record.v3.details + * @classdesc Response message containing records' data and a list of inaccessible records for the calling user. + * @implements IRecordDataResponse + * @constructor + * @param {record.v3.details.IRecordDataResponse=} [properties] Properties to set + */ + function RecordDataResponse(properties) { + this.data = []; + this.forbiddenRecords = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * The data associated with the record. + * @member {Array.} data + * @memberof record.v3.details.RecordDataResponse + * @instance + */ + RecordDataResponse.prototype.data = $util.emptyArray; + + /** + * A list of record UIDs from the request that the calling user does not have access to. + * Each UID in this list corresponds to a record the user has no permission to access. + * @member {Array.} forbiddenRecords + * @memberof record.v3.details.RecordDataResponse + * @instance + */ + RecordDataResponse.prototype.forbiddenRecords = $util.emptyArray; + + /** + * Creates a new RecordDataResponse instance using the specified properties. + * @function create + * @memberof record.v3.details.RecordDataResponse + * @static + * @param {record.v3.details.IRecordDataResponse=} [properties] Properties to set + * @returns {record.v3.details.RecordDataResponse} RecordDataResponse instance + */ + RecordDataResponse.create = function create(properties) { + return new RecordDataResponse(properties); + }; + + /** + * Encodes the specified RecordDataResponse message. Does not implicitly {@link record.v3.details.RecordDataResponse.verify|verify} messages. + * @function encode + * @memberof record.v3.details.RecordDataResponse + * @static + * @param {record.v3.details.IRecordDataResponse} message RecordDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordDataResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.Records.RecordData.encode(message.data[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.forbiddenRecords != null && message.forbiddenRecords.length) + for (let i = 0; i < message.forbiddenRecords.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.forbiddenRecords[i]); + return writer; + }; + + /** + * Decodes a RecordDataResponse message from the specified reader or buffer. + * @function decode + * @memberof record.v3.details.RecordDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {record.v3.details.RecordDataResponse} RecordDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordDataResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.record.v3.details.RecordDataResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.Records.RecordData.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.forbiddenRecords && message.forbiddenRecords.length)) + message.forbiddenRecords = []; + message.forbiddenRecords.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a RecordDataResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof record.v3.details.RecordDataResponse + * @static + * @param {Object.} object Plain object + * @returns {record.v3.details.RecordDataResponse} RecordDataResponse + */ + RecordDataResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.record.v3.details.RecordDataResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.details.RecordDataResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.record.v3.details.RecordDataResponse(); + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".record.v3.details.RecordDataResponse.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (!$util.isObject(object.data[i])) + throw TypeError(".record.v3.details.RecordDataResponse.data: object expected"); + message.data[i] = $root.Records.RecordData.fromObject(object.data[i], long + 1); + } + } + if (object.forbiddenRecords) { + if (!Array.isArray(object.forbiddenRecords)) + throw TypeError(".record.v3.details.RecordDataResponse.forbiddenRecords: array expected"); + message.forbiddenRecords = []; + for (let i = 0; i < object.forbiddenRecords.length; ++i) + if (typeof object.forbiddenRecords[i] === "string") + $util.base64.decode(object.forbiddenRecords[i], message.forbiddenRecords[i] = $util.newBuffer($util.base64.length(object.forbiddenRecords[i])), 0); + else if (object.forbiddenRecords[i].length >= 0) + message.forbiddenRecords[i] = object.forbiddenRecords[i]; + } + return message; + }; + + /** + * Creates a plain object from a RecordDataResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof record.v3.details.RecordDataResponse + * @static + * @param {record.v3.details.RecordDataResponse} message RecordDataResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordDataResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) { + object.data = []; + object.forbiddenRecords = []; + } + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.Records.RecordData.toObject(message.data[j], options, q + 1); + } + if (message.forbiddenRecords && message.forbiddenRecords.length) { + object.forbiddenRecords = []; + for (let j = 0; j < message.forbiddenRecords.length; ++j) + object.forbiddenRecords[j] = options.bytes === String ? $util.base64.encode(message.forbiddenRecords[j], 0, message.forbiddenRecords[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.forbiddenRecords[j]) : message.forbiddenRecords[j]; + } + return object; + }; + + /** + * Converts this RecordDataResponse to JSON. + * @function toJSON + * @memberof record.v3.details.RecordDataResponse + * @instance + * @returns {Object.} JSON object + */ + RecordDataResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordDataResponse + * @function getTypeUrl + * @memberof record.v3.details.RecordDataResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordDataResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/record.v3.details.RecordDataResponse"; + }; + + return RecordDataResponse; + })(); + + details.RecordAccessRequest = (function() { + + /** + * Properties of a RecordAccessRequest. + * @memberof record.v3.details + * @interface IRecordAccessRequest + * @property {Array.|null} [recordUids] the list of record UIDs to retrieve information for. + * @property {keeper.api.common.IPage|null} [page] Pagination parameters. + * If not provided, uses defaults (page 0, size 100). + */ + + /** + * Constructs a new RecordAccessRequest. + * @memberof record.v3.details + * @classdesc Represents a record accessors request. Record details include whom the record has been + * shared with (user or team), and what role and permissions the accessors have over the record. + * @implements IRecordAccessRequest + * @constructor + * @param {record.v3.details.IRecordAccessRequest=} [properties] Properties to set + */ + function RecordAccessRequest(properties) { + this.recordUids = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * the list of record UIDs to retrieve information for. + * @member {Array.} recordUids + * @memberof record.v3.details.RecordAccessRequest + * @instance + */ + RecordAccessRequest.prototype.recordUids = $util.emptyArray; + + /** + * Pagination parameters. + * If not provided, uses defaults (page 0, size 100). + * @member {keeper.api.common.IPage|null|undefined} page + * @memberof record.v3.details.RecordAccessRequest + * @instance + */ + RecordAccessRequest.prototype.page = null; + + /** + * Creates a new RecordAccessRequest instance using the specified properties. + * @function create + * @memberof record.v3.details.RecordAccessRequest + * @static + * @param {record.v3.details.IRecordAccessRequest=} [properties] Properties to set + * @returns {record.v3.details.RecordAccessRequest} RecordAccessRequest instance + */ + RecordAccessRequest.create = function create(properties) { + return new RecordAccessRequest(properties); + }; + + /** + * Encodes the specified RecordAccessRequest message. Does not implicitly {@link record.v3.details.RecordAccessRequest.verify|verify} messages. + * @function encode + * @memberof record.v3.details.RecordAccessRequest + * @static + * @param {record.v3.details.IRecordAccessRequest} message RecordAccessRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordAccessRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.keeper.api.common.Page.encode(message.page, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.recordUids != null && message.recordUids.length) + for (let i = 0; i < message.recordUids.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.recordUids[i]); + return writer; + }; + + /** + * Decodes a RecordAccessRequest message from the specified reader or buffer. + * @function decode + * @memberof record.v3.details.RecordAccessRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {record.v3.details.RecordAccessRequest} RecordAccessRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordAccessRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.record.v3.details.RecordAccessRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + if (!(message.recordUids && message.recordUids.length)) + message.recordUids = []; + message.recordUids.push(reader.bytes()); + break; + } + case 2: { + message.page = $root.keeper.api.common.Page.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a RecordAccessRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof record.v3.details.RecordAccessRequest + * @static + * @param {Object.} object Plain object + * @returns {record.v3.details.RecordAccessRequest} RecordAccessRequest + */ + RecordAccessRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.record.v3.details.RecordAccessRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.details.RecordAccessRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.record.v3.details.RecordAccessRequest(); + if (object.recordUids) { + if (!Array.isArray(object.recordUids)) + throw TypeError(".record.v3.details.RecordAccessRequest.recordUids: array expected"); + message.recordUids = []; + for (let i = 0; i < object.recordUids.length; ++i) + if (typeof object.recordUids[i] === "string") + $util.base64.decode(object.recordUids[i], message.recordUids[i] = $util.newBuffer($util.base64.length(object.recordUids[i])), 0); + else if (object.recordUids[i].length >= 0) + message.recordUids[i] = object.recordUids[i]; + } + if (object.page != null) { + if (!$util.isObject(object.page)) + throw TypeError(".record.v3.details.RecordAccessRequest.page: object expected"); + message.page = $root.keeper.api.common.Page.fromObject(object.page, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordAccessRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof record.v3.details.RecordAccessRequest + * @static + * @param {record.v3.details.RecordAccessRequest} message RecordAccessRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordAccessRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) + object.recordUids = []; + if (options.defaults) + object.page = null; + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + object.page = $root.keeper.api.common.Page.toObject(message.page, options, q + 1); + if (message.recordUids && message.recordUids.length) { + object.recordUids = []; + for (let j = 0; j < message.recordUids.length; ++j) + object.recordUids[j] = options.bytes === String ? $util.base64.encode(message.recordUids[j], 0, message.recordUids[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUids[j]) : message.recordUids[j]; + } + return object; + }; + + /** + * Converts this RecordAccessRequest to JSON. + * @function toJSON + * @memberof record.v3.details.RecordAccessRequest + * @instance + * @returns {Object.} JSON object + */ + RecordAccessRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordAccessRequest + * @function getTypeUrl + * @memberof record.v3.details.RecordAccessRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordAccessRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/record.v3.details.RecordAccessRequest"; + }; + + return RecordAccessRequest; + })(); + + details.RecordAccessResponse = (function() { + + /** + * Properties of a RecordAccessResponse. + * @memberof record.v3.details + * @interface IRecordAccessResponse + * @property {Array.|null} [recordAccesses] List of record access permissions, detailing the accessors and their roles. + * @property {Array.|null} [forbiddenRecords] A list of record UIDs from the request that the calling user does not have access to. + * Each UID in this list corresponds to a record the user has no permission to access. + * @property {keeper.api.common.IPageInfo|null} [pageInfo] Pagination metadata for this response. + * Contains current page info, total count, and whether more pages exist. + */ + + /** + * Constructs a new RecordAccessResponse. + * @memberof record.v3.details + * @classdesc Response message containing records' accesses and a list of inaccessible records for the calling user. + * @implements IRecordAccessResponse + * @constructor + * @param {record.v3.details.IRecordAccessResponse=} [properties] Properties to set + */ + function RecordAccessResponse(properties) { + this.recordAccesses = []; + this.forbiddenRecords = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * List of record access permissions, detailing the accessors and their roles. + * @member {Array.} recordAccesses + * @memberof record.v3.details.RecordAccessResponse + * @instance + */ + RecordAccessResponse.prototype.recordAccesses = $util.emptyArray; + + /** + * A list of record UIDs from the request that the calling user does not have access to. + * Each UID in this list corresponds to a record the user has no permission to access. + * @member {Array.} forbiddenRecords + * @memberof record.v3.details.RecordAccessResponse + * @instance + */ + RecordAccessResponse.prototype.forbiddenRecords = $util.emptyArray; + + /** + * Pagination metadata for this response. + * Contains current page info, total count, and whether more pages exist. + * @member {keeper.api.common.IPageInfo|null|undefined} pageInfo + * @memberof record.v3.details.RecordAccessResponse + * @instance + */ + RecordAccessResponse.prototype.pageInfo = null; + + /** + * Creates a new RecordAccessResponse instance using the specified properties. + * @function create + * @memberof record.v3.details.RecordAccessResponse + * @static + * @param {record.v3.details.IRecordAccessResponse=} [properties] Properties to set + * @returns {record.v3.details.RecordAccessResponse} RecordAccessResponse instance + */ + RecordAccessResponse.create = function create(properties) { + return new RecordAccessResponse(properties); + }; + + /** + * Encodes the specified RecordAccessResponse message. Does not implicitly {@link record.v3.details.RecordAccessResponse.verify|verify} messages. + * @function encode + * @memberof record.v3.details.RecordAccessResponse + * @static + * @param {record.v3.details.IRecordAccessResponse} message RecordAccessResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordAccessResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.recordAccesses != null && message.recordAccesses.length) + for (let i = 0; i < message.recordAccesses.length; ++i) + $root.record.v3.details.RecordAccess.encode(message.recordAccesses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.forbiddenRecords != null && message.forbiddenRecords.length) + for (let i = 0; i < message.forbiddenRecords.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.forbiddenRecords[i]); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.keeper.api.common.PageInfo.encode(message.pageInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Decodes a RecordAccessResponse message from the specified reader or buffer. + * @function decode + * @memberof record.v3.details.RecordAccessResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {record.v3.details.RecordAccessResponse} RecordAccessResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordAccessResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.record.v3.details.RecordAccessResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.recordAccesses && message.recordAccesses.length)) + message.recordAccesses = []; + message.recordAccesses.push($root.record.v3.details.RecordAccess.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.forbiddenRecords && message.forbiddenRecords.length)) + message.forbiddenRecords = []; + message.forbiddenRecords.push(reader.bytes()); + break; + } + case 3: { + message.pageInfo = $root.keeper.api.common.PageInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a RecordAccessResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof record.v3.details.RecordAccessResponse + * @static + * @param {Object.} object Plain object + * @returns {record.v3.details.RecordAccessResponse} RecordAccessResponse + */ + RecordAccessResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.record.v3.details.RecordAccessResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.details.RecordAccessResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.record.v3.details.RecordAccessResponse(); + if (object.recordAccesses) { + if (!Array.isArray(object.recordAccesses)) + throw TypeError(".record.v3.details.RecordAccessResponse.recordAccesses: array expected"); + message.recordAccesses = []; + for (let i = 0; i < object.recordAccesses.length; ++i) { + if (!$util.isObject(object.recordAccesses[i])) + throw TypeError(".record.v3.details.RecordAccessResponse.recordAccesses: object expected"); + message.recordAccesses[i] = $root.record.v3.details.RecordAccess.fromObject(object.recordAccesses[i], long + 1); + } + } + if (object.forbiddenRecords) { + if (!Array.isArray(object.forbiddenRecords)) + throw TypeError(".record.v3.details.RecordAccessResponse.forbiddenRecords: array expected"); + message.forbiddenRecords = []; + for (let i = 0; i < object.forbiddenRecords.length; ++i) + if (typeof object.forbiddenRecords[i] === "string") + $util.base64.decode(object.forbiddenRecords[i], message.forbiddenRecords[i] = $util.newBuffer($util.base64.length(object.forbiddenRecords[i])), 0); + else if (object.forbiddenRecords[i].length >= 0) + message.forbiddenRecords[i] = object.forbiddenRecords[i]; + } + if (object.pageInfo != null) { + if (!$util.isObject(object.pageInfo)) + throw TypeError(".record.v3.details.RecordAccessResponse.pageInfo: object expected"); + message.pageInfo = $root.keeper.api.common.PageInfo.fromObject(object.pageInfo, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordAccessResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof record.v3.details.RecordAccessResponse + * @static + * @param {record.v3.details.RecordAccessResponse} message RecordAccessResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordAccessResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) { + object.recordAccesses = []; + object.forbiddenRecords = []; + } + if (options.defaults) + object.pageInfo = null; + if (message.recordAccesses && message.recordAccesses.length) { + object.recordAccesses = []; + for (let j = 0; j < message.recordAccesses.length; ++j) + object.recordAccesses[j] = $root.record.v3.details.RecordAccess.toObject(message.recordAccesses[j], options, q + 1); + } + if (message.forbiddenRecords && message.forbiddenRecords.length) { + object.forbiddenRecords = []; + for (let j = 0; j < message.forbiddenRecords.length; ++j) + object.forbiddenRecords[j] = options.bytes === String ? $util.base64.encode(message.forbiddenRecords[j], 0, message.forbiddenRecords[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.forbiddenRecords[j]) : message.forbiddenRecords[j]; + } + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + object.pageInfo = $root.keeper.api.common.PageInfo.toObject(message.pageInfo, options, q + 1); + return object; + }; + + /** + * Converts this RecordAccessResponse to JSON. + * @function toJSON + * @memberof record.v3.details.RecordAccessResponse + * @instance + * @returns {Object.} JSON object + */ + RecordAccessResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordAccessResponse + * @function getTypeUrl + * @memberof record.v3.details.RecordAccessResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordAccessResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/record.v3.details.RecordAccessResponse"; + }; + + return RecordAccessResponse; + })(); + + details.RecordAccessorDetailsRequest = (function() { + + /** + * Properties of a RecordAccessorDetailsRequest. + * @memberof record.v3.details + * @interface IRecordAccessorDetailsRequest + * @property {Uint8Array|null} [recordUid] The record UID to retrieve information for. + * @property {Uint8Array|null} [accessorUid] The accessor UID (user or team) to retrieve information for. + * @property {keeper.api.common.IPage|null} [page] Pagination parameters. + * If not provided, uses defaults (page 0, size 100). + */ + + /** + * Constructs a new RecordAccessorDetailsRequest. + * @memberof record.v3.details + * @classdesc Represents a record accessor details request. + * @implements IRecordAccessorDetailsRequest + * @constructor + * @param {record.v3.details.IRecordAccessorDetailsRequest=} [properties] Properties to set + */ + function RecordAccessorDetailsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * The record UID to retrieve information for. + * @member {Uint8Array} recordUid + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @instance + */ + RecordAccessorDetailsRequest.prototype.recordUid = $util.newBuffer([]); + + /** + * The accessor UID (user or team) to retrieve information for. + * @member {Uint8Array} accessorUid + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @instance + */ + RecordAccessorDetailsRequest.prototype.accessorUid = $util.newBuffer([]); + + /** + * Pagination parameters. + * If not provided, uses defaults (page 0, size 100). + * @member {keeper.api.common.IPage|null|undefined} page + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @instance + */ + RecordAccessorDetailsRequest.prototype.page = null; + + /** + * Creates a new RecordAccessorDetailsRequest instance using the specified properties. + * @function create + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @static + * @param {record.v3.details.IRecordAccessorDetailsRequest=} [properties] Properties to set + * @returns {record.v3.details.RecordAccessorDetailsRequest} RecordAccessorDetailsRequest instance + */ + RecordAccessorDetailsRequest.create = function create(properties) { + return new RecordAccessorDetailsRequest(properties); + }; + + /** + * Encodes the specified RecordAccessorDetailsRequest message. Does not implicitly {@link record.v3.details.RecordAccessorDetailsRequest.verify|verify} messages. + * @function encode + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @static + * @param {record.v3.details.IRecordAccessorDetailsRequest} message RecordAccessorDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordAccessorDetailsRequest.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.recordUid); + if (message.accessorUid != null && Object.hasOwnProperty.call(message, "accessorUid")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.accessorUid); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.keeper.api.common.Page.encode(message.page, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Decodes a RecordAccessorDetailsRequest message from the specified reader or buffer. + * @function decode + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {record.v3.details.RecordAccessorDetailsRequest} RecordAccessorDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordAccessorDetailsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.record.v3.details.RecordAccessorDetailsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordUid = reader.bytes(); + break; + } + case 2: { + message.accessorUid = reader.bytes(); + break; + } + case 3: { + message.page = $root.keeper.api.common.Page.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a RecordAccessorDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @static + * @param {Object.} object Plain object + * @returns {record.v3.details.RecordAccessorDetailsRequest} RecordAccessorDetailsRequest + */ + RecordAccessorDetailsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.record.v3.details.RecordAccessorDetailsRequest) + return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.details.RecordAccessorDetailsRequest: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.record.v3.details.RecordAccessorDetailsRequest(); + if (object.recordUid != null) + if (typeof object.recordUid === "string") + $util.base64.decode(object.recordUid, message.recordUid = $util.newBuffer($util.base64.length(object.recordUid)), 0); + else if (object.recordUid.length >= 0) + message.recordUid = object.recordUid; + if (object.accessorUid != null) + if (typeof object.accessorUid === "string") + $util.base64.decode(object.accessorUid, message.accessorUid = $util.newBuffer($util.base64.length(object.accessorUid)), 0); + else if (object.accessorUid.length >= 0) + message.accessorUid = object.accessorUid; + if (object.page != null) { + if (!$util.isObject(object.page)) + throw TypeError(".record.v3.details.RecordAccessorDetailsRequest.page: object expected"); + message.page = $root.keeper.api.common.Page.fromObject(object.page, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordAccessorDetailsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @static + * @param {record.v3.details.RecordAccessorDetailsRequest} message RecordAccessorDetailsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordAccessorDetailsRequest.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.recordUid = ""; + else { + object.recordUid = []; + if (options.bytes !== Array) + object.recordUid = $util.newBuffer(object.recordUid); + } + if (options.bytes === String) + object.accessorUid = ""; + else { + object.accessorUid = []; + if (options.bytes !== Array) + object.accessorUid = $util.newBuffer(object.accessorUid); + } + object.page = null; + } + if (message.recordUid != null && Object.hasOwnProperty.call(message, "recordUid")) + object.recordUid = options.bytes === String ? $util.base64.encode(message.recordUid, 0, message.recordUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.recordUid) : message.recordUid; + if (message.accessorUid != null && Object.hasOwnProperty.call(message, "accessorUid")) + object.accessorUid = options.bytes === String ? $util.base64.encode(message.accessorUid, 0, message.accessorUid.length) : options.bytes === Array ? Array.prototype.slice.call(message.accessorUid) : message.accessorUid; + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + object.page = $root.keeper.api.common.Page.toObject(message.page, options, q + 1); + return object; + }; + + /** + * Converts this RecordAccessorDetailsRequest to JSON. + * @function toJSON + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @instance + * @returns {Object.} JSON object + */ + RecordAccessorDetailsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordAccessorDetailsRequest + * @function getTypeUrl + * @memberof record.v3.details.RecordAccessorDetailsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordAccessorDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/record.v3.details.RecordAccessorDetailsRequest"; + }; + + return RecordAccessorDetailsRequest; + })(); + + details.RecordAccessorDetailsResponse = (function() { + + /** + * Properties of a RecordAccessorDetailsResponse. + * @memberof record.v3.details + * @interface IRecordAccessorDetailsResponse + * @property {Folder.IRecordAccessData|null} [recordAccessData] Set if has direct access to the record. + * @property {Array.|null} [folderAccessData] The list of folder the user has access and that contain the record. + * @property {keeper.api.common.IPageInfo|null} [pageInfo] * Pagination metadata for this response. + * * Contains current page info, total count, and whether more pages exist. + */ + + /** + * Constructs a new RecordAccessorDetailsResponse. + * @memberof record.v3.details + * @classdesc Represents a record accessor details response. + * Record accessor details include information on how a specific accessor obtained access to a record. + * @implements IRecordAccessorDetailsResponse + * @constructor + * @param {record.v3.details.IRecordAccessorDetailsResponse=} [properties] Properties to set + */ + function RecordAccessorDetailsResponse(properties) { + this.folderAccessData = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Set if has direct access to the record. + * @member {Folder.IRecordAccessData|null|undefined} recordAccessData + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @instance + */ + RecordAccessorDetailsResponse.prototype.recordAccessData = null; + + /** + * The list of folder the user has access and that contain the record. + * @member {Array.} folderAccessData + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @instance + */ + RecordAccessorDetailsResponse.prototype.folderAccessData = $util.emptyArray; + + /** + * * Pagination metadata for this response. + * * Contains current page info, total count, and whether more pages exist. + * @member {keeper.api.common.IPageInfo|null|undefined} pageInfo + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @instance + */ + RecordAccessorDetailsResponse.prototype.pageInfo = null; + + /** + * Creates a new RecordAccessorDetailsResponse instance using the specified properties. + * @function create + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @static + * @param {record.v3.details.IRecordAccessorDetailsResponse=} [properties] Properties to set + * @returns {record.v3.details.RecordAccessorDetailsResponse} RecordAccessorDetailsResponse instance + */ + RecordAccessorDetailsResponse.create = function create(properties) { + return new RecordAccessorDetailsResponse(properties); + }; + + /** + * Encodes the specified RecordAccessorDetailsResponse message. Does not implicitly {@link record.v3.details.RecordAccessorDetailsResponse.verify|verify} messages. + * @function encode + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @static + * @param {record.v3.details.IRecordAccessorDetailsResponse} message RecordAccessorDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordAccessorDetailsResponse.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.recordAccessData != null && Object.hasOwnProperty.call(message, "recordAccessData")) + $root.Folder.RecordAccessData.encode(message.recordAccessData, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.folderAccessData != null && message.folderAccessData.length) + for (let i = 0; i < message.folderAccessData.length; ++i) + $root.Folder.FolderAccessData.encode(message.folderAccessData[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.keeper.api.common.PageInfo.encode(message.pageInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Decodes a RecordAccessorDetailsResponse message from the specified reader or buffer. + * @function decode + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {record.v3.details.RecordAccessorDetailsResponse} RecordAccessorDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordAccessorDetailsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.record.v3.details.RecordAccessorDetailsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordAccessData = $root.Folder.RecordAccessData.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (!(message.folderAccessData && message.folderAccessData.length)) + message.folderAccessData = []; + message.folderAccessData.push($root.Folder.FolderAccessData.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.pageInfo = $root.keeper.api.common.PageInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a RecordAccessorDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @static + * @param {Object.} object Plain object + * @returns {record.v3.details.RecordAccessorDetailsResponse} RecordAccessorDetailsResponse + */ + RecordAccessorDetailsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.record.v3.details.RecordAccessorDetailsResponse) + return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.details.RecordAccessorDetailsResponse: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.record.v3.details.RecordAccessorDetailsResponse(); + if (object.recordAccessData != null) { + if (!$util.isObject(object.recordAccessData)) + throw TypeError(".record.v3.details.RecordAccessorDetailsResponse.recordAccessData: object expected"); + message.recordAccessData = $root.Folder.RecordAccessData.fromObject(object.recordAccessData, long + 1); + } + if (object.folderAccessData) { + if (!Array.isArray(object.folderAccessData)) + throw TypeError(".record.v3.details.RecordAccessorDetailsResponse.folderAccessData: array expected"); + message.folderAccessData = []; + for (let i = 0; i < object.folderAccessData.length; ++i) { + if (!$util.isObject(object.folderAccessData[i])) + throw TypeError(".record.v3.details.RecordAccessorDetailsResponse.folderAccessData: object expected"); + message.folderAccessData[i] = $root.Folder.FolderAccessData.fromObject(object.folderAccessData[i], long + 1); + } + } + if (object.pageInfo != null) { + if (!$util.isObject(object.pageInfo)) + throw TypeError(".record.v3.details.RecordAccessorDetailsResponse.pageInfo: object expected"); + message.pageInfo = $root.keeper.api.common.PageInfo.fromObject(object.pageInfo, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordAccessorDetailsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @static + * @param {record.v3.details.RecordAccessorDetailsResponse} message RecordAccessorDetailsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordAccessorDetailsResponse.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.arrays || options.defaults) + object.folderAccessData = []; + if (options.defaults) { + object.recordAccessData = null; + object.pageInfo = null; + } + if (message.recordAccessData != null && Object.hasOwnProperty.call(message, "recordAccessData")) + object.recordAccessData = $root.Folder.RecordAccessData.toObject(message.recordAccessData, options, q + 1); + if (message.folderAccessData && message.folderAccessData.length) { + object.folderAccessData = []; + for (let j = 0; j < message.folderAccessData.length; ++j) + object.folderAccessData[j] = $root.Folder.FolderAccessData.toObject(message.folderAccessData[j], options, q + 1); + } + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + object.pageInfo = $root.keeper.api.common.PageInfo.toObject(message.pageInfo, options, q + 1); + return object; + }; + + /** + * Converts this RecordAccessorDetailsResponse to JSON. + * @function toJSON + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @instance + * @returns {Object.} JSON object + */ + RecordAccessorDetailsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordAccessorDetailsResponse + * @function getTypeUrl + * @memberof record.v3.details.RecordAccessorDetailsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordAccessorDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/record.v3.details.RecordAccessorDetailsResponse"; + }; + + return RecordAccessorDetailsResponse; + })(); + + details.RecordAccess = (function() { + + /** + * Properties of a RecordAccess. + * @memberof record.v3.details + * @interface IRecordAccess + * @property {Folder.IRecordAccessData|null} [data] Core access details including permissions, role, and metadata. + * @property {record.v3.details.IAccessorInfo|null} [accessorInfo] The record accessor. + */ + + /** + * Constructs a new RecordAccess. + * @memberof record.v3.details + * @classdesc Describes the access a user has to a specific record. + * Includes ownership, access roles, and additional sharing metadata. + * @implements IRecordAccess + * @constructor + * @param {record.v3.details.IRecordAccess=} [properties] Properties to set + */ + function RecordAccess(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Core access details including permissions, role, and metadata. + * @member {Folder.IRecordAccessData|null|undefined} data + * @memberof record.v3.details.RecordAccess + * @instance + */ + RecordAccess.prototype.data = null; + + /** + * The record accessor. + * @member {record.v3.details.IAccessorInfo|null|undefined} accessorInfo + * @memberof record.v3.details.RecordAccess + * @instance + */ + RecordAccess.prototype.accessorInfo = null; + + /** + * Creates a new RecordAccess instance using the specified properties. + * @function create + * @memberof record.v3.details.RecordAccess + * @static + * @param {record.v3.details.IRecordAccess=} [properties] Properties to set + * @returns {record.v3.details.RecordAccess} RecordAccess instance + */ + RecordAccess.create = function create(properties) { + return new RecordAccess(properties); + }; + + /** + * Encodes the specified RecordAccess message. Does not implicitly {@link record.v3.details.RecordAccess.verify|verify} messages. + * @function encode + * @memberof record.v3.details.RecordAccess + * @static + * @param {record.v3.details.IRecordAccess} message RecordAccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordAccess.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.Folder.RecordAccessData.encode(message.data, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + if (message.accessorInfo != null && Object.hasOwnProperty.call(message, "accessorInfo")) + $root.record.v3.details.AccessorInfo.encode(message.accessorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + return writer; + }; + + /** + * Decodes a RecordAccess message from the specified reader or buffer. + * @function decode + * @memberof record.v3.details.RecordAccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {record.v3.details.RecordAccess} RecordAccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordAccess.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.record.v3.details.RecordAccess(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.data = $root.Folder.RecordAccessData.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.accessorInfo = $root.record.v3.details.AccessorInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates a RecordAccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof record.v3.details.RecordAccess + * @static + * @param {Object.} object Plain object + * @returns {record.v3.details.RecordAccess} RecordAccess + */ + RecordAccess.fromObject = function fromObject(object, long) { + if (object instanceof $root.record.v3.details.RecordAccess) + return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.details.RecordAccess: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.record.v3.details.RecordAccess(); + if (object.data != null) { + if (!$util.isObject(object.data)) + throw TypeError(".record.v3.details.RecordAccess.data: object expected"); + message.data = $root.Folder.RecordAccessData.fromObject(object.data, long + 1); + } + if (object.accessorInfo != null) { + if (!$util.isObject(object.accessorInfo)) + throw TypeError(".record.v3.details.RecordAccess.accessorInfo: object expected"); + message.accessorInfo = $root.record.v3.details.AccessorInfo.fromObject(object.accessorInfo, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordAccess message. Also converts values to other types if specified. + * @function toObject + * @memberof record.v3.details.RecordAccess + * @static + * @param {record.v3.details.RecordAccess} message RecordAccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordAccess.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) { + object.data = null; + object.accessorInfo = null; + } + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + object.data = $root.Folder.RecordAccessData.toObject(message.data, options, q + 1); + if (message.accessorInfo != null && Object.hasOwnProperty.call(message, "accessorInfo")) + object.accessorInfo = $root.record.v3.details.AccessorInfo.toObject(message.accessorInfo, options, q + 1); + return object; + }; + + /** + * Converts this RecordAccess to JSON. + * @function toJSON + * @memberof record.v3.details.RecordAccess + * @instance + * @returns {Object.} JSON object + */ + RecordAccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordAccess + * @function getTypeUrl + * @memberof record.v3.details.RecordAccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordAccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/record.v3.details.RecordAccess"; + }; + + return RecordAccess; + })(); + + details.AccessorInfo = (function() { + + /** + * Properties of an AccessorInfo. + * @memberof record.v3.details + * @interface IAccessorInfo + * @property {string|null} [name] accessor name + */ + + /** + * Constructs a new AccessorInfo. + * @memberof record.v3.details + * @classdesc The entity representing the record accessor. Either a team or a user + * @implements IAccessorInfo + * @constructor + * @param {record.v3.details.IAccessorInfo=} [properties] Properties to set + */ + function AccessorInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * accessor name + * @member {string} name + * @memberof record.v3.details.AccessorInfo + * @instance + */ + AccessorInfo.prototype.name = ""; + + /** + * Creates a new AccessorInfo instance using the specified properties. + * @function create + * @memberof record.v3.details.AccessorInfo + * @static + * @param {record.v3.details.IAccessorInfo=} [properties] Properties to set + * @returns {record.v3.details.AccessorInfo} AccessorInfo instance + */ + AccessorInfo.create = function create(properties) { + return new AccessorInfo(properties); + }; + + /** + * Encodes the specified AccessorInfo message. Does not implicitly {@link record.v3.details.AccessorInfo.verify|verify} messages. + * @function encode + * @memberof record.v3.details.AccessorInfo + * @static + * @param {record.v3.details.IAccessorInfo} message AccessorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessorInfo.encode = function encode(message, writer, q) { + if (!writer) + writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Decodes an AccessorInfo message from the specified reader or buffer. + * @function decode + * @memberof record.v3.details.AccessorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {record.v3.details.AccessorInfo} AccessorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessorInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.record.v3.details.AccessorInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Creates an AccessorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof record.v3.details.AccessorInfo + * @static + * @param {Object.} object Plain object + * @returns {record.v3.details.AccessorInfo} AccessorInfo + */ + AccessorInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.record.v3.details.AccessorInfo) + return object; + if (!$util.isObject(object)) + throw TypeError(".record.v3.details.AccessorInfo: object expected"); + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + let message = new $root.record.v3.details.AccessorInfo(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an AccessorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof record.v3.details.AccessorInfo + * @static + * @param {record.v3.details.AccessorInfo} message AccessorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessorInfo.toObject = function toObject(message, options, q) { + if (!options) + options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); + let object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this AccessorInfo to JSON. + * @function toJSON + * @memberof record.v3.details.AccessorInfo + * @instance + * @returns {Object.} JSON object + */ + AccessorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessorInfo + * @function getTypeUrl + * @memberof record.v3.details.AccessorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/record.v3.details.AccessorInfo"; + }; + + return AccessorInfo; + })(); + + return details; + })(); + return v3; })();