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
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "frameio",
46
- "X-Fern-SDK-Version": "3.0.0",
47
- "User-Agent": "frameio/3.0.0",
46
+ "X-Fern-SDK-Version": "3.2.0",
47
+ "User-Agent": "frameio/3.2.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -28,8 +28,8 @@ export declare class FrameioClient {
28
28
  protected _folders: FoldersClient | undefined;
29
29
  protected _versionStacks: VersionStacksClient | undefined;
30
30
  protected _accountPermissions: AccountPermissionsClient | undefined;
31
- protected _accounts: AccountsClient | undefined;
32
31
  protected _comments: CommentsClient | undefined;
32
+ protected _accounts: AccountsClient | undefined;
33
33
  protected _webhooks: WebhooksClient | undefined;
34
34
  protected _workspacePermissions: WorkspacePermissionsClient | undefined;
35
35
  protected _shares: SharesClient | undefined;
@@ -44,8 +44,8 @@ export declare class FrameioClient {
44
44
  get folders(): FoldersClient;
45
45
  get versionStacks(): VersionStacksClient;
46
46
  get accountPermissions(): AccountPermissionsClient;
47
- get accounts(): AccountsClient;
48
47
  get comments(): CommentsClient;
48
+ get accounts(): AccountsClient;
49
49
  get webhooks(): WebhooksClient;
50
50
  get workspacePermissions(): WorkspacePermissionsClient;
51
51
  get shares(): SharesClient;
@@ -85,14 +85,14 @@ class FrameioClient {
85
85
  var _a;
86
86
  return ((_a = this._accountPermissions) !== null && _a !== void 0 ? _a : (this._accountPermissions = new Client_js_1.AccountPermissionsClient(this._options)));
87
87
  }
88
- get accounts() {
89
- var _a;
90
- return ((_a = this._accounts) !== null && _a !== void 0 ? _a : (this._accounts = new Client_js_2.AccountsClient(this._options)));
91
- }
92
88
  get comments() {
93
89
  var _a;
94
90
  return ((_a = this._comments) !== null && _a !== void 0 ? _a : (this._comments = new Client_js_3.CommentsClient(this._options)));
95
91
  }
92
+ get accounts() {
93
+ var _a;
94
+ return ((_a = this._accounts) !== null && _a !== void 0 ? _a : (this._accounts = new Client_js_2.AccountsClient(this._options)));
95
+ }
96
96
  get webhooks() {
97
97
  var _a;
98
98
  return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_13.WebhooksClient(this._options)));
