@otonoma/paranet-client 2.16.1 → 2.17.0-rc.12
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/cjs/client.d.ts +3 -0
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/{index-Dz-_ygkd.cjs → index-eBiJ1Egw.cjs} +194 -70
- package/dist/cjs/index-eBiJ1Egw.cjs.map +1 -0
- package/dist/cjs/index.cjs +32 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/pncp.d.ts +3 -0
- package/dist/cjs/pncp.d.ts.map +1 -1
- package/dist/cjs/proto/pncp.d.ts +18 -0
- package/dist/cjs/proto/pncp.d.ts.map +1 -1
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -0
- package/dist/esm/client.d.ts +3 -0
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/{index-CO5PSAqf.mjs → index-PztyZob7.mjs} +194 -70
- package/dist/esm/index-PztyZob7.mjs.map +1 -0
- package/dist/esm/index.mjs +32 -4
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/pncp.d.ts +3 -0
- package/dist/esm/pncp.d.ts.map +1 -1
- package/dist/esm/proto/pncp.d.ts +18 -0
- package/dist/esm/proto/pncp.d.ts.map +1 -1
- package/dist/index.d.cts +24 -0
- package/dist/index.d.mts +24 -0
- package/dist/pncp.d.ts +3 -0
- package/dist/pncp.d.ts.map +1 -1
- package/dist/pncp.js +2 -0
- package/dist/proto/pncp.d.ts +18 -0
- package/dist/proto/pncp.d.ts.map +1 -1
- package/dist/proto/pncp.js +24 -3
- package/package.json +1 -1
- package/dist/cjs/index-Dz-_ygkd.cjs.map +0 -1
- package/dist/esm/index-CO5PSAqf.mjs.map +0 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -3643,7 +3643,8 @@ class PncpRequest$Type extends MessageType {
|
|
|
3643
3643
|
{ no: 8, name: "key", kind: "message", T: () => Value },
|
|
3644
3644
|
{ no: 9, name: "medium_info", kind: "message", T: () => PncpRequestMediumInfo },
|
|
3645
3645
|
{ no: 10, name: "must_match", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
3646
|
-
{ no: 11, name: "use_lock", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
3646
|
+
{ no: 11, name: "use_lock", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
3647
|
+
{ no: 13, name: "partition", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
3647
3648
|
]);
|
|
3648
3649
|
}
|
|
3649
3650
|
create(value) {
|
|
@@ -3693,6 +3694,9 @@ class PncpRequest$Type extends MessageType {
|
|
|
3693
3694
|
case /* bool use_lock */ 11:
|
|
3694
3695
|
message.useLock = reader.bool();
|
|
3695
3696
|
break;
|
|
3697
|
+
case /* optional string partition */ 13:
|
|
3698
|
+
message.partition = reader.string();
|
|
3699
|
+
break;
|
|
3696
3700
|
default:
|
|
3697
3701
|
let u = options.readUnknownField;
|
|
3698
3702
|
if (u === "throw")
|
|
@@ -3738,6 +3742,9 @@ class PncpRequest$Type extends MessageType {
|
|
|
3738
3742
|
/* bool use_lock = 11; */
|
|
3739
3743
|
if (message.useLock !== false)
|
|
3740
3744
|
writer.tag(11, WireType.Varint).bool(message.useLock);
|
|
3745
|
+
/* optional string partition = 13; */
|
|
3746
|
+
if (message.partition !== undefined)
|
|
3747
|
+
writer.tag(13, WireType.LengthDelimited).string(message.partition);
|
|
3741
3748
|
let u = options.writeUnknownFields;
|
|
3742
3749
|
if (u !== false)
|
|
3743
3750
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -4132,7 +4139,8 @@ class PncpRequestCallback$Type extends MessageType {
|
|
|
4132
4139
|
{ no: 6, name: "author_id", kind: "message", T: () => EntityId },
|
|
4133
4140
|
{ no: 7, name: "target_actor_id", kind: "message", T: () => EntityId },
|
|
4134
4141
|
{ no: 8, name: "parameters", kind: "message", T: () => ParameterData },
|
|
4135
|
-
{ no: 9, name: "flags", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
|
|
4142
|
+
{ no: 9, name: "flags", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
4143
|
+
{ no: 10, name: "partition", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
4136
4144
|
]);
|
|
4137
4145
|
}
|
|
4138
4146
|
create(value) {
|
|
@@ -4175,6 +4183,9 @@ class PncpRequestCallback$Type extends MessageType {
|
|
|
4175
4183
|
case /* uint32 flags */ 9:
|
|
4176
4184
|
message.flags = reader.uint32();
|
|
4177
4185
|
break;
|
|
4186
|
+
case /* optional string partition */ 10:
|
|
4187
|
+
message.partition = reader.string();
|
|
4188
|
+
break;
|
|
4178
4189
|
default:
|
|
4179
4190
|
let u = options.readUnknownField;
|
|
4180
4191
|
if (u === "throw")
|
|
@@ -4214,6 +4225,9 @@ class PncpRequestCallback$Type extends MessageType {
|
|
|
4214
4225
|
/* uint32 flags = 9; */
|
|
4215
4226
|
if (message.flags !== 0)
|
|
4216
4227
|
writer.tag(9, WireType.Varint).uint32(message.flags);
|
|
4228
|
+
/* optional string partition = 10; */
|
|
4229
|
+
if (message.partition !== undefined)
|
|
4230
|
+
writer.tag(10, WireType.LengthDelimited).string(message.partition);
|
|
4217
4231
|
let u = options.writeUnknownFields;
|
|
4218
4232
|
if (u !== false)
|
|
4219
4233
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -4236,7 +4250,8 @@ class PncpMessageCallback$Type extends MessageType {
|
|
|
4236
4250
|
{ no: 6, name: "params", kind: "message", T: () => Value },
|
|
4237
4251
|
{ no: 7, name: "callback", kind: "message", T: () => Value },
|
|
4238
4252
|
{ no: 8, name: "medium", kind: "message", T: () => Value },
|
|
4239
|
-
{ no: 9, name: "conversation_state", kind: "enum", T: () => ["pncp.v1.ConversationState", ConversationState] }
|
|
4253
|
+
{ no: 9, name: "conversation_state", kind: "enum", T: () => ["pncp.v1.ConversationState", ConversationState] },
|
|
4254
|
+
{ no: 10, name: "partition", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
4240
4255
|
]);
|
|
4241
4256
|
}
|
|
4242
4257
|
create(value) {
|
|
@@ -4279,6 +4294,9 @@ class PncpMessageCallback$Type extends MessageType {
|
|
|
4279
4294
|
case /* pncp.v1.ConversationState conversation_state */ 9:
|
|
4280
4295
|
message.conversationState = reader.int32();
|
|
4281
4296
|
break;
|
|
4297
|
+
case /* optional string partition */ 10:
|
|
4298
|
+
message.partition = reader.string();
|
|
4299
|
+
break;
|
|
4282
4300
|
default:
|
|
4283
4301
|
let u = options.readUnknownField;
|
|
4284
4302
|
if (u === "throw")
|
|
@@ -4318,6 +4336,9 @@ class PncpMessageCallback$Type extends MessageType {
|
|
|
4318
4336
|
/* pncp.v1.ConversationState conversation_state = 9; */
|
|
4319
4337
|
if (message.conversationState !== 0)
|
|
4320
4338
|
writer.tag(9, WireType.Varint).int32(message.conversationState);
|
|
4339
|
+
/* optional string partition = 10; */
|
|
4340
|
+
if (message.partition !== undefined)
|
|
4341
|
+
writer.tag(10, WireType.LengthDelimited).string(message.partition);
|
|
4321
4342
|
let u = options.writeUnknownFields;
|
|
4322
4343
|
if (u !== false)
|
|
4323
4344
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -7152,7 +7173,7 @@ class HealthClient {
|
|
|
7152
7173
|
let undiciModule = null;
|
|
7153
7174
|
async function getUndici() {
|
|
7154
7175
|
if (!undiciModule) {
|
|
7155
|
-
undiciModule = await import('./index-
|
|
7176
|
+
undiciModule = await import('./index-PztyZob7.mjs').then(function (n) { return n.i; });
|
|
7156
7177
|
}
|
|
7157
7178
|
return undiciModule;
|
|
7158
7179
|
}
|
|
@@ -7161,6 +7182,7 @@ class PncpClient {
|
|
|
7161
7182
|
this.actorId = init.actorId;
|
|
7162
7183
|
this.endpoint = init.endpoint;
|
|
7163
7184
|
this.actorVersion = init.actorVersion;
|
|
7185
|
+
this.defaultPartition = init.defaultPartition;
|
|
7164
7186
|
var fetchFn = init.fetch;
|
|
7165
7187
|
// Note: insecure TLS bypass only works in Node.js with undici
|
|
7166
7188
|
// In browser environments, insecure mode is ignored (browsers don't allow TLS bypass)
|
|
@@ -7190,6 +7212,9 @@ class PncpClient {
|
|
|
7190
7212
|
const data = await response.response;
|
|
7191
7213
|
return data.status === HealthCheckResponse_ServingStatus.SERVING;
|
|
7192
7214
|
}
|
|
7215
|
+
setDefaultPartition(partition) {
|
|
7216
|
+
this.defaultPartition = partition;
|
|
7217
|
+
}
|
|
7193
7218
|
async pncpRequest(req) {
|
|
7194
7219
|
let version = req.actorVersion || this.actorVersion || "";
|
|
7195
7220
|
let actorId = req.actorId || this.actorId;
|
|
@@ -7213,6 +7238,7 @@ class PncpClient {
|
|
|
7213
7238
|
matchStrategy: req.matchStrategy || SkillMatchStrategy.BEST,
|
|
7214
7239
|
mustMatch: req.mustMatch || true,
|
|
7215
7240
|
useLock: req.useLock || false,
|
|
7241
|
+
partition: req.partition || this.defaultPartition,
|
|
7216
7242
|
};
|
|
7217
7243
|
return await this.directPncpRequest(pncpReq);
|
|
7218
7244
|
}
|
|
@@ -7829,6 +7855,7 @@ function simplifyPncpRequestCallback(cb) {
|
|
|
7829
7855
|
skill: cb.parameters?.skill && Value.toJson(cb.parameters.skill),
|
|
7830
7856
|
medium: cb.parameters?.medium && Value.toJson(cb.parameters.medium),
|
|
7831
7857
|
},
|
|
7858
|
+
partition: cb.partition,
|
|
7832
7859
|
};
|
|
7833
7860
|
}
|
|
7834
7861
|
function simplifyPncpMessageCallback(cb) {
|
|
@@ -7843,6 +7870,7 @@ function simplifyPncpMessageCallback(cb) {
|
|
|
7843
7870
|
callback: cb.callback && Value.toJson(cb.callback),
|
|
7844
7871
|
medium: cb.medium && Value.toJson(cb.medium),
|
|
7845
7872
|
conversationState: cb.conversationState,
|
|
7873
|
+
partition: cb.partition,
|
|
7846
7874
|
};
|
|
7847
7875
|
}
|
|
7848
7876
|
function simplifyPncpMessage(msg) {
|