@activepieces/shared 0.38.2 → 0.38.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 +2 -5
- package/src/index.d.ts +93 -0
- package/src/index.js +100 -0
- package/src/index.js.map +1 -0
- package/src/lib/agents/index.d.ts +165 -0
- package/src/lib/agents/index.js +75 -0
- package/src/lib/agents/index.js.map +1 -0
- package/src/lib/agents/mcp.d.ts +6 -0
- package/src/lib/agents/mcp.js +26 -0
- package/src/lib/agents/mcp.js.map +1 -0
- package/src/lib/agents/tools.d.ts +161 -0
- package/src/lib/agents/tools.js +79 -0
- package/src/lib/agents/tools.js.map +1 -0
- package/src/lib/ai-providers/index.d.ts +451 -0
- package/src/lib/ai-providers/index.js +211 -0
- package/src/lib/ai-providers/index.js.map +1 -0
- package/src/lib/analytics/index.d.ts +97 -0
- package/src/lib/analytics/index.js +48 -0
- package/src/lib/analytics/index.js.map +1 -0
- package/src/lib/app-connection/app-connection.d.ts +134 -0
- package/src/lib/app-connection/app-connection.js +50 -0
- package/src/lib/app-connection/app-connection.js.map +1 -0
- package/src/lib/app-connection/dto/read-app-connection-request.d.ts +29 -0
- package/src/lib/app-connection/dto/read-app-connection-request.js +22 -0
- package/src/lib/app-connection/dto/read-app-connection-request.js.map +1 -0
- package/src/lib/app-connection/dto/upsert-app-connection-request.d.ts +364 -0
- package/src/lib/app-connection/dto/upsert-app-connection-request.js +132 -0
- package/src/lib/app-connection/dto/upsert-app-connection-request.js.map +1 -0
- package/src/lib/app-connection/oauth2-authorization-method.d.ts +4 -0
- package/src/lib/app-connection/oauth2-authorization-method.js +10 -0
- package/src/lib/app-connection/oauth2-authorization-method.js.map +1 -0
- package/src/lib/authentication/dto/authentication-response.d.ts +25 -0
- package/src/lib/authentication/dto/authentication-response.js +16 -0
- package/src/lib/authentication/dto/authentication-response.js.map +1 -0
- package/src/lib/authentication/dto/sign-in-request.d.ts +6 -0
- package/src/lib/authentication/dto/sign-in-request.js +10 -0
- package/src/lib/authentication/dto/sign-in-request.js.map +1 -0
- package/src/lib/authentication/dto/sign-up-request.d.ts +14 -0
- package/src/lib/authentication/dto/sign-up-request.js +23 -0
- package/src/lib/authentication/dto/sign-up-request.js.map +1 -0
- package/src/lib/authentication/model/principal-type.d.ts +15 -0
- package/src/lib/authentication/model/principal-type.js +21 -0
- package/src/lib/authentication/model/principal-type.js.map +1 -0
- package/src/lib/authentication/model/principal.d.ts +40 -0
- package/src/lib/authentication/model/principal.js +3 -0
- package/src/lib/authentication/model/principal.js.map +1 -0
- package/src/lib/authentication/user-identity.d.ts +23 -0
- package/src/lib/authentication/user-identity.js +14 -0
- package/src/lib/authentication/user-identity.js.map +1 -0
- package/src/lib/common/activepieces-error.d.ts +333 -0
- package/src/lib/common/activepieces-error.js +93 -0
- package/src/lib/common/activepieces-error.js.map +1 -0
- package/src/lib/common/base-model.d.ts +29 -0
- package/src/lib/common/base-model.js +30 -0
- package/src/lib/common/base-model.js.map +1 -0
- package/src/lib/common/color.d.ts +3 -0
- package/src/lib/common/color.js +8 -0
- package/src/lib/common/color.js.map +1 -0
- package/src/lib/common/id-generator.d.ts +5 -0
- package/src/lib/common/id-generator.js +14 -0
- package/src/lib/common/id-generator.js.map +1 -0
- package/src/lib/common/index.d.ts +8 -0
- package/src/lib/common/index.js +12 -0
- package/src/lib/common/index.js.map +1 -0
- package/src/lib/common/locale.d.ts +12 -0
- package/src/lib/common/locale.js +17 -0
- package/src/lib/common/locale.js.map +1 -0
- package/src/lib/common/metadata.d.ts +21 -0
- package/src/lib/common/metadata.js +24 -0
- package/src/lib/common/metadata.js.map +1 -0
- package/src/lib/common/multipart-file.d.ts +11 -0
- package/src/lib/common/multipart-file.js +15 -0
- package/src/lib/common/multipart-file.js.map +1 -0
- package/src/lib/common/security/index.d.ts +2 -0
- package/src/lib/common/security/index.js +7 -0
- package/src/lib/common/security/index.js.map +1 -0
- package/src/lib/common/security/permission.d.ts +31 -0
- package/src/lib/common/security/permission.js +38 -0
- package/src/lib/common/security/permission.js.map +1 -0
- package/src/lib/common/seek-page.d.ts +8 -0
- package/src/lib/common/seek-page.js +12 -0
- package/src/lib/common/seek-page.js.map +1 -0
- package/src/lib/common/telemetry.d.ts +163 -0
- package/src/lib/common/telemetry.js +41 -0
- package/src/lib/common/telemetry.js.map +1 -0
- package/src/lib/common/try-catch.d.ts +12 -0
- package/src/lib/common/try-catch.js +27 -0
- package/src/lib/common/try-catch.js.map +1 -0
- package/src/lib/common/utils/assertions.d.ts +6 -0
- package/src/lib/common/utils/assertions.js +39 -0
- package/src/lib/common/utils/assertions.js.map +1 -0
- package/src/lib/common/utils/index.d.ts +3 -0
- package/src/lib/common/utils/index.js +7 -0
- package/src/lib/common/utils/index.js.map +1 -0
- package/src/lib/common/utils/object-utils.d.ts +15 -0
- package/src/lib/common/utils/object-utils.js +112 -0
- package/src/lib/common/utils/object-utils.js.map +1 -0
- package/src/lib/common/utils/utils.d.ts +32 -0
- package/src/lib/common/utils/utils.js +166 -0
- package/src/lib/common/utils/utils.js.map +1 -0
- package/src/lib/engine/engine-constants.d.ts +9 -0
- package/src/lib/engine/engine-constants.js +15 -0
- package/src/lib/engine/engine-constants.js.map +1 -0
- package/src/lib/engine/engine-operation.d.ts +205 -0
- package/src/lib/engine/engine-operation.js +99 -0
- package/src/lib/engine/engine-operation.js.map +1 -0
- package/src/lib/engine/execution-errors.d.ts +46 -0
- package/src/lib/engine/execution-errors.js +101 -0
- package/src/lib/engine/execution-errors.js.map +1 -0
- package/src/lib/engine/index.d.ts +10 -0
- package/src/lib/engine/index.js +16 -0
- package/src/lib/engine/index.js.map +1 -0
- package/src/lib/engine/requests.d.ts +104 -0
- package/src/lib/engine/requests.js +57 -0
- package/src/lib/engine/requests.js.map +1 -0
- package/src/lib/federated-authn/authn-provider-name.d.ts +7 -0
- package/src/lib/federated-authn/authn-provider-name.js +9 -0
- package/src/lib/federated-authn/authn-provider-name.js.map +1 -0
- package/src/lib/federated-authn/index.d.ts +52 -0
- package/src/lib/federated-authn/index.js +38 -0
- package/src/lib/federated-authn/index.js.map +1 -0
- package/src/lib/feedback-url.d.ts +1 -0
- package/src/lib/feedback-url.js +5 -0
- package/src/lib/feedback-url.js.map +1 -0
- package/src/lib/file/index.d.ts +49 -0
- package/src/lib/file/index.js +41 -0
- package/src/lib/file/index.js.map +1 -0
- package/src/lib/flag/flag.d.ts +61 -0
- package/src/lib/flag/flag.js +64 -0
- package/src/lib/flag/flag.js.map +1 -0
- package/src/lib/flag/flag.requests.d.ts +5 -0
- package/src/lib/flag/flag.requests.js +8 -0
- package/src/lib/flag/flag.requests.js.map +1 -0
- package/src/lib/flag/index.d.ts +2 -0
- package/src/lib/flag/index.js +6 -0
- package/src/lib/flag/index.js.map +1 -0
- package/src/lib/flow-run/dto/list-flow-runs-request.d.ts +16 -0
- package/src/lib/flow-run/dto/list-flow-runs-request.js +20 -0
- package/src/lib/flow-run/dto/list-flow-runs-request.js.map +1 -0
- package/src/lib/flow-run/execution/execution-journal.d.ts +27 -0
- package/src/lib/flow-run/execution/execution-journal.js +137 -0
- package/src/lib/flow-run/execution/execution-journal.js.map +1 -0
- package/src/lib/flow-run/execution/execution-output.d.ts +18 -0
- package/src/lib/flow-run/execution/execution-output.js +14 -0
- package/src/lib/flow-run/execution/execution-output.js.map +1 -0
- package/src/lib/flow-run/execution/flow-execution.d.ts +76 -0
- package/src/lib/flow-run/execution/flow-execution.js +80 -0
- package/src/lib/flow-run/execution/flow-execution.js.map +1 -0
- package/src/lib/flow-run/execution/step-output.d.ts +69 -0
- package/src/lib/flow-run/execution/step-output.js +97 -0
- package/src/lib/flow-run/execution/step-output.js.map +1 -0
- package/src/lib/flow-run/flow-run.d.ts +73 -0
- package/src/lib/flow-run/flow-run.js +33 -0
- package/src/lib/flow-run/flow-run.js.map +1 -0
- package/src/lib/flow-run/log-serializer.d.ts +4 -0
- package/src/lib/flow-run/log-serializer.js +12 -0
- package/src/lib/flow-run/log-serializer.js.map +1 -0
- package/src/lib/flow-run/test-flow-run-request.d.ts +45 -0
- package/src/lib/flow-run/test-flow-run-request.js +48 -0
- package/src/lib/flow-run/test-flow-run-request.js.map +1 -0
- package/src/lib/flows/actions/action.d.ts +622 -0
- package/src/lib/flows/actions/action.js +221 -0
- package/src/lib/flows/actions/action.js.map +1 -0
- package/src/lib/flows/dto/count-flows-request.d.ts +6 -0
- package/src/lib/flows/dto/count-flows-request.js +9 -0
- package/src/lib/flows/dto/count-flows-request.js.map +1 -0
- package/src/lib/flows/dto/create-flow-request.d.ts +11 -0
- package/src/lib/flows/dto/create-flow-request.js +15 -0
- package/src/lib/flows/dto/create-flow-request.js.map +1 -0
- package/src/lib/flows/dto/flow-mcp.requests.d.ts +7 -0
- package/src/lib/flows/dto/flow-mcp.requests.js +10 -0
- package/src/lib/flows/dto/flow-mcp.requests.js.map +1 -0
- package/src/lib/flows/dto/list-flows-request.d.ts +30 -0
- package/src/lib/flows/dto/list-flows-request.js +26 -0
- package/src/lib/flows/dto/list-flows-request.js.map +1 -0
- package/src/lib/flows/flow-version.d.ts +97 -0
- package/src/lib/flows/flow-version.js +17 -0
- package/src/lib/flows/flow-version.js.map +1 -0
- package/src/lib/flows/flow.d.ts +165 -0
- package/src/lib/flows/flow.js +37 -0
- package/src/lib/flows/flow.js.map +1 -0
- package/src/lib/flows/folders/folder-requests.d.ts +23 -0
- package/src/lib/flows/folders/folder-requests.js +20 -0
- package/src/lib/flows/folders/folder-requests.js.map +1 -0
- package/src/lib/flows/folders/folder.d.ts +15 -0
- package/src/lib/flows/folders/folder.js +8 -0
- package/src/lib/flows/folders/folder.js.map +1 -0
- package/src/lib/flows/folders/list-folders-response.d.ts +4 -0
- package/src/lib/flows/folders/list-folders-response.js +3 -0
- package/src/lib/flows/folders/list-folders-response.js.map +1 -0
- package/src/lib/flows/form.d.ts +56 -0
- package/src/lib/flows/form.js +41 -0
- package/src/lib/flows/form.js.map +1 -0
- package/src/lib/flows/index.d.ts +8 -0
- package/src/lib/flows/index.js +12 -0
- package/src/lib/flows/index.js.map +1 -0
- package/src/lib/flows/note.d.ts +26 -0
- package/src/lib/flows/note.js +31 -0
- package/src/lib/flows/note.js.map +1 -0
- package/src/lib/flows/operations/add-action-util.d.ts +9 -0
- package/src/lib/flows/operations/add-action-util.js +52 -0
- package/src/lib/flows/operations/add-action-util.js.map +1 -0
- package/src/lib/flows/operations/add-action.d.ts +4 -0
- package/src/lib/flows/operations/add-action.js +100 -0
- package/src/lib/flows/operations/add-action.js.map +1 -0
- package/src/lib/flows/operations/add-branch.d.ts +4 -0
- package/src/lib/flows/operations/add-branch.js +16 -0
- package/src/lib/flows/operations/add-branch.js.map +1 -0
- package/src/lib/flows/operations/copy-action-operations.d.ts +3 -0
- package/src/lib/flows/operations/copy-action-operations.js +19 -0
- package/src/lib/flows/operations/copy-action-operations.js.map +1 -0
- package/src/lib/flows/operations/delete-action.d.ts +4 -0
- package/src/lib/flows/operations/delete-action.js +41 -0
- package/src/lib/flows/operations/delete-action.js.map +1 -0
- package/src/lib/flows/operations/delete-branch.d.ts +4 -0
- package/src/lib/flows/operations/delete-branch.js +15 -0
- package/src/lib/flows/operations/delete-branch.js.map +1 -0
- package/src/lib/flows/operations/duplicate-step.d.ts +5 -0
- package/src/lib/flows/operations/duplicate-step.js +63 -0
- package/src/lib/flows/operations/duplicate-step.js.map +1 -0
- package/src/lib/flows/operations/import-flow.d.ts +7 -0
- package/src/lib/flows/operations/import-flow.js +139 -0
- package/src/lib/flows/operations/import-flow.js.map +1 -0
- package/src/lib/flows/operations/index.d.ts +1449 -0
- package/src/lib/flows/operations/index.js +397 -0
- package/src/lib/flows/operations/index.js.map +1 -0
- package/src/lib/flows/operations/move-action.d.ts +3 -0
- package/src/lib/flows/operations/move-action.js +36 -0
- package/src/lib/flows/operations/move-action.js.map +1 -0
- package/src/lib/flows/operations/move-branch.d.ts +3 -0
- package/src/lib/flows/operations/move-branch.js +28 -0
- package/src/lib/flows/operations/move-branch.js.map +1 -0
- package/src/lib/flows/operations/notes-operations.d.ts +7 -0
- package/src/lib/flows/operations/notes-operations.js +29 -0
- package/src/lib/flows/operations/notes-operations.js.map +1 -0
- package/src/lib/flows/operations/paste-operations.d.ts +506 -0
- package/src/lib/flows/operations/paste-operations.js +42 -0
- package/src/lib/flows/operations/paste-operations.js.map +1 -0
- package/src/lib/flows/operations/skip-action.d.ts +3 -0
- package/src/lib/flows/operations/skip-action.js +13 -0
- package/src/lib/flows/operations/skip-action.js.map +1 -0
- package/src/lib/flows/operations/update-action.d.ts +4 -0
- package/src/lib/flows/operations/update-action.js +44 -0
- package/src/lib/flows/operations/update-action.js.map +1 -0
- package/src/lib/flows/operations/update-trigger.d.ts +4 -0
- package/src/lib/flows/operations/update-trigger.js +38 -0
- package/src/lib/flows/operations/update-trigger.js.map +1 -0
- package/src/lib/flows/properties/index.d.ts +1 -0
- package/src/lib/flows/properties/index.js +5 -0
- package/src/lib/flows/properties/index.js.map +1 -0
- package/src/lib/flows/properties/property.d.ts +10 -0
- package/src/lib/flows/properties/property.js +14 -0
- package/src/lib/flows/properties/property.js.map +1 -0
- package/src/lib/flows/sample-data/index.d.ts +56 -0
- package/src/lib/flows/sample-data/index.js +57 -0
- package/src/lib/flows/sample-data/index.js.map +1 -0
- package/src/lib/flows/step-file/step-file.d.ts +16 -0
- package/src/lib/flows/step-file/step-file.js +17 -0
- package/src/lib/flows/step-file/step-file.js.map +1 -0
- package/src/lib/flows/test-trigger.d.ts +17 -0
- package/src/lib/flows/test-trigger.js +21 -0
- package/src/lib/flows/test-trigger.js.map +1 -0
- package/src/lib/flows/triggers/trigger-events/trigger-event.d.ts +20 -0
- package/src/lib/flows/triggers/trigger-events/trigger-event.js +18 -0
- package/src/lib/flows/triggers/trigger-events/trigger-event.js.map +1 -0
- package/src/lib/flows/triggers/trigger-events/trigger-events-dto.d.ts +19 -0
- package/src/lib/flows/triggers/trigger-events/trigger-events-dto.js +17 -0
- package/src/lib/flows/triggers/trigger-events/trigger-events-dto.js.map +1 -0
- package/src/lib/flows/triggers/trigger-run.d.ts +17 -0
- package/src/lib/flows/triggers/trigger-run.js +21 -0
- package/src/lib/flows/triggers/trigger-run.js.map +1 -0
- package/src/lib/flows/triggers/trigger.d.ts +89 -0
- package/src/lib/flows/triggers/trigger.js +35 -0
- package/src/lib/flows/triggers/trigger.js.map +1 -0
- package/src/lib/flows/util/flow-piece-util.d.ts +8 -0
- package/src/lib/flows/util/flow-piece-util.js +50 -0
- package/src/lib/flows/util/flow-piece-util.js.map +1 -0
- package/src/lib/flows/util/flow-structure-util.d.ts +66 -0
- package/src/lib/flows/util/flow-structure-util.js +207 -0
- package/src/lib/flows/util/flow-structure-util.js.map +1 -0
- package/src/lib/forms/index.d.ts +47 -0
- package/src/lib/forms/index.js +46 -0
- package/src/lib/forms/index.js.map +1 -0
- package/src/lib/health/index.d.ts +8 -0
- package/src/lib/health/index.js +11 -0
- package/src/lib/health/index.js.map +1 -0
- package/src/lib/invitations/index.d.ts +80 -0
- package/src/lib/invitations/index.js +45 -0
- package/src/lib/invitations/index.js.map +1 -0
- package/src/lib/license-keys/index.d.ts +54 -0
- package/src/lib/license-keys/index.js +39 -0
- package/src/lib/license-keys/index.js.map +1 -0
- package/src/lib/mcp/index.d.ts +2 -0
- package/src/lib/mcp/index.js +6 -0
- package/src/lib/mcp/index.js.map +1 -0
- package/src/lib/mcp/mcp.d.ts +116 -0
- package/src/lib/mcp/mcp.js +21 -0
- package/src/lib/mcp/mcp.js.map +1 -0
- package/src/lib/mcp/pieces/mcp-piece.d.ts +32 -0
- package/src/lib/mcp/pieces/mcp-piece.js +30 -0
- package/src/lib/mcp/pieces/mcp-piece.js.map +1 -0
- package/src/lib/pieces/dto/piece-requests.d.ts +89 -0
- package/src/lib/pieces/dto/piece-requests.js +102 -0
- package/src/lib/pieces/dto/piece-requests.js.map +1 -0
- package/src/lib/pieces/index.d.ts +7 -0
- package/src/lib/pieces/index.js +13 -0
- package/src/lib/pieces/index.js.map +1 -0
- package/src/lib/pieces/piece.d.ts +85 -0
- package/src/lib/pieces/piece.js +58 -0
- package/src/lib/pieces/piece.js.map +1 -0
- package/src/lib/pieces/utils.d.ts +29 -0
- package/src/lib/pieces/utils.js +70 -0
- package/src/lib/pieces/utils.js.map +1 -0
- package/src/lib/platform/index.d.ts +2 -0
- package/src/lib/platform/index.js +6 -0
- package/src/lib/platform/index.js.map +1 -0
- package/src/lib/platform/platform.model.d.ts +292 -0
- package/src/lib/platform/platform.model.js +92 -0
- package/src/lib/platform/platform.model.js.map +1 -0
- package/src/lib/platform/platform.request.d.ts +67 -0
- package/src/lib/platform/platform.request.js +44 -0
- package/src/lib/platform/platform.request.js.map +1 -0
- package/src/lib/project/index.d.ts +2 -0
- package/src/lib/project/index.js +6 -0
- package/src/lib/project/index.js.map +1 -0
- package/src/lib/project/project-member.d.ts +5 -0
- package/src/lib/project/project-member.js +10 -0
- package/src/lib/project/project-member.js.map +1 -0
- package/src/lib/project/project.d.ts +151 -0
- package/src/lib/project/project.js +120 -0
- package/src/lib/project/project.js.map +1 -0
- package/src/lib/project-release/project-release.d.ts +28 -0
- package/src/lib/project-release/project-release.js +9 -0
- package/src/lib/project-release/project-release.js.map +1 -0
- package/src/lib/project-release/project-release.request.d.ts +70 -0
- package/src/lib/project-release/project-release.request.js +47 -0
- package/src/lib/project-release/project-release.request.js.map +1 -0
- package/src/lib/project-release/project-state.d.ts +1301 -0
- package/src/lib/project-release/project-state.js +138 -0
- package/src/lib/project-release/project-state.js.map +1 -0
- package/src/lib/project-role/project-role.d.ts +12 -0
- package/src/lib/project-role/project-role.js +7 -0
- package/src/lib/project-role/project-role.js.map +1 -0
- package/src/lib/project-role/project-role.request.d.ts +18 -0
- package/src/lib/project-role/project-role.request.js +23 -0
- package/src/lib/project-role/project-role.request.js.map +1 -0
- package/src/lib/property/markdown/index.d.ts +6 -0
- package/src/lib/property/markdown/index.js +11 -0
- package/src/lib/property/markdown/index.js.map +1 -0
- package/src/lib/store-entry/dto/store-entry-request.d.ts +14 -0
- package/src/lib/store-entry/dto/store-entry-request.js +18 -0
- package/src/lib/store-entry/dto/store-entry-request.js.map +1 -0
- package/src/lib/store-entry/store-entry.d.ts +11 -0
- package/src/lib/store-entry/store-entry.js +6 -0
- package/src/lib/store-entry/store-entry.js.map +1 -0
- package/src/lib/support-url.d.ts +1 -0
- package/src/lib/support-url.js +5 -0
- package/src/lib/support-url.js.map +1 -0
- package/src/lib/tables/cell.d.ts +11 -0
- package/src/lib/tables/cell.js +7 -0
- package/src/lib/tables/cell.js.map +1 -0
- package/src/lib/tables/dto/fields.dto.d.ts +27 -0
- package/src/lib/tables/dto/fields.dto.js +29 -0
- package/src/lib/tables/dto/fields.dto.js.map +1 -0
- package/src/lib/tables/dto/records.dto.d.ts +52 -0
- package/src/lib/tables/dto/records.dto.js +45 -0
- package/src/lib/tables/dto/records.dto.js.map +1 -0
- package/src/lib/tables/dto/tables.dto.d.ts +48 -0
- package/src/lib/tables/dto/tables.dto.js +36 -0
- package/src/lib/tables/dto/tables.dto.js.map +1 -0
- package/src/lib/tables/field.d.ts +36 -0
- package/src/lib/tables/field.js +22 -0
- package/src/lib/tables/field.js.map +1 -0
- package/src/lib/tables/index.d.ts +8 -0
- package/src/lib/tables/index.js +12 -0
- package/src/lib/tables/index.js.map +1 -0
- package/src/lib/tables/record.d.ts +23 -0
- package/src/lib/tables/record.js +19 -0
- package/src/lib/tables/record.js.map +1 -0
- package/src/lib/tables/table-webhook.d.ts +16 -0
- package/src/lib/tables/table-webhook.js +13 -0
- package/src/lib/tables/table-webhook.js.map +1 -0
- package/src/lib/tables/table.d.ts +55 -0
- package/src/lib/tables/table.js +24 -0
- package/src/lib/tables/table.js.map +1 -0
- package/src/lib/tag/index.d.ts +32 -0
- package/src/lib/tag/index.js +19 -0
- package/src/lib/tag/index.js.map +1 -0
- package/src/lib/template/index.d.ts +3 -0
- package/src/lib/template/index.js +7 -0
- package/src/lib/template/index.js.map +1 -0
- package/src/lib/template/template-telemetry.d.ts +28 -0
- package/src/lib/template/template-telemetry.js +44 -0
- package/src/lib/template/template-telemetry.js.map +1 -0
- package/src/lib/template/template.d.ts +298 -0
- package/src/lib/template/template.js +46 -0
- package/src/lib/template/template.js.map +1 -0
- package/src/lib/template/template.requests.d.ts +226 -0
- package/src/lib/template/template.requests.js +39 -0
- package/src/lib/template/template.requests.js.map +1 -0
- package/src/lib/todos/index.d.ts +257 -0
- package/src/lib/todos/index.js +75 -0
- package/src/lib/todos/index.js.map +1 -0
- package/src/lib/todos/todos-request.d.ts +68 -0
- package/src/lib/todos/todos-request.js +52 -0
- package/src/lib/todos/todos-request.js.map +1 -0
- package/src/lib/trigger/index.d.ts +47 -0
- package/src/lib/trigger/index.js +34 -0
- package/src/lib/trigger/index.js.map +1 -0
- package/src/lib/user/badges/index.d.ts +56 -0
- package/src/lib/user/badges/index.js +54 -0
- package/src/lib/user/badges/index.js.map +1 -0
- package/src/lib/user/index.d.ts +16 -0
- package/src/lib/user/index.js +19 -0
- package/src/lib/user/index.js.map +1 -0
- package/src/lib/user/user.d.ts +87 -0
- package/src/lib/user/user.js +73 -0
- package/src/lib/user/user.js.map +1 -0
- package/src/lib/webhook/dto.d.ts +5 -0
- package/src/lib/webhook/dto.js +9 -0
- package/src/lib/webhook/dto.js.map +1 -0
- package/src/lib/webhook/index.d.ts +1 -0
- package/src/lib/webhook/index.js +5 -0
- package/src/lib/webhook/index.js.map +1 -0
- package/src/lib/websocket/index.d.ts +55 -0
- package/src/lib/websocket/index.js +48 -0
- package/src/lib/websocket/index.js.map +1 -0
- package/src/lib/websocket/socket-utils.d.ts +6 -0
- package/src/lib/websocket/socket-utils.js +33 -0
- package/src/lib/websocket/socket-utils.js.map +1 -0
- package/src/lib/workers/index.d.ts +375 -0
- package/src/lib/workers/index.js +98 -0
- package/src/lib/workers/index.js.map +1 -0
- package/src/lib/workers/job-data.d.ts +808 -0
- package/src/lib/workers/job-data.js +203 -0
- package/src/lib/workers/job-data.js.map +1 -0
- package/src/lib/workers/queue-metrics.d.ts +25 -0
- package/src/lib/workers/queue-metrics.js +18 -0
- package/src/lib/workers/queue-metrics.js.map +1 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
import { Static } from '@sinclair/typebox';
|
|
2
|
+
export declare enum AIProviderName {
|
|
3
|
+
OPENAI = "openai",
|
|
4
|
+
OPENROUTER = "openrouter",
|
|
5
|
+
ANTHROPIC = "anthropic",
|
|
6
|
+
AZURE = "azure",
|
|
7
|
+
GOOGLE = "google",
|
|
8
|
+
ACTIVEPIECES = "activepieces",
|
|
9
|
+
CLOUDFLARE_GATEWAY = "cloudflare-gateway",
|
|
10
|
+
CUSTOM = "custom"
|
|
11
|
+
}
|
|
12
|
+
export declare enum AIProviderModelType {
|
|
13
|
+
IMAGE = "image",
|
|
14
|
+
TEXT = "text"
|
|
15
|
+
}
|
|
16
|
+
export declare const BaseAIProviderAuthConfig: import("@sinclair/typebox").TObject<{
|
|
17
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
18
|
+
}>;
|
|
19
|
+
export type BaseAIProviderAuthConfig = Static<typeof BaseAIProviderAuthConfig>;
|
|
20
|
+
export declare const AnthropicProviderAuthConfig: import("@sinclair/typebox").TObject<{
|
|
21
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
22
|
+
}>;
|
|
23
|
+
export type AnthropicProviderAuthConfig = Static<typeof AnthropicProviderAuthConfig>;
|
|
24
|
+
export declare const ActivePiecesProviderAuthConfig: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
25
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
26
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
27
|
+
apiKeyHash: import("@sinclair/typebox").TString;
|
|
28
|
+
}>]>;
|
|
29
|
+
export type ActivePiecesProviderAuthConfig = Static<typeof ActivePiecesProviderAuthConfig>;
|
|
30
|
+
export declare const OpenAICompatibleProviderAuthConfig: import("@sinclair/typebox").TObject<{
|
|
31
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
32
|
+
}>;
|
|
33
|
+
export type OpenAICompatibleProviderAuthConfig = Static<typeof OpenAICompatibleProviderAuthConfig>;
|
|
34
|
+
export declare const CloudflareGatewayProviderAuthConfig: import("@sinclair/typebox").TObject<{
|
|
35
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
36
|
+
}>;
|
|
37
|
+
export type CloudflareGatewayProviderAuthConfig = Static<typeof CloudflareGatewayProviderAuthConfig>;
|
|
38
|
+
export declare const AzureProviderAuthConfig: import("@sinclair/typebox").TObject<{
|
|
39
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
40
|
+
}>;
|
|
41
|
+
export type AzureProviderAuthConfig = Static<typeof AzureProviderAuthConfig>;
|
|
42
|
+
export declare const GoogleProviderAuthConfig: import("@sinclair/typebox").TObject<{
|
|
43
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
44
|
+
}>;
|
|
45
|
+
export type GoogleProviderAuthConfig = Static<typeof GoogleProviderAuthConfig>;
|
|
46
|
+
export declare const OpenAIProviderAuthConfig: import("@sinclair/typebox").TObject<{
|
|
47
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
48
|
+
}>;
|
|
49
|
+
export type OpenAIProviderAuthConfig = Static<typeof OpenAIProviderAuthConfig>;
|
|
50
|
+
export declare const OpenRouterProviderAuthConfig: import("@sinclair/typebox").TObject<{
|
|
51
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
52
|
+
}>;
|
|
53
|
+
export type OpenRouterProviderAuthConfig = Static<typeof OpenRouterProviderAuthConfig>;
|
|
54
|
+
export declare const AnthropicProviderConfig: import("@sinclair/typebox").TObject<{}>;
|
|
55
|
+
export type AnthropicProviderConfig = Static<typeof AnthropicProviderConfig>;
|
|
56
|
+
export declare const ActivePiecesProviderConfig: import("@sinclair/typebox").TObject<{}>;
|
|
57
|
+
export type ActivePiecesProviderConfig = Static<typeof ActivePiecesProviderConfig>;
|
|
58
|
+
export declare const ProviderModelConfig: import("@sinclair/typebox").TObject<{
|
|
59
|
+
modelId: import("@sinclair/typebox").TString;
|
|
60
|
+
modelName: import("@sinclair/typebox").TString;
|
|
61
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
62
|
+
}>;
|
|
63
|
+
export type ProviderModelConfig = Static<typeof ProviderModelConfig>;
|
|
64
|
+
export declare const OpenAICompatibleProviderConfig: import("@sinclair/typebox").TObject<{
|
|
65
|
+
apiKeyHeader: import("@sinclair/typebox").TString;
|
|
66
|
+
baseUrl: import("@sinclair/typebox").TString;
|
|
67
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
68
|
+
modelId: import("@sinclair/typebox").TString;
|
|
69
|
+
modelName: import("@sinclair/typebox").TString;
|
|
70
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
71
|
+
}>>;
|
|
72
|
+
}>;
|
|
73
|
+
export type OpenAICompatibleProviderConfig = Static<typeof OpenAICompatibleProviderConfig>;
|
|
74
|
+
export declare const CloudflareGatewayProviderConfig: import("@sinclair/typebox").TObject<{
|
|
75
|
+
accountId: import("@sinclair/typebox").TString;
|
|
76
|
+
gatewayId: import("@sinclair/typebox").TString;
|
|
77
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
78
|
+
modelId: import("@sinclair/typebox").TString;
|
|
79
|
+
modelName: import("@sinclair/typebox").TString;
|
|
80
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
81
|
+
}>>;
|
|
82
|
+
vertexProject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
83
|
+
vertexRegion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
84
|
+
}>;
|
|
85
|
+
export type CloudflareGatewayProviderConfig = Static<typeof CloudflareGatewayProviderConfig>;
|
|
86
|
+
export declare const AzureProviderConfig: import("@sinclair/typebox").TObject<{
|
|
87
|
+
resourceName: import("@sinclair/typebox").TString;
|
|
88
|
+
}>;
|
|
89
|
+
export type AzureProviderConfig = Static<typeof AzureProviderConfig>;
|
|
90
|
+
export declare const GoogleProviderConfig: import("@sinclair/typebox").TObject<{}>;
|
|
91
|
+
export type GoogleProviderConfig = Static<typeof GoogleProviderConfig>;
|
|
92
|
+
export declare const OpenAIProviderConfig: import("@sinclair/typebox").TObject<{}>;
|
|
93
|
+
export type OpenAIProviderConfig = Static<typeof OpenAIProviderConfig>;
|
|
94
|
+
export declare const OpenRouterProviderConfig: import("@sinclair/typebox").TObject<{}>;
|
|
95
|
+
export type OpenRouterProviderConfig = Static<typeof OpenRouterProviderConfig>;
|
|
96
|
+
export declare const AIProviderAuthConfig: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
97
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
98
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
99
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
100
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
101
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
102
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
103
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
104
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
105
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
106
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
107
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
108
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
109
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
110
|
+
}>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
111
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
112
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
113
|
+
apiKeyHash: import("@sinclair/typebox").TString;
|
|
114
|
+
}>]>]>;
|
|
115
|
+
export type AIProviderAuthConfig = Static<typeof AIProviderAuthConfig>;
|
|
116
|
+
export declare const AIProviderConfig: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
117
|
+
apiKeyHeader: import("@sinclair/typebox").TString;
|
|
118
|
+
baseUrl: import("@sinclair/typebox").TString;
|
|
119
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
120
|
+
modelId: import("@sinclair/typebox").TString;
|
|
121
|
+
modelName: import("@sinclair/typebox").TString;
|
|
122
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
123
|
+
}>>;
|
|
124
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
125
|
+
accountId: import("@sinclair/typebox").TString;
|
|
126
|
+
gatewayId: import("@sinclair/typebox").TString;
|
|
127
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
128
|
+
modelId: import("@sinclair/typebox").TString;
|
|
129
|
+
modelName: import("@sinclair/typebox").TString;
|
|
130
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
131
|
+
}>>;
|
|
132
|
+
vertexProject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
133
|
+
vertexRegion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
134
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
135
|
+
resourceName: import("@sinclair/typebox").TString;
|
|
136
|
+
}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>]>;
|
|
137
|
+
export type AIProviderConfig = Static<typeof AIProviderConfig>;
|
|
138
|
+
export declare const AIProvider: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
139
|
+
id: import("@sinclair/typebox").TString;
|
|
140
|
+
created: import("@sinclair/typebox").TString;
|
|
141
|
+
updated: import("@sinclair/typebox").TString;
|
|
142
|
+
}>, import("../common/base-model").TDiscriminatedUnion<[import("@sinclair/typebox").TObject<{
|
|
143
|
+
displayName: import("@sinclair/typebox").TString;
|
|
144
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.OPENAI>;
|
|
145
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
146
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
147
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
148
|
+
}>;
|
|
149
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
150
|
+
displayName: import("@sinclair/typebox").TString;
|
|
151
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.OPENROUTER>;
|
|
152
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
153
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
154
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
155
|
+
}>;
|
|
156
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
157
|
+
displayName: import("@sinclair/typebox").TString;
|
|
158
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.ANTHROPIC>;
|
|
159
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
160
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
161
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
162
|
+
}>;
|
|
163
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
164
|
+
displayName: import("@sinclair/typebox").TString;
|
|
165
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.AZURE>;
|
|
166
|
+
config: import("@sinclair/typebox").TObject<{
|
|
167
|
+
resourceName: import("@sinclair/typebox").TString;
|
|
168
|
+
}>;
|
|
169
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
170
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
171
|
+
}>;
|
|
172
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
173
|
+
displayName: import("@sinclair/typebox").TString;
|
|
174
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.GOOGLE>;
|
|
175
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
176
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
177
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
178
|
+
}>;
|
|
179
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
180
|
+
displayName: import("@sinclair/typebox").TString;
|
|
181
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.CLOUDFLARE_GATEWAY>;
|
|
182
|
+
config: import("@sinclair/typebox").TObject<{
|
|
183
|
+
accountId: import("@sinclair/typebox").TString;
|
|
184
|
+
gatewayId: import("@sinclair/typebox").TString;
|
|
185
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
186
|
+
modelId: import("@sinclair/typebox").TString;
|
|
187
|
+
modelName: import("@sinclair/typebox").TString;
|
|
188
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
189
|
+
}>>;
|
|
190
|
+
vertexProject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
191
|
+
vertexRegion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
192
|
+
}>;
|
|
193
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
194
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
195
|
+
}>;
|
|
196
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
197
|
+
displayName: import("@sinclair/typebox").TString;
|
|
198
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.CUSTOM>;
|
|
199
|
+
config: import("@sinclair/typebox").TObject<{
|
|
200
|
+
apiKeyHeader: import("@sinclair/typebox").TString;
|
|
201
|
+
baseUrl: import("@sinclair/typebox").TString;
|
|
202
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
203
|
+
modelId: import("@sinclair/typebox").TString;
|
|
204
|
+
modelName: import("@sinclair/typebox").TString;
|
|
205
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
206
|
+
}>>;
|
|
207
|
+
}>;
|
|
208
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
209
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
210
|
+
}>;
|
|
211
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
212
|
+
displayName: import("@sinclair/typebox").TString;
|
|
213
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.ACTIVEPIECES>;
|
|
214
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
215
|
+
auth: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
216
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
217
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
218
|
+
apiKeyHash: import("@sinclair/typebox").TString;
|
|
219
|
+
}>]>;
|
|
220
|
+
}>]>, import("@sinclair/typebox").TObject<{
|
|
221
|
+
displayName: import("@sinclair/typebox").TString;
|
|
222
|
+
platformId: import("@sinclair/typebox").TString;
|
|
223
|
+
}>]>;
|
|
224
|
+
export type AIProvider = Static<typeof AIProvider>;
|
|
225
|
+
export declare const AIProviderWithoutSensitiveData: import("@sinclair/typebox").TObject<{
|
|
226
|
+
id: import("@sinclair/typebox").TString;
|
|
227
|
+
name: import("@sinclair/typebox").TString;
|
|
228
|
+
provider: import("@sinclair/typebox").TEnum<typeof AIProviderName>;
|
|
229
|
+
config: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
230
|
+
apiKeyHeader: import("@sinclair/typebox").TString;
|
|
231
|
+
baseUrl: import("@sinclair/typebox").TString;
|
|
232
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
233
|
+
modelId: import("@sinclair/typebox").TString;
|
|
234
|
+
modelName: import("@sinclair/typebox").TString;
|
|
235
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
236
|
+
}>>;
|
|
237
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
238
|
+
accountId: import("@sinclair/typebox").TString;
|
|
239
|
+
gatewayId: import("@sinclair/typebox").TString;
|
|
240
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
241
|
+
modelId: import("@sinclair/typebox").TString;
|
|
242
|
+
modelName: import("@sinclair/typebox").TString;
|
|
243
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
244
|
+
}>>;
|
|
245
|
+
vertexProject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
246
|
+
vertexRegion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
247
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
248
|
+
resourceName: import("@sinclair/typebox").TString;
|
|
249
|
+
}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>]>;
|
|
250
|
+
}>;
|
|
251
|
+
export type AIProviderWithoutSensitiveData = Static<typeof AIProviderWithoutSensitiveData>;
|
|
252
|
+
export declare const AIProviderModel: import("@sinclair/typebox").TObject<{
|
|
253
|
+
id: import("@sinclair/typebox").TString;
|
|
254
|
+
name: import("@sinclair/typebox").TString;
|
|
255
|
+
type: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
256
|
+
}>;
|
|
257
|
+
export type AIProviderModel = Static<typeof AIProviderModel>;
|
|
258
|
+
export declare const CreateAIProviderRequest: import("../common/base-model").TDiscriminatedUnion<[import("@sinclair/typebox").TObject<{
|
|
259
|
+
displayName: import("@sinclair/typebox").TString;
|
|
260
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.OPENAI>;
|
|
261
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
262
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
263
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
264
|
+
}>;
|
|
265
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
266
|
+
displayName: import("@sinclair/typebox").TString;
|
|
267
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.OPENROUTER>;
|
|
268
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
269
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
270
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
271
|
+
}>;
|
|
272
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
273
|
+
displayName: import("@sinclair/typebox").TString;
|
|
274
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.ANTHROPIC>;
|
|
275
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
276
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
277
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
278
|
+
}>;
|
|
279
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
280
|
+
displayName: import("@sinclair/typebox").TString;
|
|
281
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.AZURE>;
|
|
282
|
+
config: import("@sinclair/typebox").TObject<{
|
|
283
|
+
resourceName: import("@sinclair/typebox").TString;
|
|
284
|
+
}>;
|
|
285
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
286
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
287
|
+
}>;
|
|
288
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
289
|
+
displayName: import("@sinclair/typebox").TString;
|
|
290
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.GOOGLE>;
|
|
291
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
292
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
293
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
294
|
+
}>;
|
|
295
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
296
|
+
displayName: import("@sinclair/typebox").TString;
|
|
297
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.CLOUDFLARE_GATEWAY>;
|
|
298
|
+
config: import("@sinclair/typebox").TObject<{
|
|
299
|
+
accountId: import("@sinclair/typebox").TString;
|
|
300
|
+
gatewayId: import("@sinclair/typebox").TString;
|
|
301
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
302
|
+
modelId: import("@sinclair/typebox").TString;
|
|
303
|
+
modelName: import("@sinclair/typebox").TString;
|
|
304
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
305
|
+
}>>;
|
|
306
|
+
vertexProject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
307
|
+
vertexRegion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
308
|
+
}>;
|
|
309
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
310
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
311
|
+
}>;
|
|
312
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
313
|
+
displayName: import("@sinclair/typebox").TString;
|
|
314
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.CUSTOM>;
|
|
315
|
+
config: import("@sinclair/typebox").TObject<{
|
|
316
|
+
apiKeyHeader: import("@sinclair/typebox").TString;
|
|
317
|
+
baseUrl: import("@sinclair/typebox").TString;
|
|
318
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
319
|
+
modelId: import("@sinclair/typebox").TString;
|
|
320
|
+
modelName: import("@sinclair/typebox").TString;
|
|
321
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
322
|
+
}>>;
|
|
323
|
+
}>;
|
|
324
|
+
auth: import("@sinclair/typebox").TObject<{
|
|
325
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
326
|
+
}>;
|
|
327
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
328
|
+
displayName: import("@sinclair/typebox").TString;
|
|
329
|
+
provider: import("@sinclair/typebox").TLiteral<AIProviderName.ACTIVEPIECES>;
|
|
330
|
+
config: import("@sinclair/typebox").TObject<{}>;
|
|
331
|
+
auth: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
332
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
333
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
334
|
+
apiKeyHash: import("@sinclair/typebox").TString;
|
|
335
|
+
}>]>;
|
|
336
|
+
}>]>;
|
|
337
|
+
export type CreateAIProviderRequest = Static<typeof CreateAIProviderRequest>;
|
|
338
|
+
export declare const UpdateAIProviderRequest: import("@sinclair/typebox").TObject<{
|
|
339
|
+
displayName: import("@sinclair/typebox").TString;
|
|
340
|
+
config: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
341
|
+
apiKeyHeader: import("@sinclair/typebox").TString;
|
|
342
|
+
baseUrl: import("@sinclair/typebox").TString;
|
|
343
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
344
|
+
modelId: import("@sinclair/typebox").TString;
|
|
345
|
+
modelName: import("@sinclair/typebox").TString;
|
|
346
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
347
|
+
}>>;
|
|
348
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
349
|
+
accountId: import("@sinclair/typebox").TString;
|
|
350
|
+
gatewayId: import("@sinclair/typebox").TString;
|
|
351
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
352
|
+
modelId: import("@sinclair/typebox").TString;
|
|
353
|
+
modelName: import("@sinclair/typebox").TString;
|
|
354
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
355
|
+
}>>;
|
|
356
|
+
vertexProject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
357
|
+
vertexRegion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
358
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
359
|
+
resourceName: import("@sinclair/typebox").TString;
|
|
360
|
+
}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>]>>;
|
|
361
|
+
auth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
362
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
363
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
364
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
365
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
366
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
367
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
368
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
369
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
370
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
371
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
372
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
373
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
374
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
375
|
+
}>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
376
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
377
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
378
|
+
apiKeyHash: import("@sinclair/typebox").TString;
|
|
379
|
+
}>]>]>>;
|
|
380
|
+
}>;
|
|
381
|
+
export type UpdateAIProviderRequest = Static<typeof UpdateAIProviderRequest>;
|
|
382
|
+
export declare const GetProviderConfigResponse: import("@sinclair/typebox").TObject<{
|
|
383
|
+
provider: import("@sinclair/typebox").TEnum<typeof AIProviderName>;
|
|
384
|
+
config: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
385
|
+
apiKeyHeader: import("@sinclair/typebox").TString;
|
|
386
|
+
baseUrl: import("@sinclair/typebox").TString;
|
|
387
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
388
|
+
modelId: import("@sinclair/typebox").TString;
|
|
389
|
+
modelName: import("@sinclair/typebox").TString;
|
|
390
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
391
|
+
}>>;
|
|
392
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
393
|
+
accountId: import("@sinclair/typebox").TString;
|
|
394
|
+
gatewayId: import("@sinclair/typebox").TString;
|
|
395
|
+
models: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
396
|
+
modelId: import("@sinclair/typebox").TString;
|
|
397
|
+
modelName: import("@sinclair/typebox").TString;
|
|
398
|
+
modelType: import("@sinclair/typebox").TEnum<typeof AIProviderModelType>;
|
|
399
|
+
}>>;
|
|
400
|
+
vertexProject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
401
|
+
vertexRegion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
402
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
403
|
+
resourceName: import("@sinclair/typebox").TString;
|
|
404
|
+
}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TObject<{}>]>;
|
|
405
|
+
auth: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
406
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
407
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
408
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
409
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
410
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
411
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
412
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
413
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
414
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
415
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
416
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
417
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
418
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
419
|
+
}>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
420
|
+
apiKey: import("@sinclair/typebox").TString;
|
|
421
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
422
|
+
apiKeyHash: import("@sinclair/typebox").TString;
|
|
423
|
+
}>]>]>;
|
|
424
|
+
}>;
|
|
425
|
+
export type GetProviderConfigResponse = Static<typeof GetProviderConfigResponse>;
|
|
426
|
+
export declare const AIErrorResponse: import("@sinclair/typebox").TObject<{
|
|
427
|
+
error: import("@sinclair/typebox").TObject<{
|
|
428
|
+
message: import("@sinclair/typebox").TString;
|
|
429
|
+
type: import("@sinclair/typebox").TString;
|
|
430
|
+
code: import("@sinclair/typebox").TString;
|
|
431
|
+
}>;
|
|
432
|
+
}>;
|
|
433
|
+
export type AIErrorResponse = Static<typeof AIErrorResponse>;
|
|
434
|
+
/**
|
|
435
|
+
* Splits a Cloudflare Gateway model ID into provider and model, i.e. "google-vertex-ai/google/gemini-2.5-pro" -> { provider: "google-vertex-ai", model: "google/gemini-2.5-pro" }.
|
|
436
|
+
* @param modelId - The model ID to split.
|
|
437
|
+
* @returns An object containing the provider and model.
|
|
438
|
+
*/
|
|
439
|
+
export declare function splitCloudflareGatewayModelId(modelId: string): {
|
|
440
|
+
provider: 'google-vertex-ai';
|
|
441
|
+
publisher: string;
|
|
442
|
+
model: string;
|
|
443
|
+
} | {
|
|
444
|
+
provider: string;
|
|
445
|
+
model: string;
|
|
446
|
+
publisher: undefined;
|
|
447
|
+
} | {
|
|
448
|
+
provider: undefined;
|
|
449
|
+
model: string;
|
|
450
|
+
publisher: undefined;
|
|
451
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AIErrorResponse = exports.GetProviderConfigResponse = exports.UpdateAIProviderRequest = exports.CreateAIProviderRequest = exports.AIProviderModel = exports.AIProviderWithoutSensitiveData = exports.AIProvider = exports.AIProviderConfig = exports.AIProviderAuthConfig = exports.OpenRouterProviderConfig = exports.OpenAIProviderConfig = exports.GoogleProviderConfig = exports.AzureProviderConfig = exports.CloudflareGatewayProviderConfig = exports.OpenAICompatibleProviderConfig = exports.ProviderModelConfig = exports.ActivePiecesProviderConfig = exports.AnthropicProviderConfig = exports.OpenRouterProviderAuthConfig = exports.OpenAIProviderAuthConfig = exports.GoogleProviderAuthConfig = exports.AzureProviderAuthConfig = exports.CloudflareGatewayProviderAuthConfig = exports.OpenAICompatibleProviderAuthConfig = exports.ActivePiecesProviderAuthConfig = exports.AnthropicProviderAuthConfig = exports.BaseAIProviderAuthConfig = exports.AIProviderModelType = exports.AIProviderName = void 0;
|
|
4
|
+
exports.splitCloudflareGatewayModelId = splitCloudflareGatewayModelId;
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
const base_model_1 = require("../common/base-model");
|
|
7
|
+
var AIProviderName;
|
|
8
|
+
(function (AIProviderName) {
|
|
9
|
+
AIProviderName["OPENAI"] = "openai";
|
|
10
|
+
AIProviderName["OPENROUTER"] = "openrouter";
|
|
11
|
+
AIProviderName["ANTHROPIC"] = "anthropic";
|
|
12
|
+
AIProviderName["AZURE"] = "azure";
|
|
13
|
+
AIProviderName["GOOGLE"] = "google";
|
|
14
|
+
AIProviderName["ACTIVEPIECES"] = "activepieces";
|
|
15
|
+
AIProviderName["CLOUDFLARE_GATEWAY"] = "cloudflare-gateway";
|
|
16
|
+
AIProviderName["CUSTOM"] = "custom";
|
|
17
|
+
})(AIProviderName || (exports.AIProviderName = AIProviderName = {}));
|
|
18
|
+
var AIProviderModelType;
|
|
19
|
+
(function (AIProviderModelType) {
|
|
20
|
+
AIProviderModelType["IMAGE"] = "image";
|
|
21
|
+
AIProviderModelType["TEXT"] = "text";
|
|
22
|
+
})(AIProviderModelType || (exports.AIProviderModelType = AIProviderModelType = {}));
|
|
23
|
+
exports.BaseAIProviderAuthConfig = typebox_1.Type.Object({
|
|
24
|
+
apiKey: typebox_1.Type.String(),
|
|
25
|
+
});
|
|
26
|
+
exports.AnthropicProviderAuthConfig = exports.BaseAIProviderAuthConfig;
|
|
27
|
+
exports.ActivePiecesProviderAuthConfig = typebox_1.Type.Intersect([
|
|
28
|
+
exports.BaseAIProviderAuthConfig,
|
|
29
|
+
typebox_1.Type.Object({
|
|
30
|
+
apiKeyHash: typebox_1.Type.String(),
|
|
31
|
+
}),
|
|
32
|
+
]);
|
|
33
|
+
exports.OpenAICompatibleProviderAuthConfig = exports.BaseAIProviderAuthConfig;
|
|
34
|
+
exports.CloudflareGatewayProviderAuthConfig = exports.BaseAIProviderAuthConfig;
|
|
35
|
+
exports.AzureProviderAuthConfig = exports.BaseAIProviderAuthConfig;
|
|
36
|
+
exports.GoogleProviderAuthConfig = exports.BaseAIProviderAuthConfig;
|
|
37
|
+
exports.OpenAIProviderAuthConfig = exports.BaseAIProviderAuthConfig;
|
|
38
|
+
exports.OpenRouterProviderAuthConfig = exports.BaseAIProviderAuthConfig;
|
|
39
|
+
exports.AnthropicProviderConfig = typebox_1.Type.Object({});
|
|
40
|
+
exports.ActivePiecesProviderConfig = typebox_1.Type.Object({});
|
|
41
|
+
exports.ProviderModelConfig = typebox_1.Type.Object({
|
|
42
|
+
modelId: typebox_1.Type.String(),
|
|
43
|
+
modelName: typebox_1.Type.String(),
|
|
44
|
+
modelType: typebox_1.Type.Enum(AIProviderModelType),
|
|
45
|
+
});
|
|
46
|
+
exports.OpenAICompatibleProviderConfig = typebox_1.Type.Object({
|
|
47
|
+
apiKeyHeader: typebox_1.Type.String(),
|
|
48
|
+
baseUrl: typebox_1.Type.String(),
|
|
49
|
+
models: typebox_1.Type.Array(exports.ProviderModelConfig),
|
|
50
|
+
});
|
|
51
|
+
exports.CloudflareGatewayProviderConfig = typebox_1.Type.Object({
|
|
52
|
+
accountId: typebox_1.Type.String(),
|
|
53
|
+
gatewayId: typebox_1.Type.String(),
|
|
54
|
+
models: typebox_1.Type.Array(exports.ProviderModelConfig),
|
|
55
|
+
vertexProject: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
56
|
+
vertexRegion: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
57
|
+
});
|
|
58
|
+
exports.AzureProviderConfig = typebox_1.Type.Object({
|
|
59
|
+
resourceName: typebox_1.Type.String(),
|
|
60
|
+
});
|
|
61
|
+
exports.GoogleProviderConfig = typebox_1.Type.Object({});
|
|
62
|
+
exports.OpenAIProviderConfig = typebox_1.Type.Object({});
|
|
63
|
+
exports.OpenRouterProviderConfig = typebox_1.Type.Object({});
|
|
64
|
+
exports.AIProviderAuthConfig = typebox_1.Type.Union([
|
|
65
|
+
exports.AnthropicProviderAuthConfig,
|
|
66
|
+
exports.AzureProviderAuthConfig,
|
|
67
|
+
exports.GoogleProviderAuthConfig,
|
|
68
|
+
exports.OpenAIProviderAuthConfig,
|
|
69
|
+
exports.OpenRouterProviderAuthConfig,
|
|
70
|
+
exports.CloudflareGatewayProviderAuthConfig,
|
|
71
|
+
exports.OpenAICompatibleProviderAuthConfig,
|
|
72
|
+
exports.ActivePiecesProviderAuthConfig,
|
|
73
|
+
]);
|
|
74
|
+
// Order matters, put schemas with required fields first, empty ones last. This is to avoid empty objects matching any object.
|
|
75
|
+
exports.AIProviderConfig = typebox_1.Type.Union([
|
|
76
|
+
exports.OpenAICompatibleProviderConfig,
|
|
77
|
+
exports.CloudflareGatewayProviderConfig,
|
|
78
|
+
exports.AzureProviderConfig,
|
|
79
|
+
exports.AnthropicProviderConfig,
|
|
80
|
+
exports.GoogleProviderConfig,
|
|
81
|
+
exports.OpenAIProviderConfig,
|
|
82
|
+
exports.OpenRouterProviderConfig,
|
|
83
|
+
exports.ActivePiecesProviderConfig,
|
|
84
|
+
]);
|
|
85
|
+
const ProviderConfigUnion = (0, base_model_1.DiscriminatedUnion)('provider', [
|
|
86
|
+
typebox_1.Type.Object({
|
|
87
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
88
|
+
provider: typebox_1.Type.Literal(AIProviderName.OPENAI),
|
|
89
|
+
config: exports.OpenAIProviderConfig,
|
|
90
|
+
auth: exports.OpenAIProviderAuthConfig,
|
|
91
|
+
}),
|
|
92
|
+
typebox_1.Type.Object({
|
|
93
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
94
|
+
provider: typebox_1.Type.Literal(AIProviderName.OPENROUTER),
|
|
95
|
+
config: exports.OpenRouterProviderConfig,
|
|
96
|
+
auth: exports.OpenRouterProviderAuthConfig,
|
|
97
|
+
}),
|
|
98
|
+
typebox_1.Type.Object({
|
|
99
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
100
|
+
provider: typebox_1.Type.Literal(AIProviderName.ANTHROPIC),
|
|
101
|
+
config: exports.AnthropicProviderConfig,
|
|
102
|
+
auth: exports.AnthropicProviderAuthConfig,
|
|
103
|
+
}),
|
|
104
|
+
typebox_1.Type.Object({
|
|
105
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
106
|
+
provider: typebox_1.Type.Literal(AIProviderName.AZURE),
|
|
107
|
+
config: exports.AzureProviderConfig,
|
|
108
|
+
auth: exports.AzureProviderAuthConfig,
|
|
109
|
+
}),
|
|
110
|
+
typebox_1.Type.Object({
|
|
111
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
112
|
+
provider: typebox_1.Type.Literal(AIProviderName.GOOGLE),
|
|
113
|
+
config: exports.GoogleProviderConfig,
|
|
114
|
+
auth: exports.GoogleProviderAuthConfig,
|
|
115
|
+
}),
|
|
116
|
+
typebox_1.Type.Object({
|
|
117
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
118
|
+
provider: typebox_1.Type.Literal(AIProviderName.CLOUDFLARE_GATEWAY),
|
|
119
|
+
config: exports.CloudflareGatewayProviderConfig,
|
|
120
|
+
auth: exports.CloudflareGatewayProviderAuthConfig,
|
|
121
|
+
}),
|
|
122
|
+
typebox_1.Type.Object({
|
|
123
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
124
|
+
provider: typebox_1.Type.Literal(AIProviderName.CUSTOM),
|
|
125
|
+
config: exports.OpenAICompatibleProviderConfig,
|
|
126
|
+
auth: exports.OpenAICompatibleProviderAuthConfig,
|
|
127
|
+
}),
|
|
128
|
+
typebox_1.Type.Object({
|
|
129
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
130
|
+
provider: typebox_1.Type.Literal(AIProviderName.ACTIVEPIECES),
|
|
131
|
+
config: exports.ActivePiecesProviderConfig,
|
|
132
|
+
auth: exports.ActivePiecesProviderAuthConfig,
|
|
133
|
+
}),
|
|
134
|
+
]);
|
|
135
|
+
exports.AIProvider = typebox_1.Type.Intersect([
|
|
136
|
+
typebox_1.Type.Object(Object.assign({}, base_model_1.BaseModelSchema)),
|
|
137
|
+
ProviderConfigUnion,
|
|
138
|
+
typebox_1.Type.Object({
|
|
139
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
140
|
+
platformId: typebox_1.Type.String(),
|
|
141
|
+
}),
|
|
142
|
+
]);
|
|
143
|
+
exports.AIProviderWithoutSensitiveData = typebox_1.Type.Object({
|
|
144
|
+
id: typebox_1.Type.String(),
|
|
145
|
+
name: typebox_1.Type.String(),
|
|
146
|
+
provider: typebox_1.Type.Enum(AIProviderName),
|
|
147
|
+
config: exports.AIProviderConfig,
|
|
148
|
+
});
|
|
149
|
+
exports.AIProviderModel = typebox_1.Type.Object({
|
|
150
|
+
id: typebox_1.Type.String(),
|
|
151
|
+
name: typebox_1.Type.String(),
|
|
152
|
+
type: typebox_1.Type.Enum(AIProviderModelType),
|
|
153
|
+
});
|
|
154
|
+
exports.CreateAIProviderRequest = ProviderConfigUnion;
|
|
155
|
+
exports.UpdateAIProviderRequest = typebox_1.Type.Object({
|
|
156
|
+
displayName: typebox_1.Type.String({ minLength: 1 }),
|
|
157
|
+
config: typebox_1.Type.Optional(exports.AIProviderConfig),
|
|
158
|
+
auth: typebox_1.Type.Optional(exports.AIProviderAuthConfig),
|
|
159
|
+
});
|
|
160
|
+
exports.GetProviderConfigResponse = typebox_1.Type.Object({
|
|
161
|
+
provider: typebox_1.Type.Enum(AIProviderName),
|
|
162
|
+
config: exports.AIProviderConfig,
|
|
163
|
+
auth: exports.AIProviderAuthConfig,
|
|
164
|
+
});
|
|
165
|
+
exports.AIErrorResponse = typebox_1.Type.Object({
|
|
166
|
+
error: typebox_1.Type.Object({
|
|
167
|
+
message: typebox_1.Type.String(),
|
|
168
|
+
type: typebox_1.Type.String(),
|
|
169
|
+
code: typebox_1.Type.String(),
|
|
170
|
+
}),
|
|
171
|
+
});
|
|
172
|
+
/**
|
|
173
|
+
* Splits a Cloudflare Gateway model ID into provider and model, i.e. "google-vertex-ai/google/gemini-2.5-pro" -> { provider: "google-vertex-ai", model: "google/gemini-2.5-pro" }.
|
|
174
|
+
* @param modelId - The model ID to split.
|
|
175
|
+
* @returns An object containing the provider and model.
|
|
176
|
+
*/
|
|
177
|
+
function splitCloudflareGatewayModelId(modelId) {
|
|
178
|
+
const slashIndex = modelId.indexOf('/');
|
|
179
|
+
if (slashIndex === -1) {
|
|
180
|
+
//console.error(`Invalid model ID "${modelId}": expected format "provider/model"`)
|
|
181
|
+
return {
|
|
182
|
+
provider: undefined,
|
|
183
|
+
model: modelId,
|
|
184
|
+
publisher: undefined,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const provider = modelId.substring(0, slashIndex);
|
|
188
|
+
const rest = modelId.substring(slashIndex + 1);
|
|
189
|
+
if (provider === 'google-vertex-ai') {
|
|
190
|
+
const secondSlashIndex = rest.indexOf('/');
|
|
191
|
+
if (secondSlashIndex === -1) {
|
|
192
|
+
//console.error(`Invalid Google Vertex AI model ID "${modelId}": expected format "google-vertex-ai/publisher/model"`)
|
|
193
|
+
return {
|
|
194
|
+
provider: undefined,
|
|
195
|
+
model: modelId,
|
|
196
|
+
publisher: undefined,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
provider: 'google-vertex-ai',
|
|
201
|
+
publisher: rest.substring(0, secondSlashIndex),
|
|
202
|
+
model: rest.substring(secondSlashIndex + 1),
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
provider,
|
|
207
|
+
model: rest,
|
|
208
|
+
publisher: undefined,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=index.js.map
|