@air/api-rest 0.8.0 → 0.9.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.cts CHANGED
@@ -238,9 +238,15 @@ interface GuestListResponse {
238
238
  data: Guest[];
239
239
  }
240
240
 
241
- /** Visitor comment access on a share link. */
241
+ /**
242
+ * Visitor comment access on a share link.
243
+ * `allowed` lets anyone with the link post comments.
244
+ */
242
245
  type ShareLinkCommentsAccess = "hidden" | "read_only" | "allowed";
243
- /** Visitor custom field access on a share link. */
246
+ /**
247
+ * Visitor custom field access on a share link.
248
+ * `editable` lets anyone with the link change custom field values.
249
+ */
244
250
  type ShareLinkCustomFieldsAccess = "hidden" | "read_only" | "editable";
245
251
  /**
246
252
  * Public share link fields shared by assets and boards.
@@ -292,10 +298,31 @@ interface BoardShareLinkListResponse extends CursorPageResponse<BoardShareLink>
292
298
  * Settings accepted on share-link create and update.
293
299
  * Omitted fields follow the workspace Share Link Defaults on create,
294
300
  * and stay unchanged on update.
301
+ *
302
+ * `password` is write only; reads return `hasPassword`. `null` clears
303
+ * `password` and `expiresAt`. An empty password is rejected. `expiresAt`
304
+ * must be an ISO 8601 date-time in the future.
305
+ *
306
+ * Turning `password`, `expiresAt`, `requireAccount`, `comments`, or
307
+ * `customFields` on needs the workspace `shareLinks` add-on. Otherwise the
308
+ * API returns 422 `ADDON_DISABLED` and applies nothing in the request.
309
+ * Raising `comments` from `read_only` to `allowed`, or `customFields` from
310
+ * `read_only` to `editable`, counts as turning it on, so a link that already
311
+ * shows comments or custom fields can still get that 422.
312
+ * `extra.settings` names the rejected settings, and uses `expiration` for
313
+ * `expiresAt`. Re-sending a value the link already has, changing an existing
314
+ * password or expiration, and turning a setting off are accepted.
295
315
  */
296
316
  interface ShareLinkWriteSettings {
297
317
  active?: boolean;
298
318
  allowDownload?: boolean;
319
+ /** Write only. `null` removes the password. */
320
+ password?: string | null;
321
+ /** ISO 8601 date-time in the future. `null` removes the expiration. */
322
+ expiresAt?: string | null;
323
+ requireAccount?: boolean;
324
+ comments?: ShareLinkCommentsAccess;
325
+ customFields?: ShareLinkCustomFieldsAccess;
299
326
  }
300
327
  /** Asset links also accept `showAllVersions`. */
301
328
  interface AssetShareLinkWriteSettings extends ShareLinkWriteSettings {
package/dist/index.d.ts CHANGED
@@ -238,9 +238,15 @@ interface GuestListResponse {
238
238
  data: Guest[];
239
239
  }
240
240
 
241
- /** Visitor comment access on a share link. */
241
+ /**
242
+ * Visitor comment access on a share link.
243
+ * `allowed` lets anyone with the link post comments.
244
+ */
242
245
  type ShareLinkCommentsAccess = "hidden" | "read_only" | "allowed";
243
- /** Visitor custom field access on a share link. */
246
+ /**
247
+ * Visitor custom field access on a share link.
248
+ * `editable` lets anyone with the link change custom field values.
249
+ */
244
250
  type ShareLinkCustomFieldsAccess = "hidden" | "read_only" | "editable";
245
251
  /**
246
252
  * Public share link fields shared by assets and boards.
@@ -292,10 +298,31 @@ interface BoardShareLinkListResponse extends CursorPageResponse<BoardShareLink>
292
298
  * Settings accepted on share-link create and update.
293
299
  * Omitted fields follow the workspace Share Link Defaults on create,
294
300
  * and stay unchanged on update.
301
+ *
302
+ * `password` is write only; reads return `hasPassword`. `null` clears
303
+ * `password` and `expiresAt`. An empty password is rejected. `expiresAt`
304
+ * must be an ISO 8601 date-time in the future.
305
+ *
306
+ * Turning `password`, `expiresAt`, `requireAccount`, `comments`, or
307
+ * `customFields` on needs the workspace `shareLinks` add-on. Otherwise the
308
+ * API returns 422 `ADDON_DISABLED` and applies nothing in the request.
309
+ * Raising `comments` from `read_only` to `allowed`, or `customFields` from
310
+ * `read_only` to `editable`, counts as turning it on, so a link that already
311
+ * shows comments or custom fields can still get that 422.
312
+ * `extra.settings` names the rejected settings, and uses `expiration` for
313
+ * `expiresAt`. Re-sending a value the link already has, changing an existing
314
+ * password or expiration, and turning a setting off are accepted.
295
315
  */
296
316
  interface ShareLinkWriteSettings {
297
317
  active?: boolean;
298
318
  allowDownload?: boolean;
319
+ /** Write only. `null` removes the password. */
320
+ password?: string | null;
321
+ /** ISO 8601 date-time in the future. `null` removes the expiration. */
322
+ expiresAt?: string | null;
323
+ requireAccount?: boolean;
324
+ comments?: ShareLinkCommentsAccess;
325
+ customFields?: ShareLinkCustomFieldsAccess;
299
326
  }
300
327
  /** Asset links also accept `showAllVersions`. */
301
328
  interface AssetShareLinkWriteSettings extends ShareLinkWriteSettings {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@air/api-rest",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "description": "Typed REST client for Air API",
6
6
  "main": "./dist/index.cjs",
@@ -29,7 +29,7 @@
29
29
  "clean": "rm -rf dist .tsc-out tsconfig.tsbuildinfo"
30
30
  },
31
31
  "dependencies": {
32
- "@air/api-core": "0.8.0"
32
+ "@air/api-core": "0.9.0"
33
33
  },
34
34
  "engines": {
35
35
  "node": ">=18"