@activepieces/shared 0.17.1 → 0.17.3
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/package.json +3 -2
- package/src/lib/agents/content.d.ts +6 -6
- package/src/lib/agents/content.js +1 -1
- package/src/lib/agents/content.js.map +1 -1
- package/src/lib/agents/index.d.ts +88 -7
- package/src/lib/agents/index.js +26 -9
- package/src/lib/agents/index.js.map +1 -1
- package/src/lib/ai/ai-sdk.d.ts +3 -1
- package/src/lib/ai/ai-sdk.js +28 -1
- package/src/lib/ai/ai-sdk.js.map +1 -1
- package/src/lib/ai/index.d.ts +43 -0
- package/src/lib/ai/index.js +48 -2
- package/src/lib/ai/index.js.map +1 -1
- package/src/lib/analytics/index.d.ts +6 -2
- package/src/lib/analytics/index.js +4 -15
- package/src/lib/analytics/index.js.map +1 -1
- package/src/lib/common/activepieces-error.d.ts +11 -5
- package/src/lib/common/activepieces-error.js +2 -1
- package/src/lib/common/activepieces-error.js.map +1 -1
- package/src/lib/common/utils/object-utils.d.ts +1 -0
- package/src/lib/common/utils/object-utils.js +10 -1
- package/src/lib/common/utils/object-utils.js.map +1 -1
- package/src/lib/flag/flag.d.ts +0 -1
- package/src/lib/flag/flag.js +0 -1
- package/src/lib/flag/flag.js.map +1 -1
- package/src/lib/flows/flow-version.d.ts +1 -1
- package/src/lib/flows/flow-version.js +1 -1
- package/src/lib/flows/operations/migrations/index.d.ts +1 -1
- package/src/lib/flows/operations/migrations/index.js +8 -1
- package/src/lib/flows/operations/migrations/index.js.map +1 -1
- package/src/lib/flows/operations/migrations/migrate-v0-branch-to-router.js +1 -5
- package/src/lib/flows/operations/migrations/migrate-v0-branch-to-router.js.map +1 -1
- package/src/lib/flows/operations/migrations/migrate-v1-connection-ids.js +2 -5
- package/src/lib/flows/operations/migrations/migrate-v1-connection-ids.js.map +1 -1
- package/src/lib/flows/operations/migrations/migrate-v2-agent-piece.js +10 -13
- package/src/lib/flows/operations/migrations/migrate-v2-agent-piece.js.map +1 -1
- package/src/lib/flows/operations/migrations/migrate-v3-agent-piece.d.ts +2 -0
- package/src/lib/flows/operations/migrations/migrate-v3-agent-piece.js +19 -0
- package/src/lib/flows/operations/migrations/migrate-v3-agent-piece.js.map +1 -0
- package/src/lib/mcp/mcp.request.d.ts +1 -2
- package/src/lib/mcp/mcp.request.js +3 -3
- package/src/lib/mcp/mcp.request.js.map +1 -1
- package/src/lib/platform/platform.model.d.ts +35 -25
- package/src/lib/platform/platform.model.js +3 -2
- package/src/lib/platform/platform.model.js.map +1 -1
- package/src/lib/platform/platform.request.d.ts +7 -0
- package/src/lib/platform/platform.request.js +7 -1
- package/src/lib/platform/platform.request.js.map +1 -1
- package/src/lib/project/project.d.ts +3 -0
- package/src/lib/project/project.js +1 -1
- package/src/lib/project/project.js.map +1 -1
- package/src/lib/tables/dto/records.dto.d.ts +1 -0
- package/src/lib/tables/dto/records.dto.js +1 -0
- package/src/lib/tables/dto/records.dto.js.map +1 -1
- package/src/lib/tables/dto/tables.dto.d.ts +8 -1
- package/src/lib/tables/dto/tables.dto.js +8 -2
- package/src/lib/tables/dto/tables.dto.js.map +1 -1
- package/src/lib/tables/table.d.ts +34 -0
- package/src/lib/tables/table.js +14 -2
- package/src/lib/tables/table.js.map +1 -1
- package/src/lib/todos/index.d.ts +1 -1
- package/src/lib/user/user.d.ts +14 -1
- package/src/lib/user/user.js +13 -0
- package/src/lib/user/user.js.map +1 -1
- package/src/lib/websocket/index.d.ts +2 -1
- package/src/lib/websocket/index.js +1 -0
- package/src/lib/websocket/index.js.map +1 -1
- package/src/lib/workers/index.d.ts +1 -0
- package/src/lib/workers/index.js +1 -0
- package/src/lib/workers/index.js.map +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PlatformAnalyticsReport = exports.AnalyticsProjectReport = exports.AnalyticsProjectReportItem = exports.AnalyticsPieceReport = exports.AnalyticsPieceReportItem = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const base_model_1 = require("../common/base-model");
|
|
5
6
|
exports.AnalyticsPieceReportItem = typebox_1.Type.Object({
|
|
6
7
|
name: typebox_1.Type.String(),
|
|
7
8
|
displayName: typebox_1.Type.String(),
|
|
@@ -16,20 +17,8 @@ exports.AnalyticsProjectReportItem = typebox_1.Type.Object({
|
|
|
16
17
|
totalFlows: typebox_1.Type.Number(),
|
|
17
18
|
});
|
|
18
19
|
exports.AnalyticsProjectReport = typebox_1.Type.Array(exports.AnalyticsProjectReportItem);
|
|
19
|
-
exports.
|
|
20
|
-
totalFlows: typebox_1.Type.Number(),
|
|
21
|
-
activeFlows: typebox_1.Type.Number(),
|
|
22
|
-
totalUsers: typebox_1.Type.Number(),
|
|
23
|
-
activeUsers: typebox_1.Type.Number(),
|
|
24
|
-
totalProjects: typebox_1.Type.Number(),
|
|
25
|
-
activeProjects: typebox_1.Type.Number(),
|
|
26
|
-
uniquePiecesUsed: typebox_1.Type.Number(),
|
|
27
|
-
activeFlowsWithAI: typebox_1.Type.Number(),
|
|
28
|
-
topPieces: exports.AnalyticsPieceReport,
|
|
29
|
-
tasksUsage: typebox_1.Type.Array(typebox_1.Type.Object({
|
|
20
|
+
exports.PlatformAnalyticsReport = typebox_1.Type.Object(Object.assign(Object.assign({}, base_model_1.BaseModelSchema), { totalFlows: typebox_1.Type.Number(), activeFlows: typebox_1.Type.Number(), totalUsers: typebox_1.Type.Number(), activeUsers: typebox_1.Type.Number(), totalProjects: typebox_1.Type.Number(), activeProjects: typebox_1.Type.Number(), uniquePiecesUsed: typebox_1.Type.Number(), activeFlowsWithAI: typebox_1.Type.Number(), topPieces: exports.AnalyticsPieceReport, tasksUsage: typebox_1.Type.Array(typebox_1.Type.Object({
|
|
30
21
|
day: typebox_1.Type.String(),
|
|
31
22
|
totalTasks: typebox_1.Type.Number(),
|
|
32
|
-
})),
|
|
33
|
-
topProjects: exports.AnalyticsProjectReport,
|
|
34
|
-
});
|
|
23
|
+
})), topProjects: exports.AnalyticsProjectReport, platformId: typebox_1.Type.String() }));
|
|
35
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/analytics/index.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/analytics/index.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,qDAAsD;AAGzC,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE;IAC1B,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,cAAI,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAA;AAGW,QAAA,oBAAoB,GAAG,cAAI,CAAC,KAAK,CAAC,gCAAwB,CAAC,CAAA;AAG3D,QAAA,0BAA0B,GAAG,cAAI,CAAC,MAAM,CAAC;IAClD,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE;IAC1B,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE;IAC1B,UAAU,EAAE,cAAI,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAA;AAGW,QAAA,sBAAsB,GAAG,cAAI,CAAC,KAAK,CAAC,kCAA0B,CAAC,CAAA;AAG/D,QAAA,uBAAuB,GAAG,cAAI,CAAC,MAAM,iCAC3C,4BAAe,KAClB,UAAU,EAAE,cAAI,CAAC,MAAM,EAAE,EACzB,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE,EAC1B,UAAU,EAAE,cAAI,CAAC,MAAM,EAAE,EACzB,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE,EAC1B,aAAa,EAAE,cAAI,CAAC,MAAM,EAAE,EAC5B,cAAc,EAAE,cAAI,CAAC,MAAM,EAAE,EAC7B,gBAAgB,EAAE,cAAI,CAAC,MAAM,EAAE,EAC/B,iBAAiB,EAAE,cAAI,CAAC,MAAM,EAAE,EAChC,SAAS,EAAE,4BAAoB,EAC/B,UAAU,EAAE,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,MAAM,CAAC;QAC/B,GAAG,EAAE,cAAI,CAAC,MAAM,EAAE;QAClB,UAAU,EAAE,cAAI,CAAC,MAAM,EAAE;KAC5B,CAAC,CAAC,EACH,WAAW,EAAE,8BAAsB,EACnC,UAAU,EAAE,cAAI,CAAC,MAAM,EAAE,IAC3B,CAAA"}
|
|
@@ -12,7 +12,13 @@ export declare class ActivepiecesError extends Error {
|
|
|
12
12
|
error: ApErrorParams;
|
|
13
13
|
constructor(error: ApErrorParams, message?: string);
|
|
14
14
|
}
|
|
15
|
-
export type ApErrorParams = AuthenticationParams | AuthorizationErrorParams | ConfigNotFoundErrorParams | EmailIsNotVerifiedErrorParams | EngineOperationFailureParams | EntityNotFoundErrorParams | ExecutionTimeoutErrorParams | ExistingUserErrorParams | FileNotFoundErrorParams | FlowFormNotFoundError | FlowNotFoundErrorParams | FlowIsLockedErrorParams | FlowOperationErrorParams | FlowRunNotFoundErrorParams | InvalidApiKeyParams | InvalidAppConnectionParams | InvalidBearerTokenParams | InvalidClaimParams | InvalidCloudClaimParams | InvalidCredentialsErrorParams | InvalidJwtTokenErrorParams | InvalidOtpParams | InvalidSAMLResponseParams | InvitationOnlySignUpParams | JobRemovalFailureErrorParams | OpenAiFailedErrorParams | PauseMetadataMissingErrorParams | PermissionDeniedErrorParams | PieceNotFoundErrorParams | PieceTriggerNotFoundErrorParams | QuotaExceededParams |
|
|
15
|
+
export type ApErrorParams = AuthenticationParams | AuthorizationErrorParams | ConfigNotFoundErrorParams | EmailIsNotVerifiedErrorParams | EngineOperationFailureParams | EntityNotFoundErrorParams | ExecutionTimeoutErrorParams | ExistingUserErrorParams | FileNotFoundErrorParams | FlowFormNotFoundError | FlowNotFoundErrorParams | FlowIsLockedErrorParams | FlowOperationErrorParams | FlowRunNotFoundErrorParams | InvalidApiKeyParams | InvalidAppConnectionParams | InvalidBearerTokenParams | InvalidClaimParams | InvalidCloudClaimParams | InvalidCredentialsErrorParams | InvalidJwtTokenErrorParams | InvalidOtpParams | InvalidSAMLResponseParams | InvitationOnlySignUpParams | JobRemovalFailureErrorParams | OpenAiFailedErrorParams | PauseMetadataMissingErrorParams | PermissionDeniedErrorParams | PieceNotFoundErrorParams | PieceTriggerNotFoundErrorParams | QuotaExceededParams | ResourceLockedParams | FeatureDisabledErrorParams | SignUpDisabledParams | StepNotFoundErrorParams | SystemInvalidErrorParams | SystemPropNotDefinedErrorParams | TestTriggerFailedErrorParams | TriggerDisableErrorParams | TriggerEnableErrorParams | TriggerFailedErrorParams | ValidationErrorParams | InvitationOnlySignUpParams | UserIsInActiveErrorParams | DomainIsNotAllowedErrorParams | EmailAuthIsDisabledParams | ExistingAlertChannelErrorParams | EmailAlreadyHasActivationKey | ProviderProxyConfigNotFoundParams | AIProviderModelNotSupportedParams | AIRequestNotSupportedParams | AICreditLimitExceededParams | SessionExpiredParams | InvalidLicenseKeyParams | NoChatResponseParams | InvalidSmtpCredentialsErrorParams | InvalidGitCredentialsParams | InvalidReleaseTypeParams | CopilotFailedErrorParams | ProjectExternalIdAlreadyExistsParams | MemoryIssueParams | InvalidCustomDomainErrorParams | McpPieceRequiresConnectionParams | McpPieceConnectionMismatchParams | ErrorUpdatingSubscriptionParams | TriggerExecutionFailedParams;
|
|
16
|
+
export type TriggerExecutionFailedParams = BaseErrorParams<ErrorCode.TRIGGER_EXECUTION_FAILED, {
|
|
17
|
+
flowId: FlowId;
|
|
18
|
+
message?: string;
|
|
19
|
+
pieceName: string;
|
|
20
|
+
pieceVersion: string;
|
|
21
|
+
}>;
|
|
16
22
|
export type BaseErrorParams<T, V> = {
|
|
17
23
|
code: T;
|
|
18
24
|
params: V;
|
|
@@ -159,10 +165,9 @@ export type InvalidAppConnectionParams = BaseErrorParams<ErrorCode.INVALID_APP_C
|
|
|
159
165
|
}>;
|
|
160
166
|
export type QuotaExceededParams = BaseErrorParams<ErrorCode.QUOTA_EXCEEDED, {
|
|
161
167
|
metric: PlatformUsageMetric;
|
|
162
|
-
quota?: number;
|
|
163
168
|
}>;
|
|
164
|
-
export type
|
|
165
|
-
|
|
169
|
+
export type ResourceLockedParams = BaseErrorParams<ErrorCode.RESOURCE_LOCKED, {
|
|
170
|
+
message: string;
|
|
166
171
|
}>;
|
|
167
172
|
export type ErrorUpdatingSubscriptionParams = BaseErrorParams<ErrorCode.ERROR_UPDATING_SUBSCRIPTION, {
|
|
168
173
|
message: string;
|
|
@@ -236,6 +241,7 @@ export declare enum ErrorCode {
|
|
|
236
241
|
ENTITY_NOT_FOUND = "ENTITY_NOT_FOUND",
|
|
237
242
|
EXECUTION_TIMEOUT = "EXECUTION_TIMEOUT",
|
|
238
243
|
MEMORY_ISSUE = "MEMORY_ISSUE",
|
|
244
|
+
TRIGGER_EXECUTION_FAILED = "TRIGGER_EXECUTION_FAILED",
|
|
239
245
|
EMAIL_AUTH_DISABLED = "EMAIL_AUTH_DISABLED",
|
|
240
246
|
EXISTING_USER = "EXISTING_USER",
|
|
241
247
|
EXISTING_ALERT_CHANNEL = "EXISTING_ALERT_CHANNEL",
|
|
@@ -265,7 +271,7 @@ export declare enum ErrorCode {
|
|
|
265
271
|
PIECE_NOT_FOUND = "PIECE_NOT_FOUND",
|
|
266
272
|
PIECE_TRIGGER_NOT_FOUND = "PIECE_TRIGGER_NOT_FOUND",
|
|
267
273
|
QUOTA_EXCEEDED = "QUOTA_EXCEEDED",
|
|
268
|
-
|
|
274
|
+
RESOURCE_LOCKED = "RESOURCE_LOCKED",
|
|
269
275
|
FEATURE_DISABLED = "FEATURE_DISABLED",
|
|
270
276
|
AI_CREDIT_LIMIT_EXCEEDED = "AI_CREDIT_LIMIT_EXCEEDED",
|
|
271
277
|
SIGN_UP_DISABLED = "SIGN_UP_DISABLED",
|
|
@@ -25,6 +25,7 @@ var ErrorCode;
|
|
|
25
25
|
ErrorCode["ENTITY_NOT_FOUND"] = "ENTITY_NOT_FOUND";
|
|
26
26
|
ErrorCode["EXECUTION_TIMEOUT"] = "EXECUTION_TIMEOUT";
|
|
27
27
|
ErrorCode["MEMORY_ISSUE"] = "MEMORY_ISSUE";
|
|
28
|
+
ErrorCode["TRIGGER_EXECUTION_FAILED"] = "TRIGGER_EXECUTION_FAILED";
|
|
28
29
|
ErrorCode["EMAIL_AUTH_DISABLED"] = "EMAIL_AUTH_DISABLED";
|
|
29
30
|
ErrorCode["EXISTING_USER"] = "EXISTING_USER";
|
|
30
31
|
ErrorCode["EXISTING_ALERT_CHANNEL"] = "EXISTING_ALERT_CHANNEL";
|
|
@@ -54,7 +55,7 @@ var ErrorCode;
|
|
|
54
55
|
ErrorCode["PIECE_NOT_FOUND"] = "PIECE_NOT_FOUND";
|
|
55
56
|
ErrorCode["PIECE_TRIGGER_NOT_FOUND"] = "PIECE_TRIGGER_NOT_FOUND";
|
|
56
57
|
ErrorCode["QUOTA_EXCEEDED"] = "QUOTA_EXCEEDED";
|
|
57
|
-
ErrorCode["
|
|
58
|
+
ErrorCode["RESOURCE_LOCKED"] = "RESOURCE_LOCKED";
|
|
58
59
|
ErrorCode["FEATURE_DISABLED"] = "FEATURE_DISABLED";
|
|
59
60
|
ErrorCode["AI_CREDIT_LIMIT_EXCEEDED"] = "AI_CREDIT_LIMIT_EXCEEDED";
|
|
60
61
|
ErrorCode["SIGN_UP_DISABLED"] = "SIGN_UP_DISABLED";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activepieces-error.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/activepieces-error.ts"],"names":[],"mappings":";;;AAWA,MAAa,iBAAkB,SAAQ,KAAK;IACxC,YAAmB,KAAoB,EAAE,OAAgB;QACrD,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QADpC,UAAK,GAAL,KAAK,CAAe;IAEvC,CAAC;CACJ;AAJD,8CAIC;
|
|
1
|
+
{"version":3,"file":"activepieces-error.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/activepieces-error.ts"],"names":[],"mappings":";;;AAWA,MAAa,iBAAkB,SAAQ,KAAK;IACxC,YAAmB,KAAoB,EAAE,OAAgB;QACrD,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QADpC,UAAK,GAAL,KAAK,CAAe;IAEvC,CAAC;CACJ;AAJD,8CAIC;AA4cD,IAAY,SAmEX;AAnED,WAAY,SAAS;IACjB,4DAA+C,CAAA;IAC/C,kDAAqC,CAAA;IACrC,wEAA2D,CAAA;IAC3D,8CAAiC,CAAA;IACjC,4CAA+B,CAAA;IAC/B,0GAA6F,CAAA;IAC7F,8DAAiD,CAAA;IACjD,kEAAqD,CAAA;IACrD,kDAAqC,CAAA;IACrC,sDAAyC,CAAA;IACzC,4DAA+C,CAAA;IAC/C,kEAAqD,CAAA;IACrD,kDAAqC,CAAA;IACrC,oDAAuC,CAAA;IACvC,0CAA6B,CAAA;IAC7B,kEAAqD,CAAA;IACrD,wDAA2C,CAAA;IAC3C,4CAA+B,CAAA;IAC/B,8DAAiD,CAAA;IACjD,sFAAyE,CAAA;IACzE,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,2DAA8C,CAAA;IAC9C,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,wCAA2B,CAAA;IAC3B,sDAAyC,CAAA;IACzC,gDAAmC,CAAA;IACnC,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;IAC/B,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,0EAA6D,CAAA;IAC7D,wCAA2B,CAAA;IAC3B,4DAA+C,CAAA;IAC/C,gEAAmD,CAAA;IACnD,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,oDAAuC,CAAA;IACvC,gDAAmC,CAAA;IACnC,gEAAmD,CAAA;IACnD,8CAAiC,CAAA;IACjC,gDAAmC,CAAA;IACnC,kDAAqC,CAAA;IACrC,kEAAqD,CAAA;IACrD,kDAAqC,CAAA;IACrC,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;IAC3C,gEAAmD,CAAA;IACnD,wDAA2C,CAAA;IAC3C,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,kDAAqC,CAAA;IACrC,sCAAyB,CAAA;IACzB,wDAA2C,CAAA;IAC3C,kFAAqE,CAAA;IACrE,kEAAqD,CAAA;IACrD,gEAAmD,CAAA;IACnD,0DAA6C,CAAA;IAC7C,8CAAiC,CAAA;IACjC,4EAA+D,CAAA;IAC/D,4EAA+D,CAAA;AACnE,CAAC,EAnEW,SAAS,yBAAT,SAAS,QAmEpB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare function deleteProperties(obj: Record<string, unknown>, props: string[]): {
|
|
2
2
|
[x: string]: unknown;
|
|
3
3
|
};
|
|
4
|
+
export declare const spreadIfNotUndefined: <T>(key: string, value: T | undefined) => Record<string, T>;
|
|
4
5
|
export declare const spreadIfDefined: <T>(key: string, value: T | undefined | null) => Record<string, T>;
|
|
5
6
|
export declare function deleteProps<T extends Record<string, unknown>, K extends keyof T>(obj: T, prop: K[]): Omit<T, K>;
|
|
6
7
|
export declare function sanitizeObjectForPostgresql<T>(input: T): T;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isObject = exports.spreadIfDefined = void 0;
|
|
3
|
+
exports.isObject = exports.spreadIfDefined = exports.spreadIfNotUndefined = void 0;
|
|
4
4
|
exports.deleteProperties = deleteProperties;
|
|
5
5
|
exports.deleteProps = deleteProps;
|
|
6
6
|
exports.sanitizeObjectForPostgresql = sanitizeObjectForPostgresql;
|
|
@@ -17,6 +17,15 @@ function deleteProperties(obj, props) {
|
|
|
17
17
|
}
|
|
18
18
|
return copy;
|
|
19
19
|
}
|
|
20
|
+
const spreadIfNotUndefined = (key, value) => {
|
|
21
|
+
if (value === undefined) {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
[key]: value,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
exports.spreadIfNotUndefined = spreadIfNotUndefined;
|
|
20
29
|
const spreadIfDefined = (key, value) => {
|
|
21
30
|
if ((0, utils_1.isNil)(value)) {
|
|
22
31
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-utils.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/common/utils/object-utils.ts"],"names":[],"mappings":";;;AAGA,4CAOC;
|
|
1
|
+
{"version":3,"file":"object-utils.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/common/utils/object-utils.ts"],"names":[],"mappings":";;;AAGA,4CAOC;AAsBD,kCAUC;AAED,kEASC;AACD,8DAgBC;AAED,sDAoBC;;AA5FD,mCAAyC;AAEzC,4EAA4E;AAC5E,SAAgB,gBAAgB,CAAC,GAA4B,EAAE,KAAe;IAC1E,MAAM,IAAI,qBAAQ,GAAG,CAAE,CAAA;IACvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,gEAAgE;QAChE,OAAO,IAAI,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC;IACD,OAAO,IAAI,CAAA;AACf,CAAC;AAIM,MAAM,oBAAo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AC,GAAG,CAChC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAqB,EAAE,kDAAhB,CAAC,GAAG,EAAE,KAAK,CAAC,IAAK,OAAA,CAAC,GAAG,EAAE,MAAM,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAA,GAAA,CAAC,CACpG,CAAA;YACD,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,CAAM,CAAA;QAC9C,CAAC;QACD,OAAO,GAAQ,CAAA;IACnB,CAAC;CAAA;AAGM,MAAM,QAAQ,GAAG,CAAC,GAAY,EAAkC,EAAE;IACrE,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AACzE,CAAC,CAAA;AAFY,QAAA,QAAQ,YAEpB"}
|
package/src/lib/flag/flag.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export declare enum ApFlagId {
|
|
|
20
20
|
CLOUD_AUTH_ENABLED = "CLOUD_AUTH_ENABLED",
|
|
21
21
|
CAN_CONFIGURE_AI_PROVIDER = "CAN_CONFIGURE_AI_PROVIDER",
|
|
22
22
|
AGENTS_CONFIGURED = "AGENTS_CONFIGURED",
|
|
23
|
-
PROJECT_LIMITS_ENABLED = "PROJECT_LIMITS_ENABLED",
|
|
24
23
|
CURRENT_VERSION = "CURRENT_VERSION",
|
|
25
24
|
EDITION = "EDITION",
|
|
26
25
|
IS_CLOUD_PLATFORM = "IS_CLOUD_PLATFORM",
|
package/src/lib/flag/flag.js
CHANGED
|
@@ -20,7 +20,6 @@ var ApFlagId;
|
|
|
20
20
|
ApFlagId["CLOUD_AUTH_ENABLED"] = "CLOUD_AUTH_ENABLED";
|
|
21
21
|
ApFlagId["CAN_CONFIGURE_AI_PROVIDER"] = "CAN_CONFIGURE_AI_PROVIDER";
|
|
22
22
|
ApFlagId["AGENTS_CONFIGURED"] = "AGENTS_CONFIGURED";
|
|
23
|
-
ApFlagId["PROJECT_LIMITS_ENABLED"] = "PROJECT_LIMITS_ENABLED";
|
|
24
23
|
ApFlagId["CURRENT_VERSION"] = "CURRENT_VERSION";
|
|
25
24
|
ApFlagId["EDITION"] = "EDITION";
|
|
26
25
|
ApFlagId["IS_CLOUD_PLATFORM"] = "IS_CLOUD_PLATFORM";
|
package/src/lib/flag/flag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/flag/flag.ts"],"names":[],"mappings":";;;AASA,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,iCAAgB,CAAA;AACpB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,6BAAgB,CAAA;IAChB,8BAAiB,CAAA;IACjB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"flag.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/flag/flag.ts"],"names":[],"mappings":";;;AASA,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,iCAAgB,CAAA;AACpB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,6BAAgB,CAAA;IAChB,8BAAiB,CAAA;IACjB,4BAAe,CAAA;AACnB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED,IAAY,QAwCX;AAxCD,WAAY,QAAQ;IAChB,qDAAyC,CAAA;IACzC,+DAAmD,CAAA;IACnD,qDAAyC,CAAA;IACzC,mEAAuD,CAAA;IACvD,mDAAuC,CAAA;IACvC,+CAAmC,CAAA;IACnC,+BAAmB,CAAA;IACnB,mDAAuC,CAAA;IACvC,qDAAyC,CAAA;IACzC,2EAA+D,CAAA;IAC/D,uCAA2B,CAAA;IAC3B,6CAAiC,CAAA;IACjC,qCAAyB,CAAA;IACzB,6CAAiC,CAAA;IACjC,qDAAyC,CAAA;IACzC,iDAAqC,CAAA;IACrC,6DAAiD,CAAA;IACjD,iEAAqD,CAAA;IACrD,2DAA+C,CAAA;IAC/C,yCAA6B,CAAA;IAC7B,6CAAiC,CAAA;IACjC,6DAAiD,CAAA;IACjD,mDAAuC,CAAA;IACvC,yDAA6C,CAAA;IAC7C,yDAA6C,CAAA;IAC7C,2BAAe,CAAA;IACf,6FAAiF,CAAA;IACjF,6FAAiF,CAAA;IACjF,mDAAuC,CAAA;IACvC,yCAA6B,CAAA;IAC7B,qDAAyC,CAAA;IACzC,+EAAmE,CAAA;IACnE,iEAAqD,CAAA;IACrD,+DAAmD,CAAA;IACnD,2DAA+C,CAAA;IAC/C,yDAA6C,CAAA;IAC7C,iDAAqC,CAAA;IACrC,yDAA6C,CAAA;IAC7C,6DAAiD,CAAA;AACrD,CAAC,EAxCW,QAAQ,wBAAR,QAAQ,QAwCnB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Static } from '@sinclair/typebox';
|
|
2
2
|
import { ApId } from '../common/id-generator';
|
|
3
3
|
export type FlowVersionId = ApId;
|
|
4
|
-
export declare const LATEST_SCHEMA_VERSION = "
|
|
4
|
+
export declare const LATEST_SCHEMA_VERSION = "4";
|
|
5
5
|
export declare enum FlowVersionState {
|
|
6
6
|
LOCKED = "LOCKED",
|
|
7
7
|
DRAFT = "DRAFT"
|
|
@@ -5,7 +5,7 @@ const typebox_1 = require("@sinclair/typebox");
|
|
|
5
5
|
const base_model_1 = require("../common/base-model");
|
|
6
6
|
const user_1 = require("../user");
|
|
7
7
|
const trigger_1 = require("./triggers/trigger");
|
|
8
|
-
exports.LATEST_SCHEMA_VERSION = '
|
|
8
|
+
exports.LATEST_SCHEMA_VERSION = '4';
|
|
9
9
|
var FlowVersionState;
|
|
10
10
|
(function (FlowVersionState) {
|
|
11
11
|
FlowVersionState["LOCKED"] = "LOCKED";
|
|
@@ -4,13 +4,20 @@ exports.flowMigrations = void 0;
|
|
|
4
4
|
const migrate_v0_branch_to_router_1 = require("./migrate-v0-branch-to-router");
|
|
5
5
|
const migrate_v1_connection_ids_1 = require("./migrate-v1-connection-ids");
|
|
6
6
|
const migrate_v2_agent_piece_1 = require("./migrate-v2-agent-piece");
|
|
7
|
+
const migrate_v3_agent_piece_1 = require("./migrate-v3-agent-piece");
|
|
7
8
|
const migrations = [
|
|
8
9
|
migrate_v0_branch_to_router_1.migrateBranchToRouter,
|
|
9
10
|
migrate_v1_connection_ids_1.migrateConnectionIds,
|
|
10
11
|
migrate_v2_agent_piece_1.migrateAgentPiece,
|
|
12
|
+
migrate_v3_agent_piece_1.migrateAgentPieceV2
|
|
11
13
|
];
|
|
12
14
|
const apply = (flowVersion) => {
|
|
13
|
-
return migrations.reduce((acc, migration) =>
|
|
15
|
+
return migrations.reduce((acc, migration) => {
|
|
16
|
+
if (acc.schemaVersion === migration.targetSchemaVersion) {
|
|
17
|
+
return migration.migrate(acc);
|
|
18
|
+
}
|
|
19
|
+
return acc;
|
|
20
|
+
}, flowVersion);
|
|
14
21
|
};
|
|
15
22
|
exports.flowMigrations = {
|
|
16
23
|
apply,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/index.ts"],"names":[],"mappings":";;;AACA,+EAAqE;AACrE,2EAAkE;AAClE,qEAA4D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/index.ts"],"names":[],"mappings":";;;AACA,+EAAqE;AACrE,2EAAkE;AAClE,qEAA4D;AAC5D,qEAA8D;AAO9D,MAAM,UAAU,GAAgB;IAC5B,mDAAqB;IACrB,gDAAoB;IACpB,0CAAiB;IACjB,4CAAmB;CACtB,CAAA;AAED,MAAM,KAAK,GAAG,CAAC,WAAwB,EAAE,EAAE;IACvC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;QACxC,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,mBAAmB,EAAE,CAAC;YACtD,OAAO,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QACjC,CAAC;QACD,OAAO,GAAG,CAAA;IACd,CAAC,EAAE,WAAW,CAAC,CAAA;AACnB,CAAC,CAAA;AAEY,QAAA,cAAc,GAAG;IAC1B,KAAK;CACR,CAAA"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.migrateBranchToRouter = void 0;
|
|
4
|
-
const common_1 = require("../../../common");
|
|
5
4
|
const action_1 = require("../../actions/action");
|
|
6
5
|
const flow_structure_util_1 = require("../../util/flow-structure-util");
|
|
7
6
|
exports.migrateBranchToRouter = {
|
|
8
|
-
|
|
7
|
+
targetSchemaVersion: undefined,
|
|
9
8
|
migrate: (flowVersion) => {
|
|
10
|
-
if (!(0, common_1.isNil)(flowVersion.schemaVersion)) {
|
|
11
|
-
return flowVersion;
|
|
12
|
-
}
|
|
13
9
|
const newVersion = flow_structure_util_1.flowStructureUtil.transferFlow(flowVersion, (step) => {
|
|
14
10
|
var _a, _b;
|
|
15
11
|
const unschemedStep = step;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-v0-branch-to-router.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v0-branch-to-router.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"migrate-v0-branch-to-router.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v0-branch-to-router.ts"],"names":[],"mappings":";;;AACA,iDAA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IACrB;IACL,CAAC;CACJ,CAAA"}
|
|
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.migrateConnectionIds = void 0;
|
|
4
4
|
const flow_structure_util_1 = require("../../util/flow-structure-util");
|
|
5
5
|
exports.migrateConnectionIds = {
|
|
6
|
-
|
|
6
|
+
targetSchemaVersion: '1',
|
|
7
7
|
migrate: (flowVersion) => {
|
|
8
|
-
|
|
9
|
-
return Object.assign(Object.assign({}, flowVersion), { schemaVersion: '2', connectionIds: flow_structure_util_1.flowStructureUtil.extractConnectionIds(flowVersion) });
|
|
10
|
-
}
|
|
11
|
-
return flowVersion;
|
|
8
|
+
return Object.assign(Object.assign({}, flowVersion), { schemaVersion: '2', connectionIds: flow_structure_util_1.flowStructureUtil.extractConnectionIds(flowVersion) });
|
|
12
9
|
},
|
|
13
10
|
};
|
|
14
11
|
//# sourceMappingURL=migrate-v1-connection-ids.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-v1-connection-ids.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v1-connection-ids.ts"],"names":[],"mappings":";;;AACA,wEAAkE;AAGrD,QAAA,oBAAoB,GAAc;IAC3C,
|
|
1
|
+
{"version":3,"file":"migrate-v1-connection-ids.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v1-connection-ids.ts"],"names":[],"mappings":";;;AACA,wEAAkE;AAGrD,QAAA,oBAAoB,GAAc;IAC3C,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,uCACO,WAAW,KACd,aAAa,EAAE,GAAG,EAClB,aAAa,EAAE,uCAAiB,CAAC,oBAAoB,CAAC,WAAW,CAAC,IACrE;IACL,CAAC;CACJ,CAAA"}
|
|
@@ -3,20 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.migrateAgentPiece = void 0;
|
|
4
4
|
const flow_structure_util_1 = require("../../util/flow-structure-util");
|
|
5
5
|
exports.migrateAgentPiece = {
|
|
6
|
-
|
|
6
|
+
targetSchemaVersion: '2',
|
|
7
7
|
migrate: (flowVersion) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return Object.assign(Object.assign({}, newVersion), { schemaVersion: '3' });
|
|
18
|
-
}
|
|
19
|
-
return flowVersion;
|
|
8
|
+
const newVersion = flow_structure_util_1.flowStructureUtil.transferFlow(flowVersion, (step) => {
|
|
9
|
+
if ((step.type === 'PIECE' || step.type === 'PIECE_TRIGGER') && step.settings.pieceName === '@activepieces/piece-agent') {
|
|
10
|
+
const pieceStep = step;
|
|
11
|
+
pieceStep.settings.pieceVersion = '0.2.0';
|
|
12
|
+
return pieceStep;
|
|
13
|
+
}
|
|
14
|
+
return step;
|
|
15
|
+
});
|
|
16
|
+
return Object.assign(Object.assign({}, newVersion), { schemaVersion: '3' });
|
|
20
17
|
},
|
|
21
18
|
};
|
|
22
19
|
//# sourceMappingURL=migrate-v2-agent-piece.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-v2-agent-piece.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v2-agent-piece.ts"],"names":[],"mappings":";;;AACA,wEAAkE;AAGrD,QAAA,iBAAiB,GAAc;IACxC,
|
|
1
|
+
{"version":3,"file":"migrate-v2-agent-piece.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v2-agent-piece.ts"],"names":[],"mappings":";;;AACA,wEAAkE;AAGrD,QAAA,iBAAiB,GAAc;IACxC,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,MAAM,UAAU,GAAG,uCAAiB,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;YACpE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,KAAK,2BAA2B,EAAE,CAAC;gBACtH,MAAM,SAAS,GAAG,IAAI,CAAA;gBACtB,SAAS,CAAC,QAAQ,CAAC,YAAY,GAAG,OAAO,CAAA;gBACzC,OAAO,SAAS,CAAA;YACpB,CAAC;YACD,OAAO,IAAI,CAAA;QACf,CAAC,CAAC,CAAA;QACF,uCACO,UAAU,KACb,aAAa,EAAE,GAAG,IACrB;IACL,CAAC;CACJ,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrateAgentPieceV2 = void 0;
|
|
4
|
+
const flow_structure_util_1 = require("../../util/flow-structure-util");
|
|
5
|
+
exports.migrateAgentPieceV2 = {
|
|
6
|
+
targetSchemaVersion: '3',
|
|
7
|
+
migrate: (flowVersion) => {
|
|
8
|
+
const newVersion = flow_structure_util_1.flowStructureUtil.transferFlow(flowVersion, (step) => {
|
|
9
|
+
if ((step.type === 'PIECE' || step.type === 'PIECE_TRIGGER') && step.settings.pieceName === '@activepieces/piece-agent') {
|
|
10
|
+
const pieceStep = step;
|
|
11
|
+
pieceStep.settings.pieceVersion = '0.2.2';
|
|
12
|
+
return pieceStep;
|
|
13
|
+
}
|
|
14
|
+
return step;
|
|
15
|
+
});
|
|
16
|
+
return Object.assign(Object.assign({}, newVersion), { schemaVersion: '4' });
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=migrate-v3-agent-piece.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-v3-agent-piece.js","sourceRoot":"","sources":["../../../../../../../../packages/shared/src/lib/flows/operations/migrations/migrate-v3-agent-piece.ts"],"names":[],"mappings":";;;AACA,wEAAkE;AAGrD,QAAA,mBAAmB,GAAc;IAC1C,mBAAmB,EAAE,GAAG;IACxB,OAAO,EAAE,CAAC,WAAwB,EAAe,EAAE;QAC/C,MAAM,UAAU,GAAG,uCAAiB,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;YACpE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,KAAK,2BAA2B,EAAE,CAAC;gBACtH,MAAM,SAAS,GAAG,IAAI,CAAA;gBACtB,SAAS,CAAC,QAAQ,CAAC,YAAY,GAAG,OAAO,CAAA;gBACzC,OAAO,SAAS,CAAA;YACpB,CAAC;YACD,OAAO,IAAI,CAAA;QACf,CAAC,CAAC,CAAA;QACF,uCACO,UAAU,KACb,aAAa,EAAE,GAAG,IACrB;IACL,CAAC;CACJ,CAAA"}
|
|
@@ -12,7 +12,7 @@ export declare const CreateMcpRequestBody: import("@sinclair/typebox").TObject<{
|
|
|
12
12
|
projectId: import("@sinclair/typebox").TString;
|
|
13
13
|
}>;
|
|
14
14
|
export type CreateMcpRequestBody = Static<typeof CreateMcpRequestBody>;
|
|
15
|
-
declare const McpToolRequest: import("../common/base-model").TDiscriminatedUnion<[import("@sinclair/typebox").TObject<{
|
|
15
|
+
export declare const McpToolRequest: import("../common/base-model").TDiscriminatedUnion<[import("@sinclair/typebox").TObject<{
|
|
16
16
|
type: import("@sinclair/typebox").TLiteral<McpToolType.PIECE>;
|
|
17
17
|
pieceMetadata: import("@sinclair/typebox").TObject<{
|
|
18
18
|
pieceName: import("@sinclair/typebox").TString;
|
|
@@ -45,4 +45,3 @@ export declare const UpdateMcpRequestBody: import("@sinclair/typebox").TObject<{
|
|
|
45
45
|
}>]>>>;
|
|
46
46
|
}>;
|
|
47
47
|
export type UpdateMcpRequestBody = Static<typeof UpdateMcpRequestBody>;
|
|
48
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateMcpRequestBody = exports.CreateMcpRequestBody = exports.ListMcpsRequest = void 0;
|
|
3
|
+
exports.UpdateMcpRequestBody = exports.McpToolRequest = exports.CreateMcpRequestBody = exports.ListMcpsRequest = void 0;
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
5
|
const base_model_1 = require("../common/base-model");
|
|
6
6
|
const mcp_tool_1 = require("./tools/mcp-tool");
|
|
@@ -14,7 +14,7 @@ exports.CreateMcpRequestBody = typebox_1.Type.Object({
|
|
|
14
14
|
name: typebox_1.Type.String(),
|
|
15
15
|
projectId: typebox_1.Type.String(),
|
|
16
16
|
});
|
|
17
|
-
|
|
17
|
+
exports.McpToolRequest = (0, base_model_1.DiscriminatedUnion)('type', [
|
|
18
18
|
typebox_1.Type.Object({
|
|
19
19
|
type: typebox_1.Type.Literal(mcp_tool_1.McpToolType.PIECE),
|
|
20
20
|
pieceMetadata: mcp_tool_1.McpPieceToolData,
|
|
@@ -26,6 +26,6 @@ const McpToolRequest = (0, base_model_1.DiscriminatedUnion)('type', [
|
|
|
26
26
|
]);
|
|
27
27
|
exports.UpdateMcpRequestBody = typebox_1.Type.Object({
|
|
28
28
|
name: typebox_1.Type.Optional(typebox_1.Type.String({})),
|
|
29
|
-
tools: typebox_1.Type.Optional(typebox_1.Type.Array(McpToolRequest)),
|
|
29
|
+
tools: typebox_1.Type.Optional(typebox_1.Type.Array(exports.McpToolRequest)),
|
|
30
30
|
});
|
|
31
31
|
//# sourceMappingURL=mcp.request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.request.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/mcp/mcp.request.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,qDA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A;AAIW,QAAA,cAAc,GAAG,IAAA,+BAAkB,EAAC,MAAM,EAAE;IACrD,cAAI,CAAC,MAAM,CAAC;QACR,IAAI,EAAE,cAAI,CAAC,OAAO,CAAC,sBAAW,CAAC,KAAK,CAAC;QACrC,aAAa,EAAE,2BAAgB;KAClC,CAAC;IACF,cAAI,CAAC,MAAM,CAAC;QACR,IAAI,EAAE,cAAI,CAAC,OAAO,CAAC,sBAAW,CAAC,IAAI,CAAC;QACpC,MAAM,EAAE,cAAI,CAAC,MAAM,EAAE;KACxB,CAAC;CACL,CAAC,CAAA;AAGW,QAAA,oBAAoB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACpC,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,sBAAc,CAAC,CAAC;CACnD,CAAC,CAAA"}
|
|
@@ -52,7 +52,7 @@ export declare const CopilotSettingsWithoutSensitiveData: import("@sinclair/type
|
|
|
52
52
|
export type CopilotSettingsWithoutSensitiveData = Static<typeof CopilotSettingsWithoutSensitiveData>;
|
|
53
53
|
export declare enum PlatformUsageMetric {
|
|
54
54
|
TASKS = "tasks",
|
|
55
|
-
|
|
55
|
+
AI_CREDITS = "ai-credits",
|
|
56
56
|
ACTIVE_FLOWS = "active-flows",
|
|
57
57
|
USER_SEATS = "user-seats",
|
|
58
58
|
PROJECTS = "projects",
|
|
@@ -112,12 +112,12 @@ export declare const PlatformPlan: import("@sinclair/typebox").TObject<{
|
|
|
112
112
|
stripeSubscriptionEndDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
113
113
|
stripeSubscriptionCancelDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
114
114
|
stripePaymentMethod: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
115
|
-
userSeatsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
116
|
-
projectsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
117
|
-
tablesLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
118
|
-
mcpLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
119
|
-
activeFlowsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
120
|
-
agentsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
115
|
+
userSeatsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
116
|
+
projectsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
117
|
+
tablesLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
118
|
+
mcpLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
119
|
+
activeFlowsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
120
|
+
agentsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
121
121
|
id: import("@sinclair/typebox").TString;
|
|
122
122
|
created: import("@sinclair/typebox").TString;
|
|
123
123
|
updated: import("@sinclair/typebox").TString;
|
|
@@ -158,12 +158,12 @@ export declare const PlatformPlanLimits: import("@sinclair/typebox").TObject<{
|
|
|
158
158
|
stripeSubscriptionEndDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
159
159
|
stripeSubscriptionCancelDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
160
160
|
stripePaymentMethod: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
161
|
-
userSeatsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
162
|
-
projectsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
163
|
-
tablesLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
164
|
-
mcpLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
165
|
-
activeFlowsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
166
|
-
agentsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
161
|
+
userSeatsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
162
|
+
projectsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
163
|
+
tablesLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
164
|
+
mcpLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
165
|
+
activeFlowsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
166
|
+
agentsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
167
167
|
}>;
|
|
168
168
|
export type PlatformPlanLimits = Static<typeof PlatformPlanLimits>;
|
|
169
169
|
export declare const Platform: import("@sinclair/typebox").TObject<{
|
|
@@ -262,12 +262,12 @@ export declare const PlatformWithoutSensitiveData: import("@sinclair/typebox").T
|
|
|
262
262
|
stripeSubscriptionEndDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
263
263
|
stripeSubscriptionCancelDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
264
264
|
stripePaymentMethod: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
265
|
-
userSeatsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
266
|
-
projectsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
267
|
-
tablesLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
268
|
-
mcpLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
269
|
-
activeFlowsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
270
|
-
agentsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
265
|
+
userSeatsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
266
|
+
projectsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
267
|
+
tablesLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
268
|
+
mcpLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
269
|
+
activeFlowsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
270
|
+
agentsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
271
271
|
}>;
|
|
272
272
|
smtp: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<{} | null>>;
|
|
273
273
|
federatedAuthProviders: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<{
|
|
@@ -285,6 +285,16 @@ export declare const PlatformWithoutSensitiveData: import("@sinclair/typebox").T
|
|
|
285
285
|
azureOpenai: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{}>>;
|
|
286
286
|
}>;
|
|
287
287
|
}>>;
|
|
288
|
+
usage: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
289
|
+
tasks: import("@sinclair/typebox").TNumber;
|
|
290
|
+
aiCredits: import("@sinclair/typebox").TNumber;
|
|
291
|
+
activeFlows: import("@sinclair/typebox").TNumber;
|
|
292
|
+
tables: import("@sinclair/typebox").TNumber;
|
|
293
|
+
mcps: import("@sinclair/typebox").TNumber;
|
|
294
|
+
seats: import("@sinclair/typebox").TNumber;
|
|
295
|
+
projects: import("@sinclair/typebox").TNumber;
|
|
296
|
+
agents: import("@sinclair/typebox").TNumber;
|
|
297
|
+
}>>;
|
|
288
298
|
id: import("@sinclair/typebox").TString;
|
|
289
299
|
name: import("@sinclair/typebox").TString;
|
|
290
300
|
created: import("@sinclair/typebox").TString;
|
|
@@ -340,12 +350,12 @@ export declare const PlatformBillingInformation: import("@sinclair/typebox").TOb
|
|
|
340
350
|
stripeSubscriptionEndDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
341
351
|
stripeSubscriptionCancelDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
342
352
|
stripePaymentMethod: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
343
|
-
userSeatsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
344
|
-
projectsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
345
|
-
tablesLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
346
|
-
mcpLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
347
|
-
activeFlowsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
348
|
-
agentsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
|
353
|
+
userSeatsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
354
|
+
projectsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
355
|
+
tablesLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
356
|
+
mcpLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
357
|
+
activeFlowsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
358
|
+
agentsLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<number | null>>;
|
|
349
359
|
id: import("@sinclair/typebox").TString;
|
|
350
360
|
created: import("@sinclair/typebox").TString;
|
|
351
361
|
updated: import("@sinclair/typebox").TString;
|
|
@@ -47,7 +47,7 @@ exports.CopilotSettingsWithoutSensitiveData = typebox_1.Type.Object({
|
|
|
47
47
|
var PlatformUsageMetric;
|
|
48
48
|
(function (PlatformUsageMetric) {
|
|
49
49
|
PlatformUsageMetric["TASKS"] = "tasks";
|
|
50
|
-
PlatformUsageMetric["
|
|
50
|
+
PlatformUsageMetric["AI_CREDITS"] = "ai-credits";
|
|
51
51
|
PlatformUsageMetric["ACTIVE_FLOWS"] = "active-flows";
|
|
52
52
|
PlatformUsageMetric["USER_SEATS"] = "user-seats";
|
|
53
53
|
PlatformUsageMetric["PROJECTS"] = "projects";
|
|
@@ -71,7 +71,7 @@ var AiOverageState;
|
|
|
71
71
|
AiOverageState["ALLOWED_BUT_OFF"] = "allowed_but_off";
|
|
72
72
|
AiOverageState["ALLOWED_AND_ON"] = "allowed_an_on";
|
|
73
73
|
})(AiOverageState || (exports.AiOverageState = AiOverageState = {}));
|
|
74
|
-
exports.PlatformPlan = typebox_1.Type.Object(Object.assign(Object.assign({}, base_model_1.BaseModelSchema), { plan: typebox_1.Type.Optional(typebox_1.Type.String()), platformId: typebox_1.Type.String(), tasksLimit: typebox_1.Type.Optional(typebox_1.Type.Number()), includedAiCredits: typebox_1.Type.Number(), aiCreditsOverageLimit: typebox_1.Type.Optional(typebox_1.Type.Number()), aiCreditsOverageState: typebox_1.Type.Optional(typebox_1.Type.String()), environmentsEnabled: typebox_1.Type.Boolean(), analyticsEnabled: typebox_1.Type.Boolean(), showPoweredBy: typebox_1.Type.Boolean(), agentsEnabled: typebox_1.Type.Boolean(), mcpsEnabled: typebox_1.Type.Boolean(), tablesEnabled: typebox_1.Type.Boolean(), todosEnabled: typebox_1.Type.Boolean(), auditLogEnabled: typebox_1.Type.Boolean(), embeddingEnabled: typebox_1.Type.Boolean(), managePiecesEnabled: typebox_1.Type.Boolean(), manageTemplatesEnabled: typebox_1.Type.Boolean(), customAppearanceEnabled: typebox_1.Type.Boolean(), manageProjectsEnabled: typebox_1.Type.Boolean(), projectRolesEnabled: typebox_1.Type.Boolean(), customDomainsEnabled: typebox_1.Type.Boolean(), globalConnectionsEnabled: typebox_1.Type.Boolean(), customRolesEnabled: typebox_1.Type.Boolean(), apiKeysEnabled: typebox_1.Type.Boolean(), eligibleForTrial: typebox_1.Type.Boolean(), ssoEnabled: typebox_1.Type.Boolean(), licenseKey: typebox_1.Type.Optional(typebox_1.Type.String()), licenseExpiresAt: typebox_1.Type.Optional(typebox_1.Type.String()), stripeCustomerId: typebox_1.Type.Optional(typebox_1.Type.String()), stripeSubscriptionId: typebox_1.Type.Optional(typebox_1.Type.String()), stripeSubscriptionStatus: typebox_1.Type.Optional(typebox_1.Type.String()), stripeSubscriptionStartDate: typebox_1.Type.Optional(typebox_1.Type.Number()), stripeSubscriptionEndDate: typebox_1.Type.Optional(typebox_1.Type.Number()), stripeSubscriptionCancelDate: typebox_1.Type.Optional(typebox_1.Type.Number()), stripePaymentMethod: typebox_1.Type.Optional(typebox_1.Type.String()), userSeatsLimit:
|
|
74
|
+
exports.PlatformPlan = typebox_1.Type.Object(Object.assign(Object.assign({}, base_model_1.BaseModelSchema), { plan: typebox_1.Type.Optional(typebox_1.Type.String()), platformId: typebox_1.Type.String(), tasksLimit: typebox_1.Type.Optional(typebox_1.Type.Number()), includedAiCredits: typebox_1.Type.Number(), aiCreditsOverageLimit: typebox_1.Type.Optional(typebox_1.Type.Number()), aiCreditsOverageState: typebox_1.Type.Optional(typebox_1.Type.String()), environmentsEnabled: typebox_1.Type.Boolean(), analyticsEnabled: typebox_1.Type.Boolean(), showPoweredBy: typebox_1.Type.Boolean(), agentsEnabled: typebox_1.Type.Boolean(), mcpsEnabled: typebox_1.Type.Boolean(), tablesEnabled: typebox_1.Type.Boolean(), todosEnabled: typebox_1.Type.Boolean(), auditLogEnabled: typebox_1.Type.Boolean(), embeddingEnabled: typebox_1.Type.Boolean(), managePiecesEnabled: typebox_1.Type.Boolean(), manageTemplatesEnabled: typebox_1.Type.Boolean(), customAppearanceEnabled: typebox_1.Type.Boolean(), manageProjectsEnabled: typebox_1.Type.Boolean(), projectRolesEnabled: typebox_1.Type.Boolean(), customDomainsEnabled: typebox_1.Type.Boolean(), globalConnectionsEnabled: typebox_1.Type.Boolean(), customRolesEnabled: typebox_1.Type.Boolean(), apiKeysEnabled: typebox_1.Type.Boolean(), eligibleForTrial: typebox_1.Type.Boolean(), ssoEnabled: typebox_1.Type.Boolean(), licenseKey: typebox_1.Type.Optional(typebox_1.Type.String()), licenseExpiresAt: typebox_1.Type.Optional(typebox_1.Type.String()), stripeCustomerId: typebox_1.Type.Optional(typebox_1.Type.String()), stripeSubscriptionId: typebox_1.Type.Optional(typebox_1.Type.String()), stripeSubscriptionStatus: typebox_1.Type.Optional(typebox_1.Type.String()), stripeSubscriptionStartDate: typebox_1.Type.Optional(typebox_1.Type.Number()), stripeSubscriptionEndDate: typebox_1.Type.Optional(typebox_1.Type.Number()), stripeSubscriptionCancelDate: typebox_1.Type.Optional(typebox_1.Type.Number()), stripePaymentMethod: typebox_1.Type.Optional(typebox_1.Type.String()), userSeatsLimit: (0, base_model_1.Nullable)(typebox_1.Type.Number()), projectsLimit: (0, base_model_1.Nullable)(typebox_1.Type.Number()), tablesLimit: (0, base_model_1.Nullable)(typebox_1.Type.Number()), mcpLimit: (0, base_model_1.Nullable)(typebox_1.Type.Number()), activeFlowsLimit: (0, base_model_1.Nullable)(typebox_1.Type.Number()), agentsLimit: (0, base_model_1.Nullable)(typebox_1.Type.Number()) }));
|
|
75
75
|
exports.PlatformPlanLimits = typebox_1.Type.Omit(exports.PlatformPlan, ['id', 'platformId', 'created', 'updated']);
|
|
76
76
|
exports.Platform = typebox_1.Type.Object(Object.assign(Object.assign({}, base_model_1.BaseModelSchema), { ownerId: id_generator_1.ApId, name: typebox_1.Type.String(), primaryColor: typebox_1.Type.String(), logoIconUrl: typebox_1.Type.String(), fullLogoUrl: typebox_1.Type.String(), favIconUrl: typebox_1.Type.String(),
|
|
77
77
|
/**
|
|
@@ -87,6 +87,7 @@ exports.PlatformWithoutSensitiveData = typebox_1.Type.Composite([typebox_1.Type.
|
|
|
87
87
|
copilotSettings: typebox_1.Type.Optional(exports.CopilotSettingsWithoutSensitiveData),
|
|
88
88
|
smtp: (0, base_model_1.Nullable)(typebox_1.Type.Object({})),
|
|
89
89
|
plan: exports.PlatformPlanLimits,
|
|
90
|
+
usage: typebox_1.Type.Optional(exports.PlatformUsage),
|
|
90
91
|
}), typebox_1.Type.Pick(exports.Platform, [
|
|
91
92
|
'id',
|
|
92
93
|
'created',
|