@air/api-rest 0.9.0 → 0.11.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 +5 -2
- package/dist/index.cjs +281 -0
- package/dist/index.d.cts +470 -6
- package/dist/index.d.ts +470 -6
- package/dist/index.js +278 -0
- package/package.json +2 -2
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 `
|
|
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`
|
|
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`
|
|
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
|
}
|
|
@@ -249,7 +270,7 @@ type ShareLinkCommentsAccess = "hidden" | "read_only" | "allowed";
|
|
|
249
270
|
*/
|
|
250
271
|
type ShareLinkCustomFieldsAccess = "hidden" | "read_only" | "editable";
|
|
251
272
|
/**
|
|
252
|
-
* Public share link fields shared by assets and
|
|
273
|
+
* Public share link fields shared by assets, boards, and showcases.
|
|
253
274
|
* `url` is the link to give to people. The password is never returned;
|
|
254
275
|
* `hasPassword` says whether one is set. Disabled links are included
|
|
255
276
|
* with `active: false`.
|
|
@@ -436,6 +457,226 @@ declare class CustomFields {
|
|
|
436
457
|
deleteValue(customFieldId: string, valueId: string): Promise<void>;
|
|
437
458
|
}
|
|
438
459
|
|
|
460
|
+
/**
|
|
461
|
+
* Exactly one of `assetId` or `boardId`. `assetVersionId` requires `assetId`.
|
|
462
|
+
* The server rejects any other combination, so the type does too.
|
|
463
|
+
*/
|
|
464
|
+
type DiscussionListParams = DiscussionListOptions & ({
|
|
465
|
+
/** Discussions on this asset. */
|
|
466
|
+
assetId: string;
|
|
467
|
+
/** Limit the asset list to this version. */
|
|
468
|
+
assetVersionId?: string;
|
|
469
|
+
boardId?: never;
|
|
470
|
+
} | {
|
|
471
|
+
/** Discussions on assets currently on this board. */
|
|
472
|
+
boardId: string;
|
|
473
|
+
assetId?: never;
|
|
474
|
+
assetVersionId?: never;
|
|
475
|
+
});
|
|
476
|
+
interface DiscussionListOptions extends CursorPageParams {
|
|
477
|
+
/** When set, only discussions in that resolved state. */
|
|
478
|
+
resolved?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* `lastCommentedAt` is the default and moves when someone replies.
|
|
481
|
+
* `createdAt` is the first comment and stays put.
|
|
482
|
+
*/
|
|
483
|
+
sortBy?: "lastCommentedAt" | "createdAt";
|
|
484
|
+
/** `desc` is the default. */
|
|
485
|
+
sortDirection?: "asc" | "desc";
|
|
486
|
+
}
|
|
487
|
+
interface DiscussionCommentListParams extends CursorPageParams {
|
|
488
|
+
}
|
|
489
|
+
interface Discussion {
|
|
490
|
+
id: string;
|
|
491
|
+
resolved: boolean;
|
|
492
|
+
/** When the first comment was created. */
|
|
493
|
+
createdAt: string | null;
|
|
494
|
+
/** When the latest comment was created. A reply moves this. */
|
|
495
|
+
lastCommentedAt: string | null;
|
|
496
|
+
asset: {
|
|
497
|
+
id: string;
|
|
498
|
+
};
|
|
499
|
+
assetVersion: {
|
|
500
|
+
/** Asset version id. This is `assetVersionId` on create. */
|
|
501
|
+
id: string;
|
|
502
|
+
version: number;
|
|
503
|
+
};
|
|
504
|
+
/**
|
|
505
|
+
* Present only when the stored board is active and the caller can view it.
|
|
506
|
+
* Otherwise the field is omitted.
|
|
507
|
+
*/
|
|
508
|
+
boardId?: string;
|
|
509
|
+
annotations: DiscussionAnnotation[];
|
|
510
|
+
/** The first 10 comments, oldest first. */
|
|
511
|
+
comments: DiscussionCommentPage;
|
|
512
|
+
}
|
|
513
|
+
interface DiscussionCommentPage {
|
|
514
|
+
data: DiscussionComment[];
|
|
515
|
+
pagination: {
|
|
516
|
+
hasMore: boolean;
|
|
517
|
+
cursor: string | null;
|
|
518
|
+
};
|
|
519
|
+
total: number;
|
|
520
|
+
}
|
|
521
|
+
interface DiscussionComment {
|
|
522
|
+
id: string;
|
|
523
|
+
discussionId: string;
|
|
524
|
+
/** Plain text with mentions rendered as `@Display Name`. */
|
|
525
|
+
body: string;
|
|
526
|
+
createdAt: string;
|
|
527
|
+
/**
|
|
528
|
+
* Equal to `createdAt` until the first edit that changes the stored text.
|
|
529
|
+
* An edit is `updatedAt !== createdAt`.
|
|
530
|
+
*/
|
|
531
|
+
updatedAt: string;
|
|
532
|
+
author: DiscussionAuthor;
|
|
533
|
+
mentions: DiscussionMention[];
|
|
534
|
+
}
|
|
535
|
+
type DiscussionAuthor = {
|
|
536
|
+
type: "workspace_account";
|
|
537
|
+
/** Account id. The same id as `members.list` `id`. */
|
|
538
|
+
id: string;
|
|
539
|
+
displayName: string | null;
|
|
540
|
+
} | {
|
|
541
|
+
type: "anonymous";
|
|
542
|
+
displayName: string | null;
|
|
543
|
+
};
|
|
544
|
+
/** A mention on a comment. `id` is the account id. */
|
|
545
|
+
interface DiscussionMention {
|
|
546
|
+
id: string;
|
|
547
|
+
displayName: string | null;
|
|
548
|
+
}
|
|
549
|
+
/** A mention sent on create or edit. `accountId` is `DiscussionMention.id`. */
|
|
550
|
+
interface DiscussionMentionInput {
|
|
551
|
+
accountId: string;
|
|
552
|
+
}
|
|
553
|
+
type DiscussionAnnotation = BoxAnnotation | PencilAnnotation;
|
|
554
|
+
interface BoxAnnotation {
|
|
555
|
+
type: "box";
|
|
556
|
+
/** Seconds into a video. Omit for a still image. */
|
|
557
|
+
timestamp?: number;
|
|
558
|
+
/** Requires `timestamp`, and must be greater than or equal to it. */
|
|
559
|
+
endTimestamp?: number;
|
|
560
|
+
/** Top-left corner as fractions of the frame, from 0 to 1. */
|
|
561
|
+
coordinates: {
|
|
562
|
+
x: number;
|
|
563
|
+
y: number;
|
|
564
|
+
};
|
|
565
|
+
/** Width and height as fractions of the frame. The box must fit in the frame. */
|
|
566
|
+
dimensions: {
|
|
567
|
+
width: number;
|
|
568
|
+
height: number;
|
|
569
|
+
};
|
|
570
|
+
/** `#RRGGBB`, either case, on write. A stored annotation read back may use another color format. */
|
|
571
|
+
color: string;
|
|
572
|
+
/** Document page, from 1. Required on a document or PDF. Omit for an image or video. */
|
|
573
|
+
pageNumber?: number;
|
|
574
|
+
}
|
|
575
|
+
interface PencilAnnotation {
|
|
576
|
+
type: "pencil";
|
|
577
|
+
/** Seconds into a video. Omit for a still image. */
|
|
578
|
+
timestamp?: number;
|
|
579
|
+
/** Requires `timestamp`, and must be greater than or equal to it. */
|
|
580
|
+
endTimestamp?: number;
|
|
581
|
+
/** 1 to 10 lines. */
|
|
582
|
+
lines: PencilLine[];
|
|
583
|
+
}
|
|
584
|
+
interface PencilLine {
|
|
585
|
+
/** 2 to 1000 points, each a fraction of the frame from 0 to 1. */
|
|
586
|
+
coordinates: {
|
|
587
|
+
x: number;
|
|
588
|
+
y: number;
|
|
589
|
+
}[];
|
|
590
|
+
/** Greater than 0 and at most 1000. */
|
|
591
|
+
lineWidth: number;
|
|
592
|
+
/** `#RRGGBB`, either case, on write. A stored annotation read back may use another color format. */
|
|
593
|
+
color: string;
|
|
594
|
+
/** Document page, from 1. Required on a document or PDF. Omit for an image or video. */
|
|
595
|
+
pageNumber?: number;
|
|
596
|
+
}
|
|
597
|
+
interface DiscussionCreateParams {
|
|
598
|
+
assetId: string;
|
|
599
|
+
/** Required. There is no default to the current version. */
|
|
600
|
+
assetVersionId: string;
|
|
601
|
+
/** Plain text, 1 to 500 characters. Mention someone with `{{mention:N}}`. */
|
|
602
|
+
body: string;
|
|
603
|
+
/** At most 10. `null` is the same as omitting it. */
|
|
604
|
+
mentions?: DiscussionMentionInput[] | null;
|
|
605
|
+
/** At most 10. */
|
|
606
|
+
annotations?: DiscussionAnnotation[];
|
|
607
|
+
}
|
|
608
|
+
interface DiscussionCommentCreateParams {
|
|
609
|
+
/** Plain text, 1 to 500 characters. Mention someone with `{{mention:N}}`. */
|
|
610
|
+
body: string;
|
|
611
|
+
/** At most 10. `null` is the same as omitting it. */
|
|
612
|
+
mentions?: DiscussionMentionInput[] | null;
|
|
613
|
+
}
|
|
614
|
+
interface DiscussionCommentUpdateParams {
|
|
615
|
+
body: string;
|
|
616
|
+
/**
|
|
617
|
+
* Required when the stored comment has mentions. Send the mentions again to
|
|
618
|
+
* keep them, or `[]` to remove them. Omitting this field, or sending `null`,
|
|
619
|
+
* on a comment that has mentions is 409.
|
|
620
|
+
*/
|
|
621
|
+
mentions?: DiscussionMentionInput[] | null;
|
|
622
|
+
}
|
|
623
|
+
interface DiscussionUpdateParams {
|
|
624
|
+
/** `true` resolves the discussion. `false` reopens it. */
|
|
625
|
+
resolved: boolean;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
declare class Discussions {
|
|
629
|
+
private client;
|
|
630
|
+
constructor(client: AirBase);
|
|
631
|
+
/**
|
|
632
|
+
* List discussions on an asset or on the assets currently in a board.
|
|
633
|
+
* Exactly one of `assetId` or `boardId` is required.
|
|
634
|
+
*
|
|
635
|
+
* Pages don't overlap. With the default `lastCommentedAt` sort, a reply
|
|
636
|
+
* between pages can move a discussion, so it may repeat or be skipped. For
|
|
637
|
+
* a stable walk, use `sortBy: "createdAt"` and `sortDirection: "asc"`.
|
|
638
|
+
*/
|
|
639
|
+
list(params: DiscussionListParams): PagePromise<Discussion>;
|
|
640
|
+
/** Get one discussion, including its first 10 comments. A discussion you cannot view is 404. */
|
|
641
|
+
get(discussionId: string): Promise<Discussion>;
|
|
642
|
+
/**
|
|
643
|
+
* List every comment on a discussion, oldest first.
|
|
644
|
+
* `discussion.comments.pagination.cursor` is accepted as `cursor`.
|
|
645
|
+
*/
|
|
646
|
+
listComments(discussionId: string, params?: DiscussionCommentListParams): PagePromise<DiscussionComment>;
|
|
647
|
+
/**
|
|
648
|
+
* Start a discussion on an asset version. `assetVersionId` is required.
|
|
649
|
+
* Mention someone with `{{mention:N}}` and a `mentions` entry at that index.
|
|
650
|
+
* On a document or PDF, every annotation needs a `pageNumber`.
|
|
651
|
+
*
|
|
652
|
+
* The body has no board. In a workspace that scopes comments to boards, a
|
|
653
|
+
* discussion with no board needs `asset.canManageDiscussions` at the
|
|
654
|
+
* workspace level, so a board guest gets 403 even when they can comment in
|
|
655
|
+
* their board. A timeout can create a duplicate: list before retrying.
|
|
656
|
+
*/
|
|
657
|
+
create(params: DiscussionCreateParams): Promise<Discussion>;
|
|
658
|
+
/** Add a comment. The body and mention rules match `create`. */
|
|
659
|
+
createComment(discussionId: string, params: DiscussionCommentCreateParams): Promise<DiscussionComment>;
|
|
660
|
+
/**
|
|
661
|
+
* Resolve or reopen a discussion. The response is empty, including when the
|
|
662
|
+
* discussion was already in the requested state.
|
|
663
|
+
*/
|
|
664
|
+
update(discussionId: string, params: DiscussionUpdateParams): Promise<void>;
|
|
665
|
+
/**
|
|
666
|
+
* Replace a comment's text and mentions. Only the author can edit.
|
|
667
|
+
* The response is empty, and the edit notifies no one. An edit that leaves
|
|
668
|
+
* the text and mentions as they are changes nothing and keeps `updatedAt`.
|
|
669
|
+
* Omitting `mentions`, or sending `null`, when the comment has them is 409.
|
|
670
|
+
* `[]` removes them.
|
|
671
|
+
*/
|
|
672
|
+
updateComment(discussionId: string, commentId: string, params: DiscussionCommentUpdateParams): Promise<void>;
|
|
673
|
+
/**
|
|
674
|
+
* Delete a comment. Only the author can delete. The response is empty.
|
|
675
|
+
* Deleting the last comment deletes the discussion.
|
|
676
|
+
*/
|
|
677
|
+
deleteComment(discussionId: string, commentId: string): Promise<void>;
|
|
678
|
+
}
|
|
679
|
+
|
|
439
680
|
interface ImportCreateParams {
|
|
440
681
|
sourceUrl: string;
|
|
441
682
|
fileName?: string;
|
|
@@ -512,6 +753,53 @@ declare class Libraries {
|
|
|
512
753
|
delete(libraryId: string): Promise<void>;
|
|
513
754
|
}
|
|
514
755
|
|
|
756
|
+
type MemberType = "member" | "guest" | "libraryMember";
|
|
757
|
+
interface MemberListParams extends CursorPageParams {
|
|
758
|
+
/**
|
|
759
|
+
* Defaults to `member`. With `email` and no `type`, every type is searched,
|
|
760
|
+
* so omit it to look up an email across member, guest, and libraryMember.
|
|
761
|
+
*/
|
|
762
|
+
type?: MemberType;
|
|
763
|
+
/** Exact email. Cannot be combined with `search`. An unknown email is an empty list. */
|
|
764
|
+
email?: string;
|
|
765
|
+
/** Name or email search, 1 to 100 characters. Cannot be combined with `email`. */
|
|
766
|
+
search?: string;
|
|
767
|
+
}
|
|
768
|
+
interface Member {
|
|
769
|
+
/** Account id. The same id as a comment mention `id` and `accountId`. */
|
|
770
|
+
id: string;
|
|
771
|
+
type: MemberType;
|
|
772
|
+
displayName: string | null;
|
|
773
|
+
firstName: string | null;
|
|
774
|
+
lastName: string | null;
|
|
775
|
+
email: string;
|
|
776
|
+
/**
|
|
777
|
+
* The first time this person joined. A rejoin does not change it.
|
|
778
|
+
*
|
|
779
|
+
* The stored Postgres timestamp text, not ISO 8601 like the other
|
|
780
|
+
* timestamps: for example `2024-03-01 12:00:00.123456+00`. It has up to 6
|
|
781
|
+
* fraction digits with trailing zeros dropped (`12:00:00.12+00`,
|
|
782
|
+
* `12:00:00+00`), and a UTC offset (currently `+00`). Don't parse a fixed
|
|
783
|
+
* width.
|
|
784
|
+
*/
|
|
785
|
+
firstJoinedAt: string;
|
|
786
|
+
/** Present when the person has an avatar URL. */
|
|
787
|
+
avatar?: string;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
declare class Members {
|
|
791
|
+
private client;
|
|
792
|
+
constructor(client: AirBase);
|
|
793
|
+
/**
|
|
794
|
+
* List people in the workspace. Requires `members.read`.
|
|
795
|
+
* `workspace.read` does not grant it.
|
|
796
|
+
*
|
|
797
|
+
* Sort is fixed: `firstJoinedAt` ascending, then `id`.
|
|
798
|
+
* `email` without `type` searches every type. An unknown email is an empty list.
|
|
799
|
+
*/
|
|
800
|
+
list(params?: MemberListParams): PagePromise<Member>;
|
|
801
|
+
}
|
|
802
|
+
|
|
515
803
|
interface Role {
|
|
516
804
|
id: string;
|
|
517
805
|
name: string;
|
|
@@ -532,6 +820,179 @@ declare class Roles {
|
|
|
532
820
|
list(params?: RoleListParams): Promise<Role[]>;
|
|
533
821
|
}
|
|
534
822
|
|
|
823
|
+
/**
|
|
824
|
+
* Filter for the state of a showcase's share link.
|
|
825
|
+
* `active`: the link is enabled. `inactive`: the link is disabled.
|
|
826
|
+
* `expired`: the link's expiration date has passed.
|
|
827
|
+
*/
|
|
828
|
+
type ShowcaseShareLinkStatus = "active" | "inactive" | "expired";
|
|
829
|
+
/** How many items the showcase holds. */
|
|
830
|
+
interface ShowcaseStats {
|
|
831
|
+
assetCount: number;
|
|
832
|
+
fileCount: number;
|
|
833
|
+
boardCount: number;
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Showcase share link. A showcase has at most one, and it uses the same
|
|
837
|
+
* fields as a board share link.
|
|
838
|
+
*/
|
|
839
|
+
type ShowcaseShareLink = ShareLink;
|
|
840
|
+
/**
|
|
841
|
+
* A showcase and its share link.
|
|
842
|
+
*
|
|
843
|
+
* `shareLink` is null when the showcase has no link. `get` returns those
|
|
844
|
+
* showcases. `list` omits them. Every showcase created through `create`
|
|
845
|
+
* has a link.
|
|
846
|
+
*
|
|
847
|
+
* Sub-pages are not part of this object. A showcase that has them still
|
|
848
|
+
* comes back as one showcase, and item lists return only its top-level items.
|
|
849
|
+
*/
|
|
850
|
+
interface Showcase {
|
|
851
|
+
id: string;
|
|
852
|
+
name: string;
|
|
853
|
+
description: string | null;
|
|
854
|
+
createdAt: string;
|
|
855
|
+
updatedAt: string;
|
|
856
|
+
stats: ShowcaseStats;
|
|
857
|
+
shareLink: ShowcaseShareLink | null;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Query for `GET /showcases`.
|
|
861
|
+
* The API defaults `limit` to 12 and treats values above 200 as 200.
|
|
862
|
+
* An empty `search`, an unknown `status`, a `limit` that is not a positive
|
|
863
|
+
* integer, or a cursor this endpoint did not issue is 400.
|
|
864
|
+
*/
|
|
865
|
+
interface ShowcaseListParams extends CursorPageParams {
|
|
866
|
+
/** Only return showcases whose name contains this text. */
|
|
867
|
+
search?: string;
|
|
868
|
+
/** Filter by the state of the showcase's share link. */
|
|
869
|
+
status?: ShowcaseShareLinkStatus;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Body for `POST /showcases`.
|
|
873
|
+
* Creates the showcase and its share link together. It does not take items;
|
|
874
|
+
* add them with `addAssets` and `addBoards`. Omitted `shareLink` settings
|
|
875
|
+
* follow the workspace Share Link Defaults. The same paid settings as a
|
|
876
|
+
* board link apply, including `422` `ADDON_DISABLED` when the plan does not
|
|
877
|
+
* include one that the request turns on. If the link cannot be created, the
|
|
878
|
+
* showcase is not created either.
|
|
879
|
+
*/
|
|
880
|
+
interface ShowcaseCreateParams {
|
|
881
|
+
name: string;
|
|
882
|
+
/** Empty string is rejected. Omit the field to leave the description unset. */
|
|
883
|
+
description?: string;
|
|
884
|
+
shareLink?: ShareLinkWriteSettings;
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* Body for `PATCH /showcases/:showcaseId`.
|
|
888
|
+
* Only the fields you send change. `null` removes the description. An empty
|
|
889
|
+
* or null `name` is rejected. An empty body changes nothing.
|
|
890
|
+
*/
|
|
891
|
+
interface ShowcaseUpdateParams {
|
|
892
|
+
name?: string;
|
|
893
|
+
description?: string | null;
|
|
894
|
+
}
|
|
895
|
+
/** Body for `POST /showcases/:showcaseId/assets`. `assetIds` must be non-empty. */
|
|
896
|
+
interface AddShowcaseAssetsParams {
|
|
897
|
+
assetIds: string[];
|
|
898
|
+
}
|
|
899
|
+
/** Body for `POST /showcases/:showcaseId/boards`. `boardIds` must be non-empty. */
|
|
900
|
+
interface AddShowcaseBoardsParams {
|
|
901
|
+
boardIds: string[];
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Body for `PATCH /showcases/:showcaseId/share-links/:shareLinkId`.
|
|
905
|
+
* Same settings as a board share link.
|
|
906
|
+
*/
|
|
907
|
+
type ShowcaseShareLinkUpdateParams = ShareLinkWriteSettings;
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* Showcases. A showcase is a collection with one share link.
|
|
911
|
+
*
|
|
912
|
+
* `create` makes the showcase and its share link together. The result
|
|
913
|
+
* includes the link, and the showcase starts empty. Add items with
|
|
914
|
+
* `addAssets` and `addBoards`.
|
|
915
|
+
*
|
|
916
|
+
* Sub-pages are not exposed. Item lists return only a showcase's top-level
|
|
917
|
+
* items, and a sub-page id is not found on these routes.
|
|
918
|
+
*
|
|
919
|
+
* An unknown, trashed, or other-workspace id is 404. An item or showcase
|
|
920
|
+
* the caller cannot view is 403. Adding an item that is already in the
|
|
921
|
+
* showcase, or removing one that is not, succeeds and returns 204.
|
|
922
|
+
*/
|
|
923
|
+
declare class Showcases {
|
|
924
|
+
private client;
|
|
925
|
+
constructor(client: AirBase);
|
|
926
|
+
/**
|
|
927
|
+
* List the showcases the caller can see.
|
|
928
|
+
*
|
|
929
|
+
* A role that can view every showcase in the workspace sees all of them.
|
|
930
|
+
* Otherwise only the showcases that caller owns are returned. Showcases
|
|
931
|
+
* without a share link are omitted; read those with `get`. Sub-pages are
|
|
932
|
+
* not listed separately.
|
|
933
|
+
*
|
|
934
|
+
* Requires the `showcases.read` and `share_links.read` OAuth scopes.
|
|
935
|
+
*/
|
|
936
|
+
list(params?: ShowcaseListParams): PagePromise<Showcase>;
|
|
937
|
+
/**
|
|
938
|
+
* Get a showcase and its share link. `shareLink` is null when the
|
|
939
|
+
* showcase has none.
|
|
940
|
+
*
|
|
941
|
+
* Requires the `showcases.read` and `share_links.read` OAuth scopes.
|
|
942
|
+
*/
|
|
943
|
+
get(showcaseId: string): Promise<Showcase>;
|
|
944
|
+
/**
|
|
945
|
+
* Create a showcase and its share link in one step. The result includes
|
|
946
|
+
* the link. Create does not take items.
|
|
947
|
+
*
|
|
948
|
+
* Requires the `showcases.write` and `share_links.write` OAuth scopes.
|
|
949
|
+
*/
|
|
950
|
+
create(params: ShowcaseCreateParams): Promise<Showcase>;
|
|
951
|
+
/**
|
|
952
|
+
* Rename a showcase or change its description. Only the fields you send
|
|
953
|
+
* change. Returns no body.
|
|
954
|
+
*
|
|
955
|
+
* Requires the `showcases.write` OAuth scope.
|
|
956
|
+
*/
|
|
957
|
+
update(showcaseId: string, params: ShowcaseUpdateParams): Promise<void>;
|
|
958
|
+
/**
|
|
959
|
+
* Change the settings of a showcase's share link. Only the settings you
|
|
960
|
+
* send change. Send `password: null` or `expiresAt: null` to remove them.
|
|
961
|
+
* Returns no body.
|
|
962
|
+
*
|
|
963
|
+
* Requires the `share_links.write` and `showcases.read` OAuth scopes.
|
|
964
|
+
*/
|
|
965
|
+
updateShareLink(showcaseId: string, shareLinkId: string, params: ShowcaseShareLinkUpdateParams): Promise<void>;
|
|
966
|
+
/**
|
|
967
|
+
* Add assets to a showcase. Assets already in it are skipped. Returns no
|
|
968
|
+
* body. List them with `assets.list({ showcaseId })`.
|
|
969
|
+
*
|
|
970
|
+
* Requires the `showcases.write` and `assets.read` OAuth scopes.
|
|
971
|
+
*/
|
|
972
|
+
addAssets(showcaseId: string, params: AddShowcaseAssetsParams): Promise<void>;
|
|
973
|
+
/**
|
|
974
|
+
* Remove an asset from a showcase. The asset itself is not deleted.
|
|
975
|
+
* Removing an asset that is not in the showcase succeeds. Returns no body.
|
|
976
|
+
*
|
|
977
|
+
* Requires the `showcases.write` OAuth scope.
|
|
978
|
+
*/
|
|
979
|
+
removeAsset(showcaseId: string, assetId: string): Promise<void>;
|
|
980
|
+
/**
|
|
981
|
+
* Add boards to a showcase. Boards already in it are skipped. Returns no
|
|
982
|
+
* body. List them with `boards.list({ showcaseId })`.
|
|
983
|
+
*
|
|
984
|
+
* Requires the `showcases.write` and `boards.read` OAuth scopes.
|
|
985
|
+
*/
|
|
986
|
+
addBoards(showcaseId: string, params: AddShowcaseBoardsParams): Promise<void>;
|
|
987
|
+
/**
|
|
988
|
+
* Remove a board from a showcase. The board itself is not deleted.
|
|
989
|
+
* Removing a board that is not in the showcase succeeds. Returns no body.
|
|
990
|
+
*
|
|
991
|
+
* Requires the `showcases.write` OAuth scope.
|
|
992
|
+
*/
|
|
993
|
+
removeBoard(showcaseId: string, boardId: string): Promise<void>;
|
|
994
|
+
}
|
|
995
|
+
|
|
535
996
|
declare class Tags {
|
|
536
997
|
private client;
|
|
537
998
|
constructor(client: AirBase);
|
|
@@ -668,9 +1129,12 @@ interface AirApiOptions extends AirBaseOptions {
|
|
|
668
1129
|
declare class AirApi extends AirBase {
|
|
669
1130
|
readonly assets: Assets;
|
|
670
1131
|
readonly boards: Boards;
|
|
1132
|
+
readonly showcases: Showcases;
|
|
671
1133
|
readonly libraries: Libraries;
|
|
672
1134
|
readonly tags: Tags;
|
|
673
1135
|
readonly customFields: CustomFields;
|
|
1136
|
+
readonly discussions: Discussions;
|
|
1137
|
+
readonly members: Members;
|
|
674
1138
|
readonly roles: Roles;
|
|
675
1139
|
readonly imports: Imports;
|
|
676
1140
|
readonly uploads: Uploads;
|
|
@@ -678,4 +1142,4 @@ declare class AirApi extends AirBase {
|
|
|
678
1142
|
constructor(options?: AirApiOptions);
|
|
679
1143
|
}
|
|
680
1144
|
|
|
681
|
-
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 };
|
|
1145
|
+
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 BoxAnnotation, type CdnLink, type CompleteMultipartParams, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldType, type CustomFieldUpdateParams, type CustomFieldValue, type CustomFieldValueCreateParams, type CustomFieldValueUpdateParams, CustomFields, type Discussion, type DiscussionAnnotation, type DiscussionAuthor, type DiscussionComment, type DiscussionCommentCreateParams, type DiscussionCommentListParams, type DiscussionCommentPage, type DiscussionCommentUpdateParams, type DiscussionCreateParams, type DiscussionListOptions, type DiscussionListParams, type DiscussionMention, type DiscussionMentionInput, type DiscussionUpdateParams, Discussions, 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 Member, type MemberListParams, type MemberType, Members, type PencilAnnotation, type PencilLine, 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 };
|