@a2a-js/sdk 0.3.12 → 0.3.13
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/{chunk-2TNRJNPO.js → chunk-5ONEQMOQ.js} +23 -0
- package/dist/client/index.js +1 -1
- package/dist/client/transports/grpc/index.js +1 -1
- package/dist/server/express/index.cjs +25 -6
- package/dist/server/express/index.js +5 -7
- package/dist/server/grpc/index.js +1 -1
- package/package.json +1 -1
|
@@ -1013,6 +1013,28 @@ var SendMessageRequest = {
|
|
|
1013
1013
|
return obj;
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
|
+
var CreateTaskPushNotificationConfigRequest = {
|
|
1017
|
+
fromJSON(object) {
|
|
1018
|
+
return {
|
|
1019
|
+
parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
|
|
1020
|
+
configId: isSet(object.configId) ? globalThis.String(object.configId) : isSet(object.config_id) ? globalThis.String(object.config_id) : "",
|
|
1021
|
+
config: isSet(object.config) ? TaskPushNotificationConfig.fromJSON(object.config) : void 0
|
|
1022
|
+
};
|
|
1023
|
+
},
|
|
1024
|
+
toJSON(message) {
|
|
1025
|
+
const obj = {};
|
|
1026
|
+
if (message.parent !== "") {
|
|
1027
|
+
obj.parent = message.parent;
|
|
1028
|
+
}
|
|
1029
|
+
if (message.configId !== "") {
|
|
1030
|
+
obj.configId = message.configId;
|
|
1031
|
+
}
|
|
1032
|
+
if (message.config !== void 0) {
|
|
1033
|
+
obj.config = TaskPushNotificationConfig.toJSON(message.config);
|
|
1034
|
+
}
|
|
1035
|
+
return obj;
|
|
1036
|
+
}
|
|
1037
|
+
};
|
|
1016
1038
|
var SendMessageResponse = {
|
|
1017
1039
|
fromJSON(object) {
|
|
1018
1040
|
return {
|
|
@@ -1978,6 +2000,7 @@ export {
|
|
|
1978
2000
|
AgentCard,
|
|
1979
2001
|
TaskPushNotificationConfig,
|
|
1980
2002
|
SendMessageRequest,
|
|
2003
|
+
CreateTaskPushNotificationConfigRequest,
|
|
1981
2004
|
SendMessageResponse,
|
|
1982
2005
|
StreamResponse,
|
|
1983
2006
|
ListTaskPushNotificationConfigResponse,
|
package/dist/client/index.js
CHANGED
|
@@ -1714,6 +1714,28 @@ var SendMessageRequest = {
|
|
|
1714
1714
|
return obj;
|
|
1715
1715
|
}
|
|
1716
1716
|
};
|
|
1717
|
+
var CreateTaskPushNotificationConfigRequest = {
|
|
1718
|
+
fromJSON(object) {
|
|
1719
|
+
return {
|
|
1720
|
+
parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
|
|
1721
|
+
configId: isSet(object.configId) ? globalThis.String(object.configId) : isSet(object.config_id) ? globalThis.String(object.config_id) : "",
|
|
1722
|
+
config: isSet(object.config) ? TaskPushNotificationConfig.fromJSON(object.config) : void 0
|
|
1723
|
+
};
|
|
1724
|
+
},
|
|
1725
|
+
toJSON(message) {
|
|
1726
|
+
const obj = {};
|
|
1727
|
+
if (message.parent !== "") {
|
|
1728
|
+
obj.parent = message.parent;
|
|
1729
|
+
}
|
|
1730
|
+
if (message.configId !== "") {
|
|
1731
|
+
obj.configId = message.configId;
|
|
1732
|
+
}
|
|
1733
|
+
if (message.config !== void 0) {
|
|
1734
|
+
obj.config = TaskPushNotificationConfig.toJSON(message.config);
|
|
1735
|
+
}
|
|
1736
|
+
return obj;
|
|
1737
|
+
}
|
|
1738
|
+
};
|
|
1717
1739
|
var SendMessageResponse = {
|
|
1718
1740
|
fromJSON(object) {
|
|
1719
1741
|
return {
|
|
@@ -2842,12 +2864,9 @@ function restHandler(options) {
|
|
|
2842
2864
|
"/v1/tasks/:taskId/pushNotificationConfigs",
|
|
2843
2865
|
asyncHandler(async (req, res) => {
|
|
2844
2866
|
const context = await buildContext(req);
|
|
2845
|
-
const
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
task_id: req.params.taskId
|
|
2849
|
-
};
|
|
2850
|
-
const result = await restTransportHandler.setTaskPushNotificationConfig(config, context);
|
|
2867
|
+
const protoReq = CreateTaskPushNotificationConfigRequest.fromJSON(req.body);
|
|
2868
|
+
const params = FromProto.createTaskPushNotificationConfig(protoReq);
|
|
2869
|
+
const result = await restTransportHandler.setTaskPushNotificationConfig(params, context);
|
|
2851
2870
|
const protoResult = ToProto.taskPushNotificationConfig(result);
|
|
2852
2871
|
sendResponse(
|
|
2853
2872
|
res,
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
} from "../../chunk-EGOOH5HP.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentCard,
|
|
25
|
+
CreateTaskPushNotificationConfigRequest,
|
|
25
26
|
FromProto,
|
|
26
27
|
ListTaskPushNotificationConfigResponse,
|
|
27
28
|
SendMessageRequest,
|
|
@@ -30,7 +31,7 @@ import {
|
|
|
30
31
|
Task,
|
|
31
32
|
TaskPushNotificationConfig,
|
|
32
33
|
ToProto
|
|
33
|
-
} from "../../chunk-
|
|
34
|
+
} from "../../chunk-5ONEQMOQ.js";
|
|
34
35
|
import {
|
|
35
36
|
A2AError
|
|
36
37
|
} from "../../chunk-UHZEIZLS.js";
|
|
@@ -541,12 +542,9 @@ function restHandler(options) {
|
|
|
541
542
|
"/v1/tasks/:taskId/pushNotificationConfigs",
|
|
542
543
|
asyncHandler(async (req, res) => {
|
|
543
544
|
const context = await buildContext(req);
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
task_id: req.params.taskId
|
|
548
|
-
};
|
|
549
|
-
const result = await restTransportHandler.setTaskPushNotificationConfig(config, context);
|
|
545
|
+
const protoReq = CreateTaskPushNotificationConfigRequest.fromJSON(req.body);
|
|
546
|
+
const params = FromProto.createTaskPushNotificationConfig(protoReq);
|
|
547
|
+
const result = await restTransportHandler.setTaskPushNotificationConfig(params, context);
|
|
550
548
|
const protoResult = ToProto.taskPushNotificationConfig(result);
|
|
551
549
|
sendResponse(
|
|
552
550
|
res,
|