@alva-ai/toolkit 0.24.0 → 0.25.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/index.d.cts CHANGED
@@ -372,8 +372,8 @@ interface FeedReleaseResponse {
372
372
  feed_path: string;
373
373
  }
374
374
  interface FeedDeleteRequest {
375
- /** Numeric feed id to delete. */
376
- id: number;
375
+ /** Positive decimal feed id. String form preserves int64 precision. */
376
+ id: number | string;
377
377
  }
378
378
  type FeedListStatus = 'active' | 'paused' | 'all';
379
379
  interface FeedListParams {
@@ -400,14 +400,16 @@ interface FeedListResponse {
400
400
  has_more: boolean;
401
401
  }
402
402
  interface AutomationInspectRequest {
403
- /** Numeric automation id. Currently the same underlying feed id. */
404
- id: number;
403
+ /** Positive decimal automation id. String form preserves int64 precision. */
404
+ id: number | string;
405
405
  }
406
406
  interface AutomationInspectResponse {
407
407
  /** Numeric automation id encoded as a string, matching the gateway response. */
408
408
  id: string;
409
409
  /** Backing feed id encoded as a string. */
410
410
  feed_id: string;
411
+ /** Backing producer cronjob id used by lifecycle and run operations. */
412
+ cronjob_id?: number;
411
413
  name: string;
412
414
  description?: string;
413
415
  /** Automation runtime status. */
@@ -486,8 +488,8 @@ interface AutomationAlertDeliveryUpdateResponse {
486
488
  };
487
489
  }
488
490
  interface FeedStatusUpdateRequest {
489
- /** Numeric feed id to stop/resume. */
490
- id: number;
491
+ /** Positive decimal feed id. String form preserves int64 precision. */
492
+ id: number | string;
491
493
  }
492
494
  interface FeedStatusUpdateResponse {
493
495
  /** Echoed feed id (string form, matching gateway response). */
@@ -502,8 +504,8 @@ interface FeedDeleteResponse {
502
504
  /** Feed visibility: 'public' publishes the feed, 'private' unpublishes it. */
503
505
  type FeedVisibility = 'public' | 'private';
504
506
  interface FeedSetVisibilityRequest {
505
- /** Numeric feed id to publish/unpublish. */
506
- id: number;
507
+ /** Positive decimal feed id. String form preserves int64 precision. */
508
+ id: number | string;
507
509
  /** Target visibility. */
508
510
  visibility: FeedVisibility;
509
511
  }
package/dist/index.d.ts CHANGED
@@ -372,8 +372,8 @@ interface FeedReleaseResponse {
372
372
  feed_path: string;
373
373
  }
374
374
  interface FeedDeleteRequest {
375
- /** Numeric feed id to delete. */
376
- id: number;
375
+ /** Positive decimal feed id. String form preserves int64 precision. */
376
+ id: number | string;
377
377
  }
378
378
  type FeedListStatus = 'active' | 'paused' | 'all';
379
379
  interface FeedListParams {
@@ -400,14 +400,16 @@ interface FeedListResponse {
400
400
  has_more: boolean;
401
401
  }
402
402
  interface AutomationInspectRequest {
403
- /** Numeric automation id. Currently the same underlying feed id. */
404
- id: number;
403
+ /** Positive decimal automation id. String form preserves int64 precision. */
404
+ id: number | string;
405
405
  }
406
406
  interface AutomationInspectResponse {
407
407
  /** Numeric automation id encoded as a string, matching the gateway response. */
408
408
  id: string;
409
409
  /** Backing feed id encoded as a string. */
410
410
  feed_id: string;
411
+ /** Backing producer cronjob id used by lifecycle and run operations. */
412
+ cronjob_id?: number;
411
413
  name: string;
412
414
  description?: string;
413
415
  /** Automation runtime status. */
@@ -486,8 +488,8 @@ interface AutomationAlertDeliveryUpdateResponse {
486
488
  };
487
489
  }
488
490
  interface FeedStatusUpdateRequest {
489
- /** Numeric feed id to stop/resume. */
490
- id: number;
491
+ /** Positive decimal feed id. String form preserves int64 precision. */
492
+ id: number | string;
491
493
  }
492
494
  interface FeedStatusUpdateResponse {
493
495
  /** Echoed feed id (string form, matching gateway response). */
@@ -502,8 +504,8 @@ interface FeedDeleteResponse {
502
504
  /** Feed visibility: 'public' publishes the feed, 'private' unpublishes it. */
503
505
  type FeedVisibility = 'public' | 'private';
504
506
  interface FeedSetVisibilityRequest {
505
- /** Numeric feed id to publish/unpublish. */
506
- id: number;
507
+ /** Positive decimal feed id. String form preserves int64 precision. */
508
+ id: number | string;
507
509
  /** Target visibility. */
508
510
  visibility: FeedVisibility;
509
511
  }
package/dist/index.js CHANGED
@@ -661,7 +661,13 @@ var FeedResource = class {
661
661
  }
662
662
  };
663
663
  function requireFeedID(id) {
664
- if (!Number.isInteger(id) || id <= 0) {
664
+ if (typeof id === "string") {
665
+ if (!/^[1-9]\d*$/.test(id)) {
666
+ throw new Error("feed id must be a positive integer");
667
+ }
668
+ return id;
669
+ }
670
+ if (!Number.isSafeInteger(id) || id <= 0) {
665
671
  throw new Error("feed id must be a positive integer");
666
672
  }
667
673
  return id;
@@ -838,7 +844,8 @@ var AutomationAlertDeliveryResource = class {
838
844
  }
839
845
  };
840
846
  function requireAutomationID(id) {
841
- if (!Number.isInteger(id) || id <= 0) {
847
+ if (typeof id === "string") return requireAutomationIDString(id);
848
+ if (!Number.isSafeInteger(id) || id <= 0) {
842
849
  throw new Error("automation id must be a positive integer");
843
850
  }
844
851
  return id;
@@ -3926,7 +3933,7 @@ var installPlaybookRuntime = (targetWindow) => {
3926
3933
  };
3927
3934
 
3928
3935
  // src/index.ts
3929
- var VERSION = true ? "0.24.0" : "dev";
3936
+ var VERSION = true ? "0.25.0" : "dev";
3930
3937
  export {
3931
3938
  AlertsResource,
3932
3939
  AlvaClient,