nice-grpc-error-details
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -1,2 +0,2 @@ | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
export declare const protobufPackage = "google.protobuf"; | ||
@@ -58,3 +58,2 @@ /** | ||
* | ||
* | ||
* JSON | ||
@@ -89,3 +88,3 @@ * ==== | ||
export interface Any { | ||
$type: 'google.protobuf.Any'; | ||
$type: "google.protobuf.Any"; | ||
/** | ||
@@ -132,4 +131,4 @@ * A URL/resource name that uniquely identifies the type of the serialized | ||
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { | ||
[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>; | ||
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>; | ||
} : Partial<T>; | ||
export {}; |
@@ -5,12 +5,12 @@ "use strict"; | ||
/* eslint-disable */ | ||
const _m0 = require("protobufjs/minimal"); | ||
const typeRegistry_1 = require("../../typeRegistry"); | ||
const _m0 = require("protobufjs/minimal"); | ||
exports.protobufPackage = 'google.protobuf'; | ||
exports.protobufPackage = "google.protobuf"; | ||
function createBaseAny() { | ||
return { $type: 'google.protobuf.Any', typeUrl: '', value: new Uint8Array() }; | ||
return { $type: "google.protobuf.Any", typeUrl: "", value: new Uint8Array() }; | ||
} | ||
exports.Any = { | ||
$type: 'google.protobuf.Any', | ||
$type: "google.protobuf.Any", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.typeUrl !== '') { | ||
if (message.typeUrl !== "") { | ||
writer.uint32(10).string(message.typeUrl); | ||
@@ -46,3 +46,3 @@ } | ||
const message = createBaseAny(); | ||
message.typeUrl = (_a = object.typeUrl) !== null && _a !== void 0 ? _a : ''; | ||
message.typeUrl = (_a = object.typeUrl) !== null && _a !== void 0 ? _a : ""; | ||
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : new Uint8Array(); | ||
@@ -49,0 +49,0 @@ return message; |
@@ -1,2 +0,2 @@ | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
export declare const protobufPackage = "google.protobuf"; | ||
@@ -64,3 +64,3 @@ /** | ||
export interface Duration { | ||
$type: 'google.protobuf.Duration'; | ||
$type: "google.protobuf.Duration"; | ||
/** | ||
@@ -90,4 +90,4 @@ * Signed seconds of the span of time. Must be from -315,576,000,000 | ||
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { | ||
[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>; | ||
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>; | ||
} : Partial<T>; | ||
export {}; |
@@ -5,11 +5,11 @@ "use strict"; | ||
/* eslint-disable */ | ||
const typeRegistry_1 = require("../../typeRegistry"); | ||
const Long = require("long"); | ||
const _m0 = require("protobufjs/minimal"); | ||
exports.protobufPackage = 'google.protobuf'; | ||
const typeRegistry_1 = require("../../typeRegistry"); | ||
exports.protobufPackage = "google.protobuf"; | ||
function createBaseDuration() { | ||
return { $type: 'google.protobuf.Duration', seconds: 0, nanos: 0 }; | ||
return { $type: "google.protobuf.Duration", seconds: 0, nanos: 0 }; | ||
} | ||
exports.Duration = { | ||
$type: 'google.protobuf.Duration', | ||
$type: "google.protobuf.Duration", | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -54,15 +54,19 @@ if (message.seconds !== 0) { | ||
var globalThis = (() => { | ||
if (typeof globalThis !== 'undefined') | ||
if (typeof globalThis !== "undefined") { | ||
return globalThis; | ||
if (typeof self !== 'undefined') | ||
} | ||
if (typeof self !== "undefined") { | ||
return self; | ||
if (typeof window !== 'undefined') | ||
} | ||
if (typeof window !== "undefined") { | ||
return window; | ||
if (typeof global !== 'undefined') | ||
} | ||
if (typeof global !== "undefined") { | ||
return global; | ||
throw 'Unable to locate global object'; | ||
} | ||
throw "Unable to locate global object"; | ||
})(); | ||
function longToNumber(long) { | ||
if (long.gt(Number.MAX_SAFE_INTEGER)) { | ||
throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER'); | ||
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); | ||
} | ||
@@ -69,0 +73,0 @@ return long.toNumber(); |
@@ -1,3 +0,3 @@ | ||
import { Duration } from '../protobuf/duration'; | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { Duration } from "../protobuf/duration"; | ||
export declare const protobufPackage = "google.rpc"; | ||
@@ -20,3 +20,3 @@ /** | ||
export interface RetryInfo { | ||
$type: 'google.rpc.RetryInfo'; | ||
$type: "google.rpc.RetryInfo"; | ||
/** Clients should wait at least this long between retrying the same request. */ | ||
@@ -27,3 +27,3 @@ retryDelay: Duration | undefined; | ||
export interface DebugInfo { | ||
$type: 'google.rpc.DebugInfo'; | ||
$type: "google.rpc.DebugInfo"; | ||
/** The stack trace entries indicating where the error occurred. */ | ||
@@ -48,3 +48,3 @@ stackEntries: string[]; | ||
export interface QuotaFailure { | ||
$type: 'google.rpc.QuotaFailure'; | ||
$type: "google.rpc.QuotaFailure"; | ||
/** Describes all quota violations. */ | ||
@@ -58,3 +58,3 @@ violations: QuotaFailure_Violation[]; | ||
export interface QuotaFailure_Violation { | ||
$type: 'google.rpc.QuotaFailure.Violation'; | ||
$type: "google.rpc.QuotaFailure.Violation"; | ||
/** | ||
@@ -104,3 +104,3 @@ * The subject on which the quota check failed. | ||
export interface ErrorInfo { | ||
$type: 'google.rpc.ErrorInfo'; | ||
$type: "google.rpc.ErrorInfo"; | ||
/** | ||
@@ -137,3 +137,3 @@ * The reason of the error. This is a constant value that identifies the | ||
export interface ErrorInfo_MetadataEntry { | ||
$type: 'google.rpc.ErrorInfo.MetadataEntry'; | ||
$type: "google.rpc.ErrorInfo.MetadataEntry"; | ||
key: string; | ||
@@ -150,3 +150,3 @@ value: string; | ||
export interface PreconditionFailure { | ||
$type: 'google.rpc.PreconditionFailure'; | ||
$type: "google.rpc.PreconditionFailure"; | ||
/** Describes all precondition violations. */ | ||
@@ -157,3 +157,3 @@ violations: PreconditionFailure_Violation[]; | ||
export interface PreconditionFailure_Violation { | ||
$type: 'google.rpc.PreconditionFailure.Violation'; | ||
$type: "google.rpc.PreconditionFailure.Violation"; | ||
/** | ||
@@ -184,3 +184,3 @@ * The type of PreconditionFailure. We recommend using a service-specific | ||
export interface BadRequest { | ||
$type: 'google.rpc.BadRequest'; | ||
$type: "google.rpc.BadRequest"; | ||
/** Describes all violations in a client request. */ | ||
@@ -191,3 +191,3 @@ fieldViolations: BadRequest_FieldViolation[]; | ||
export interface BadRequest_FieldViolation { | ||
$type: 'google.rpc.BadRequest.FieldViolation'; | ||
$type: "google.rpc.BadRequest.FieldViolation"; | ||
/** | ||
@@ -207,3 +207,3 @@ * A path leading to a field in the request body. The value will be a | ||
export interface RequestInfo { | ||
$type: 'google.rpc.RequestInfo'; | ||
$type: "google.rpc.RequestInfo"; | ||
/** | ||
@@ -222,3 +222,3 @@ * An opaque string that should only be interpreted by the service generating | ||
export interface ResourceInfo { | ||
$type: 'google.rpc.ResourceInfo'; | ||
$type: "google.rpc.ResourceInfo"; | ||
/** | ||
@@ -257,3 +257,3 @@ * A name for the type of resource being accessed, e.g. "sql table", | ||
export interface Help { | ||
$type: 'google.rpc.Help'; | ||
$type: "google.rpc.Help"; | ||
/** URL(s) pointing to additional information on handling the current error. */ | ||
@@ -264,3 +264,3 @@ links: Help_Link[]; | ||
export interface Help_Link { | ||
$type: 'google.rpc.Help.Link'; | ||
$type: "google.rpc.Help.Link"; | ||
/** Describes what the link offers. */ | ||
@@ -276,3 +276,3 @@ description: string; | ||
export interface LocalizedMessage { | ||
$type: 'google.rpc.LocalizedMessage'; | ||
$type: "google.rpc.LocalizedMessage"; | ||
/** | ||
@@ -379,4 +379,4 @@ * The locale used following the specification defined at | ||
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { | ||
[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>; | ||
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>; | ||
} : Partial<T>; | ||
export {}; |
@@ -5,11 +5,11 @@ "use strict"; | ||
/* eslint-disable */ | ||
const _m0 = require("protobufjs/minimal"); | ||
const typeRegistry_1 = require("../../typeRegistry"); | ||
const duration_1 = require("../protobuf/duration"); | ||
const _m0 = require("protobufjs/minimal"); | ||
exports.protobufPackage = 'google.rpc'; | ||
exports.protobufPackage = "google.rpc"; | ||
function createBaseRetryInfo() { | ||
return { $type: 'google.rpc.RetryInfo', retryDelay: undefined }; | ||
return { $type: "google.rpc.RetryInfo", retryDelay: undefined }; | ||
} | ||
exports.RetryInfo = { | ||
$type: 'google.rpc.RetryInfo', | ||
$type: "google.rpc.RetryInfo", | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -40,6 +40,5 @@ if (message.retryDelay !== undefined) { | ||
const message = createBaseRetryInfo(); | ||
message.retryDelay = | ||
object.retryDelay !== undefined && object.retryDelay !== null | ||
? duration_1.Duration.fromPartial(object.retryDelay) | ||
: undefined; | ||
message.retryDelay = (object.retryDelay !== undefined && object.retryDelay !== null) | ||
? duration_1.Duration.fromPartial(object.retryDelay) | ||
: undefined; | ||
return message; | ||
@@ -50,6 +49,6 @@ }, | ||
function createBaseDebugInfo() { | ||
return { $type: 'google.rpc.DebugInfo', stackEntries: [], detail: '' }; | ||
return { $type: "google.rpc.DebugInfo", stackEntries: [], detail: "" }; | ||
} | ||
exports.DebugInfo = { | ||
$type: 'google.rpc.DebugInfo', | ||
$type: "google.rpc.DebugInfo", | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -59,3 +58,3 @@ for (const v of message.stackEntries) { | ||
} | ||
if (message.detail !== '') { | ||
if (message.detail !== "") { | ||
writer.uint32(18).string(message.detail); | ||
@@ -88,4 +87,4 @@ } | ||
const message = createBaseDebugInfo(); | ||
message.stackEntries = ((_a = object.stackEntries) === null || _a === void 0 ? void 0 : _a.map(e => e)) || []; | ||
message.detail = (_b = object.detail) !== null && _b !== void 0 ? _b : ''; | ||
message.stackEntries = ((_a = object.stackEntries) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; | ||
message.detail = (_b = object.detail) !== null && _b !== void 0 ? _b : ""; | ||
return message; | ||
@@ -96,6 +95,6 @@ }, | ||
function createBaseQuotaFailure() { | ||
return { $type: 'google.rpc.QuotaFailure', violations: [] }; | ||
return { $type: "google.rpc.QuotaFailure", violations: [] }; | ||
} | ||
exports.QuotaFailure = { | ||
$type: 'google.rpc.QuotaFailure', | ||
$type: "google.rpc.QuotaFailure", | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -127,4 +126,3 @@ for (const v of message.violations) { | ||
const message = createBaseQuotaFailure(); | ||
message.violations = | ||
((_a = object.violations) === null || _a === void 0 ? void 0 : _a.map(e => exports.QuotaFailure_Violation.fromPartial(e))) || []; | ||
message.violations = ((_a = object.violations) === null || _a === void 0 ? void 0 : _a.map((e) => exports.QuotaFailure_Violation.fromPartial(e))) || []; | ||
return message; | ||
@@ -135,15 +133,11 @@ }, | ||
function createBaseQuotaFailure_Violation() { | ||
return { | ||
$type: 'google.rpc.QuotaFailure.Violation', | ||
subject: '', | ||
description: '', | ||
}; | ||
return { $type: "google.rpc.QuotaFailure.Violation", subject: "", description: "" }; | ||
} | ||
exports.QuotaFailure_Violation = { | ||
$type: 'google.rpc.QuotaFailure.Violation', | ||
$type: "google.rpc.QuotaFailure.Violation", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.subject !== '') { | ||
if (message.subject !== "") { | ||
writer.uint32(10).string(message.subject); | ||
} | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(18).string(message.description); | ||
@@ -176,4 +170,4 @@ } | ||
const message = createBaseQuotaFailure_Violation(); | ||
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : ''; | ||
message.description = (_b = object.description) !== null && _b !== void 0 ? _b : ''; | ||
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : ""; | ||
message.description = (_b = object.description) !== null && _b !== void 0 ? _b : ""; | ||
return message; | ||
@@ -184,15 +178,15 @@ }, | ||
function createBaseErrorInfo() { | ||
return { $type: 'google.rpc.ErrorInfo', reason: '', domain: '', metadata: {} }; | ||
return { $type: "google.rpc.ErrorInfo", reason: "", domain: "", metadata: {} }; | ||
} | ||
exports.ErrorInfo = { | ||
$type: 'google.rpc.ErrorInfo', | ||
$type: "google.rpc.ErrorInfo", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.reason !== '') { | ||
if (message.reason !== "") { | ||
writer.uint32(10).string(message.reason); | ||
} | ||
if (message.domain !== '') { | ||
if (message.domain !== "") { | ||
writer.uint32(18).string(message.domain); | ||
} | ||
Object.entries(message.metadata).forEach(([key, value]) => { | ||
exports.ErrorInfo_MetadataEntry.encode({ $type: 'google.rpc.ErrorInfo.MetadataEntry', key: key, value }, writer.uint32(26).fork()).ldelim(); | ||
exports.ErrorInfo_MetadataEntry.encode({ $type: "google.rpc.ErrorInfo.MetadataEntry", key: key, value }, writer.uint32(26).fork()).ldelim(); | ||
}); | ||
@@ -230,4 +224,4 @@ return writer; | ||
const message = createBaseErrorInfo(); | ||
message.reason = (_a = object.reason) !== null && _a !== void 0 ? _a : ''; | ||
message.domain = (_b = object.domain) !== null && _b !== void 0 ? _b : ''; | ||
message.reason = (_a = object.reason) !== null && _a !== void 0 ? _a : ""; | ||
message.domain = (_b = object.domain) !== null && _b !== void 0 ? _b : ""; | ||
message.metadata = Object.entries((_c = object.metadata) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => { | ||
@@ -244,11 +238,11 @@ if (value !== undefined) { | ||
function createBaseErrorInfo_MetadataEntry() { | ||
return { $type: 'google.rpc.ErrorInfo.MetadataEntry', key: '', value: '' }; | ||
return { $type: "google.rpc.ErrorInfo.MetadataEntry", key: "", value: "" }; | ||
} | ||
exports.ErrorInfo_MetadataEntry = { | ||
$type: 'google.rpc.ErrorInfo.MetadataEntry', | ||
$type: "google.rpc.ErrorInfo.MetadataEntry", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.key !== '') { | ||
if (message.key !== "") { | ||
writer.uint32(10).string(message.key); | ||
} | ||
if (message.value !== '') { | ||
if (message.value !== "") { | ||
writer.uint32(18).string(message.value); | ||
@@ -281,4 +275,4 @@ } | ||
const message = createBaseErrorInfo_MetadataEntry(); | ||
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : ''; | ||
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : ''; | ||
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : ""; | ||
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : ""; | ||
return message; | ||
@@ -289,6 +283,6 @@ }, | ||
function createBasePreconditionFailure() { | ||
return { $type: 'google.rpc.PreconditionFailure', violations: [] }; | ||
return { $type: "google.rpc.PreconditionFailure", violations: [] }; | ||
} | ||
exports.PreconditionFailure = { | ||
$type: 'google.rpc.PreconditionFailure', | ||
$type: "google.rpc.PreconditionFailure", | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -320,4 +314,3 @@ for (const v of message.violations) { | ||
const message = createBasePreconditionFailure(); | ||
message.violations = | ||
((_a = object.violations) === null || _a === void 0 ? void 0 : _a.map(e => exports.PreconditionFailure_Violation.fromPartial(e))) || []; | ||
message.violations = ((_a = object.violations) === null || _a === void 0 ? void 0 : _a.map((e) => exports.PreconditionFailure_Violation.fromPartial(e))) || []; | ||
return message; | ||
@@ -328,19 +321,14 @@ }, | ||
function createBasePreconditionFailure_Violation() { | ||
return { | ||
$type: 'google.rpc.PreconditionFailure.Violation', | ||
type: '', | ||
subject: '', | ||
description: '', | ||
}; | ||
return { $type: "google.rpc.PreconditionFailure.Violation", type: "", subject: "", description: "" }; | ||
} | ||
exports.PreconditionFailure_Violation = { | ||
$type: 'google.rpc.PreconditionFailure.Violation', | ||
$type: "google.rpc.PreconditionFailure.Violation", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.type !== '') { | ||
if (message.type !== "") { | ||
writer.uint32(10).string(message.type); | ||
} | ||
if (message.subject !== '') { | ||
if (message.subject !== "") { | ||
writer.uint32(18).string(message.subject); | ||
} | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(26).string(message.description); | ||
@@ -376,5 +364,5 @@ } | ||
const message = createBasePreconditionFailure_Violation(); | ||
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : ''; | ||
message.subject = (_b = object.subject) !== null && _b !== void 0 ? _b : ''; | ||
message.description = (_c = object.description) !== null && _c !== void 0 ? _c : ''; | ||
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : ""; | ||
message.subject = (_b = object.subject) !== null && _b !== void 0 ? _b : ""; | ||
message.description = (_c = object.description) !== null && _c !== void 0 ? _c : ""; | ||
return message; | ||
@@ -385,6 +373,6 @@ }, | ||
function createBaseBadRequest() { | ||
return { $type: 'google.rpc.BadRequest', fieldViolations: [] }; | ||
return { $type: "google.rpc.BadRequest", fieldViolations: [] }; | ||
} | ||
exports.BadRequest = { | ||
$type: 'google.rpc.BadRequest', | ||
$type: "google.rpc.BadRequest", | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -416,4 +404,3 @@ for (const v of message.fieldViolations) { | ||
const message = createBaseBadRequest(); | ||
message.fieldViolations = | ||
((_a = object.fieldViolations) === null || _a === void 0 ? void 0 : _a.map(e => exports.BadRequest_FieldViolation.fromPartial(e))) || []; | ||
message.fieldViolations = ((_a = object.fieldViolations) === null || _a === void 0 ? void 0 : _a.map((e) => exports.BadRequest_FieldViolation.fromPartial(e))) || []; | ||
return message; | ||
@@ -424,15 +411,11 @@ }, | ||
function createBaseBadRequest_FieldViolation() { | ||
return { | ||
$type: 'google.rpc.BadRequest.FieldViolation', | ||
field: '', | ||
description: '', | ||
}; | ||
return { $type: "google.rpc.BadRequest.FieldViolation", field: "", description: "" }; | ||
} | ||
exports.BadRequest_FieldViolation = { | ||
$type: 'google.rpc.BadRequest.FieldViolation', | ||
$type: "google.rpc.BadRequest.FieldViolation", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.field !== '') { | ||
if (message.field !== "") { | ||
writer.uint32(10).string(message.field); | ||
} | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(18).string(message.description); | ||
@@ -465,4 +448,4 @@ } | ||
const message = createBaseBadRequest_FieldViolation(); | ||
message.field = (_a = object.field) !== null && _a !== void 0 ? _a : ''; | ||
message.description = (_b = object.description) !== null && _b !== void 0 ? _b : ''; | ||
message.field = (_a = object.field) !== null && _a !== void 0 ? _a : ""; | ||
message.description = (_b = object.description) !== null && _b !== void 0 ? _b : ""; | ||
return message; | ||
@@ -473,11 +456,11 @@ }, | ||
function createBaseRequestInfo() { | ||
return { $type: 'google.rpc.RequestInfo', requestId: '', servingData: '' }; | ||
return { $type: "google.rpc.RequestInfo", requestId: "", servingData: "" }; | ||
} | ||
exports.RequestInfo = { | ||
$type: 'google.rpc.RequestInfo', | ||
$type: "google.rpc.RequestInfo", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.requestId !== '') { | ||
if (message.requestId !== "") { | ||
writer.uint32(10).string(message.requestId); | ||
} | ||
if (message.servingData !== '') { | ||
if (message.servingData !== "") { | ||
writer.uint32(18).string(message.servingData); | ||
@@ -510,4 +493,4 @@ } | ||
const message = createBaseRequestInfo(); | ||
message.requestId = (_a = object.requestId) !== null && _a !== void 0 ? _a : ''; | ||
message.servingData = (_b = object.servingData) !== null && _b !== void 0 ? _b : ''; | ||
message.requestId = (_a = object.requestId) !== null && _a !== void 0 ? _a : ""; | ||
message.servingData = (_b = object.servingData) !== null && _b !== void 0 ? _b : ""; | ||
return message; | ||
@@ -518,23 +501,17 @@ }, | ||
function createBaseResourceInfo() { | ||
return { | ||
$type: 'google.rpc.ResourceInfo', | ||
resourceType: '', | ||
resourceName: '', | ||
owner: '', | ||
description: '', | ||
}; | ||
return { $type: "google.rpc.ResourceInfo", resourceType: "", resourceName: "", owner: "", description: "" }; | ||
} | ||
exports.ResourceInfo = { | ||
$type: 'google.rpc.ResourceInfo', | ||
$type: "google.rpc.ResourceInfo", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.resourceType !== '') { | ||
if (message.resourceType !== "") { | ||
writer.uint32(10).string(message.resourceType); | ||
} | ||
if (message.resourceName !== '') { | ||
if (message.resourceName !== "") { | ||
writer.uint32(18).string(message.resourceName); | ||
} | ||
if (message.owner !== '') { | ||
if (message.owner !== "") { | ||
writer.uint32(26).string(message.owner); | ||
} | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(34).string(message.description); | ||
@@ -573,6 +550,6 @@ } | ||
const message = createBaseResourceInfo(); | ||
message.resourceType = (_a = object.resourceType) !== null && _a !== void 0 ? _a : ''; | ||
message.resourceName = (_b = object.resourceName) !== null && _b !== void 0 ? _b : ''; | ||
message.owner = (_c = object.owner) !== null && _c !== void 0 ? _c : ''; | ||
message.description = (_d = object.description) !== null && _d !== void 0 ? _d : ''; | ||
message.resourceType = (_a = object.resourceType) !== null && _a !== void 0 ? _a : ""; | ||
message.resourceName = (_b = object.resourceName) !== null && _b !== void 0 ? _b : ""; | ||
message.owner = (_c = object.owner) !== null && _c !== void 0 ? _c : ""; | ||
message.description = (_d = object.description) !== null && _d !== void 0 ? _d : ""; | ||
return message; | ||
@@ -583,6 +560,6 @@ }, | ||
function createBaseHelp() { | ||
return { $type: 'google.rpc.Help', links: [] }; | ||
return { $type: "google.rpc.Help", links: [] }; | ||
} | ||
exports.Help = { | ||
$type: 'google.rpc.Help', | ||
$type: "google.rpc.Help", | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -614,3 +591,3 @@ for (const v of message.links) { | ||
const message = createBaseHelp(); | ||
message.links = ((_a = object.links) === null || _a === void 0 ? void 0 : _a.map(e => exports.Help_Link.fromPartial(e))) || []; | ||
message.links = ((_a = object.links) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Help_Link.fromPartial(e))) || []; | ||
return message; | ||
@@ -621,11 +598,11 @@ }, | ||
function createBaseHelp_Link() { | ||
return { $type: 'google.rpc.Help.Link', description: '', url: '' }; | ||
return { $type: "google.rpc.Help.Link", description: "", url: "" }; | ||
} | ||
exports.Help_Link = { | ||
$type: 'google.rpc.Help.Link', | ||
$type: "google.rpc.Help.Link", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(10).string(message.description); | ||
} | ||
if (message.url !== '') { | ||
if (message.url !== "") { | ||
writer.uint32(18).string(message.url); | ||
@@ -658,4 +635,4 @@ } | ||
const message = createBaseHelp_Link(); | ||
message.description = (_a = object.description) !== null && _a !== void 0 ? _a : ''; | ||
message.url = (_b = object.url) !== null && _b !== void 0 ? _b : ''; | ||
message.description = (_a = object.description) !== null && _a !== void 0 ? _a : ""; | ||
message.url = (_b = object.url) !== null && _b !== void 0 ? _b : ""; | ||
return message; | ||
@@ -666,11 +643,11 @@ }, | ||
function createBaseLocalizedMessage() { | ||
return { $type: 'google.rpc.LocalizedMessage', locale: '', message: '' }; | ||
return { $type: "google.rpc.LocalizedMessage", locale: "", message: "" }; | ||
} | ||
exports.LocalizedMessage = { | ||
$type: 'google.rpc.LocalizedMessage', | ||
$type: "google.rpc.LocalizedMessage", | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.locale !== '') { | ||
if (message.locale !== "") { | ||
writer.uint32(10).string(message.locale); | ||
} | ||
if (message.message !== '') { | ||
if (message.message !== "") { | ||
writer.uint32(18).string(message.message); | ||
@@ -703,4 +680,4 @@ } | ||
const message = createBaseLocalizedMessage(); | ||
message.locale = (_a = object.locale) !== null && _a !== void 0 ? _a : ''; | ||
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : ''; | ||
message.locale = (_a = object.locale) !== null && _a !== void 0 ? _a : ""; | ||
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : ""; | ||
return message; | ||
@@ -707,0 +684,0 @@ }, |
@@ -1,3 +0,3 @@ | ||
import { Any } from '../protobuf/any'; | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { Any } from "../protobuf/any"; | ||
export declare const protobufPackage = "google.rpc"; | ||
@@ -14,3 +14,3 @@ /** | ||
export interface Status { | ||
$type: 'google.rpc.Status'; | ||
$type: "google.rpc.Status"; | ||
/** The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. */ | ||
@@ -38,4 +38,4 @@ code: number; | ||
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { | ||
[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>; | ||
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>; | ||
} : Partial<T>; | ||
export {}; |
@@ -5,11 +5,11 @@ "use strict"; | ||
/* eslint-disable */ | ||
const _m0 = require("protobufjs/minimal"); | ||
const typeRegistry_1 = require("../../typeRegistry"); | ||
const any_1 = require("../protobuf/any"); | ||
const _m0 = require("protobufjs/minimal"); | ||
exports.protobufPackage = 'google.rpc'; | ||
exports.protobufPackage = "google.rpc"; | ||
function createBaseStatus() { | ||
return { $type: 'google.rpc.Status', code: 0, message: '', details: [] }; | ||
return { $type: "google.rpc.Status", code: 0, message: "", details: [] }; | ||
} | ||
exports.Status = { | ||
$type: 'google.rpc.Status', | ||
$type: "google.rpc.Status", | ||
encode(message, writer = _m0.Writer.create()) { | ||
@@ -19,3 +19,3 @@ if (message.code !== 0) { | ||
} | ||
if (message.message !== '') { | ||
if (message.message !== "") { | ||
writer.uint32(18).string(message.message); | ||
@@ -55,4 +55,4 @@ } | ||
message.code = (_a = object.code) !== null && _a !== void 0 ? _a : 0; | ||
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : ''; | ||
message.details = ((_c = object.details) === null || _c === void 0 ? void 0 : _c.map(e => any_1.Any.fromPartial(e))) || []; | ||
message.message = (_b = object.message) !== null && _b !== void 0 ? _b : ""; | ||
message.details = ((_c = object.details) === null || _c === void 0 ? void 0 : _c.map((e) => any_1.Any.fromPartial(e))) || []; | ||
return message; | ||
@@ -59,0 +59,0 @@ }, |
@@ -1,4 +0,4 @@ | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
export interface MessageType<Message extends UnknownMessage = UnknownMessage> { | ||
$type: Message['$type']; | ||
$type: Message["$type"]; | ||
encode(message: Message, writer?: _m0.Writer): _m0.Writer; | ||
@@ -14,4 +14,4 @@ decode(input: _m0.Reader | Uint8Array, length?: number): Message; | ||
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { | ||
[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>; | ||
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>; | ||
} : Partial<T>; | ||
export {}; |
{ | ||
"name": "nice-grpc-error-details", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "gRPC rich error model implementation for nice-grpc", | ||
@@ -29,3 +29,3 @@ "repository": "deeplay-io/nice-grpc", | ||
"mkdirp": "^1.0.4", | ||
"nice-grpc": "^2.0.0", | ||
"nice-grpc": "^2.0.1", | ||
"rimraf": "^3.0.2", | ||
@@ -36,5 +36,5 @@ "ts-proto": "^1.112.0" | ||
"nice-grpc-common": "^2.0.0", | ||
"protobufjs": "^6.11.2" | ||
"protobufjs": "^7.1.2" | ||
}, | ||
"gitHead": "0174f605350065a6d9f89df38c6694ba75b891ac" | ||
"gitHead": "b0afa3e8c3c1c471f9b1307b122cc434da2c2151" | ||
} |
/* eslint-disable */ | ||
import {messageTypeRegistry} from '../../typeRegistry'; | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { messageTypeRegistry } from "../../typeRegistry"; | ||
export const protobufPackage = 'google.protobuf'; | ||
export const protobufPackage = "google.protobuf"; | ||
@@ -62,3 +62,2 @@ /** | ||
* | ||
* | ||
* JSON | ||
@@ -93,3 +92,3 @@ * ==== | ||
export interface Any { | ||
$type: 'google.protobuf.Any'; | ||
$type: "google.protobuf.Any"; | ||
/** | ||
@@ -130,10 +129,10 @@ * A URL/resource name that uniquely identifies the type of the serialized | ||
function createBaseAny(): Any { | ||
return {$type: 'google.protobuf.Any', typeUrl: '', value: new Uint8Array()}; | ||
return { $type: "google.protobuf.Any", typeUrl: "", value: new Uint8Array() }; | ||
} | ||
export const Any = { | ||
$type: 'google.protobuf.Any' as const, | ||
$type: "google.protobuf.Any" as const, | ||
encode(message: Any, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.typeUrl !== '') { | ||
if (message.typeUrl !== "") { | ||
writer.uint32(10).string(message.typeUrl); | ||
@@ -170,3 +169,3 @@ } | ||
const message = createBaseAny(); | ||
message.typeUrl = object.typeUrl ?? ''; | ||
message.typeUrl = object.typeUrl ?? ""; | ||
message.value = object.value ?? new Uint8Array(); | ||
@@ -179,19 +178,7 @@ return message; | ||
type Builtin = | ||
| Date | ||
| Function | ||
| Uint8Array | ||
| string | ||
| number | ||
| boolean | ||
| undefined; | ||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
export type DeepPartial<T> = T extends Builtin | ||
? T | ||
: T extends Array<infer U> | ||
? Array<DeepPartial<U>> | ||
: T extends ReadonlyArray<infer U> | ||
? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} | ||
? {[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>} | ||
export type DeepPartial<T> = T extends Builtin ? T | ||
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> } | ||
: Partial<T>; |
/* eslint-disable */ | ||
import {messageTypeRegistry} from '../../typeRegistry'; | ||
import * as Long from 'long'; | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as Long from "long"; | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { messageTypeRegistry } from "../../typeRegistry"; | ||
export const protobufPackage = 'google.protobuf'; | ||
export const protobufPackage = "google.protobuf"; | ||
@@ -69,3 +69,3 @@ /** | ||
export interface Duration { | ||
$type: 'google.protobuf.Duration'; | ||
$type: "google.protobuf.Duration"; | ||
/** | ||
@@ -89,12 +89,9 @@ * Signed seconds of the span of time. Must be from -315,576,000,000 | ||
function createBaseDuration(): Duration { | ||
return {$type: 'google.protobuf.Duration', seconds: 0, nanos: 0}; | ||
return { $type: "google.protobuf.Duration", seconds: 0, nanos: 0 }; | ||
} | ||
export const Duration = { | ||
$type: 'google.protobuf.Duration' as const, | ||
$type: "google.protobuf.Duration" as const, | ||
encode( | ||
message: Duration, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
encode(message: Duration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.seconds !== 0) { | ||
@@ -144,26 +141,22 @@ writer.uint32(8).int64(message.seconds); | ||
var globalThis: any = (() => { | ||
if (typeof globalThis !== 'undefined') return globalThis; | ||
if (typeof self !== 'undefined') return self; | ||
if (typeof window !== 'undefined') return window; | ||
if (typeof global !== 'undefined') return global; | ||
throw 'Unable to locate global object'; | ||
if (typeof globalThis !== "undefined") { | ||
return globalThis; | ||
} | ||
if (typeof self !== "undefined") { | ||
return self; | ||
} | ||
if (typeof window !== "undefined") { | ||
return window; | ||
} | ||
if (typeof global !== "undefined") { | ||
return global; | ||
} | ||
throw "Unable to locate global object"; | ||
})(); | ||
type Builtin = | ||
| Date | ||
| Function | ||
| Uint8Array | ||
| string | ||
| number | ||
| boolean | ||
| undefined; | ||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
export type DeepPartial<T> = T extends Builtin | ||
? T | ||
: T extends Array<infer U> | ||
? Array<DeepPartial<U>> | ||
: T extends ReadonlyArray<infer U> | ||
? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} | ||
? {[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>} | ||
export type DeepPartial<T> = T extends Builtin ? T | ||
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> } | ||
: Partial<T>; | ||
@@ -173,3 +166,3 @@ | ||
if (long.gt(Number.MAX_SAFE_INTEGER)) { | ||
throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER'); | ||
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); | ||
} | ||
@@ -176,0 +169,0 @@ return long.toNumber(); |
/* eslint-disable */ | ||
import {messageTypeRegistry} from '../../typeRegistry'; | ||
import {Duration} from '../protobuf/duration'; | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { messageTypeRegistry } from "../../typeRegistry"; | ||
import { Duration } from "../protobuf/duration"; | ||
export const protobufPackage = 'google.rpc'; | ||
export const protobufPackage = "google.rpc"; | ||
@@ -24,3 +24,3 @@ /** | ||
export interface RetryInfo { | ||
$type: 'google.rpc.RetryInfo'; | ||
$type: "google.rpc.RetryInfo"; | ||
/** Clients should wait at least this long between retrying the same request. */ | ||
@@ -32,3 +32,3 @@ retryDelay: Duration | undefined; | ||
export interface DebugInfo { | ||
$type: 'google.rpc.DebugInfo'; | ||
$type: "google.rpc.DebugInfo"; | ||
/** The stack trace entries indicating where the error occurred. */ | ||
@@ -54,3 +54,3 @@ stackEntries: string[]; | ||
export interface QuotaFailure { | ||
$type: 'google.rpc.QuotaFailure'; | ||
$type: "google.rpc.QuotaFailure"; | ||
/** Describes all quota violations. */ | ||
@@ -65,3 +65,3 @@ violations: QuotaFailure_Violation[]; | ||
export interface QuotaFailure_Violation { | ||
$type: 'google.rpc.QuotaFailure.Violation'; | ||
$type: "google.rpc.QuotaFailure.Violation"; | ||
/** | ||
@@ -112,3 +112,3 @@ * The subject on which the quota check failed. | ||
export interface ErrorInfo { | ||
$type: 'google.rpc.ErrorInfo'; | ||
$type: "google.rpc.ErrorInfo"; | ||
/** | ||
@@ -140,7 +140,7 @@ * The reason of the error. This is a constant value that identifies the | ||
*/ | ||
metadata: {[key: string]: string}; | ||
metadata: { [key: string]: string }; | ||
} | ||
export interface ErrorInfo_MetadataEntry { | ||
$type: 'google.rpc.ErrorInfo.MetadataEntry'; | ||
$type: "google.rpc.ErrorInfo.MetadataEntry"; | ||
key: string; | ||
@@ -158,3 +158,3 @@ value: string; | ||
export interface PreconditionFailure { | ||
$type: 'google.rpc.PreconditionFailure'; | ||
$type: "google.rpc.PreconditionFailure"; | ||
/** Describes all precondition violations. */ | ||
@@ -166,3 +166,3 @@ violations: PreconditionFailure_Violation[]; | ||
export interface PreconditionFailure_Violation { | ||
$type: 'google.rpc.PreconditionFailure.Violation'; | ||
$type: "google.rpc.PreconditionFailure.Violation"; | ||
/** | ||
@@ -194,3 +194,3 @@ * The type of PreconditionFailure. We recommend using a service-specific | ||
export interface BadRequest { | ||
$type: 'google.rpc.BadRequest'; | ||
$type: "google.rpc.BadRequest"; | ||
/** Describes all violations in a client request. */ | ||
@@ -202,3 +202,3 @@ fieldViolations: BadRequest_FieldViolation[]; | ||
export interface BadRequest_FieldViolation { | ||
$type: 'google.rpc.BadRequest.FieldViolation'; | ||
$type: "google.rpc.BadRequest.FieldViolation"; | ||
/** | ||
@@ -219,3 +219,3 @@ * A path leading to a field in the request body. The value will be a | ||
export interface RequestInfo { | ||
$type: 'google.rpc.RequestInfo'; | ||
$type: "google.rpc.RequestInfo"; | ||
/** | ||
@@ -235,3 +235,3 @@ * An opaque string that should only be interpreted by the service generating | ||
export interface ResourceInfo { | ||
$type: 'google.rpc.ResourceInfo'; | ||
$type: "google.rpc.ResourceInfo"; | ||
/** | ||
@@ -271,3 +271,3 @@ * A name for the type of resource being accessed, e.g. "sql table", | ||
export interface Help { | ||
$type: 'google.rpc.Help'; | ||
$type: "google.rpc.Help"; | ||
/** URL(s) pointing to additional information on handling the current error. */ | ||
@@ -279,3 +279,3 @@ links: Help_Link[]; | ||
export interface Help_Link { | ||
$type: 'google.rpc.Help.Link'; | ||
$type: "google.rpc.Help.Link"; | ||
/** Describes what the link offers. */ | ||
@@ -292,3 +292,3 @@ description: string; | ||
export interface LocalizedMessage { | ||
$type: 'google.rpc.LocalizedMessage'; | ||
$type: "google.rpc.LocalizedMessage"; | ||
/** | ||
@@ -305,12 +305,9 @@ * The locale used following the specification defined at | ||
function createBaseRetryInfo(): RetryInfo { | ||
return {$type: 'google.rpc.RetryInfo', retryDelay: undefined}; | ||
return { $type: "google.rpc.RetryInfo", retryDelay: undefined }; | ||
} | ||
export const RetryInfo = { | ||
$type: 'google.rpc.RetryInfo' as const, | ||
$type: "google.rpc.RetryInfo" as const, | ||
encode( | ||
message: RetryInfo, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
encode(message: RetryInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.retryDelay !== undefined) { | ||
@@ -342,6 +339,5 @@ Duration.encode(message.retryDelay, writer.uint32(10).fork()).ldelim(); | ||
const message = createBaseRetryInfo(); | ||
message.retryDelay = | ||
object.retryDelay !== undefined && object.retryDelay !== null | ||
? Duration.fromPartial(object.retryDelay) | ||
: undefined; | ||
message.retryDelay = (object.retryDelay !== undefined && object.retryDelay !== null) | ||
? Duration.fromPartial(object.retryDelay) | ||
: undefined; | ||
return message; | ||
@@ -354,16 +350,13 @@ }, | ||
function createBaseDebugInfo(): DebugInfo { | ||
return {$type: 'google.rpc.DebugInfo', stackEntries: [], detail: ''}; | ||
return { $type: "google.rpc.DebugInfo", stackEntries: [], detail: "" }; | ||
} | ||
export const DebugInfo = { | ||
$type: 'google.rpc.DebugInfo' as const, | ||
$type: "google.rpc.DebugInfo" as const, | ||
encode( | ||
message: DebugInfo, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
encode(message: DebugInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
for (const v of message.stackEntries) { | ||
writer.uint32(10).string(v!); | ||
} | ||
if (message.detail !== '') { | ||
if (message.detail !== "") { | ||
writer.uint32(18).string(message.detail); | ||
@@ -397,4 +390,4 @@ } | ||
const message = createBaseDebugInfo(); | ||
message.stackEntries = object.stackEntries?.map(e => e) || []; | ||
message.detail = object.detail ?? ''; | ||
message.stackEntries = object.stackEntries?.map((e) => e) || []; | ||
message.detail = object.detail ?? ""; | ||
return message; | ||
@@ -407,12 +400,9 @@ }, | ||
function createBaseQuotaFailure(): QuotaFailure { | ||
return {$type: 'google.rpc.QuotaFailure', violations: []}; | ||
return { $type: "google.rpc.QuotaFailure", violations: [] }; | ||
} | ||
export const QuotaFailure = { | ||
$type: 'google.rpc.QuotaFailure' as const, | ||
$type: "google.rpc.QuotaFailure" as const, | ||
encode( | ||
message: QuotaFailure, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
encode(message: QuotaFailure, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
for (const v of message.violations) { | ||
@@ -432,5 +422,3 @@ QuotaFailure_Violation.encode(v!, writer.uint32(10).fork()).ldelim(); | ||
case 1: | ||
message.violations.push( | ||
QuotaFailure_Violation.decode(reader, reader.uint32()), | ||
); | ||
message.violations.push(QuotaFailure_Violation.decode(reader, reader.uint32())); | ||
break; | ||
@@ -447,4 +435,3 @@ default: | ||
const message = createBaseQuotaFailure(); | ||
message.violations = | ||
object.violations?.map(e => QuotaFailure_Violation.fromPartial(e)) || []; | ||
message.violations = object.violations?.map((e) => QuotaFailure_Violation.fromPartial(e)) || []; | ||
return message; | ||
@@ -457,20 +444,13 @@ }, | ||
function createBaseQuotaFailure_Violation(): QuotaFailure_Violation { | ||
return { | ||
$type: 'google.rpc.QuotaFailure.Violation', | ||
subject: '', | ||
description: '', | ||
}; | ||
return { $type: "google.rpc.QuotaFailure.Violation", subject: "", description: "" }; | ||
} | ||
export const QuotaFailure_Violation = { | ||
$type: 'google.rpc.QuotaFailure.Violation' as const, | ||
$type: "google.rpc.QuotaFailure.Violation" as const, | ||
encode( | ||
message: QuotaFailure_Violation, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.subject !== '') { | ||
encode(message: QuotaFailure_Violation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.subject !== "") { | ||
writer.uint32(10).string(message.subject); | ||
} | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(18).string(message.description); | ||
@@ -481,6 +461,3 @@ } | ||
decode( | ||
input: _m0.Reader | Uint8Array, | ||
length?: number, | ||
): QuotaFailure_Violation { | ||
decode(input: _m0.Reader | Uint8Array, length?: number): QuotaFailure_Violation { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
@@ -506,8 +483,6 @@ let end = length === undefined ? reader.len : reader.pos + length; | ||
fromPartial( | ||
object: DeepPartial<QuotaFailure_Violation>, | ||
): QuotaFailure_Violation { | ||
fromPartial(object: DeepPartial<QuotaFailure_Violation>): QuotaFailure_Violation { | ||
const message = createBaseQuotaFailure_Violation(); | ||
message.subject = object.subject ?? ''; | ||
message.description = object.description ?? ''; | ||
message.subject = object.subject ?? ""; | ||
message.description = object.description ?? ""; | ||
return message; | ||
@@ -520,16 +495,13 @@ }, | ||
function createBaseErrorInfo(): ErrorInfo { | ||
return {$type: 'google.rpc.ErrorInfo', reason: '', domain: '', metadata: {}}; | ||
return { $type: "google.rpc.ErrorInfo", reason: "", domain: "", metadata: {} }; | ||
} | ||
export const ErrorInfo = { | ||
$type: 'google.rpc.ErrorInfo' as const, | ||
$type: "google.rpc.ErrorInfo" as const, | ||
encode( | ||
message: ErrorInfo, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.reason !== '') { | ||
encode(message: ErrorInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.reason !== "") { | ||
writer.uint32(10).string(message.reason); | ||
} | ||
if (message.domain !== '') { | ||
if (message.domain !== "") { | ||
writer.uint32(18).string(message.domain); | ||
@@ -539,3 +511,3 @@ } | ||
ErrorInfo_MetadataEntry.encode( | ||
{$type: 'google.rpc.ErrorInfo.MetadataEntry', key: key as any, value}, | ||
{ $type: "google.rpc.ErrorInfo.MetadataEntry", key: key as any, value }, | ||
writer.uint32(26).fork(), | ||
@@ -561,6 +533,3 @@ ).ldelim(); | ||
case 3: | ||
const entry3 = ErrorInfo_MetadataEntry.decode( | ||
reader, | ||
reader.uint32(), | ||
); | ||
const entry3 = ErrorInfo_MetadataEntry.decode(reader, reader.uint32()); | ||
if (entry3.value !== undefined) { | ||
@@ -580,7 +549,5 @@ message.metadata[entry3.key] = entry3.value; | ||
const message = createBaseErrorInfo(); | ||
message.reason = object.reason ?? ''; | ||
message.domain = object.domain ?? ''; | ||
message.metadata = Object.entries(object.metadata ?? {}).reduce<{ | ||
[key: string]: string; | ||
}>((acc, [key, value]) => { | ||
message.reason = object.reason ?? ""; | ||
message.domain = object.domain ?? ""; | ||
message.metadata = Object.entries(object.metadata ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => { | ||
if (value !== undefined) { | ||
@@ -598,16 +565,13 @@ acc[key] = String(value); | ||
function createBaseErrorInfo_MetadataEntry(): ErrorInfo_MetadataEntry { | ||
return {$type: 'google.rpc.ErrorInfo.MetadataEntry', key: '', value: ''}; | ||
return { $type: "google.rpc.ErrorInfo.MetadataEntry", key: "", value: "" }; | ||
} | ||
export const ErrorInfo_MetadataEntry = { | ||
$type: 'google.rpc.ErrorInfo.MetadataEntry' as const, | ||
$type: "google.rpc.ErrorInfo.MetadataEntry" as const, | ||
encode( | ||
message: ErrorInfo_MetadataEntry, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.key !== '') { | ||
encode(message: ErrorInfo_MetadataEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.key !== "") { | ||
writer.uint32(10).string(message.key); | ||
} | ||
if (message.value !== '') { | ||
if (message.value !== "") { | ||
writer.uint32(18).string(message.value); | ||
@@ -618,6 +582,3 @@ } | ||
decode( | ||
input: _m0.Reader | Uint8Array, | ||
length?: number, | ||
): ErrorInfo_MetadataEntry { | ||
decode(input: _m0.Reader | Uint8Array, length?: number): ErrorInfo_MetadataEntry { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
@@ -643,8 +604,6 @@ let end = length === undefined ? reader.len : reader.pos + length; | ||
fromPartial( | ||
object: DeepPartial<ErrorInfo_MetadataEntry>, | ||
): ErrorInfo_MetadataEntry { | ||
fromPartial(object: DeepPartial<ErrorInfo_MetadataEntry>): ErrorInfo_MetadataEntry { | ||
const message = createBaseErrorInfo_MetadataEntry(); | ||
message.key = object.key ?? ''; | ||
message.value = object.value ?? ''; | ||
message.key = object.key ?? ""; | ||
message.value = object.value ?? ""; | ||
return message; | ||
@@ -657,17 +616,11 @@ }, | ||
function createBasePreconditionFailure(): PreconditionFailure { | ||
return {$type: 'google.rpc.PreconditionFailure', violations: []}; | ||
return { $type: "google.rpc.PreconditionFailure", violations: [] }; | ||
} | ||
export const PreconditionFailure = { | ||
$type: 'google.rpc.PreconditionFailure' as const, | ||
$type: "google.rpc.PreconditionFailure" as const, | ||
encode( | ||
message: PreconditionFailure, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
encode(message: PreconditionFailure, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
for (const v of message.violations) { | ||
PreconditionFailure_Violation.encode( | ||
v!, | ||
writer.uint32(10).fork(), | ||
).ldelim(); | ||
PreconditionFailure_Violation.encode(v!, writer.uint32(10).fork()).ldelim(); | ||
} | ||
@@ -685,5 +638,3 @@ return writer; | ||
case 1: | ||
message.violations.push( | ||
PreconditionFailure_Violation.decode(reader, reader.uint32()), | ||
); | ||
message.violations.push(PreconditionFailure_Violation.decode(reader, reader.uint32())); | ||
break; | ||
@@ -700,6 +651,3 @@ default: | ||
const message = createBasePreconditionFailure(); | ||
message.violations = | ||
object.violations?.map(e => | ||
PreconditionFailure_Violation.fromPartial(e), | ||
) || []; | ||
message.violations = object.violations?.map((e) => PreconditionFailure_Violation.fromPartial(e)) || []; | ||
return message; | ||
@@ -712,24 +660,16 @@ }, | ||
function createBasePreconditionFailure_Violation(): PreconditionFailure_Violation { | ||
return { | ||
$type: 'google.rpc.PreconditionFailure.Violation', | ||
type: '', | ||
subject: '', | ||
description: '', | ||
}; | ||
return { $type: "google.rpc.PreconditionFailure.Violation", type: "", subject: "", description: "" }; | ||
} | ||
export const PreconditionFailure_Violation = { | ||
$type: 'google.rpc.PreconditionFailure.Violation' as const, | ||
$type: "google.rpc.PreconditionFailure.Violation" as const, | ||
encode( | ||
message: PreconditionFailure_Violation, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.type !== '') { | ||
encode(message: PreconditionFailure_Violation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.type !== "") { | ||
writer.uint32(10).string(message.type); | ||
} | ||
if (message.subject !== '') { | ||
if (message.subject !== "") { | ||
writer.uint32(18).string(message.subject); | ||
} | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(26).string(message.description); | ||
@@ -740,6 +680,3 @@ } | ||
decode( | ||
input: _m0.Reader | Uint8Array, | ||
length?: number, | ||
): PreconditionFailure_Violation { | ||
decode(input: _m0.Reader | Uint8Array, length?: number): PreconditionFailure_Violation { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
@@ -768,9 +705,7 @@ let end = length === undefined ? reader.len : reader.pos + length; | ||
fromPartial( | ||
object: DeepPartial<PreconditionFailure_Violation>, | ||
): PreconditionFailure_Violation { | ||
fromPartial(object: DeepPartial<PreconditionFailure_Violation>): PreconditionFailure_Violation { | ||
const message = createBasePreconditionFailure_Violation(); | ||
message.type = object.type ?? ''; | ||
message.subject = object.subject ?? ''; | ||
message.description = object.description ?? ''; | ||
message.type = object.type ?? ""; | ||
message.subject = object.subject ?? ""; | ||
message.description = object.description ?? ""; | ||
return message; | ||
@@ -780,18 +715,12 @@ }, | ||
messageTypeRegistry.set( | ||
PreconditionFailure_Violation.$type, | ||
PreconditionFailure_Violation, | ||
); | ||
messageTypeRegistry.set(PreconditionFailure_Violation.$type, PreconditionFailure_Violation); | ||
function createBaseBadRequest(): BadRequest { | ||
return {$type: 'google.rpc.BadRequest', fieldViolations: []}; | ||
return { $type: "google.rpc.BadRequest", fieldViolations: [] }; | ||
} | ||
export const BadRequest = { | ||
$type: 'google.rpc.BadRequest' as const, | ||
$type: "google.rpc.BadRequest" as const, | ||
encode( | ||
message: BadRequest, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
encode(message: BadRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
for (const v of message.fieldViolations) { | ||
@@ -811,5 +740,3 @@ BadRequest_FieldViolation.encode(v!, writer.uint32(10).fork()).ldelim(); | ||
case 1: | ||
message.fieldViolations.push( | ||
BadRequest_FieldViolation.decode(reader, reader.uint32()), | ||
); | ||
message.fieldViolations.push(BadRequest_FieldViolation.decode(reader, reader.uint32())); | ||
break; | ||
@@ -826,6 +753,3 @@ default: | ||
const message = createBaseBadRequest(); | ||
message.fieldViolations = | ||
object.fieldViolations?.map(e => | ||
BadRequest_FieldViolation.fromPartial(e), | ||
) || []; | ||
message.fieldViolations = object.fieldViolations?.map((e) => BadRequest_FieldViolation.fromPartial(e)) || []; | ||
return message; | ||
@@ -838,20 +762,13 @@ }, | ||
function createBaseBadRequest_FieldViolation(): BadRequest_FieldViolation { | ||
return { | ||
$type: 'google.rpc.BadRequest.FieldViolation', | ||
field: '', | ||
description: '', | ||
}; | ||
return { $type: "google.rpc.BadRequest.FieldViolation", field: "", description: "" }; | ||
} | ||
export const BadRequest_FieldViolation = { | ||
$type: 'google.rpc.BadRequest.FieldViolation' as const, | ||
$type: "google.rpc.BadRequest.FieldViolation" as const, | ||
encode( | ||
message: BadRequest_FieldViolation, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.field !== '') { | ||
encode(message: BadRequest_FieldViolation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.field !== "") { | ||
writer.uint32(10).string(message.field); | ||
} | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(18).string(message.description); | ||
@@ -862,6 +779,3 @@ } | ||
decode( | ||
input: _m0.Reader | Uint8Array, | ||
length?: number, | ||
): BadRequest_FieldViolation { | ||
decode(input: _m0.Reader | Uint8Array, length?: number): BadRequest_FieldViolation { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
@@ -887,8 +801,6 @@ let end = length === undefined ? reader.len : reader.pos + length; | ||
fromPartial( | ||
object: DeepPartial<BadRequest_FieldViolation>, | ||
): BadRequest_FieldViolation { | ||
fromPartial(object: DeepPartial<BadRequest_FieldViolation>): BadRequest_FieldViolation { | ||
const message = createBaseBadRequest_FieldViolation(); | ||
message.field = object.field ?? ''; | ||
message.description = object.description ?? ''; | ||
message.field = object.field ?? ""; | ||
message.description = object.description ?? ""; | ||
return message; | ||
@@ -898,22 +810,16 @@ }, | ||
messageTypeRegistry.set( | ||
BadRequest_FieldViolation.$type, | ||
BadRequest_FieldViolation, | ||
); | ||
messageTypeRegistry.set(BadRequest_FieldViolation.$type, BadRequest_FieldViolation); | ||
function createBaseRequestInfo(): RequestInfo { | ||
return {$type: 'google.rpc.RequestInfo', requestId: '', servingData: ''}; | ||
return { $type: "google.rpc.RequestInfo", requestId: "", servingData: "" }; | ||
} | ||
export const RequestInfo = { | ||
$type: 'google.rpc.RequestInfo' as const, | ||
$type: "google.rpc.RequestInfo" as const, | ||
encode( | ||
message: RequestInfo, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.requestId !== '') { | ||
encode(message: RequestInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.requestId !== "") { | ||
writer.uint32(10).string(message.requestId); | ||
} | ||
if (message.servingData !== '') { | ||
if (message.servingData !== "") { | ||
writer.uint32(18).string(message.servingData); | ||
@@ -947,4 +853,4 @@ } | ||
const message = createBaseRequestInfo(); | ||
message.requestId = object.requestId ?? ''; | ||
message.servingData = object.servingData ?? ''; | ||
message.requestId = object.requestId ?? ""; | ||
message.servingData = object.servingData ?? ""; | ||
return message; | ||
@@ -957,28 +863,19 @@ }, | ||
function createBaseResourceInfo(): ResourceInfo { | ||
return { | ||
$type: 'google.rpc.ResourceInfo', | ||
resourceType: '', | ||
resourceName: '', | ||
owner: '', | ||
description: '', | ||
}; | ||
return { $type: "google.rpc.ResourceInfo", resourceType: "", resourceName: "", owner: "", description: "" }; | ||
} | ||
export const ResourceInfo = { | ||
$type: 'google.rpc.ResourceInfo' as const, | ||
$type: "google.rpc.ResourceInfo" as const, | ||
encode( | ||
message: ResourceInfo, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.resourceType !== '') { | ||
encode(message: ResourceInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.resourceType !== "") { | ||
writer.uint32(10).string(message.resourceType); | ||
} | ||
if (message.resourceName !== '') { | ||
if (message.resourceName !== "") { | ||
writer.uint32(18).string(message.resourceName); | ||
} | ||
if (message.owner !== '') { | ||
if (message.owner !== "") { | ||
writer.uint32(26).string(message.owner); | ||
} | ||
if (message.description !== '') { | ||
if (message.description !== "") { | ||
writer.uint32(34).string(message.description); | ||
@@ -1018,6 +915,6 @@ } | ||
const message = createBaseResourceInfo(); | ||
message.resourceType = object.resourceType ?? ''; | ||
message.resourceName = object.resourceName ?? ''; | ||
message.owner = object.owner ?? ''; | ||
message.description = object.description ?? ''; | ||
message.resourceType = object.resourceType ?? ""; | ||
message.resourceName = object.resourceName ?? ""; | ||
message.owner = object.owner ?? ""; | ||
message.description = object.description ?? ""; | ||
return message; | ||
@@ -1030,7 +927,7 @@ }, | ||
function createBaseHelp(): Help { | ||
return {$type: 'google.rpc.Help', links: []}; | ||
return { $type: "google.rpc.Help", links: [] }; | ||
} | ||
export const Help = { | ||
$type: 'google.rpc.Help' as const, | ||
$type: "google.rpc.Help" as const, | ||
@@ -1064,3 +961,3 @@ encode(message: Help, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
const message = createBaseHelp(); | ||
message.links = object.links?.map(e => Help_Link.fromPartial(e)) || []; | ||
message.links = object.links?.map((e) => Help_Link.fromPartial(e)) || []; | ||
return message; | ||
@@ -1073,16 +970,13 @@ }, | ||
function createBaseHelp_Link(): Help_Link { | ||
return {$type: 'google.rpc.Help.Link', description: '', url: ''}; | ||
return { $type: "google.rpc.Help.Link", description: "", url: "" }; | ||
} | ||
export const Help_Link = { | ||
$type: 'google.rpc.Help.Link' as const, | ||
$type: "google.rpc.Help.Link" as const, | ||
encode( | ||
message: Help_Link, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.description !== '') { | ||
encode(message: Help_Link, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.description !== "") { | ||
writer.uint32(10).string(message.description); | ||
} | ||
if (message.url !== '') { | ||
if (message.url !== "") { | ||
writer.uint32(18).string(message.url); | ||
@@ -1116,4 +1010,4 @@ } | ||
const message = createBaseHelp_Link(); | ||
message.description = object.description ?? ''; | ||
message.url = object.url ?? ''; | ||
message.description = object.description ?? ""; | ||
message.url = object.url ?? ""; | ||
return message; | ||
@@ -1126,16 +1020,13 @@ }, | ||
function createBaseLocalizedMessage(): LocalizedMessage { | ||
return {$type: 'google.rpc.LocalizedMessage', locale: '', message: ''}; | ||
return { $type: "google.rpc.LocalizedMessage", locale: "", message: "" }; | ||
} | ||
export const LocalizedMessage = { | ||
$type: 'google.rpc.LocalizedMessage' as const, | ||
$type: "google.rpc.LocalizedMessage" as const, | ||
encode( | ||
message: LocalizedMessage, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
if (message.locale !== '') { | ||
encode(message: LocalizedMessage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.locale !== "") { | ||
writer.uint32(10).string(message.locale); | ||
} | ||
if (message.message !== '') { | ||
if (message.message !== "") { | ||
writer.uint32(18).string(message.message); | ||
@@ -1169,4 +1060,4 @@ } | ||
const message = createBaseLocalizedMessage(); | ||
message.locale = object.locale ?? ''; | ||
message.message = object.message ?? ''; | ||
message.locale = object.locale ?? ""; | ||
message.message = object.message ?? ""; | ||
return message; | ||
@@ -1178,19 +1069,7 @@ }, | ||
type Builtin = | ||
| Date | ||
| Function | ||
| Uint8Array | ||
| string | ||
| number | ||
| boolean | ||
| undefined; | ||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
export type DeepPartial<T> = T extends Builtin | ||
? T | ||
: T extends Array<infer U> | ||
? Array<DeepPartial<U>> | ||
: T extends ReadonlyArray<infer U> | ||
? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} | ||
? {[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>} | ||
export type DeepPartial<T> = T extends Builtin ? T | ||
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> } | ||
: Partial<T>; |
/* eslint-disable */ | ||
import {messageTypeRegistry} from '../../typeRegistry'; | ||
import {Any} from '../protobuf/any'; | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { messageTypeRegistry } from "../../typeRegistry"; | ||
import { Any } from "../protobuf/any"; | ||
export const protobufPackage = 'google.rpc'; | ||
export const protobufPackage = "google.rpc"; | ||
@@ -18,3 +18,3 @@ /** | ||
export interface Status { | ||
$type: 'google.rpc.Status'; | ||
$type: "google.rpc.Status"; | ||
/** The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. */ | ||
@@ -36,16 +36,13 @@ code: number; | ||
function createBaseStatus(): Status { | ||
return {$type: 'google.rpc.Status', code: 0, message: '', details: []}; | ||
return { $type: "google.rpc.Status", code: 0, message: "", details: [] }; | ||
} | ||
export const Status = { | ||
$type: 'google.rpc.Status' as const, | ||
$type: "google.rpc.Status" as const, | ||
encode( | ||
message: Status, | ||
writer: _m0.Writer = _m0.Writer.create(), | ||
): _m0.Writer { | ||
encode(message: Status, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.code !== 0) { | ||
writer.uint32(8).int32(message.code); | ||
} | ||
if (message.message !== '') { | ||
if (message.message !== "") { | ||
writer.uint32(18).string(message.message); | ||
@@ -86,4 +83,4 @@ } | ||
message.code = object.code ?? 0; | ||
message.message = object.message ?? ''; | ||
message.details = object.details?.map(e => Any.fromPartial(e)) || []; | ||
message.message = object.message ?? ""; | ||
message.details = object.details?.map((e) => Any.fromPartial(e)) || []; | ||
return message; | ||
@@ -95,19 +92,7 @@ }, | ||
type Builtin = | ||
| Date | ||
| Function | ||
| Uint8Array | ||
| string | ||
| number | ||
| boolean | ||
| undefined; | ||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
export type DeepPartial<T> = T extends Builtin | ||
? T | ||
: T extends Array<infer U> | ||
? Array<DeepPartial<U>> | ||
: T extends ReadonlyArray<infer U> | ||
? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} | ||
? {[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>} | ||
export type DeepPartial<T> = T extends Builtin ? T | ||
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> } | ||
: Partial<T>; |
/* eslint-disable */ | ||
import * as _m0 from 'protobufjs/minimal'; | ||
import * as _m0 from "protobufjs/minimal"; | ||
export interface MessageType<Message extends UnknownMessage = UnknownMessage> { | ||
$type: Message['$type']; | ||
$type: Message["$type"]; | ||
encode(message: Message, writer?: _m0.Writer): _m0.Writer; | ||
@@ -11,22 +11,10 @@ decode(input: _m0.Reader | Uint8Array, length?: number): Message; | ||
export type UnknownMessage = {$type: string}; | ||
export type UnknownMessage = { $type: string }; | ||
export const messageTypeRegistry = new Map<string, MessageType>(); | ||
type Builtin = | ||
| Date | ||
| Function | ||
| Uint8Array | ||
| string | ||
| number | ||
| boolean | ||
| undefined; | ||
export type DeepPartial<T> = T extends Builtin | ||
? T | ||
: T extends Array<infer U> | ||
? Array<DeepPartial<U>> | ||
: T extends ReadonlyArray<infer U> | ||
? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} | ||
? {[K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>} | ||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
export type DeepPartial<T> = T extends Builtin ? T | ||
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> } | ||
: Partial<T>; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159778
3156
+ Addedlong@5.2.3(transitive)
+ Addedprotobufjs@7.4.0(transitive)
- Removed@types/long@4.0.2(transitive)
- Removedlong@4.0.0(transitive)
- Removedprotobufjs@6.11.4(transitive)
Updatedprotobufjs@^7.1.2