frameio 3.0.0 → 3.2.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.
Files changed (94) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +2 -2
  3. package/dist/cjs/Client.js +4 -4
  4. package/dist/cjs/api/resources/comments/client/Client.d.ts +92 -2
  5. package/dist/cjs/api/resources/comments/client/Client.js +189 -2
  6. package/dist/cjs/api/resources/comments/client/requests/CommentsIndexRequest.d.ts +3 -0
  7. package/dist/cjs/api/resources/comments/client/requests/CreateAttachmentParams.d.ts +14 -0
  8. package/dist/cjs/api/resources/comments/client/requests/CreateAttachmentParams.js +3 -0
  9. package/dist/cjs/api/resources/comments/client/requests/CreateCommentParams.d.ts +37 -1
  10. package/dist/cjs/api/resources/comments/client/requests/UpdateCommentParams.d.ts +23 -1
  11. package/dist/cjs/api/resources/comments/client/requests/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/comments/types/CommentsIndexRequestSort.d.ts +10 -0
  13. package/dist/cjs/api/resources/comments/types/CommentsIndexRequestSort.js +13 -0
  14. package/dist/cjs/api/resources/comments/types/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/comments/types/index.js +1 -0
  16. package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +1 -1
  17. package/dist/cjs/api/resources/versionStacks/client/Client.js +1 -1
  18. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
  19. package/dist/cjs/api/types/Anchor.d.ts +6 -0
  20. package/dist/cjs/api/types/Anchor.js +3 -0
  21. package/dist/cjs/api/types/AttachmentInput.d.ts +11 -0
  22. package/dist/cjs/api/types/AttachmentInput.js +3 -0
  23. package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +1 -1
  24. package/dist/cjs/api/types/Comment.d.ts +12 -0
  25. package/dist/cjs/api/types/CommentAttachment.d.ts +14 -0
  26. package/dist/cjs/api/types/CommentAttachment.js +3 -0
  27. package/dist/cjs/api/types/CommentAttachmentResponse.d.ts +4 -0
  28. package/dist/cjs/api/types/CommentAttachmentResponse.js +3 -0
  29. package/dist/cjs/api/types/CommentSort.d.ts +10 -0
  30. package/dist/cjs/api/types/CommentSort.js +13 -0
  31. package/dist/cjs/api/types/Link.d.ts +10 -0
  32. package/dist/cjs/api/types/Link.js +3 -0
  33. package/dist/cjs/api/types/LinkParams.d.ts +8 -0
  34. package/dist/cjs/api/types/LinkParams.js +3 -0
  35. package/dist/cjs/api/types/Mention.d.ts +10 -0
  36. package/dist/cjs/api/types/Mention.js +3 -0
  37. package/dist/cjs/api/types/TextReviewAnnotation.d.ts +21 -0
  38. package/dist/cjs/api/types/TextReviewAnnotation.js +14 -0
  39. package/dist/cjs/api/types/TextReviewAnnotationBounds.d.ts +10 -0
  40. package/dist/cjs/api/types/TextReviewAnnotationBounds.js +3 -0
  41. package/dist/cjs/api/types/TextReviewAnnotationUpdate.d.ts +24 -0
  42. package/dist/cjs/api/types/TextReviewAnnotationUpdate.js +14 -0
  43. package/dist/cjs/api/types/index.d.ts +11 -0
  44. package/dist/cjs/api/types/index.js +11 -0
  45. package/dist/cjs/version.d.ts +1 -1
  46. package/dist/cjs/version.js +1 -1
  47. package/dist/esm/BaseClient.mjs +2 -2
  48. package/dist/esm/Client.d.mts +2 -2
  49. package/dist/esm/Client.mjs +4 -4
  50. package/dist/esm/api/resources/comments/client/Client.d.mts +92 -2
  51. package/dist/esm/api/resources/comments/client/Client.mjs +189 -2
  52. package/dist/esm/api/resources/comments/client/requests/CommentsIndexRequest.d.mts +3 -0
  53. package/dist/esm/api/resources/comments/client/requests/CreateAttachmentParams.d.mts +14 -0
  54. package/dist/esm/api/resources/comments/client/requests/CreateAttachmentParams.mjs +2 -0
  55. package/dist/esm/api/resources/comments/client/requests/CreateCommentParams.d.mts +37 -1
  56. package/dist/esm/api/resources/comments/client/requests/UpdateCommentParams.d.mts +23 -1
  57. package/dist/esm/api/resources/comments/client/requests/index.d.mts +1 -0
  58. package/dist/esm/api/resources/comments/types/CommentsIndexRequestSort.d.mts +10 -0
  59. package/dist/esm/api/resources/comments/types/CommentsIndexRequestSort.mjs +10 -0
  60. package/dist/esm/api/resources/comments/types/index.d.mts +1 -0
  61. package/dist/esm/api/resources/comments/types/index.mjs +1 -0
  62. package/dist/esm/api/resources/versionStacks/client/Client.d.mts +1 -1
  63. package/dist/esm/api/resources/versionStacks/client/Client.mjs +1 -1
  64. package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
  65. package/dist/esm/api/types/Anchor.d.mts +6 -0
  66. package/dist/esm/api/types/Anchor.mjs +2 -0
  67. package/dist/esm/api/types/AttachmentInput.d.mts +11 -0
  68. package/dist/esm/api/types/AttachmentInput.mjs +2 -0
  69. package/dist/esm/api/types/AuditLogwithIncludes.d.mts +1 -1
  70. package/dist/esm/api/types/Comment.d.mts +12 -0
  71. package/dist/esm/api/types/CommentAttachment.d.mts +14 -0
  72. package/dist/esm/api/types/CommentAttachment.mjs +2 -0
  73. package/dist/esm/api/types/CommentAttachmentResponse.d.mts +4 -0
  74. package/dist/esm/api/types/CommentAttachmentResponse.mjs +2 -0
  75. package/dist/esm/api/types/CommentSort.d.mts +10 -0
  76. package/dist/esm/api/types/CommentSort.mjs +10 -0
  77. package/dist/esm/api/types/Link.d.mts +10 -0
  78. package/dist/esm/api/types/Link.mjs +2 -0
  79. package/dist/esm/api/types/LinkParams.d.mts +8 -0
  80. package/dist/esm/api/types/LinkParams.mjs +2 -0
  81. package/dist/esm/api/types/Mention.d.mts +10 -0
  82. package/dist/esm/api/types/Mention.mjs +2 -0
  83. package/dist/esm/api/types/TextReviewAnnotation.d.mts +21 -0
  84. package/dist/esm/api/types/TextReviewAnnotation.mjs +11 -0
  85. package/dist/esm/api/types/TextReviewAnnotationBounds.d.mts +10 -0
  86. package/dist/esm/api/types/TextReviewAnnotationBounds.mjs +2 -0
  87. package/dist/esm/api/types/TextReviewAnnotationUpdate.d.mts +24 -0
  88. package/dist/esm/api/types/TextReviewAnnotationUpdate.mjs +11 -0
  89. package/dist/esm/api/types/index.d.mts +11 -0
  90. package/dist/esm/api/types/index.mjs +11 -0
  91. package/dist/esm/version.d.mts +1 -1
  92. package/dist/esm/version.mjs +1 -1
  93. package/package.json +12 -12
  94. package/reference.md +246 -39
