lucid-extension-sdk 0.0.54 → 0.0.55
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
package/sdk/commandtypes.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export declare const enum CommandName {
|
|
|
90
90
|
ShowPanel = "spn",
|
|
91
91
|
SleepForTestCase = "sleep",
|
|
92
92
|
StartDragBlockToCanvas = "sdc",
|
|
93
|
+
StartPDFUploadRequest = "pdf",
|
|
93
94
|
ThrowForTestCase = "throw",
|
|
94
95
|
UnhookCreateItems = "uci",
|
|
95
96
|
UnhookSelection = "us",
|
|
@@ -395,6 +396,10 @@ export declare type CommandArgs = {
|
|
|
395
396
|
query: StartDragBlockToCanvasQuery;
|
|
396
397
|
result: StartDragBlockToCanvasResult;
|
|
397
398
|
};
|
|
399
|
+
[CommandName.StartPDFUploadRequest]: {
|
|
400
|
+
query: StartPDFUploadRequestQuery;
|
|
401
|
+
result: StartPDFUploadRequestResponse;
|
|
402
|
+
};
|
|
398
403
|
[CommandName.ThrowForTestCase]: {
|
|
399
404
|
query: ThrowForTestCaseQuery;
|
|
400
405
|
result: ThrowForTestCaseResult;
|
|
@@ -993,6 +998,13 @@ export declare type StartDragBlockToCanvasQuery = {
|
|
|
993
998
|
's'?: JsonSerializable | undefined;
|
|
994
999
|
};
|
|
995
1000
|
export declare type StartDragBlockToCanvasResult = Promise<string | undefined>;
|
|
1001
|
+
export declare type StartPDFUploadRequestQuery = string;
|
|
1002
|
+
/**
|
|
1003
|
+
* @ignore
|
|
1004
|
+
* A signed URL you can upload the pdf to. You can do this manually (via the client, your own service) or via the
|
|
1005
|
+
* oauth proxy.
|
|
1006
|
+
*/
|
|
1007
|
+
export declare type StartPDFUploadRequestResponse = Promise<string>;
|
|
996
1008
|
export declare type ThrowForTestCaseQuery = number;
|
|
997
1009
|
export declare type ThrowForTestCaseResult = undefined | Promise<void>;
|
|
998
1010
|
export declare type UnhookCreateItemsQuery = {
|
package/sdk/commandtypes.js
CHANGED
|
@@ -74,6 +74,7 @@ exports.commandTitles = new Map([
|
|
|
74
74
|
["spn" /* CommandName.ShowPanel */, 'ShowPanel'],
|
|
75
75
|
["sleep" /* CommandName.SleepForTestCase */, 'SleepForTestCase'],
|
|
76
76
|
["sdc" /* CommandName.StartDragBlockToCanvas */, 'StartDragBlockToCanvas'],
|
|
77
|
+
["pdf" /* CommandName.StartPDFUploadRequest */, 'StartPDFUploadRequest'],
|
|
77
78
|
["throw" /* CommandName.ThrowForTestCase */, 'ThrowForTestCase'],
|
|
78
79
|
["uci" /* CommandName.UnhookCreateItems */, 'UnhookCreateItems'],
|
|
79
80
|
["us" /* CommandName.UnhookSelection */, 'UnhookSelection'],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StartPDFUploadRequestResponse } from '../../commandtypes';
|
|
1
2
|
import { UnfurlIframe } from '../../core/unfurl/unfurliframe';
|
|
2
3
|
import { BlockProxy } from '../blockproxy';
|
|
3
4
|
/**
|
|
@@ -50,7 +51,7 @@ export declare class ExperimentalLinkUnfurlBlockProxy extends BlockProxy {
|
|
|
50
51
|
* The PDF uploaded at that url will be assocaite with this block (and any copy of it) in the editor until it is refreshed.
|
|
51
52
|
* @param options The options for the upload
|
|
52
53
|
*/
|
|
53
|
-
experimentalStartPDFUpload(options: LinkUnfurlPDFOptions): Promise<
|
|
54
|
+
experimentalStartPDFUpload(options: LinkUnfurlPDFOptions): Promise<StartPDFUploadRequestResponse>;
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
57
|
* @ignore
|
|
@@ -64,21 +65,3 @@ export interface LinkUnfurlPDFOptions {
|
|
|
64
65
|
*/
|
|
65
66
|
expectedNumberOfPages: number;
|
|
66
67
|
}
|
|
67
|
-
/**
|
|
68
|
-
* @ignore
|
|
69
|
-
* The result of initiating the PDF upload process.
|
|
70
|
-
*/
|
|
71
|
-
export interface LinkUnfurlPDFResult {
|
|
72
|
-
/**
|
|
73
|
-
* @ignore
|
|
74
|
-
* A signed URL you can upload the pdf to. You can do this manually (via the client, your own service) or via the
|
|
75
|
-
* oauth proxy.
|
|
76
|
-
*/
|
|
77
|
-
uploadUrl: string;
|
|
78
|
-
/**
|
|
79
|
-
* @ignore
|
|
80
|
-
* The internal identifier to the PDF upload which is associated with the block.
|
|
81
|
-
* TODO: Determine if we show this to the extension, or keep internal
|
|
82
|
-
*/
|
|
83
|
-
blobId: string;
|
|
84
|
-
}
|
|
@@ -73,8 +73,9 @@ class ExperimentalLinkUnfurlBlockProxy extends blockproxy_1.BlockProxy {
|
|
|
73
73
|
* The PDF uploaded at that url will be assocaite with this block (and any copy of it) in the editor until it is refreshed.
|
|
74
74
|
* @param options The options for the upload
|
|
75
75
|
*/
|
|
76
|
-
experimentalStartPDFUpload(options) {
|
|
77
|
-
|
|
76
|
+
async experimentalStartPDFUpload(options) {
|
|
77
|
+
const result = await this.client.sendCommand("pdf" /* CommandName.StartPDFUploadRequest */, this.id);
|
|
78
|
+
return result;
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
exports.ExperimentalLinkUnfurlBlockProxy = ExperimentalLinkUnfurlBlockProxy;
|