@terminal3/t3n-sdk 3.14.0 → 3.16.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.ts CHANGED
@@ -2717,15 +2717,28 @@ interface DeleteGrantsInput {
2717
2717
  orgDid: string;
2718
2718
  contractId: string;
2719
2719
  }
2720
- interface WriteDataInput {
2720
+ interface WriteDataInputBase {
2721
2721
  orgDid: string;
2722
2722
  scope: string;
2723
2723
  payloadHex: string;
2724
- /** Explicit entry ID (32 hex chars). When present, enables idempotent upsert. */
2725
- entryId?: string;
2726
- /** Client-supplied monotonic counter for ID derivation when `entryId` is absent. */
2727
- clientSeqNo?: number;
2728
2724
  }
2725
+ /**
2726
+ * Write input. Exactly one identity source is required:
2727
+ * - supply `entryId` (32 hex chars) for an idempotent upsert; or
2728
+ * - omit `entryId` and supply `clientSeqNo`, and the entry ID is derived from
2729
+ * `(org_did, scope, writer_did, client_seq_no)`.
2730
+ * The compiler rejects calls that provide neither.
2731
+ */
2732
+ type WriteDataInput = (WriteDataInputBase & {
2733
+ /** Explicit entry ID (32 hex chars). Enables idempotent upsert. */
2734
+ entryId: string;
2735
+ /** Optional; ignored when `entryId` is present. */
2736
+ clientSeqNo?: number;
2737
+ }) | (WriteDataInputBase & {
2738
+ entryId?: never;
2739
+ /** Client-supplied monotonic counter for ID derivation. */
2740
+ clientSeqNo: number;
2741
+ });
2729
2742
  interface DeleteDataInput {
2730
2743
  orgDid: string;
2731
2744
  scope: string;
@@ -3330,15 +3343,23 @@ interface TenantSelfAdmitResult {
3330
3343
  granted_credits: number | null;
3331
3344
  }
3332
3345
  type MapVisibility = string;
3333
- type WriterSet = "all" | "All" | {
3346
+ /**
3347
+ * Who may write a map. Canonical wire shape on both input and response is
3348
+ * `"all" | { only: number[] }` (the contract enum is
3349
+ * `#[serde(rename_all = "snake_case")]` with no aliases, so PascalCase forms
3350
+ * like `"All"` / `{ Only }` are rejected on input).
3351
+ */
3352
+ type WriterSet = "all" | {
3334
3353
  only: number[];
3335
- } | {
3336
- Only: number[];
3337
3354
  };
3338
- type ReaderSet = "all" | "All" | {
3355
+ /**
3356
+ * Who may read a map. Canonical wire shape on both input and response is
3357
+ * `"all" | { only: number[] }` (the contract enum is
3358
+ * `#[serde(rename_all = "snake_case")]` with no aliases, so PascalCase forms
3359
+ * like `"All"` / `{ Only }` are rejected on input).
3360
+ */
3361
+ type ReaderSet = "all" | {
3339
3362
  only: number[];
3340
- } | {
3341
- Only: number[];
3342
3363
  };
3343
3364
  interface MapCreateInput {
3344
3365
  tail: string;