@macro-inc/sdk 0.3.0 → 0.4.0
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/README.md +45 -0
- package/dist/{chunk-Y4HQV7EL.js → chunk-AZJUIUIV.js} +26 -0
- package/dist/{chunk-KPR5JIGY.js → chunk-G43PLP2U.js} +95 -0
- package/dist/{chunk-IIICUUWY.js → chunk-PPR7IWZ7.js} +51 -51
- package/dist/{chunk-PTMBRVEK.js → chunk-PTX2RV2N.js} +84 -0
- package/dist/{chunk-OEHZOKGE.js → chunk-PZPTJI6F.js} +16 -0
- package/dist/{chunk-HR32RQGP.js → chunk-ZLBDES7U.js} +307 -1
- package/dist/generated/agent-fold/index.d.ts +6 -1
- package/dist/generated/agent-harness/index.d.ts +1 -1
- package/dist/generated/agent-harness/index.js +1 -1
- package/dist/generated/agent-harness/sdk.gen.d.ts +44 -1
- package/dist/generated/agent-harness/types.gen.d.ts +699 -0
- package/dist/generated/calendar/index.d.ts +1 -1
- package/dist/generated/calendar/index.js +1 -1
- package/dist/generated/calendar/sdk.gen.d.ts +41 -1
- package/dist/generated/calendar/types.gen.d.ts +904 -2
- package/dist/generated/cognition/index.d.ts +1 -1
- package/dist/generated/cognition/index.js +1 -1
- package/dist/generated/cognition/sdk.gen.d.ts +9 -1
- package/dist/generated/cognition/types.gen.d.ts +79 -0
- package/dist/generated/email/types.gen.d.ts +11 -1
- package/dist/generated/notification/index.js +1 -1
- package/dist/generated/notification/sdk.gen.d.ts +20 -20
- package/dist/generated/notification/types.gen.d.ts +77 -72
- package/dist/generated/scheduled-action/index.d.ts +1 -1
- package/dist/generated/scheduled-action/index.js +1 -1
- package/dist/generated/scheduled-action/sdk.gen.d.ts +4 -1
- package/dist/generated/scheduled-action/types.gen.d.ts +388 -7
- package/dist/generated/storage/index.d.ts +1 -1
- package/dist/generated/storage/index.js +1 -1
- package/dist/generated/storage/sdk.gen.d.ts +151 -1
- package/dist/generated/storage/types.gen.d.ts +3888 -139
- package/dist/src/entities/account-managers/grant.d.ts +39 -0
- package/dist/src/entities/account-managers/namespace.d.ts +17 -0
- package/dist/src/entities/agent-sessions/activity.d.ts +39 -0
- package/dist/src/entities/agent-sessions/agent-session.d.ts +42 -0
- package/dist/src/entities/agent-sessions/namespace.d.ts +7 -1
- package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
- package/dist/src/entities/ai/namespace.d.ts +1 -1
- package/dist/src/entities/bots/bot.d.ts +108 -0
- package/dist/src/entities/bots/namespace.d.ts +15 -4
- package/dist/src/entities/bots/token.d.ts +34 -0
- package/dist/src/entities/calendar/booking-link.d.ts +49 -0
- package/dist/src/entities/calendar/booking-namespace.d.ts +130 -0
- package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
- package/dist/src/entities/calendar/booking.d.ts +77 -0
- package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
- package/dist/src/entities/calendar/namespace.d.ts +63 -15
- package/dist/src/entities/calls/call-record.d.ts +25 -3
- package/dist/src/entities/calls/connection.d.ts +53 -0
- package/dist/src/entities/calls/errors.d.ts +15 -0
- package/dist/src/entities/calls/namespace.d.ts +19 -2
- package/dist/src/entities/calls/participant.d.ts +22 -0
- package/dist/src/entities/channels/channel.d.ts +21 -3
- package/dist/src/entities/channels/namespace.d.ts +3 -3
- package/dist/src/entities/channels/post.d.ts +10 -2
- package/dist/src/entities/channels/thread.d.ts +4 -0
- package/dist/src/entities/chats/chat.d.ts +1 -1
- package/dist/src/entities/chats/namespace.d.ts +14 -1
- package/dist/src/entities/connected-apps/connected-app.d.ts +107 -0
- package/dist/src/entities/connected-apps/connector.d.ts +56 -0
- package/dist/src/entities/connected-apps/namespace.d.ts +74 -0
- package/dist/src/entities/crm/company.d.ts +1 -1
- package/dist/src/entities/crm/pipeline.d.ts +1 -1
- package/dist/src/entities/documents/document.d.ts +156 -7
- package/dist/src/entities/documents/namespace.d.ts +41 -2
- package/dist/src/entities/documents/office-files.d.ts +47 -0
- package/dist/src/entities/email/draft.d.ts +26 -4
- package/dist/src/entities/email/message.d.ts +91 -1
- package/dist/src/entities/email/namespace.d.ts +26 -3
- package/dist/src/entities/email/namespace.test.d.ts +1 -0
- package/dist/src/entities/email/thread.d.ts +7 -2
- package/dist/src/entities/external-chat/namespace.d.ts +2 -0
- package/dist/src/entities/favorites/namespace.d.ts +1 -1
- package/dist/src/entities/harnesses/namespace.d.ts +5 -1
- package/dist/src/entities/images/namespace.d.ts +5 -1
- package/dist/src/entities/me/namespace.d.ts +5 -1
- package/dist/src/entities/meetings/meeting.d.ts +5 -0
- package/dist/src/entities/messages/thread.d.ts +1 -1
- package/dist/src/entities/pins/namespace.d.ts +1 -1
- package/dist/src/entities/projects/namespace.d.ts +1 -1
- package/dist/src/entities/projects/project.d.ts +1 -1
- package/dist/src/entities/search/namespace.d.ts +65 -0
- package/dist/src/entities/search/options.d.ts +29 -0
- package/dist/src/entities/search/types.d.ts +90 -0
- package/dist/src/entities/tasks/namespace.d.ts +1 -1
- package/dist/src/entities/tasks/task.d.ts +4 -3
- package/dist/src/entities/users/namespace.d.ts +1 -1
- package/dist/src/entities/whatsapp/namespace.d.ts +2 -0
- package/dist/src/entities/workspace/items.d.ts +7 -0
- package/dist/src/entities/workspace/namespace.d.ts +14 -9
- package/dist/src/entities/workspace/query.d.ts +23 -0
- package/dist/src/entities/workspace/types.d.ts +6 -3
- package/dist/src/events/hydrate/call.d.ts +101 -0
- package/dist/src/events/types.d.ts +2 -1
- package/dist/src/macro.d.ts +33 -1
- package/dist/src/macro.js +6423 -4265
- package/dist/src/utils/activity.d.ts +23 -2
- package/package.json +1 -1
- package/dist/src/entities/search.d.ts +0 -53
package/README.md
CHANGED
|
@@ -69,6 +69,27 @@ web app and uses it like any other key. It can set up its profile with
|
|
|
69
69
|
`macro.me.update({ name, profilePicture: await macro.me.uploadProfilePicture(bytes, options) })`
|
|
70
70
|
and mint more keys with `macro.apiKeys.create(name)`.
|
|
71
71
|
|
|
72
|
+
#### Account managers
|
|
73
|
+
|
|
74
|
+
An agent account can manage a person's account: either side asks in their DM, and
|
|
75
|
+
the other side approves. An agent account can't be managed.
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
// As the agent, ask to manage a person's account:
|
|
79
|
+
const grant = await macro.accountManagers.askToManage(person);
|
|
80
|
+
// Once the person approves, the agent gets the token, once:
|
|
81
|
+
const token = await grant.claimToken();
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
A person can ask instead, with `macro.accountManagers.askToBeManagedBy(agent)`. Only the
|
|
85
|
+
manager can claim, so the agent approves and claims with its own client, using the grant id
|
|
86
|
+
from the card in the DM: `macro.accountManagers.byId(id)`.
|
|
87
|
+
|
|
88
|
+
The token is an API key for the managed account, with full access except its
|
|
89
|
+
managers, API keys and other credentials, sign-in, and deleting the account. It
|
|
90
|
+
lasts until either side calls `grant.revoke()`, or the managed account revokes it
|
|
91
|
+
in Settings → Account Managers.
|
|
92
|
+
|
|
72
93
|
#### Bot token
|
|
73
94
|
|
|
74
95
|
```ts
|
|
@@ -535,6 +556,30 @@ when mutations invalidate metadata. `update`, `cancel`, `invite(email)`,
|
|
|
535
556
|
`call.meeting()` creates or reads its shareable meeting; calls also expose
|
|
536
557
|
`editTranscript(assignments)` and `toggleTeamShare()`.
|
|
537
558
|
|
|
559
|
+
### Programmatic calls
|
|
560
|
+
|
|
561
|
+
Use `macro.calls.active()` to find joinable live calls and reconcile missed
|
|
562
|
+
`call.*` events. `macro.calls.summaries(calls)` previews live or archived call
|
|
563
|
+
handles in one request. `channel.activeCall()` checks without starting a call; use
|
|
564
|
+
`channel.startCall()` only when intending to ring channel members. A live
|
|
565
|
+
`call.join()` never creates a replacement call. `meeting.join()` enters with
|
|
566
|
+
an account and `meeting.joinAsGuest(name)` uses the invitation link.
|
|
567
|
+
|
|
568
|
+
Each entry returns a `CallConnection` with the LiveKit URL, token, identity,
|
|
569
|
+
room name, call handle, and `started` flag. Pass the token directly to a
|
|
570
|
+
LiveKit client; it is omitted from JSON and console inspection. Call
|
|
571
|
+
`connection.leave()` when finished. Joins default to `onOtherCall: 'fail'`;
|
|
572
|
+
pass `{ onOtherCall: 'switch' }` to move intentionally, or `{ replace: true }`
|
|
573
|
+
to take over an existing connection for the same identity. Branch on
|
|
574
|
+
`InOtherCallError`, `AlreadyConnectedError`, and `CallEndedError`.
|
|
575
|
+
|
|
576
|
+
`call.ringState()` reads this account's ring state, `call.participants()` reads
|
|
577
|
+
the live roster with user handles, `call.decline()` declines its ring,
|
|
578
|
+
`call.discussion()` returns the call chat or its channel thread, and
|
|
579
|
+
`call.recording.bytes()` downloads through the Macro host. Historical
|
|
580
|
+
participants remain available as `call.historicParticipants()`.
|
|
581
|
+
|
|
582
|
+
|
|
538
583
|
`calendar.occurrences(viewport)` auto-paginates and seeds event handles.
|
|
539
584
|
`calendar.teamPage(viewport)` includes the roster and an optional next cursor;
|
|
540
585
|
`teamOutOfOffice(viewport)` reports `hasMore` when its bounded results are truncated.
|
|
@@ -847,6 +847,19 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
847
847
|
getChatsForAttachmentHandler(options) {
|
|
848
848
|
return (options.client ?? this.client).get({ url: "/attachments/{attachment_id}/chats", ...options });
|
|
849
849
|
}
|
|
850
|
+
/**
|
|
851
|
+
* Create a calendar event the user approved in conversation, quoting their approval.
|
|
852
|
+
*/
|
|
853
|
+
createConfirmedCalendarEvent(options) {
|
|
854
|
+
return (options.client ?? this.client).post({
|
|
855
|
+
url: "/calendar/events/create-confirmed",
|
|
856
|
+
...options,
|
|
857
|
+
headers: {
|
|
858
|
+
"Content-Type": "application/json",
|
|
859
|
+
...options.headers
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
}
|
|
850
863
|
/**
|
|
851
864
|
* Soft-delete a chat.
|
|
852
865
|
*/
|
|
@@ -1003,6 +1016,19 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
1003
1016
|
}
|
|
1004
1017
|
});
|
|
1005
1018
|
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Send an email the user approved in conversation, quoting their approval.
|
|
1021
|
+
*/
|
|
1022
|
+
sendConfirmedEmail(options) {
|
|
1023
|
+
return (options.client ?? this.client).post({
|
|
1024
|
+
url: "/email/send-confirmed",
|
|
1025
|
+
...options,
|
|
1026
|
+
headers: {
|
|
1027
|
+
"Content-Type": "application/json",
|
|
1028
|
+
...options.headers
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1006
1032
|
/**
|
|
1007
1033
|
* Health check
|
|
1008
1034
|
*/
|
|
@@ -966,6 +966,101 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
966
966
|
confirmCalendarReplacement(options) {
|
|
967
967
|
return (options.client ?? this.client).post({ url: "/replacements/{operation_id}/confirm", ...options });
|
|
968
968
|
}
|
|
969
|
+
/**
|
|
970
|
+
* List the profile's bookings, optionally those starting in a half-open range.
|
|
971
|
+
*/
|
|
972
|
+
listBookings(options) {
|
|
973
|
+
return (options?.client ?? this.client).get({ url: "/scheduling/bookings", ...options });
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* Approve, cancel, record attendance for, or reschedule one booking.
|
|
977
|
+
*/
|
|
978
|
+
changeBooking(options) {
|
|
979
|
+
return (options.client ?? this.client).post({
|
|
980
|
+
url: "/scheduling/bookings/{id}/change",
|
|
981
|
+
...options,
|
|
982
|
+
headers: {
|
|
983
|
+
"Content-Type": "application/json",
|
|
984
|
+
...options.headers
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* Read one booking as its personal owner, a host, or a team administrator.
|
|
990
|
+
*/
|
|
991
|
+
getManagedBooking(options) {
|
|
992
|
+
return (options.client ?? this.client).get({ url: "/scheduling/bookings/{id}/manage", ...options });
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Replacement start times for one booking on a schedule-local date.
|
|
996
|
+
*/
|
|
997
|
+
listBookingRescheduleSlots(options) {
|
|
998
|
+
return (options.client ?? this.client).get({ url: "/scheduling/bookings/{id}/slots", ...options });
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Booking statistics for a local date range and the equally long period before it.
|
|
1002
|
+
*/
|
|
1003
|
+
getBookingInsights(options) {
|
|
1004
|
+
return (options.client ?? this.client).post({
|
|
1005
|
+
url: "/scheduling/insights",
|
|
1006
|
+
...options,
|
|
1007
|
+
headers: {
|
|
1008
|
+
"Content-Type": "application/json",
|
|
1009
|
+
...options.headers
|
|
1010
|
+
}
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* List and search booking links with their full drafts and reusable schedules.
|
|
1015
|
+
*/
|
|
1016
|
+
listBookingLinks(options) {
|
|
1017
|
+
return (options?.client ?? this.client).get({ url: "/scheduling/links", ...options });
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Create a booking link; an identical replay at the same slug returns the saved link.
|
|
1021
|
+
*/
|
|
1022
|
+
createBookingLink(options) {
|
|
1023
|
+
return (options.client ?? this.client).post({
|
|
1024
|
+
url: "/scheduling/links",
|
|
1025
|
+
...options,
|
|
1026
|
+
headers: {
|
|
1027
|
+
"Content-Type": "application/json",
|
|
1028
|
+
...options.headers
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Replace one booking link's configuration at the profile revision it was read with.
|
|
1034
|
+
*/
|
|
1035
|
+
editBookingLink(options) {
|
|
1036
|
+
return (options.client ?? this.client).put({
|
|
1037
|
+
url: "/scheduling/links/{id}",
|
|
1038
|
+
...options,
|
|
1039
|
+
headers: {
|
|
1040
|
+
"Content-Type": "application/json",
|
|
1041
|
+
...options.headers
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Read personal or team booking settings without creating them.
|
|
1047
|
+
*/
|
|
1048
|
+
getBookingSettings(options) {
|
|
1049
|
+
return (options?.client ?? this.client).get({ url: "/scheduling/settings", ...options });
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Save booking settings at the revision they were read with.
|
|
1053
|
+
*/
|
|
1054
|
+
saveBookingSettings(options) {
|
|
1055
|
+
return (options.client ?? this.client).put({
|
|
1056
|
+
url: "/scheduling/settings",
|
|
1057
|
+
...options,
|
|
1058
|
+
headers: {
|
|
1059
|
+
"Content-Type": "application/json",
|
|
1060
|
+
...options.headers
|
|
1061
|
+
}
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
969
1064
|
/**
|
|
970
1065
|
* Read the authenticated user's sharing choice.
|
|
971
1066
|
*/
|
|
@@ -882,58 +882,12 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
882
882
|
listTypedNotifications(options) {
|
|
883
883
|
return (options?.client ?? this.client).get({ url: "/v1/user_notifications", ...options });
|
|
884
884
|
}
|
|
885
|
-
/**
|
|
886
|
-
* Wrapper handler that calls the inner generic bulk-get handler with `serde_json::Value`,
|
|
887
|
-
* then converts each row to [`UserNotificationRow<NotifEvent>`].
|
|
888
|
-
*
|
|
889
|
-
* Rows that fail to deserialize are dropped with a warning log.
|
|
890
|
-
*/
|
|
891
|
-
bulkGetTypedNotificationsByEventItemIds(options) {
|
|
892
|
-
return (options.client ?? this.client).post({
|
|
893
|
-
url: "/v1/user_notifications/item/bulk",
|
|
894
|
-
...options,
|
|
895
|
-
headers: {
|
|
896
|
-
"Content-Type": "application/json",
|
|
897
|
-
...options.headers
|
|
898
|
-
}
|
|
899
|
-
});
|
|
900
|
-
}
|
|
901
|
-
/**
|
|
902
|
-
* Typed wrapper for getting notifications by a single event item ID.
|
|
903
|
-
*/
|
|
904
|
-
getTypedNotificationsByEventItemId(options) {
|
|
905
|
-
return (options.client ?? this.client).get({ url: "/v1/user_notifications/item/{event_item_id}", ...options });
|
|
906
|
-
}
|
|
907
|
-
/**
|
|
908
|
-
* Get the notification types that the user has disabled.
|
|
909
|
-
*/
|
|
910
|
-
getNotificationTypePreferences(options) {
|
|
911
|
-
return (options?.client ?? this.client).get({ url: "/v1/user_notifications/preferences", ...options });
|
|
912
|
-
}
|
|
913
|
-
/**
|
|
914
|
-
* Disable a notification type for the authenticated user.
|
|
915
|
-
*/
|
|
916
|
-
disableNotificationType(options) {
|
|
917
|
-
return (options.client ?? this.client).put({ url: "/v1/user_notifications/preferences/{notification_event_type}/disable", ...options });
|
|
918
|
-
}
|
|
919
|
-
/**
|
|
920
|
-
* Re-enable a notification type for the authenticated user.
|
|
921
|
-
*/
|
|
922
|
-
enableNotificationType(options) {
|
|
923
|
-
return (options.client ?? this.client).put({ url: "/v1/user_notifications/preferences/{notification_event_type}/enable", ...options });
|
|
924
|
-
}
|
|
925
|
-
/**
|
|
926
|
-
* Typed wrapper for getting a single notification by ID.
|
|
927
|
-
*/
|
|
928
|
-
getTypedNotificationById(options) {
|
|
929
|
-
return (options.client ?? this.client).get({ url: "/v1/user_notifications/{notification_id}", ...options });
|
|
930
|
-
}
|
|
931
885
|
/**
|
|
932
886
|
* Soft-delete multiple user notifications.
|
|
933
887
|
*/
|
|
934
888
|
bulkDeleteUserNotificationsV2(options) {
|
|
935
889
|
return (options.client ?? this.client).delete({
|
|
936
|
-
url: "/
|
|
890
|
+
url: "/v1/user_notifications/bulk",
|
|
937
891
|
...options,
|
|
938
892
|
headers: {
|
|
939
893
|
"Content-Type": "application/json",
|
|
@@ -946,7 +900,7 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
946
900
|
*/
|
|
947
901
|
bulkMarkNotificationsDone(options) {
|
|
948
902
|
return (options.client ?? this.client).patch({
|
|
949
|
-
url: "/
|
|
903
|
+
url: "/v1/user_notifications/bulk/done",
|
|
950
904
|
...options,
|
|
951
905
|
headers: {
|
|
952
906
|
"Content-Type": "application/json",
|
|
@@ -959,7 +913,7 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
959
913
|
*/
|
|
960
914
|
bulkMarkNotificationsSeen(options) {
|
|
961
915
|
return (options.client ?? this.client).patch({
|
|
962
|
-
url: "/
|
|
916
|
+
url: "/v1/user_notifications/bulk/seen",
|
|
963
917
|
...options,
|
|
964
918
|
headers: {
|
|
965
919
|
"Content-Type": "application/json",
|
|
@@ -972,7 +926,7 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
972
926
|
*/
|
|
973
927
|
bulkMarkNotificationsUndone(options) {
|
|
974
928
|
return (options.client ?? this.client).patch({
|
|
975
|
-
url: "/
|
|
929
|
+
url: "/v1/user_notifications/bulk/undone",
|
|
976
930
|
...options,
|
|
977
931
|
headers: {
|
|
978
932
|
"Content-Type": "application/json",
|
|
@@ -980,11 +934,57 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
980
934
|
}
|
|
981
935
|
});
|
|
982
936
|
}
|
|
937
|
+
/**
|
|
938
|
+
* Wrapper handler that calls the inner generic bulk-get handler with `serde_json::Value`,
|
|
939
|
+
* then converts each row to [`UserNotificationRow<NotifEvent>`].
|
|
940
|
+
*
|
|
941
|
+
* Rows that fail to deserialize are dropped with a warning log.
|
|
942
|
+
*/
|
|
943
|
+
bulkGetTypedNotificationsByEventItemIds(options) {
|
|
944
|
+
return (options.client ?? this.client).post({
|
|
945
|
+
url: "/v1/user_notifications/item/bulk",
|
|
946
|
+
...options,
|
|
947
|
+
headers: {
|
|
948
|
+
"Content-Type": "application/json",
|
|
949
|
+
...options.headers
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Typed wrapper for getting notifications by a single event item ID.
|
|
955
|
+
*/
|
|
956
|
+
getTypedNotificationsByEventItemId(options) {
|
|
957
|
+
return (options.client ?? this.client).get({ url: "/v1/user_notifications/item/{event_item_id}", ...options });
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* Get the notification types that the user has disabled.
|
|
961
|
+
*/
|
|
962
|
+
getNotificationTypePreferences(options) {
|
|
963
|
+
return (options?.client ?? this.client).get({ url: "/v1/user_notifications/preferences", ...options });
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* Disable a notification type for the authenticated user.
|
|
967
|
+
*/
|
|
968
|
+
disableNotificationType(options) {
|
|
969
|
+
return (options.client ?? this.client).put({ url: "/v1/user_notifications/preferences/{notification_event_type}/disable", ...options });
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Re-enable a notification type for the authenticated user.
|
|
973
|
+
*/
|
|
974
|
+
enableNotificationType(options) {
|
|
975
|
+
return (options.client ?? this.client).put({ url: "/v1/user_notifications/preferences/{notification_event_type}/enable", ...options });
|
|
976
|
+
}
|
|
983
977
|
/**
|
|
984
978
|
* Soft-delete a single user notification.
|
|
985
979
|
*/
|
|
986
980
|
deleteUserNotificationV2(options) {
|
|
987
|
-
return (options.client ?? this.client).delete({ url: "/
|
|
981
|
+
return (options.client ?? this.client).delete({ url: "/v1/user_notifications/{notification_id}", ...options });
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* Typed wrapper for getting a single notification by ID.
|
|
985
|
+
*/
|
|
986
|
+
getTypedNotificationById(options) {
|
|
987
|
+
return (options.client ?? this.client).get({ url: "/v1/user_notifications/{notification_id}", ...options });
|
|
988
988
|
}
|
|
989
989
|
};
|
|
990
990
|
|
|
@@ -1056,6 +1056,12 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
1056
1056
|
getAgentSession(options) {
|
|
1057
1057
|
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}", ...options });
|
|
1058
1058
|
}
|
|
1059
|
+
/**
|
|
1060
|
+
* Read activity using the same visibility capability as the session transcript.
|
|
1061
|
+
*/
|
|
1062
|
+
getAgentSessionActivity(options) {
|
|
1063
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/activity", ...options });
|
|
1064
|
+
}
|
|
1059
1065
|
/**
|
|
1060
1066
|
* Continue the session now that its owner connected an app it asked for.
|
|
1061
1067
|
*
|
|
@@ -1130,6 +1136,63 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
1130
1136
|
getCodeExecution(options) {
|
|
1131
1137
|
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}", ...options });
|
|
1132
1138
|
}
|
|
1139
|
+
/**
|
|
1140
|
+
* List the connected apps and custom MCP servers the session's agent may use.
|
|
1141
|
+
*/
|
|
1142
|
+
listExecutionConnectedApps(options) {
|
|
1143
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps", ...options });
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Search the connectable app catalog, or inspect one app's tools and connection status.
|
|
1147
|
+
*/
|
|
1148
|
+
discoverConnectedApps(options) {
|
|
1149
|
+
return (options.client ?? this.client).post({
|
|
1150
|
+
url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/discover",
|
|
1151
|
+
...options,
|
|
1152
|
+
headers: {
|
|
1153
|
+
"Content-Type": "application/json",
|
|
1154
|
+
...options.headers
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* Add a custom MCP server to the execution account's connections.
|
|
1160
|
+
*/
|
|
1161
|
+
addConnectedMcpServer(options) {
|
|
1162
|
+
return (options.client ?? this.client).post({
|
|
1163
|
+
url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/servers",
|
|
1164
|
+
...options,
|
|
1165
|
+
headers: {
|
|
1166
|
+
"Content-Type": "application/json",
|
|
1167
|
+
...options.headers
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Find tools across the agent's connected apps by keywords.
|
|
1173
|
+
*/
|
|
1174
|
+
searchConnectedAppTools(options) {
|
|
1175
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/tools", ...options });
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Call one tool of a connected app as the execution's account.
|
|
1179
|
+
*/
|
|
1180
|
+
callConnectedAppTool(options) {
|
|
1181
|
+
return (options.client ?? this.client).post({
|
|
1182
|
+
url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/{kind}/{key}/calls",
|
|
1183
|
+
...options,
|
|
1184
|
+
headers: {
|
|
1185
|
+
"Content-Type": "application/json",
|
|
1186
|
+
...options.headers
|
|
1187
|
+
}
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* List the tools one connected app serves.
|
|
1192
|
+
*/
|
|
1193
|
+
listConnectedAppTools(options) {
|
|
1194
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/{kind}/{key}/tools", ...options });
|
|
1195
|
+
}
|
|
1133
1196
|
/**
|
|
1134
1197
|
* List blocks created during an execution, including interrupted executions.
|
|
1135
1198
|
*/
|
|
@@ -1343,6 +1406,27 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
1343
1406
|
}
|
|
1344
1407
|
});
|
|
1345
1408
|
}
|
|
1409
|
+
/**
|
|
1410
|
+
* End the caller's own registration of a session. Repeating does nothing. It touches only the
|
|
1411
|
+
* caller's own row, so it needs no access to the session: losing access must not strand it.
|
|
1412
|
+
*/
|
|
1413
|
+
unregisterAgentSessionWork(options) {
|
|
1414
|
+
return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}/work-registration", ...options });
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Register a session as the caller's work. Requires edit access. Repeating returns the active
|
|
1418
|
+
* registration. Registering does not share the session: viewers who cannot open it do not see
|
|
1419
|
+
* it, so share it too.
|
|
1420
|
+
*/
|
|
1421
|
+
registerAgentSessionWork(options) {
|
|
1422
|
+
return (options.client ?? this.client).put({ url: "/agent-sessions/{session_id}/work-registration", ...options });
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* List the caller's active registrations of sessions they can still view, newest first.
|
|
1426
|
+
*/
|
|
1427
|
+
listAgentWorkRegistrations(options) {
|
|
1428
|
+
return (options?.client ?? this.client).get({ url: "/agent-work-registrations", ...options });
|
|
1429
|
+
}
|
|
1346
1430
|
/**
|
|
1347
1431
|
* Classify a draft for the authenticated user.
|
|
1348
1432
|
*/
|
|
@@ -820,6 +820,19 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
820
820
|
}
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
+
routineCodeStarters(options) {
|
|
824
|
+
return (options?.client ?? this.client).get({ url: "/scheduled-actions/code/starters", ...options });
|
|
825
|
+
}
|
|
826
|
+
draftRoutine(options) {
|
|
827
|
+
return (options.client ?? this.client).post({
|
|
828
|
+
url: "/scheduled-actions/drafts",
|
|
829
|
+
...options,
|
|
830
|
+
headers: {
|
|
831
|
+
"Content-Type": "application/json",
|
|
832
|
+
...options.headers
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
}
|
|
823
836
|
deleteScheduledAction(options) {
|
|
824
837
|
return (options.client ?? this.client).delete({ url: "/scheduled-actions/{id}", ...options });
|
|
825
838
|
}
|
|
@@ -836,6 +849,9 @@ var Sdk = class _Sdk extends HeyApiClient {
|
|
|
836
849
|
}
|
|
837
850
|
});
|
|
838
851
|
}
|
|
852
|
+
listScheduledActionCodeUpgrades(options) {
|
|
853
|
+
return (options.client ?? this.client).get({ url: "/scheduled-actions/{id}/code-upgrades", ...options });
|
|
854
|
+
}
|
|
839
855
|
setScheduledActionEnabled(options) {
|
|
840
856
|
return (options.client ?? this.client).put({
|
|
841
857
|
url: "/scheduled-actions/{id}/enabled",
|