@membranehq/sdk 0.19.0 → 0.20.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.d.ts +15 -10
- package/dist/bundle.js +14 -2
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +1 -1
- package/dist/dts/accessors/integrations-accessors.d.ts +1 -1
- package/dist/dts/agent/session.d.ts +9 -0
- package/dist/dts/functions/base.d.ts +1 -0
- package/dist/dts/functions/function-types/index.d.ts +2 -2
- package/dist/dts/functions/function-types/rest-api-mapping.d.ts +6 -6
- package/dist/dts/orgs/types.d.ts +1 -0
- package/dist/dts/ui.d.ts +5 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +2 -2
- package/dist/dts/workspace-elements/api/connections-api.d.ts +3 -3
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +2 -2
- package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +2 -2
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +2 -2
- package/dist/dts/workspace-elements/api/flows-api.d.ts +2 -2
- package/dist/dts/workspace-elements/api/incoming-webhooks-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +1 -1
- package/dist/dts/workspace-elements/base/connection-requests/index.d.ts +8 -1
- package/dist/dts/workspace-elements/base/connections/index.d.ts +1 -1
- package/dist/dts/workspaces/types.d.ts +2 -0
- package/dist/index.browser.d.mts +58 -33
- package/dist/index.browser.d.ts +58 -33
- package/dist/index.browser.js +62 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +59 -7
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +58 -33
- package/dist/index.node.d.ts +58 -33
- package/dist/index.node.js +62 -6
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +59 -7
- package/dist/index.node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.d.ts
CHANGED
|
@@ -434,7 +434,7 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
434
434
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
435
435
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
436
436
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
437
|
-
|
|
437
|
+
buildingAgentSessionId: z.ZodOptional<z.ZodString>;
|
|
438
438
|
clientAction: z.ZodOptional<z.ZodObject<{
|
|
439
439
|
type: z.ZodEnum<{
|
|
440
440
|
connect: "connect";
|
|
@@ -3494,7 +3494,7 @@ declare const FlowRunApiResponse: z.ZodObject<{
|
|
|
3494
3494
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3495
3495
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3496
3496
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
3497
|
-
|
|
3497
|
+
buildingAgentSessionId: z.ZodOptional<z.ZodString>;
|
|
3498
3498
|
clientAction: z.ZodOptional<z.ZodObject<{
|
|
3499
3499
|
type: z.ZodEnum<{
|
|
3500
3500
|
connect: "connect";
|
|
@@ -3694,7 +3694,7 @@ declare const FindFlowRunsResponse: z.ZodObject<{
|
|
|
3694
3694
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
3695
3695
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
3696
3696
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
3697
|
-
|
|
3697
|
+
buildingAgentSessionId: z.ZodOptional<z.ZodString>;
|
|
3698
3698
|
clientAction: z.ZodOptional<z.ZodObject<{
|
|
3699
3699
|
type: z.ZodEnum<{
|
|
3700
3700
|
connect: "connect";
|
|
@@ -4043,7 +4043,7 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
4043
4043
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4044
4044
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
4045
4045
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4046
|
-
|
|
4046
|
+
buildingAgentSessionId: z.ZodOptional<z.ZodString>;
|
|
4047
4047
|
clientAction: z.ZodOptional<z.ZodObject<{
|
|
4048
4048
|
type: z.ZodEnum<{
|
|
4049
4049
|
connect: "connect";
|
|
@@ -4723,7 +4723,7 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4723
4723
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
4724
4724
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
4725
4725
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4726
|
-
|
|
4726
|
+
buildingAgentSessionId: z.ZodOptional<z.ZodString>;
|
|
4727
4727
|
clientAction: z.ZodOptional<z.ZodObject<{
|
|
4728
4728
|
type: z.ZodEnum<{
|
|
4729
4729
|
connect: "connect";
|
|
@@ -5142,7 +5142,7 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
5142
5142
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5143
5143
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5144
5144
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
5145
|
-
|
|
5145
|
+
buildingAgentSessionId: z.ZodOptional<z.ZodString>;
|
|
5146
5146
|
clientAction: z.ZodOptional<z.ZodObject<{
|
|
5147
5147
|
type: z.ZodEnum<{
|
|
5148
5148
|
connect: "connect";
|
|
@@ -5645,7 +5645,7 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5645
5645
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
5646
5646
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
5647
5647
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
5648
|
-
|
|
5648
|
+
buildingAgentSessionId: z.ZodOptional<z.ZodString>;
|
|
5649
5649
|
clientAction: z.ZodOptional<z.ZodObject<{
|
|
5650
5650
|
type: z.ZodEnum<{
|
|
5651
5651
|
connect: "connect";
|
|
@@ -6201,7 +6201,7 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
6201
6201
|
archivedAt: z.ZodOptional<z.ZodString>;
|
|
6202
6202
|
isDeactivated: z.ZodOptional<z.ZodBoolean>;
|
|
6203
6203
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
6204
|
-
|
|
6204
|
+
buildingAgentSessionId: z.ZodOptional<z.ZodString>;
|
|
6205
6205
|
clientAction: z.ZodOptional<z.ZodObject<{
|
|
6206
6206
|
type: z.ZodEnum<{
|
|
6207
6207
|
connect: "connect";
|
|
@@ -6447,7 +6447,7 @@ declare class ConnectionAccessor {
|
|
|
6447
6447
|
archivedAt?: string | undefined;
|
|
6448
6448
|
isDeactivated?: boolean | undefined;
|
|
6449
6449
|
meta?: Record<string, any> | undefined;
|
|
6450
|
-
|
|
6450
|
+
buildingAgentSessionId?: string | undefined;
|
|
6451
6451
|
clientAction?: {
|
|
6452
6452
|
type: "connect" | "provide-input";
|
|
6453
6453
|
description: string;
|
|
@@ -6680,7 +6680,7 @@ declare class IntegrationAccessor extends ElementAccessor<IntegrationApiResponse
|
|
|
6680
6680
|
archivedAt?: string | undefined;
|
|
6681
6681
|
isDeactivated?: boolean | undefined;
|
|
6682
6682
|
meta?: Record<string, any> | undefined;
|
|
6683
|
-
|
|
6683
|
+
buildingAgentSessionId?: string | undefined;
|
|
6684
6684
|
clientAction?: {
|
|
6685
6685
|
type: "connect" | "provide-input";
|
|
6686
6686
|
description: string;
|
|
@@ -6862,6 +6862,10 @@ declare class SelfAccessor {
|
|
|
6862
6862
|
}>): Promise<CustomerApiResponse>;
|
|
6863
6863
|
}
|
|
6864
6864
|
|
|
6865
|
+
interface ConnectionUIOptions {
|
|
6866
|
+
connectionId: string;
|
|
6867
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
6868
|
+
}
|
|
6865
6869
|
interface UNSAFE_AgentSessionUIOptions {
|
|
6866
6870
|
sessionId: string;
|
|
6867
6871
|
theme?: 'light' | 'dark' | 'auto';
|
|
@@ -6870,6 +6874,7 @@ declare class UI {
|
|
|
6870
6874
|
private client;
|
|
6871
6875
|
constructor(client: MembraneApiClient);
|
|
6872
6876
|
connect(options?: ConnectUIOptions): Promise<ConnectionApiResponse | null>;
|
|
6877
|
+
connection(options: ConnectionUIOptions): Promise<ConnectionApiResponse | null>;
|
|
6873
6878
|
UNSAFE_agentSession(options: UNSAFE_AgentSessionUIOptions): Promise<void>;
|
|
6874
6879
|
}
|
|
6875
6880
|
|
package/dist/bundle.js
CHANGED
|
@@ -28410,9 +28410,9 @@
|
|
|
28410
28410
|
archivedAt: string$1().optional(),
|
|
28411
28411
|
isDeactivated: boolean$1().optional(),
|
|
28412
28412
|
meta: record(string$1(), any()).optional(),
|
|
28413
|
-
|
|
28413
|
+
buildingAgentSessionId: string$1()
|
|
28414
28414
|
.optional()
|
|
28415
|
-
.describe('ID
|
|
28415
|
+
.describe('Session ID for building the element via intent-based endpoints (create/update with intent). Present when state is BUILDING.'),
|
|
28416
28416
|
clientAction: ConnectionClientAction.optional().describe('Action the client must perform to advance this connection. Present if and only if state is CLIENT_ACTION_REQUIRED.'),
|
|
28417
28417
|
});
|
|
28418
28418
|
|
|
@@ -29585,6 +29585,18 @@
|
|
|
29585
29585
|
});
|
|
29586
29586
|
});
|
|
29587
29587
|
}
|
|
29588
|
+
async connection(options) {
|
|
29589
|
+
const { url, postData } = await this.client.getScreensPostData('connection', {
|
|
29590
|
+
connectionId: options.connectionId,
|
|
29591
|
+
theme: options.theme,
|
|
29592
|
+
});
|
|
29593
|
+
return new Promise((resolve) => {
|
|
29594
|
+
return openIframeWithPost(url, postData, {
|
|
29595
|
+
onClose: () => resolve(null),
|
|
29596
|
+
onSuccess: (connection) => resolve(connection),
|
|
29597
|
+
});
|
|
29598
|
+
});
|
|
29599
|
+
}
|
|
29588
29600
|
async UNSAFE_agentSession(options) {
|
|
29589
29601
|
const { url, postData } = await this.client.getScreensPostData('agent-session', {
|
|
29590
29602
|
sessionId: options.sessionId,
|