@membranehq/sdk 0.21.0 → 0.22.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.
- package/dist/bundle.js +5 -6
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +0 -1
- package/dist/dts/accessors/connections-accessors.test.d.ts +1 -0
- package/dist/dts/workspace-elements/base/integrations/index.d.ts +0 -1
- package/dist/index.browser.d.mts +0 -2
- package/dist/index.browser.d.ts +0 -2
- package/dist/index.browser.js +5 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +5 -6
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +0 -2
- package/dist/index.node.d.ts +0 -2
- package/dist/index.node.js +5 -6
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +5 -6
- package/dist/index.node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -22816,7 +22816,6 @@
|
|
|
22816
22816
|
authOptionKey,
|
|
22817
22817
|
connectorParameters,
|
|
22818
22818
|
apiUri: this.client.apiUri,
|
|
22819
|
-
token: await this.client.getToken(),
|
|
22820
22819
|
onPopupClosed,
|
|
22821
22820
|
});
|
|
22822
22821
|
}
|
|
@@ -22906,16 +22905,17 @@
|
|
|
22906
22905
|
}
|
|
22907
22906
|
}
|
|
22908
22907
|
async function createOrUpdateConnection(options) {
|
|
22909
|
-
const { connectionId, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri,
|
|
22908
|
+
const { client, connectionId, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
|
|
22910
22909
|
let connectionType = await detectConnectionType(options);
|
|
22911
22910
|
if (redirectUri) {
|
|
22912
22911
|
connectionType = ConnectionType.REDIRECT;
|
|
22913
22912
|
}
|
|
22913
|
+
const freshToken = await client.getToken();
|
|
22914
22914
|
const connectPath = 'connect';
|
|
22915
22915
|
return new Promise((resolve, reject) => {
|
|
22916
22916
|
const requestId = simpleUniqueId() + simpleUniqueId();
|
|
22917
22917
|
const payload = {
|
|
22918
|
-
token,
|
|
22918
|
+
token: freshToken,
|
|
22919
22919
|
input,
|
|
22920
22920
|
connectorParameters,
|
|
22921
22921
|
integrationKey,
|
|
@@ -22944,7 +22944,7 @@
|
|
|
22944
22944
|
const { stopSSE } = createSSEListener({
|
|
22945
22945
|
apiUri: apiUri,
|
|
22946
22946
|
requestId,
|
|
22947
|
-
token,
|
|
22947
|
+
token: freshToken,
|
|
22948
22948
|
handler: eventHandler,
|
|
22949
22949
|
});
|
|
22950
22950
|
function cleanup() {
|
|
@@ -23248,7 +23248,6 @@
|
|
|
23248
23248
|
authOptionKey,
|
|
23249
23249
|
allowMultipleConnections,
|
|
23250
23250
|
apiUri: this.client.apiUri,
|
|
23251
|
-
token: await this.client.getToken(),
|
|
23252
23251
|
redirectUri: sameWindow ? redirectUri : undefined,
|
|
23253
23252
|
onPopupClosed,
|
|
23254
23253
|
});
|
|
@@ -29414,6 +29413,7 @@
|
|
|
29414
29413
|
IntegrationEditableProperties.omit({
|
|
29415
29414
|
connectorId: true,
|
|
29416
29415
|
externalAppId: true,
|
|
29416
|
+
parameters: true,
|
|
29417
29417
|
});
|
|
29418
29418
|
|
|
29419
29419
|
PaginationQuery.merge(SearchQuery)
|
|
@@ -29715,7 +29715,6 @@
|
|
|
29715
29715
|
...options,
|
|
29716
29716
|
client: this,
|
|
29717
29717
|
apiUri: this.apiUri,
|
|
29718
|
-
token: await this.getToken(),
|
|
29719
29718
|
redirectUri: options.sameWindow ? options.redirectUri : undefined,
|
|
29720
29719
|
});
|
|
29721
29720
|
}
|