basecamp-client 1.0.7 → 1.0.8

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # basecamp-client
2
2
 
3
- Basecamp API client and contract built with `ts-rest`. The package exposes a fully typed contract, a ready-to-use client builder, and OAuth helpers so teams can share a single source of truth across services, CLIs, and tests.
3
+ TypeScript client for Basecamp 4 with typed requests and responses, automatic pagination, rate-limit retries, and OAuth token refresh.
4
4
 
5
5
  ## Installation
6
6
 
@@ -10,6 +10,28 @@ npm install basecamp-client
10
10
  yarn add basecamp-client
11
11
  ```
12
12
 
13
+ Both CommonJS (`require`) and ESM (`import`) entry points are included, along with full TypeScript declarations.
14
+
15
+ ## Quick start
16
+
17
+ ```ts
18
+ import { buildClient, getBearerToken } from 'basecamp-client';
19
+
20
+ const bearerToken = await getBearerToken({
21
+ clientId: process.env.BASECAMP_CLIENT_ID!,
22
+ clientSecret: process.env.BASECAMP_CLIENT_SECRET!,
23
+ refreshToken: process.env.BASECAMP_REFRESH_TOKEN!,
24
+ });
25
+
26
+ const client = buildClient({
27
+ bearerToken,
28
+ accountId: process.env.BASECAMP_ACCOUNT_ID!,
29
+ });
30
+
31
+ const { body: projects } = await client.projects.list({ query: {} });
32
+ console.log(projects);
33
+ ```
34
+
13
35
  ## Usage
14
36
 
15
37
  ### Create a client
@@ -20,16 +42,36 @@ import { buildClient } from 'basecamp-client';
20
42
  const client = buildClient({
21
43
  bearerToken: process.env.BASECAMP_ACCESS_TOKEN!,
22
44
  accountId: process.env.BASECAMP_ACCOUNT_ID!,
23
- userAgent: process.env.BASECAMP_USER_AGENT!,
45
+ userAgent: process.env.BASECAMP_USER_AGENT!, // optional but recommended by Basecamp
24
46
  });
25
47
 
26
- const projects = await client.projects.list({ query: {} });
27
- console.log(projects.body);
48
+ const { status, body } = await client.projects.list({ query: {} });
49
+ ```
50
+
51
+ `buildClient` creates a ts-rest client that targets `https://3.basecampapi.com/{accountId}`. It sets `Authorization`, `Accept`, and `Content-Type` headers automatically and appends `.json` to every request path.
52
+
53
+ ### Refresh OAuth tokens
54
+
55
+ Basecamp access tokens expire. Use `getBearerToken` to exchange a refresh token for a fresh access token via the 37signals OAuth endpoint:
56
+
57
+ ```ts
58
+ import { getBearerToken } from 'basecamp-client';
59
+
60
+ const bearerToken = await getBearerToken({
61
+ clientId: process.env.BASECAMP_CLIENT_ID!,
62
+ clientSecret: process.env.BASECAMP_CLIENT_SECRET!,
63
+ refreshToken: process.env.BASECAMP_REFRESH_TOKEN!,
64
+ userAgent: process.env.BASECAMP_USER_AGENT!,
65
+ });
28
66
  ```
29
67
 
30
68
  ### Iterate through paginated endpoints
31
69
 
70
+ Basecamp collection endpoints return paginated results using `Link` headers. `asyncPagedIterator` follows those headers automatically:
71
+
32
72
  ```ts
73
+ import { asyncPagedIterator } from 'basecamp-client';
74
+
33
75
  for await (const project of asyncPagedIterator({
34
76
  fetchPage: client.projects.list,
35
77
  request: { query: {} },
@@ -38,28 +80,173 @@ for await (const project of asyncPagedIterator({
38
80
  }
39
81
  ```
40
82
 
41
- `asyncPagedIterator` follows the `Link` response headers emitted by Basecamp collection routes, automatically fetching `page=2`, `page=3`, and beyond until the API signals the final page. The helper yields each item returned by the underlying endpoint or lets you define a custom `extractItems` function for non-array responses.
83
+ To collect all pages into a single array:
42
84
 
