@ziggs-ai/contracts 0.50.8 → 0.50.10

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/buckets.d.ts CHANGED
@@ -80,19 +80,35 @@ export type BucketThread = {
80
80
  at: string;
81
81
  }>;
82
82
  };
83
+ /** ZIG-2457 — one owner asked to let someone waiting come in, and their answer. */
84
+ export type BucketInviteOwner = {
85
+ ownerId: string;
86
+ items: number;
87
+ answer: 'asked' | 'yes' | 'no';
88
+ };
89
+ /**
90
+ * An agreement whose people come in when it starts: a hire waiting for a yes,
91
+ * or (ZIG-2457) someone added with share who cannot read everything yet. The
92
+ * latter carries who added them, each owner asked and their answer, and
93
+ * whether you may take the add back.
94
+ */
83
95
  export type BucketInvite = {
84
96
  agreementId: string;
85
97
  title: string | null;
86
98
  waitingFor: string[];
99
+ addedBy?: string;
100
+ owners?: BucketInviteOwner[];
101
+ canTakeBack?: boolean;
87
102
  };
103
+ /**
104
+ * @deprecated ZIG-2457 — the server no longer sends `waiting`: someone
105
+ * waiting to come in is an invite with `owners`. Kept so clients still on it
106
+ * build until they move; remove after the web stops reading it.
107
+ */
88
108
  export type BucketWaitingPerson = {
89
109
  principalId: string;
90
110
  addedBy: string;
91
- owners: Array<{
92
- ownerId: string;
93
- items: number;
94
- answer: 'asked' | 'yes' | 'no';
95
- }>;
111
+ owners: BucketInviteOwner[];
96
112
  };
97
113
  export type BucketConnection = {
98
114
  connectionId: string;
@@ -129,6 +145,7 @@ export interface BucketContents {
129
145
  status: string;
130
146
  }>;
131
147
  invites?: BucketInvite[];
148
+ /** @deprecated ZIG-2457 — never sent; read `invites[].owners`. */
132
149
  waiting?: BucketWaitingPerson[];
133
150
  outOfReach: number;
134
151
  nextCursor?: string | null;
@@ -122,6 +122,10 @@ export type AgreementRead = {
122
122
  holderId?: string;
123
123
  itemsRead?: {
124
124
  count: number;
125
+ owners: Array<{
126
+ ownerId: string;
127
+ count: number;
128
+ }>;
125
129
  };
126
130
  holders?: Array<{
127
131
  kind: "agent" | "user" | "org";
@@ -135,7 +139,6 @@ export type AgreementRead = {
135
139
  temporal?: "from-now" | "from-start";
136
140
  resumeAgreementId?: string;
137
141
  durationHours?: number;
138
- itemCount?: number;
139
142
  reason?: string;
140
143
  expiresAt?: string | null;
141
144
  };
package/dist/inbox.d.ts CHANGED
@@ -108,7 +108,7 @@ export interface AccessAsk {
108
108
  * ask. Null when the request names no lifetime.
109
109
  */
110
110
  durationHours: number | null;
111
- /** Fixed item count for an ongoing bucket admission request. */
111
+ /** ZIG-2457 — how many of your items a request to let someone in covers. */
112
112
  itemCount?: number;
113
113
  /**
114
114
  * The grant's real expiry, once there is one. Absent while the ask is still
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/contracts",
3
- "version": "0.50.8",
3
+ "version": "0.50.10",
4
4
  "description": "Wire contracts for the Ziggs API — response shapes, error body, and socket events, shared by every client.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",