@textile/buckets-grpc
Advanced tools
Comparing version 2.5.1 to 2.6.0-rc1
@@ -70,2 +70,11 @@ // package: api.bucketsd.pb | ||
type APIServicePushPaths = { | ||
readonly methodName: string; | ||
readonly service: typeof APIService; | ||
readonly requestStream: true; | ||
readonly responseStream: true; | ||
readonly requestType: typeof api_bucketsd_pb_bucketsd_pb.PushPathsRequest; | ||
readonly responseType: typeof api_bucketsd_pb_bucketsd_pb.PushPathsResponse; | ||
}; | ||
type APIServicePullPath = { | ||
@@ -188,2 +197,3 @@ readonly methodName: string; | ||
static readonly PushPath: APIServicePushPath; | ||
static readonly PushPaths: APIServicePushPaths; | ||
static readonly PullPath: APIServicePullPath; | ||
@@ -290,2 +300,3 @@ static readonly PullIpfsPath: APIServicePullIpfsPath; | ||
pushPath(metadata?: grpc.Metadata): BidirectionalStream<api_bucketsd_pb_bucketsd_pb.PushPathRequest, api_bucketsd_pb_bucketsd_pb.PushPathResponse>; | ||
pushPaths(metadata?: grpc.Metadata): BidirectionalStream<api_bucketsd_pb_bucketsd_pb.PushPathsRequest, api_bucketsd_pb_bucketsd_pb.PushPathsResponse>; | ||
pullPath(requestMessage: api_bucketsd_pb_bucketsd_pb.PullPathRequest, metadata?: grpc.Metadata): ResponseStream<api_bucketsd_pb_bucketsd_pb.PullPathResponse>; | ||
@@ -292,0 +303,0 @@ pullIpfsPath(requestMessage: api_bucketsd_pb_bucketsd_pb.PullIpfsPathRequest, metadata?: grpc.Metadata): ResponseStream<api_bucketsd_pb_bucketsd_pb.PullIpfsPathResponse>; |
@@ -76,2 +76,11 @@ // package: api.bucketsd.pb | ||
APIService.PushPaths = { | ||
methodName: "PushPaths", | ||
service: APIService, | ||
requestStream: true, | ||
responseStream: true, | ||
requestType: api_bucketsd_pb_bucketsd_pb.PushPathsRequest, | ||
responseType: api_bucketsd_pb_bucketsd_pb.PushPathsResponse | ||
}; | ||
APIService.PullPath = { | ||
@@ -423,2 +432,47 @@ methodName: "PullPath", | ||
APIServiceClient.prototype.pushPaths = function pushPaths(metadata) { | ||
var listeners = { | ||
data: [], | ||
end: [], | ||
status: [] | ||
}; | ||
var client = grpc.client(APIService.PushPaths, { | ||
host: this.serviceHost, | ||
metadata: metadata, | ||
transport: this.options.transport | ||
}); | ||
client.onEnd(function (status, statusMessage, trailers) { | ||
listeners.status.forEach(function (handler) { | ||
handler({ code: status, details: statusMessage, metadata: trailers }); | ||
}); | ||
listeners.end.forEach(function (handler) { | ||
handler({ code: status, details: statusMessage, metadata: trailers }); | ||
}); | ||
listeners = null; | ||
}); | ||
client.onMessage(function (message) { | ||
listeners.data.forEach(function (handler) { | ||
handler(message); | ||
}) | ||
}); | ||
client.start(metadata); | ||
return { | ||
on: function (type, handler) { | ||
listeners[type].push(handler); | ||
return this; | ||
}, | ||
write: function (requestMessage) { | ||
client.send(requestMessage); | ||
return this; | ||
}, | ||
end: function () { | ||
client.finishSend(); | ||
}, | ||
cancel: function () { | ||
listeners = null; | ||
client.close(); | ||
} | ||
}; | ||
}; | ||
APIServiceClient.prototype.pullPath = function pullPath(requestMessage, metadata) { | ||
@@ -425,0 +479,0 @@ var listeners = { |
@@ -12,2 +12,5 @@ // package: api.bucketsd.pb | ||
getKey(): string; | ||
setKey(value: string): void; | ||
serializeBinary(): Uint8Array; | ||
@@ -27,2 +30,3 @@ toObject(includeInstance?: boolean): Metadata.AsObject; | ||
updatedAt: number, | ||
key: string, | ||
} | ||
@@ -61,2 +65,12 @@ } | ||
getLinkKey(): string; | ||
setLinkKey(value: string): void; | ||
getPathMetadataMap(): jspb.Map<string, Metadata>; | ||
clearPathMetadataMap(): void; | ||
hasArchives(): boolean; | ||
clearArchives(): void; | ||
getArchives(): Archives | undefined; | ||
setArchives(value?: Archives): void; | ||
serializeBinary(): Uint8Array; | ||
@@ -83,2 +97,5 @@ toObject(includeInstance?: boolean): Root.AsObject; | ||
metadata?: Metadata.AsObject, | ||
linkKey: string, | ||
pathMetadataMap: Array<[string, Metadata.AsObject]>, | ||
archives?: Archives.AsObject, | ||
} | ||
@@ -135,2 +152,5 @@ } | ||
getUnfreeze(): boolean; | ||
setUnfreeze(value: boolean): void; | ||
serializeBinary(): Uint8Array; | ||
@@ -151,2 +171,3 @@ toObject(includeInstance?: boolean): CreateRequest.AsObject; | ||
pb_private: boolean, | ||
unfreeze: boolean, | ||
} | ||
@@ -177,2 +198,5 @@ } | ||
getRetrievalId(): string; | ||
setRetrievalId(value: string): void; | ||
serializeBinary(): Uint8Array; | ||
@@ -195,2 +219,3 @@ toObject(includeInstance?: boolean): CreateResponse.AsObject; | ||
pinned: number, | ||
retrievalId: string, | ||
} | ||
@@ -568,2 +593,125 @@ } | ||
export class PushPathsRequest extends jspb.Message { | ||
hasHeader(): boolean; | ||
clearHeader(): void; | ||
getHeader(): PushPathsRequest.Header | undefined; | ||
setHeader(value?: PushPathsRequest.Header): void; | ||
hasChunk(): boolean; | ||
clearChunk(): void; | ||
getChunk(): PushPathsRequest.Chunk | undefined; | ||
setChunk(value?: PushPathsRequest.Chunk): void; | ||
getPayloadCase(): PushPathsRequest.PayloadCase; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): PushPathsRequest.AsObject; | ||
static toObject(includeInstance: boolean, msg: PushPathsRequest): PushPathsRequest.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: PushPathsRequest, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): PushPathsRequest; | ||
static deserializeBinaryFromReader(message: PushPathsRequest, reader: jspb.BinaryReader): PushPathsRequest; | ||
} | ||
export namespace PushPathsRequest { | ||
export type AsObject = { | ||
header?: PushPathsRequest.Header.AsObject, | ||
chunk?: PushPathsRequest.Chunk.AsObject, | ||
} | ||
export class Header extends jspb.Message { | ||
getKey(): string; | ||
setKey(value: string): void; | ||
getRoot(): string; | ||
setRoot(value: string): void; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): Header.AsObject; | ||
static toObject(includeInstance: boolean, msg: Header): Header.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): Header; | ||
static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; | ||
} | ||
export namespace Header { | ||
export type AsObject = { | ||
key: string, | ||
root: string, | ||
} | ||
} | ||
export class Chunk extends jspb.Message { | ||
getPath(): string; | ||
setPath(value: string): void; | ||
getData(): Uint8Array | string; | ||
getData_asU8(): Uint8Array; | ||
getData_asB64(): string; | ||
setData(value: Uint8Array | string): void; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): Chunk.AsObject; | ||
static toObject(includeInstance: boolean, msg: Chunk): Chunk.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: Chunk, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): Chunk; | ||
static deserializeBinaryFromReader(message: Chunk, reader: jspb.BinaryReader): Chunk; | ||
} | ||
export namespace Chunk { | ||
export type AsObject = { | ||
path: string, | ||
data: Uint8Array | string, | ||
} | ||
} | ||
export enum PayloadCase { | ||
PAYLOAD_NOT_SET = 0, | ||
HEADER = 1, | ||
CHUNK = 2, | ||
} | ||
} | ||
export class PushPathsResponse extends jspb.Message { | ||
getPath(): string; | ||
setPath(value: string): void; | ||
getCid(): string; | ||
setCid(value: string): void; | ||
getSize(): number; | ||
setSize(value: number): void; | ||
getPinned(): number; | ||
setPinned(value: number): void; | ||
hasRoot(): boolean; | ||
clearRoot(): void; | ||
getRoot(): Root | undefined; | ||
setRoot(value?: Root): void; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): PushPathsResponse.AsObject; | ||
static toObject(includeInstance: boolean, msg: PushPathsResponse): PushPathsResponse.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: PushPathsResponse, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): PushPathsResponse; | ||
static deserializeBinaryFromReader(message: PushPathsResponse, reader: jspb.BinaryReader): PushPathsResponse; | ||
} | ||
export namespace PushPathsResponse { | ||
export type AsObject = { | ||
path: string, | ||
cid: string, | ||
size: number, | ||
pinned: number, | ||
root?: Root.AsObject, | ||
} | ||
} | ||
export class PullPathRequest extends jspb.Message { | ||
@@ -949,2 +1097,30 @@ getKey(): string; | ||
export class Archives extends jspb.Message { | ||
hasCurrent(): boolean; | ||
clearCurrent(): void; | ||
getCurrent(): Archive | undefined; | ||
setCurrent(value?: Archive): void; | ||
clearHistoryList(): void; | ||
getHistoryList(): Array<Archive>; | ||
setHistoryList(value: Array<Archive>): void; | ||
addHistory(value?: Archive, index?: number): Archive; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): Archives.AsObject; | ||
static toObject(includeInstance: boolean, msg: Archives): Archives.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: Archives, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): Archives; | ||
static deserializeBinaryFromReader(message: Archives, reader: jspb.BinaryReader): Archives; | ||
} | ||
export namespace Archives { | ||
export type AsObject = { | ||
current?: Archive.AsObject, | ||
historyList: Array<Archive.AsObject>, | ||
} | ||
} | ||
export class Archive extends jspb.Message { | ||
@@ -951,0 +1127,0 @@ getCid(): string; |
{ | ||
"name": "@textile/buckets-grpc", | ||
"version": "2.5.1", | ||
"version": "2.6.0-rc1", | ||
"description": "A client for interacting with the Textile Buckets gRPC API.", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
442626
12259
2