@@ -13,6 +13,54 @@ export declare namespace CommentsClient {
13
13
  export declare class CommentsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<CommentsClient.Options>;
15
15
  constructor(options: CommentsClient.Options);
16
+ /**
17
+ * Delete an attachment from a comment. <br/>Rate Limits: 60 calls per 1.00 minute(s) per account_user
18
+ *
19
+ * @param {Frameio.Uuid} account_id
20
+ * @param {Frameio.Uuid} comment_id
21
+ * @param {Frameio.Uuid} attachment_id
22
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
23
+ *
24
+ * @throws {@link Frameio.BadRequestError}
25
+ * @throws {@link Frameio.UnauthorizedError}
26
+ * @throws {@link Frameio.ForbiddenError}
27
+ * @throws {@link Frameio.NotFoundError}
28
+ * @throws {@link Frameio.ConflictError}
29
+ * @throws {@link Frameio.UnprocessableEntityError}
30
+ * @throws {@link Frameio.TooManyRequestsError}
31
+ *
32
+ * @example
33
+ * await client.comments.deleteAttachment("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
34
+ */
35
+ deleteAttachment(account_id: Frameio.Uuid, comment_id: Frameio.Uuid, attachment_id: Frameio.Uuid, requestOptions?: CommentsClient.RequestOptions): core.HttpResponsePromise<void>;
36
+ private __deleteAttachment;
37
+ /**
38
+ * Create an attachment for an existing comment. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
39
+ *
40
+ * @param {Frameio.Uuid} account_id
41
+ * @param {Frameio.Uuid} comment_id
42
+ * @param {Frameio.CreateAttachmentParams} request
43
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @throws {@link Frameio.BadRequestError}
46
+ * @throws {@link Frameio.UnauthorizedError}
47
+ * @throws {@link Frameio.ForbiddenError}
48
+ * @throws {@link Frameio.NotFoundError}
49
+ * @throws {@link Frameio.ConflictError}
50
+ * @throws {@link Frameio.UnprocessableEntityError}
51
+ * @throws {@link Frameio.TooManyRequestsError}
52
+ *
53
+ * @example
54
+ * await client.comments.createAttachment("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
55
+ * data: {
56
+ * file_size: 1024000,
57
+ * media_type: "image/png",
58
+ * name: "screenshot.png"
59
+ * }
60
+ * })
61
+ */
62
+ createAttachment(account_id: Frameio.Uuid, comment_id: Frameio.Uuid, request: Frameio.CreateAttachmentParams, requestOptions?: CommentsClient.RequestOptions): core.HttpResponsePromise<Frameio.CommentAttachmentResponse>;
63
+ private __createAttachment;
16
64
  /**
17
65
  * Show a single comment on a file. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
18
66
  *
@@ -58,7 +106,7 @@ export declare class CommentsClient {
58
106
  delete(account_id: Frameio.Uuid, comment_id: Frameio.Uuid, requestOptions?: CommentsClient.RequestOptions): core.HttpResponsePromise<void>;
59
107
  private __delete;
60
108
  /**
61
- * Update comment on given asset. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
109
+ * Update comment on given asset.<br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
62
110
  *
63
111
  * @param {Frameio.Uuid} account_id
64
112
  * @param {Frameio.Uuid} comment_id
@@ -77,10 +125,25 @@ export declare class CommentsClient {
77
125
  * await client.comments.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
78
126
  * timestamp_as_timecode: true,
79
127
  * data: {
128
+ * anchor: {
129
+ * x: 0.5,
130
+ * y: 0.5
131
+ * },
80
132
  * 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}]",
81
133
  * completed: false,
134
+ * duration: 10,
135
+ * links: [{
136
+ * end_index: 13,
137
+ * start_index: 5,
138
+ * url: "https://www.example.com"
139
+ * }],
82
140
  * page: 4,
83
- * text: "This is great!"
141
+ * text: "This is great!",
142
+ * text_review_annotation: {
143
+ * selection_text: "existing copy",
144
+ * suggested_text: "updated copy"
145
+ * },
146
+ * timestamp: 100
84
147
  * }
85
148
  * })
86
149
  */
@@ -106,6 +169,7 @@ export declare class CommentsClient {
106
169
  * await client.comments.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
107
170
  * timestamp_as_timecode: true,
108
171
  * include: "owner",
172
+ * sort: "owner_asc",
109
173
  * after: "<opaque_cursor>",
110
174
  * page_size: 10,
111
175
  * include_total_count: false
@@ -132,10 +196,36 @@ export declare class CommentsClient {
132
196
  * await client.comments.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
133
197
  * timestamp_as_timecode: true,
134
198
  * data: {
199
+ * anchor: {
200
+ * x: 0.5,
201
+ * y: 0.5
202
+ * },
135
203
  * 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}]",
204
+ * attachments: [{
205
+ * file_size: 1024000,
206
+ * media_type: "image/png",
207
+ * name: "screenshot.png"
208
+ * }],
136
209
  * completed: false,
210
+ * duration: 10,
211
+ * links: [{
212
+ * end_index: 13,
213
+ * start_index: 5,
214
+ * url: "https://www.example.com"
215
+ * }],
137
216
  * page: 4,
138
217
  * text: "This is great!",
218
+ * text_review_annotation: {
219
+ * bounds: [{
220
+ * height: 42,
221
+ * width: 130,
222
+ * x: 12.5,
223
+ * y: 24
224
+ * }],
225
+ * selection_text: "existing copy",
226
+ * suggested_text: "updated copy",
227
+ * text_review_annotation_type: "replace"
228
+ * },
139
229
  * timestamp: "00:00:02:12"
140
230
  * }
141
231
  * })