43
- ### Refresh OAuth tokens
85
+ ```ts
86
+ import { asyncPagedToArray } from 'basecamp-client';
87
+
88
+ const allProjects = await asyncPagedToArray({
89
+ fetchPage: client.projects.list,
90
+ request: { query: {} },
91
+ });
92
+ ```
93
+
94
+ Options:
95
+
96
+ | Option | Description |
97
+ | --- | --- |
98
+ | `fetchPage` | The client method to call (e.g. `client.projects.list`). |
99
+ | `request` | Arguments forwarded to `fetchPage`. |
100
+ | `successStatus` | Expected HTTP status (default `200`). |
101
+ | `extractItems` | Custom function to pull items from the response (defaults to using `body` as an array). |
102
+ | `maxPages` | Stop after this many pages. |
103
+
104
+ ## Supported resources
105
+
106
+ The client covers the following Basecamp 4 API resources. Each resource is accessed as a property on the client object (e.g. `client.projects`, `client.todos`).
107
+
108
+ ### Projects and core
109
+
110
+ | Client property | Operations |
111
+ | --- | --- |
112
+ | `projects` | list, get, create, update, trash |
113
+ | `people` | list, listForProject, listPingable, get, me, updateProjectAccess |
114
+ | `recordings` | list, trash, archive, activate |
115
+ | `events` | listForRecording |
116
+ | `lineupMarkers` | create, update, destroy |
117
+
118
+ ### Messages and communication
119
+
120
+ | Client property | Operations |
121
+ | --- | --- |
122
+ | `messageBoards` | get, listForProject |
123
+ | `messages` | list, get, create, update, pin, unpin, trash |
124
+ | `messageTypes` | list, get, create, update, destroy |
125
+ | `comments` | list, get, create, update, trash |
126
+ | `campfires` | list, get, listLines, getLine, createLine, deleteLine |
127
+ | `inboxes` | get |
128
+ | `forwards` | list, get, trash |
129
+ | `inboxReplies` | list, get |
130
+ | `clientCorrespondences` | list, get |
131
+ | `clientApprovals` | list, get |
132
+ | `clientReplies` | list, get |
133
+ | `clientVisibility` | update |
134
+
135
+ ### To-dos
136
+
137
+ | Client property | Operations |
138
+ | --- | --- |
139
+ | `todoSets` | get |
140
+ | `todoLists` | list, get, create, update, trash |
141
+ | `todoListGroups` | list, create, reposition |
142
+ | `todos` | list, get, create, update, complete, uncomplete, reposition, trash |
143
+
144
+ ### Card tables (Kanban)
145
+
146
+ | Client property | Operations |
147
+ | --- | --- |
148
+ | `cardTables` | get |
149
+ | `cardTableColumns` | get, create, update, move, watch, unwatch, enableOnHold, disableOnHold, updateColor |
150
+ | `cardTableCards` | list, get, create, update, move |
151
+ | `cardTableSteps` | create, update, setCompletion, reposition |
152
+
153
+ ### Scheduling
154
+
155
+ | Client property | Operations |
156
+ | --- | --- |
157
+ | `schedules` | get, update |
158
+ | `scheduleEntries` | list, get, getOccurrence, create, update, trash |
159
+ | `questionnaires` | get |
160
+ | `questions` | list, get |
161
+
162
+ ### Documents and files
163
+
164
+ | Client property | Operations |
165
+ | --- | --- |
166
+ | `vaults` | list, get, create, update, trash |
167
+ | `documents` | list, get, create, update, trash |
168
+ | `uploads` | list, get, create, update, trash |
169
+ | `attachments` | create |
170
+
171
+ ## Conventions
172
+
173
+ ### Path parameters
174
+
175
+ Most resource-scoped endpoints require a `bucketId` parameter (the Basecamp project ID) along with a resource-specific ID. All IDs are non-negative integers, coerced from path parameters via Zod.
44
176
 
45
177
  ```ts
46
- import { getBearerToken } from 'basecamp-client';
178
+ // Fetch a single to-do
179
+ const { body: todo } = await client.todos.get({
180
+ params: { bucketId: 12345, todoId: 67890 },
181
+ });
182
+ ```
47
183
 
