@membranehq/sdk 0.8.5 → 0.9.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 +118 -3
- package/dist/bundle.js +21 -0
- 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 +2 -0
- package/dist/dts/agent/index.d.ts +2 -0
- package/dist/dts/agent/mcp.d.ts +6 -0
- package/dist/dts/agent/session.d.ts +4 -1
- package/dist/dts/api-version.generated.d.ts +10 -0
- package/dist/dts/apps/types.d.ts +371 -0
- package/dist/dts/errors/index.d.ts +5 -1
- package/dist/dts/index.browser.d.ts +2 -1
- package/dist/dts/orgs/types.d.ts +341 -3
- package/dist/dts/platform-users.d.ts +24 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +4 -0
- package/dist/dts/workspace-elements/api/connections-api.d.ts +6 -0
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +4 -0
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +4 -0
- package/dist/dts/workspace-elements/api/flows-api.d.ts +94 -2
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +2 -0
- package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +2 -0
- package/dist/dts/workspace-elements/base/connections/types.d.ts +2 -0
- package/dist/dts/workspace-elements/compare.d.ts +16 -0
- package/dist/dts/workspace-elements/compare.test.d.ts +1 -0
- package/dist/dts/workspace-elements/index.d.ts +1 -0
- package/dist/dts/workspaces/index.d.ts +1 -0
- package/dist/dts/workspaces/schemas.d.ts +24 -0
- package/dist/dts/workspaces/types.d.ts +3 -8
- package/dist/index.browser.d.mts +951 -44
- package/dist/index.browser.d.ts +951 -44
- package/dist/index.browser.js +293 -9
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +280 -10
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +951 -44
- package/dist/index.node.d.ts +951 -44
- package/dist/index.node.js +293 -9
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +280 -10
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.node.js
CHANGED
|
@@ -50,6 +50,7 @@ exports.ErrorType = void 0;
|
|
|
50
50
|
ErrorType["ACTION_INSTANCE_SETUP"] = "action_instance_setup";
|
|
51
51
|
ErrorType["UNIT_RUN"] = "unit_run";
|
|
52
52
|
ErrorType["CUSTOM_CODE"] = "custom_code";
|
|
53
|
+
ErrorType["INSUFFICIENT_CREDIT"] = "insufficient_credit";
|
|
53
54
|
})(exports.ErrorType || (exports.ErrorType = {}));
|
|
54
55
|
exports.BadRequestErrorKey = void 0;
|
|
55
56
|
(function (BadRequestErrorKey) {
|
|
@@ -201,6 +202,12 @@ class CustomCodeError extends MembraneError {
|
|
|
201
202
|
this.data.type = exports.ErrorType.CUSTOM_CODE;
|
|
202
203
|
}
|
|
203
204
|
}
|
|
205
|
+
class InsufficientCreditsError extends MembraneError {
|
|
206
|
+
constructor(arg) {
|
|
207
|
+
super(arg);
|
|
208
|
+
this.data.type = exports.ErrorType.INSUFFICIENT_CREDIT;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
204
211
|
|
|
205
212
|
exports.DataBuilderFormulaType = void 0;
|
|
206
213
|
(function (DataBuilderFormulaType) {
|
|
@@ -3766,6 +3773,8 @@ const BaseConnection = BaseWorkspaceElement.extend({
|
|
|
3766
3773
|
updatedAt: zod.z.string(),
|
|
3767
3774
|
lastActiveAt: zod.z.string().optional(),
|
|
3768
3775
|
nextCredentialsRefreshAt: zod.z.string().optional(),
|
|
3776
|
+
nextRetryTimestamp: zod.z.string().optional(),
|
|
3777
|
+
retryAttempts: zod.z.number().optional(),
|
|
3769
3778
|
archivedAt: zod.z.string().optional(),
|
|
3770
3779
|
isDeactivated: zod.z.boolean().optional(),
|
|
3771
3780
|
meta: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
@@ -9392,6 +9401,7 @@ exports.ActionRunLogStatus = void 0;
|
|
|
9392
9401
|
})(exports.ActionRunLogStatus || (exports.ActionRunLogStatus = {}));
|
|
9393
9402
|
const BaseActionRunLogRecord = BaseWorkspaceElement.extend({
|
|
9394
9403
|
actionId: zod.z.string(),
|
|
9404
|
+
actionInstanceId: zod.z.string(),
|
|
9395
9405
|
integrationId: zod.z.string(),
|
|
9396
9406
|
connectionId: zod.z.string(),
|
|
9397
9407
|
input: zod.z.any().optional(),
|
|
@@ -9400,6 +9410,7 @@ const BaseActionRunLogRecord = BaseWorkspaceElement.extend({
|
|
|
9400
9410
|
createdAt: zod.z.string(),
|
|
9401
9411
|
completedAt: zod.z.string().optional(),
|
|
9402
9412
|
error: ErrorDataSchema.optional(),
|
|
9413
|
+
duration: zod.z.number().optional(),
|
|
9403
9414
|
});
|
|
9404
9415
|
|
|
9405
9416
|
const ActionApiResponse = BaseAction.extend({
|
|
@@ -9569,12 +9580,7 @@ const ExternalEvent = BaseExternalEvent.extend({
|
|
|
9569
9580
|
|
|
9570
9581
|
const FlowApiResponse = BaseFlow.extend({
|
|
9571
9582
|
integration: BaseIntegration.optional(),
|
|
9572
|
-
appliedToIntegrations: AppliedToIntegrations(
|
|
9573
|
-
id: zod.z.string(),
|
|
9574
|
-
integrationId: zod.z.string().optional(),
|
|
9575
|
-
isCustomized: zod.z.boolean().optional(),
|
|
9576
|
-
universalFlowId: zod.z.string().optional(),
|
|
9577
|
-
})).optional(),
|
|
9583
|
+
appliedToIntegrations: AppliedToIntegrations(BaseFlow).optional(),
|
|
9578
9584
|
dependencies: zod.z.array(zod.z.any()).optional(),
|
|
9579
9585
|
});
|
|
9580
9586
|
const FindFlowsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
|
|
@@ -9938,6 +9944,71 @@ function hasCycles(nodes) {
|
|
|
9938
9944
|
return hasCycles;
|
|
9939
9945
|
}
|
|
9940
9946
|
|
|
9947
|
+
exports.WorkspaceElementChangeType = void 0;
|
|
9948
|
+
(function (WorkspaceElementChangeType) {
|
|
9949
|
+
WorkspaceElementChangeType["CREATE"] = "create";
|
|
9950
|
+
WorkspaceElementChangeType["UPDATE"] = "update";
|
|
9951
|
+
WorkspaceElementChangeType["DELETE"] = "delete";
|
|
9952
|
+
})(exports.WorkspaceElementChangeType || (exports.WorkspaceElementChangeType = {}));
|
|
9953
|
+
function compareWorkspaceExports(primaryExport, targetExport) {
|
|
9954
|
+
const changes = [];
|
|
9955
|
+
const result = {
|
|
9956
|
+
[exports.WorkspaceElementChangeType.CREATE]: new Set(),
|
|
9957
|
+
[exports.WorkspaceElementChangeType.UPDATE]: new Set(),
|
|
9958
|
+
[exports.WorkspaceElementChangeType.DELETE]: new Set(),
|
|
9959
|
+
};
|
|
9960
|
+
const primaryMap = new Map();
|
|
9961
|
+
const otherMap = new Map();
|
|
9962
|
+
const typeMap = new Map();
|
|
9963
|
+
const allElementTypes = new Set([...Object.keys(primaryExport), ...Object.keys(targetExport)]);
|
|
9964
|
+
for (const elementType of allElementTypes) {
|
|
9965
|
+
const type = elementType;
|
|
9966
|
+
const primaryElements = primaryExport[type] || [];
|
|
9967
|
+
for (const element of primaryElements) {
|
|
9968
|
+
primaryMap.set(element.uuid, element);
|
|
9969
|
+
typeMap.set(element.uuid, type);
|
|
9970
|
+
}
|
|
9971
|
+
const otherElements = targetExport[type] || [];
|
|
9972
|
+
for (const element of otherElements) {
|
|
9973
|
+
otherMap.set(element.uuid, element);
|
|
9974
|
+
typeMap.set(element.uuid, type);
|
|
9975
|
+
}
|
|
9976
|
+
}
|
|
9977
|
+
for (const [uuid] of typeMap) {
|
|
9978
|
+
const primaryElement = primaryMap.get(uuid);
|
|
9979
|
+
const otherElement = otherMap.get(uuid);
|
|
9980
|
+
const change = compareElementExports(primaryElement, otherElement);
|
|
9981
|
+
if (change) {
|
|
9982
|
+
changes.push(change);
|
|
9983
|
+
}
|
|
9984
|
+
}
|
|
9985
|
+
changes.forEach((change) => {
|
|
9986
|
+
result[change.type].add(change.uuid);
|
|
9987
|
+
});
|
|
9988
|
+
return result;
|
|
9989
|
+
}
|
|
9990
|
+
function compareElementExports(primaryElement, targetElement) {
|
|
9991
|
+
if (primaryElement && !targetElement) {
|
|
9992
|
+
return {
|
|
9993
|
+
type: exports.WorkspaceElementChangeType.CREATE,
|
|
9994
|
+
uuid: primaryElement.uuid,
|
|
9995
|
+
};
|
|
9996
|
+
}
|
|
9997
|
+
if (!primaryElement && targetElement) {
|
|
9998
|
+
return {
|
|
9999
|
+
type: exports.WorkspaceElementChangeType.DELETE,
|
|
10000
|
+
uuid: targetElement.uuid,
|
|
10001
|
+
};
|
|
10002
|
+
}
|
|
10003
|
+
if (primaryElement && targetElement && !deepEqual(primaryElement, targetElement)) {
|
|
10004
|
+
return {
|
|
10005
|
+
type: exports.WorkspaceElementChangeType.UPDATE,
|
|
10006
|
+
uuid: primaryElement.uuid,
|
|
10007
|
+
};
|
|
10008
|
+
}
|
|
10009
|
+
return undefined;
|
|
10010
|
+
}
|
|
10011
|
+
|
|
9941
10012
|
const WorkspaceElementSpecs = {
|
|
9942
10013
|
[exports.WorkspaceElementType.Customer]: {
|
|
9943
10014
|
type: exports.WorkspaceElementType.Customer,
|
|
@@ -10291,6 +10362,7 @@ const ERROR_CLASS_BY_TYPE = {
|
|
|
10291
10362
|
[exports.ErrorType.ACTION_INSTANCE_SETUP]: ActionInstanceSetupError,
|
|
10292
10363
|
[exports.ErrorType.UNIT_RUN]: UnitRunError,
|
|
10293
10364
|
[exports.ErrorType.CUSTOM_CODE]: CustomCodeError,
|
|
10365
|
+
[exports.ErrorType.INSUFFICIENT_CREDIT]: InsufficientCreditsError,
|
|
10294
10366
|
};
|
|
10295
10367
|
function getErrorFromData(data) {
|
|
10296
10368
|
if (typeof data === 'object' &&
|
|
@@ -10646,13 +10718,137 @@ const EDITABLE_LIMITS = [
|
|
|
10646
10718
|
'parallelFlowRunsPerConnection',
|
|
10647
10719
|
];
|
|
10648
10720
|
|
|
10721
|
+
const OrgWorkspaceSchema = zod.z.object({
|
|
10722
|
+
id: zod.z.string(),
|
|
10723
|
+
name: zod.z.string(),
|
|
10724
|
+
orgId: zod.z.string(),
|
|
10725
|
+
apiBaseUri: zod.z.string().optional(),
|
|
10726
|
+
key: zod.z.string(),
|
|
10727
|
+
secret: zod.z.string(),
|
|
10728
|
+
createdAt: zod.z.coerce.date(),
|
|
10729
|
+
updatedAt: zod.z.coerce.date(),
|
|
10730
|
+
engineAccessToken: zod.z.string().optional(),
|
|
10731
|
+
onboardingStep: zod.z.nativeEnum(exports.WorkspaceOnboardingStep).optional(),
|
|
10732
|
+
trialEndDate: zod.z.string().optional(),
|
|
10733
|
+
featureFlags: zod.z.array(zod.z.string()).optional(),
|
|
10734
|
+
logoUri: zod.z.string().optional(),
|
|
10735
|
+
});
|
|
10736
|
+
const OrgWorkspaceUser = zod.z.object({
|
|
10737
|
+
id: zod.z.string(),
|
|
10738
|
+
workspaceId: zod.z.string(),
|
|
10739
|
+
testCustomerId: zod.z.string(),
|
|
10740
|
+
userId: zod.z.string(),
|
|
10741
|
+
role: zod.z.string(),
|
|
10742
|
+
});
|
|
10743
|
+
|
|
10744
|
+
const WorkspaceLimit = zod.z.object({
|
|
10745
|
+
value: zod.z.number().optional(),
|
|
10746
|
+
defaultValue: zod.z.number().optional(),
|
|
10747
|
+
unit: zod.z.nativeEnum(exports.LimitUnits),
|
|
10748
|
+
});
|
|
10749
|
+
const WorkspaceLimitsSchema = zod.z.object({
|
|
10750
|
+
parallelEventPulls: WorkspaceLimit.optional(),
|
|
10751
|
+
parallelIncrementalEventPullsPerConnection: WorkspaceLimit.optional(),
|
|
10752
|
+
parallelFullSyncEventPullsPerConnection: WorkspaceLimit.optional(),
|
|
10753
|
+
parallelFlowRuns: WorkspaceLimit.optional(),
|
|
10754
|
+
parallelFlowRunsPerConnection: WorkspaceLimit.optional(),
|
|
10755
|
+
parallelApiRequests: WorkspaceLimit.optional(),
|
|
10756
|
+
parallelSseRequests: WorkspaceLimit.optional(),
|
|
10757
|
+
parallelBackgroundJobs: WorkspaceLimit.optional(),
|
|
10758
|
+
parallelEventLogs: WorkspaceLimit.optional(),
|
|
10759
|
+
parallelEventLogsPerConnection: WorkspaceLimit.optional(),
|
|
10760
|
+
ParallelWriteDatabaseRequests: WorkspaceLimit.optional(),
|
|
10761
|
+
fileUploadsMbPerHour: WorkspaceLimit.optional(),
|
|
10762
|
+
apiRequestsPerSecond: WorkspaceLimit.optional(),
|
|
10763
|
+
apiRequestsPerHour: WorkspaceLimit.optional(),
|
|
10764
|
+
webhookRequestsPerSecond: WorkspaceLimit.optional(),
|
|
10765
|
+
webhookRequestsPerHour: WorkspaceLimit.optional(),
|
|
10766
|
+
workspaceElementCreationsPerSecond: WorkspaceLimit.optional(),
|
|
10767
|
+
workspaceElementCreationsPerHour: WorkspaceLimit.optional(),
|
|
10768
|
+
createDatabaseRequestsPerSecond: WorkspaceLimit.optional(),
|
|
10769
|
+
totalNumberOfCustomers: WorkspaceLimit.optional(),
|
|
10770
|
+
totalNumberOfConnections: WorkspaceLimit.optional(),
|
|
10771
|
+
totalNumberOfWorkspaceElements: WorkspaceLimit.optional(),
|
|
10772
|
+
parallelApiRequestsPerCustomer: WorkspaceLimit.optional(),
|
|
10773
|
+
parallelBackgroundJobsPerCustomer: WorkspaceLimit.optional(),
|
|
10774
|
+
apiRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
10775
|
+
apiRequestsPerCustomerPerHour: WorkspaceLimit.optional(),
|
|
10776
|
+
webhookRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
10777
|
+
webhookRequestsPerCustomerPerHour: WorkspaceLimit.optional(),
|
|
10778
|
+
externalEventsPerCustomerPerDay: WorkspaceLimit.optional(),
|
|
10779
|
+
createDatabaseRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
10780
|
+
updateDatabaseRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
10781
|
+
parallelWriteDatabaseRequestsPerCustomer: WorkspaceLimit.optional(),
|
|
10782
|
+
});
|
|
10783
|
+
const EngineWorkspaceSettingsSchema = zod.z.object({
|
|
10784
|
+
enableApiLogs: zod.z.boolean().optional(),
|
|
10785
|
+
enableWebhookLogs: zod.z.boolean().optional(),
|
|
10786
|
+
enableActionRunLogs: zod.z.boolean().optional(),
|
|
10787
|
+
disableSecretKeyAuth: zod.z.boolean().optional(),
|
|
10788
|
+
});
|
|
10789
|
+
const AppPublicKey = zod.z.object({
|
|
10790
|
+
name: zod.z.string(),
|
|
10791
|
+
publicKey: zod.z.string(),
|
|
10792
|
+
});
|
|
10793
|
+
const AppSchema = zod.z.object({
|
|
10794
|
+
id: zod.z.string(),
|
|
10795
|
+
key: zod.z.string(),
|
|
10796
|
+
logoUri: zod.z.string().optional(),
|
|
10797
|
+
userFieldsSchema: zod.z.any().optional(),
|
|
10798
|
+
apiBaseUri: zod.z.string().optional(),
|
|
10799
|
+
webhookUri: zod.z.string().optional(),
|
|
10800
|
+
publicKey: zod.z.string().optional(),
|
|
10801
|
+
publicKeys: zod.z.array(AppPublicKey).optional(),
|
|
10802
|
+
enabledWebhookEvents: zod.z.array(zod.z.string()).optional(),
|
|
10803
|
+
auth: zod.z.any().optional(),
|
|
10804
|
+
credentialsSchema: zod.z.any().optional(),
|
|
10805
|
+
apiClient: zod.z.any().optional(),
|
|
10806
|
+
apiRequestHeaders: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
10807
|
+
apiRequestQuery: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
10808
|
+
isOnPrem: zod.z.boolean().optional(),
|
|
10809
|
+
connectorBaseUri: zod.z.string().optional(),
|
|
10810
|
+
connectorRevision: zod.z.string().optional(),
|
|
10811
|
+
featureFlags: zod.z.array(zod.z.string()).optional(),
|
|
10812
|
+
limits: WorkspaceLimitsSchema.optional(),
|
|
10813
|
+
settings: EngineWorkspaceSettingsSchema.optional(),
|
|
10814
|
+
type: zod.z.nativeEnum(exports.WorkspaceType).optional(),
|
|
10815
|
+
jwksUri: zod.z.string().nullable().optional(),
|
|
10816
|
+
isTrial: zod.z.boolean().optional(),
|
|
10817
|
+
isThrottled: zod.z.boolean().optional(),
|
|
10818
|
+
isDisabled: zod.z.boolean().optional(),
|
|
10819
|
+
isBackgroundJobsDisabled: zod.z.boolean().optional(),
|
|
10820
|
+
});
|
|
10821
|
+
|
|
10822
|
+
const PlatformUserSchema = zod.z.object({
|
|
10823
|
+
id: zod.z.string(),
|
|
10824
|
+
email: zod.z.string(),
|
|
10825
|
+
name: zod.z.string(),
|
|
10826
|
+
trialRequested: zod.z.boolean(),
|
|
10827
|
+
introVideoStatus: zod.z.string().optional(),
|
|
10828
|
+
isEligible: zod.z.boolean().optional(),
|
|
10829
|
+
emailVerified: zod.z.boolean().optional(),
|
|
10830
|
+
});
|
|
10831
|
+
const FullPlatformUser = zod.z.object({
|
|
10832
|
+
id: zod.z.string(),
|
|
10833
|
+
auth0Id: zod.z.string().optional(),
|
|
10834
|
+
email: zod.z.string(),
|
|
10835
|
+
name: zod.z.string(),
|
|
10836
|
+
defaultAccountId: zod.z.string().optional(),
|
|
10837
|
+
defaultWorkspaceId: zod.z.string().optional(),
|
|
10838
|
+
isAdmin: zod.z.boolean().optional(),
|
|
10839
|
+
trialRequested: zod.z.boolean(),
|
|
10840
|
+
pat: zod.z.string().optional(),
|
|
10841
|
+
introVideoStatus: zod.z.string().optional(),
|
|
10842
|
+
isEligible: zod.z.boolean().optional(),
|
|
10843
|
+
emailVerified: zod.z.boolean().optional(),
|
|
10844
|
+
});
|
|
10845
|
+
|
|
10649
10846
|
exports.OrgLimitsType = void 0;
|
|
10650
10847
|
(function (OrgLimitsType) {
|
|
10651
10848
|
OrgLimitsType["NUMBER_OF_WORKSPACES"] = "numberOfWorkspaces";
|
|
10652
10849
|
OrgLimitsType["TODAY_USAGE"] = "todayUsage";
|
|
10653
10850
|
OrgLimitsType["LAST_THIRTY_DAY_USAGE"] = "lastThirtyDayUsage";
|
|
10654
10851
|
OrgLimitsType["MEMBRANE_EXPERT_CREDITS_CAP"] = "membraneExpertCreditsCapPerMonth";
|
|
10655
|
-
OrgLimitsType["MEMBRANE_AGENT_LAST_THIRTY_DAYS_USAGE"] = "membraneAgentLastThirtyDaysUsage";
|
|
10656
10852
|
})(exports.OrgLimitsType || (exports.OrgLimitsType = {}));
|
|
10657
10853
|
exports.OrgUserRole = void 0;
|
|
10658
10854
|
(function (OrgUserRole) {
|
|
@@ -10664,6 +10860,55 @@ exports.OrgUserStatus = void 0;
|
|
|
10664
10860
|
OrgUserStatus["Invited"] = "invited";
|
|
10665
10861
|
OrgUserStatus["Active"] = "active";
|
|
10666
10862
|
})(exports.OrgUserStatus || (exports.OrgUserStatus = {}));
|
|
10863
|
+
const OrgLimits = zod.z
|
|
10864
|
+
.object({
|
|
10865
|
+
numberOfWorkspaces: zod.z.number().optional(),
|
|
10866
|
+
todayUsage: zod.z.number().optional(),
|
|
10867
|
+
lastThirtyDayUsage: zod.z.number().optional(),
|
|
10868
|
+
membraneAgentLastThirtyDaysUsage: zod.z.number().optional(),
|
|
10869
|
+
membraneExpertCreditsCapPerMonth: zod.z.number().nullable().optional(),
|
|
10870
|
+
})
|
|
10871
|
+
.optional();
|
|
10872
|
+
const MembraneAgentKey = zod.z
|
|
10873
|
+
.object({
|
|
10874
|
+
key: zod.z.string().optional(),
|
|
10875
|
+
expiresAt: zod.z.string().optional(),
|
|
10876
|
+
})
|
|
10877
|
+
.optional();
|
|
10878
|
+
const OrgSchema = zod.z.object({
|
|
10879
|
+
id: zod.z.string(),
|
|
10880
|
+
key: zod.z.string(),
|
|
10881
|
+
name: zod.z.string(),
|
|
10882
|
+
createdAt: zod.z.coerce.date(),
|
|
10883
|
+
updatedAt: zod.z.coerce.date(),
|
|
10884
|
+
trialEndDate: zod.z.string().optional(),
|
|
10885
|
+
lastTrialExtensionDate: zod.z.string().optional(),
|
|
10886
|
+
limits: OrgLimits,
|
|
10887
|
+
thirtyDayTotalCredits: zod.z.number().optional(),
|
|
10888
|
+
lastThirtyDayUsagePercent: zod.z.number().optional(),
|
|
10889
|
+
todayUsagePercent: zod.z.number().optional(),
|
|
10890
|
+
domains: zod.z.array(zod.z.string()).optional(),
|
|
10891
|
+
featureFlags: zod.z.array(zod.z.string()).optional(),
|
|
10892
|
+
freeAiMonthlyCredits: zod.z.number().optional(),
|
|
10893
|
+
paidAiCredits: zod.z.number().optional(),
|
|
10894
|
+
stripeCustomerId: zod.z.string().optional(),
|
|
10895
|
+
});
|
|
10896
|
+
const AccountResponse = zod.z.object({
|
|
10897
|
+
user: FullPlatformUser.optional(),
|
|
10898
|
+
workspace: OrgWorkspaceSchema.optional(),
|
|
10899
|
+
workspaces: zod.z.array(OrgWorkspaceSchema).optional(),
|
|
10900
|
+
workspaceUser: OrgWorkspaceUser.extend({
|
|
10901
|
+
testCustomerId: zod.z.string(),
|
|
10902
|
+
}).optional(),
|
|
10903
|
+
engineTestUser: BaseCustomer.optional(),
|
|
10904
|
+
testCustomer: BaseCustomer.optional(),
|
|
10905
|
+
engineApp: AppSchema.optional(),
|
|
10906
|
+
superAdminToken: zod.z.string().optional().nullable(),
|
|
10907
|
+
orgs: zod.z.array(OrgSchema).optional(),
|
|
10908
|
+
permissions: zod.z.array(zod.z.string()).optional(),
|
|
10909
|
+
message: zod.z.string().optional(),
|
|
10910
|
+
error: zod.z.string().optional(),
|
|
10911
|
+
});
|
|
10667
10912
|
|
|
10668
10913
|
exports.WebhookTypeEnum = void 0;
|
|
10669
10914
|
(function (WebhookTypeEnum) {
|
|
@@ -12428,15 +12673,39 @@ const AgentSession = zod.z.object({
|
|
|
12428
12673
|
storedMessagesUri: zod.z.string().url().optional(),
|
|
12429
12674
|
sessionFilesZipUri: zod.z.string().url().optional(),
|
|
12430
12675
|
logs: zod.z.array(zod.z.any()).optional(),
|
|
12676
|
+
usage: zod.z.number().optional(),
|
|
12431
12677
|
});
|
|
12432
12678
|
const CreateAgentSession = zod.z.object({
|
|
12433
12679
|
workspaceElementType: zod.z.enum(exports.WorkspaceElementType),
|
|
12434
12680
|
workspaceElementId: zod.z.string().min(1),
|
|
12435
12681
|
prompt: zod.z.string().min(1),
|
|
12682
|
+
testCustomerId: zod.z.string().optional(),
|
|
12436
12683
|
});
|
|
12437
12684
|
const AgentSessionInputSchema = zod.z.object({
|
|
12438
|
-
input: zod.z.string().
|
|
12439
|
-
|
|
12685
|
+
input: zod.z.string().min(1),
|
|
12686
|
+
synthetic: zod.z.boolean().optional(),
|
|
12687
|
+
});
|
|
12688
|
+
|
|
12689
|
+
exports.InteractiveMcpToolName = void 0;
|
|
12690
|
+
(function (InteractiveMcpToolName) {
|
|
12691
|
+
InteractiveMcpToolName["REQUEST_TEST_CONNECTION"] = "requestTestConnection";
|
|
12692
|
+
})(exports.InteractiveMcpToolName || (exports.InteractiveMcpToolName = {}));
|
|
12693
|
+
exports.InteractiveMcpToolStatus = void 0;
|
|
12694
|
+
(function (InteractiveMcpToolStatus) {
|
|
12695
|
+
InteractiveMcpToolStatus["AWAITING_USER_INPUT"] = "awaiting_user_input";
|
|
12696
|
+
})(exports.InteractiveMcpToolStatus || (exports.InteractiveMcpToolStatus = {}));
|
|
12697
|
+
|
|
12698
|
+
const API_VERSIONS = {
|
|
12699
|
+
LEGACY: 'legacy',
|
|
12700
|
+
'2025-10-21': '2025-10-21',
|
|
12701
|
+
};
|
|
12702
|
+
const AVAILABLE_VERSIONS = Object.values(API_VERSIONS);
|
|
12703
|
+
const CHRONOLOGICAL_VERSIONS = [
|
|
12704
|
+
API_VERSIONS.LEGACY,
|
|
12705
|
+
...[...AVAILABLE_VERSIONS].filter((v) => v !== API_VERSIONS.LEGACY).sort(),
|
|
12706
|
+
];
|
|
12707
|
+
const LATEST_API_VERSION = CHRONOLOGICAL_VERSIONS[CHRONOLOGICAL_VERSIONS.length - 1];
|
|
12708
|
+
const VERSION_HEADER = 'membrane-api-version';
|
|
12440
12709
|
|
|
12441
12710
|
function decodeJWT(token) {
|
|
12442
12711
|
if (typeof token !== 'string') {
|
|
@@ -12560,6 +12829,7 @@ class MembraneApiClient {
|
|
|
12560
12829
|
params.headers = {
|
|
12561
12830
|
...(params.headers || {}),
|
|
12562
12831
|
Authorization: `Bearer ${token}`,
|
|
12832
|
+
[VERSION_HEADER]: LATEST_API_VERSION,
|
|
12563
12833
|
};
|
|
12564
12834
|
params.withCredentials = false;
|
|
12565
12835
|
let response;
|
|
@@ -12902,6 +13172,7 @@ function hasMembraneCredentials(cwd) {
|
|
|
12902
13172
|
|
|
12903
13173
|
exports.ACTIONS = ACTIONS;
|
|
12904
13174
|
exports.AccessDeniedError = AccessDeniedError;
|
|
13175
|
+
exports.AccountResponse = AccountResponse;
|
|
12905
13176
|
exports.ActionAccessor = ActionAccessor;
|
|
12906
13177
|
exports.ActionApiResponse = ActionApiResponse;
|
|
12907
13178
|
exports.ActionDependency = ActionDependency;
|
|
@@ -12931,6 +13202,8 @@ exports.AppEventSubscriptionsAccessor = AppEventSubscriptionsAccessor;
|
|
|
12931
13202
|
exports.AppEventTypeAccessor = AppEventTypeAccessor;
|
|
12932
13203
|
exports.AppEventTypeApiResponse = AppEventTypeApiResponse;
|
|
12933
13204
|
exports.AppEventTypesAccessor = AppEventTypesAccessor;
|
|
13205
|
+
exports.AppPublicKey = AppPublicKey;
|
|
13206
|
+
exports.AppSchema = AppSchema;
|
|
12934
13207
|
exports.AppliedToIntegrations = AppliedToIntegrations;
|
|
12935
13208
|
exports.BadRequestError = BadRequestError;
|
|
12936
13209
|
exports.BaseAction = BaseAction;
|
|
@@ -13093,6 +13366,7 @@ exports.ElementInstanceAccessor = ElementInstanceAccessor;
|
|
|
13093
13366
|
exports.ElementInstanceListAccessor = ElementInstanceListAccessor;
|
|
13094
13367
|
exports.ElementListAccessor = ElementListAccessor;
|
|
13095
13368
|
exports.ElementsExportFields = ElementsExportFields;
|
|
13369
|
+
exports.EngineWorkspaceSettingsSchema = EngineWorkspaceSettingsSchema;
|
|
13096
13370
|
exports.ErrorData = ErrorData;
|
|
13097
13371
|
exports.ErrorDataSchema = ErrorDataSchema;
|
|
13098
13372
|
exports.ExternalEvent = ExternalEvent;
|
|
@@ -13159,10 +13433,12 @@ exports.FlowRunNode = FlowRunNode;
|
|
|
13159
13433
|
exports.FlowRunsAccessor = FlowRunsAccessor;
|
|
13160
13434
|
exports.FlowsAccessor = FlowsAccessor;
|
|
13161
13435
|
exports.Formula = Formula;
|
|
13436
|
+
exports.FullPlatformUser = FullPlatformUser;
|
|
13162
13437
|
exports.HTTP_REQUEST_SCHEMA = HTTP_REQUEST_SCHEMA;
|
|
13163
13438
|
exports.HandyScenarioTemplateElement = HandyScenarioTemplateElement;
|
|
13164
13439
|
exports.HttpRequestSpec = HttpRequestSpec;
|
|
13165
13440
|
exports.IncludeArchivedQuery = IncludeArchivedQuery;
|
|
13441
|
+
exports.InsufficientCreditsError = InsufficientCreditsError;
|
|
13166
13442
|
exports.IntegrationAccessor = IntegrationAccessor;
|
|
13167
13443
|
exports.IntegrationApiResponse = IntegrationApiResponse;
|
|
13168
13444
|
exports.IntegrationAppClient = MembraneClient;
|
|
@@ -13189,6 +13465,7 @@ exports.ListFlowInstancesForConnectionQuery = ListFlowInstancesForConnectionQuer
|
|
|
13189
13465
|
exports.MEMBRANE_ELEMENT_CONFIG_FILE_NAME = MEMBRANE_ELEMENT_CONFIG_FILE_NAME;
|
|
13190
13466
|
exports.MIN_FULL_SYNC_INTERVAL_SECONDS = MIN_FULL_SYNC_INTERVAL_SECONDS;
|
|
13191
13467
|
exports.MIN_PULL_UPDATES_INTERVAL_SECONDS = MIN_PULL_UPDATES_INTERVAL_SECONDS;
|
|
13468
|
+
exports.MembraneAgentKey = MembraneAgentKey;
|
|
13192
13469
|
exports.MembraneAxiosInstance = axios;
|
|
13193
13470
|
exports.MembraneClient = MembraneClient;
|
|
13194
13471
|
exports.MembraneConfigLoader = MembraneConfigLoader;
|
|
@@ -13198,6 +13475,10 @@ exports.NotAuthenticatedError = NotAuthenticatedError;
|
|
|
13198
13475
|
exports.NotFoundError = NotFoundError;
|
|
13199
13476
|
exports.OAUTH1_CONFIG_SCHEMA = OAUTH1_CONFIG_SCHEMA;
|
|
13200
13477
|
exports.OAUTH_CONFIG_SCHEMA = OAUTH_CONFIG_SCHEMA;
|
|
13478
|
+
exports.OrgLimits = OrgLimits;
|
|
13479
|
+
exports.OrgSchema = OrgSchema;
|
|
13480
|
+
exports.OrgWorkspaceSchema = OrgWorkspaceSchema;
|
|
13481
|
+
exports.OrgWorkspaceUser = OrgWorkspaceUser;
|
|
13201
13482
|
exports.PARALLEL_EXECUTION_LIMITS = PARALLEL_EXECUTION_LIMITS;
|
|
13202
13483
|
exports.PackageAccessor = PackageAccessor;
|
|
13203
13484
|
exports.PackageApiResponse = PackageApiResponse;
|
|
@@ -13210,6 +13491,7 @@ exports.PackageExportProperties = PackageExportProperties;
|
|
|
13210
13491
|
exports.PackagesAccessor = PackagesAccessor;
|
|
13211
13492
|
exports.PaginationQuery = PaginationQuery;
|
|
13212
13493
|
exports.PaginationResponse = PaginationResponse;
|
|
13494
|
+
exports.PlatformUserSchema = PlatformUserSchema;
|
|
13213
13495
|
exports.RATE_LIMITS = RATE_LIMITS;
|
|
13214
13496
|
exports.RateLimitExceededError = RateLimitExceededError;
|
|
13215
13497
|
exports.ResetFlowInstanceOptions = ResetFlowInstanceOptions;
|
|
@@ -13242,6 +13524,7 @@ exports.UserAccessor = UserAccessor;
|
|
|
13242
13524
|
exports.UsersAccessor = UsersAccessor;
|
|
13243
13525
|
exports.WORKSPACE_SIZE_LIMITS = WORKSPACE_SIZE_LIMITS;
|
|
13244
13526
|
exports.WorkspaceElementSpecs = WorkspaceElementSpecs;
|
|
13527
|
+
exports.WorkspaceLimitsSchema = WorkspaceLimitsSchema;
|
|
13245
13528
|
exports.__resolveValue = __resolveValue;
|
|
13246
13529
|
exports.addRequiredFieldsToSchema = addRequiredFieldsToSchema;
|
|
13247
13530
|
exports.addUdmFallbackFields = addUdmFallbackFields;
|
|
@@ -13249,6 +13532,7 @@ exports.backwardCompatibleFilterMatch = backwardCompatibleFilterMatch;
|
|
|
13249
13532
|
exports.buildData = buildData;
|
|
13250
13533
|
exports.buildDataSchema = buildDataSchema;
|
|
13251
13534
|
exports.buildValue = buildValue;
|
|
13535
|
+
exports.compareWorkspaceExports = compareWorkspaceExports;
|
|
13252
13536
|
exports.compressDataSchema = compressDataSchema;
|
|
13253
13537
|
exports.createCompoundSchema = createCompoundSchema;
|
|
13254
13538
|
exports.createFlowInstanceSchema = createFlowInstanceSchema;
|