@alva-ai/toolkit 0.25.0 → 0.25.2-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/cli.d.ts CHANGED
@@ -2043,6 +2043,69 @@ declare class MarketsResource {
2043
2043
  private graphql;
2044
2044
  }
2045
2045
 
2046
+ type AgentScheduleStatus = 'active' | 'paused' | 'completed' | 'failed';
2047
+ type AgentScheduleFailureCode = 'target_invalid' | 'delivery_exhausted' | 'payload_conflict';
2048
+ type AgentScheduleRule = {
2049
+ kind: 'at';
2050
+ timestamp: string;
2051
+ } | {
2052
+ kind: 'every';
2053
+ interval: string;
2054
+ } | {
2055
+ kind: 'cron';
2056
+ expression: string;
2057
+ timezone: string;
2058
+ };
2059
+ interface AgentScheduleBounds {
2060
+ startsAt?: string;
2061
+ until?: string;
2062
+ maxOccurrences?: number;
2063
+ }
2064
+ interface AgentSchedule {
2065
+ name: string;
2066
+ rule: AgentScheduleRule;
2067
+ bounds: AgentScheduleBounds;
2068
+ text: string;
2069
+ status: AgentScheduleStatus;
2070
+ failure?: {
2071
+ code: AgentScheduleFailureCode;
2072
+ at?: string;
2073
+ };
2074
+ occurrencesUsed: number;
2075
+ nextFireAt?: string;
2076
+ createdAt: string;
2077
+ updatedAt: string;
2078
+ }
2079
+ interface PutAgentScheduleParams {
2080
+ channelId: string | number;
2081
+ name: string;
2082
+ rule: AgentScheduleRule | {
2083
+ kind: 'after';
2084
+ duration: string;
2085
+ };
2086
+ bounds?: AgentScheduleBounds;
2087
+ text: string;
2088
+ }
2089
+ interface ManageAgentScheduleParams {
2090
+ channelId: string | number;
2091
+ name: string;
2092
+ }
2093
+ declare class SchedulesResource {
2094
+ private client;
2095
+ constructor(client: AlvaClient);
2096
+ list(params: {
2097
+ channelId: string | number;
2098
+ }): Promise<AgentSchedule[]>;
2099
+ put(params: PutAgentScheduleParams): Promise<AgentSchedule>;
2100
+ pause(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
2101
+ resume(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
2102
+ delete(params: ManageAgentScheduleParams): Promise<void>;
2103
+ /** Resolve the authenticated viewer's unique Agent Channel for CLI defaults. */
2104
+ agentChannelId(): Promise<string>;
2105
+ private manage;
2106
+ private graphql;
2107
+ }
2108
+
2046
2109
  interface RequestOptions {
2047
2110
  query?: Record<string, unknown>;
2048
2111
  body?: unknown;
@@ -2108,6 +2171,7 @@ declare class AlvaClient {
2108
2171
  private _functions?;
2109
2172
  private _credits?;
2110
2173
  private _markets?;
2174
+ private _schedules?;
2111
2175
  constructor(config: AlvaClientConfig);
2112
2176
  get fs(): FsResource;
2113
2177
  get run(): RunResource;
@@ -2137,6 +2201,7 @@ declare class AlvaClient {
2137
2201
  get functions(): FunctionsResource;
2138
2202
  get credits(): CreditsResource;
2139
2203
  get markets(): MarketsResource;
2204
+ get schedules(): SchedulesResource;
2140
2205
  _requireAuth(): void;
2141
2206
  _request(method: string, path: string, options?: RequestOptions): Promise<unknown>;
2142
2207
  }