@otonoma/paranet-client 2.14.0 → 2.15.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +0 -1
- package/dist/proto/broker_api.d.ts +1 -5
- package/dist/proto/broker_api.d.ts.map +1 -1
- package/dist/proto/broker_api.js +0 -4
- package/dist/proto/pncp.d.ts +1 -12
- package/dist/proto/pncp.d.ts.map +1 -1
- package/dist/proto/pncp.js +1 -13
- package/package.json +25 -6
- package/src/client.ts +0 -701
- package/src/graphql.ts +0 -103
- package/src/index.ts +0 -16
- package/src/pncp.ts +0 -237
- package/src/proto/broker.grpc.client.ts +0 -193
- package/src/proto/broker.grpc.ts +0 -32
- package/src/proto/broker_api.ts +0 -807
- package/src/proto/google/protobuf/descriptor.ts +0 -4874
- package/src/proto/google/protobuf/timestamp.ts +0 -288
- package/src/proto/grpc/health/v1/health.client.ts +0 -106
- package/src/proto/grpc/health/v1/health.ts +0 -174
- package/src/proto/identifiers.ts +0 -176
- package/src/proto/mediums.ts +0 -168
- package/src/proto/observation.ts +0 -636
- package/src/proto/otonoma/common/value.ts +0 -334
- package/src/proto/pncp.ts +0 -1333
- package/src/schema/paranet.ts +0 -353
- package/src/util.ts +0 -129
- package/tsconfig.json +0 -27
package/src/proto/identifiers.ts
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.4
|
|
2
|
-
// @generated from protobuf file "identifiers.proto" (package "pncp.v1", syntax proto3)
|
|
3
|
-
// tslint:disable
|
|
4
|
-
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
|
-
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
6
|
-
import { WireType } from "@protobuf-ts/runtime";
|
|
7
|
-
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
8
|
-
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
9
|
-
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
10
|
-
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
|
-
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
|
-
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
-
/**
|
|
14
|
-
* Identifier type for conversations.
|
|
15
|
-
* This type encapsulates the conversation ID and the membership of the recipient of the particular message.
|
|
16
|
-
* Membership is restricted to a known set.
|
|
17
|
-
*
|
|
18
|
-
* @generated from protobuf message pncp.v1.ConversationId
|
|
19
|
-
*/
|
|
20
|
-
export interface ConversationId {
|
|
21
|
-
/**
|
|
22
|
-
* @generated from protobuf field: string id = 1;
|
|
23
|
-
*/
|
|
24
|
-
id: string;
|
|
25
|
-
/**
|
|
26
|
-
* @generated from protobuf field: pncp.v1.ConversationMembership membership = 2;
|
|
27
|
-
*/
|
|
28
|
-
membership: ConversationMembership;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* EntityId is a versioned id for any paranet identity.
|
|
32
|
-
*
|
|
33
|
-
* @generated from protobuf message pncp.v1.EntityId
|
|
34
|
-
*/
|
|
35
|
-
export interface EntityId {
|
|
36
|
-
/**
|
|
37
|
-
* A unique ID associated with an entity.
|
|
38
|
-
*
|
|
39
|
-
* @generated from protobuf field: string id = 1;
|
|
40
|
-
*/
|
|
41
|
-
id: string;
|
|
42
|
-
/**
|
|
43
|
-
* This is a packed semver version string. We could expand this out, but there is a lot of
|
|
44
|
-
* complexity in semver, it is best to leave it as a string and use a library to parse it internally.
|
|
45
|
-
*
|
|
46
|
-
* @generated from protobuf field: string version = 2;
|
|
47
|
-
*/
|
|
48
|
-
version: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @generated from protobuf enum pncp.v1.ConversationMembership
|
|
52
|
-
*/
|
|
53
|
-
export enum ConversationMembership {
|
|
54
|
-
/**
|
|
55
|
-
* @generated from protobuf enum value: REQUESTER = 0;
|
|
56
|
-
*/
|
|
57
|
-
REQUESTER = 0,
|
|
58
|
-
/**
|
|
59
|
-
* @generated from protobuf enum value: FULFILLER = 1;
|
|
60
|
-
*/
|
|
61
|
-
FULFILLER = 1,
|
|
62
|
-
/**
|
|
63
|
-
* @generated from protobuf enum value: OBSERVER = 2;
|
|
64
|
-
*/
|
|
65
|
-
OBSERVER = 2
|
|
66
|
-
}
|
|
67
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
68
|
-
class ConversationId$Type extends MessageType<ConversationId> {
|
|
69
|
-
constructor() {
|
|
70
|
-
super("pncp.v1.ConversationId", [
|
|
71
|
-
{ no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
72
|
-
{ no: 2, name: "membership", kind: "enum", T: () => ["pncp.v1.ConversationMembership", ConversationMembership] }
|
|
73
|
-
]);
|
|
74
|
-
}
|
|
75
|
-
create(value?: PartialMessage<ConversationId>): ConversationId {
|
|
76
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
77
|
-
message.id = "";
|
|
78
|
-
message.membership = 0;
|
|
79
|
-
if (value !== undefined)
|
|
80
|
-
reflectionMergePartial<ConversationId>(this, message, value);
|
|
81
|
-
return message;
|
|
82
|
-
}
|
|
83
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConversationId): ConversationId {
|
|
84
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
85
|
-
while (reader.pos < end) {
|
|
86
|
-
let [fieldNo, wireType] = reader.tag();
|
|
87
|
-
switch (fieldNo) {
|
|
88
|
-
case /* string id */ 1:
|
|
89
|
-
message.id = reader.string();
|
|
90
|
-
break;
|
|
91
|
-
case /* pncp.v1.ConversationMembership membership */ 2:
|
|
92
|
-
message.membership = reader.int32();
|
|
93
|
-
break;
|
|
94
|
-
default:
|
|
95
|
-
let u = options.readUnknownField;
|
|
96
|
-
if (u === "throw")
|
|
97
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
98
|
-
let d = reader.skip(wireType);
|
|
99
|
-
if (u !== false)
|
|
100
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return message;
|
|
104
|
-
}
|
|
105
|
-
internalBinaryWrite(message: ConversationId, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
106
|
-
/* string id = 1; */
|
|
107
|
-
if (message.id !== "")
|
|
108
|
-
writer.tag(1, WireType.LengthDelimited).string(message.id);
|
|
109
|
-
/* pncp.v1.ConversationMembership membership = 2; */
|
|
110
|
-
if (message.membership !== 0)
|
|
111
|
-
writer.tag(2, WireType.Varint).int32(message.membership);
|
|
112
|
-
let u = options.writeUnknownFields;
|
|
113
|
-
if (u !== false)
|
|
114
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
115
|
-
return writer;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* @generated MessageType for protobuf message pncp.v1.ConversationId
|
|
120
|
-
*/
|
|
121
|
-
export const ConversationId = new ConversationId$Type();
|
|
122
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
123
|
-
class EntityId$Type extends MessageType<EntityId> {
|
|
124
|
-
constructor() {
|
|
125
|
-
super("pncp.v1.EntityId", [
|
|
126
|
-
{ no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
127
|
-
{ no: 2, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
128
|
-
]);
|
|
129
|
-
}
|
|
130
|
-
create(value?: PartialMessage<EntityId>): EntityId {
|
|
131
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
132
|
-
message.id = "";
|
|
133
|
-
message.version = "";
|
|
134
|
-
if (value !== undefined)
|
|
135
|
-
reflectionMergePartial<EntityId>(this, message, value);
|
|
136
|
-
return message;
|
|
137
|
-
}
|
|
138
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EntityId): EntityId {
|
|
139
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
140
|
-
while (reader.pos < end) {
|
|
141
|
-
let [fieldNo, wireType] = reader.tag();
|
|
142
|
-
switch (fieldNo) {
|
|
143
|
-
case /* string id */ 1:
|
|
144
|
-
message.id = reader.string();
|
|
145
|
-
break;
|
|
146
|
-
case /* string version */ 2:
|
|
147
|
-
message.version = reader.string();
|
|
148
|
-
break;
|
|
149
|
-
default:
|
|
150
|
-
let u = options.readUnknownField;
|
|
151
|
-
if (u === "throw")
|
|
152
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
153
|
-
let d = reader.skip(wireType);
|
|
154
|
-
if (u !== false)
|
|
155
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return message;
|
|
159
|
-
}
|
|
160
|
-
internalBinaryWrite(message: EntityId, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
161
|
-
/* string id = 1; */
|
|
162
|
-
if (message.id !== "")
|
|
163
|
-
writer.tag(1, WireType.LengthDelimited).string(message.id);
|
|
164
|
-
/* string version = 2; */
|
|
165
|
-
if (message.version !== "")
|
|
166
|
-
writer.tag(2, WireType.LengthDelimited).string(message.version);
|
|
167
|
-
let u = options.writeUnknownFields;
|
|
168
|
-
if (u !== false)
|
|
169
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
170
|
-
return writer;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* @generated MessageType for protobuf message pncp.v1.EntityId
|
|
175
|
-
*/
|
|
176
|
-
export const EntityId = new EntityId$Type();
|
package/src/proto/mediums.ts
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.4
|
|
2
|
-
// @generated from protobuf file "mediums.proto" (package "pncp.v1", syntax proto3)
|
|
3
|
-
// tslint:disable
|
|
4
|
-
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
|
-
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
6
|
-
import { WireType } from "@protobuf-ts/runtime";
|
|
7
|
-
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
8
|
-
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
9
|
-
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
10
|
-
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
|
-
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
|
-
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
-
import { PncpMessage } from "./pncp";
|
|
14
|
-
import { Value } from "./otonoma/common/value";
|
|
15
|
-
import { ConversationId } from "./identifiers";
|
|
16
|
-
/**
|
|
17
|
-
* @generated from protobuf message pncp.v1.KeyOrId
|
|
18
|
-
*/
|
|
19
|
-
export interface KeyOrId {
|
|
20
|
-
/**
|
|
21
|
-
* @generated from protobuf oneof: body
|
|
22
|
-
*/
|
|
23
|
-
body: {
|
|
24
|
-
oneofKind: "id";
|
|
25
|
-
/**
|
|
26
|
-
* @generated from protobuf field: pncp.v1.ConversationId id = 1;
|
|
27
|
-
*/
|
|
28
|
-
id: ConversationId;
|
|
29
|
-
} | {
|
|
30
|
-
oneofKind: "key";
|
|
31
|
-
/**
|
|
32
|
-
* @generated from protobuf field: otonoma.common.Value key = 2;
|
|
33
|
-
*/
|
|
34
|
-
key: Value;
|
|
35
|
-
} | {
|
|
36
|
-
oneofKind: undefined;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* A PNCP message received from a medium.
|
|
41
|
-
*
|
|
42
|
-
* @generated from protobuf message pncp.v1.PncpMediumMessage
|
|
43
|
-
*/
|
|
44
|
-
export interface PncpMediumMessage {
|
|
45
|
-
/**
|
|
46
|
-
* @generated from protobuf field: pncp.v1.KeyOrId conversation = 1;
|
|
47
|
-
*/
|
|
48
|
-
conversation?: KeyOrId;
|
|
49
|
-
/**
|
|
50
|
-
* The id field in this case can be empty.
|
|
51
|
-
*
|
|
52
|
-
* @generated from protobuf field: pncp.v1.PncpMessage pncp = 2;
|
|
53
|
-
*/
|
|
54
|
-
pncp?: PncpMessage;
|
|
55
|
-
}
|
|
56
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
57
|
-
class KeyOrId$Type extends MessageType<KeyOrId> {
|
|
58
|
-
constructor() {
|
|
59
|
-
super("pncp.v1.KeyOrId", [
|
|
60
|
-
{ no: 1, name: "id", kind: "message", oneof: "body", T: () => ConversationId },
|
|
61
|
-
{ no: 2, name: "key", kind: "message", oneof: "body", T: () => Value }
|
|
62
|
-
]);
|
|
63
|
-
}
|
|
64
|
-
create(value?: PartialMessage<KeyOrId>): KeyOrId {
|
|
65
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
66
|
-
message.body = { oneofKind: undefined };
|
|
67
|
-
if (value !== undefined)
|
|
68
|
-
reflectionMergePartial<KeyOrId>(this, message, value);
|
|
69
|
-
return message;
|
|
70
|
-
}
|
|
71
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KeyOrId): KeyOrId {
|
|
72
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
73
|
-
while (reader.pos < end) {
|
|
74
|
-
let [fieldNo, wireType] = reader.tag();
|
|
75
|
-
switch (fieldNo) {
|
|
76
|
-
case /* pncp.v1.ConversationId id */ 1:
|
|
77
|
-
message.body = {
|
|
78
|
-
oneofKind: "id",
|
|
79
|
-
id: ConversationId.internalBinaryRead(reader, reader.uint32(), options, (message.body as any).id)
|
|
80
|
-
};
|
|
81
|
-
break;
|
|
82
|
-
case /* otonoma.common.Value key */ 2:
|
|
83
|
-
message.body = {
|
|
84
|
-
oneofKind: "key",
|
|
85
|
-
key: Value.internalBinaryRead(reader, reader.uint32(), options, (message.body as any).key)
|
|
86
|
-
};
|
|
87
|
-
break;
|
|
88
|
-
default:
|
|
89
|
-
let u = options.readUnknownField;
|
|
90
|
-
if (u === "throw")
|
|
91
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
92
|
-
let d = reader.skip(wireType);
|
|
93
|
-
if (u !== false)
|
|
94
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return message;
|
|
98
|
-
}
|
|
99
|
-
internalBinaryWrite(message: KeyOrId, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
100
|
-
/* pncp.v1.ConversationId id = 1; */
|
|
101
|
-
if (message.body.oneofKind === "id")
|
|
102
|
-
ConversationId.internalBinaryWrite(message.body.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
103
|
-
/* otonoma.common.Value key = 2; */
|
|
104
|
-
if (message.body.oneofKind === "key")
|
|
105
|
-
Value.internalBinaryWrite(message.body.key, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
106
|
-
let u = options.writeUnknownFields;
|
|
107
|
-
if (u !== false)
|
|
108
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
109
|
-
return writer;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* @generated MessageType for protobuf message pncp.v1.KeyOrId
|
|
114
|
-
*/
|
|
115
|
-
export const KeyOrId = new KeyOrId$Type();
|
|
116
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
117
|
-
class PncpMediumMessage$Type extends MessageType<PncpMediumMessage> {
|
|
118
|
-
constructor() {
|
|
119
|
-
super("pncp.v1.PncpMediumMessage", [
|
|
120
|
-
{ no: 1, name: "conversation", kind: "message", T: () => KeyOrId },
|
|
121
|
-
{ no: 2, name: "pncp", kind: "message", T: () => PncpMessage }
|
|
122
|
-
]);
|
|
123
|
-
}
|
|
124
|
-
create(value?: PartialMessage<PncpMediumMessage>): PncpMediumMessage {
|
|
125
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
126
|
-
if (value !== undefined)
|
|
127
|
-
reflectionMergePartial<PncpMediumMessage>(this, message, value);
|
|
128
|
-
return message;
|
|
129
|
-
}
|
|
130
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpMediumMessage): PncpMediumMessage {
|
|
131
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
132
|
-
while (reader.pos < end) {
|
|
133
|
-
let [fieldNo, wireType] = reader.tag();
|
|
134
|
-
switch (fieldNo) {
|
|
135
|
-
case /* pncp.v1.KeyOrId conversation */ 1:
|
|
136
|
-
message.conversation = KeyOrId.internalBinaryRead(reader, reader.uint32(), options, message.conversation);
|
|
137
|
-
break;
|
|
138
|
-
case /* pncp.v1.PncpMessage pncp */ 2:
|
|
139
|
-
message.pncp = PncpMessage.internalBinaryRead(reader, reader.uint32(), options, message.pncp);
|
|
140
|
-
break;
|
|
141
|
-
default:
|
|
142
|
-
let u = options.readUnknownField;
|
|
143
|
-
if (u === "throw")
|
|
144
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
145
|
-
let d = reader.skip(wireType);
|
|
146
|
-
if (u !== false)
|
|
147
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return message;
|
|
151
|
-
}
|
|
152
|
-
internalBinaryWrite(message: PncpMediumMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
153
|
-
/* pncp.v1.KeyOrId conversation = 1; */
|
|
154
|
-
if (message.conversation)
|
|
155
|
-
KeyOrId.internalBinaryWrite(message.conversation, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
156
|
-
/* pncp.v1.PncpMessage pncp = 2; */
|
|
157
|
-
if (message.pncp)
|
|
158
|
-
PncpMessage.internalBinaryWrite(message.pncp, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
159
|
-
let u = options.writeUnknownFields;
|
|
160
|
-
if (u !== false)
|
|
161
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
162
|
-
return writer;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* @generated MessageType for protobuf message pncp.v1.PncpMediumMessage
|
|
167
|
-
*/
|
|
168
|
-
export const PncpMediumMessage = new PncpMediumMessage$Type();
|