@ziggs-ai/contracts 0.50.8 → 0.50.11
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 +53 -5
- package/dist/generated/agreements.d.ts +4 -1
- package/dist/inbox.d.ts +1 -1
- package/package.json +1 -1
package/dist/buckets.d.ts
CHANGED
|
@@ -65,6 +65,37 @@ export interface BucketAddMembersResult {
|
|
|
65
65
|
items: BucketItemRef[];
|
|
66
66
|
} | null;
|
|
67
67
|
}
|
|
68
|
+
/** What to do when someone being added cannot read everything in a bucket. */
|
|
69
|
+
export type BucketMisfitChoice = 'share' | 'split';
|
|
70
|
+
/**
|
|
71
|
+
* The 409 body when someone would be in a bucket without reading everything
|
|
72
|
+
* in it (`code: BUCKET_MEMBERS_CANNOT_READ`). Nothing changed; the caller
|
|
73
|
+
* picks one of `choices`.
|
|
74
|
+
*/
|
|
75
|
+
export interface BucketMisfitRefusal {
|
|
76
|
+
code: 'BUCKET_MEMBERS_CANNOT_READ';
|
|
77
|
+
message: string;
|
|
78
|
+
choices: BucketMisfitChoice[];
|
|
79
|
+
impact: {
|
|
80
|
+
misfits: BucketMisfit[];
|
|
81
|
+
shared: BucketShare[];
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/** POST /buckets/:id/join — another bucket's people and items brought in. */
|
|
85
|
+
export interface BucketJoinResult {
|
|
86
|
+
bucket: BucketView;
|
|
87
|
+
added: string[];
|
|
88
|
+
joined: BucketItemRef[];
|
|
89
|
+
shared: BucketShare[];
|
|
90
|
+
/** With share: who is not in yet, waiting on owners (ZIG-2457). */
|
|
91
|
+
waiting?: string[];
|
|
92
|
+
}
|
|
93
|
+
/** GET /buckets/:id/my-shares — one of your items shared with someone here. */
|
|
94
|
+
export type MyShare = {
|
|
95
|
+
holderId: string;
|
|
96
|
+
item: BucketItemRef;
|
|
97
|
+
thread?: string;
|
|
98
|
+
};
|
|
68
99
|
export type BucketThread = {
|
|
69
100
|
rootMessageId: string;
|
|
70
101
|
title: string;
|
|
@@ -80,19 +111,35 @@ export type BucketThread = {
|
|
|
80
111
|
at: string;
|
|
81
112
|
}>;
|
|
82
113
|
};
|
|
114
|
+
/** ZIG-2457 — one owner asked to let someone waiting come in, and their answer. */
|
|
115
|
+
export type BucketInviteOwner = {
|
|
116
|
+
ownerId: string;
|
|
117
|
+
items: number;
|
|
118
|
+
answer: 'asked' | 'yes' | 'no';
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* An agreement whose people come in when it starts: a hire waiting for a yes,
|
|
122
|
+
* or (ZIG-2457) someone added with share who cannot read everything yet. The
|
|
123
|
+
* latter carries who added them, each owner asked and their answer, and
|
|
124
|
+
* whether you may take the add back.
|
|
125
|
+
*/
|
|
83
126
|
export type BucketInvite = {
|
|
84
127
|
agreementId: string;
|
|
85
128
|
title: string | null;
|
|
86
129
|
waitingFor: string[];
|
|
130
|
+
addedBy?: string;
|
|
131
|
+
owners?: BucketInviteOwner[];
|
|
132
|
+
canTakeBack?: boolean;
|
|
87
133
|
};
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated ZIG-2457 — the server no longer sends `waiting`: someone
|
|
136
|
+
* waiting to come in is an invite with `owners`. Kept so clients still on it
|
|
137
|
+
* build until they move; remove after the web stops reading it.
|
|
138
|
+
*/
|
|
88
139
|
export type BucketWaitingPerson = {
|
|
89
140
|
principalId: string;
|
|
90
141
|
addedBy: string;
|
|
91
|
-
owners:
|
|
92
|
-
ownerId: string;
|
|
93
|
-
items: number;
|
|
94
|
-
answer: 'asked' | 'yes' | 'no';
|
|
95
|
-
}>;
|
|
142
|
+
owners: BucketInviteOwner[];
|
|
96
143
|
};
|
|
97
144
|
export type BucketConnection = {
|
|
98
145
|
connectionId: string;
|
|
@@ -129,6 +176,7 @@ export interface BucketContents {
|
|
|
129
176
|
status: string;
|
|
130
177
|
}>;
|
|
131
178
|
invites?: BucketInvite[];
|
|
179
|
+
/** @deprecated ZIG-2457 — never sent; read `invites[].owners`. */
|
|
132
180
|
waiting?: BucketWaitingPerson[];
|
|
133
181
|
outOfReach: number;
|
|
134
182
|
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
|
-
/**
|
|
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