@@ -33,6 +33,151 @@ export class CommentsClient {
33
33
  constructor(options) {
34
34
  this._options = normalizeClientOptionsWithAuth(options);
35
35
  }
36
+ /**
37
+ * Delete an attachment from a comment. <br/>Rate Limits: 60 calls per 1.00 minute(s) per account_user
38
+ *
39
+ * @param {Frameio.Uuid} account_id
40
+ * @param {Frameio.Uuid} comment_id
41
+ * @param {Frameio.Uuid} attachment_id
42
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
43
+ *
44
+ * @throws {@link Frameio.BadRequestError}
45
+ * @throws {@link Frameio.UnauthorizedError}
46
+ * @throws {@link Frameio.ForbiddenError}
47
+ * @throws {@link Frameio.NotFoundError}
48
+ * @throws {@link Frameio.ConflictError}
49
+ * @throws {@link Frameio.UnprocessableEntityError}
50
+ * @throws {@link Frameio.TooManyRequestsError}
51
+ *
52
+ * @example
53
+ * await client.comments.deleteAttachment("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
54
+ */
55
+ deleteAttachment(account_id, comment_id, attachment_id, requestOptions) {
56
+ return core.HttpResponsePromise.fromPromise(this.__deleteAttachment(account_id, comment_id, attachment_id, requestOptions));
57
+ }
58
+ __deleteAttachment(account_id, comment_id, attachment_id, requestOptions) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
61
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
62
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
63
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
64
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/comments/${core.url.encodePathParam(comment_id)}/attachments/${core.url.encodePathParam(attachment_id)}`),
65
+ method: "DELETE",
66
+ headers: _headers,
67
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
68
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
69
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
70
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
71
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
72
+ logging: this._options.logging,
73
+ });
74
+ if (_response.ok) {
75
+ return { data: undefined, rawResponse: _response.rawResponse };
76
+ }
77
+ if (_response.error.reason === "status-code") {
78
+ switch (_response.error.statusCode) {
79
+ case 400:
80
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
81
+ case 401:
82
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
83
+ case 403:
84
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
85
+ case 404:
86
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
87
+ case 409:
88
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
89
+ case 422:
90
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
91
+ case 429:
92
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
93
+ default:
94
+ throw new errors.FrameioError({
95
+ statusCode: _response.error.statusCode,
96
+ body: _response.error.body,
97
+ rawResponse: _response.rawResponse,
98
+ });
99
+ }
100
+ }
101
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/comments/{comment_id}/attachments/{attachment_id}");
102
+ });
103
+ }
104
+ /**
105
+ * Create an attachment for an existing comment. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
106
+ *
107
+ * @param {Frameio.Uuid} account_id
108
+ * @param {Frameio.Uuid} comment_id
109
+ * @param {Frameio.CreateAttachmentParams} request
110
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
111
+ *
112
+ * @throws {@link Frameio.BadRequestError}
113
+ * @throws {@link Frameio.UnauthorizedError}
114
+ * @throws {@link Frameio.ForbiddenError}
115
+ * @throws {@link Frameio.NotFoundError}
116
+ * @throws {@link Frameio.ConflictError}
117
+ * @throws {@link Frameio.UnprocessableEntityError}
118
+ * @throws {@link Frameio.TooManyRequestsError}
119
+ *
120
+ * @example
121
+ * await client.comments.createAttachment("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
122
+ * data: {
123
+ * file_size: 1024000,
124
+ * media_type: "image/png",
125
+ * name: "screenshot.png"
126
+ * }
127
+ * })
128
+ */
129
+ createAttachment(account_id, comment_id, request, requestOptions) {
130
+ return core.HttpResponsePromise.fromPromise(this.__createAttachment(account_id, comment_id, request, requestOptions));
131
+ }
132
+ __createAttachment(account_id, comment_id, request, requestOptions) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
135
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
136
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
137
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
138
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/comments/${core.url.encodePathParam(comment_id)}/attachments`),
139
+ method: "POST",
140
+ headers: _headers,
141
+ contentType: "application/json",
142
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
143
+ requestType: "json",
144
+ body: request,
145
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
146
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
147
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
149
+ logging: this._options.logging,
150
+ });
151
+ if (_response.ok) {
152
+ return { data: _response.body, rawResponse: _response.rawResponse };
153
+ }
154
+ if (_response.error.reason === "status-code") {
155
+ switch (_response.error.statusCode) {
156
+ case 400:
157
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
158
+ case 401:
159
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
160
+ case 403:
161
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
162
+ case 404:
163
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
164
+ case 409:
165
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
166
+ case 422:
167
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
168
+ case 429:
169
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
170
+ default:
171
+ throw new errors.FrameioError({
172
+ statusCode: _response.error.statusCode,
173
+ body: _response.error.body,
174
+ rawResponse: _response.rawResponse,
175
+ });
176
+ }
177
+ }
178
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/comments/{comment_id}/attachments");
179
+ });
180
+ }
36
181
  /**
37
182
  * Show a single comment on a file. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
38
183
  *
@@ -177,7 +322,7 @@ export class CommentsClient {
177
322
  });
178
323
  }
179
324
  /**
180
- * Update comment on given asset. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
325
+ * Update comment on given asset.<br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
181
326
  *
182
327
  * @param {Frameio.Uuid} account_id
183
328
  * @param {Frameio.Uuid} comment_id
@@ -196,10 +341,25 @@ export class CommentsClient {
196
341
  * await client.comments.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
197
342
  * timestamp_as_timecode: true,
198
343
  * data: {
344
+ * anchor: {
345
+ * x: 0.5,
346
+ * y: 0.5
347
+ * },
199
348
  * annotation: "[{\"tool\":\"rect\",\"color\":\"#F22237\",\"size\":8,\"x\":0.277726001863933,\"y\":0.12909555568499534,\"w\":0.3153168321877913,\"h\":0.5308131407269339,\"ix\":0.277726001863933,\"iy\":0.12909555568499534,\"radius\":8}]",
200
349
  * completed: false,
350
+ * duration: 10,
351
+ * links: [{
352
+ * end_index: 13,
353
+ * start_index: 5,
354
+ * url: "https://www.example.com"
355
+ * }],
201
356
  * page: 4,
202
- * text: "This is great!"
357
+ * text: "This is great!",
358
+ * text_review_annotation: {
359
+ * selection_text: "existing copy",
360
+ * suggested_text: "updated copy"
361
+ * },
362
+ * timestamp: 100
203
363
  * }
204
364
  * })
205
365
  */
