lucid-extension-sdk 0.0.40 → 0.0.41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "sdk/index.js",
6
6
  "types": "sdk/index.d.ts",
@@ -37,4 +37,41 @@ export declare class ExperimentalLinkUnfurlBlockProxy extends BlockProxy {
37
37
  * @ignore
38
38
  */
39
39
  setThumbnailUrls(thumbnails: string[]): void;
40
+ /**
41
+ * @ignore
42
+ * Initiates the PDF upload for this block. The result includes an uploadUrl which you can use to upload the PDF.
43
+ * The PDF uploaded at that url will be assocaite with this block (and any copy of it) in the editor until it is refreshed.
44
+ * @param options The options for the upload
45
+ */
46
+ experimentalStartPDFUpload(options: LinkUnfurlPDFOptions): Promise<LinkUnfurlPDFResult>;
47
+ }
48
+ /**
49
+ * @ignore
50
+ * Options for starting the PDF upload process for a link unfurl
51
+ */
52
+ export interface LinkUnfurlPDFOptions {
53
+ /**
54
+ * @ignore
55
+ * The anticipated number of pages. If this is defined, this is the number of pages that will show up while the PDF
56
+ * is being processed and converted into images. Once converted, the actual number will take precedence.
57
+ */
58
+ expectedNumberOfPages: number;
59
+ }
60
+ /**
61
+ * @ignore
62
+ * The result of initiating the PDF upload process.
63
+ */
64
+ export interface LinkUnfurlPDFResult {
65
+ /**
66
+ * @ignore
67
+ * A signed URL you can upload the pdf to. You can do this manually (via the client, your own service) or via the
68
+ * oauth proxy.
69
+ */
70
+ uploadUrl: string;
71
+ /**
72
+ * @ignore
73
+ * The internal identifier to the PDF upload which is associated with the block.
74
+ * TODO: Determine if we show this to the extension, or keep internal
75
+ */
76
+ blobId: string;
40
77
  }
@@ -49,6 +49,15 @@ class ExperimentalLinkUnfurlBlockProxy extends blockproxy_1.BlockProxy {
49
49
  setThumbnailUrls(thumbnails) {
50
50
  this.properties.set('LinkUnfurlThumbnailUrls', thumbnails);
51
51
  }
52
+ /**
53
+ * @ignore
54
+ * Initiates the PDF upload for this block. The result includes an uploadUrl which you can use to upload the PDF.
55
+ * The PDF uploaded at that url will be assocaite with this block (and any copy of it) in the editor until it is refreshed.
56
+ * @param options The options for the upload
57
+ */
58
+ experimentalStartPDFUpload(options) {
59
+ throw new Error('Not yet implemented');
60
+ }
52
61
  }
53
62
  exports.ExperimentalLinkUnfurlBlockProxy = ExperimentalLinkUnfurlBlockProxy;
54
63
  ExperimentalLinkUnfurlBlockProxy.classNameRegex = /^LinkUnfurlBlock$/;