@membranehq/sdk 0.8.5 → 0.9.1
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.browser.js
CHANGED
|
@@ -26,6 +26,7 @@ exports.ErrorType = void 0;
|
|
|
26
26
|
ErrorType["ACTION_INSTANCE_SETUP"] = "action_instance_setup";
|
|
27
27
|
ErrorType["UNIT_RUN"] = "unit_run";
|
|
28
28
|
ErrorType["CUSTOM_CODE"] = "custom_code";
|
|
29
|
+
ErrorType["INSUFFICIENT_CREDIT"] = "insufficient_credit";
|
|
29
30
|
})(exports.ErrorType || (exports.ErrorType = {}));
|
|
30
31
|
exports.BadRequestErrorKey = void 0;
|
|
31
32
|
(function (BadRequestErrorKey) {
|
|
@@ -177,6 +178,12 @@ class CustomCodeError extends MembraneError {
|
|
|
177
178
|
this.data.type = exports.ErrorType.CUSTOM_CODE;
|
|
178
179
|
}
|
|
179
180
|
}
|
|
181
|
+
class InsufficientCreditsError extends MembraneError {
|
|
182
|
+
constructor(arg) {
|
|
183
|
+
super(arg);
|
|
184
|
+
this.data.type = exports.ErrorType.INSUFFICIENT_CREDIT;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
180
187
|
|
|
181
188
|
exports.DataBuilderFormulaType = void 0;
|
|
182
189
|
(function (DataBuilderFormulaType) {
|
|
@@ -3742,6 +3749,8 @@ const BaseConnection = BaseWorkspaceElement.extend({
|
|
|
3742
3749
|
updatedAt: zod.z.string(),
|
|
3743
3750
|
lastActiveAt: zod.z.string().optional(),
|
|
3744
3751
|
nextCredentialsRefreshAt: zod.z.string().optional(),
|
|
3752
|
+
nextRetryTimestamp: zod.z.string().optional(),
|
|
3753
|
+
retryAttempts: zod.z.number().optional(),
|
|
3745
3754
|
archivedAt: zod.z.string().optional(),
|
|
3746
3755
|
isDeactivated: zod.z.boolean().optional(),
|
|
3747
3756
|
meta: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
@@ -9368,6 +9377,7 @@ exports.ActionRunLogStatus = void 0;
|
|
|
9368
9377
|
})(exports.ActionRunLogStatus || (exports.ActionRunLogStatus = {}));
|
|
9369
9378
|
const BaseActionRunLogRecord = BaseWorkspaceElement.extend({
|
|
9370
9379
|
actionId: zod.z.string(),
|
|
9380
|
+
actionInstanceId: zod.z.string(),
|
|
9371
9381
|
integrationId: zod.z.string(),
|
|
9372
9382
|
connectionId: zod.z.string(),
|
|
9373
9383
|
input: zod.z.any().optional(),
|
|
@@ -9376,6 +9386,7 @@ const BaseActionRunLogRecord = BaseWorkspaceElement.extend({
|
|
|
9376
9386
|
createdAt: zod.z.string(),
|
|
9377
9387
|
completedAt: zod.z.string().optional(),
|
|
9378
9388
|
error: ErrorDataSchema.optional(),
|
|
9389
|
+
duration: zod.z.number().optional(),
|
|
9379
9390
|
});
|
|
9380
9391
|
|
|
9381
9392
|
const ActionApiResponse = BaseAction.extend({
|
|
@@ -9545,12 +9556,7 @@ const ExternalEvent = BaseExternalEvent.extend({
|
|
|
9545
9556
|
|
|
9546
9557
|
const FlowApiResponse = BaseFlow.extend({
|
|
9547
9558
|
integration: BaseIntegration.optional(),
|
|
9548
|
-
appliedToIntegrations: AppliedToIntegrations(
|
|
9549
|
-
id: zod.z.string(),
|
|
9550
|
-
integrationId: zod.z.string().optional(),
|
|
9551
|
-
isCustomized: zod.z.boolean().optional(),
|
|
9552
|
-
universalFlowId: zod.z.string().optional(),
|
|
9553
|
-
})).optional(),
|
|
9559
|
+
appliedToIntegrations: AppliedToIntegrations(BaseFlow).optional(),
|
|
9554
9560
|
dependencies: zod.z.array(zod.z.any()).optional(),
|
|
9555
9561
|
});
|
|
9556
9562
|
const FindFlowsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
|
|
@@ -9914,6 +9920,71 @@ function hasCycles(nodes) {
|
|
|
9914
9920
|
return hasCycles;
|
|
9915
9921
|
}
|
|
9916
9922
|
|
|
9923
|
+
exports.WorkspaceElementChangeType = void 0;
|
|
9924
|
+
(function (WorkspaceElementChangeType) {
|
|
9925
|
+
WorkspaceElementChangeType["CREATE"] = "create";
|
|
9926
|
+
WorkspaceElementChangeType["UPDATE"] = "update";
|
|
9927
|
+
WorkspaceElementChangeType["DELETE"] = "delete";
|
|
9928
|
+
})(exports.WorkspaceElementChangeType || (exports.WorkspaceElementChangeType = {}));
|
|
9929
|
+
function compareWorkspaceExports(primaryExport, targetExport) {
|
|
9930
|
+
const changes = [];
|
|
9931
|
+
const result = {
|
|
9932
|
+
[exports.WorkspaceElementChangeType.CREATE]: new Set(),
|
|
9933
|
+
[exports.WorkspaceElementChangeType.UPDATE]: new Set(),
|
|
9934
|
+
[exports.WorkspaceElementChangeType.DELETE]: new Set(),
|
|
9935
|
+
};
|
|
9936
|
+
const primaryMap = new Map();
|
|
9937
|
+
const otherMap = new Map();
|
|
9938
|
+
const typeMap = new Map();
|
|
9939
|
+
const allElementTypes = new Set([...Object.keys(primaryExport), ...Object.keys(targetExport)]);
|
|
9940
|
+
for (const elementType of allElementTypes) {
|
|
9941
|
+
const type = elementType;
|
|
9942
|
+
const primaryElements = primaryExport[type] || [];
|
|
9943
|
+
for (const element of primaryElements) {
|
|
9944
|
+
primaryMap.set(element.uuid, element);
|
|
9945
|
+
typeMap.set(element.uuid, type);
|
|
9946
|
+
}
|
|
9947
|
+
const otherElements = targetExport[type] || [];
|
|
9948
|
+
for (const element of otherElements) {
|
|
9949
|
+
otherMap.set(element.uuid, element);
|
|
9950
|
+
typeMap.set(element.uuid, type);
|
|
9951
|
+
}
|
|
9952
|
+
}
|
|
9953
|
+
for (const [uuid] of typeMap) {
|
|
9954
|
+
const primaryElement = primaryMap.get(uuid);
|
|
9955
|
+
const otherElement = otherMap.get(uuid);
|
|
9956
|
+
const change = compareElementExports(primaryElement, otherElement);
|
|
9957
|
+
if (change) {
|
|
9958
|
+
changes.push(change);
|
|
9959
|
+
}
|
|
9960
|
+
}
|
|
9961
|
+
changes.forEach((change) => {
|
|
9962
|
+
result[change.type].add(change.uuid);
|
|
9963
|
+
});
|
|
9964
|
+
return result;
|
|
9965
|
+
}
|
|
9966
|
+
function compareElementExports(primaryElement, targetElement) {
|
|
9967
|
+
if (primaryElement && !targetElement) {
|
|
9968
|
+
return {
|
|
9969
|
+
type: exports.WorkspaceElementChangeType.CREATE,
|
|
9970
|
+
uuid: primaryElement.uuid,
|
|
9971
|
+
};
|
|
9972
|
+
}
|
|
9973
|
+
if (!primaryElement && targetElement) {
|
|
9974
|
+
return {
|
|
9975
|
+
type: exports.WorkspaceElementChangeType.DELETE,
|
|
9976
|
+
uuid: targetElement.uuid,
|
|
9977
|
+
};
|
|
9978
|
+
}
|
|
9979
|
+
if (primaryElement && targetElement && !deepEqual(primaryElement, targetElement)) {
|
|
9980
|
+
return {
|
|
9981
|
+
type: exports.WorkspaceElementChangeType.UPDATE,
|
|
9982
|
+
uuid: primaryElement.uuid,
|
|
9983
|
+
};
|
|
9984
|
+
}
|
|
9985
|
+
return undefined;
|
|
9986
|
+
}
|
|
9987
|
+
|
|
9917
9988
|
const WorkspaceElementSpecs = {
|
|
9918
9989
|
[exports.WorkspaceElementType.Customer]: {
|
|
9919
9990
|
type: exports.WorkspaceElementType.Customer,
|
|
@@ -10267,6 +10338,7 @@ const ERROR_CLASS_BY_TYPE = {
|
|
|
10267
10338
|
[exports.ErrorType.ACTION_INSTANCE_SETUP]: ActionInstanceSetupError,
|
|
10268
10339
|
[exports.ErrorType.UNIT_RUN]: UnitRunError,
|
|
10269
10340
|
[exports.ErrorType.CUSTOM_CODE]: CustomCodeError,
|
|
10341
|
+
[exports.ErrorType.INSUFFICIENT_CREDIT]: InsufficientCreditsError,
|
|
10270
10342
|
};
|
|
10271
10343
|
function getErrorFromData(data) {
|
|
10272
10344
|
if (typeof data === 'object' &&
|
|
@@ -10622,13 +10694,137 @@ const EDITABLE_LIMITS = [
|
|
|
10622
10694
|
'parallelFlowRunsPerConnection',
|
|
10623
10695
|
];
|
|
10624
10696
|
|
|
10697
|
+
const OrgWorkspaceSchema = zod.z.object({
|
|
10698
|
+
id: zod.z.string(),
|
|
10699
|
+
name: zod.z.string(),
|
|
10700
|
+
orgId: zod.z.string(),
|
|
10701
|
+
apiBaseUri: zod.z.string().optional(),
|
|
10702
|
+
key: zod.z.string(),
|
|
10703
|
+
secret: zod.z.string(),
|
|
10704
|
+
createdAt: zod.z.coerce.date(),
|
|
10705
|
+
updatedAt: zod.z.coerce.date(),
|
|
10706
|
+
engineAccessToken: zod.z.string().optional(),
|
|
10707
|
+
onboardingStep: zod.z.nativeEnum(exports.WorkspaceOnboardingStep).optional(),
|
|
10708
|
+
trialEndDate: zod.z.string().optional(),
|
|
10709
|
+
featureFlags: zod.z.array(zod.z.string()).optional(),
|
|
10710
|
+
logoUri: zod.z.string().optional(),
|
|
10711
|
+
});
|
|
10712
|
+
const OrgWorkspaceUser = zod.z.object({
|
|
10713
|
+
id: zod.z.string(),
|
|
10714
|
+
workspaceId: zod.z.string(),
|
|
10715
|
+
testCustomerId: zod.z.string(),
|
|
10716
|
+
userId: zod.z.string(),
|
|
10717
|
+
role: zod.z.string(),
|
|
10718
|
+
});
|
|
10719
|
+
|
|
10720
|
+
const WorkspaceLimit = zod.z.object({
|
|
10721
|
+
value: zod.z.number().optional(),
|
|
10722
|
+
defaultValue: zod.z.number().optional(),
|
|
10723
|
+
unit: zod.z.nativeEnum(exports.LimitUnits),
|
|
10724
|
+
});
|
|
10725
|
+
const WorkspaceLimitsSchema = zod.z.object({
|
|
10726
|
+
parallelEventPulls: WorkspaceLimit.optional(),
|
|
10727
|
+
parallelIncrementalEventPullsPerConnection: WorkspaceLimit.optional(),
|
|
10728
|
+
parallelFullSyncEventPullsPerConnection: WorkspaceLimit.optional(),
|
|
10729
|
+
parallelFlowRuns: WorkspaceLimit.optional(),
|
|
10730
|
+
parallelFlowRunsPerConnection: WorkspaceLimit.optional(),
|
|
10731
|
+
parallelApiRequests: WorkspaceLimit.optional(),
|
|
10732
|
+
parallelSseRequests: WorkspaceLimit.optional(),
|
|
10733
|
+
parallelBackgroundJobs: WorkspaceLimit.optional(),
|
|
10734
|
+
parallelEventLogs: WorkspaceLimit.optional(),
|
|
10735
|
+
parallelEventLogsPerConnection: WorkspaceLimit.optional(),
|
|
10736
|
+
ParallelWriteDatabaseRequests: WorkspaceLimit.optional(),
|
|
10737
|
+
fileUploadsMbPerHour: WorkspaceLimit.optional(),
|
|
10738
|
+
apiRequestsPerSecond: WorkspaceLimit.optional(),
|
|
10739
|
+
apiRequestsPerHour: WorkspaceLimit.optional(),
|
|
10740
|
+
webhookRequestsPerSecond: WorkspaceLimit.optional(),
|
|
10741
|
+
webhookRequestsPerHour: WorkspaceLimit.optional(),
|
|
10742
|
+
workspaceElementCreationsPerSecond: WorkspaceLimit.optional(),
|
|
10743
|
+
workspaceElementCreationsPerHour: WorkspaceLimit.optional(),
|
|
10744
|
+
createDatabaseRequestsPerSecond: WorkspaceLimit.optional(),
|
|
10745
|
+
totalNumberOfCustomers: WorkspaceLimit.optional(),
|
|
10746
|
+
totalNumberOfConnections: WorkspaceLimit.optional(),
|
|
10747
|
+
totalNumberOfWorkspaceElements: WorkspaceLimit.optional(),
|
|
10748
|
+
parallelApiRequestsPerCustomer: WorkspaceLimit.optional(),
|
|
10749
|
+
parallelBackgroundJobsPerCustomer: WorkspaceLimit.optional(),
|
|
10750
|
+
apiRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
10751
|
+
apiRequestsPerCustomerPerHour: WorkspaceLimit.optional(),
|
|
10752
|
+
webhookRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
10753
|
+
webhookRequestsPerCustomerPerHour: WorkspaceLimit.optional(),
|
|
10754
|
+
externalEventsPerCustomerPerDay: WorkspaceLimit.optional(),
|
|
10755
|
+
createDatabaseRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
10756
|
+
updateDatabaseRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
10757
|
+
parallelWriteDatabaseRequestsPerCustomer: WorkspaceLimit.optional(),
|
|
10758
|
+
});
|
|
10759
|
+
const EngineWorkspaceSettingsSchema = zod.z.object({
|
|
10760
|
+
enableApiLogs: zod.z.boolean().optional(),
|
|
10761
|
+
enableWebhookLogs: zod.z.boolean().optional(),
|
|
10762
|
+
enableActionRunLogs: zod.z.boolean().optional(),
|
|
10763
|
+
disableSecretKeyAuth: zod.z.boolean().optional(),
|
|
10764
|
+
});
|
|
10765
|
+
const AppPublicKey = zod.z.object({
|
|
10766
|
+
name: zod.z.string(),
|
|
10767
|
+
publicKey: zod.z.string(),
|
|
10768
|
+
});
|
|
10769
|
+
const AppSchema = zod.z.object({
|
|
10770
|
+
id: zod.z.string(),
|
|
10771
|
+
key: zod.z.string(),
|
|
10772
|
+
logoUri: zod.z.string().optional(),
|
|
10773
|
+
userFieldsSchema: zod.z.any().optional(),
|
|
10774
|
+
apiBaseUri: zod.z.string().optional(),
|
|
10775
|
+
webhookUri: zod.z.string().optional(),
|
|
10776
|
+
publicKey: zod.z.string().optional(),
|
|
10777
|
+
publicKeys: zod.z.array(AppPublicKey).optional(),
|
|
10778
|
+
enabledWebhookEvents: zod.z.array(zod.z.string()).optional(),
|
|
10779
|
+
auth: zod.z.any().optional(),
|
|
10780
|
+
credentialsSchema: zod.z.any().optional(),
|
|
10781
|
+
apiClient: zod.z.any().optional(),
|
|
10782
|
+
apiRequestHeaders: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
10783
|
+
apiRequestQuery: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
10784
|
+
isOnPrem: zod.z.boolean().optional(),
|
|
10785
|
+
connectorBaseUri: zod.z.string().optional(),
|
|
10786
|
+
connectorRevision: zod.z.string().optional(),
|
|
10787
|
+
featureFlags: zod.z.array(zod.z.string()).optional(),
|
|
10788
|
+
limits: WorkspaceLimitsSchema.optional(),
|
|
10789
|
+
settings: EngineWorkspaceSettingsSchema.optional(),
|
|
10790
|
+
type: zod.z.nativeEnum(exports.WorkspaceType).optional(),
|
|
10791
|
+
jwksUri: zod.z.string().nullable().optional(),
|
|
10792
|
+
isTrial: zod.z.boolean().optional(),
|
|
10793
|
+
isThrottled: zod.z.boolean().optional(),
|
|
10794
|
+
isDisabled: zod.z.boolean().optional(),
|
|
10795
|
+
isBackgroundJobsDisabled: zod.z.boolean().optional(),
|
|
10796
|
+
});
|
|
10797
|
+
|
|
10798
|
+
const PlatformUserSchema = zod.z.object({
|
|
10799
|
+
id: zod.z.string(),
|
|
10800
|
+
email: zod.z.string(),
|
|
10801
|
+
name: zod.z.string(),
|
|
10802
|
+
trialRequested: zod.z.boolean(),
|
|
10803
|
+
introVideoStatus: zod.z.string().optional(),
|
|
10804
|
+
isEligible: zod.z.boolean().optional(),
|
|
10805
|
+
emailVerified: zod.z.boolean().optional(),
|
|
10806
|
+
});
|
|
10807
|
+
const FullPlatformUser = zod.z.object({
|
|
10808
|
+
id: zod.z.string(),
|
|
10809
|
+
auth0Id: zod.z.string().optional(),
|
|
10810
|
+
email: zod.z.string(),
|
|
10811
|
+
name: zod.z.string(),
|
|
10812
|
+
defaultAccountId: zod.z.string().optional(),
|
|
10813
|
+
defaultWorkspaceId: zod.z.string().optional(),
|
|
10814
|
+
isAdmin: zod.z.boolean().optional(),
|
|
10815
|
+
trialRequested: zod.z.boolean(),
|
|
10816
|
+
pat: zod.z.string().optional(),
|
|
10817
|
+
introVideoStatus: zod.z.string().optional(),
|
|
10818
|
+
isEligible: zod.z.boolean().optional(),
|
|
10819
|
+
emailVerified: zod.z.boolean().optional(),
|
|
10820
|
+
});
|
|
10821
|
+
|
|
10625
10822
|
exports.OrgLimitsType = void 0;
|
|
10626
10823
|
(function (OrgLimitsType) {
|
|
10627
10824
|
OrgLimitsType["NUMBER_OF_WORKSPACES"] = "numberOfWorkspaces";
|
|
10628
10825
|
OrgLimitsType["TODAY_USAGE"] = "todayUsage";
|
|
10629
10826
|
OrgLimitsType["LAST_THIRTY_DAY_USAGE"] = "lastThirtyDayUsage";
|
|
10630
10827
|
OrgLimitsType["MEMBRANE_EXPERT_CREDITS_CAP"] = "membraneExpertCreditsCapPerMonth";
|
|
10631
|
-
OrgLimitsType["MEMBRANE_AGENT_LAST_THIRTY_DAYS_USAGE"] = "membraneAgentLastThirtyDaysUsage";
|
|
10632
10828
|
})(exports.OrgLimitsType || (exports.OrgLimitsType = {}));
|
|
10633
10829
|
exports.OrgUserRole = void 0;
|
|
10634
10830
|
(function (OrgUserRole) {
|
|
@@ -10640,6 +10836,55 @@ exports.OrgUserStatus = void 0;
|
|
|
10640
10836
|
OrgUserStatus["Invited"] = "invited";
|
|
10641
10837
|
OrgUserStatus["Active"] = "active";
|
|
10642
10838
|
})(exports.OrgUserStatus || (exports.OrgUserStatus = {}));
|
|
10839
|
+
const OrgLimits = zod.z
|
|
10840
|
+
.object({
|
|
10841
|
+
numberOfWorkspaces: zod.z.number().optional(),
|
|
10842
|
+
todayUsage: zod.z.number().optional(),
|
|
10843
|
+
lastThirtyDayUsage: zod.z.number().optional(),
|
|
10844
|
+
membraneAgentLastThirtyDaysUsage: zod.z.number().optional(),
|
|
10845
|
+
membraneExpertCreditsCapPerMonth: zod.z.number().nullable().optional(),
|
|
10846
|
+
})
|
|
10847
|
+
.optional();
|
|
10848
|
+
const MembraneAgentKey = zod.z
|
|
10849
|
+
.object({
|
|
10850
|
+
key: zod.z.string().optional(),
|
|
10851
|
+
expiresAt: zod.z.string().optional(),
|
|
10852
|
+
})
|
|
10853
|
+
.optional();
|
|
10854
|
+
const OrgSchema = zod.z.object({
|
|
10855
|
+
id: zod.z.string(),
|
|
10856
|
+
key: zod.z.string(),
|
|
10857
|
+
name: zod.z.string(),
|
|
10858
|
+
createdAt: zod.z.coerce.date(),
|
|
10859
|
+
updatedAt: zod.z.coerce.date(),
|
|
10860
|
+
trialEndDate: zod.z.string().optional(),
|
|
10861
|
+
lastTrialExtensionDate: zod.z.string().optional(),
|
|
10862
|
+
limits: OrgLimits,
|
|
10863
|
+
thirtyDayTotalCredits: zod.z.number().optional(),
|
|
10864
|
+
lastThirtyDayUsagePercent: zod.z.number().optional(),
|
|
10865
|
+
todayUsagePercent: zod.z.number().optional(),
|
|
10866
|
+
domains: zod.z.array(zod.z.string()).optional(),
|
|
10867
|
+
featureFlags: zod.z.array(zod.z.string()).optional(),
|
|
10868
|
+
freeAiMonthlyCredits: zod.z.number().optional(),
|
|
10869
|
+
paidAiCredits: zod.z.number().optional(),
|
|
10870
|
+
stripeCustomerId: zod.z.string().optional(),
|
|
10871
|
+
});
|
|
10872
|
+
const AccountResponse = zod.z.object({
|
|
10873
|
+
user: FullPlatformUser.optional(),
|
|
10874
|
+
workspace: OrgWorkspaceSchema.optional(),
|
|
10875
|
+
workspaces: zod.z.array(OrgWorkspaceSchema).optional(),
|
|
10876
|
+
workspaceUser: OrgWorkspaceUser.extend({
|
|
10877
|
+
testCustomerId: zod.z.string(),
|
|
10878
|
+
}).optional(),
|
|
10879
|
+
engineTestUser: BaseCustomer.optional(),
|
|
10880
|
+
testCustomer: BaseCustomer.optional(),
|
|
10881
|
+
engineApp: AppSchema.optional(),
|
|
10882
|
+
superAdminToken: zod.z.string().optional().nullable(),
|
|
10883
|
+
orgs: zod.z.array(OrgSchema).optional(),
|
|
10884
|
+
permissions: zod.z.array(zod.z.string()).optional(),
|
|
10885
|
+
message: zod.z.string().optional(),
|
|
10886
|
+
error: zod.z.string().optional(),
|
|
10887
|
+
});
|
|
10643
10888
|
|
|
10644
10889
|
exports.WebhookTypeEnum = void 0;
|
|
10645
10890
|
(function (WebhookTypeEnum) {
|
|
@@ -12404,15 +12649,39 @@ const AgentSession = zod.z.object({
|
|
|
12404
12649
|
storedMessagesUri: zod.z.string().url().optional(),
|
|
12405
12650
|
sessionFilesZipUri: zod.z.string().url().optional(),
|
|
12406
12651
|
logs: zod.z.array(zod.z.any()).optional(),
|
|
12652
|
+
usage: zod.z.number().optional(),
|
|
12407
12653
|
});
|
|
12408
12654
|
const CreateAgentSession = zod.z.object({
|
|
12409
12655
|
workspaceElementType: zod.z.enum(exports.WorkspaceElementType),
|
|
12410
12656
|
workspaceElementId: zod.z.string().min(1),
|
|
12411
12657
|
prompt: zod.z.string().min(1),
|
|
12658
|
+
testCustomerId: zod.z.string().optional(),
|
|
12412
12659
|
});
|
|
12413
12660
|
const AgentSessionInputSchema = zod.z.object({
|
|
12414
|
-
input: zod.z.string().
|
|
12415
|
-
|
|
12661
|
+
input: zod.z.string().min(1),
|
|
12662
|
+
synthetic: zod.z.boolean().optional(),
|
|
12663
|
+
});
|
|
12664
|
+
|
|
12665
|
+
exports.InteractiveMcpToolName = void 0;
|
|
12666
|
+
(function (InteractiveMcpToolName) {
|
|
12667
|
+
InteractiveMcpToolName["REQUEST_TEST_CONNECTION"] = "requestTestConnection";
|
|
12668
|
+
})(exports.InteractiveMcpToolName || (exports.InteractiveMcpToolName = {}));
|
|
12669
|
+
exports.InteractiveMcpToolStatus = void 0;
|
|
12670
|
+
(function (InteractiveMcpToolStatus) {
|
|
12671
|
+
InteractiveMcpToolStatus["AWAITING_USER_INPUT"] = "awaiting_user_input";
|
|
12672
|
+
})(exports.InteractiveMcpToolStatus || (exports.InteractiveMcpToolStatus = {}));
|
|
12673
|
+
|
|
12674
|
+
const API_VERSIONS = {
|
|
12675
|
+
LEGACY: 'legacy',
|
|
12676
|
+
'2025-10-21': '2025-10-21',
|
|
12677
|
+
};
|
|
12678
|
+
const AVAILABLE_VERSIONS = Object.values(API_VERSIONS);
|
|
12679
|
+
const CHRONOLOGICAL_VERSIONS = [
|
|
12680
|
+
API_VERSIONS.LEGACY,
|
|
12681
|
+
...[...AVAILABLE_VERSIONS].filter((v) => v !== API_VERSIONS.LEGACY).sort(),
|
|
12682
|
+
];
|
|
12683
|
+
const LATEST_API_VERSION = CHRONOLOGICAL_VERSIONS[CHRONOLOGICAL_VERSIONS.length - 1];
|
|
12684
|
+
const VERSION_HEADER = 'membrane-api-version';
|
|
12416
12685
|
|
|
12417
12686
|
function decodeJWT(token) {
|
|
12418
12687
|
if (typeof token !== 'string') {
|
|
@@ -12536,6 +12805,7 @@ class MembraneApiClient {
|
|
|
12536
12805
|
params.headers = {
|
|
12537
12806
|
...(params.headers || {}),
|
|
12538
12807
|
Authorization: `Bearer ${token}`,
|
|
12808
|
+
[VERSION_HEADER]: LATEST_API_VERSION,
|
|
12539
12809
|
};
|
|
12540
12810
|
params.withCredentials = false;
|
|
12541
12811
|
let response;
|
|
@@ -12712,6 +12982,7 @@ injectFormulaCatalog(getFormula, isFormula, hasFormulas);
|
|
|
12712
12982
|
|
|
12713
12983
|
exports.ACTIONS = ACTIONS;
|
|
12714
12984
|
exports.AccessDeniedError = AccessDeniedError;
|
|
12985
|
+
exports.AccountResponse = AccountResponse;
|
|
12715
12986
|
exports.ActionAccessor = ActionAccessor;
|
|
12716
12987
|
exports.ActionApiResponse = ActionApiResponse;
|
|
12717
12988
|
exports.ActionDependency = ActionDependency;
|
|
@@ -12741,6 +13012,8 @@ exports.AppEventSubscriptionsAccessor = AppEventSubscriptionsAccessor;
|
|
|
12741
13012
|
exports.AppEventTypeAccessor = AppEventTypeAccessor;
|
|
12742
13013
|
exports.AppEventTypeApiResponse = AppEventTypeApiResponse;
|
|
12743
13014
|
exports.AppEventTypesAccessor = AppEventTypesAccessor;
|
|
13015
|
+
exports.AppPublicKey = AppPublicKey;
|
|
13016
|
+
exports.AppSchema = AppSchema;
|
|
12744
13017
|
exports.AppliedToIntegrations = AppliedToIntegrations;
|
|
12745
13018
|
exports.BadRequestError = BadRequestError;
|
|
12746
13019
|
exports.BaseAction = BaseAction;
|
|
@@ -12902,6 +13175,7 @@ exports.ElementInstanceAccessor = ElementInstanceAccessor;
|
|
|
12902
13175
|
exports.ElementInstanceListAccessor = ElementInstanceListAccessor;
|
|
12903
13176
|
exports.ElementListAccessor = ElementListAccessor;
|
|
12904
13177
|
exports.ElementsExportFields = ElementsExportFields;
|
|
13178
|
+
exports.EngineWorkspaceSettingsSchema = EngineWorkspaceSettingsSchema;
|
|
12905
13179
|
exports.ErrorData = ErrorData;
|
|
12906
13180
|
exports.ErrorDataSchema = ErrorDataSchema;
|
|
12907
13181
|
exports.ExternalEvent = ExternalEvent;
|
|
@@ -12968,10 +13242,12 @@ exports.FlowRunNode = FlowRunNode;
|
|
|
12968
13242
|
exports.FlowRunsAccessor = FlowRunsAccessor;
|
|
12969
13243
|
exports.FlowsAccessor = FlowsAccessor;
|
|
12970
13244
|
exports.Formula = Formula;
|
|
13245
|
+
exports.FullPlatformUser = FullPlatformUser;
|
|
12971
13246
|
exports.HTTP_REQUEST_SCHEMA = HTTP_REQUEST_SCHEMA;
|
|
12972
13247
|
exports.HandyScenarioTemplateElement = HandyScenarioTemplateElement;
|
|
12973
13248
|
exports.HttpRequestSpec = HttpRequestSpec;
|
|
12974
13249
|
exports.IncludeArchivedQuery = IncludeArchivedQuery;
|
|
13250
|
+
exports.InsufficientCreditsError = InsufficientCreditsError;
|
|
12975
13251
|
exports.IntegrationAccessor = IntegrationAccessor;
|
|
12976
13252
|
exports.IntegrationApiResponse = IntegrationApiResponse;
|
|
12977
13253
|
exports.IntegrationAppClient = MembraneClient;
|
|
@@ -12998,6 +13274,7 @@ exports.ListFlowInstancesForConnectionQuery = ListFlowInstancesForConnectionQuer
|
|
|
12998
13274
|
exports.MEMBRANE_ELEMENT_CONFIG_FILE_NAME = MEMBRANE_ELEMENT_CONFIG_FILE_NAME;
|
|
12999
13275
|
exports.MIN_FULL_SYNC_INTERVAL_SECONDS = MIN_FULL_SYNC_INTERVAL_SECONDS;
|
|
13000
13276
|
exports.MIN_PULL_UPDATES_INTERVAL_SECONDS = MIN_PULL_UPDATES_INTERVAL_SECONDS;
|
|
13277
|
+
exports.MembraneAgentKey = MembraneAgentKey;
|
|
13001
13278
|
exports.MembraneAxiosInstance = axios;
|
|
13002
13279
|
exports.MembraneClient = MembraneClient;
|
|
13003
13280
|
exports.MembraneError = MembraneError;
|
|
@@ -13006,6 +13283,10 @@ exports.NotAuthenticatedError = NotAuthenticatedError;
|
|
|
13006
13283
|
exports.NotFoundError = NotFoundError;
|
|
13007
13284
|
exports.OAUTH1_CONFIG_SCHEMA = OAUTH1_CONFIG_SCHEMA;
|
|
13008
13285
|
exports.OAUTH_CONFIG_SCHEMA = OAUTH_CONFIG_SCHEMA;
|
|
13286
|
+
exports.OrgLimits = OrgLimits;
|
|
13287
|
+
exports.OrgSchema = OrgSchema;
|
|
13288
|
+
exports.OrgWorkspaceSchema = OrgWorkspaceSchema;
|
|
13289
|
+
exports.OrgWorkspaceUser = OrgWorkspaceUser;
|
|
13009
13290
|
exports.PARALLEL_EXECUTION_LIMITS = PARALLEL_EXECUTION_LIMITS;
|
|
13010
13291
|
exports.PackageAccessor = PackageAccessor;
|
|
13011
13292
|
exports.PackageApiResponse = PackageApiResponse;
|
|
@@ -13018,6 +13299,7 @@ exports.PackageExportProperties = PackageExportProperties;
|
|
|
13018
13299
|
exports.PackagesAccessor = PackagesAccessor;
|
|
13019
13300
|
exports.PaginationQuery = PaginationQuery;
|
|
13020
13301
|
exports.PaginationResponse = PaginationResponse;
|
|
13302
|
+
exports.PlatformUserSchema = PlatformUserSchema;
|
|
13021
13303
|
exports.RATE_LIMITS = RATE_LIMITS;
|
|
13022
13304
|
exports.RateLimitExceededError = RateLimitExceededError;
|
|
13023
13305
|
exports.ResetFlowInstanceOptions = ResetFlowInstanceOptions;
|
|
@@ -13050,6 +13332,7 @@ exports.UserAccessor = UserAccessor;
|
|
|
13050
13332
|
exports.UsersAccessor = UsersAccessor;
|
|
13051
13333
|
exports.WORKSPACE_SIZE_LIMITS = WORKSPACE_SIZE_LIMITS;
|
|
13052
13334
|
exports.WorkspaceElementSpecs = WorkspaceElementSpecs;
|
|
13335
|
+
exports.WorkspaceLimitsSchema = WorkspaceLimitsSchema;
|
|
13053
13336
|
exports.__resolveValue = __resolveValue;
|
|
13054
13337
|
exports.addRequiredFieldsToSchema = addRequiredFieldsToSchema;
|
|
13055
13338
|
exports.addUdmFallbackFields = addUdmFallbackFields;
|
|
@@ -13057,6 +13340,7 @@ exports.backwardCompatibleFilterMatch = backwardCompatibleFilterMatch;
|
|
|
13057
13340
|
exports.buildData = buildData;
|
|
13058
13341
|
exports.buildDataSchema = buildDataSchema;
|
|
13059
13342
|
exports.buildValue = buildValue;
|
|
13343
|
+
exports.compareWorkspaceExports = compareWorkspaceExports;
|
|
13060
13344
|
exports.compressDataSchema = compressDataSchema;
|
|
13061
13345
|
exports.createCompoundSchema = createCompoundSchema;
|
|
13062
13346
|
exports.createFlowInstanceSchema = createFlowInstanceSchema;
|