@@ -279,6 +439,7 @@ export class CommentsClient {
279
439
  * await client.comments.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
280
440
  * timestamp_as_timecode: true,
281
441
  * include: "owner",
442
+ * sort: "owner_asc",
282
443
  * after: "<opaque_cursor>",
283
444
  * page_size: 10,
284
445
  * include_total_count: false
@@ -366,10 +527,36 @@ export class CommentsClient {
366
527
  * await client.comments.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
367
528
  * timestamp_as_timecode: true,
368
529
  * data: {
530
+ * anchor: {
531
+ * x: 0.5,
532
+ * y: 0.5
533
+ * },
369
534
  * annotation: "[{\"tool\":\"rect\",\"color\":\"#F22237\",\"size\":8,\"x\":0.277726001863933,\"y\":0.12909555568499534,\"w\":0.3153168321877913,\"h\":0.5308131407269339,\"ix\":0.277726001863933,\"iy\":0.12909555568499534,\"radius\":8}]",
535
+ * attachments: [{
536
+ * file_size: 1024000,
537
+ * media_type: "image/png",
538
+ * name: "screenshot.png"
539
+ * }],
370
540
  * completed: false,
541
+ * duration: 10,
542
+ * links: [{
543
+ * end_index: 13,
544
+ * start_index: 5,
545
+ * url: "https://www.example.com"
546
+ * }],
371
547
  * page: 4,
372
548
  * text: "This is great!",
549
+ * text_review_annotation: {
550
+ * bounds: [{
551
+ * height: 42,
552
+ * width: 130,
553
+ * x: 12.5,
554
+ * y: 24
555
+ * }],
556
+ * selection_text: "existing copy",
557
+ * suggested_text: "updated copy",
558
+ * text_review_annotation_type: "replace"
559
+ * },
373
560
  * timestamp: "00:00:02:12"
374
561
  * }
375
562
  * })
