@air/api-rest 0.8.0 → 0.10.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Typed REST client for the [Air API SDK](https://github.com/AirLabsTeam/air-api-sdk).
4
4
 
5
- This package provides the resource classes (boards, assets, tags, custom fields, uploads, imports, roles) and their TypeScript types. It builds on `@air/api-core` for HTTP transport.
5
+ This package provides the resource classes (boards, showcases, assets, tags, custom fields, uploads, imports, roles) and their TypeScript types. It builds on `@air/api-core` for HTTP transport.
6
6
 
7
7
  ## Installation
8
8
 
@@ -20,7 +20,8 @@ npm install @air/api-rest
20
20
 
21
21
  ## What's included
22
22
 
23
- - Resource classes: `BoardsResource`, `AssetsResource`, `TagsResource`, `CustomFieldsResource`, `UploadsResource`, `ImportsResource`, `RolesResource`
23
+ - Resource classes: `Boards`, `Showcases`, `Assets`, `Tags`, `CustomFields`, `Uploads`, `Imports`, `Roles`
24
+ - Showcases: `list`, `get`, `create`, `update`, `updateShareLink`, `addAssets`, `removeAsset`, `addBoards`, `removeBoard`, plus a `showcaseId` filter on `assets.list` and `boards.list`
24
25
  - Asset CDN link helpers: `listCdnLinks`, `createCdnLink`, and `updateCdnLink`
25
26
  - Share links: `listShareLinks`, `createShareLink`, and `updateShareLink` on assets and boards
26
27
  - Full TypeScript types for all API request/response shapes
package/dist/index.cjs CHANGED
@@ -48,6 +48,7 @@ __export(index_exports, {
48
48
  PermissionError: () => import_api_core2.PermissionError,
49
49
  RateLimitError: () => import_api_core2.RateLimitError,
50
50
  Roles: () => Roles,
51
+ Showcases: () => Showcases,
51
52
  Tags: () => Tags,
52
53
  TimeoutError: () => import_api_core2.TimeoutError,
53
54
  Uploads: () => Uploads,
@@ -99,6 +100,7 @@ var Assets = class {
99
100
  limit: params.limit,
100
101
  cursor: params.cursor,
101
102
  parentBoardId: params.parentBoardId,
103
+ showcaseId: params.showcaseId,
102
104
  search: params.search
103
105
  };
104
106
  if (params.includeNestedAssets !== void 0) {
@@ -248,6 +250,7 @@ var Boards = class {
248
250
  cursor: params.cursor,
249
251
  name: params.name,
250
252
  parentBoardId: params.parentBoardId,
253
+ showcaseId: params.showcaseId,
251
254
  libraryId: params.libraryId,
252
255
  inGeneralLibrary: params.inGeneralLibrary
253
256
  };
@@ -494,6 +497,137 @@ var Roles = class {
494
497
  }
495
498
  };
496
499
 
500
+ // src/resources/showcases.ts
501
+ var Showcases = class {
502
+ constructor(client) {
503
+ this.client = client;
504
+ }
505
+ /**
506
+ * List the showcases the caller can see.
507
+ *
508
+ * A role that can view every showcase in the workspace sees all of them.
509
+ * Otherwise only the showcases that caller owns are returned. Showcases
510
+ * without a share link are omitted; read those with `get`. Sub-pages are
511
+ * not listed separately.
512
+ *
513
+ * Requires the `showcases.read` and `share_links.read` OAuth scopes.
514
+ */
515
+ list(params = {}) {
516
+ const query = {
517
+ limit: params.limit,
518
+ cursor: params.cursor,
519
+ search: params.search,
520
+ status: params.status
521
+ };
522
+ return this.client.requestCursorPage(
523
+ { method: "GET", path: "/showcases", query },
524
+ query
525
+ );
526
+ }
527
+ /**
528
+ * Get a showcase and its share link. `shareLink` is null when the
529
+ * showcase has none.
530
+ *
531
+ * Requires the `showcases.read` and `share_links.read` OAuth scopes.
532
+ */
533
+ async get(showcaseId) {
534
+ return this.client.request({
535
+ method: "GET",
536
+ path: `/showcases/${showcaseId}`
537
+ });
538
+ }
539
+ /**
540
+ * Create a showcase and its share link in one step. The result includes
541
+ * the link. Create does not take items.
542
+ *
543
+ * Requires the `showcases.write` and `share_links.write` OAuth scopes.
544
+ */
545
+ async create(params) {
546
+ return this.client.request({
547
+ method: "POST",
548
+ path: "/showcases",
549
+ body: params
550
+ });
551
+ }
552
+ /**
553
+ * Rename a showcase or change its description. Only the fields you send
554
+ * change. Returns no body.
555
+ *
556
+ * Requires the `showcases.write` OAuth scope.
557
+ */
558
+ async update(showcaseId, params) {
559
+ return this.client.request({
560
+ method: "PATCH",
561
+ path: `/showcases/${showcaseId}`,
562
+ body: params
563
+ });
564
+ }
565
+ /**
566
+ * Change the settings of a showcase's share link. Only the settings you
567
+ * send change. Send `password: null` or `expiresAt: null` to remove them.
568
+ * Returns no body.
569
+ *
570
+ * Requires the `share_links.write` and `showcases.read` OAuth scopes.
571
+ */
572
+ async updateShareLink(showcaseId, shareLinkId, params) {
573
+ return this.client.request({
574
+ method: "PATCH",
575
+ path: `/showcases/${showcaseId}/share-links/${shareLinkId}`,
576
+ body: params
577
+ });
578
+ }
579
+ /**
580
+ * Add assets to a showcase. Assets already in it are skipped. Returns no
581
+ * body. List them with `assets.list({ showcaseId })`.
582
+ *
583
+ * Requires the `showcases.write` and `assets.read` OAuth scopes.
584
+ */
585
+ async addAssets(showcaseId, params) {
586
+ return this.client.request({
587
+ method: "POST",
588
+ path: `/showcases/${showcaseId}/assets`,
589
+ body: params
590
+ });
591
+ }
592
+ /**
593
+ * Remove an asset from a showcase. The asset itself is not deleted.
594
+ * Removing an asset that is not in the showcase succeeds. Returns no body.
595
+ *
596
+ * Requires the `showcases.write` OAuth scope.
597
+ */
598
+ async removeAsset(showcaseId, assetId) {
599
+ return this.client.request({
600
+ method: "DELETE",
601
+ path: `/showcases/${showcaseId}/assets/${assetId}`
602
+ });
603
+ }
604
+ /**
605
+ * Add boards to a showcase. Boards already in it are skipped. Returns no
606
+ * body. List them with `boards.list({ showcaseId })`.
607
+ *
608
+ * Requires the `showcases.write` and `boards.read` OAuth scopes.
609
+ */
610
+ async addBoards(showcaseId, params) {
611
+ return this.client.request({
612
+ method: "POST",
613
+ path: `/showcases/${showcaseId}/boards`,
614
+ body: params
615
+ });
616
+ }
617
+ /**
618
+ * Remove a board from a showcase. The board itself is not deleted.
619
+ * Removing a board that is not in the showcase succeeds. Returns no body.
620
+ *
621
+ * Requires the `showcases.write` OAuth scope.
622
+ */
623
+ async removeBoard(showcaseId, boardId) {
624
+ return this.client.request({
625
+ method: "DELETE",
626
+ path: `/showcases/${showcaseId}/boards/${boardId}`
627
+ });
628
+ }
629
+ };
630
+
497
631
  // src/resources/tags.ts
498
632
  var Tags = class {
499
633
  constructor(client) {
@@ -783,6 +917,7 @@ var Workspaces = class {
783
917
  var AirApi = class extends import_api_core.AirBase {
784
918
  assets;
785
919
  boards;
920
+ showcases;
786
921
  libraries;
787
922
  tags;
788
923
  customFields;
@@ -794,6 +929,7 @@ var AirApi = class extends import_api_core.AirBase {
794
929
  super(options);
795
930
  this.assets = new Assets(this);
796
931
  this.boards = new Boards(this);
932
+ this.showcases = new Showcases(this);
797
933
  this.libraries = new Libraries(this);
798
934
  this.tags = new Tags(this);
799
935
  this.customFields = new CustomFields(this);
@@ -826,6 +962,7 @@ var import_api_core2 = require("@air/api-core");
826
962
  PermissionError,
827
963
  RateLimitError,
828
964
  Roles,
965
+ Showcases,
829
966
  Tags,
830
967
  TimeoutError,
831
968
  Uploads,
package/dist/index.d.cts CHANGED
@@ -82,6 +82,19 @@ interface AssetCustomFieldDateFilter {
82
82
  type AssetCustomFieldFilter = string | AssetCustomFieldSelectFilter | AssetCustomFieldTextFilter | AssetCustomFieldDateFilter;
83
83
  interface AssetListParams extends CursorPageParams {
84
84
  parentBoardId?: string;
85
+ /**
86
+ * Only return assets added to this showcase. With `includeNestedAssets`,
87
+ * also returns the assets inside the boards added to it. Items on the
88
+ * showcase's sub-pages are not returned. Combining with `parentBoardId`
89
+ * or `semantic: true` is rejected with 400. An unknown showcase is 404;
90
+ * one the caller cannot view is 403.
91
+ */
92
+ showcaseId?: string;
93
+ /**
94
+ * With `parentBoardId`, return assets from nested sub-boards. With
95
+ * `showcaseId`, also return assets inside the boards added to the
96
+ * showcase. Requires one of those filters.
97
+ */
85
98
  includeNestedAssets?: boolean;
86
99
  tag?: string | string[];
87
100
  /**
@@ -111,7 +124,7 @@ interface AssetListParams extends CursorPageParams {
111
124
  * When true, `search` is used for semantic search via AI embeddings.
112
125
  * Requires a non-blank `search` value and Semantic Search enabled on the workspace.
113
126
  * Returns a single page of results ordered by relevance. Combining with `tag`,
114
- * `customField`, `createdAt`, or `cursor` is rejected by the API with 400.
127
+ * `customField`, `createdAt`, `cursor`, or `showcaseId` is rejected by the API with 400.
115
128
  */
116
129
  semantic?: boolean;
117
130
  "createdAt[gte]"?: string;
@@ -181,6 +194,13 @@ interface Board {
181
194
  interface BoardListParams extends CursorPageParams {
182
195
  name?: string;
183
196
  parentBoardId?: string;
197
+ /**
198
+ * Only return boards added to this showcase. Boards on the showcase's
199
+ * sub-pages are not returned. Combining with `parentBoardId`, `libraryId`,
200
+ * or `inGeneralLibrary` is rejected with 400. An unknown showcase is 404;
201
+ * one the caller cannot view is 403.
202
+ */
203
+ showcaseId?: string;
184
204
  /**
185
205
  * Select filters only, as `fieldId:valueId`. Repeats of one field are OR, and
186
206
  * different fields are AND. Plain-text and date operators are rejected with
@@ -189,13 +209,14 @@ interface BoardListParams extends CursorPageParams {
189
209
  customField?: string | string[];
190
210
  /**
191
211
  * Only return boards in this library. Mutually exclusive with
192
- * `inGeneralLibrary` — passing both results in a `400` (BadRequestError).
212
+ * `inGeneralLibrary` and with `showcaseId`. Combining either pair results
213
+ * in a `400` (BadRequestError).
193
214
  */
194
215
  libraryId?: string;
195
216
  /**
196
217
  * Only return boards in the General library (boards not in any real library).
197
- * Mutually exclusive with `libraryId` — passing both results in a `400`
198
- * (BadRequestError).
218
+ * Mutually exclusive with `libraryId` and with `showcaseId`. Combining
219
+ * either pair results in a `400` (BadRequestError).
199
220
  */
200
221
  inGeneralLibrary?: boolean;
201
222
  }
@@ -238,12 +259,18 @@ interface GuestListResponse {
238
259
  data: Guest[];
239
260
  }
240
261
 
241
- /** Visitor comment access on a share link. */
262
+ /**
263
+ * Visitor comment access on a share link.
264
+ * `allowed` lets anyone with the link post comments.
265
+ */
242
266
  type ShareLinkCommentsAccess = "hidden" | "read_only" | "allowed";
243
- /** Visitor custom field access on a share link. */
267
+ /**
268
+ * Visitor custom field access on a share link.
269
+ * `editable` lets anyone with the link change custom field values.
270
+ */
244
271
  type ShareLinkCustomFieldsAccess = "hidden" | "read_only" | "editable";
245
272
  /**
246
- * Public share link fields shared by assets and boards.
273
+ * Public share link fields shared by assets, boards, and showcases.
247
274
  * `url` is the link to give to people. The password is never returned;
248
275
  * `hasPassword` says whether one is set. Disabled links are included
249
276
  * with `active: false`.
@@ -292,10 +319,31 @@ interface BoardShareLinkListResponse extends CursorPageResponse<BoardShareLink>
292
319
  * Settings accepted on share-link create and update.
293
320
  * Omitted fields follow the workspace Share Link Defaults on create,
294
321
  * and stay unchanged on update.
322
+ *
323
+ * `password` is write only; reads return `hasPassword`. `null` clears
324
+ * `password` and `expiresAt`. An empty password is rejected. `expiresAt`
325
+ * must be an ISO 8601 date-time in the future.
326
+ *
327
+ * Turning `password`, `expiresAt`, `requireAccount`, `comments`, or
328
+ * `customFields` on needs the workspace `shareLinks` add-on. Otherwise the
329
+ * API returns 422 `ADDON_DISABLED` and applies nothing in the request.
330
+ * Raising `comments` from `read_only` to `allowed`, or `customFields` from
331
+ * `read_only` to `editable`, counts as turning it on, so a link that already
332
+ * shows comments or custom fields can still get that 422.
333
+ * `extra.settings` names the rejected settings, and uses `expiration` for
334
+ * `expiresAt`. Re-sending a value the link already has, changing an existing
335
+ * password or expiration, and turning a setting off are accepted.
295
336
  */
296
337
  interface ShareLinkWriteSettings {
297
338
  active?: boolean;
298
339
  allowDownload?: boolean;
340
+ /** Write only. `null` removes the password. */
341
+ password?: string | null;
342
+ /** ISO 8601 date-time in the future. `null` removes the expiration. */
343
+ expiresAt?: string | null;
344
+ requireAccount?: boolean;
345
+ comments?: ShareLinkCommentsAccess;
346
+ customFields?: ShareLinkCustomFieldsAccess;
299
347
  }
300
348
  /** Asset links also accept `showAllVersions`. */
301
349
  interface AssetShareLinkWriteSettings extends ShareLinkWriteSettings {
@@ -505,6 +553,179 @@ declare class Roles {
505
553
  list(params?: RoleListParams): Promise<Role[]>;
506
554
  }
507
555
 
556
+ /**
557
+ * Filter for the state of a showcase's share link.
558
+ * `active`: the link is enabled. `inactive`: the link is disabled.
559
+ * `expired`: the link's expiration date has passed.
560
+ */
561
+ type ShowcaseShareLinkStatus = "active" | "inactive" | "expired";
562
+ /** How many items the showcase holds. */
563
+ interface ShowcaseStats {
564
+ assetCount: number;
565
+ fileCount: number;
566
+ boardCount: number;
567
+ }
568
+ /**
569
+ * Showcase share link. A showcase has at most one, and it uses the same
570
+ * fields as a board share link.
571
+ */
572
+ type ShowcaseShareLink = ShareLink;
573
+ /**
574
+ * A showcase and its share link.
575
+ *
576
+ * `shareLink` is null when the showcase has no link. `get` returns those
577
+ * showcases. `list` omits them. Every showcase created through `create`
578
+ * has a link.
579
+ *
580
+ * Sub-pages are not part of this object. A showcase that has them still
581
+ * comes back as one showcase, and item lists return only its top-level items.
582
+ */
583
+ interface Showcase {
584
+ id: string;
585
+ name: string;
586
+ description: string | null;
587
+ createdAt: string;
588
+ updatedAt: string;
589
+ stats: ShowcaseStats;
590
+ shareLink: ShowcaseShareLink | null;
591
+ }
592
+ /**
593
+ * Query for `GET /showcases`.
594
+ * The API defaults `limit` to 12 and treats values above 200 as 200.
595
+ * An empty `search`, an unknown `status`, a `limit` that is not a positive
596
+ * integer, or a cursor this endpoint did not issue is 400.
597
+ */
598
+ interface ShowcaseListParams extends CursorPageParams {
599
+ /** Only return showcases whose name contains this text. */
600
+ search?: string;
601
+ /** Filter by the state of the showcase's share link. */
602
+ status?: ShowcaseShareLinkStatus;
603
+ }
604
+ /**
605
+ * Body for `POST /showcases`.
606
+ * Creates the showcase and its share link together. It does not take items;
607
+ * add them with `addAssets` and `addBoards`. Omitted `shareLink` settings
608
+ * follow the workspace Share Link Defaults. The same paid settings as a
609
+ * board link apply, including `422` `ADDON_DISABLED` when the plan does not
610
+ * include one that the request turns on. If the link cannot be created, the
611
+ * showcase is not created either.
612
+ */
613
+ interface ShowcaseCreateParams {
614
+ name: string;
615
+ /** Empty string is rejected. Omit the field to leave the description unset. */
616
+ description?: string;
617
+ shareLink?: ShareLinkWriteSettings;
618
+ }
619
+ /**
620
+ * Body for `PATCH /showcases/:showcaseId`.
621
+ * Only the fields you send change. `null` removes the description. An empty
622
+ * or null `name` is rejected. An empty body changes nothing.
623
+ */
624
+ interface ShowcaseUpdateParams {
625
+ name?: string;
626
+ description?: string | null;
627
+ }
628
+ /** Body for `POST /showcases/:showcaseId/assets`. `assetIds` must be non-empty. */
629
+ interface AddShowcaseAssetsParams {
630
+ assetIds: string[];
631
+ }
632
+ /** Body for `POST /showcases/:showcaseId/boards`. `boardIds` must be non-empty. */
633
+ interface AddShowcaseBoardsParams {
634
+ boardIds: string[];
635
+ }
636
+ /**
637
+ * Body for `PATCH /showcases/:showcaseId/share-links/:shareLinkId`.
638
+ * Same settings as a board share link.
639
+ */
640
+ type ShowcaseShareLinkUpdateParams = ShareLinkWriteSettings;
641
+
642
+ /**
643
+ * Showcases. A showcase is a collection with one share link.
644
+ *
645
+ * `create` makes the showcase and its share link together. The result
646
+ * includes the link, and the showcase starts empty. Add items with
647
+ * `addAssets` and `addBoards`.
648
+ *
649
+ * Sub-pages are not exposed. Item lists return only a showcase's top-level
650
+ * items, and a sub-page id is not found on these routes.
651
+ *
652
+ * An unknown, trashed, or other-workspace id is 404. An item or showcase
653
+ * the caller cannot view is 403. Adding an item that is already in the
654
+ * showcase, or removing one that is not, succeeds and returns 204.
655
+ */
656
+ declare class Showcases {
657
+ private client;
658
+ constructor(client: AirBase);
659
+ /**
660
+ * List the showcases the caller can see.
661
+ *
662
+ * A role that can view every showcase in the workspace sees all of them.
663
+ * Otherwise only the showcases that caller owns are returned. Showcases
664
+ * without a share link are omitted; read those with `get`. Sub-pages are
665
+ * not listed separately.
666
+ *
667
+ * Requires the `showcases.read` and `share_links.read` OAuth scopes.
668
+ */
669
+ list(params?: ShowcaseListParams): PagePromise<Showcase>;
670
+ /**
671
+ * Get a showcase and its share link. `shareLink` is null when the
672
+ * showcase has none.
673
+ *
674
+ * Requires the `showcases.read` and `share_links.read` OAuth scopes.
675
+ */
676
+ get(showcaseId: string): Promise<Showcase>;
677
+ /**
678
+ * Create a showcase and its share link in one step. The result includes
679
+ * the link. Create does not take items.
680
+ *
681
+ * Requires the `showcases.write` and `share_links.write` OAuth scopes.
682
+ */
683
+ create(params: ShowcaseCreateParams): Promise<Showcase>;
684
+ /**
685
+ * Rename a showcase or change its description. Only the fields you send
686
+ * change. Returns no body.
687
+ *
688
+ * Requires the `showcases.write` OAuth scope.
689
+ */
690
+ update(showcaseId: string, params: ShowcaseUpdateParams): Promise<void>;
691
+ /**
692
+ * Change the settings of a showcase's share link. Only the settings you
693
+ * send change. Send `password: null` or `expiresAt: null` to remove them.
694
+ * Returns no body.
695
+ *
696
+ * Requires the `share_links.write` and `showcases.read` OAuth scopes.
697
+ */
698
+ updateShareLink(showcaseId: string, shareLinkId: string, params: ShowcaseShareLinkUpdateParams): Promise<void>;
699
+ /**
700
+ * Add assets to a showcase. Assets already in it are skipped. Returns no
701
+ * body. List them with `assets.list({ showcaseId })`.
702
+ *
703
+ * Requires the `showcases.write` and `assets.read` OAuth scopes.
704
+ */
705
+ addAssets(showcaseId: string, params: AddShowcaseAssetsParams): Promise<void>;
706
+ /**
707
+ * Remove an asset from a showcase. The asset itself is not deleted.
708
+ * Removing an asset that is not in the showcase succeeds. Returns no body.
709
+ *
710
+ * Requires the `showcases.write` OAuth scope.
711
+ */
712
+ removeAsset(showcaseId: string, assetId: string): Promise<void>;
713
+ /**
714
+ * Add boards to a showcase. Boards already in it are skipped. Returns no
715
+ * body. List them with `boards.list({ showcaseId })`.
716
+ *
717
+ * Requires the `showcases.write` and `boards.read` OAuth scopes.
718
+ */
719
+ addBoards(showcaseId: string, params: AddShowcaseBoardsParams): Promise<void>;
720
+ /**
721
+ * Remove a board from a showcase. The board itself is not deleted.
722
+ * Removing a board that is not in the showcase succeeds. Returns no body.
723
+ *
724
+ * Requires the `showcases.write` OAuth scope.
725
+ */
726
+ removeBoard(showcaseId: string, boardId: string): Promise<void>;
727
+ }
728
+
508
729
  declare class Tags {
509
730
  private client;
510
731
  constructor(client: AirBase);
@@ -641,6 +862,7 @@ interface AirApiOptions extends AirBaseOptions {
641
862
  declare class AirApi extends AirBase {
642
863
  readonly assets: Assets;
643
864
  readonly boards: Boards;
865
+ readonly showcases: Showcases;
644
866
  readonly libraries: Libraries;
645
867
  readonly tags: Tags;
646
868
  readonly customFields: CustomFields;
@@ -651,4 +873,4 @@ declare class AirApi extends AirBase {
651
873
  constructor(options?: AirApiOptions);
652
874
  }
653
875
 
654
- export { type AddBoardAssetsParams, type AddGuestParams, type AddVersionTagParams, AirApi, type AirApiOptions, type Asset, type AssetBoardListParams, type AssetCdnLinkCreateParams, type AssetCdnLinkListResponse, type AssetCdnLinkUpdateParams, type AssetCustomFieldDateFilter, type AssetCustomFieldDateOperator, type AssetCustomFieldFilter, type AssetCustomFieldSelectFilter, type AssetCustomFieldTextFilter, type AssetCustomFieldTextOperator, type AssetCustomFieldValue, type AssetListParams, type AssetShareLink, type AssetShareLinkCreateParams, type AssetShareLinkListParams, type AssetShareLinkUpdateParams, type AssetShareLinkWriteSettings, type AssetVersion, type AssetVersionDownloadUrl, type AssetVersionListResponse, type AssetVersionUpdateParams, type AssetVersionUrls, Assets, type Board, type BoardCreateParams, type BoardListParams, type BoardShareLink, type BoardShareLinkCreateParams, type BoardShareLinkListResponse, type BoardShareLinkUpdateParams, type BoardUpdateParams, Boards, type CdnLink, type CompleteMultipartParams, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldType, type CustomFieldUpdateParams, type CustomFieldValue, type CustomFieldValueCreateParams, type CustomFieldValueUpdateParams, CustomFields, type FileMeta, type FileSource, type GetPartUploadUrlParams, type GetPartUploadUrlResponse, type Guest, type GuestListParams, type GuestListResponse, type ImportCreateParams, type ImportCreateResponse, type ImportStatus, type ImportStatusResponse, Imports, type LargeUploadResponse, Libraries, type Library, type LibraryCreateParams, type LibraryListParams, type LibraryUpdateParams, type Role, type RoleListParams, type RoleListResponse, Roles, type SetBoardCustomFieldParams, type SetCustomFieldParams, type ShareLink, type ShareLinkCommentsAccess, type ShareLinkCustomFieldsAccess, type ShareLinkWriteSettings, type SmallUploadResponse, type SmartTag, type Tag, type TagCreateParams, type TagListParams, type TagUpdateParams, Tags, type UpdateGuestParams, type UploadCreateParams, type UploadCreateResponse, type UploadFileOptions, type UploadFileParams, type UploadFileResponse, Uploads, type Workspace, type WorkspaceListResponse, Workspaces };
876
+ export { type AddBoardAssetsParams, type AddGuestParams, type AddShowcaseAssetsParams, type AddShowcaseBoardsParams, type AddVersionTagParams, AirApi, type AirApiOptions, type Asset, type AssetBoardListParams, type AssetCdnLinkCreateParams, type AssetCdnLinkListResponse, type AssetCdnLinkUpdateParams, type AssetCustomFieldDateFilter, type AssetCustomFieldDateOperator, type AssetCustomFieldFilter, type AssetCustomFieldSelectFilter, type AssetCustomFieldTextFilter, type AssetCustomFieldTextOperator, type AssetCustomFieldValue, type AssetListParams, type AssetShareLink, type AssetShareLinkCreateParams, type AssetShareLinkListParams, type AssetShareLinkUpdateParams, type AssetShareLinkWriteSettings, type AssetVersion, type AssetVersionDownloadUrl, type AssetVersionListResponse, type AssetVersionUpdateParams, type AssetVersionUrls, Assets, type Board, type BoardCreateParams, type BoardListParams, type BoardShareLink, type BoardShareLinkCreateParams, type BoardShareLinkListResponse, type BoardShareLinkUpdateParams, type BoardUpdateParams, Boards, type CdnLink, type CompleteMultipartParams, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldType, type CustomFieldUpdateParams, type CustomFieldValue, type CustomFieldValueCreateParams, type CustomFieldValueUpdateParams, CustomFields, type FileMeta, type FileSource, type GetPartUploadUrlParams, type GetPartUploadUrlResponse, type Guest, type GuestListParams, type GuestListResponse, type ImportCreateParams, type ImportCreateResponse, type ImportStatus, type ImportStatusResponse, Imports, type LargeUploadResponse, Libraries, type Library, type LibraryCreateParams, type LibraryListParams, type LibraryUpdateParams, type Role, type RoleListParams, type RoleListResponse, Roles, type SetBoardCustomFieldParams, type SetCustomFieldParams, type ShareLink, type ShareLinkCommentsAccess, type ShareLinkCustomFieldsAccess, type ShareLinkWriteSettings, type Showcase, type ShowcaseCreateParams, type ShowcaseListParams, type ShowcaseShareLink, type ShowcaseShareLinkStatus, type ShowcaseShareLinkUpdateParams, type ShowcaseStats, type ShowcaseUpdateParams, Showcases, type SmallUploadResponse, type SmartTag, type Tag, type TagCreateParams, type TagListParams, type TagUpdateParams, Tags, type UpdateGuestParams, type UploadCreateParams, type UploadCreateResponse, type UploadFileOptions, type UploadFileParams, type UploadFileResponse, Uploads, type Workspace, type WorkspaceListResponse, Workspaces };
package/dist/index.d.ts CHANGED
@@ -82,6 +82,19 @@ interface AssetCustomFieldDateFilter {
82
82
  type AssetCustomFieldFilter = string | AssetCustomFieldSelectFilter | AssetCustomFieldTextFilter | AssetCustomFieldDateFilter;
83
83
  interface AssetListParams extends CursorPageParams {
84
84
  parentBoardId?: string;
85
+ /**
86
+ * Only return assets added to this showcase. With `includeNestedAssets`,
87
+ * also returns the assets inside the boards added to it. Items on the
88
+ * showcase's sub-pages are not returned. Combining with `parentBoardId`
89
+ * or `semantic: true` is rejected with 400. An unknown showcase is 404;
90
+ * one the caller cannot view is 403.
91
+ */
92
+ showcaseId?: string;
93
+ /**
94
+ * With `parentBoardId`, return assets from nested sub-boards. With
95
+ * `showcaseId`, also return assets inside the boards added to the
96
+ * showcase. Requires one of those filters.
97
+ */
85
98
  includeNestedAssets?: boolean;
86
99
  tag?: string | string[];
87
100
  /**
@@ -111,7 +124,7 @@ interface AssetListParams extends CursorPageParams {
111
124
  * When true, `search` is used for semantic search via AI embeddings.
112
125
  * Requires a non-blank `search` value and Semantic Search enabled on the workspace.
113
126
  * Returns a single page of results ordered by relevance. Combining with `tag`,
114
- * `customField`, `createdAt`, or `cursor` is rejected by the API with 400.
127
+ * `customField`, `createdAt`, `cursor`, or `showcaseId` is rejected by the API with 400.
115
128
  */
116
129
  semantic?: boolean;
117
130
  "createdAt[gte]"?: string;
@@ -181,6 +194,13 @@ interface Board {
181
194
  interface BoardListParams extends CursorPageParams {
182
195
  name?: string;
183
196
  parentBoardId?: string;
197
+ /**
198
+ * Only return boards added to this showcase. Boards on the showcase's
199
+ * sub-pages are not returned. Combining with `parentBoardId`, `libraryId`,
200
+ * or `inGeneralLibrary` is rejected with 400. An unknown showcase is 404;
201
+ * one the caller cannot view is 403.
202
+ */
203
+ showcaseId?: string;
184
204
  /**
185
205
  * Select filters only, as `fieldId:valueId`. Repeats of one field are OR, and
186
206
  * different fields are AND. Plain-text and date operators are rejected with
@@ -189,13 +209,14 @@ interface BoardListParams extends CursorPageParams {
189
209
  customField?: string | string[];
190
210
  /**
191
211
  * Only return boards in this library. Mutually exclusive with
192
- * `inGeneralLibrary` — passing both results in a `400` (BadRequestError).
212
+ * `inGeneralLibrary` and with `showcaseId`. Combining either pair results
213
+ * in a `400` (BadRequestError).
193
214
  */
194
215
  libraryId?: string;
195
216
  /**
196
217
  * Only return boards in the General library (boards not in any real library).
197
- * Mutually exclusive with `libraryId` — passing both results in a `400`
198
- * (BadRequestError).
218
+ * Mutually exclusive with `libraryId` and with `showcaseId`. Combining
219
+ * either pair results in a `400` (BadRequestError).
199
220
  */
200
221
  inGeneralLibrary?: boolean;
201
222
  }
@@ -238,12 +259,18 @@ interface GuestListResponse {
238
259
  data: Guest[];
239
260
  }
240
261
 
241
- /** Visitor comment access on a share link. */
262
+ /**
263
+ * Visitor comment access on a share link.
264
+ * `allowed` lets anyone with the link post comments.
265
+ */
242
266
  type ShareLinkCommentsAccess = "hidden" | "read_only" | "allowed";
243
- /** Visitor custom field access on a share link. */
267
+ /**
268
+ * Visitor custom field access on a share link.
269
+ * `editable` lets anyone with the link change custom field values.
270
+ */
244
271
  type ShareLinkCustomFieldsAccess = "hidden" | "read_only" | "editable";
245
272
  /**
246
- * Public share link fields shared by assets and boards.
273
+ * Public share link fields shared by assets, boards, and showcases.
247
274
  * `url` is the link to give to people. The password is never returned;
248
275
  * `hasPassword` says whether one is set. Disabled links are included
249
276
  * with `active: false`.
@@ -292,10 +319,31 @@ interface BoardShareLinkListResponse extends CursorPageResponse<BoardShareLink>
292
319
  * Settings accepted on share-link create and update.
293
320
  * Omitted fields follow the workspace Share Link Defaults on create,
294
321
  * and stay unchanged on update.
322
+ *
323
+ * `password` is write only; reads return `hasPassword`. `null` clears
324
+ * `password` and `expiresAt`. An empty password is rejected. `expiresAt`
325
+ * must be an ISO 8601 date-time in the future.
326
+ *
327
+ * Turning `password`, `expiresAt`, `requireAccount`, `comments`, or
328
+ * `customFields` on needs the workspace `shareLinks` add-on. Otherwise the
329
+ * API returns 422 `ADDON_DISABLED` and applies nothing in the request.
330
+ * Raising `comments` from `read_only` to `allowed`, or `customFields` from
331
+ * `read_only` to `editable`, counts as turning it on, so a link that already
332
+ * shows comments or custom fields can still get that 422.
333
+ * `extra.settings` names the rejected settings, and uses `expiration` for
334
+ * `expiresAt`. Re-sending a value the link already has, changing an existing
335
+ * password or expiration, and turning a setting off are accepted.
295
336
  */
296
337
  interface ShareLinkWriteSettings {
297
338
  active?: boolean;
298
339
  allowDownload?: boolean;
340
+ /** Write only. `null` removes the password. */
341
+ password?: string | null;
342
+ /** ISO 8601 date-time in the future. `null` removes the expiration. */
343
+ expiresAt?: string | null;
344
+ requireAccount?: boolean;
345
+ comments?: ShareLinkCommentsAccess;
346
+ customFields?: ShareLinkCustomFieldsAccess;
299
347
  }
300
348
  /** Asset links also accept `showAllVersions`. */
301
349
  interface AssetShareLinkWriteSettings extends ShareLinkWriteSettings {
@@ -505,6 +553,179 @@ declare class Roles {
505
553
  list(params?: RoleListParams): Promise<Role[]>;
506
554
  }
507
555
 
556
+ /**
557
+ * Filter for the state of a showcase's share link.
558
+ * `active`: the link is enabled. `inactive`: the link is disabled.
559
+ * `expired`: the link's expiration date has passed.
560
+ */
561
+ type ShowcaseShareLinkStatus = "active" | "inactive" | "expired";
562
+ /** How many items the showcase holds. */
563
+ interface ShowcaseStats {
564
+ assetCount: number;
565
+ fileCount: number;
566
+ boardCount: number;
567
+ }
568
+ /**
569
+ * Showcase share link. A showcase has at most one, and it uses the same
570
+ * fields as a board share link.
571
+ */
572
+ type ShowcaseShareLink = ShareLink;
573
+ /**
574
+ * A showcase and its share link.
575
+ *
576
+ * `shareLink` is null when the showcase has no link. `get` returns those
577
+ * showcases. `list` omits them. Every showcase created through `create`
578
+ * has a link.
579
+ *
580
+ * Sub-pages are not part of this object. A showcase that has them still
581
+ * comes back as one showcase, and item lists return only its top-level items.
582
+ */
583
+ interface Showcase {
584
+ id: string;
585
+ name: string;
586
+ description: string | null;
587
+ createdAt: string;
588
+ updatedAt: string;
589
+ stats: ShowcaseStats;
590
+ shareLink: ShowcaseShareLink | null;
591
+ }
592
+ /**
593
+ * Query for `GET /showcases`.
594
+ * The API defaults `limit` to 12 and treats values above 200 as 200.
595
+ * An empty `search`, an unknown `status`, a `limit` that is not a positive
596
+ * integer, or a cursor this endpoint did not issue is 400.
597
+ */
598
+ interface ShowcaseListParams extends CursorPageParams {
599
+ /** Only return showcases whose name contains this text. */
600
+ search?: string;
601
+ /** Filter by the state of the showcase's share link. */
602
+ status?: ShowcaseShareLinkStatus;
603
+ }
604
+ /**
605
+ * Body for `POST /showcases`.
606
+ * Creates the showcase and its share link together. It does not take items;
607
+ * add them with `addAssets` and `addBoards`. Omitted `shareLink` settings
608
+ * follow the workspace Share Link Defaults. The same paid settings as a
609
+ * board link apply, including `422` `ADDON_DISABLED` when the plan does not
610
+ * include one that the request turns on. If the link cannot be created, the
611
+ * showcase is not created either.
612
+ */
613
+ interface ShowcaseCreateParams {
614
+ name: string;
615
+ /** Empty string is rejected. Omit the field to leave the description unset. */
616
+ description?: string;
617
+ shareLink?: ShareLinkWriteSettings;
618
+ }
619
+ /**
620
+ * Body for `PATCH /showcases/:showcaseId`.
621
+ * Only the fields you send change. `null` removes the description. An empty
622
+ * or null `name` is rejected. An empty body changes nothing.
623
+ */
624
+ interface ShowcaseUpdateParams {
625
+ name?: string;
626
+ description?: string | null;
627
+ }
628
+ /** Body for `POST /showcases/:showcaseId/assets`. `assetIds` must be non-empty. */
629
+ interface AddShowcaseAssetsParams {
630
+ assetIds: string[];
631
+ }
632
+ /** Body for `POST /showcases/:showcaseId/boards`. `boardIds` must be non-empty. */
633
+ interface AddShowcaseBoardsParams {
634
+ boardIds: string[];
635
+ }
636
+ /**
637
+ * Body for `PATCH /showcases/:showcaseId/share-links/:shareLinkId`.
638
+ * Same settings as a board share link.
639
+ */
640
+ type ShowcaseShareLinkUpdateParams = ShareLinkWriteSettings;
641
+
642
+ /**
643
+ * Showcases. A showcase is a collection with one share link.
644
+ *
645
+ * `create` makes the showcase and its share link together. The result
646
+ * includes the link, and the showcase starts empty. Add items with
647
+ * `addAssets` and `addBoards`.
648
+ *
649
+ * Sub-pages are not exposed. Item lists return only a showcase's top-level
650
+ * items, and a sub-page id is not found on these routes.
651
+ *
652
+ * An unknown, trashed, or other-workspace id is 404. An item or showcase
653
+ * the caller cannot view is 403. Adding an item that is already in the
654
+ * showcase, or removing one that is not, succeeds and returns 204.
655
+ */
656
+ declare class Showcases {
657
+ private client;
658
+ constructor(client: AirBase);
659
+ /**
660
+ * List the showcases the caller can see.
661
+ *
662
+ * A role that can view every showcase in the workspace sees all of them.
663
+ * Otherwise only the showcases that caller owns are returned. Showcases
664
+ * without a share link are omitted; read those with `get`. Sub-pages are
665
+ * not listed separately.
666
+ *
667
+ * Requires the `showcases.read` and `share_links.read` OAuth scopes.
668
+ */
669
+ list(params?: ShowcaseListParams): PagePromise<Showcase>;
670
+ /**
671
+ * Get a showcase and its share link. `shareLink` is null when the
672
+ * showcase has none.
673
+ *
674
+ * Requires the `showcases.read` and `share_links.read` OAuth scopes.
675
+ */
676
+ get(showcaseId: string): Promise<Showcase>;
677
+ /**
678
+ * Create a showcase and its share link in one step. The result includes
679
+ * the link. Create does not take items.
680
+ *
681
+ * Requires the `showcases.write` and `share_links.write` OAuth scopes.
682
+ */
683
+ create(params: ShowcaseCreateParams): Promise<Showcase>;
684
+ /**
685
+ * Rename a showcase or change its description. Only the fields you send
686
+ * change. Returns no body.
687
+ *
688
+ * Requires the `showcases.write` OAuth scope.
689
+ */
690
+ update(showcaseId: string, params: ShowcaseUpdateParams): Promise<void>;
691
+ /**
692
+ * Change the settings of a showcase's share link. Only the settings you
693
+ * send change. Send `password: null` or `expiresAt: null` to remove them.
694
+ * Returns no body.
695
+ *
696
+ * Requires the `share_links.write` and `showcases.read` OAuth scopes.
697
+ */
698
+ updateShareLink(showcaseId: string, shareLinkId: string, params: ShowcaseShareLinkUpdateParams): Promise<void>;
699
+ /**
700
+ * Add assets to a showcase. Assets already in it are skipped. Returns no
701
+ * body. List them with `assets.list({ showcaseId })`.
702
+ *
703
+ * Requires the `showcases.write` and `assets.read` OAuth scopes.
704
+ */
705
+ addAssets(showcaseId: string, params: AddShowcaseAssetsParams): Promise<void>;
706
+ /**
707
+ * Remove an asset from a showcase. The asset itself is not deleted.
708
+ * Removing an asset that is not in the showcase succeeds. Returns no body.
709
+ *
710
+ * Requires the `showcases.write` OAuth scope.
711
+ */
712
+ removeAsset(showcaseId: string, assetId: string): Promise<void>;
713
+ /**
714
+ * Add boards to a showcase. Boards already in it are skipped. Returns no
715
+ * body. List them with `boards.list({ showcaseId })`.
716
+ *
717
+ * Requires the `showcases.write` and `boards.read` OAuth scopes.
718
+ */
719
+ addBoards(showcaseId: string, params: AddShowcaseBoardsParams): Promise<void>;
720
+ /**
721
+ * Remove a board from a showcase. The board itself is not deleted.
722
+ * Removing a board that is not in the showcase succeeds. Returns no body.
723
+ *
724
+ * Requires the `showcases.write` OAuth scope.
725
+ */
726
+ removeBoard(showcaseId: string, boardId: string): Promise<void>;
727
+ }
728
+
508
729
  declare class Tags {
509
730
  private client;
510
731
  constructor(client: AirBase);
@@ -641,6 +862,7 @@ interface AirApiOptions extends AirBaseOptions {
641
862
  declare class AirApi extends AirBase {
642
863
  readonly assets: Assets;
643
864
  readonly boards: Boards;
865
+ readonly showcases: Showcases;
644
866
  readonly libraries: Libraries;
645
867
  readonly tags: Tags;
646
868
  readonly customFields: CustomFields;
@@ -651,4 +873,4 @@ declare class AirApi extends AirBase {
651
873
  constructor(options?: AirApiOptions);
652
874
  }
653
875
 
654
- export { type AddBoardAssetsParams, type AddGuestParams, type AddVersionTagParams, AirApi, type AirApiOptions, type Asset, type AssetBoardListParams, type AssetCdnLinkCreateParams, type AssetCdnLinkListResponse, type AssetCdnLinkUpdateParams, type AssetCustomFieldDateFilter, type AssetCustomFieldDateOperator, type AssetCustomFieldFilter, type AssetCustomFieldSelectFilter, type AssetCustomFieldTextFilter, type AssetCustomFieldTextOperator, type AssetCustomFieldValue, type AssetListParams, type AssetShareLink, type AssetShareLinkCreateParams, type AssetShareLinkListParams, type AssetShareLinkUpdateParams, type AssetShareLinkWriteSettings, type AssetVersion, type AssetVersionDownloadUrl, type AssetVersionListResponse, type AssetVersionUpdateParams, type AssetVersionUrls, Assets, type Board, type BoardCreateParams, type BoardListParams, type BoardShareLink, type BoardShareLinkCreateParams, type BoardShareLinkListResponse, type BoardShareLinkUpdateParams, type BoardUpdateParams, Boards, type CdnLink, type CompleteMultipartParams, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldType, type CustomFieldUpdateParams, type CustomFieldValue, type CustomFieldValueCreateParams, type CustomFieldValueUpdateParams, CustomFields, type FileMeta, type FileSource, type GetPartUploadUrlParams, type GetPartUploadUrlResponse, type Guest, type GuestListParams, type GuestListResponse, type ImportCreateParams, type ImportCreateResponse, type ImportStatus, type ImportStatusResponse, Imports, type LargeUploadResponse, Libraries, type Library, type LibraryCreateParams, type LibraryListParams, type LibraryUpdateParams, type Role, type RoleListParams, type RoleListResponse, Roles, type SetBoardCustomFieldParams, type SetCustomFieldParams, type ShareLink, type ShareLinkCommentsAccess, type ShareLinkCustomFieldsAccess, type ShareLinkWriteSettings, type SmallUploadResponse, type SmartTag, type Tag, type TagCreateParams, type TagListParams, type TagUpdateParams, Tags, type UpdateGuestParams, type UploadCreateParams, type UploadCreateResponse, type UploadFileOptions, type UploadFileParams, type UploadFileResponse, Uploads, type Workspace, type WorkspaceListResponse, Workspaces };
876
+ export { type AddBoardAssetsParams, type AddGuestParams, type AddShowcaseAssetsParams, type AddShowcaseBoardsParams, type AddVersionTagParams, AirApi, type AirApiOptions, type Asset, type AssetBoardListParams, type AssetCdnLinkCreateParams, type AssetCdnLinkListResponse, type AssetCdnLinkUpdateParams, type AssetCustomFieldDateFilter, type AssetCustomFieldDateOperator, type AssetCustomFieldFilter, type AssetCustomFieldSelectFilter, type AssetCustomFieldTextFilter, type AssetCustomFieldTextOperator, type AssetCustomFieldValue, type AssetListParams, type AssetShareLink, type AssetShareLinkCreateParams, type AssetShareLinkListParams, type AssetShareLinkUpdateParams, type AssetShareLinkWriteSettings, type AssetVersion, type AssetVersionDownloadUrl, type AssetVersionListResponse, type AssetVersionUpdateParams, type AssetVersionUrls, Assets, type Board, type BoardCreateParams, type BoardListParams, type BoardShareLink, type BoardShareLinkCreateParams, type BoardShareLinkListResponse, type BoardShareLinkUpdateParams, type BoardUpdateParams, Boards, type CdnLink, type CompleteMultipartParams, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldType, type CustomFieldUpdateParams, type CustomFieldValue, type CustomFieldValueCreateParams, type CustomFieldValueUpdateParams, CustomFields, type FileMeta, type FileSource, type GetPartUploadUrlParams, type GetPartUploadUrlResponse, type Guest, type GuestListParams, type GuestListResponse, type ImportCreateParams, type ImportCreateResponse, type ImportStatus, type ImportStatusResponse, Imports, type LargeUploadResponse, Libraries, type Library, type LibraryCreateParams, type LibraryListParams, type LibraryUpdateParams, type Role, type RoleListParams, type RoleListResponse, Roles, type SetBoardCustomFieldParams, type SetCustomFieldParams, type ShareLink, type ShareLinkCommentsAccess, type ShareLinkCustomFieldsAccess, type ShareLinkWriteSettings, type Showcase, type ShowcaseCreateParams, type ShowcaseListParams, type ShowcaseShareLink, type ShowcaseShareLinkStatus, type ShowcaseShareLinkUpdateParams, type ShowcaseStats, type ShowcaseUpdateParams, Showcases, type SmallUploadResponse, type SmartTag, type Tag, type TagCreateParams, type TagListParams, type TagUpdateParams, Tags, type UpdateGuestParams, type UploadCreateParams, type UploadCreateResponse, type UploadFileOptions, type UploadFileParams, type UploadFileResponse, Uploads, type Workspace, type WorkspaceListResponse, Workspaces };
package/dist/index.js CHANGED
@@ -38,6 +38,7 @@ var Assets = class {
38
38
  limit: params.limit,
39
39
  cursor: params.cursor,
40
40
  parentBoardId: params.parentBoardId,
41
+ showcaseId: params.showcaseId,
41
42
  search: params.search
42
43
  };
43
44
  if (params.includeNestedAssets !== void 0) {
@@ -187,6 +188,7 @@ var Boards = class {
187
188
  cursor: params.cursor,
188
189
  name: params.name,
189
190
  parentBoardId: params.parentBoardId,
191
+ showcaseId: params.showcaseId,
190
192
  libraryId: params.libraryId,
191
193
  inGeneralLibrary: params.inGeneralLibrary
192
194
  };
@@ -433,6 +435,137 @@ var Roles = class {
433
435
  }
434
436
  };
435
437
 
438
+ // src/resources/showcases.ts
439
+ var Showcases = class {
440
+ constructor(client) {
441
+ this.client = client;
442
+ }
443
+ /**
444
+ * List the showcases the caller can see.
445
+ *
446
+ * A role that can view every showcase in the workspace sees all of them.
447
+ * Otherwise only the showcases that caller owns are returned. Showcases
448
+ * without a share link are omitted; read those with `get`. Sub-pages are
449
+ * not listed separately.
450
+ *
451
+ * Requires the `showcases.read` and `share_links.read` OAuth scopes.
452
+ */
453
+ list(params = {}) {
454
+ const query = {
455
+ limit: params.limit,
456
+ cursor: params.cursor,
457
+ search: params.search,
458
+ status: params.status
459
+ };
460
+ return this.client.requestCursorPage(
461
+ { method: "GET", path: "/showcases", query },
462
+ query
463
+ );
464
+ }
465
+ /**
466
+ * Get a showcase and its share link. `shareLink` is null when the
467
+ * showcase has none.
468
+ *
469
+ * Requires the `showcases.read` and `share_links.read` OAuth scopes.
470
+ */
471
+ async get(showcaseId) {
472
+ return this.client.request({
473
+ method: "GET",
474
+ path: `/showcases/${showcaseId}`
475
+ });
476
+ }
477
+ /**
478
+ * Create a showcase and its share link in one step. The result includes
479
+ * the link. Create does not take items.
480
+ *
481
+ * Requires the `showcases.write` and `share_links.write` OAuth scopes.
482
+ */
483
+ async create(params) {
484
+ return this.client.request({
485
+ method: "POST",
486
+ path: "/showcases",
487
+ body: params
488
+ });
489
+ }
490
+ /**
491
+ * Rename a showcase or change its description. Only the fields you send
492
+ * change. Returns no body.
493
+ *
494
+ * Requires the `showcases.write` OAuth scope.
495
+ */
496
+ async update(showcaseId, params) {
497
+ return this.client.request({
498
+ method: "PATCH",
499
+ path: `/showcases/${showcaseId}`,
500
+ body: params
501
+ });
502
+ }
503
+ /**
504
+ * Change the settings of a showcase's share link. Only the settings you
505
+ * send change. Send `password: null` or `expiresAt: null` to remove them.
506
+ * Returns no body.
507
+ *
508
+ * Requires the `share_links.write` and `showcases.read` OAuth scopes.
509
+ */
510
+ async updateShareLink(showcaseId, shareLinkId, params) {
511
+ return this.client.request({
512
+ method: "PATCH",
513
+ path: `/showcases/${showcaseId}/share-links/${shareLinkId}`,
514
+ body: params
515
+ });
516
+ }
517
+ /**
518
+ * Add assets to a showcase. Assets already in it are skipped. Returns no
519
+ * body. List them with `assets.list({ showcaseId })`.
520
+ *
521
+ * Requires the `showcases.write` and `assets.read` OAuth scopes.
522
+ */
523
+ async addAssets(showcaseId, params) {
524
+ return this.client.request({
525
+ method: "POST",
526
+ path: `/showcases/${showcaseId}/assets`,
527
+ body: params
528
+ });
529
+ }
530
+ /**
531
+ * Remove an asset from a showcase. The asset itself is not deleted.
532
+ * Removing an asset that is not in the showcase succeeds. Returns no body.
533
+ *
534
+ * Requires the `showcases.write` OAuth scope.
535
+ */
536
+ async removeAsset(showcaseId, assetId) {
537
+ return this.client.request({
538
+ method: "DELETE",
539
+ path: `/showcases/${showcaseId}/assets/${assetId}`
540
+ });
541
+ }
542
+ /**
543
+ * Add boards to a showcase. Boards already in it are skipped. Returns no
544
+ * body. List them with `boards.list({ showcaseId })`.
545
+ *
546
+ * Requires the `showcases.write` and `boards.read` OAuth scopes.
547
+ */
548
+ async addBoards(showcaseId, params) {
549
+ return this.client.request({
550
+ method: "POST",
551
+ path: `/showcases/${showcaseId}/boards`,
552
+ body: params
553
+ });
554
+ }
555
+ /**
556
+ * Remove a board from a showcase. The board itself is not deleted.
557
+ * Removing a board that is not in the showcase succeeds. Returns no body.
558
+ *
559
+ * Requires the `showcases.write` OAuth scope.
560
+ */
561
+ async removeBoard(showcaseId, boardId) {
562
+ return this.client.request({
563
+ method: "DELETE",
564
+ path: `/showcases/${showcaseId}/boards/${boardId}`
565
+ });
566
+ }
567
+ };
568
+
436
569
  // src/resources/tags.ts
437
570
  var Tags = class {
438
571
  constructor(client) {
@@ -722,6 +855,7 @@ var Workspaces = class {
722
855
  var AirApi = class extends AirBase {
723
856
  assets;
724
857
  boards;
858
+ showcases;
725
859
  libraries;
726
860
  tags;
727
861
  customFields;
@@ -733,6 +867,7 @@ var AirApi = class extends AirBase {
733
867
  super(options);
734
868
  this.assets = new Assets(this);
735
869
  this.boards = new Boards(this);
870
+ this.showcases = new Showcases(this);
736
871
  this.libraries = new Libraries(this);
737
872
  this.tags = new Tags(this);
738
873
  this.customFields = new CustomFields(this);
@@ -781,6 +916,7 @@ export {
781
916
  PermissionError,
782
917
  RateLimitError,
783
918
  Roles,
919
+ Showcases,
784
920
  Tags,
785
921
  TimeoutError,
786
922
  Uploads,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@air/api-rest",
3
- "version": "0.8.0",
3
+ "version": "0.10.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.10.0"
33
33
  },
34
34
  "engines": {
35
35
  "node": ">=18"