48
- const bearerToken = await getBearerToken({
49
- clientId: process.env.BASECAMP_CLIENT_ID!,
50
- clientSecret: process.env.BASECAMP_CLIENT_SECRET!,
51
- refreshToken: process.env.BASECAMP_REFRESH_TOKEN!,
52
- userAgent: process.env.BASECAMP_USER_AGENT!,
184
+ ### Recording-based status changes
185
+
186
+ Basecamp models many resources (messages, to-dos, documents, etc.) as "recordings". Trashing, archiving, and re-activating use a shared endpoint pattern through the `recordings` resource:
187
+
188
+ ```ts
189
+ // Trash any recording
190
+ await client.recordings.trash({
191
+ params: { bucketId: 12345, recordingId: 67890 },
53
192
  });
193
+ ```
54
194
 
55
- const client = buildClient({
56
- bearerToken: bearerToken,
57
- accountId: process.env.BASECAMP_ACCOUNT_ID!,
58
- userAgent: process.env.BASECAMP_USER_AGENT!,
195
+ Individual resources also expose convenience `trash` operations that map to the same underlying endpoint.
196
+
197
+ ### Querying and filtering
198
+
199
+ Collection endpoints accept query parameters for filtering and sorting:
200
+
201
+ ```ts
202
+ const { body: todos } = await client.todos.list({
203
+ params: { bucketId: 12345, todolistId: 67890 },
204
+ query: { status: 'active', completed: 'true' },
205
+ });
206
+ ```
207
+
208
+ Common query parameters across resources:
209
+
210
+ | Parameter | Values |
211
+ | --- | --- |
212
+ | `status` | `active`, `archived`, `trashed` |
213
+ | `sort` | `created_at`, `updated_at` |
214
+ | `direction` | `asc`, `desc` |
215
+ | `page` | Page number (1-indexed) |
216
+
217
+ ### Rate-limit handling
218
+
219
+ The built-in fetcher automatically retries on HTTP 429 responses (up to 20 attempts). It uses linear backoff with jitter and respects the `Retry-After` header when present. No configuration is needed.
220
+
221
+ ### Error handling
222
+
223
+ The client is configured with `throwOnUnknownStatus: true`, meaning any response with a status code not declared in the contract will throw. Expected error statuses (404, 507, etc.) are part of the contract and returned as typed discriminated unions:
224
+
225
+ ```ts
226
+ const response = await client.projects.get({
227
+ params: { projectId: 999 },
59
228
  });
229
+
230
+ if (response.status === 404) {
231
+ console.log('Project not found');
232
+ } else {
233
+ console.log(response.body.name);
234
+ }
60
235
  ```
61
236
 
62
- ### Contract access
237
+ ## The contract
238
+
239
+ Under the hood, every endpoint in this package is defined as a [ts-rest contract](https://ts-rest.com/). A contract is a declarative description of an API: its routes, path parameters, query parameters, request bodies, and response shapes -- all expressed with Zod schemas. The client you get from `buildClient` is generated directly from this contract, which is what makes every call fully type-safe with no code generation step.
240
+
241
+ Because the contract is a plain data structure (not tied to any HTTP library), it can be reused in ways that go beyond making API calls:
242
+
243
+ - **Custom fetchers** -- pass the contract to `initClient` from `@ts-rest/core` with your own fetch wrapper (e.g. to add logging, custom auth, or use a different HTTP library).
244
+ - **OpenAPI generation** -- the package already ships an `openapi.json` built from the contract. You can regenerate it or use the contract to produce docs, mock servers, or SDK stubs for other languages.
245
+ - **Server-side validation** -- if you build a Basecamp proxy or middleware, the same Zod schemas that type-check the client can validate incoming requests on the server.
246
+ - **Shared types** -- import the contract's inferred types into any TypeScript project so that producers and consumers of Basecamp data agree on the same shapes at compile time.
247
+ - **Runtime introspection** -- because the contract is a plain object with Zod schemas, you can iterate over its routes, inspect parameter and response schemas, or build tooling (e.g. CLI generators, permission auditors) that adapts automatically as the contract grows.
248
+
249
+ ### Use the contract directly
63
250
 
64
251
  ```ts
65
252
  import { contract } from 'basecamp-client';
@@ -68,6 +255,14 @@ import { initClient } from '@ts-rest/core';
68
255
  const client = initClient(contract, { /* custom fetcher config */ });
69
256
  ```
70
257
 
258
+ ### Type exports
259
+
260
+ The package exports the `Client` and `Contract` types, as well as Zod-inferred types for every schema:
261
+
262
+ ```ts
263
+ import type { Client, Contract } from 'basecamp-client';
264
+ ```
265
+
71
266
  ## Development
72
267
 
73
268
  ```bash
@@ -76,10 +271,10 @@ npm install
76
271
 
77
272
  ### Scripts
78
273
 
79
- - `npm run build` bundle the package with tsup (CJS + ESM + types).
80
- - `npm run contract:check` type-check the contract with `tsc --noEmit`.
81
- - `npm test` execute the Vitest live smoke suite *(requires Basecamp credentials and hits the real API)*.
82
- - `npm run format` / `npm run lint` / `npm run check` Biome formatting and linting utilities.
274
+ - `npm run build` -- bundle the package with tsup (CJS + ESM + types).
275
+ - `npm run contract:check` -- type-check the contract with `tsc --noEmit`.
276
+ - `npm test` -- execute the Vitest live smoke suite *(requires Basecamp credentials and hits the real API)*.
277
+ - `npm run format` / `npm run lint` / `npm run check` -- Biome formatting and linting utilities.
83
278
 
84
279
  ### Environment variables
85
280
 
@@ -113,3 +308,7 @@ npm test
113
308
  ```bash
114
309
  npm publish
115
310
  ```
311
+
312
+ ## License
313
+
314
+ MIT
package/dist/index.d.mts CHANGED
@@ -625,13 +625,13 @@ declare function buildClient(options: InitClientOptions): {
625
625
  body: zod.objectOutputType<{
626
626
  id: zod.ZodNumber;
627
627
  type: zod.ZodString;
628
- status: zod.ZodOptional<zod.ZodUnion<[zod.ZodEnum<["active", "trashed"]>, zod.ZodString]>>;
629
- title: zod.ZodOptional<zod.ZodString>;
630
- created_at: zod.ZodOptional<zod.ZodString>;
631
- updated_at: zod.ZodOptional<zod.ZodString>;
628
+ status: zod.ZodUnion<[zod.ZodEnum<["active", "trashed"]>, zod.ZodString]>;
629
+ title: zod.ZodString;
630
+ created_at: zod.ZodString;
631
+ updated_at: zod.ZodString;
632
632
  url: zod.ZodString;
633
633
  app_url: zod.ZodString;
634
- bucket: zod.ZodOptional<zod.ZodObject<{
634
+ bucket: zod.ZodObject<{
635
635
  id: zod.ZodNumber;
636
636
  name: zod.ZodString;
637
637
  type: zod.ZodString;
@@ -643,7 +643,7 @@ declare function buildClient(options: InitClientOptions): {
643
643
  type: string;
644
644
  id: number;
645
645
  name: string;
646
- }>>;
646
+ }>;
647
647
  parent: zod.ZodOptional<zod.ZodObject<{
648
648
  id: zod.ZodNumber;
649
649
  title: zod.ZodString;
@@ -663,7 +663,7 @@ declare function buildClient(options: InitClientOptions): {
663
663
  url: string;
664
664
  app_url: string;
665
665
  }>>;
666
- creator: zod.ZodOptional<zod.ZodObject<{
666
+ creator: zod.ZodObject<{
667
667
  id: zod.ZodNumber;
668
668
  attachable_sgid: zod.ZodString;
669
669
  name: zod.ZodString;
@@ -738,7 +738,7 @@ declare function buildClient(options: InitClientOptions): {
738
738
  id: number;
739
739
  name: string;
740
740
  } | undefined;
741
- }>>;
741
+ }>;
742
742
  }, zod.ZodTypeAny, "passthrough">[];
743
743
  headers: Headers;
744
744
  }>;
@@ -7304,13 +7304,13 @@ declare function buildClient(options: InitClientOptions): {
7304
7304
  body: zod.objectOutputType<{
7305
7305
  id: zod.ZodNumber;
7306
7306
  type: zod.ZodString;
7307
- status: zod.ZodOptional<zod.ZodUnion<[zod.ZodEnum<["active", "trashed"]>, zod.ZodString]>>;
7308
- title: zod.ZodOptional<zod.ZodString>;
7309
- created_at: zod.ZodOptional<zod.ZodString>;
7310
- updated_at: zod.ZodOptional<zod.ZodString>;
7307
+ status: zod.ZodUnion<[zod.ZodEnum<["active", "trashed"]>, zod.ZodString]>;
7308
+ title: zod.ZodString;
7309
+ created_at: zod.ZodString;
7310
+ updated_at: zod.ZodString;
7311
7311
  url: zod.ZodString;
7312
7312
  app_url: zod.ZodString;
7313
- bucket: zod.ZodOptional<zod.ZodObject<{
7313
+ bucket: zod.ZodObject<{
7314
7314
  id: zod.ZodNumber;
7315
7315
  name: zod.ZodString;
7316
7316
  type: zod.ZodString;
@@ -7322,7 +7322,7 @@ declare function buildClient(options: InitClientOptions): {
7322
7322
  type: string;
7323
7323
  id: number;
7324
7324
  name: string;
7325
- }>>;
7325
+ }>;
7326
7326
  parent: zod.ZodOptional<zod.ZodObject<{
7327
7327
  id: zod.ZodNumber;
7328
7328
  title: zod.ZodString;
@@ -7342,7 +7342,7 @@ declare function buildClient(options: InitClientOptions): {
7342
7342
  url: string;
7343
7343
  app_url: string;
7344
7344
  }>>;
7345
- creator: zod.ZodOptional<zod.ZodObject<{
7345
+ creator: zod.ZodObject<{
7346
7346
  id: zod.ZodNumber;
7347
7347
  attachable_sgid: zod.ZodString;
7348
7348
  name: zod.ZodString;
@@ -7417,7 +7417,7 @@ declare function buildClient(options: InitClientOptions): {
7417
7417
  id: number;
7418
7418
  name: string;
7419
7419
  } | undefined;
7420
- }>>;
7420
+ }>;
7421
7421
  } & {
7422
7422
  visible_to_clients: zod.ZodOptional<zod.ZodBoolean>;
7423
7423
  }, zod.ZodTypeAny, "passthrough">;
@@ -11204,13 +11204,13 @@ declare const contract: {
11204
11204
  200: z.ZodArray<z.ZodObject<{
11205
11205
  id: z.ZodNumber;
11206
11206
  type: z.ZodString;
11207
- status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>>;
11208
- title: z.ZodOptional<z.ZodString>;
11209
- created_at: z.ZodOptional<z.ZodString>;
11210
- updated_at: z.ZodOptional<z.ZodString>;
11207
+ status: z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>;
11208
+ title: z.ZodString;
11209
+ created_at: z.ZodString;
11210
+ updated_at: z.ZodString;
11211
11211
  url: z.ZodString;
11212
11212
  app_url: z.ZodString;
11213
- bucket: z.ZodOptional<z.ZodObject<{
11213
+ bucket: z.ZodObject<{
11214
11214
  id: z.ZodNumber;
11215
11215
  name: z.ZodString;
11216
11216
  type: z.ZodString;
@@ -11222,7 +11222,7 @@ declare const contract: {
11222
11222
  type: string;
11223
11223
  id: number;
11224
11224
  name: string;
11225
- }>>;
11225
+ }>;
11226
11226
  parent: z.ZodOptional<z.ZodObject<{
11227
11227
  id: z.ZodNumber;
11228
11228
  title: z.ZodString;
@@ -11242,7 +11242,7 @@ declare const contract: {
11242
11242
  url: string;
11243
11243
  app_url: string;
11244
11244
  }>>;
11245
- creator: z.ZodOptional<z.ZodObject<{
11245
+ creator: z.ZodObject<{
11246
11246
  id: z.ZodNumber;
11247
11247
  attachable_sgid: z.ZodString;
11248
11248
  name: z.ZodString;
@@ -11317,17 +11317,17 @@ declare const contract: {
11317
11317
  id: number;
11318
11318
  name: string;
11319
11319
  } | undefined;
11320
- }>>;
11320
+ }>;
11321
11321
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
11322
11322
  id: z.ZodNumber;
11323
11323
  type: z.ZodString;
11324
- status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>>;
11325
- title: z.ZodOptional<z.ZodString>;
11326
- created_at: z.ZodOptional<z.ZodString>;
11327
- updated_at: z.ZodOptional<z.ZodString>;
11324
+ status: z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>;
11325
+ title: z.ZodString;
11326
+ created_at: z.ZodString;
11327
+ updated_at: z.ZodString;
11328
11328
  url: z.ZodString;
11329
11329
  app_url: z.ZodString;
11330
- bucket: z.ZodOptional<z.ZodObject<{
11330
+ bucket: z.ZodObject<{
11331
11331
  id: z.ZodNumber;
11332
11332
  name: z.ZodString;
11333
11333
  type: z.ZodString;
@@ -11339,7 +11339,7 @@ declare const contract: {
11339
11339
  type: string;
11340
11340
  id: number;
11341
11341
  name: string;
11342
- }>>;
11342
+ }>;
11343
11343
  parent: z.ZodOptional<z.ZodObject<{
11344
11344
  id: z.ZodNumber;
11345
11345
  title: z.ZodString;
@@ -11359,7 +11359,7 @@ declare const contract: {
11359
11359
  url: string;
11360
11360
  app_url: string;
11361
11361
  }>>;
11362
- creator: z.ZodOptional<z.ZodObject<{
11362
+ creator: z.ZodObject<{
11363
11363
  id: z.ZodNumber;
11364
11364
  attachable_sgid: z.ZodString;
11365
11365
  name: z.ZodString;
@@ -11434,17 +11434,17 @@ declare const contract: {
11434
11434
  id: number;
11435
11435
  name: string;
11436
11436
  } | undefined;
11437
- }>>;
11437
+ }>;
11438
11438
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
11439
11439
  id: z.ZodNumber;
11440
11440
  type: z.ZodString;
11441
- status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>>;
11442
- title: z.ZodOptional<z.ZodString>;
11443
- created_at: z.ZodOptional<z.ZodString>;
11444
- updated_at: z.ZodOptional<z.ZodString>;
11441
+ status: z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>;
11442
+ title: z.ZodString;
11443
+ created_at: z.ZodString;
11444
+ updated_at: z.ZodString;
11445
11445
  url: z.ZodString;
11446
11446
  app_url: z.ZodString;
11447
- bucket: z.ZodOptional<z.ZodObject<{
11447
+ bucket: z.ZodObject<{
11448
11448
  id: z.ZodNumber;
11449
11449
  name: z.ZodString;
11450
11450
  type: z.ZodString;
@@ -11456,7 +11456,7 @@ declare const contract: {
11456
11456
  type: string;
11457
11457
  id: number;
11458
11458
  name: string;
11459
- }>>;
11459
+ }>;
11460
11460
  parent: z.ZodOptional<z.ZodObject<{
11461
11461
  id: z.ZodNumber;
11462
11462
  title: z.ZodString;
@@ -11476,7 +11476,7 @@ declare const contract: {
11476
11476
  url: string;
11477
11477
  app_url: string;
11478
11478
  }>>;
11479
- creator: z.ZodOptional<z.ZodObject<{
11479
+ creator: z.ZodObject<{
11480
11480
  id: z.ZodNumber;
11481
11481
  attachable_sgid: z.ZodString;
11482
11482
  name: z.ZodString;
@@ -11551,7 +11551,7 @@ declare const contract: {
11551
11551
  id: number;
11552
11552
  name: string;
11553
11553
  } | undefined;
11554
- }>>;
11554
+ }>;
11555
11555
  }, z.ZodTypeAny, "passthrough">>, "many">;
11556
11556
  };
11557
11557
  strictStatusCodes: true;
@@ -36821,13 +36821,13 @@ declare const contract: {
36821
36821
  200: z.ZodObject<{
36822
36822
  id: z.ZodNumber;
36823
36823
  type: z.ZodString;
36824
- status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>>;
36825
- title: z.ZodOptional<z.ZodString>;
36826
- created_at: z.ZodOptional<z.ZodString>;
36827
- updated_at: z.ZodOptional<z.ZodString>;
36824
+ status: z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>;
36825
+ title: z.ZodString;
36826
+ created_at: z.ZodString;
36827
+ updated_at: z.ZodString;
36828
36828
  url: z.ZodString;
36829
36829
  app_url: z.ZodString;
36830
- bucket: z.ZodOptional<z.ZodObject<{
36830
+ bucket: z.ZodObject<{
36831
36831
  id: z.ZodNumber;
36832
36832
  name: z.ZodString;
36833
36833
  type: z.ZodString;
@@ -36839,7 +36839,7 @@ declare const contract: {
36839
36839
  type: string;
36840
36840
  id: number;
36841
36841
  name: string;
36842
- }>>;
36842
+ }>;
36843
36843
  parent: z.ZodOptional<z.ZodObject<{
36844
36844
  id: z.ZodNumber;
36845
36845
  title: z.ZodString;
@@ -36859,7 +36859,7 @@ declare const contract: {
36859
36859
  url: string;
36860
36860
  app_url: string;
36861
36861
  }>>;
36862
- creator: z.ZodOptional<z.ZodObject<{
36862
+ creator: z.ZodObject<{
36863
36863
  id: z.ZodNumber;
36864
36864
  attachable_sgid: z.ZodString;
36865
36865
  name: z.ZodString;
@@ -36934,19 +36934,19 @@ declare const contract: {
36934
36934
  id: number;
36935
36935
  name: string;
36936
36936
  } | undefined;
36937
- }>>;
36937
+ }>;
36938
36938
  } & {
36939
36939
  visible_to_clients: z.ZodOptional<z.ZodBoolean>;
36940
36940
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
36941
36941
  id: z.ZodNumber;
36942
36942
  type: z.ZodString;
36943
- status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>>;
36944
- title: z.ZodOptional<z.ZodString>;
36945
- created_at: z.ZodOptional<z.ZodString>;
36946
- updated_at: z.ZodOptional<z.ZodString>;
36943
+ status: z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>;
36944
+ title: z.ZodString;
36945
+ created_at: z.ZodString;
36946
+ updated_at: z.ZodString;
36947
36947
  url: z.ZodString;
36948
36948
  app_url: z.ZodString;
36949
- bucket: z.ZodOptional<z.ZodObject<{
36949
+ bucket: z.ZodObject<{
36950
36950
  id: z.ZodNumber;
36951
36951
  name: z.ZodString;
36952
36952
  type: z.ZodString;
@@ -36958,7 +36958,7 @@ declare const contract: {
36958
36958
  type: string;
36959
36959
  id: number;
36960
36960
  name: string;
36961
- }>>;
36961
+ }>;
36962
36962
  parent: z.ZodOptional<z.ZodObject<{
36963
36963
  id: z.ZodNumber;
36964
36964
  title: z.ZodString;
@@ -36978,7 +36978,7 @@ declare const contract: {
36978
36978
  url: string;
36979
36979
  app_url: string;
36980
36980
  }>>;
36981
- creator: z.ZodOptional<z.ZodObject<{
36981
+ creator: z.ZodObject<{
36982
36982
  id: z.ZodNumber;
36983
36983
  attachable_sgid: z.ZodString;
36984
36984
  name: z.ZodString;
@@ -37053,19 +37053,19 @@ declare const contract: {
37053
37053
  id: number;
37054
37054
  name: string;
37055
37055
  } | undefined;
37056
- }>>;
37056
+ }>;
37057
37057
  } & {
37058
37058
  visible_to_clients: z.ZodOptional<z.ZodBoolean>;
37059
37059
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
37060
37060
  id: z.ZodNumber;
37061
37061
  type: z.ZodString;
37062
- status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>>;
37063
- title: z.ZodOptional<z.ZodString>;
37064
- created_at: z.ZodOptional<z.ZodString>;
37065
- updated_at: z.ZodOptional<z.ZodString>;
37062
+ status: z.ZodUnion<[z.ZodEnum<["active", "trashed"]>, z.ZodString]>;
37063
+ title: z.ZodString;
37064
+ created_at: z.ZodString;
37065
+ updated_at: z.ZodString;
37066
37066
  url: z.ZodString;
37067
37067
  app_url: z.ZodString;
37068
- bucket: z.ZodOptional<z.ZodObject<{
37068
+ bucket: z.ZodObject<{
37069
37069
  id: z.ZodNumber;
37070
37070
  name: z.ZodString;
37071
37071
  type: z.ZodString;
@@ -37077,7 +37077,7 @@ declare const contract: {
37077
37077
  type: string;
37078
37078
  id: number;
37079
37079
  name: string;
37080
- }>>;
37080
+ }>;
37081
37081
  parent: z.ZodOptional<z.ZodObject<{
37082
37082
  id: z.ZodNumber;
37083
37083
  title: z.ZodString;
@@ -37097,7 +37097,7 @@ declare const contract: {
37097
37097
  url: string;
37098
37098
  app_url: string;
37099
37099
  }>>;
37100
- creator: z.ZodOptional<z.ZodObject<{
37100
+ creator: z.ZodObject<{
37101
37101
  id: z.ZodNumber;
37102
37102
  attachable_sgid: z.ZodString;
37103
37103
  name: z.ZodString;
@@ -37172,7 +37172,7 @@ declare const contract: {
37172
37172
  id: number;
37173
37173
  name: string;
37174
37174
  } | undefined;
37175
- }>>;
37175
+ }>;
37176
37176
  } & {
37177
37177
  visible_to_clients: z.ZodOptional<z.ZodBoolean>;
37178
37178
  }, z.ZodTypeAny, "passthrough">>;