@dork-labs/cloud-api 0.75.1
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/LICENSE +21 -0
- package/README.md +192 -0
- package/dist/billing.d.ts +328 -0
- package/dist/billing.d.ts.map +1 -0
- package/dist/billing.js +267 -0
- package/dist/billing.js.map +1 -0
- package/dist/client.d.ts +130 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +192 -0
- package/dist/client.js.map +1 -0
- package/dist/connections.d.ts +281 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.js +241 -0
- package/dist/connections.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/inference.d.ts +123 -0
- package/dist/inference.d.ts.map +1 -0
- package/dist/inference.js +114 -0
- package/dist/inference.js.map +1 -0
- package/dist/instances.d.ts +60 -0
- package/dist/instances.d.ts.map +1 -0
- package/dist/instances.js +65 -0
- package/dist/instances.js.map +1 -0
- package/dist/primitives.d.ts +74 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/primitives.js +98 -0
- package/dist/primitives.js.map +1 -0
- package/dist/problem.d.ts +96 -0
- package/dist/problem.d.ts.map +1 -0
- package/dist/problem.js +94 -0
- package/dist/problem.js.map +1 -0
- package/dist/remote.d.ts +268 -0
- package/dist/remote.d.ts.map +1 -0
- package/dist/remote.js +267 -0
- package/dist/remote.js.map +1 -0
- package/dist/routes.d.ts +273 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +302 -0
- package/dist/routes.js.map +1 -0
- package/dist/seats.d.ts +529 -0
- package/dist/seats.d.ts.map +1 -0
- package/dist/seats.js +266 -0
- package/dist/seats.js.map +1 -0
- package/dist/session.d.ts +135 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +143 -0
- package/dist/session.js.map +1 -0
- package/fixtures/v1/billing/balance-owed.json +16 -0
- package/fixtures/v1/billing/balance.json +16 -0
- package/fixtures/v1/billing/entitlements-free.json +34 -0
- package/fixtures/v1/billing/hosted-page.json +3 -0
- package/fixtures/v1/billing/nudge.json +9 -0
- package/fixtures/v1/billing/price-list.json +13 -0
- package/fixtures/v1/billing/statement.json +5 -0
- package/fixtures/v1/billing/usage-by-model.json +21 -0
- package/fixtures/v1/connections/catalog.json +12 -0
- package/fixtures/v1/connections/events-ack.json +3 -0
- package/fixtures/v1/connections/events-pull.json +16 -0
- package/fixtures/v1/connections/execution.json +12 -0
- package/fixtures/v1/connections/list.json +16 -0
- package/fixtures/v1/connections/usage.json +16 -0
- package/fixtures/v1/index.json +58 -0
- package/fixtures/v1/inference/models.json +17 -0
- package/fixtures/v1/inference/token-revoke.json +3 -0
- package/fixtures/v1/inference/token.json +14 -0
- package/fixtures/v1/instances/heartbeat.json +5 -0
- package/fixtures/v1/instances/list.json +15 -0
- package/fixtures/v1/instances/revoke.json +3 -0
- package/fixtures/v1/problem/handle-tombstoned.json +6 -0
- package/fixtures/v1/problem/person-seat-required.json +7 -0
- package/fixtures/v1/problem/unauthenticated.json +7 -0
- package/fixtures/v1/remote/address.json +5 -0
- package/fixtures/v1/remote/command-keepalive.json +4 -0
- package/fixtures/v1/remote/command-open.json +6 -0
- package/fixtures/v1/remote/commands-ack.json +3 -0
- package/fixtures/v1/remote/credential.json +7 -0
- package/fixtures/v1/remote/custom-address.json +12 -0
- package/fixtures/v1/remote/designation.json +5 -0
- package/fixtures/v1/remote/enrolment.json +5 -0
- package/fixtures/v1/remote/events.json +3 -0
- package/fixtures/v1/remote/open.json +5 -0
- package/fixtures/v1/remote/status-closed.json +7 -0
- package/fixtures/v1/remote/status-open.json +10 -0
- package/fixtures/v1/remote/wake-token.json +5 -0
- package/fixtures/v1/seats/addons.json +11 -0
- package/fixtures/v1/seats/agent.json +9 -0
- package/fixtures/v1/seats/grants.json +20 -0
- package/fixtures/v1/seats/inbox-browse.json +17 -0
- package/fixtures/v1/seats/inbox-pull.json +17 -0
- package/fixtures/v1/seats/invitation.json +9 -0
- package/fixtures/v1/seats/members.json +12 -0
- package/fixtures/v1/seats/org.json +7 -0
- package/fixtures/v1/seats/presence.json +6 -0
- package/fixtures/v1/seats/seat.json +21 -0
- package/fixtures/v1/session/account-export.json +6 -0
- package/fixtures/v1/session/device-code.json +8 -0
- package/fixtures/v1/session/device-token-pending.json +4 -0
- package/fixtures/v1/session/device-token.json +7 -0
- package/fixtures/v1/session/signed-in.json +14 -0
- package/fixtures/v1/session/signed-out.json +4 -0
- package/package.json +58 -0
package/dist/seats.d.ts
ADDED
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Whether an organization is one person`s own or a shared one. */
|
|
3
|
+
export declare const OrgKindSchema: z.ZodEnum<{
|
|
4
|
+
personal: "personal";
|
|
5
|
+
org: "org";
|
|
6
|
+
}>;
|
|
7
|
+
/** What a member may do in an organization. */
|
|
8
|
+
export declare const MemberRoleSchema: z.ZodEnum<{
|
|
9
|
+
owner: "owner";
|
|
10
|
+
admin: "admin";
|
|
11
|
+
member: "member";
|
|
12
|
+
}>;
|
|
13
|
+
/** An organization: the unit seats, addresses and billing hang off. */
|
|
14
|
+
export declare const OrgSchema: z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
slug: z.ZodString;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
kind: z.ZodEnum<{
|
|
19
|
+
personal: "personal";
|
|
20
|
+
org: "org";
|
|
21
|
+
}>;
|
|
22
|
+
createdAt: z.ZodISODateTime;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
/** An organization. */
|
|
25
|
+
export type Org = z.infer<typeof OrgSchema>;
|
|
26
|
+
/** `POST /v1/orgs`. */
|
|
27
|
+
export declare const OrgCreateRequestSchema: z.ZodObject<{
|
|
28
|
+
slug: z.ZodString;
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
/** `PATCH /v1/orgs/{orgId}`. */
|
|
32
|
+
export declare const OrgUpdateRequestSchema: z.ZodObject<{
|
|
33
|
+
name: z.ZodOptional<z.ZodString>;
|
|
34
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
/** `GET /v1/orgs`. */
|
|
37
|
+
export declare const OrgListResponseSchema: z.ZodObject<{
|
|
38
|
+
items: z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
slug: z.ZodString;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
kind: z.ZodEnum<{
|
|
43
|
+
personal: "personal";
|
|
44
|
+
org: "org";
|
|
45
|
+
}>;
|
|
46
|
+
createdAt: z.ZodISODateTime;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
/** One person`s membership of one organization. */
|
|
51
|
+
export declare const MemberSchema: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
orgId: z.ZodString;
|
|
54
|
+
userId: z.ZodString;
|
|
55
|
+
role: z.ZodEnum<{
|
|
56
|
+
owner: "owner";
|
|
57
|
+
admin: "admin";
|
|
58
|
+
member: "member";
|
|
59
|
+
}>;
|
|
60
|
+
createdAt: z.ZodISODateTime;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
/** One person`s membership of one organization. */
|
|
63
|
+
export type Member = z.infer<typeof MemberSchema>;
|
|
64
|
+
/** `GET /v1/orgs/{orgId}/members`. */
|
|
65
|
+
export declare const MemberListResponseSchema: z.ZodObject<{
|
|
66
|
+
items: z.ZodArray<z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
orgId: z.ZodString;
|
|
69
|
+
userId: z.ZodString;
|
|
70
|
+
role: z.ZodEnum<{
|
|
71
|
+
owner: "owner";
|
|
72
|
+
admin: "admin";
|
|
73
|
+
member: "member";
|
|
74
|
+
}>;
|
|
75
|
+
createdAt: z.ZodISODateTime;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
/** How far an invitation has got. */
|
|
80
|
+
export declare const InvitationStatusSchema: z.ZodEnum<{
|
|
81
|
+
pending: "pending";
|
|
82
|
+
canceled: "canceled";
|
|
83
|
+
accepted: "accepted";
|
|
84
|
+
rejected: "rejected";
|
|
85
|
+
}>;
|
|
86
|
+
/** An outstanding or settled invitation to join an organization. */
|
|
87
|
+
export declare const InvitationSchema: z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
orgId: z.ZodString;
|
|
90
|
+
email: z.ZodString;
|
|
91
|
+
role: z.ZodEnum<{
|
|
92
|
+
owner: "owner";
|
|
93
|
+
admin: "admin";
|
|
94
|
+
member: "member";
|
|
95
|
+
}>;
|
|
96
|
+
status: z.ZodEnum<{
|
|
97
|
+
pending: "pending";
|
|
98
|
+
canceled: "canceled";
|
|
99
|
+
accepted: "accepted";
|
|
100
|
+
rejected: "rejected";
|
|
101
|
+
}>;
|
|
102
|
+
expiresAt: z.ZodISODateTime;
|
|
103
|
+
createdAt: z.ZodISODateTime;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
/** An invitation to join an organization. */
|
|
106
|
+
export type Invitation = z.infer<typeof InvitationSchema>;
|
|
107
|
+
/** `POST /v1/orgs/{orgId}/invitations`. */
|
|
108
|
+
export declare const InvitationCreateRequestSchema: z.ZodObject<{
|
|
109
|
+
email: z.ZodString;
|
|
110
|
+
role: z.ZodEnum<{
|
|
111
|
+
owner: "owner";
|
|
112
|
+
admin: "admin";
|
|
113
|
+
member: "member";
|
|
114
|
+
}>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
/** `GET /v1/orgs/{orgId}/invitations`. */
|
|
117
|
+
export declare const InvitationListResponseSchema: z.ZodObject<{
|
|
118
|
+
items: z.ZodArray<z.ZodObject<{
|
|
119
|
+
id: z.ZodString;
|
|
120
|
+
orgId: z.ZodString;
|
|
121
|
+
email: z.ZodString;
|
|
122
|
+
role: z.ZodEnum<{
|
|
123
|
+
owner: "owner";
|
|
124
|
+
admin: "admin";
|
|
125
|
+
member: "member";
|
|
126
|
+
}>;
|
|
127
|
+
status: z.ZodEnum<{
|
|
128
|
+
pending: "pending";
|
|
129
|
+
canceled: "canceled";
|
|
130
|
+
accepted: "accepted";
|
|
131
|
+
rejected: "rejected";
|
|
132
|
+
}>;
|
|
133
|
+
expiresAt: z.ZodISODateTime;
|
|
134
|
+
createdAt: z.ZodISODateTime;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
/** An agent identity an organization has registered. */
|
|
139
|
+
export declare const AgentSchema: z.ZodObject<{
|
|
140
|
+
id: z.ZodString;
|
|
141
|
+
orgId: z.ZodString;
|
|
142
|
+
ownerMemberId: z.ZodNullable<z.ZodString>;
|
|
143
|
+
displayName: z.ZodString;
|
|
144
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
145
|
+
color: z.ZodOptional<z.ZodString>;
|
|
146
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
147
|
+
createdAt: z.ZodISODateTime;
|
|
148
|
+
retiredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
/** An agent identity an organization has registered. */
|
|
151
|
+
export type Agent = z.infer<typeof AgentSchema>;
|
|
152
|
+
/**
|
|
153
|
+
* `POST /v1/orgs/{orgId}/agents` — an instance asserts a claim to an agent
|
|
154
|
+
* identity. It mints nothing; a person approves the claim separately.
|
|
155
|
+
*/
|
|
156
|
+
export declare const AgentClaimRequestSchema: z.ZodObject<{
|
|
157
|
+
displayName: z.ZodString;
|
|
158
|
+
instanceId: z.ZodString;
|
|
159
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
160
|
+
color: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
/** The state of an agent claim. */
|
|
163
|
+
export declare const AgentClaimSchema: z.ZodObject<{
|
|
164
|
+
claimId: z.ZodString;
|
|
165
|
+
agentId: z.ZodString;
|
|
166
|
+
instanceId: z.ZodString;
|
|
167
|
+
status: z.ZodEnum<{
|
|
168
|
+
pending: "pending";
|
|
169
|
+
expired: "expired";
|
|
170
|
+
rejected: "rejected";
|
|
171
|
+
approved: "approved";
|
|
172
|
+
}>;
|
|
173
|
+
createdAt: z.ZodISODateTime;
|
|
174
|
+
approvedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
/** `GET /v1/orgs/{orgId}/agents`. */
|
|
177
|
+
export declare const AgentListResponseSchema: z.ZodObject<{
|
|
178
|
+
items: z.ZodArray<z.ZodObject<{
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
orgId: z.ZodString;
|
|
181
|
+
ownerMemberId: z.ZodNullable<z.ZodString>;
|
|
182
|
+
displayName: z.ZodString;
|
|
183
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
184
|
+
color: z.ZodOptional<z.ZodString>;
|
|
185
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
186
|
+
createdAt: z.ZodISODateTime;
|
|
187
|
+
retiredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
/** Whether a seat holds a person or an agent. */
|
|
192
|
+
export declare const SeatKindSchema: z.ZodEnum<{
|
|
193
|
+
person: "person";
|
|
194
|
+
agent: "agent";
|
|
195
|
+
}>;
|
|
196
|
+
/** Where a seat is in its lifecycle. */
|
|
197
|
+
export declare const SeatStatusSchema: z.ZodEnum<{
|
|
198
|
+
assigned: "assigned";
|
|
199
|
+
unassigned: "unassigned";
|
|
200
|
+
suspended: "suspended";
|
|
201
|
+
released: "released";
|
|
202
|
+
}>;
|
|
203
|
+
/** Whether an address is live or has been retired. */
|
|
204
|
+
export declare const AddressStatusSchema: z.ZodEnum<{
|
|
205
|
+
active: "active";
|
|
206
|
+
retired: "retired";
|
|
207
|
+
}>;
|
|
208
|
+
/** A routable address issued to a seat. */
|
|
209
|
+
export declare const AddressSchema: z.ZodObject<{
|
|
210
|
+
id: z.ZodString;
|
|
211
|
+
orgId: z.ZodString;
|
|
212
|
+
seatId: z.ZodString;
|
|
213
|
+
handle: z.ZodString;
|
|
214
|
+
canonical: z.ZodString;
|
|
215
|
+
status: z.ZodEnum<{
|
|
216
|
+
active: "active";
|
|
217
|
+
retired: "retired";
|
|
218
|
+
}>;
|
|
219
|
+
issuedAt: z.ZodISODateTime;
|
|
220
|
+
retiredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
221
|
+
}, z.core.$strip>;
|
|
222
|
+
/** A routable address issued to a seat. */
|
|
223
|
+
export type Address = z.infer<typeof AddressSchema>;
|
|
224
|
+
/** `POST /v1/addresses`. */
|
|
225
|
+
export declare const AddressCreateRequestSchema: z.ZodObject<{
|
|
226
|
+
seatId: z.ZodString;
|
|
227
|
+
handle: z.ZodString;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
/** One seat in an organization. */
|
|
230
|
+
export declare const SeatSchema: z.ZodObject<{
|
|
231
|
+
id: z.ZodString;
|
|
232
|
+
orgId: z.ZodString;
|
|
233
|
+
kind: z.ZodEnum<{
|
|
234
|
+
person: "person";
|
|
235
|
+
agent: "agent";
|
|
236
|
+
}>;
|
|
237
|
+
status: z.ZodEnum<{
|
|
238
|
+
assigned: "assigned";
|
|
239
|
+
unassigned: "unassigned";
|
|
240
|
+
suspended: "suspended";
|
|
241
|
+
released: "released";
|
|
242
|
+
}>;
|
|
243
|
+
subject: z.ZodNullable<z.ZodObject<{
|
|
244
|
+
kind: z.ZodEnum<{
|
|
245
|
+
agent: "agent";
|
|
246
|
+
user: "user";
|
|
247
|
+
}>;
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
251
|
+
id: z.ZodString;
|
|
252
|
+
orgId: z.ZodString;
|
|
253
|
+
seatId: z.ZodString;
|
|
254
|
+
handle: z.ZodString;
|
|
255
|
+
canonical: z.ZodString;
|
|
256
|
+
status: z.ZodEnum<{
|
|
257
|
+
active: "active";
|
|
258
|
+
retired: "retired";
|
|
259
|
+
}>;
|
|
260
|
+
issuedAt: z.ZodISODateTime;
|
|
261
|
+
retiredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
createdAt: z.ZodISODateTime;
|
|
264
|
+
assignedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
265
|
+
releasedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
/** One seat in an organization. */
|
|
268
|
+
export type Seat = z.infer<typeof SeatSchema>;
|
|
269
|
+
/** `GET /v1/orgs/{orgId}/seats`. */
|
|
270
|
+
export declare const SeatListResponseSchema: z.ZodObject<{
|
|
271
|
+
items: z.ZodArray<z.ZodObject<{
|
|
272
|
+
id: z.ZodString;
|
|
273
|
+
orgId: z.ZodString;
|
|
274
|
+
kind: z.ZodEnum<{
|
|
275
|
+
person: "person";
|
|
276
|
+
agent: "agent";
|
|
277
|
+
}>;
|
|
278
|
+
status: z.ZodEnum<{
|
|
279
|
+
assigned: "assigned";
|
|
280
|
+
unassigned: "unassigned";
|
|
281
|
+
suspended: "suspended";
|
|
282
|
+
released: "released";
|
|
283
|
+
}>;
|
|
284
|
+
subject: z.ZodNullable<z.ZodObject<{
|
|
285
|
+
kind: z.ZodEnum<{
|
|
286
|
+
agent: "agent";
|
|
287
|
+
user: "user";
|
|
288
|
+
}>;
|
|
289
|
+
id: z.ZodString;
|
|
290
|
+
}, z.core.$strip>>;
|
|
291
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
292
|
+
id: z.ZodString;
|
|
293
|
+
orgId: z.ZodString;
|
|
294
|
+
seatId: z.ZodString;
|
|
295
|
+
handle: z.ZodString;
|
|
296
|
+
canonical: z.ZodString;
|
|
297
|
+
status: z.ZodEnum<{
|
|
298
|
+
active: "active";
|
|
299
|
+
retired: "retired";
|
|
300
|
+
}>;
|
|
301
|
+
issuedAt: z.ZodISODateTime;
|
|
302
|
+
retiredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
303
|
+
}, z.core.$strip>>;
|
|
304
|
+
createdAt: z.ZodISODateTime;
|
|
305
|
+
assignedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
306
|
+
releasedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
309
|
+
}, z.core.$strip>;
|
|
310
|
+
/** `POST /v1/seats/{seatId}/assign`. */
|
|
311
|
+
export declare const SeatAssignRequestSchema: z.ZodObject<{
|
|
312
|
+
subject: z.ZodObject<{
|
|
313
|
+
kind: z.ZodEnum<{
|
|
314
|
+
agent: "agent";
|
|
315
|
+
user: "user";
|
|
316
|
+
}>;
|
|
317
|
+
id: z.ZodString;
|
|
318
|
+
}, z.core.$strip>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
/** Who may reach a seat, and for what. */
|
|
321
|
+
export declare const GrantSchema: z.ZodObject<{
|
|
322
|
+
id: z.ZodString;
|
|
323
|
+
seatId: z.ZodString;
|
|
324
|
+
granteeKind: z.ZodEnum<{
|
|
325
|
+
seat: "seat";
|
|
326
|
+
org: "org";
|
|
327
|
+
"connected-channel": "connected-channel";
|
|
328
|
+
public: "public";
|
|
329
|
+
}>;
|
|
330
|
+
granteeRef: z.ZodNullable<z.ZodString>;
|
|
331
|
+
capability: z.ZodEnum<{
|
|
332
|
+
address: "address";
|
|
333
|
+
trigger: "trigger";
|
|
334
|
+
}>;
|
|
335
|
+
effect: z.ZodEnum<{
|
|
336
|
+
allow: "allow";
|
|
337
|
+
deny: "deny";
|
|
338
|
+
}>;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
/** One rule about who may reach a seat. */
|
|
341
|
+
export type Grant = z.infer<typeof GrantSchema>;
|
|
342
|
+
/** `PUT /v1/seats/{seatId}/grants` — replace the whole set in one call. */
|
|
343
|
+
export declare const GrantReplaceRequestSchema: z.ZodObject<{
|
|
344
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
345
|
+
granteeKind: z.ZodEnum<{
|
|
346
|
+
seat: "seat";
|
|
347
|
+
org: "org";
|
|
348
|
+
"connected-channel": "connected-channel";
|
|
349
|
+
public: "public";
|
|
350
|
+
}>;
|
|
351
|
+
granteeRef: z.ZodNullable<z.ZodString>;
|
|
352
|
+
capability: z.ZodEnum<{
|
|
353
|
+
address: "address";
|
|
354
|
+
trigger: "trigger";
|
|
355
|
+
}>;
|
|
356
|
+
effect: z.ZodEnum<{
|
|
357
|
+
allow: "allow";
|
|
358
|
+
deny: "deny";
|
|
359
|
+
}>;
|
|
360
|
+
}, z.core.$strip>>;
|
|
361
|
+
}, z.core.$strip>;
|
|
362
|
+
/** `GET /v1/seats/{seatId}/grants`. */
|
|
363
|
+
export declare const GrantListResponseSchema: z.ZodObject<{
|
|
364
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
365
|
+
id: z.ZodString;
|
|
366
|
+
seatId: z.ZodString;
|
|
367
|
+
granteeKind: z.ZodEnum<{
|
|
368
|
+
seat: "seat";
|
|
369
|
+
org: "org";
|
|
370
|
+
"connected-channel": "connected-channel";
|
|
371
|
+
public: "public";
|
|
372
|
+
}>;
|
|
373
|
+
granteeRef: z.ZodNullable<z.ZodString>;
|
|
374
|
+
capability: z.ZodEnum<{
|
|
375
|
+
address: "address";
|
|
376
|
+
trigger: "trigger";
|
|
377
|
+
}>;
|
|
378
|
+
effect: z.ZodEnum<{
|
|
379
|
+
allow: "allow";
|
|
380
|
+
deny: "deny";
|
|
381
|
+
}>;
|
|
382
|
+
}, z.core.$strip>>;
|
|
383
|
+
}, z.core.$strip>;
|
|
384
|
+
/** Something attached to a seat beyond what it includes by default. */
|
|
385
|
+
export declare const AddonSchema: z.ZodObject<{
|
|
386
|
+
id: z.ZodString;
|
|
387
|
+
seatId: z.ZodString;
|
|
388
|
+
kind: z.ZodString;
|
|
389
|
+
status: z.ZodEnum<{
|
|
390
|
+
attached: "attached";
|
|
391
|
+
detached: "detached";
|
|
392
|
+
}>;
|
|
393
|
+
attachedAt: z.ZodISODateTime;
|
|
394
|
+
detachedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
395
|
+
}, z.core.$strip>;
|
|
396
|
+
/** Something attached to a seat beyond what it includes by default. */
|
|
397
|
+
export type Addon = z.infer<typeof AddonSchema>;
|
|
398
|
+
/** `POST /v1/seats/{seatId}/addons`. */
|
|
399
|
+
export declare const AddonAttachRequestSchema: z.ZodObject<{
|
|
400
|
+
kind: z.ZodString;
|
|
401
|
+
}, z.core.$strip>;
|
|
402
|
+
/** `GET /v1/seats/{seatId}/addons`. */
|
|
403
|
+
export declare const AddonListResponseSchema: z.ZodObject<{
|
|
404
|
+
addons: z.ZodArray<z.ZodObject<{
|
|
405
|
+
id: z.ZodString;
|
|
406
|
+
seatId: z.ZodString;
|
|
407
|
+
kind: z.ZodString;
|
|
408
|
+
status: z.ZodEnum<{
|
|
409
|
+
attached: "attached";
|
|
410
|
+
detached: "detached";
|
|
411
|
+
}>;
|
|
412
|
+
attachedAt: z.ZodISODateTime;
|
|
413
|
+
detachedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
414
|
+
}, z.core.$strip>>;
|
|
415
|
+
}, z.core.$strip>;
|
|
416
|
+
/** Where something arrived from. */
|
|
417
|
+
export declare const InboxSourceKindSchema: z.ZodEnum<{
|
|
418
|
+
seat: "seat";
|
|
419
|
+
email: "email";
|
|
420
|
+
"connected-channel": "connected-channel";
|
|
421
|
+
a2a: "a2a";
|
|
422
|
+
}>;
|
|
423
|
+
/**
|
|
424
|
+
* One item leased from a seat`s inbox.
|
|
425
|
+
*
|
|
426
|
+
* `leaseToken` is the receipt that acknowledges exactly this delivery. It
|
|
427
|
+
* mirrors the connector event contract rather than inventing a second design.
|
|
428
|
+
*/
|
|
429
|
+
export declare const InboxItemSchema: z.ZodObject<{
|
|
430
|
+
id: z.ZodString;
|
|
431
|
+
leaseToken: z.ZodString;
|
|
432
|
+
receivedAt: z.ZodISODateTime;
|
|
433
|
+
expiresAt: z.ZodISODateTime;
|
|
434
|
+
sourceKind: z.ZodEnum<{
|
|
435
|
+
seat: "seat";
|
|
436
|
+
email: "email";
|
|
437
|
+
"connected-channel": "connected-channel";
|
|
438
|
+
a2a: "a2a";
|
|
439
|
+
}>;
|
|
440
|
+
sourceRef: z.ZodString;
|
|
441
|
+
envelope: z.ZodUnknown;
|
|
442
|
+
bodyUrl: z.ZodString;
|
|
443
|
+
sizeBytes: z.ZodNumber;
|
|
444
|
+
}, z.core.$strip>;
|
|
445
|
+
/** One item leased from a seat`s inbox. */
|
|
446
|
+
export type InboxItem = z.infer<typeof InboxItemSchema>;
|
|
447
|
+
/** `POST /v1/seats/{seatId}/inbox/pull`. */
|
|
448
|
+
export declare const InboxPullRequestSchema: z.ZodObject<{
|
|
449
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
450
|
+
}, z.core.$strip>;
|
|
451
|
+
/** A leased batch of inbox items. */
|
|
452
|
+
export declare const InboxPullResponseSchema: z.ZodObject<{
|
|
453
|
+
items: z.ZodArray<z.ZodObject<{
|
|
454
|
+
id: z.ZodString;
|
|
455
|
+
leaseToken: z.ZodString;
|
|
456
|
+
receivedAt: z.ZodISODateTime;
|
|
457
|
+
expiresAt: z.ZodISODateTime;
|
|
458
|
+
sourceKind: z.ZodEnum<{
|
|
459
|
+
seat: "seat";
|
|
460
|
+
email: "email";
|
|
461
|
+
"connected-channel": "connected-channel";
|
|
462
|
+
a2a: "a2a";
|
|
463
|
+
}>;
|
|
464
|
+
sourceRef: z.ZodString;
|
|
465
|
+
envelope: z.ZodUnknown;
|
|
466
|
+
bodyUrl: z.ZodString;
|
|
467
|
+
sizeBytes: z.ZodNumber;
|
|
468
|
+
}, z.core.$strip>>;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
/** `POST /v1/seats/{seatId}/inbox/ack`. */
|
|
471
|
+
export declare const InboxAckRequestSchema: z.ZodObject<{
|
|
472
|
+
items: z.ZodArray<z.ZodObject<{
|
|
473
|
+
id: z.ZodString;
|
|
474
|
+
leaseToken: z.ZodString;
|
|
475
|
+
}, z.core.$strip>>;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
/** How many inbox leases were settled. */
|
|
478
|
+
export declare const InboxAckResponseSchema: z.ZodObject<{
|
|
479
|
+
acknowledged: z.ZodNumber;
|
|
480
|
+
}, z.core.$strip>;
|
|
481
|
+
/**
|
|
482
|
+
* `GET /v1/seats/{seatId}/inbox` — a read-only cursor-paginated browse.
|
|
483
|
+
*
|
|
484
|
+
* Separate from the pull on purpose: it takes no lease and changes no status,
|
|
485
|
+
* which is what stops an interface refresh from acknowledging somebody`s mail.
|
|
486
|
+
*/
|
|
487
|
+
export declare const InboxBrowseResponseSchema: z.ZodObject<{
|
|
488
|
+
items: z.ZodArray<z.ZodObject<{
|
|
489
|
+
expiresAt: z.ZodISODateTime;
|
|
490
|
+
id: z.ZodString;
|
|
491
|
+
receivedAt: z.ZodISODateTime;
|
|
492
|
+
sourceKind: z.ZodEnum<{
|
|
493
|
+
seat: "seat";
|
|
494
|
+
email: "email";
|
|
495
|
+
"connected-channel": "connected-channel";
|
|
496
|
+
a2a: "a2a";
|
|
497
|
+
}>;
|
|
498
|
+
sourceRef: z.ZodString;
|
|
499
|
+
envelope: z.ZodUnknown;
|
|
500
|
+
bodyUrl: z.ZodString;
|
|
501
|
+
sizeBytes: z.ZodNumber;
|
|
502
|
+
}, z.core.$strip>>;
|
|
503
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
504
|
+
}, z.core.$strip>;
|
|
505
|
+
/** How reachable a seat is right now. */
|
|
506
|
+
export declare const PresenceStateSchema: z.ZodEnum<{
|
|
507
|
+
active: "active";
|
|
508
|
+
unknown: "unknown";
|
|
509
|
+
offline: "offline";
|
|
510
|
+
reachable: "reachable";
|
|
511
|
+
}>;
|
|
512
|
+
/** `GET /v1/seats/{seatId}/presence`. */
|
|
513
|
+
export declare const PresenceSchema: z.ZodObject<{
|
|
514
|
+
seatId: z.ZodString;
|
|
515
|
+
state: z.ZodEnum<{
|
|
516
|
+
active: "active";
|
|
517
|
+
unknown: "unknown";
|
|
518
|
+
offline: "offline";
|
|
519
|
+
reachable: "reachable";
|
|
520
|
+
}>;
|
|
521
|
+
lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
|
|
522
|
+
source: z.ZodEnum<{
|
|
523
|
+
"cloud-link": "cloud-link";
|
|
524
|
+
heartbeat: "heartbeat";
|
|
525
|
+
}>;
|
|
526
|
+
}, z.core.$strip>;
|
|
527
|
+
/** How reachable a seat is right now. */
|
|
528
|
+
export type Presence = z.infer<typeof PresenceSchema>;
|
|
529
|
+
//# sourceMappingURL=seats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seats.d.ts","sourceRoot":"","sources":["../src/seats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,mEAAmE;AACnE,eAAO,MAAM,aAAa;;;EAEiD,CAAC;AAE5E,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB;;;;EAE0B,CAAC;AAExD,uEAAuE;AACvE,eAAO,MAAM,SAAS;;;;;;;;;iBAQyD,CAAC;AAEhF,uBAAuB;AACvB,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAE5C,uBAAuB;AACvB,eAAO,MAAM,sB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