@@ -69,6 +69,151 @@ class CommentsClient {
69
69
  constructor(options) {
70
70
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
71
71
  }
72
+ /**
73
+ * Delete an attachment from a comment. <br/>Rate Limits: 60 calls per 1.00 minute(s) per account_user
74
+ *
75
+ * @param {Frameio.Uuid} account_id
76
+ * @param {Frameio.Uuid} comment_id
77
+ * @param {Frameio.Uuid} attachment_id
78
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
79
+ *
80
+ * @throws {@link Frameio.BadRequestError}
81
+ * @throws {@link Frameio.UnauthorizedError}
82
+ * @throws {@link Frameio.ForbiddenError}
83
+ * @throws {@link Frameio.NotFoundError}
84
+ * @throws {@link Frameio.ConflictError}
85
+ * @throws {@link Frameio.UnprocessableEntityError}
86
+ * @throws {@link Frameio.TooManyRequestsError}
87
+ *
88
+ * @example
89
+ * await client.comments.deleteAttachment("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
90
+ */
91
+ deleteAttachment(account_id, comment_id, attachment_id, requestOptions) {
92
+ return core.HttpResponsePromise.fromPromise(this.__deleteAttachment(account_id, comment_id, attachment_id, requestOptions));
93
+ }
94
+ __deleteAttachment(account_id, comment_id, attachment_id, requestOptions) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
97
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
98
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
99
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
100
+ 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)}`),
101
+ method: "DELETE",
102
+ headers: _headers,
103
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
104
+ 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,
105
+ 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,
106
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
107
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
108
+ logging: this._options.logging,
109
+ });
110
+ if (_response.ok) {
111
+ return { data: undefined, rawResponse: _response.rawResponse };
112
+ }
113
+ if (_response.error.reason === "status-code") {
114
+ switch (_response.error.statusCode) {
115
+ case 400:
116
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
117
+ case 401:
118
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
119
+ case 403:
120
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
121
+ case 404:
122
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
123
+ case 409:
124
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
125
+ case 422:
126
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
127
+ case 429:
128
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
129
+ default:
130
+ throw new errors.FrameioError({
131
+ statusCode: _response.error.statusCode,
132
+ body: _response.error.body,
133
+ rawResponse: _response.rawResponse,
134
+ });
135
+ }
136
+ }
137
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/comments/{comment_id}/attachments/{attachment_id}");
138
+ });
139
+ }
140
+ /**
141
+ * Create an attachment for an existing comment. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
142
+ *
143
+ * @param {Frameio.Uuid} account_id
144
+ * @param {Frameio.Uuid} comment_id
145
+ * @param {Frameio.CreateAttachmentParams} request
146
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
147
+ *
148
+ * @throws {@link Frameio.BadRequestError}
149
+ * @throws {@link Frameio.UnauthorizedError}
150
+ * @throws {@link Frameio.ForbiddenError}
151
+ * @throws {@link Frameio.NotFoundError}
152
+ * @throws {@link Frameio.ConflictError}
153
+ * @throws {@link Frameio.UnprocessableEntityError}
154
+ * @throws {@link Frameio.TooManyRequestsError}
155
+ *
156
+ * @example
157
+ * await client.comments.createAttachment("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
158
+ * data: {
159
+ * file_size: 1024000,
160
+ * media_type: "image/png",
161
+ * name: "screenshot.png"
162
+ * }
163
+ * })
164
+ */
165
+ createAttachment(account_id, comment_id, request, requestOptions) {
166
+ return core.HttpResponsePromise.fromPromise(this.__createAttachment(account_id, comment_id, request, requestOptions));
167
+ }
168
+ __createAttachment(account_id, comment_id, request, requestOptions) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
171
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
172
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
173
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
174
+ 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`),
175
+ method: "POST",
176
+ headers: _headers,
177
+ contentType: "application/json",
178
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
179
+ requestType: "json",
180
+ body: request,
181
+ 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,
182
+ 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,
183
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
184
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
185
+ logging: this._options.logging,
186
+ });
187
+ if (_response.ok) {
188
+ return { data: _response.body, rawResponse: _response.rawResponse };
189
+ }
190
+ if (_response.error.reason === "status-code") {
191
+ switch (_response.error.statusCode) {
192
+ case 400:
193
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
194
+ case 401:
195
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
196
+ case 403:
197
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
198
+ case 404:
199
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
200
+ case 409:
201
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
202
+ case 422:
203
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
204
+ case 429:
205
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
206
+ default:
207
+ throw new errors.FrameioError({
208
+ statusCode: _response.error.statusCode,
209
+ body: _response.error.body,
210
+ rawResponse: _response.rawResponse,
211
+ });
212
+ }
213
+ }
214
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/comments/{comment_id}/attachments");
215
+ });
216
+ }
72
217
  /**
73
218
  * Show a single comment on a file. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
74
219
  *
@@ -213,7 +358,7 @@ class CommentsClient {
213
358
  });
214
359
  }
215
360
  /**
216
- * Update comment on given asset. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
361
+ * Update comment on given asset.<br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
217
362
  *
218
363
  * @param {Frameio.Uuid} account_id
219
364
  * @param {Frameio.Uuid} comment_id
@@ -232,10 +377,25 @@ class CommentsClient {
232
377
  * await client.comments.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
233
378
  * timestamp_as_timecode: true,
234
379
  * data: {
380
+ * anchor: {
381
+ * x: 0.5,
382
+ * y: 0.5
383
+ * },
235
384
  * 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}]",
236
385
  * completed: false,
386
+ * duration: 10,
387
+ * links: [{
388
+ * end_index: 13,
389
+ * start_index: 5,
390
+ * url: "https://www.example.com"
391
+ * }],
237
392
  * page: 4,
238
- * text: "This is great!"
393
+ * text: "This is great!",
394
+ * text_review_annotation: {
395
+ * selection_text: "existing copy",
396
+ * suggested_text: "updated copy"
397
+ * },
398
+ * timestamp: 100
239
399
  * }
240
400
  * })
241
401
  */
