@terminal3/t3n-sdk 3.15.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;