@membranehq/sdk 0.17.0 → 0.17.2
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.d.ts +91 -1
- package/dist/bundle.js +22 -17
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +2 -0
- package/dist/dts/accessors/integrations-accessors.d.ts +1 -0
- package/dist/dts/agent/index.d.ts +1 -0
- package/dist/dts/agent/session.d.ts +2 -0
- package/dist/dts/agent/worker-contracts.d.ts +43 -0
- package/dist/dts/client-tokens/index.d.ts +1 -0
- package/dist/dts/client-tokens/types.d.ts +76 -0
- package/dist/dts/client.d.ts +1 -1
- package/dist/dts/index.browser.d.ts +2 -0
- package/dist/dts/oauth/index.d.ts +1 -0
- package/dist/dts/oauth/types.d.ts +15 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +10 -0
- package/dist/dts/workspace-elements/api/actions-api.d.ts +24 -0
- package/dist/dts/workspace-elements/api/connected-products-api.d.ts +83 -0
- package/dist/dts/workspace-elements/api/connections-api.d.ts +5 -0
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +20 -0
- package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-events-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +44 -0
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +6 -0
- package/dist/dts/workspace-elements/api/flows-api.d.ts +20 -0
- package/dist/dts/workspace-elements/api/index.d.ts +1 -0
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +7 -0
- package/dist/dts/workspace-elements/api/packages-api.d.ts +9 -0
- package/dist/dts/workspace-elements/base/action-instances/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/actions/index.d.ts +6 -0
- package/dist/dts/workspace-elements/base/connected-products/index.d.ts +58 -0
- package/dist/dts/workspace-elements/base/connection-requests/index.d.ts +41 -0
- package/dist/dts/workspace-elements/base/connections/index.d.ts +0 -15
- package/dist/dts/workspace-elements/base/connectors/auth-success-records.d.ts +13 -0
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +13 -2
- package/dist/dts/workspace-elements/base/data-sources/index.d.ts +8 -0
- package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +14 -0
- package/dist/dts/workspace-elements/base/flows/index.d.ts +6 -0
- package/dist/dts/workspace-elements/base/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/integrations/index.d.ts +9 -1
- package/dist/dts/workspace-elements/base/packages/index.d.ts +4 -0
- package/dist/dts/workspace-elements/types.d.ts +6 -1
- package/dist/dts/workspaces/compare.d.ts +7 -0
- package/dist/index.browser.d.mts +557 -21
- package/dist/index.browser.d.ts +557 -21
- package/dist/index.browser.js +275 -35
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +229 -36
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +557 -21
- package/dist/index.node.d.ts +557 -21
- package/dist/index.node.js +257 -37
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +229 -37
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -1
package/dist/bundle.js
CHANGED
|
@@ -22161,6 +22161,7 @@
|
|
|
22161
22161
|
WorkspaceElementType["ExternalEventPull"] = "external-event-pull";
|
|
22162
22162
|
WorkspaceElementType["Screen"] = "screen";
|
|
22163
22163
|
WorkspaceElementType["ActionRunLogRecord"] = "action-run-log-record";
|
|
22164
|
+
WorkspaceElementType["ConnectedProduct"] = "connected-product";
|
|
22164
22165
|
})(WorkspaceElementType || (WorkspaceElementType = {}));
|
|
22165
22166
|
var WorkspaceEventType;
|
|
22166
22167
|
(function (WorkspaceEventType) {
|
|
@@ -22230,12 +22231,18 @@
|
|
|
22230
22231
|
integrationUuid: string$1()
|
|
22231
22232
|
.optional()
|
|
22232
22233
|
.describe('UUID of the integration; alternative to integrationId when creating from export. Resolved to integrationId by the API.'),
|
|
22234
|
+
integrationKey: string$1()
|
|
22235
|
+
.optional()
|
|
22236
|
+
.describe('Key of the integration; alternative to integrationId. Resolved to integrationId by the API.'),
|
|
22233
22237
|
parentId: string$1()
|
|
22234
22238
|
.optional()
|
|
22235
22239
|
.describe('Internal ID of the parent workspace element. Used for hierarchy (e.g. integration-level under universal). Child key uniqueness is scoped by parent and integration.'),
|
|
22236
22240
|
parentUuid: string$1()
|
|
22237
22241
|
.optional()
|
|
22238
22242
|
.describe('UUID of the parent element; alternative to parentId when creating (e.g. from export). Resolved to parentId by the API.'),
|
|
22243
|
+
parentKey: string$1()
|
|
22244
|
+
.optional()
|
|
22245
|
+
.describe('Key of the parent element; alternative to parentId. Resolved to parentId by the API.'),
|
|
22239
22246
|
connectionId: string$1()
|
|
22240
22247
|
.optional()
|
|
22241
22248
|
.describe('Connection ID. Used when filtering by connection in list/selector queries, or when creating or identifying connection-level instances.'),
|
|
@@ -22876,7 +22883,7 @@
|
|
|
22876
22883
|
}
|
|
22877
22884
|
}
|
|
22878
22885
|
async function createOrUpdateConnection(options) {
|
|
22879
|
-
const { connectionId, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
|
|
22886
|
+
const { connectionId, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
|
|
22880
22887
|
let connectionType = await detectConnectionType(options);
|
|
22881
22888
|
if (redirectUri) {
|
|
22882
22889
|
connectionType = ConnectionType.REDIRECT;
|
|
@@ -22896,6 +22903,7 @@
|
|
|
22896
22903
|
name,
|
|
22897
22904
|
authOptionKey,
|
|
22898
22905
|
allowMultipleConnections,
|
|
22906
|
+
connectionRequestId,
|
|
22899
22907
|
requestId,
|
|
22900
22908
|
redirectUri,
|
|
22901
22909
|
};
|
|
@@ -22913,6 +22921,7 @@
|
|
|
22913
22921
|
const { stopSSE } = createSSEListener({
|
|
22914
22922
|
apiUri: apiUri,
|
|
22915
22923
|
requestId,
|
|
22924
|
+
token,
|
|
22916
22925
|
handler: eventHandler,
|
|
22917
22926
|
});
|
|
22918
22927
|
function cleanup() {
|
|
@@ -23027,8 +23036,8 @@
|
|
|
23027
23036
|
},
|
|
23028
23037
|
};
|
|
23029
23038
|
};
|
|
23030
|
-
const createSSEListener = ({ apiUri, requestId, handler, }) => {
|
|
23031
|
-
const sseUrl = urljoin(apiUri, '/sse/connection-events', requestId)
|
|
23039
|
+
const createSSEListener = ({ apiUri, requestId, token, handler, }) => {
|
|
23040
|
+
const sseUrl = urljoin(apiUri, '/sse/connection-events', requestId) + `?token=${encodeURIComponent(token)}`;
|
|
23032
23041
|
let eventSource = null;
|
|
23033
23042
|
const closeSseConnection = () => {
|
|
23034
23043
|
eventSource === null || eventSource === void 0 ? void 0 : eventSource.close();
|
|
@@ -23481,14 +23490,6 @@
|
|
|
23481
23490
|
connectorParameters: unknown().optional(),
|
|
23482
23491
|
input: unknown().optional(),
|
|
23483
23492
|
});
|
|
23484
|
-
object({
|
|
23485
|
-
path: any(),
|
|
23486
|
-
method: _enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']).optional(),
|
|
23487
|
-
pathParameters: record(string$1(), string$1()).optional(),
|
|
23488
|
-
headers: record(string$1(), string$1()).optional(),
|
|
23489
|
-
query: record(string$1(), string$1()).optional(),
|
|
23490
|
-
data: any().optional(),
|
|
23491
|
-
});
|
|
23492
23493
|
const BaseConnection = BaseWorkspaceElement.extend({
|
|
23493
23494
|
...TenantLayerElement.shape,
|
|
23494
23495
|
name: string$1(),
|
|
@@ -24487,25 +24488,28 @@
|
|
|
24487
24488
|
hasGlobalWebhooks: boolean$1().optional(),
|
|
24488
24489
|
hasUdm: boolean$1().optional(),
|
|
24489
24490
|
isTest: boolean$1().optional(),
|
|
24490
|
-
|
|
24491
|
+
externalAppId: string$1().optional(),
|
|
24492
|
+
appUuid: string$1().optional().describe('[INTERNAL] Deprecated: Use externalAppId instead'),
|
|
24491
24493
|
isDeactivated: boolean$1().optional(),
|
|
24492
24494
|
authType: _enum(CONNECTOR_AUTH_TYPES).optional(),
|
|
24493
24495
|
optionsConfig: IntegrationOptions.optional(),
|
|
24494
24496
|
});
|
|
24495
|
-
|
|
24497
|
+
BaseMembraneInterfaceEditableProperties.extend({
|
|
24496
24498
|
logoUri: string$1().optional(),
|
|
24497
|
-
|
|
24499
|
+
externalAppId: string$1().optional(),
|
|
24500
|
+
externalAppUuid: string$1().optional(),
|
|
24501
|
+
appUuid: string$1().optional().describe('[INTERNAL] Deprecated: resolved to externalAppId'),
|
|
24498
24502
|
oAuthCallbackUri: url().or(literal('')).optional(),
|
|
24499
24503
|
logoBase64: string$1().optional(),
|
|
24500
24504
|
connectorVersion: string$1().optional(),
|
|
24501
24505
|
connectorId: string$1().optional(),
|
|
24502
24506
|
connectorUuid: string$1().optional(),
|
|
24507
|
+
connectorKey: string$1()
|
|
24508
|
+
.optional()
|
|
24509
|
+
.describe('Key of the connector; alternative to connectorId. Resolved to connectorId by the API.'),
|
|
24503
24510
|
parameters: record(string$1(), any()).optional(),
|
|
24504
24511
|
optionsConfig: IntegrationOptions.optional(),
|
|
24505
24512
|
});
|
|
24506
|
-
IntegrationEditableProperties.extend({
|
|
24507
|
-
connectorUuid: string$1().optional(),
|
|
24508
|
-
});
|
|
24509
24513
|
|
|
24510
24514
|
PaginationQuery.merge(SearchQuery)
|
|
24511
24515
|
.merge(IncludeArchivedQuery)
|
|
@@ -24635,6 +24639,7 @@
|
|
|
24635
24639
|
allowMultipleConnections: boolean$1().optional(),
|
|
24636
24640
|
redirectUri: string$1().optional(),
|
|
24637
24641
|
customState: string$1().optional(),
|
|
24642
|
+
connectionRequestId: string$1().optional(),
|
|
24638
24643
|
});
|
|
24639
24644
|
ConnectPayload.omit({ input: true, redirectUri: true }).extend({
|
|
24640
24645
|
theme: _enum(['light', 'dark', 'auto']).optional(),
|