@eigenpal/sdk 0.20.3 → 0.20.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eigenpal/sdk
2
2
 
3
+ ## 0.20.5
4
+
5
+ ### Patch Changes
6
+
7
+ - faf6d1e: Dataset review SDK types and helpers now expose `removed` instead of `rejected` for item status, progress, field/file decisions, and update actions.
8
+
3
9
  ## 0.20.3
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/sdk",
3
- "version": "0.20.3",
3
+ "version": "0.20.5",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -117,7 +117,7 @@ export const automationsDatasetReviewRequestsGet = <ThrowOnError extends boolean
117
117
  /**
118
118
  * Update dataset review request
119
119
  *
120
- * Update review metadata or lifecycle status while the request is draft, open, or paused. Set status to `closed` when review is finished; dataset reconciliation stays manual.
120
+ * Update review metadata or lifecycle status. Set status to `closed` when review is finished; a closed review accepts only a bare reopen back to `open`. Dataset reconciliation stays manual.
121
121
  */
122
122
  export const automationsDatasetReviewRequestsUpdate = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsUpdateData, ThrowOnError>) => (options.client ?? client).patch<AutomationsDatasetReviewRequestsUpdateResponses, AutomationsDatasetReviewRequestsUpdateErrors, ThrowOnError>({
123
123
  security: [{ scheme: 'bearer', type: 'http' }],
@@ -154,7 +154,7 @@ export const automationsDatasetReviewRequestsListItems = <ThrowOnError extends b
154
154
  /**
155
155
  * Update dataset review item
156
156
  *
157
- * Approve, edit, reject, reopen, comment, or record a field-decision or file-decision on one review item while the parent request is draft, open, or paused. Pass `expectedUpdatedAt` from the item the client last observed. Pass `fieldPath` with `action: comment` or `action: field-decision`, `filePath` with `action: file-decision`. `action: edit-file` is multipart-only: send `file` bytes with `filePath` (correct an existing expected file) or `newPath` (upload a brand-new expected file) plus `expectedUpdatedAt`.
157
+ * Approve, edit, remove, reopen, comment, or record a field-decision or file-decision on one review item while the parent request is draft, open, or paused. Pass `expectedUpdatedAt` from the item the client last observed. Pass `fieldPath` with `action: comment` or `action: field-decision`, `filePath` with `action: file-decision`. `action: edit-file` is multipart-only: send `file` bytes with `filePath` (correct an existing expected file) or `newPath` (upload a brand-new expected file) plus `expectedUpdatedAt`.
158
158
  */
159
159
  export const automationsDatasetReviewRequestsUpdateItem = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsUpdateItemData, ThrowOnError>) => (options.client ?? client).patch<AutomationsDatasetReviewRequestsUpdateItemResponses, AutomationsDatasetReviewRequestsUpdateItemErrors, ThrowOnError>({
160
160
  security: [{ scheme: 'bearer', type: 'http' }],
@@ -69,9 +69,9 @@ export type UpdateDatasetReviewRequest = {
69
69
 
70
70
  export type UpdateDatasetReviewItem = {
71
71
  /**
72
- * file-decision records a per-expected-file approve/reject (or a note). edit-file uploads corrected bytes and is multipart-only — JSON callers get a 400 pointing at the multipart form.
72
+ * file-decision records a per-expected-file approve/remove (or a note). edit-file uploads corrected bytes and is multipart-only — JSON callers get a 400 pointing at the multipart form.
73
73
  */
74
- action: 'approve' | 'edit' | 'reject' | 'reopen' | 'comment' | 'field-decision' | 'file-decision' | 'edit-file';
74
+ action: 'approve' | 'edit' | 'remove' | 'reopen' | 'comment' | 'field-decision' | 'file-decision' | 'edit-file';
75
75
  expected?: unknown;
76
76
  comment?: string | null;
77
77
  fieldPath?: string | null;
@@ -79,7 +79,7 @@ export type UpdateDatasetReviewItem = {
79
79
  * Expected-file path for action file-decision.
80
80
  */
81
81
  filePath?: string | null;
82
- decision?: 'approved' | 'rejected' | null;
82
+ decision?: 'approved' | 'removed' | null;
83
83
  /**
84
84
  * ISO timestamp of the item `updatedAt` the client last observed. Required for optimistic concurrency.
85
85
  */
@@ -754,13 +754,13 @@ export type DatasetReviewProgress = {
754
754
  pending: number;
755
755
  approved: number;
756
756
  edited: number;
757
- rejected: number;
757
+ removed: number;
758
758
  /**
759
759
  * Count of examples still pending a decision.
760
760
  */
761
761
  remaining: number;
762
762
  /**
763
- * True when every example has been approved, edited, or rejected. Close the request when review is finished; dataset write-back is always manual.
763
+ * True when every example has been approved, edited, or removed. Close the request when review is finished; dataset write-back is always manual.
764
764
  */
765
765
  complete: boolean;
766
766
  };
@@ -802,7 +802,7 @@ export type DatasetReviewItem = {
802
802
  sha256: string;
803
803
  }>;
804
804
  };
805
- status: 'pending' | 'approved' | 'edited' | 'rejected';
805
+ status: 'pending' | 'approved' | 'edited' | 'removed';
806
806
  currentExpectedJson: unknown | null;
807
807
  fieldDecisions: {
808
808
  [key: string]: DatasetReviewFieldDecision;
@@ -812,7 +812,7 @@ export type DatasetReviewItem = {
812
812
  */
813
813
  currentExpectedFiles: Array<DatasetReviewExpectedFile> | null;
814
814
  /**
815
- * Durable per-expected-file approve/reject, keyed by expected-file path.
815
+ * Durable per-expected-file approve/remove, keyed by expected-file path.
816
816
  */
817
817
  fileDecisions: {
818
818
  [key: string]: DatasetReviewFileDecision;
@@ -826,7 +826,7 @@ export type DatasetReviewItem = {
826
826
  };
827
827
 
828
828
  export type DatasetReviewFieldDecision = {
829
- decision: 'approved' | 'rejected';
829
+ decision: 'approved' | 'removed';
830
830
  comment?: string | null;
831
831
  reviewerId: string;
832
832
  updatedAt: string;
@@ -849,7 +849,7 @@ export type DatasetReviewExpectedFile = {
849
849
  };
850
850
 
851
851
  export type DatasetReviewFileDecision = {
852
- decision: 'approved' | 'rejected';
852
+ decision: 'approved' | 'removed';
853
853
  comment?: string | null;
854
854
  reviewerId: string;
855
855
  updatedAt: string;
@@ -860,7 +860,7 @@ export type DatasetReviewEvent = {
860
860
  reviewId: string;
861
861
  itemId: string | null;
862
862
  actorUserId: string | null;
863
- action: 'created' | 'approved' | 'edited' | 'rejected' | 'reopened' | 'commented' | 'field-decision' | 'file-decision' | 'file-edited';
863
+ action: 'created' | 'approved' | 'edited' | 'removed' | 'reopened' | 'commented' | 'field-decision' | 'file-decision' | 'file-edited';
864
864
  diffSummary: unknown | null;
865
865
  createdAt: string;
866
866
  };
@@ -82,7 +82,7 @@ export class AutomationsResource {
82
82
 
83
83
  /**
84
84
  * Move a YAML workflow between organizing folders. Agent automations have no
85
- * folder model and are rejected by the API.
85
+ * folder model and are removed by the API.
86
86
  */
87
87
  async move(
88
88
  id: string,
@@ -478,11 +478,11 @@ export class AutomationExperimentsResource {
478
478
  }
479
479
  }
480
480
 
481
- type DatasetReviewItemStatus = 'pending' | 'approved' | 'edited' | 'rejected';
481
+ type DatasetReviewItemStatus = 'pending' | 'approved' | 'edited' | 'removed';
482
482
  type DatasetReviewItemAction =
483
483
  | 'approve'
484
484
  | 'edit'
485
- | 'reject'
485
+ | 'remove'
486
486
  | 'reopen'
487
487
  | 'comment'
488
488
  | 'field-decision'
@@ -542,7 +542,7 @@ export type UpdateDatasetReviewItemBody = {
542
542
  /** Expected-file path for `file-decision`. */
543
543
  filePath?: string | null;
544
544
  /** Field decision for `field-decision`; pass `null` to clear. */
545
- decision?: 'approved' | 'rejected' | null;
545
+ decision?: 'approved' | 'removed' | null;
546
546
  expectedUpdatedAt: string;
547
547
  };
548
548
 
@@ -563,9 +563,9 @@ export type DatasetReviewExpectedFile = {
563
563
  origin: 'snapshot' | 'corrected' | 'uploaded';
564
564
  };
565
565
 
566
- /** Durable per-expected-file approve/reject, keyed by expected-file path. */
566
+ /** Durable per-expected-file approve/remove, keyed by expected-file path. */
567
567
  export type DatasetReviewFileDecision = {
568
- decision: 'approved' | 'rejected';
568
+ decision: 'approved' | 'removed';
569
569
  comment?: string | null;
570
570
  reviewerId: string;
571
571
  updatedAt: string;
@@ -578,7 +578,7 @@ export type RecordDatasetReviewItemFileDecisionBody = {
578
578
  * File decision; pass `null` to clear a recorded decision. A comment
579
579
  * without a decision is a note — allowed only when a decision exists.
580
580
  */
581
- decision?: 'approved' | 'rejected' | null;
581
+ decision?: 'approved' | 'removed' | null;
582
582
  comment?: string | null;
583
583
  expectedUpdatedAt: string;
584
584
  };
@@ -725,7 +725,7 @@ export class AutomationDatasetReviewRequestsResource {
725
725
  }
726
726
 
727
727
  /**
728
- * Record a per-expected-file approve/reject (or a note) on a review item.
728
+ * Record a per-expected-file approve/remove (or a note) on a review item.
729
729
  * Pass `decision: null` to clear a recorded decision; a comment without a
730
730
  * decision is a note and requires an existing decision server-side.
731
731
  */
package/src/telemetry.ts CHANGED
@@ -19,7 +19,7 @@
19
19
  export const SDK_LANGUAGE = 'typescript';
20
20
  // Rewritten at publish time by scripts/release/platform/render-sdk-versions.sh.
21
21
  // Keep this string literal exactly stable — sed matches on it.
22
- export const SDK_VERSION = '0.20.3';
22
+ export const SDK_VERSION = '0.20.5';
23
23
 
24
24
  function detectRuntime(): string {
25
25
  const g = globalThis as unknown as {