@@ -315,6 +475,7 @@ class CommentsClient {
315
475
  * await client.comments.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
316
476
  * timestamp_as_timecode: true,
317
477
  * include: "owner",
478
+ * sort: "owner_asc",
318
479
  * after: "<opaque_cursor>",
319
480
  * page_size: 10,
320
481
  * include_total_count: false
@@ -402,10 +563,36 @@ class CommentsClient {
402
563
  * await client.comments.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
403
564
  * timestamp_as_timecode: true,
404
565
  * data: {
566
+ * anchor: {
567
+ * x: 0.5,
568
+ * y: 0.5
569
+ * },
405
570
  * 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}]",
571
+ * attachments: [{
572
+ * file_size: 1024000,
573
+ * media_type: "image/png",
574
+ * name: "screenshot.png"
575
+ * }],
406
576
  * completed: false,
577
+ * duration: 10,
578
+ * links: [{
579
+ * end_index: 13,
580
+ * start_index: 5,
581
+ * url: "https://www.example.com"
582
+ * }],
407
583
  * page: 4,
408
584
  * text: "This is great!",
585
+ * text_review_annotation: {
586
+ * bounds: [{
587
+ * height: 42,
588
+ * width: 130,
589
+ * x: 12.5,
590
+ * y: 24
591
+ * }],
592
+ * selection_text: "existing copy",
593
+ * suggested_text: "updated copy",
594
+ * text_review_annotation_type: "replace"
595
+ * },
409
596
  * timestamp: "00:00:02:12"
410
597
  * }
411
598
  * })
@@ -4,6 +4,7 @@ import type * as Frameio from "../../../../index.js";
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.js";
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.js";
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,10 +4,36 @@ import type * as Frameio from "../../../../index.js";
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.js";
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.js";
2
2
  export type { CommentsShowRequest } from "./CommentsShowRequest.js";
3
+ export type { CreateAttachmentParams } from "./CreateAttachmentParams.js";
3
4
  export type { CreateCommentParams } from "./CreateCommentParams.js";
4
5
  export type { UpdateCommentParams } from "./UpdateCommentParams.js";
@@ -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,13 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CommentsIndexRequestSort = void 0;
5
+ /** Sort query parameter for comments. Include query params for owner is required when sorting by owner. */
6
+ exports.CommentsIndexRequestSort = {
7
+ OwnerAsc: "owner_asc",
8
+ OwnerDesc: "owner_desc",
9
+ CompletedAtAsc: "completed_at_asc",
10
+ CompletedAtDesc: "completed_at_desc",
11
+ CreatedAtAsc: "created_at_asc",
12
+ CreatedAtDesc: "created_at_desc",
13
+ };
@@ -1,2 +1,3 @@
1
1
  export * from "./CommentsIndexRequestInclude.js";
2
+ export * from "./CommentsIndexRequestSort.js";
2
3
  export * from "./CommentsShowRequestInclude.js";
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CommentsIndexRequestInclude.js"), exports);
18
+ __exportStar(require("./CommentsIndexRequestSort.js"), exports);
18
19
  __exportStar(require("./CommentsShowRequestInclude.js"), exports);
@@ -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
  */
@@ -423,7 +423,7 @@ class VersionStacksClient {
423
423
  * @example
424
424
  * await client.versionStacks.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
425
425
  * data: {
426
- * file_ids: ["5ac6ed03-061e-401c-b7c1-ce726dd863de", "1ede5e45-07f7-4f55-8bac-28b6fa786908"]
426
+ * file_ids: ["5cbe22e2-fa8e-4279-9ce7-64ec188e059a", "cf7dec74-6d90-4c8b-829c-3e5bb7baa37a"]
427
427
  * }
428
428
  * })
429
429
  */
@@ -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
  */