@alva-ai/toolkit 0.15.1-beta.0 → 0.16.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/dist/browser.global.js +2 -2
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.d.ts +62 -0
- package/dist/cli.js +176 -31
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +127 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -1
- package/dist/index.d.ts +63 -1
- package/dist/index.js +127 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -371,6 +371,20 @@ interface FeedDeleteResponse {
|
|
|
371
371
|
/** Echoed feed id (string form, matching gateway response). */
|
|
372
372
|
id: string;
|
|
373
373
|
}
|
|
374
|
+
/** Feed visibility: 'public' publishes the feed, 'private' unpublishes it. */
|
|
375
|
+
type FeedVisibility = 'public' | 'private';
|
|
376
|
+
interface FeedSetVisibilityRequest {
|
|
377
|
+
/** Numeric feed id to publish/unpublish. */
|
|
378
|
+
id: number;
|
|
379
|
+
/** Target visibility. */
|
|
380
|
+
visibility: FeedVisibility;
|
|
381
|
+
}
|
|
382
|
+
interface FeedSetVisibilityResponse {
|
|
383
|
+
/** Echoed feed id (string form, matching gateway response). */
|
|
384
|
+
id: string;
|
|
385
|
+
/** Feed visibility after the update. */
|
|
386
|
+
visibility: FeedVisibility;
|
|
387
|
+
}
|
|
374
388
|
interface PlaybookDraftRequest {
|
|
375
389
|
name: string;
|
|
376
390
|
display_name: string;
|
|
@@ -917,6 +931,33 @@ interface ChannelGroupSubscriptionMutationResponse {
|
|
|
917
931
|
admin: ChannelGroupAdminInfo | null;
|
|
918
932
|
subscriptions: ChannelGroupSubscription[];
|
|
919
933
|
}
|
|
934
|
+
/** Params for reading a group's buffered chat history (group-chat digest). */
|
|
935
|
+
interface ChannelGroupHistoryParams {
|
|
936
|
+
/** Platform: "telegram" | "discord" | "slack". */
|
|
937
|
+
channel: string;
|
|
938
|
+
/** Platform group/channel id. */
|
|
939
|
+
remote_chat_id: string;
|
|
940
|
+
/** Window start, message-origin timestamp in microseconds (inclusive). */
|
|
941
|
+
from_micros: number | string;
|
|
942
|
+
/** Window end, message-origin timestamp in microseconds (inclusive). */
|
|
943
|
+
to_micros: number | string;
|
|
944
|
+
}
|
|
945
|
+
/** One buffered group message, projected for the digest. */
|
|
946
|
+
interface GroupChatMessage {
|
|
947
|
+
sender_username: string;
|
|
948
|
+
content: string;
|
|
949
|
+
/** "[photo]" etc. when the message carried media. */
|
|
950
|
+
media_summary: string;
|
|
951
|
+
ts_micros: number;
|
|
952
|
+
/** Deep link back to the original message; empty when unavailable. */
|
|
953
|
+
permalink: string;
|
|
954
|
+
/** "user" | "assistant" (bot replies). */
|
|
955
|
+
role: string;
|
|
956
|
+
}
|
|
957
|
+
interface ChannelGroupHistoryResponse {
|
|
958
|
+
/** Chronological (ts ascending). */
|
|
959
|
+
messages: GroupChatMessage[];
|
|
960
|
+
}
|
|
920
961
|
interface ServiceAccount {
|
|
921
962
|
id: string;
|
|
922
963
|
display_name: string;
|
|
@@ -1071,6 +1112,18 @@ declare class FeedResource {
|
|
|
1071
1112
|
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
1072
1113
|
*/
|
|
1073
1114
|
delete(params: FeedDeleteRequest): Promise<FeedDeleteResponse>;
|
|
1115
|
+
/**
|
|
1116
|
+
* Publish or unpublish a feed. Backed by POST /api/v1/feed/:id/visibility.
|
|
1117
|
+
*
|
|
1118
|
+
* Setting visibility to 'public' publishes the feed (the backend sets
|
|
1119
|
+
* feeds.is_public and projects the ALFS public read grant in the same
|
|
1120
|
+
* transaction); 'private' unpublishes it. Prefer this over granting the
|
|
1121
|
+
* ALFS public read subject directly (e.g. `alva fs grant`), which bypasses
|
|
1122
|
+
* the is_public flag and causes drift.
|
|
1123
|
+
*
|
|
1124
|
+
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
1125
|
+
*/
|
|
1126
|
+
setVisibility(params: FeedSetVisibilityRequest): Promise<FeedSetVisibilityResponse>;
|
|
1074
1127
|
}
|
|
1075
1128
|
|
|
1076
1129
|
/**
|
|
@@ -1553,6 +1606,7 @@ declare class AlertsResource {
|
|
|
1553
1606
|
private client;
|
|
1554
1607
|
constructor(client: AlvaClient);
|
|
1555
1608
|
list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
|
|
1609
|
+
follows(params?: FollowsListParams): Promise<FollowsListResponse>;
|
|
1556
1610
|
enableAutomation(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
|
|
1557
1611
|
disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
|
|
1558
1612
|
enablePlaybook(params: PushSubscriptionPlaybookParams): Promise<SubscribePlaybookResponse>;
|
|
@@ -1578,6 +1632,14 @@ declare class ChannelGroupSubscriptionsResource {
|
|
|
1578
1632
|
list(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionListResponse>;
|
|
1579
1633
|
subscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
1580
1634
|
unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
1635
|
+
/**
|
|
1636
|
+
* Read a group's buffered chat messages in a time window, for the group-chat
|
|
1637
|
+
* digest automation. Admin-gated: the authenticated caller must be that
|
|
1638
|
+
* group's Alva admin (a digest feed runs as that admin). Each message carries
|
|
1639
|
+
* a `permalink` deep-link back to the original message for "jump to original".
|
|
1640
|
+
* `from_micros`/`to_micros` are message-origin timestamps in microseconds.
|
|
1641
|
+
*/
|
|
1642
|
+
getGroupChatHistory(params: ChannelGroupHistoryParams): Promise<ChannelGroupHistoryResponse>;
|
|
1581
1643
|
}
|
|
1582
1644
|
|
|
1583
1645
|
declare class FeedbackResource {
|
|
@@ -1928,4 +1990,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
|
|
|
1928
1990
|
/** SDK version, injected at build time from package.json. */
|
|
1929
1991
|
declare const VERSION: string;
|
|
1930
1992
|
|
|
1931
|
-
export { AlertsResource, AlvaClient, type AlvaClientConfig, AlvaError, AutomationResource, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, CliUsageError, type CreateAllowanceParams, type CreateAllowanceResponse, type CreditAllowance, type CreditWallet, type CreditWalletItem, type CreditWalletItemConnection, type CreditWalletItemEdge, type CreditWalletItemsParams, type CreditWalletItemsResponse, type CreditWalletPageInfo, type DeleteFunctionParams, type FeedDeleteRequest, type FeedDeleteResponse, type FeedListItem, type FeedListParams, type FeedListResponse, type FeedListStatus, type FeedStatusUpdateRequest, type FeedStatusUpdateResponse, type FsChmodParams, type FsCopyParams, type FsEntry, type FsGrantParams, type FsMkdirParams, type FsRawWriteParams, type FsReadParams, type FsReaddirParams, type FsReaddirResponse, type FsReadlinkParams, type FsRemoveParams, type FsRenameParams, type FsRevokeParams, type FsStat, type FsSymlinkParams, type FsWriteParams, type FsWriteResponse, type GetAllowanceParams, type InvokeFunctionParams, type InvokeFunctionResponse, type ListAllowancesResponse, type ListFunctionsParams, type ListFunctionsResponse, type NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookFunction, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type RegisterFunctionParams, type RegisterFunctionResponse, type RevokeAllowanceParams, type RevokeAllowanceResponse, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeProposalInput, type SubscribeProposalResult, type TrendingPlaybookItem, type TrendingPlaybooksDir, type TrendingPlaybooksParams, type TrendingPlaybooksResponse, type TrendingPlaybooksSort, UDF_AUTH_REQUIRED_MESSAGE, UDF_CONSENT_REQUEST_MESSAGE, UDF_CONSENT_RESPONSE_MESSAGE, type UdfApi, UdfAuthRequiredError, type UdfButtonEventDetail, type UdfButtonOptions, UdfConsentDeniedError, UdfConsentRequiredError, UdfConsentTimeoutError, type UdfDescriptor, UdfError, UdfExecutionError, UdfFunctionDisabledError, UdfFunctionNotFoundError, UdfInsufficientCredits, type UdfInvokeResponse, UdfPidMismatchError, UdfRateLimitedError, UdfTokenExpiredError, UdfTokenInvalidError, UdfTransportError, VERSION, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };
|
|
1993
|
+
export { AlertsResource, AlvaClient, type AlvaClientConfig, AlvaError, AutomationResource, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupHistoryParams, type ChannelGroupHistoryResponse, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, CliUsageError, type CreateAllowanceParams, type CreateAllowanceResponse, type CreditAllowance, type CreditWallet, type CreditWalletItem, type CreditWalletItemConnection, type CreditWalletItemEdge, type CreditWalletItemsParams, type CreditWalletItemsResponse, type CreditWalletPageInfo, type DeleteFunctionParams, type FeedDeleteRequest, type FeedDeleteResponse, type FeedListItem, type FeedListParams, type FeedListResponse, type FeedListStatus, type FeedStatusUpdateRequest, type FeedStatusUpdateResponse, type FsChmodParams, type FsCopyParams, type FsEntry, type FsGrantParams, type FsMkdirParams, type FsRawWriteParams, type FsReadParams, type FsReaddirParams, type FsReaddirResponse, type FsReadlinkParams, type FsRemoveParams, type FsRenameParams, type FsRevokeParams, type FsStat, type FsSymlinkParams, type FsWriteParams, type FsWriteResponse, type GetAllowanceParams, type GroupChatMessage, type InvokeFunctionParams, type InvokeFunctionResponse, type ListAllowancesResponse, type ListFunctionsParams, type ListFunctionsResponse, type NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookFunction, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type RegisterFunctionParams, type RegisterFunctionResponse, type RevokeAllowanceParams, type RevokeAllowanceResponse, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeProposalInput, type SubscribeProposalResult, type TrendingPlaybookItem, type TrendingPlaybooksDir, type TrendingPlaybooksParams, type TrendingPlaybooksResponse, type TrendingPlaybooksSort, UDF_AUTH_REQUIRED_MESSAGE, UDF_CONSENT_REQUEST_MESSAGE, UDF_CONSENT_RESPONSE_MESSAGE, type UdfApi, UdfAuthRequiredError, type UdfButtonEventDetail, type UdfButtonOptions, UdfConsentDeniedError, UdfConsentRequiredError, UdfConsentTimeoutError, type UdfDescriptor, UdfError, UdfExecutionError, UdfFunctionDisabledError, UdfFunctionNotFoundError, UdfInsufficientCredits, type UdfInvokeResponse, UdfPidMismatchError, UdfRateLimitedError, UdfTokenExpiredError, UdfTokenInvalidError, UdfTransportError, VERSION, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };
|
package/dist/index.d.ts
CHANGED
|
@@ -371,6 +371,20 @@ interface FeedDeleteResponse {
|
|
|
371
371
|
/** Echoed feed id (string form, matching gateway response). */
|
|
372
372
|
id: string;
|
|
373
373
|
}
|
|
374
|
+
/** Feed visibility: 'public' publishes the feed, 'private' unpublishes it. */
|
|
375
|
+
type FeedVisibility = 'public' | 'private';
|
|
376
|
+
interface FeedSetVisibilityRequest {
|
|
377
|
+
/** Numeric feed id to publish/unpublish. */
|
|
378
|
+
id: number;
|
|
379
|
+
/** Target visibility. */
|
|
380
|
+
visibility: FeedVisibility;
|
|
381
|
+
}
|
|
382
|
+
interface FeedSetVisibilityResponse {
|
|
383
|
+
/** Echoed feed id (string form, matching gateway response). */
|
|
384
|
+
id: string;
|
|
385
|
+
/** Feed visibility after the update. */
|
|
386
|
+
visibility: FeedVisibility;
|
|
387
|
+
}
|
|
374
388
|
interface PlaybookDraftRequest {
|
|
375
389
|
name: string;
|
|
376
390
|
display_name: string;
|
|
@@ -917,6 +931,33 @@ interface ChannelGroupSubscriptionMutationResponse {
|
|
|
917
931
|
admin: ChannelGroupAdminInfo | null;
|
|
918
932
|
subscriptions: ChannelGroupSubscription[];
|
|
919
933
|
}
|
|
934
|
+
/** Params for reading a group's buffered chat history (group-chat digest). */
|
|
935
|
+
interface ChannelGroupHistoryParams {
|
|
936
|
+
/** Platform: "telegram" | "discord" | "slack". */
|
|
937
|
+
channel: string;
|
|
938
|
+
/** Platform group/channel id. */
|
|
939
|
+
remote_chat_id: string;
|
|
940
|
+
/** Window start, message-origin timestamp in microseconds (inclusive). */
|
|
941
|
+
from_micros: number | string;
|
|
942
|
+
/** Window end, message-origin timestamp in microseconds (inclusive). */
|
|
943
|
+
to_micros: number | string;
|
|
944
|
+
}
|
|
945
|
+
/** One buffered group message, projected for the digest. */
|
|
946
|
+
interface GroupChatMessage {
|
|
947
|
+
sender_username: string;
|
|
948
|
+
content: string;
|
|
949
|
+
/** "[photo]" etc. when the message carried media. */
|
|
950
|
+
media_summary: string;
|
|
951
|
+
ts_micros: number;
|
|
952
|
+
/** Deep link back to the original message; empty when unavailable. */
|
|
953
|
+
permalink: string;
|
|
954
|
+
/** "user" | "assistant" (bot replies). */
|
|
955
|
+
role: string;
|
|
956
|
+
}
|
|
957
|
+
interface ChannelGroupHistoryResponse {
|
|
958
|
+
/** Chronological (ts ascending). */
|
|
959
|
+
messages: GroupChatMessage[];
|
|
960
|
+
}
|
|
920
961
|
interface ServiceAccount {
|
|
921
962
|
id: string;
|
|
922
963
|
display_name: string;
|
|
@@ -1071,6 +1112,18 @@ declare class FeedResource {
|
|
|
1071
1112
|
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
1072
1113
|
*/
|
|
1073
1114
|
delete(params: FeedDeleteRequest): Promise<FeedDeleteResponse>;
|
|
1115
|
+
/**
|
|
1116
|
+
* Publish or unpublish a feed. Backed by POST /api/v1/feed/:id/visibility.
|
|
1117
|
+
*
|
|
1118
|
+
* Setting visibility to 'public' publishes the feed (the backend sets
|
|
1119
|
+
* feeds.is_public and projects the ALFS public read grant in the same
|
|
1120
|
+
* transaction); 'private' unpublishes it. Prefer this over granting the
|
|
1121
|
+
* ALFS public read subject directly (e.g. `alva fs grant`), which bypasses
|
|
1122
|
+
* the is_public flag and causes drift.
|
|
1123
|
+
*
|
|
1124
|
+
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
1125
|
+
*/
|
|
1126
|
+
setVisibility(params: FeedSetVisibilityRequest): Promise<FeedSetVisibilityResponse>;
|
|
1074
1127
|
}
|
|
1075
1128
|
|
|
1076
1129
|
/**
|
|
@@ -1553,6 +1606,7 @@ declare class AlertsResource {
|
|
|
1553
1606
|
private client;
|
|
1554
1607
|
constructor(client: AlvaClient);
|
|
1555
1608
|
list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
|
|
1609
|
+
follows(params?: FollowsListParams): Promise<FollowsListResponse>;
|
|
1556
1610
|
enableAutomation(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
|
|
1557
1611
|
disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
|
|
1558
1612
|
enablePlaybook(params: PushSubscriptionPlaybookParams): Promise<SubscribePlaybookResponse>;
|
|
@@ -1578,6 +1632,14 @@ declare class ChannelGroupSubscriptionsResource {
|
|
|
1578
1632
|
list(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionListResponse>;
|
|
1579
1633
|
subscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
1580
1634
|
unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
1635
|
+
/**
|
|
1636
|
+
* Read a group's buffered chat messages in a time window, for the group-chat
|
|
1637
|
+
* digest automation. Admin-gated: the authenticated caller must be that
|
|
1638
|
+
* group's Alva admin (a digest feed runs as that admin). Each message carries
|
|
1639
|
+
* a `permalink` deep-link back to the original message for "jump to original".
|
|
1640
|
+
* `from_micros`/`to_micros` are message-origin timestamps in microseconds.
|
|
1641
|
+
*/
|
|
1642
|
+
getGroupChatHistory(params: ChannelGroupHistoryParams): Promise<ChannelGroupHistoryResponse>;
|
|
1581
1643
|
}
|
|
1582
1644
|
|
|
1583
1645
|
declare class FeedbackResource {
|
|
@@ -1928,4 +1990,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
|
|
|
1928
1990
|
/** SDK version, injected at build time from package.json. */
|
|
1929
1991
|
declare const VERSION: string;
|
|
1930
1992
|
|
|
1931
|
-
export { AlertsResource, AlvaClient, type AlvaClientConfig, AlvaError, AutomationResource, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, CliUsageError, type CreateAllowanceParams, type CreateAllowanceResponse, type CreditAllowance, type CreditWallet, type CreditWalletItem, type CreditWalletItemConnection, type CreditWalletItemEdge, type CreditWalletItemsParams, type CreditWalletItemsResponse, type CreditWalletPageInfo, type DeleteFunctionParams, type FeedDeleteRequest, type FeedDeleteResponse, type FeedListItem, type FeedListParams, type FeedListResponse, type FeedListStatus, type FeedStatusUpdateRequest, type FeedStatusUpdateResponse, type FsChmodParams, type FsCopyParams, type FsEntry, type FsGrantParams, type FsMkdirParams, type FsRawWriteParams, type FsReadParams, type FsReaddirParams, type FsReaddirResponse, type FsReadlinkParams, type FsRemoveParams, type FsRenameParams, type FsRevokeParams, type FsStat, type FsSymlinkParams, type FsWriteParams, type FsWriteResponse, type GetAllowanceParams, type InvokeFunctionParams, type InvokeFunctionResponse, type ListAllowancesResponse, type ListFunctionsParams, type ListFunctionsResponse, type NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookFunction, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type RegisterFunctionParams, type RegisterFunctionResponse, type RevokeAllowanceParams, type RevokeAllowanceResponse, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeProposalInput, type SubscribeProposalResult, type TrendingPlaybookItem, type TrendingPlaybooksDir, type TrendingPlaybooksParams, type TrendingPlaybooksResponse, type TrendingPlaybooksSort, UDF_AUTH_REQUIRED_MESSAGE, UDF_CONSENT_REQUEST_MESSAGE, UDF_CONSENT_RESPONSE_MESSAGE, type UdfApi, UdfAuthRequiredError, type UdfButtonEventDetail, type UdfButtonOptions, UdfConsentDeniedError, UdfConsentRequiredError, UdfConsentTimeoutError, type UdfDescriptor, UdfError, UdfExecutionError, UdfFunctionDisabledError, UdfFunctionNotFoundError, UdfInsufficientCredits, type UdfInvokeResponse, UdfPidMismatchError, UdfRateLimitedError, UdfTokenExpiredError, UdfTokenInvalidError, UdfTransportError, VERSION, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };
|
|
1993
|
+
export { AlertsResource, AlvaClient, type AlvaClientConfig, AlvaError, AutomationResource, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupHistoryParams, type ChannelGroupHistoryResponse, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, CliUsageError, type CreateAllowanceParams, type CreateAllowanceResponse, type CreditAllowance, type CreditWallet, type CreditWalletItem, type CreditWalletItemConnection, type CreditWalletItemEdge, type CreditWalletItemsParams, type CreditWalletItemsResponse, type CreditWalletPageInfo, type DeleteFunctionParams, type FeedDeleteRequest, type FeedDeleteResponse, type FeedListItem, type FeedListParams, type FeedListResponse, type FeedListStatus, type FeedStatusUpdateRequest, type FeedStatusUpdateResponse, type FsChmodParams, type FsCopyParams, type FsEntry, type FsGrantParams, type FsMkdirParams, type FsRawWriteParams, type FsReadParams, type FsReaddirParams, type FsReaddirResponse, type FsReadlinkParams, type FsRemoveParams, type FsRenameParams, type FsRevokeParams, type FsStat, type FsSymlinkParams, type FsWriteParams, type FsWriteResponse, type GetAllowanceParams, type GroupChatMessage, type InvokeFunctionParams, type InvokeFunctionResponse, type ListAllowancesResponse, type ListFunctionsParams, type ListFunctionsResponse, type NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookFunction, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type RegisterFunctionParams, type RegisterFunctionResponse, type RevokeAllowanceParams, type RevokeAllowanceResponse, SUBSCRIBE_PROPOSE_MESSAGE, SUBSCRIBE_RESULT_MESSAGE, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubscribeApi, type SubscribeProposalInput, type SubscribeProposalResult, type TrendingPlaybookItem, type TrendingPlaybooksDir, type TrendingPlaybooksParams, type TrendingPlaybooksResponse, type TrendingPlaybooksSort, UDF_AUTH_REQUIRED_MESSAGE, UDF_CONSENT_REQUEST_MESSAGE, UDF_CONSENT_RESPONSE_MESSAGE, type UdfApi, UdfAuthRequiredError, type UdfButtonEventDetail, type UdfButtonOptions, UdfConsentDeniedError, UdfConsentRequiredError, UdfConsentTimeoutError, type UdfDescriptor, UdfError, UdfExecutionError, UdfFunctionDisabledError, UdfFunctionNotFoundError, UdfInsufficientCredits, type UdfInvokeResponse, UdfPidMismatchError, UdfRateLimitedError, UdfTokenExpiredError, UdfTokenInvalidError, UdfTransportError, VERSION, getViewerToken, installPlaybookRuntime, mapUdfErrorResponse, playbookIdFromToken, subscribe, udf };
|
package/dist/index.js
CHANGED
|
@@ -453,6 +453,29 @@ var FeedResource = class {
|
|
|
453
453
|
`/api/v1/feed/${encodeURIComponent(String(id))}`
|
|
454
454
|
);
|
|
455
455
|
}
|
|
456
|
+
/**
|
|
457
|
+
* Publish or unpublish a feed. Backed by POST /api/v1/feed/:id/visibility.
|
|
458
|
+
*
|
|
459
|
+
* Setting visibility to 'public' publishes the feed (the backend sets
|
|
460
|
+
* feeds.is_public and projects the ALFS public read grant in the same
|
|
461
|
+
* transaction); 'private' unpublishes it. Prefer this over granting the
|
|
462
|
+
* ALFS public read subject directly (e.g. `alva fs grant`), which bypasses
|
|
463
|
+
* the is_public flag and causes drift.
|
|
464
|
+
*
|
|
465
|
+
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
466
|
+
*/
|
|
467
|
+
async setVisibility(params) {
|
|
468
|
+
this.client._requireAuth();
|
|
469
|
+
const id = requireFeedID(params.id);
|
|
470
|
+
if (params.visibility !== "public" && params.visibility !== "private") {
|
|
471
|
+
throw new Error("visibility must be 'public' or 'private'");
|
|
472
|
+
}
|
|
473
|
+
return this.client._request(
|
|
474
|
+
"POST",
|
|
475
|
+
`/api/v1/feed/${encodeURIComponent(String(id))}/visibility`,
|
|
476
|
+
{ body: { visibility: params.visibility } }
|
|
477
|
+
);
|
|
478
|
+
}
|
|
456
479
|
};
|
|
457
480
|
function requireFeedID(id) {
|
|
458
481
|
if (!Number.isInteger(id) || id <= 0) {
|
|
@@ -753,16 +776,6 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
753
776
|
access: "free_and_pro",
|
|
754
777
|
pro_required: false
|
|
755
778
|
},
|
|
756
|
-
{
|
|
757
|
-
skill: "arrays-data-api-spot-market-price-and-volume",
|
|
758
|
-
file: "crypto-detail",
|
|
759
|
-
method: "GET",
|
|
760
|
-
path: "/api/v1/crypto/detail",
|
|
761
|
-
tier: "public",
|
|
762
|
-
required_subscription_tier: "free",
|
|
763
|
-
access: "free_and_pro",
|
|
764
|
-
pro_required: false
|
|
765
|
-
},
|
|
766
779
|
{
|
|
767
780
|
skill: "arrays-data-api-crypto-metrics-and-screener",
|
|
768
781
|
file: "fear-greed-index",
|
|
@@ -803,16 +816,6 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
803
816
|
access: "free_and_pro",
|
|
804
817
|
pro_required: false
|
|
805
818
|
},
|
|
806
|
-
{
|
|
807
|
-
skill: "arrays-data-api-crypto-metrics-and-screener",
|
|
808
|
-
file: "list",
|
|
809
|
-
method: "GET",
|
|
810
|
-
path: "/api/v1/crypto/list",
|
|
811
|
-
tier: "public",
|
|
812
|
-
required_subscription_tier: "free",
|
|
813
|
-
access: "free_and_pro",
|
|
814
|
-
pro_required: false
|
|
815
|
-
},
|
|
816
819
|
{
|
|
817
820
|
skill: "arrays-data-api-crypto-futures-data",
|
|
818
821
|
file: "long-short-ratio",
|
|
@@ -875,9 +878,9 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
875
878
|
},
|
|
876
879
|
{
|
|
877
880
|
skill: "arrays-data-api-crypto-metrics-and-screener",
|
|
878
|
-
file: "
|
|
881
|
+
file: "crypto-detail",
|
|
879
882
|
method: "GET",
|
|
880
|
-
path: "/api/v1/crypto/
|
|
883
|
+
path: "/api/v1/crypto/detail",
|
|
881
884
|
tier: "public",
|
|
882
885
|
required_subscription_tier: "free",
|
|
883
886
|
access: "free_and_pro",
|
|
@@ -1483,6 +1486,26 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
1483
1486
|
access: "pro_only",
|
|
1484
1487
|
pro_required: true
|
|
1485
1488
|
},
|
|
1489
|
+
{
|
|
1490
|
+
skill: "arrays-data-api-options",
|
|
1491
|
+
file: "greeks",
|
|
1492
|
+
method: "GET",
|
|
1493
|
+
path: "/api/v1/options/greeks",
|
|
1494
|
+
tier: "alternative",
|
|
1495
|
+
required_subscription_tier: "pro",
|
|
1496
|
+
access: "pro_only",
|
|
1497
|
+
pro_required: true
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
skill: "arrays-data-api-options",
|
|
1501
|
+
file: "chain",
|
|
1502
|
+
method: "GET",
|
|
1503
|
+
path: "/api/v1/options/chain",
|
|
1504
|
+
tier: "alternative",
|
|
1505
|
+
required_subscription_tier: "pro",
|
|
1506
|
+
access: "pro_only",
|
|
1507
|
+
pro_required: true
|
|
1508
|
+
},
|
|
1486
1509
|
{
|
|
1487
1510
|
skill: "arrays-data-api-equity-fundamentals",
|
|
1488
1511
|
file: "company-executives",
|
|
@@ -1846,6 +1869,66 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
1846
1869
|
required_subscription_tier: "free",
|
|
1847
1870
|
access: "free_and_pro",
|
|
1848
1871
|
pro_required: false
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1875
|
+
file: "dram-spot-price",
|
|
1876
|
+
method: "GET",
|
|
1877
|
+
path: "/api/v1/other/semiconductor/dram-spot-price",
|
|
1878
|
+
tier: "alternative",
|
|
1879
|
+
required_subscription_tier: "pro",
|
|
1880
|
+
access: "pro_only",
|
|
1881
|
+
pro_required: true
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1885
|
+
file: "dram-contract-price",
|
|
1886
|
+
method: "GET",
|
|
1887
|
+
path: "/api/v1/other/semiconductor/dram-contract-price",
|
|
1888
|
+
tier: "alternative",
|
|
1889
|
+
required_subscription_tier: "pro",
|
|
1890
|
+
access: "pro_only",
|
|
1891
|
+
pro_required: true
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1895
|
+
file: "nand-flash-spot-price",
|
|
1896
|
+
method: "GET",
|
|
1897
|
+
path: "/api/v1/other/semiconductor/nand-flash-spot-price",
|
|
1898
|
+
tier: "alternative",
|
|
1899
|
+
required_subscription_tier: "pro",
|
|
1900
|
+
access: "pro_only",
|
|
1901
|
+
pro_required: true
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1905
|
+
file: "nand-flash-contract-price",
|
|
1906
|
+
method: "GET",
|
|
1907
|
+
path: "/api/v1/other/semiconductor/nand-flash-contract-price",
|
|
1908
|
+
tier: "alternative",
|
|
1909
|
+
required_subscription_tier: "pro",
|
|
1910
|
+
access: "pro_only",
|
|
1911
|
+
pro_required: true
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1915
|
+
file: "memory-card-price",
|
|
1916
|
+
method: "GET",
|
|
1917
|
+
path: "/api/v1/other/semiconductor/memory-card-price",
|
|
1918
|
+
tier: "alternative",
|
|
1919
|
+
required_subscription_tier: "pro",
|
|
1920
|
+
access: "pro_only",
|
|
1921
|
+
pro_required: true
|
|
1922
|
+
},
|
|
1923
|
+
{
|
|
1924
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1925
|
+
file: "dxi-index",
|
|
1926
|
+
method: "GET",
|
|
1927
|
+
path: "/api/v1/other/semiconductor/dxi-index",
|
|
1928
|
+
tier: "alternative",
|
|
1929
|
+
required_subscription_tier: "pro",
|
|
1930
|
+
access: "pro_only",
|
|
1931
|
+
pro_required: true
|
|
1849
1932
|
}
|
|
1850
1933
|
];
|
|
1851
1934
|
function getSkillEndpointMetadata(skill, file) {
|
|
@@ -2424,6 +2507,9 @@ var AlertsResource = class {
|
|
|
2424
2507
|
list(params = {}) {
|
|
2425
2508
|
return this.client.subscriptions.list(params);
|
|
2426
2509
|
}
|
|
2510
|
+
follows(params = {}) {
|
|
2511
|
+
return this.client.subscriptions.follows(params);
|
|
2512
|
+
}
|
|
2427
2513
|
enableAutomation(params) {
|
|
2428
2514
|
return this.client.subscriptions.subscribeFeed(params);
|
|
2429
2515
|
}
|
|
@@ -2491,6 +2577,24 @@ var ChannelGroupSubscriptionsResource = class {
|
|
|
2491
2577
|
}
|
|
2492
2578
|
);
|
|
2493
2579
|
}
|
|
2580
|
+
/**
|
|
2581
|
+
* Read a group's buffered chat messages in a time window, for the group-chat
|
|
2582
|
+
* digest automation. Admin-gated: the authenticated caller must be that
|
|
2583
|
+
* group's Alva admin (a digest feed runs as that admin). Each message carries
|
|
2584
|
+
* a `permalink` deep-link back to the original message for "jump to original".
|
|
2585
|
+
* `from_micros`/`to_micros` are message-origin timestamps in microseconds.
|
|
2586
|
+
*/
|
|
2587
|
+
async getGroupChatHistory(params) {
|
|
2588
|
+
this.client._requireAuth();
|
|
2589
|
+
return this.client._request("GET", "/api/v1/channel/group-history", {
|
|
2590
|
+
query: {
|
|
2591
|
+
channel: params.channel,
|
|
2592
|
+
remote_chat_id: params.remote_chat_id,
|
|
2593
|
+
from_micros: String(params.from_micros),
|
|
2594
|
+
to_micros: String(params.to_micros)
|
|
2595
|
+
}
|
|
2596
|
+
});
|
|
2597
|
+
}
|
|
2494
2598
|
};
|
|
2495
2599
|
function mutationBody(params) {
|
|
2496
2600
|
return `{"session_id":${idLiteral(params.session_id)},"target_type":${JSON.stringify(params.target_type)},"target_id":${idLiteral(params.target_id)}}`;
|
|
@@ -3600,7 +3704,7 @@ var installPlaybookRuntime = (targetWindow) => {
|
|
|
3600
3704
|
};
|
|
3601
3705
|
|
|
3602
3706
|
// src/index.ts
|
|
3603
|
-
var VERSION = true ? "0.
|
|
3707
|
+
var VERSION = true ? "0.16.0" : "dev";
|
|
3604
3708
|
export {
|
|
3605
3709
|
AlertsResource,
|
|
3606
3710
|
AlvaClient,
|