lucid-extension-sdk 0.0.333 → 0.0.334

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.
@@ -13,6 +13,8 @@ export declare class DataConnectorActionContext {
13
13
  packageVersion: string;
14
14
  /** The authorized OAuth2 credential that Lucid has for the 3rd party this extension works with */
15
15
  userCredential: string;
16
+ /** @ignore Boolean indicating whether to use a proxy server when making a request to third party */
17
+ useOutboundProxy: boolean | undefined;
16
18
  /** The data connector name from manifest.json that triggered this action */
17
19
  dataConnectorName: string;
18
20
  /** The installation id of the extension/user that triggered this action */
@@ -32,6 +34,8 @@ export declare class DataConnectorActionContext {
32
34
  packageVersion: string,
33
35
  /** The authorized OAuth2 credential that Lucid has for the 3rd party this extension works with */
34
36
  userCredential: string,
37
+ /** @ignore Boolean indicating whether to use a proxy server when making a request to third party */
38
+ useOutboundProxy: boolean | undefined,
35
39
  /** The data connector name from manifest.json that triggered this action */
36
40
  dataConnectorName: string,
37
41
  /** The installation id of the extension/user that triggered this action */
@@ -13,6 +13,8 @@ class DataConnectorActionContext {
13
13
  packageVersion,
14
14
  /** The authorized OAuth2 credential that Lucid has for the 3rd party this extension works with */
15
15
  userCredential,
16
+ /** @ignore Boolean indicating whether to use a proxy server when making a request to third party */
17
+ useOutboundProxy,
16
18
  /** The data connector name from manifest.json that triggered this action */
17
19
  dataConnectorName,
18
20
  /** The installation id of the extension/user that triggered this action */
@@ -26,6 +28,7 @@ class DataConnectorActionContext {
26
28
  this.packageId = packageId;
27
29
  this.packageVersion = packageVersion;
28
30
  this.userCredential = userCredential;
31
+ this.useOutboundProxy = useOutboundProxy;
29
32
  this.dataConnectorName = dataConnectorName;
30
33
  this.installationId = installationId;
31
34
  this.documentCollections = documentCollections;
@@ -17,6 +17,7 @@ const serializedActionsBaseValidator = (0, validators_1.objectValidator)({
17
17
  dataConnectorName: checks_1.isString,
18
18
  installationId: (0, validators_1.nullableOption)(checks_1.isString),
19
19
  userCredential: (0, validators_1.nullableOption)(checks_1.isString),
20
+ useOutboundProxy: (0, validators_1.option)(checks_1.isBoolean),
20
21
  documentUpdateToken: (0, validators_1.nullableOption)(checks_1.isString),
21
22
  documentCollections: (0, validators_1.objectOfValidator)((0, validators_1.arrayValidator)(checks_1.isString)),
22
23
  updateFilterType: (0, validators_1.enumValidator)(dataupdatefiltertype_1.DataUpdateFilterType),
@@ -29,6 +30,7 @@ const serializedPatchDataValidator = (0, validators_1.objectValidator)({
29
30
  id: checks_1.isString,
30
31
  })),
31
32
  userCredential: checks_1.isString,
33
+ useOutboundProxy: (0, validators_1.option)(checks_1.isBoolean),
32
34
  documentUpdateToken: checks_1.isString,
33
35
  timezone: (0, validators_1.nullableOption)(checks_1.isString),
34
36
  });
@@ -62,7 +64,8 @@ function deserializeActions(client, actions, patchParser) {
62
64
  }
63
65
  const parsedData = data
64
66
  .map((item) => {
65
- const context = new action_1.DataConnectorActionContext(parsedActions['packageId'], item['packageVersion'], item['userCredential'], parsedActions['dataConnectorName'], parsedActions['dataConnectorName'], parsedActions['documentCollections'], parsedActions['updateFilterType'], parsedActions['timezone']);
67
+ const context = new action_1.DataConnectorActionContext(parsedActions['packageId'], item['packageVersion'], item['userCredential'], item['useOutboundProxy'], // Use from action data and ignores the useOutboundProxy boolean in parsedActions
68
+ parsedActions['dataConnectorName'], parsedActions['dataConnectorName'], parsedActions['documentCollections'], parsedActions['updateFilterType'], parsedActions['timezone']);
66
69
  const patches = parseSerializedPatches(item['patches'], patchParser);
67
70
  if (patches.length < item['patches'].length) {
68
71
  return undefined;
@@ -84,7 +87,7 @@ function deserializeActions(client, actions, patchParser) {
84
87
  if (!serializedPatchDataValidator(data)) {
85
88
  return;
86
89
  }
87
- const context = new action_1.DataConnectorActionContext(parsedActions['packageId'], parsedActions['packageVersion'], parsedActions['userCredential'], parsedActions['dataConnectorName'], parsedActions['dataConnectorName'], parsedActions['documentCollections'], parsedActions['updateFilterType'], parsedActions['timezone']);
90
+ const context = new action_1.DataConnectorActionContext(parsedActions['packageId'], parsedActions['packageVersion'], parsedActions['userCredential'], parsedActions['useOutboundProxy'], parsedActions['dataConnectorName'], parsedActions['dataConnectorName'], parsedActions['documentCollections'], parsedActions['updateFilterType'], parsedActions['timezone']);
88
91
  const parsedPatches = parseSerializedPatches(data['patches'], patchParser);
89
92
  if (parsedPatches.length < data['patches'].length) {
90
93
  console.log(`Failing validation step`);
@@ -94,7 +97,7 @@ function deserializeActions(client, actions, patchParser) {
94
97
  new action_1.DataConnectorPatchAction(context, parsedPatches, client.getDataSourceClient(data['documentUpdateToken']), dataconnectoractionkeys_1.DataConnectorActionKeys.UnbatchedPatch),
95
98
  ];
96
99
  }
97
- const context = new action_1.DataConnectorActionContext(parsedActions['packageId'], parsedActions['packageVersion'], parsedActions['userCredential'], parsedActions['dataConnectorName'], parsedActions['dataConnectorName'], parsedActions['documentCollections'], parsedActions['updateFilterType'], parsedActions['timezone']);
100
+ const context = new action_1.DataConnectorActionContext(parsedActions['packageId'], parsedActions['packageVersion'], parsedActions['userCredential'], parsedActions['useOutboundProxy'], parsedActions['dataConnectorName'], parsedActions['dataConnectorName'], parsedActions['documentCollections'], parsedActions['updateFilterType'], parsedActions['timezone']);
98
101
  if (name == 'ManageWebhook') {
99
102
  if (!serializedManageWebhookDataValidator(data)) {
100
103
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.333",
3
+ "version": "0.0.334",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",