@membranehq/sdk 0.28.2 → 0.29.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 +49 -2
- package/dist/bundle.js +1899 -1388
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connection-events-listener.d.ts +14 -0
- package/dist/dts/accessors/connection-events-listener.test.d.ts +1 -0
- package/dist/dts/accessors/connections-accessors.d.ts +6 -1
- package/dist/dts/accessors/integrations-accessors.d.ts +3 -0
- package/dist/dts/agent/session.d.ts +1 -0
- package/dist/dts/agent/worker-contracts.d.ts +2 -1
- package/dist/dts/ai-gateway/models.d.ts +4 -0
- package/dist/dts/api-version.generated.d.ts +1 -1
- package/dist/dts/async-requests/types.d.ts +50 -0
- package/dist/dts/deprecation.d.ts +1 -0
- package/dist/dts/errors/index.d.ts +5 -1
- package/dist/dts/index.browser.d.ts +2 -1
- package/dist/dts/membrane-instances/types.d.ts +4 -0
- package/dist/dts/oauth/types.d.ts +14 -5
- package/dist/dts/orgs/types.d.ts +682 -50
- package/dist/dts/orgs/types.test.d.ts +1 -0
- package/dist/dts/platform-user-tokens/types.d.ts +42 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +32 -72
- package/dist/dts/workspace-elements/api/checkpoints-api.d.ts +0 -1
- package/dist/dts/workspace-elements/api/connections-api.d.ts +30 -3
- package/dist/dts/workspace-elements/api/connectors-api.d.ts +10 -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 +2 -0
- package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-apps-api.d.ts +28 -0
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +5 -0
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +3 -0
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +13 -0
- package/dist/dts/workspace-elements/api/external-event-types-api.d.ts +331 -0
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/flows-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/incoming-webhooks-api.d.ts +4 -0
- package/dist/dts/workspace-elements/api/index.d.ts +1 -0
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +14 -7
- package/dist/dts/workspace-elements/base/action-run-log-records/index.d.ts +19 -0
- package/dist/dts/workspace-elements/base/actions/action-payload.d.ts +46 -0
- package/dist/dts/workspace-elements/base/actions/action-payload.test.d.ts +1 -0
- package/dist/dts/workspace-elements/base/actions/index.d.ts +3 -2
- package/dist/dts/workspace-elements/base/app-data-schemas/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/app-event-types/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/connection-requests/index.d.ts +4 -0
- package/dist/dts/workspace-elements/base/connections/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +5 -5
- package/dist/dts/workspace-elements/base/data-link-tables/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/data-sources/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/external-event-log-records/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/external-event-subscriptions/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/external-event-types/index.d.ts +190 -0
- package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/flows/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/integrations/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/packages/index.d.ts +2 -2
- package/dist/dts/workspace-elements/types.d.ts +11 -2
- package/dist/dts/workspace-tokens/index.d.ts +1 -0
- package/dist/dts/{client-tokens → workspace-tokens}/types.d.ts +35 -22
- package/dist/dts/workspaces/api.d.ts +0 -6
- package/dist/dts/workspaces/compare.d.ts +4 -1
- package/dist/index.browser.d.mts +2279 -847
- package/dist/index.browser.d.ts +2279 -847
- package/dist/index.browser.js +692 -196
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +653 -190
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +2279 -847
- package/dist/index.node.d.ts +2279 -847
- package/dist/index.node.js +692 -196
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +653 -190
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -2
- /package/dist/dts/{client-tokens → platform-user-tokens}/index.d.ts +0 -0
package/dist/bundle.d.ts
CHANGED
|
@@ -109,6 +109,19 @@ interface ErrorDataSchema {
|
|
|
109
109
|
logs?: any[];
|
|
110
110
|
}
|
|
111
111
|
declare const ErrorDataSchema: z.ZodType<ErrorDataSchema>;
|
|
112
|
+
interface ErrorDataFields extends z.infer<typeof ErrorDataSchema> {
|
|
113
|
+
}
|
|
114
|
+
type ErrorConstructorArg = string | ErrorDataFields | Error;
|
|
115
|
+
declare class ErrorData implements ErrorDataFields {
|
|
116
|
+
constructor(arg: ErrorConstructorArg);
|
|
117
|
+
}
|
|
118
|
+
interface ErrorData extends ErrorDataFields {
|
|
119
|
+
}
|
|
120
|
+
declare class MembraneError extends Error {
|
|
121
|
+
isMembraneError: true;
|
|
122
|
+
data: ErrorData;
|
|
123
|
+
constructor(arg: ErrorConstructorArg);
|
|
124
|
+
}
|
|
112
125
|
|
|
113
126
|
declare enum WorkspaceElementType {
|
|
114
127
|
Customer = "customer",
|
|
@@ -136,6 +149,7 @@ declare enum WorkspaceElementType {
|
|
|
136
149
|
ExternalEventSubscription = "external-event-subscription",
|
|
137
150
|
ExternalEventLogRecord = "external-event-log-record",
|
|
138
151
|
ExternalEventPull = "external-event-pull",
|
|
152
|
+
ExternalEventType = "external-event-type",
|
|
139
153
|
Screen = "screen",
|
|
140
154
|
ActionRunLogRecord = "action-run-log-record",
|
|
141
155
|
ExternalApiLogRecord = "external-api-log-record",
|
|
@@ -470,6 +484,7 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
470
484
|
description: z.ZodString;
|
|
471
485
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
472
486
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
487
|
+
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
473
488
|
}, z.core.$strip>>;
|
|
474
489
|
userId: z.ZodString;
|
|
475
490
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -534,6 +549,8 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
534
549
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
535
550
|
}, z.core.$strip>>>;
|
|
536
551
|
}, z.core.$strip>>;
|
|
552
|
+
connectorParameters: z.ZodOptional<z.ZodUnknown>;
|
|
553
|
+
input: z.ZodOptional<z.ZodUnknown>;
|
|
537
554
|
}, z.core.$strip>;
|
|
538
555
|
type ConnectionApiResponse = z.infer<typeof ConnectionApiResponse>;
|
|
539
556
|
declare const ConnectPayload: z.ZodObject<{
|
|
@@ -543,6 +560,8 @@ declare const ConnectPayload: z.ZodObject<{
|
|
|
543
560
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
544
561
|
connectorKey: z.ZodOptional<z.ZodString>;
|
|
545
562
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
563
|
+
externalAppId: z.ZodOptional<z.ZodString>;
|
|
564
|
+
externalAppKey: z.ZodOptional<z.ZodString>;
|
|
546
565
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
547
566
|
connectionKey: z.ZodOptional<z.ZodString>;
|
|
548
567
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -563,6 +582,8 @@ declare const ConnectUIOptions: z.ZodObject<{
|
|
|
563
582
|
integrationKey: z.ZodOptional<z.ZodString>;
|
|
564
583
|
name: z.ZodOptional<z.ZodString>;
|
|
565
584
|
intent: z.ZodOptional<z.ZodString>;
|
|
585
|
+
externalAppId: z.ZodOptional<z.ZodString>;
|
|
586
|
+
externalAppKey: z.ZodOptional<z.ZodString>;
|
|
566
587
|
connectionKey: z.ZodOptional<z.ZodString>;
|
|
567
588
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
568
589
|
connectorParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -581,8 +602,14 @@ declare const ConnectUIOptions: z.ZodObject<{
|
|
|
581
602
|
}>>;
|
|
582
603
|
}, z.core.$strip>;
|
|
583
604
|
type ConnectUIOptions = z.infer<typeof ConnectUIOptions>;
|
|
605
|
+
interface LateConnectionEvents {
|
|
606
|
+
onConnection?: (connection: ConnectionApiResponse) => void;
|
|
607
|
+
onFailure?: (error: MembraneError) => void;
|
|
608
|
+
signal?: AbortSignal;
|
|
609
|
+
}
|
|
584
610
|
type ConnectOptions = ConnectPayload & {
|
|
585
611
|
onPopupClosed?: () => void;
|
|
612
|
+
lateEvents?: LateConnectionEvents;
|
|
586
613
|
sameWindow?: boolean;
|
|
587
614
|
};
|
|
588
615
|
|
|
@@ -3694,6 +3721,7 @@ declare const FlowRunApiResponse: z.ZodObject<{
|
|
|
3694
3721
|
description: z.ZodString;
|
|
3695
3722
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
3696
3723
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
3724
|
+
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
3697
3725
|
}, z.core.$strip>>;
|
|
3698
3726
|
userId: z.ZodString;
|
|
3699
3727
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -3899,6 +3927,7 @@ declare const FindFlowRunsResponse: z.ZodObject<{
|
|
|
3899
3927
|
description: z.ZodString;
|
|
3900
3928
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
3901
3929
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
3930
|
+
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
3902
3931
|
}, z.core.$strip>>;
|
|
3903
3932
|
userId: z.ZodString;
|
|
3904
3933
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -4254,6 +4283,7 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
4254
4283
|
description: z.ZodString;
|
|
4255
4284
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
4256
4285
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
4286
|
+
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
4257
4287
|
}, z.core.$strip>>;
|
|
4258
4288
|
userId: z.ZodString;
|
|
4259
4289
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -4940,6 +4970,7 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4940
4970
|
description: z.ZodString;
|
|
4941
4971
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
4942
4972
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
4973
|
+
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
4943
4974
|
}, z.core.$strip>>;
|
|
4944
4975
|
userId: z.ZodString;
|
|
4945
4976
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -5244,6 +5275,7 @@ declare const CreateIntegrationRequest: z.ZodObject<{
|
|
|
5244
5275
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5245
5276
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
5246
5277
|
}, z.core.$strip>>>;
|
|
5278
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
5247
5279
|
}, z.core.$strip>;
|
|
5248
5280
|
type CreateIntegrationRequest = z.infer<typeof CreateIntegrationRequest>;
|
|
5249
5281
|
declare const UpdateIntegrationRequest: z.ZodObject<{
|
|
@@ -5274,6 +5306,7 @@ declare const FindIntegrationsQuery: z.ZodObject<{
|
|
|
5274
5306
|
connectors: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
5275
5307
|
externalApps: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
5276
5308
|
websearch: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
5309
|
+
all: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
5277
5310
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
5278
5311
|
cursor: z.ZodOptional<z.ZodString>;
|
|
5279
5312
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -5286,7 +5319,6 @@ interface OpenNewConnectionOptions extends OpenConfigurationOptions {
|
|
|
5286
5319
|
connectorParameters?: any;
|
|
5287
5320
|
}
|
|
5288
5321
|
declare const IntegrationApiResponse: z.ZodObject<{
|
|
5289
|
-
id: z.ZodString;
|
|
5290
5322
|
uuid: z.ZodOptional<z.ZodString>;
|
|
5291
5323
|
key: z.ZodOptional<z.ZodString>;
|
|
5292
5324
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -5298,7 +5330,6 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
5298
5330
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
5299
5331
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
5300
5332
|
isReadOnly: z.ZodOptional<z.ZodBoolean>;
|
|
5301
|
-
logoUri: z.ZodString;
|
|
5302
5333
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
5303
5334
|
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
5304
5335
|
oAuthCallbackUri: z.ZodOptional<z.ZodString>;
|
|
@@ -5367,6 +5398,7 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
5367
5398
|
description: z.ZodString;
|
|
5368
5399
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
5369
5400
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
5401
|
+
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
5370
5402
|
}, z.core.$strip>>;
|
|
5371
5403
|
userId: z.ZodString;
|
|
5372
5404
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -5390,6 +5422,10 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
5390
5422
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
5391
5423
|
}, z.core.$strip>>;
|
|
5392
5424
|
}, z.core.$strip>>>;
|
|
5425
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5426
|
+
logoUri: z.ZodOptional<z.ZodString>;
|
|
5427
|
+
appUri: z.ZodOptional<z.ZodString>;
|
|
5428
|
+
isConnected: z.ZodOptional<z.ZodBoolean>;
|
|
5393
5429
|
}, z.core.$strip>;
|
|
5394
5430
|
type IntegrationApiResponse = z.infer<typeof IntegrationApiResponse>;
|
|
5395
5431
|
|
|
@@ -5879,6 +5915,7 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5879
5915
|
description: z.ZodString;
|
|
5880
5916
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
5881
5917
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
5918
|
+
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
5882
5919
|
}, z.core.$strip>>;
|
|
5883
5920
|
userId: z.ZodString;
|
|
5884
5921
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -6360,6 +6397,7 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
6360
6397
|
name: z.ZodOptional<z.ZodString>;
|
|
6361
6398
|
connectionId: z.ZodString;
|
|
6362
6399
|
integrationId: z.ZodString;
|
|
6400
|
+
externalEventTypeId: z.ZodOptional<z.ZodString>;
|
|
6363
6401
|
config: z.ZodOptional<z.ZodObject<{
|
|
6364
6402
|
type: z.ZodEnum<typeof ExternalEventSubscriptionType>;
|
|
6365
6403
|
dataSource: z.ZodOptional<z.ZodObject<{
|
|
@@ -6390,6 +6428,7 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
6390
6428
|
nextRefreshTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
6391
6429
|
globalWebhookKey: z.ZodOptional<z.ZodString>;
|
|
6392
6430
|
globalWebhookEventSelector: z.ZodOptional<z.ZodString>;
|
|
6431
|
+
incomingWebhookUri: z.ZodOptional<z.ZodString>;
|
|
6393
6432
|
webhookUri: z.ZodOptional<z.ZodString>;
|
|
6394
6433
|
user: z.ZodOptional<z.ZodObject<{
|
|
6395
6434
|
id: z.ZodString;
|
|
@@ -6443,6 +6482,7 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
6443
6482
|
description: z.ZodString;
|
|
6444
6483
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
6445
6484
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
6485
|
+
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
6446
6486
|
}, z.core.$strip>>;
|
|
6447
6487
|
userId: z.ZodString;
|
|
6448
6488
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -6646,6 +6686,7 @@ declare class ConnectionAccessor {
|
|
|
6646
6686
|
patch(data: UpdateConnectionRequest): Promise<ConnectionApiResponse>;
|
|
6647
6687
|
put(data: UpdateConnectionRequest): Promise<ConnectionApiResponse>;
|
|
6648
6688
|
archive(): Promise<void>;
|
|
6689
|
+
restore(): Promise<ConnectionApiResponse>;
|
|
6649
6690
|
request(path: string, data?: any): Promise<any>;
|
|
6650
6691
|
get proxy(): ConnectionProxy;
|
|
6651
6692
|
operation(key: string): ConnectionOperationAccessor;
|
|
@@ -6690,6 +6731,7 @@ declare class ConnectionAccessor {
|
|
|
6690
6731
|
description: string;
|
|
6691
6732
|
uiUrl?: string | undefined;
|
|
6692
6733
|
agentInstructions?: string | undefined;
|
|
6734
|
+
handoffAgentInstructions?: string | undefined;
|
|
6693
6735
|
} | undefined;
|
|
6694
6736
|
tenantId?: string | undefined;
|
|
6695
6737
|
user?: {
|
|
@@ -6746,6 +6788,8 @@ declare class ConnectionAccessor {
|
|
|
6746
6788
|
parameters?: Record<string, any> | undefined;
|
|
6747
6789
|
}> | undefined;
|
|
6748
6790
|
} | undefined;
|
|
6791
|
+
connectorParameters?: unknown;
|
|
6792
|
+
input?: unknown;
|
|
6749
6793
|
} | null>;
|
|
6750
6794
|
openReconnectUI(_options?: OpenConfigurationOptions): Promise<ConnectionApiResponse | null>;
|
|
6751
6795
|
refreshCredentials(): Promise<void>;
|
|
@@ -6928,6 +6972,7 @@ declare class IntegrationAccessor extends ElementAccessor<IntegrationApiResponse
|
|
|
6928
6972
|
description: string;
|
|
6929
6973
|
uiUrl?: string | undefined;
|
|
6930
6974
|
agentInstructions?: string | undefined;
|
|
6975
|
+
handoffAgentInstructions?: string | undefined;
|
|
6931
6976
|
} | undefined;
|
|
6932
6977
|
tenantId?: string | undefined;
|
|
6933
6978
|
user?: {
|
|
@@ -6984,6 +7029,8 @@ declare class IntegrationAccessor extends ElementAccessor<IntegrationApiResponse
|
|
|
6984
7029
|
parameters?: Record<string, any> | undefined;
|
|
6985
7030
|
}> | undefined;
|
|
6986
7031
|
} | undefined;
|
|
7032
|
+
connectorParameters?: unknown;
|
|
7033
|
+
input?: unknown;
|
|
6987
7034
|
} | null>;
|
|
6988
7035
|
createConnection({ parameters, name, }: {
|
|
6989
7036
|
parameters?: any;
|