@pageproof/sdk-pr 383.0.1638411490440 → 383.0.1638413664742
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/lib/api/Comments.d.ts +51 -65
- package/lib/pageproof.js +1 -1
- package/lib/types/Pin.d.ts +33 -0
- package/lib/types/Pin.js +1 -0
- package/package.json +1 -1
package/lib/api/Comments.d.ts
CHANGED
|
@@ -166,18 +166,18 @@ declare class Comments extends API {
|
|
|
166
166
|
load(_options: any): Promise<Comment[]>;
|
|
167
167
|
/**
|
|
168
168
|
* @typedef {object} CreateCommentOptions The options for creating a new comment
|
|
169
|
-
* @property {string} [raw]
|
|
170
|
-
* @property {object} [tokens]
|
|
171
|
-
* @property {string} [proofId]
|
|
172
|
-
* @property {number} [pageNumber]
|
|
173
|
-
* @property {
|
|
174
|
-
* @property {
|
|
175
|
-
* @property {number} [mediaTime]
|
|
176
|
-
* @property {number} [mediaDuration]
|
|
177
|
-
* @property {string} [parentCommentId]
|
|
178
|
-
* @property {object} [metadata]
|
|
179
|
-
* @property {string} [state]
|
|
180
|
-
* @property {string} [creationToken]
|
|
169
|
+
* @property {string} [raw] The comment text (plain text)
|
|
170
|
+
* @property {object} [tokens] The comment tokens (rich text)
|
|
171
|
+
* @property {string} [proofId] The proof ID the comment should be attached to
|
|
172
|
+
* @property {number} [pageNumber=1] For comments (not replies) - the page number the comment was placed on
|
|
173
|
+
* @property {Pin} [pin] For comments (not replies) - the comment's pin coordinates (deprecated: provide an array of pins instead)
|
|
174
|
+
* @property {Pin[]} [pins] For comments (not replies) - the comment's pin(s) coordinates
|
|
175
|
+
* @property {number} [mediaTime] For audio/video proofs - the time (in seconds) that the pin was placed (deprecated: set the time within the pin object)
|
|
176
|
+
* @property {number} [mediaDuration] For audio/video proofs - the duration (in seconds) that the pin spans (deprecated: set the duration within the pin object)
|
|
177
|
+
* @property {string} [parentCommentId] For replies - the parent comment ID
|
|
178
|
+
* @property {object} [metadata] For web proofs - additional metadata relating to the comment snapshot. It is recommended that you do not provide metadata through the SDK currently, as the format for the metadata is not documented (and is subject to change).
|
|
179
|
+
* @property {string} [state] For comments (not replies) - The state of the comment (currently only supports to-dos)
|
|
180
|
+
* @property {string} [creationToken] Only required if you're retrying (token can be extracted from the error object which is resolved (rejected, in this case) from the Promise)
|
|
181
181
|
*/
|
|
182
182
|
/**
|
|
183
183
|
* Creates a new comment (or reply).
|
|
@@ -232,71 +232,57 @@ declare class Comments extends API {
|
|
|
232
232
|
* }
|
|
233
233
|
*
|
|
234
234
|
* @since v2.0.0-beta.46
|
|
235
|
-
* @param {CreateCommentOptions}
|
|
236
|
-
* @param {string} [comment.raw] The raw comment text (rich text is not supported)
|
|
237
|
-
* @param {object} [comment.tokens] The comment tokens (with rich-text support). If you are creating legacy-style comments (just plain text) then use the "raw" option. Please note that while PageProof will continue to support plain text comments for the foreseeable future, it's recommended that you use the new "tokenized" comments.
|
|
238
|
-
* @param {string} comment.proofId The proof id the comment should be attached to
|
|
239
|
-
* @param {number} [comment.pageNumber=1] For comments (not replies) - the page number the comment should be attached to
|
|
240
|
-
* @param {object} [comment.pin] For comments (not replies) - the comment's pin coordinates (deprecated: provide an array of pins instead)
|
|
241
|
-
* @param {number} [comment.pin.x] The pin's x coordinate
|
|
242
|
-
* @param {number} [comment.pin.y] The pin's y coordinate
|
|
243
|
-
* @param {number} [comment.pin.x2] For boxes or lines - the pin's x2 coordinate
|
|
244
|
-
* @param {number} [comment.pin.y2] For boxes or lines - the pin's y2 coordinate
|
|
245
|
-
* @param {string} [comment.pin.fill.image] For pin fill images - the pin's fill image if pin is different then a dot or box type (like draw or text)
|
|
246
|
-
* @param {string} [comment.pin.fill.type] For pin fill images - the pin's fill image type
|
|
247
|
-
* @param {number} [comment.pin.time] For video & audio - the start time
|
|
248
|
-
* @param {number} [comment.pin.duration] For video & audio - the duration
|
|
249
|
-
* @param {object[]} [comment.pins] For comments (not replies) - the comment's pin(s) coordinates
|
|
250
|
-
* @param {number} [comment.pin[].x] The pin's x coordinate
|
|
251
|
-
* @param {number} [comment.pin[].y] The pin's y coordinate
|
|
252
|
-
* @param {number} [comment.pin[].x2] For boxes or lines - the pin's x2 coordinate
|
|
253
|
-
* @param {number} [comment.pin[].y2] For boxes or lines - the pin's y2 coordinate
|
|
254
|
-
* @param {string} [comment.pin[].fill.image] For pin fill images - the pin's fill image if pin is different then a dot or box type (like draw or text)
|
|
255
|
-
* @param {string} [comment.pin[].fill.type] For pin fill images - the pin's fill image type
|
|
256
|
-
* @param {number} [comment.pin[].time] For video & audio - the start time
|
|
257
|
-
* @param {number} [comment.pin[].duration] For video & audio - the duration
|
|
258
|
-
* @param {number} [comment.mediaTime] For video & audio - the start time (deprecated: set the time within the pin object)
|
|
259
|
-
* @param {number} [comment.mediaDuration] For video & audio - the duration (deprecated: set the duration within the pin object)
|
|
260
|
-
* @param {string} [comment.parentCommentId] For replies - the parent comment id
|
|
261
|
-
* @param {object} [comment.metadata] For web proofs - additional metadata relating to the comment snapshot. It is recommended that you do not provide metadata through the SDK currently, as the format for the metadata is not documented (and is subject to change).
|
|
262
|
-
* @param {CommentState} [comment.state] For comments (not replies) - The state of the comment (currently only supports to-dos)
|
|
263
|
-
* @param {string} [comment.creationToken] Only required if you're retrying (token can be extracted from the error object which is resolved (rejected, in this case) from the Promise)
|
|
235
|
+
* @param {CreateCommentOptions} options The creation options
|
|
264
236
|
* @returns {Promise<Comment>}
|
|
265
237
|
*/
|
|
266
238
|
create({ raw, tokens, proofId, pageNumber, pin, pins, mediaTime, mediaDuration, parentCommentId, metadata, state, creationToken: retryCreationToken, }: {
|
|
239
|
+
/**
|
|
240
|
+
* The comment text (plain text)
|
|
241
|
+
*/
|
|
267
242
|
raw?: string;
|
|
243
|
+
/**
|
|
244
|
+
* The comment tokens (rich text)
|
|
245
|
+
*/
|
|
268
246
|
tokens?: any;
|
|
247
|
+
/**
|
|
248
|
+
* The proof ID the comment should be attached to
|
|
249
|
+
*/
|
|
269
250
|
proofId?: string;
|
|
251
|
+
/**
|
|
252
|
+
* For comments (not replies) - the page number the comment was placed on
|
|
253
|
+
*/
|
|
270
254
|
pageNumber?: number;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
};
|
|
283
|
-
pins?: {
|
|
284
|
-
x: number;
|
|
285
|
-
y: number;
|
|
286
|
-
x2: number;
|
|
287
|
-
y2: number;
|
|
288
|
-
time: number;
|
|
289
|
-
duration: number;
|
|
290
|
-
fill: {
|
|
291
|
-
type: string;
|
|
292
|
-
image: string;
|
|
293
|
-
};
|
|
294
|
-
}[];
|
|
255
|
+
/**
|
|
256
|
+
* For comments (not replies) - the comment's pin coordinates (deprecated: provide an array of pins instead)
|
|
257
|
+
*/
|
|
258
|
+
pin?: Pin;
|
|
259
|
+
/**
|
|
260
|
+
* For comments (not replies) - the comment's pin(s) coordinates
|
|
261
|
+
*/
|
|
262
|
+
pins?: Pin[];
|
|
263
|
+
/**
|
|
264
|
+
* For audio/video proofs - the time (in seconds) that the pin was placed (deprecated: set the time within the pin object)
|
|
265
|
+
*/
|
|
295
266
|
mediaTime?: number;
|
|
267
|
+
/**
|
|
268
|
+
* For audio/video proofs - the duration (in seconds) that the pin spans (deprecated: set the duration within the pin object)
|
|
269
|
+
*/
|
|
296
270
|
mediaDuration?: number;
|
|
271
|
+
/**
|
|
272
|
+
* For replies - the parent comment ID
|
|
273
|
+
*/
|
|
297
274
|
parentCommentId?: string;
|
|
275
|
+
/**
|
|
276
|
+
* For web proofs - additional metadata relating to the comment snapshot. It is recommended that you do not provide metadata through the SDK currently, as the format for the metadata is not documented (and is subject to change).
|
|
277
|
+
*/
|
|
298
278
|
metadata?: any;
|
|
279
|
+
/**
|
|
280
|
+
* For comments (not replies) - The state of the comment (currently only supports to-dos)
|
|
281
|
+
*/
|
|
299
282
|
state?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Only required if you're retrying (token can be extracted from the error object which is resolved (rejected, in this case) from the Promise)
|
|
285
|
+
*/
|
|
300
286
|
creationToken?: string;
|
|
301
287
|
}): Promise<Comment>;
|
|
302
288
|
}
|