@@ -4,6 +4,7 @@ import type * as Frameio from "../../../../index.mjs";
4
4
  * {
5
5
  * timestamp_as_timecode: true,
6
6
  * include: "owner",
7
+ * sort: "owner_asc",
7
8
  * after: "<opaque_cursor>",
8
9
  * page_size: 10,
9
10
  * include_total_count: false
@@ -12,6 +13,8 @@ import type * as Frameio from "../../../../index.mjs";
12
13
  export interface CommentsIndexRequest {
13
14
  timestamp_as_timecode?: boolean;
14
15
  include?: Frameio.CommentsIndexRequestInclude;
16
+ /** Sort comments by query params */
17
+ sort?: Frameio.CommentsIndexRequestSort;
15
18
  /**
16
19
  * Opaque Cursor query param for requests returning paginated results.
17
20
  * <br/>
@@ -0,0 +1,14 @@
1
+ import type * as Frameio from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * data: {
6
+ * file_size: 1024000,
7
+ * media_type: "image/png",
8
+ * name: "screenshot.png"
9
+ * }
10
+ * }
11
+ */
12
+ export interface CreateAttachmentParams {
13
+ data: Frameio.AttachmentInput;
14
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -4,10 +4,36 @@ import type * as Frameio from "../../../../index.mjs";
4
4
  * {
5
5
  * timestamp_as_timecode: true,
6
6
  * data: {
7
+ * anchor: {
8
+ * x: 0.5,
9
+ * y: 0.5
10
+ * },
7
11
  * annotation: "[{\"tool\":\"rect\",\"color\":\"#F22237\",\"size\":8,\"x\":0.277726001863933,\"y\":0.12909555568499534,\"w\":0.3153168321877913,\"h\":0.5308131407269339,\"ix\":0.277726001863933,\"iy\":0.12909555568499534,\"radius\":8}]",
12
+ * attachments: [{
13
+ * file_size: 1024000,
14
+ * media_type: "image/png",
15
+ * name: "screenshot.png"
16
+ * }],
8
17
  * completed: false,
18
+ * duration: 10,
19
+ * links: [{
20
+ * end_index: 13,
21
+ * start_index: 5,
22
+ * url: "https://www.example.com"
23
+ * }],
9
24
  * page: 4,
10
25
  * text: "This is great!",
26
+ * text_review_annotation: {
27
+ * bounds: [{
28
+ * height: 42,
29
+ * width: 130,
30
+ * x: 12.5,
31
+ * y: 24
32
+ * }],
33
+ * selection_text: "existing copy",
34
+ * suggested_text: "updated copy",
35
+ * text_review_annotation_type: "replace"
36
+ * },
11
37
  * timestamp: "00:00:02:12"
12
38
  * }
13
39
  * }
@@ -18,14 +44,24 @@ export interface CreateCommentParams {
18
44
  }
19
45
  export declare namespace CreateCommentParams {
20
46
  interface Data {
21
- /** JSON geometry for on-screen drawings. Allowed for document, image, video, or stream file types. JSON must be stringified. */
47
+ /** Comment anchor location. {(x, y) | 0 <= x <= 1, 0 <= y <= 1}. */
48
+ anchor?: Frameio.Anchor | undefined;
49
+ /** JSON geometry for on-screen drawings. Allowed for document, image, video, or stream file types. JSON must be stringified */
22
50
  annotation?: string | undefined;
51
+ /** Optional attachments to create with the comment (max 6 attachments) */
52
+ attachments?: Frameio.AttachmentInput[] | undefined;
23
53
  /** Comment completion status */
24
54
  completed?: boolean | undefined;
55
+ /** Duration of comment in frames. Requires presence of timestamp parameter */
56
+ duration?: number | undefined;
57
+ /** Comment text links. */
58
+ links?: Frameio.LinkParams[] | undefined;
25
59
  /** Document page. Only allowed when file type is a pdf document */
26
60
  page?: number | undefined;
27
61
  /** Comment text (required) */
28
62
  text: string;
63
+ /** Text review annotation details for comments left on text documents. */
64
+ text_review_annotation?: Frameio.TextReviewAnnotation | undefined;
29
65
  timestamp?: Frameio.TimeStamp | undefined;
30
66
  }
31
67
  }
@@ -4,10 +4,25 @@ import type * as Frameio from "../../../../index.mjs";
4
4
  * {
5
5
  * timestamp_as_timecode: true,
6
6
  * data: {
7
+ * anchor: {
8
+ * x: 0.5,
9
+ * y: 0.5
10
+ * },
7
11
  * annotation: "[{\"tool\":\"rect\",\"color\":\"#F22237\",\"size\":8,\"x\":0.277726001863933,\"y\":0.12909555568499534,\"w\":0.3153168321877913,\"h\":0.5308131407269339,\"ix\":0.277726001863933,\"iy\":0.12909555568499534,\"radius\":8}]",
8
12
  * completed: false,
13
+ * duration: 10,
14
+ * links: [{
15
+ * end_index: 13,
16
+ * start_index: 5,
17
+ * url: "https://www.example.com"
18
+ * }],
9
19
  * page: 4,
10
- * text: "This is great!"
20
+ * text: "This is great!",
21
+ * text_review_annotation: {
22
+ * selection_text: "existing copy",
23
+ * suggested_text: "updated copy"
24
+ * },
25
+ * timestamp: 100
11
26
  * }
12
27
  * }
13
28
  */
@@ -17,14 +32,21 @@ export interface UpdateCommentParams {
17
32
  }
18
33
  export declare namespace UpdateCommentParams {
19
34
  interface Data {
35
+ /** Comment anchor location. {(x, y) | 0 <= x <= 1, 0 <= y <= 1}. */
36
+ anchor?: Frameio.Anchor | undefined;
20
37
  /** JSON geometry for on-screen drawings. Allowed for document, image, video, or stream file types. JSON must be stringified. */
21
38
  annotation?: string | undefined;
22
39
  /** Comment completion status */
23
40
  completed?: boolean | undefined;
41
+ /** Duration of comment in frames. Requires presence of timestamp parameter */
42
+ duration?: number | undefined;
43
+ /** Comment text links. */
44
+ links?: Frameio.LinkParams[] | undefined;
24
45
  /** Document page. Only allowed when file type is a pdf document */
25
46
  page?: number | undefined;
26
47
  /** Comment text */
27
48
  text?: string | undefined;
49
+ text_review_annotation?: Frameio.TextReviewAnnotationUpdate | undefined;
28
50
  timestamp?: Frameio.TimeStamp | undefined;
29
51
  }
30
52
  }
@@ -1,4 +1,5 @@
1
1
  export type { CommentsIndexRequest } from "./CommentsIndexRequest.mjs";
2
2
  export type { CommentsShowRequest } from "./CommentsShowRequest.mjs";
3
+ export type { CreateAttachmentParams } from "./CreateAttachmentParams.mjs";
3
4
  export type { CreateCommentParams } from "./CreateCommentParams.mjs";
4
5
  export type { UpdateCommentParams } from "./UpdateCommentParams.mjs";
@@ -0,0 +1,10 @@
1
+ /** Sort query parameter for comments. Include query params for owner is required when sorting by owner. */
2
+ export declare const CommentsIndexRequestSort: {
3
+ readonly OwnerAsc: "owner_asc";
4
+ readonly OwnerDesc: "owner_desc";
5
+ readonly CompletedAtAsc: "completed_at_asc";
6
+ readonly CompletedAtDesc: "completed_at_desc";
7
+ readonly CreatedAtAsc: "created_at_asc";
8
+ readonly CreatedAtDesc: "created_at_desc";
9
+ };
10
+ export type CommentsIndexRequestSort = (typeof CommentsIndexRequestSort)[keyof typeof CommentsIndexRequestSort];
@@ -0,0 +1,10 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Sort query parameter for comments. Include query params for owner is required when sorting by owner. */
3
+ export const CommentsIndexRequestSort = {
4
+ OwnerAsc: "owner_asc",
5
+ OwnerDesc: "owner_desc",
6
+ CompletedAtAsc: "completed_at_asc",
7
+ CompletedAtDesc: "completed_at_desc",
8
+ CreatedAtAsc: "created_at_asc",
9
+ CreatedAtDesc: "created_at_desc",
10
+ };
@@ -1,2 +1,3 @@
1
1
  export * from "./CommentsIndexRequestInclude.mjs";
2
+ export * from "./CommentsIndexRequestSort.mjs";
2
3
  export * from "./CommentsShowRequestInclude.mjs";
@@ -1,2 +1,3 @@
1
1
  export * from "./CommentsIndexRequestInclude.mjs";
2
+ export * from "./CommentsIndexRequestSort.mjs";
2
3
  export * from "./CommentsShowRequestInclude.mjs";
@@ -145,7 +145,7 @@ export declare class VersionStacksClient {
145
145
  * @example
146
146
  * await client.versionStacks.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
147
147
  * data: {
148
- * file_ids: ["5ac6ed03-061e-401c-b7c1-ce726dd863de", "1ede5e45-07f7-4f55-8bac-28b6fa786908"]
148
+ * file_ids: ["5cbe22e2-fa8e-4279-9ce7-64ec188e059a", "cf7dec74-6d90-4c8b-829c-3e5bb7baa37a"]
149
149
  * }
150
150
  * })
151
151
  */
@@ -387,7 +387,7 @@ export class VersionStacksClient {
387
387
  * @example
388
388
  * await client.versionStacks.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
389
389
  * data: {
390
- * file_ids: ["5ac6ed03-061e-401c-b7c1-ce726dd863de", "1ede5e45-07f7-4f55-8bac-28b6fa786908"]
390
+ * file_ids: ["5cbe22e2-fa8e-4279-9ce7-64ec188e059a", "cf7dec74-6d90-4c8b-829c-3e5bb7baa37a"]
391
391
  * }
392
392
  * })
393
393
  */
@@ -2,7 +2,7 @@
2
2
  * @example
3
3
  * {
4
4
  * data: {
5
- * file_ids: ["5ac6ed03-061e-401c-b7c1-ce726dd863de", "1ede5e45-07f7-4f55-8bac-28b6fa786908"]
5
+ * file_ids: ["5cbe22e2-fa8e-4279-9ce7-64ec188e059a", "cf7dec74-6d90-4c8b-829c-3e5bb7baa37a"]
6
6
  * }
7
7
  * }
8
8
  */
@@ -0,0 +1,6 @@
1
+ export interface Anchor {
2
+ /** Horizontal comment anchor location. */
3
+ x: number;
4
+ /** Vertical comment anchor location. */
5
+ y: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Input for creating a comment attachment
3
+ */
4
+ export interface AttachmentInput {
5
+ /** Attachment file size in bytes (up to 5TB) */
6
+ file_size: number;
7
+ /** File media type */
8
+ media_type: string;
9
+ /** Filename */
10
+ name: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -11,7 +11,7 @@ export interface AuditLogwithIncludes {
11
11
  resource_id: string;
12
12
  resource_type: AuditLogwithIncludes.ResourceType;
13
13
  user?: Frameio.User | undefined;
14
- user_id: string;
14
+ user_id?: string | undefined;
15
15
  workspace_id?: string | undefined;
16
16
  }
17
17
  export declare namespace AuditLogwithIncludes {
@@ -1,22 +1,34 @@
1
1
  import type * as Frameio from "../index.mjs";
2
2
  export interface Comment {
3
+ /** Comment anchor location. {(x, y) | 0 <= x <= 1, 0 <= y <= 1}. */
4
+ anchor?: Frameio.Anchor | undefined;
3
5
  annotation?: string | undefined;
6
+ /** Attachments associated with this comment (0-6 attachments allowed) */
7
+ attachments?: Frameio.CommentAttachment[] | undefined;
4
8
  /** Completion timestamp */
5
9
  completed_at?: string | undefined;
6
10
  /** ID of user who marked the comment as completed */
7
11
  completer_id?: string | undefined;
8
12
  /** Creation timestamp */
9
13
  created_at: string;
14
+ /** Duration of comment in frames. Requires presence of timestamp parameter */
15
+ duration?: number | undefined;
10
16
  /** File ID */
11
17
  file_id: string;
12
18
  /** Comment ID */
13
19
  id: string;
20
+ /** Links */
21
+ links: Frameio.Link[];
22
+ /** Mentions */
23
+ mentions: Frameio.Mention[];
14
24
  /** Document page */
15
25
  page?: number | undefined;
16
26
  /** Comment text */
17
27
  text: string;
18
28
  /** Text edited timestamp */
19
29
  text_edited_at?: string | undefined;
30
+ /** Text review annotation details for comments left on text documents. */
31
+ text_review_annotation?: Frameio.TextReviewAnnotation | undefined;
20
32
  timestamp: Frameio.TimeStamp;
21
33
  /** Update timestamp */
22
34
  updated_at: string;
@@ -0,0 +1,14 @@
1
+ export interface CommentAttachment {
2
+ /** Creation timestamp */
3
+ created_at: string;
4
+ /** Attachment file size in bytes (up to 5TB) */
5
+ file_size: number;
6
+ /** Comment attachment ID */
7
+ id: string;
8
+ /** File media type */
9
+ media_type?: string | undefined;
10
+ /** File name for the attachment */
11
+ name: string;
12
+ /** Comment attachment upload URLs. Number of URLs returned will vary depending on the file size. */
13
+ upload_urls?: string[] | undefined;
14
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as Frameio from "../index.mjs";
2
+ export interface CommentAttachmentResponse {
3
+ data?: Frameio.CommentAttachment | undefined;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ /** Sort query parameter for comments. Include query params for owner is required when sorting by owner. */
2
+ export declare const CommentSort: {
3
+ readonly OwnerAsc: "owner_asc";
4
+ readonly OwnerDesc: "owner_desc";
5
+ readonly CompletedAtAsc: "completed_at_asc";
6
+ readonly CompletedAtDesc: "completed_at_desc";
7
+ readonly CreatedAtAsc: "created_at_asc";
8
+ readonly CreatedAtDesc: "created_at_desc";
9
+ };
10
+ export type CommentSort = (typeof CommentSort)[keyof typeof CommentSort];
@@ -0,0 +1,10 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Sort query parameter for comments. Include query params for owner is required when sorting by owner. */
3
+ export const CommentSort = {
4
+ OwnerAsc: "owner_asc",
5
+ OwnerDesc: "owner_desc",
6
+ CompletedAtAsc: "completed_at_asc",
7
+ CompletedAtDesc: "completed_at_desc",
8
+ CreatedAtAsc: "created_at_asc",
9
+ CreatedAtDesc: "created_at_desc",
10
+ };
@@ -0,0 +1,10 @@
1
+ export interface Link {
2
+ /** End index of link text */
3
+ end_index: number;
4
+ /** Start index of link text */
5
+ start_index: number;
6
+ /** Link text */
7
+ text: string;
8
+ /** Link URL */
9
+ url: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface LinkParams {
2
+ /** End index of link text */
3
+ end_index: number;
4
+ /** Start index of link text */
5
+ start_index: number;
6
+ /** Link URL */
7
+ url: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ export interface Mention {
2
+ /** End index of mention text */
3
+ end_index: number;
4
+ /** Start index of mention text */
5
+ start_index: number;
6
+ /** Mention text */
7
+ text: string;
8
+ /** Mentioned user ID */
9
+ user_id: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};