@alva-ai/toolkit 0.11.0 → 0.11.1

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/index.d.cts CHANGED
@@ -573,6 +573,25 @@ interface NotificationPreferenceUpdateParams {
573
573
  interface NotificationPreferenceUpdateResponse {
574
574
  setting: NotificationPreference;
575
575
  }
576
+ interface SubmitFeedbackRequest {
577
+ /** Defaults to "agent_detected" on the server. */
578
+ source?: 'agent_detected' | 'user_reported' | 'system_detected' | string;
579
+ /** Defaults to "other" on the server. */
580
+ category?: 'api_error' | 'data_quality' | 'docs' | 'runtime' | 'auth' | 'billing' | 'other' | string;
581
+ /** Defaults to "medium" on the server. */
582
+ severity?: 'low' | 'medium' | 'high' | 'critical' | string;
583
+ summary: string;
584
+ details?: string;
585
+ /** Optional structured diagnostics; omit unless the agent has useful metadata. */
586
+ evidence?: Record<string, unknown>;
587
+ /** Optional structured session metadata; omit unless relevant to triage. */
588
+ context?: Record<string, unknown>;
589
+ }
590
+ interface SubmitFeedbackResponse {
591
+ feedback_id: number;
592
+ notion_page_id: string;
593
+ notion_url: string;
594
+ }
576
595
  /**
577
596
  * Identifies the asset a personal push subscription is keyed to.
578
597
  * `PLAYBOOK` is the only target supported today; `FEED` is reserved for
@@ -1181,6 +1200,12 @@ declare class ChannelGroupSubscriptionsResource {
1181
1200
  unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
1182
1201
  }
1183
1202
 
1203
+ declare class FeedbackResource {
1204
+ private client;
1205
+ constructor(client: AlvaClient);
1206
+ submit(params: SubmitFeedbackRequest): Promise<SubmitFeedbackResponse>;
1207
+ }
1208
+
1184
1209
  interface RequestOptions {
1185
1210
  query?: Record<string, unknown>;
1186
1211
  body?: unknown;
@@ -1223,6 +1248,7 @@ declare class AlvaClient {
1223
1248
  private _notificationPreferences?;
1224
1249
  private _subscriptions?;
1225
1250
  private _channelGroupSubscriptions?;
1251
+ private _feedback?;
1226
1252
  constructor(config: AlvaClientConfig);
1227
1253
  get fs(): FsResource;
1228
1254
  get run(): RunResource;
@@ -1245,6 +1271,7 @@ declare class AlvaClient {
1245
1271
  get notificationPreferences(): NotificationPreferencesResource;
1246
1272
  get subscriptions(): SubscriptionsResource;
1247
1273
  get channelGroupSubscriptions(): ChannelGroupSubscriptionsResource;
1274
+ get feedback(): FeedbackResource;
1248
1275
  _requireAuth(): void;
1249
1276
  _request(method: string, path: string, options?: RequestOptions): Promise<unknown>;
1250
1277
  }
@@ -1370,4 +1397,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
1370
1397
  /** SDK version, injected at build time from package.json. */
1371
1398
  declare const VERSION: string;
1372
1399
 
1373
- export { AlvaClient, type AlvaClientConfig, AlvaError, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, type FeedDeleteRequest, type FeedDeleteResponse, 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 NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, 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, udf };
1400
+ export { AlvaClient, type AlvaClientConfig, AlvaError, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, type FeedDeleteRequest, type FeedDeleteResponse, 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 NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type SubmitFeedbackRequest, type SubmitFeedbackResponse, 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, udf };
package/dist/index.d.ts CHANGED
@@ -573,6 +573,25 @@ interface NotificationPreferenceUpdateParams {
573
573
  interface NotificationPreferenceUpdateResponse {
574
574
  setting: NotificationPreference;
575
575
  }
576
+ interface SubmitFeedbackRequest {
577
+ /** Defaults to "agent_detected" on the server. */
578
+ source?: 'agent_detected' | 'user_reported' | 'system_detected' | string;
579
+ /** Defaults to "other" on the server. */
580
+ category?: 'api_error' | 'data_quality' | 'docs' | 'runtime' | 'auth' | 'billing' | 'other' | string;
581
+ /** Defaults to "medium" on the server. */
582
+ severity?: 'low' | 'medium' | 'high' | 'critical' | string;
583
+ summary: string;
584
+ details?: string;
585
+ /** Optional structured diagnostics; omit unless the agent has useful metadata. */
586
+ evidence?: Record<string, unknown>;
587
+ /** Optional structured session metadata; omit unless relevant to triage. */
588
+ context?: Record<string, unknown>;
589
+ }
590
+ interface SubmitFeedbackResponse {
591
+ feedback_id: number;
592
+ notion_page_id: string;
593
+ notion_url: string;
594
+ }
576
595
  /**
577
596
  * Identifies the asset a personal push subscription is keyed to.
578
597
  * `PLAYBOOK` is the only target supported today; `FEED` is reserved for
@@ -1181,6 +1200,12 @@ declare class ChannelGroupSubscriptionsResource {
1181
1200
  unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
1182
1201
  }
1183
1202
 
1203
+ declare class FeedbackResource {
1204
+ private client;
1205
+ constructor(client: AlvaClient);
1206
+ submit(params: SubmitFeedbackRequest): Promise<SubmitFeedbackResponse>;
1207
+ }
1208
+
1184
1209
  interface RequestOptions {
1185
1210
  query?: Record<string, unknown>;
1186
1211
  body?: unknown;
@@ -1223,6 +1248,7 @@ declare class AlvaClient {
1223
1248
  private _notificationPreferences?;
1224
1249
  private _subscriptions?;
1225
1250
  private _channelGroupSubscriptions?;
1251
+ private _feedback?;
1226
1252
  constructor(config: AlvaClientConfig);
1227
1253
  get fs(): FsResource;
1228
1254
  get run(): RunResource;
@@ -1245,6 +1271,7 @@ declare class AlvaClient {
1245
1271
  get notificationPreferences(): NotificationPreferencesResource;
1246
1272
  get subscriptions(): SubscriptionsResource;
1247
1273
  get channelGroupSubscriptions(): ChannelGroupSubscriptionsResource;
1274
+ get feedback(): FeedbackResource;
1248
1275
  _requireAuth(): void;
1249
1276
  _request(method: string, path: string, options?: RequestOptions): Promise<unknown>;
1250
1277
  }
@@ -1370,4 +1397,4 @@ declare const installPlaybookRuntime: (targetWindow?: Window) => void;
1370
1397
  /** SDK version, injected at build time from package.json. */
1371
1398
  declare const VERSION: string;
1372
1399
 
1373
- export { AlvaClient, type AlvaClientConfig, AlvaError, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, type FeedDeleteRequest, type FeedDeleteResponse, 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 NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, 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, udf };
1400
+ export { AlvaClient, type AlvaClientConfig, AlvaError, type ChannelGroupAdminInfo, type ChannelGroupCallerInfo, type ChannelGroupSubscription, type ChannelGroupSubscriptionContextResponse, type ChannelGroupSubscriptionListResponse, type ChannelGroupSubscriptionMutationParams, type ChannelGroupSubscriptionMutationResponse, type ChannelGroupSubscriptionSessionParams, type ChannelGroupSubscriptionTarget, type ChannelGroupSubscriptionTargetType, type FeedDeleteRequest, type FeedDeleteResponse, 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 NotificationPreference, type NotificationPreferenceKey, type NotificationPreferenceUpdateParams, type NotificationPreferenceUpdateResponse, type NotificationPreferencesResponse, PBSV_UPDATE_MESSAGE, type PlaybookSkillFile, type PlaybookSkillFileMeta, type PlaybookSkillMeta, type PlaybookSkillSummary, type PlaybookSkillTagEntry, type SkillDoc, type SkillEndpointMetadata, type SkillEndpointTier, type SkillMetadata, type SkillSummary, type SubmitFeedbackRequest, type SubmitFeedbackResponse, 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, udf };
package/dist/index.js CHANGED
@@ -2153,6 +2153,20 @@ function idLiteral(value) {
2153
2153
  return value;
2154
2154
  }
2155
2155
 
2156
+ // src/resources/feedback.ts
2157
+ var FeedbackResource = class {
2158
+ constructor(client) {
2159
+ this.client = client;
2160
+ }
2161
+ client;
2162
+ async submit(params) {
2163
+ this.client._requireAuth();
2164
+ return this.client._request("POST", "/api/v1/feedback", {
2165
+ body: params
2166
+ });
2167
+ }
2168
+ };
2169
+
2156
2170
  // src/client.ts
2157
2171
  var DEFAULT_BASE_URL = "https://api-llm.prd.alva.ai";
2158
2172
  var DEFAULT_ARRAYS_BASE_URL = "https://data-tools.prd.space.id";
@@ -2186,6 +2200,7 @@ var AlvaClient = class {
2186
2200
  _notificationPreferences;
2187
2201
  _subscriptions;
2188
2202
  _channelGroupSubscriptions;
2203
+ _feedback;
2189
2204
  constructor(config) {
2190
2205
  this.baseUrl = config.baseUrl ?? DEFAULT_BASE_URL;
2191
2206
  this.arraysBaseUrl = config.arraysBaseUrl ?? DEFAULT_ARRAYS_BASE_URL;
@@ -2259,6 +2274,9 @@ var AlvaClient = class {
2259
2274
  get channelGroupSubscriptions() {
2260
2275
  return this._channelGroupSubscriptions ??= new ChannelGroupSubscriptionsResource(this);
2261
2276
  }
2277
+ get feedback() {
2278
+ return this._feedback ??= new FeedbackResource(this);
2279
+ }
2262
2280
  _requireAuth() {
2263
2281
  if (!this.pbsvToken && !this.viewer_token && !this.apiKey) {
2264
2282
  throw new AlvaError(
@@ -2743,7 +2761,7 @@ var installPlaybookRuntime = (targetWindow) => {
2743
2761
  };
2744
2762
 
2745
2763
  // src/index.ts
2746
- var VERSION = true ? "0.11.0" : "dev";
2764
+ var VERSION = true ? "0.11.1" : "dev";
2747
2765
  export {
2748
2766
  AlvaClient,
2749
2767
  AlvaError,