@alva-ai/toolkit 0.15.1-beta.0 → 0.16.1-beta.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 +74 -0
- package/dist/cli.js +269 -32
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +129 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -1
- package/dist/index.d.ts +75 -1
- package/dist/index.js +129 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -194,6 +194,13 @@ interface CronjobCreateRequest {
|
|
|
194
194
|
* A string: SA ids are snowflake int64s that overflow JS number precision.
|
|
195
195
|
*/
|
|
196
196
|
run_as_user_id?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Lifetime ceiling (RFC3339 timestamp). Once now >= end_at the runner
|
|
199
|
+
* self-terminates the cronjob before running (backend#1799). Omitted ⇒ no
|
|
200
|
+
* expiry. The `alva loop create` sugar sets this to now + (expires_in ?? 7d);
|
|
201
|
+
* feeds and other crons leave it unset.
|
|
202
|
+
*/
|
|
203
|
+
end_at?: string;
|
|
197
204
|
}
|
|
198
205
|
interface Cronjob {
|
|
199
206
|
id: number;
|
|
@@ -210,6 +217,11 @@ interface Cronjob {
|
|
|
210
217
|
* A string: snowflake int64 ids overflow JS number precision.
|
|
211
218
|
*/
|
|
212
219
|
run_as_user_id: string;
|
|
220
|
+
/**
|
|
221
|
+
* Lifetime ceiling (RFC3339), or null/omitted when the cronjob has no expiry.
|
|
222
|
+
* Set by `alva loop create`; unset for feeds and other crons.
|
|
223
|
+
*/
|
|
224
|
+
end_at?: string | null;
|
|
213
225
|
created_at: string;
|
|
214
226
|
updated_at: string;
|
|
215
227
|
}
|
|
@@ -371,6 +383,20 @@ interface FeedDeleteResponse {
|
|
|
371
383
|
/** Echoed feed id (string form, matching gateway response). */
|
|
372
384
|
id: string;
|
|
373
385
|
}
|
|
386
|
+
/** Feed visibility: 'public' publishes the feed, 'private' unpublishes it. */
|
|
387
|
+
type FeedVisibility = 'public' | 'private';
|
|
388
|
+
interface FeedSetVisibilityRequest {
|
|
389
|
+
/** Numeric feed id to publish/unpublish. */
|
|
390
|
+
id: number;
|
|
391
|
+
/** Target visibility. */
|
|
392
|
+
visibility: FeedVisibility;
|
|
393
|
+
}
|
|
394
|
+
interface FeedSetVisibilityResponse {
|
|
395
|
+
/** Echoed feed id (string form, matching gateway response). */
|
|
396
|
+
id: string;
|
|
397
|
+
/** Feed visibility after the update. */
|
|
398
|
+
visibility: FeedVisibility;
|
|
399
|
+
}
|
|
374
400
|
interface PlaybookDraftRequest {
|
|
375
401
|
name: string;
|
|
376
402
|
display_name: string;
|
|
@@ -917,6 +943,33 @@ interface ChannelGroupSubscriptionMutationResponse {
|
|
|
917
943
|
admin: ChannelGroupAdminInfo | null;
|
|
918
944
|
subscriptions: ChannelGroupSubscription[];
|
|
919
945
|
}
|
|
946
|
+
/** Params for reading a group's buffered chat history (group-chat digest). */
|
|
947
|
+
interface ChannelGroupHistoryParams {
|
|
948
|
+
/** Platform: "telegram" | "discord" | "slack". */
|
|
949
|
+
channel: string;
|
|
950
|
+
/** Platform group/channel id. */
|
|
951
|
+
remote_chat_id: string;
|
|
952
|
+
/** Window start, message-origin timestamp in microseconds (inclusive). */
|
|
953
|
+
from_micros: number | string;
|
|
954
|
+
/** Window end, message-origin timestamp in microseconds (inclusive). */
|
|
955
|
+
to_micros: number | string;
|
|
956
|
+
}
|
|
957
|
+
/** One buffered group message, projected for the digest. */
|
|
958
|
+
interface GroupChatMessage {
|
|
959
|
+
sender_username: string;
|
|
960
|
+
content: string;
|
|
961
|
+
/** "[photo]" etc. when the message carried media. */
|
|
962
|
+
media_summary: string;
|
|
963
|
+
ts_micros: number;
|
|
964
|
+
/** Deep link back to the original message; empty when unavailable. */
|
|
965
|
+
permalink: string;
|
|
966
|
+
/** "user" | "assistant" (bot replies). */
|
|
967
|
+
role: string;
|
|
968
|
+
}
|
|
969
|
+
interface ChannelGroupHistoryResponse {
|
|
970
|
+
/** Chronological (ts ascending). */
|
|
971
|
+
messages: GroupChatMessage[];
|
|
972
|
+
}
|
|
920
973
|
interface ServiceAccount {
|
|
921
974
|
id: string;
|
|
922
975
|
display_name: string;
|
|
@@ -1071,6 +1124,18 @@ declare class FeedResource {
|
|
|
1071
1124
|
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
1072
1125
|
*/
|
|
1073
1126
|
delete(params: FeedDeleteRequest): Promise<FeedDeleteResponse>;
|
|
1127
|
+
/**
|
|
1128
|
+
* Publish or unpublish a feed. Backed by POST /api/v1/feed/:id/visibility.
|
|
1129
|
+
*
|
|
1130
|
+
* Setting visibility to 'public' publishes the feed (the backend sets
|
|
1131
|
+
* feeds.is_public and projects the ALFS public read grant in the same
|
|
1132
|
+
* transaction); 'private' unpublishes it. Prefer this over granting the
|
|
1133
|
+
* ALFS public read subject directly (e.g. `alva fs grant`), which bypasses
|
|
1134
|
+
* the is_public flag and causes drift.
|
|
1135
|
+
*
|
|
1136
|
+
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
1137
|
+
*/
|
|
1138
|
+
setVisibility(params: FeedSetVisibilityRequest): Promise<FeedSetVisibilityResponse>;
|
|
1074
1139
|
}
|
|
1075
1140
|
|
|
1076
1141
|
/**
|
|
@@ -1553,6 +1618,7 @@ declare class AlertsResource {
|
|
|
1553
1618
|
private client;
|
|
1554
1619
|
constructor(client: AlvaClient);
|
|
1555
1620
|
list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
|
|
1621
|
+
follows(params?: FollowsListParams): Promise<FollowsListResponse>;
|
|
1556
1622
|
enableAutomation(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
|
|
1557
1623
|
disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
|
|
1558
1624
|
enablePlaybook(params: PushSubscriptionPlaybookParams): Promise<SubscribePlaybookResponse>;
|
|
@@ -1578,6 +1644,14 @@ declare class ChannelGroupSubscriptionsResource {
|
|
|
1578
1644
|
list(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionListResponse>;
|
|
1579
1645
|
subscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
1580
1646
|
unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Read a group's buffered chat messages in a time window, for the group-chat
|
|
1649
|
+
* digest automation. Admin-gated: the authenticated caller must be that
|
|
1650
|
+
* group's Alva admin (a digest feed runs as that admin). Each message carries
|
|
1651
|
+
* a `permalink` deep-link back to the original message for "jump to original".
|
|
1652
|
+
* `from_micros`/`to_micros` are message-origin timestamps in microseconds.
|
|
1653
|
+
*/
|
|
1654
|
+
getGroupChatHistory(params: ChannelGroupHistoryParams): Promise<ChannelGroupHistoryResponse>;
|
|
1581
1655
|
}
|
|
1582
1656
|
|
|
1583
1657
|
declare class FeedbackResource {
|
|
@@ -1928,4 +2002,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
|
|
|
1928
2002
|
/** SDK version, injected at build time from package.json. */
|
|
1929
2003
|
declare const VERSION: string;
|
|
1930
2004
|
|
|
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 };
|
|
2005
|
+
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
|
@@ -194,6 +194,13 @@ interface CronjobCreateRequest {
|
|
|
194
194
|
* A string: SA ids are snowflake int64s that overflow JS number precision.
|
|
195
195
|
*/
|
|
196
196
|
run_as_user_id?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Lifetime ceiling (RFC3339 timestamp). Once now >= end_at the runner
|
|
199
|
+
* self-terminates the cronjob before running (backend#1799). Omitted ⇒ no
|
|
200
|
+
* expiry. The `alva loop create` sugar sets this to now + (expires_in ?? 7d);
|
|
201
|
+
* feeds and other crons leave it unset.
|
|
202
|
+
*/
|
|
203
|
+
end_at?: string;
|
|
197
204
|
}
|
|
198
205
|
interface Cronjob {
|
|
199
206
|
id: number;
|
|
@@ -210,6 +217,11 @@ interface Cronjob {
|
|
|
210
217
|
* A string: snowflake int64 ids overflow JS number precision.
|
|
211
218
|
*/
|
|
212
219
|
run_as_user_id: string;
|
|
220
|
+
/**
|
|
221
|
+
* Lifetime ceiling (RFC3339), or null/omitted when the cronjob has no expiry.
|
|
222
|
+
* Set by `alva loop create`; unset for feeds and other crons.
|
|
223
|
+
*/
|
|
224
|
+
end_at?: string | null;
|
|
213
225
|
created_at: string;
|
|
214
226
|
updated_at: string;
|
|
215
227
|
}
|
|
@@ -371,6 +383,20 @@ interface FeedDeleteResponse {
|
|
|
371
383
|
/** Echoed feed id (string form, matching gateway response). */
|
|
372
384
|
id: string;
|
|
373
385
|
}
|
|
386
|
+
/** Feed visibility: 'public' publishes the feed, 'private' unpublishes it. */
|
|
387
|
+
type FeedVisibility = 'public' | 'private';
|
|
388
|
+
interface FeedSetVisibilityRequest {
|
|
389
|
+
/** Numeric feed id to publish/unpublish. */
|
|
390
|
+
id: number;
|
|
391
|
+
/** Target visibility. */
|
|
392
|
+
visibility: FeedVisibility;
|
|
393
|
+
}
|
|
394
|
+
interface FeedSetVisibilityResponse {
|
|
395
|
+
/** Echoed feed id (string form, matching gateway response). */
|
|
396
|
+
id: string;
|
|
397
|
+
/** Feed visibility after the update. */
|
|
398
|
+
visibility: FeedVisibility;
|
|
399
|
+
}
|
|
374
400
|
interface PlaybookDraftRequest {
|
|
375
401
|
name: string;
|
|
376
402
|
display_name: string;
|
|
@@ -917,6 +943,33 @@ interface ChannelGroupSubscriptionMutationResponse {
|
|
|
917
943
|
admin: ChannelGroupAdminInfo | null;
|
|
918
944
|
subscriptions: ChannelGroupSubscription[];
|
|
919
945
|
}
|
|
946
|
+
/** Params for reading a group's buffered chat history (group-chat digest). */
|
|
947
|
+
interface ChannelGroupHistoryParams {
|
|
948
|
+
/** Platform: "telegram" | "discord" | "slack". */
|
|
949
|
+
channel: string;
|
|
950
|
+
/** Platform group/channel id. */
|
|
951
|
+
remote_chat_id: string;
|
|
952
|
+
/** Window start, message-origin timestamp in microseconds (inclusive). */
|
|
953
|
+
from_micros: number | string;
|
|
954
|
+
/** Window end, message-origin timestamp in microseconds (inclusive). */
|
|
955
|
+
to_micros: number | string;
|
|
956
|
+
}
|
|
957
|
+
/** One buffered group message, projected for the digest. */
|
|
958
|
+
interface GroupChatMessage {
|
|
959
|
+
sender_username: string;
|
|
960
|
+
content: string;
|
|
961
|
+
/** "[photo]" etc. when the message carried media. */
|
|
962
|
+
media_summary: string;
|
|
963
|
+
ts_micros: number;
|
|
964
|
+
/** Deep link back to the original message; empty when unavailable. */
|
|
965
|
+
permalink: string;
|
|
966
|
+
/** "user" | "assistant" (bot replies). */
|
|
967
|
+
role: string;
|
|
968
|
+
}
|
|
969
|
+
interface ChannelGroupHistoryResponse {
|
|
970
|
+
/** Chronological (ts ascending). */
|
|
971
|
+
messages: GroupChatMessage[];
|
|
972
|
+
}
|
|
920
973
|
interface ServiceAccount {
|
|
921
974
|
id: string;
|
|
922
975
|
display_name: string;
|
|
@@ -1071,6 +1124,18 @@ declare class FeedResource {
|
|
|
1071
1124
|
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
1072
1125
|
*/
|
|
1073
1126
|
delete(params: FeedDeleteRequest): Promise<FeedDeleteResponse>;
|
|
1127
|
+
/**
|
|
1128
|
+
* Publish or unpublish a feed. Backed by POST /api/v1/feed/:id/visibility.
|
|
1129
|
+
*
|
|
1130
|
+
* Setting visibility to 'public' publishes the feed (the backend sets
|
|
1131
|
+
* feeds.is_public and projects the ALFS public read grant in the same
|
|
1132
|
+
* transaction); 'private' unpublishes it. Prefer this over granting the
|
|
1133
|
+
* ALFS public read subject directly (e.g. `alva fs grant`), which bypasses
|
|
1134
|
+
* the is_public flag and causes drift.
|
|
1135
|
+
*
|
|
1136
|
+
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
1137
|
+
*/
|
|
1138
|
+
setVisibility(params: FeedSetVisibilityRequest): Promise<FeedSetVisibilityResponse>;
|
|
1074
1139
|
}
|
|
1075
1140
|
|
|
1076
1141
|
/**
|
|
@@ -1553,6 +1618,7 @@ declare class AlertsResource {
|
|
|
1553
1618
|
private client;
|
|
1554
1619
|
constructor(client: AlvaClient);
|
|
1555
1620
|
list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
|
|
1621
|
+
follows(params?: FollowsListParams): Promise<FollowsListResponse>;
|
|
1556
1622
|
enableAutomation(params: PushSubscriptionFeedParams): Promise<SubscribeFeedResponse>;
|
|
1557
1623
|
disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
|
|
1558
1624
|
enablePlaybook(params: PushSubscriptionPlaybookParams): Promise<SubscribePlaybookResponse>;
|
|
@@ -1578,6 +1644,14 @@ declare class ChannelGroupSubscriptionsResource {
|
|
|
1578
1644
|
list(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionListResponse>;
|
|
1579
1645
|
subscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
1580
1646
|
unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Read a group's buffered chat messages in a time window, for the group-chat
|
|
1649
|
+
* digest automation. Admin-gated: the authenticated caller must be that
|
|
1650
|
+
* group's Alva admin (a digest feed runs as that admin). Each message carries
|
|
1651
|
+
* a `permalink` deep-link back to the original message for "jump to original".
|
|
1652
|
+
* `from_micros`/`to_micros` are message-origin timestamps in microseconds.
|
|
1653
|
+
*/
|
|
1654
|
+
getGroupChatHistory(params: ChannelGroupHistoryParams): Promise<ChannelGroupHistoryResponse>;
|
|
1581
1655
|
}
|
|
1582
1656
|
|
|
1583
1657
|
declare class FeedbackResource {
|
|
@@ -1928,4 +2002,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
|
|
|
1928
2002
|
/** SDK version, injected at build time from package.json. */
|
|
1929
2003
|
declare const VERSION: string;
|
|
1930
2004
|
|
|
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 };
|
|
2005
|
+
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
|
@@ -219,7 +219,8 @@ var DeployResource = class {
|
|
|
219
219
|
args: params.args,
|
|
220
220
|
push_notify: params.push_notify,
|
|
221
221
|
max_heap_size_mb: params.max_heap_size_mb,
|
|
222
|
-
run_as_user_id: params.run_as_user_id
|
|
222
|
+
run_as_user_id: params.run_as_user_id,
|
|
223
|
+
end_at: params.end_at
|
|
223
224
|
}
|
|
224
225
|
});
|
|
225
226
|
}
|
|
@@ -453,6 +454,29 @@ var FeedResource = class {
|
|
|
453
454
|
`/api/v1/feed/${encodeURIComponent(String(id))}`
|
|
454
455
|
);
|
|
455
456
|
}
|
|
457
|
+
/**
|
|
458
|
+
* Publish or unpublish a feed. Backed by POST /api/v1/feed/:id/visibility.
|
|
459
|
+
*
|
|
460
|
+
* Setting visibility to 'public' publishes the feed (the backend sets
|
|
461
|
+
* feeds.is_public and projects the ALFS public read grant in the same
|
|
462
|
+
* transaction); 'private' unpublishes it. Prefer this over granting the
|
|
463
|
+
* ALFS public read subject directly (e.g. `alva fs grant`), which bypasses
|
|
464
|
+
* the is_public flag and causes drift.
|
|
465
|
+
*
|
|
466
|
+
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
467
|
+
*/
|
|
468
|
+
async setVisibility(params) {
|
|
469
|
+
this.client._requireAuth();
|
|
470
|
+
const id = requireFeedID(params.id);
|
|
471
|
+
if (params.visibility !== "public" && params.visibility !== "private") {
|
|
472
|
+
throw new Error("visibility must be 'public' or 'private'");
|
|
473
|
+
}
|
|
474
|
+
return this.client._request(
|
|
475
|
+
"POST",
|
|
476
|
+
`/api/v1/feed/${encodeURIComponent(String(id))}/visibility`,
|
|
477
|
+
{ body: { visibility: params.visibility } }
|
|
478
|
+
);
|
|
479
|
+
}
|
|
456
480
|
};
|
|
457
481
|
function requireFeedID(id) {
|
|
458
482
|
if (!Number.isInteger(id) || id <= 0) {
|
|
@@ -753,16 +777,6 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
753
777
|
access: "free_and_pro",
|
|
754
778
|
pro_required: false
|
|
755
779
|
},
|
|
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
780
|
{
|
|
767
781
|
skill: "arrays-data-api-crypto-metrics-and-screener",
|
|
768
782
|
file: "fear-greed-index",
|
|
@@ -803,16 +817,6 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
803
817
|
access: "free_and_pro",
|
|
804
818
|
pro_required: false
|
|
805
819
|
},
|
|
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
820
|
{
|
|
817
821
|
skill: "arrays-data-api-crypto-futures-data",
|
|
818
822
|
file: "long-short-ratio",
|
|
@@ -875,9 +879,9 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
875
879
|
},
|
|
876
880
|
{
|
|
877
881
|
skill: "arrays-data-api-crypto-metrics-and-screener",
|
|
878
|
-
file: "
|
|
882
|
+
file: "crypto-detail",
|
|
879
883
|
method: "GET",
|
|
880
|
-
path: "/api/v1/crypto/
|
|
884
|
+
path: "/api/v1/crypto/detail",
|
|
881
885
|
tier: "public",
|
|
882
886
|
required_subscription_tier: "free",
|
|
883
887
|
access: "free_and_pro",
|
|
@@ -1483,6 +1487,26 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
1483
1487
|
access: "pro_only",
|
|
1484
1488
|
pro_required: true
|
|
1485
1489
|
},
|
|
1490
|
+
{
|
|
1491
|
+
skill: "arrays-data-api-options",
|
|
1492
|
+
file: "greeks",
|
|
1493
|
+
method: "GET",
|
|
1494
|
+
path: "/api/v1/options/greeks",
|
|
1495
|
+
tier: "alternative",
|
|
1496
|
+
required_subscription_tier: "pro",
|
|
1497
|
+
access: "pro_only",
|
|
1498
|
+
pro_required: true
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
skill: "arrays-data-api-options",
|
|
1502
|
+
file: "chain",
|
|
1503
|
+
method: "GET",
|
|
1504
|
+
path: "/api/v1/options/chain",
|
|
1505
|
+
tier: "alternative",
|
|
1506
|
+
required_subscription_tier: "pro",
|
|
1507
|
+
access: "pro_only",
|
|
1508
|
+
pro_required: true
|
|
1509
|
+
},
|
|
1486
1510
|
{
|
|
1487
1511
|
skill: "arrays-data-api-equity-fundamentals",
|
|
1488
1512
|
file: "company-executives",
|
|
@@ -1846,6 +1870,66 @@ var SKILL_ENDPOINT_METADATA = [
|
|
|
1846
1870
|
required_subscription_tier: "free",
|
|
1847
1871
|
access: "free_and_pro",
|
|
1848
1872
|
pro_required: false
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1876
|
+
file: "dram-spot-price",
|
|
1877
|
+
method: "GET",
|
|
1878
|
+
path: "/api/v1/other/semiconductor/dram-spot-price",
|
|
1879
|
+
tier: "alternative",
|
|
1880
|
+
required_subscription_tier: "pro",
|
|
1881
|
+
access: "pro_only",
|
|
1882
|
+
pro_required: true
|
|
1883
|
+
},
|
|
1884
|
+
{
|
|
1885
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1886
|
+
file: "dram-contract-price",
|
|
1887
|
+
method: "GET",
|
|
1888
|
+
path: "/api/v1/other/semiconductor/dram-contract-price",
|
|
1889
|
+
tier: "alternative",
|
|
1890
|
+
required_subscription_tier: "pro",
|
|
1891
|
+
access: "pro_only",
|
|
1892
|
+
pro_required: true
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1896
|
+
file: "nand-flash-spot-price",
|
|
1897
|
+
method: "GET",
|
|
1898
|
+
path: "/api/v1/other/semiconductor/nand-flash-spot-price",
|
|
1899
|
+
tier: "alternative",
|
|
1900
|
+
required_subscription_tier: "pro",
|
|
1901
|
+
access: "pro_only",
|
|
1902
|
+
pro_required: true
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1906
|
+
file: "nand-flash-contract-price",
|
|
1907
|
+
method: "GET",
|
|
1908
|
+
path: "/api/v1/other/semiconductor/nand-flash-contract-price",
|
|
1909
|
+
tier: "alternative",
|
|
1910
|
+
required_subscription_tier: "pro",
|
|
1911
|
+
access: "pro_only",
|
|
1912
|
+
pro_required: true
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1916
|
+
file: "memory-card-price",
|
|
1917
|
+
method: "GET",
|
|
1918
|
+
path: "/api/v1/other/semiconductor/memory-card-price",
|
|
1919
|
+
tier: "alternative",
|
|
1920
|
+
required_subscription_tier: "pro",
|
|
1921
|
+
access: "pro_only",
|
|
1922
|
+
pro_required: true
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
skill: "arrays-data-api-semiconductor-price",
|
|
1926
|
+
file: "dxi-index",
|
|
1927
|
+
method: "GET",
|
|
1928
|
+
path: "/api/v1/other/semiconductor/dxi-index",
|
|
1929
|
+
tier: "alternative",
|
|
1930
|
+
required_subscription_tier: "pro",
|
|
1931
|
+
access: "pro_only",
|
|
1932
|
+
pro_required: true
|
|
1849
1933
|
}
|
|
1850
1934
|
];
|
|
1851
1935
|
function getSkillEndpointMetadata(skill, file) {
|
|
@@ -2424,6 +2508,9 @@ var AlertsResource = class {
|
|
|
2424
2508
|
list(params = {}) {
|
|
2425
2509
|
return this.client.subscriptions.list(params);
|
|
2426
2510
|
}
|
|
2511
|
+
follows(params = {}) {
|
|
2512
|
+
return this.client.subscriptions.follows(params);
|
|
2513
|
+
}
|
|
2427
2514
|
enableAutomation(params) {
|
|
2428
2515
|
return this.client.subscriptions.subscribeFeed(params);
|
|
2429
2516
|
}
|
|
@@ -2491,6 +2578,24 @@ var ChannelGroupSubscriptionsResource = class {
|
|
|
2491
2578
|
}
|
|
2492
2579
|
);
|
|
2493
2580
|
}
|
|
2581
|
+
/**
|
|
2582
|
+
* Read a group's buffered chat messages in a time window, for the group-chat
|
|
2583
|
+
* digest automation. Admin-gated: the authenticated caller must be that
|
|
2584
|
+
* group's Alva admin (a digest feed runs as that admin). Each message carries
|
|
2585
|
+
* a `permalink` deep-link back to the original message for "jump to original".
|
|
2586
|
+
* `from_micros`/`to_micros` are message-origin timestamps in microseconds.
|
|
2587
|
+
*/
|
|
2588
|
+
async getGroupChatHistory(params) {
|
|
2589
|
+
this.client._requireAuth();
|
|
2590
|
+
return this.client._request("GET", "/api/v1/channel/group-history", {
|
|
2591
|
+
query: {
|
|
2592
|
+
channel: params.channel,
|
|
2593
|
+
remote_chat_id: params.remote_chat_id,
|
|
2594
|
+
from_micros: String(params.from_micros),
|
|
2595
|
+
to_micros: String(params.to_micros)
|
|
2596
|
+
}
|
|
2597
|
+
});
|
|
2598
|
+
}
|
|
2494
2599
|
};
|
|
2495
2600
|
function mutationBody(params) {
|
|
2496
2601
|
return `{"session_id":${idLiteral(params.session_id)},"target_type":${JSON.stringify(params.target_type)},"target_id":${idLiteral(params.target_id)}}`;
|
|
@@ -3600,7 +3705,7 @@ var installPlaybookRuntime = (targetWindow) => {
|
|
|
3600
3705
|
};
|
|
3601
3706
|
|
|
3602
3707
|
// src/index.ts
|
|
3603
|
-
var VERSION = true ? "0.
|
|
3708
|
+
var VERSION = true ? "0.16.1-beta.0" : "dev";
|
|
3604
3709
|
export {
|
|
3605
3710
|
AlertsResource,
|
|
3606
3711
|
AlvaClient,
|