@nangohq/types 0.70.9 → 0.71.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/context.d.ts +15 -0
- package/dist/api-keys/scopes.d.ts +1 -1
- package/dist/api.endpoints.d.ts +8 -5
- package/dist/billing/types.d.ts +9 -4
- package/dist/cli/api.d.ts +12 -0
- package/dist/clientMetadata/http.api.d.ts +20 -0
- package/dist/connect/api.d.ts +4 -1
- package/dist/connect/session.d.ts +2 -0
- package/dist/connection/api/get.d.ts +25 -3
- package/dist/connection/api/metadata.d.ts +18 -0
- package/dist/connection/db.d.ts +6 -1
- package/dist/functions/capabilities.d.ts +7 -0
- package/dist/index.d.ts +6 -0
- package/dist/integration/api.d.ts +24 -0
- package/dist/mcp/api.d.ts +13 -2
- package/dist/mfa/api.d.ts +60 -0
- package/dist/mfa/db.d.ts +19 -0
- package/dist/nangoYaml/index.d.ts +1 -47
- package/dist/oauthSessions/db.d.ts +2 -0
- package/dist/persist/api.d.ts +112 -0
- package/dist/plans/db.d.ts +2 -2
- package/dist/plans/http.api.d.ts +8 -1
- package/dist/providers/api.d.ts +2 -2
- package/dist/providers/provider.d.ts +5 -2
- package/dist/pubsub/events.d.ts +1 -1
- package/dist/runner/sdk.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DBEnvironment } from '../environment/db.js';
|
|
2
|
+
import type { DBPlan } from '../plans/db.js';
|
|
3
|
+
import type { DBTeam } from '../team/db.js';
|
|
4
|
+
/**
|
|
5
|
+
* The context persist resolves when authenticating a request with an internal
|
|
6
|
+
* secret key. Deliberately minimal: it holds only the fields persist actually
|
|
7
|
+
* reads, fetched by a purpose-built query on the auth hot path — the Pick types
|
|
8
|
+
* make unfetched fields impossible to reference. Adding a field here requires
|
|
9
|
+
* extending the query in accountService.getPersistAuthContext.
|
|
10
|
+
*/
|
|
11
|
+
export interface PersistAuthContext {
|
|
12
|
+
account: Pick<DBTeam, 'id'>;
|
|
13
|
+
environment: Pick<DBEnvironment, 'id' | 'name'>;
|
|
14
|
+
plan: Pick<DBPlan, 'id' | 'name' | 'records_store'> | null;
|
|
15
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const API_KEY_SCOPES: readonly ["environment:*", "environment:integrations:list", "environment:integrations:list_credentials", "environment:integrations:list_functions", "environment:integrations:read", "environment:integrations:read_credentials", "environment:integrations:create", "environment:integrations:update", "environment:integrations:delete", "environment:integrations:*", "environment:connections:list", "environment:connections:list_credentials", "environment:connections:read", "environment:connections:read_credentials", "environment:connections:create", "environment:connections:update", "environment:connections:delete", "environment:connections:*", "environment:connect_sessions:write", "environment:syncs:read", "environment:syncs:execute", "environment:syncs:update", "environment:syncs:variant:create", "environment:syncs:variant:delete", "environment:syncs:*", "environment:functions:list", "environment:functions:read", "environment:functions:delete", "environment:functions:compile", "environment:functions:dryrun", "environment:functions:*", "environment:deploy", "environment:records:read", "environment:records:write", "environment:records:*", "environment:actions:execute", "environment:actions:*", "environment:proxy", "environment:variables:read", "environment:mcp"];
|
|
1
|
+
export declare const API_KEY_SCOPES: readonly ["environment:*", "environment:integrations:list", "environment:integrations:list_credentials", "environment:integrations:list_functions", "environment:integrations:read", "environment:integrations:read_credentials", "environment:integrations:create", "environment:integrations:update", "environment:integrations:delete", "environment:integrations:*", "environment:connections:list", "environment:connections:list_credentials", "environment:connections:read", "environment:connections:read_credentials", "environment:connections:create", "environment:connections:update", "environment:connections:delete", "environment:connections:*", "environment:connect_sessions:write", "environment:syncs:read", "environment:syncs:execute", "environment:syncs:update", "environment:syncs:variant:create", "environment:syncs:variant:delete", "environment:syncs:*", "environment:functions:list", "environment:functions:read", "environment:functions:delete", "environment:functions:compile", "environment:functions:dryrun", "environment:functions:*", "environment:deploy", "environment:records:read", "environment:records:write", "environment:records:*", "environment:logs:read", "environment:actions:execute", "environment:actions:*", "environment:proxy", "environment:variables:read", "environment:mcp"];
|
|
2
2
|
export type ApiKeyScope = (typeof API_KEY_SCOPES)[number];
|
|
3
3
|
export declare const ALL_SCOPES: string[];
|
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ import type { GetAsyncActionResult, GetPublicV1, PostInternalTriggerFunction, Po
|
|
|
3
3
|
import type { PostImpersonate } from './admin/http.api.js';
|
|
4
4
|
import type { EndpointMethod } from './api.js';
|
|
5
5
|
import type { PostPublicApiKeyAuthorization, PostPublicAppStoreAuthorization, PostPublicAwsSigV4Authorization, PostPublicBasicAuthorization, PostPublicBillAuthorization, PostPublicJwtAuthorization, PostPublicOauthOutboundAuthorization, PostPublicSignatureAuthorization, PostPublicTbaAuthorization, PostPublicTwoStepAuthorization, PostPublicUnauthenticatedAuthorization } from './auth/http.api.js';
|
|
6
|
+
import type { PostCliTelemetry } from './cli/api.js';
|
|
7
|
+
import type { GetPublicClientMetadata } from './clientMetadata/http.api.js';
|
|
6
8
|
import type { DeleteConnectSession, GetConnectSession, PostConnectSessions, PostInternalConnectSessions, PostPublicConnectSessionsReconnect, PostPublicConnectTelemetry } from './connect/api.js';
|
|
7
|
-
import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PatchPublicConnection, PostConnectionRefresh, PostPublicConnection } from './connection/api/get.js';
|
|
8
|
-
import type { SetMetadata, UpdateMetadata } from './connection/api/metadata.js';
|
|
9
|
+
import type { DeleteConnection, DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PatchConnection, PatchPublicConnection, PostConnectionRefresh, PostPublicConnection } from './connection/api/get.js';
|
|
10
|
+
import type { PostConnectionMetadata, SetMetadata, UpdateMetadata } from './connection/api/metadata.js';
|
|
9
11
|
import type { GetConnectUISettings, PutConnectUISettings } from './connectUISettings/api.js';
|
|
10
12
|
import type { PostDeploy, PostDeployConfirmation, PostDeployInternal } from './deploy/api.js';
|
|
11
13
|
import type { CreateApiKey, DeleteApiKey, DeleteEnvironment, GetEnvironment, GetEnvironments, ListApiKeys, PatchApiKey, PatchEnvironment, PostEnvironment } from './environment/api/index.js';
|
|
@@ -14,10 +16,11 @@ import type { PostEnvironmentVariables } from './environment/variable/api.js';
|
|
|
14
16
|
import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api.js';
|
|
15
17
|
import type { DeleteIntegrationFunction, DeletePublicIntegrationFunction, GetFunctionDeployment, GetFunctionDryrun, GetIntegrationFunction, GetIntegrationFunctions, GetIntegrationTemplates, GetProviderTemplates, GetPublicIntegrationFunction, GetPublicIntegrationFunctions, GetPublicProviderTemplates, PostFunctionCompile, PostFunctionDeployment, PostFunctionDeploymentResult, PostFunctionDryrun, PostFunctionDryrunResult } from './functions/api.js';
|
|
16
18
|
import type { GetGettingStarted, PatchGettingStarted } from './gettingStarted/api.js';
|
|
17
|
-
import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetIntegrationFlows, GetPublicFunctionCode, GetPublicIntegration, GetPublicListIntegrations, PatchIntegration, PatchPublicIntegration, PostIntegration, PostPublicIntegration, PostPublicQuickstartIntegration } from './integration/api.js';
|
|
19
|
+
import type { DeleteIntegration, DeletePublicIntegration, GetFunctionCode, GetIntegration, GetIntegrationFlows, GetPublicFunctionCode, GetPublicIntegration, GetPublicListIntegrations, PatchIntegration, PatchPublicIntegration, PostIntegration, PostPublicIntegration, PostPublicQuickstartIntegration } from './integration/api.js';
|
|
18
20
|
import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
|
|
19
21
|
import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api.js';
|
|
20
22
|
import type { GetMeta } from './meta/api.js';
|
|
23
|
+
import type { DeleteMFA, GetMFAStatus, PostMFAActivation, PostMFAEnrollment, PostMFARecoveryCodes } from './mfa/api.js';
|
|
21
24
|
import type { GetPlainHmac } from './plain/api.js';
|
|
22
25
|
import type { GetBillingUsage, GetBillingUsageTopDimensionValues, PostPlanChange, PostPlanExtendTrial, PutBillingInvoicingDetails } from './plans/http.api.js';
|
|
23
26
|
import type { GetProvider, GetProviders, GetPublicProvider, GetPublicProviders } from './providers/api.js';
|
|
@@ -29,8 +32,8 @@ import type { GetPublicSyncStatus, PostPublicSyncPause, PostPublicSyncStart, Pos
|
|
|
29
32
|
import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api.js';
|
|
30
33
|
import type { GetUser, PatchUser, PutUserPassword } from './user/api.js';
|
|
31
34
|
import type { PostPublicWebhook } from './webhooks/http.api.js';
|
|
32
|
-
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicRecords | PatchPublicPruneRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PostPublicQuickstartIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicAwsSigV4Authorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | PostFunctionCompile | PostFunctionDryrun | GetFunctionDryrun | PostFunctionDryrunResult | PostFunctionDeployment | GetFunctionDeployment | PostFunctionDeploymentResult | GetPublicFunctionCode | GetPublicIntegrationFunctions | GetPublicIntegrationFunction | DeletePublicIntegrationFunction | GetPublicProviderTemplates | AllPublicProxy;
|
|
33
|
-
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | PutBillingInvoicingDetails | GetBillingUsage | GetBillingUsageTopDimensionValues | GetUser | PatchUser | PutUserPassword | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | GetIntegrationFunction | GetIntegrationFunctions | DeleteIntegrationFunction | GetIntegrationTemplates | GetProviderTemplates | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetConnectionRecordModels | GetConnectionRecords | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedEmailVerification | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | ListApiKeys | CreateApiKey | DeleteApiKey | PatchApiKey | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider | PostInternalTriggerFunction | GetPlainHmac;
|
|
35
|
+
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | DeleteConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicClientMetadata | GetPublicRecords | PatchPublicPruneRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PostCliTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PostPublicQuickstartIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicAwsSigV4Authorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | PostFunctionCompile | PostFunctionDryrun | GetFunctionDryrun | PostFunctionDryrunResult | PostFunctionDeployment | GetFunctionDeployment | PostFunctionDeploymentResult | GetPublicFunctionCode | GetPublicIntegrationFunctions | GetPublicIntegrationFunction | DeletePublicIntegrationFunction | GetPublicProviderTemplates | AllPublicProxy;
|
|
36
|
+
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | PutBillingInvoicingDetails | GetBillingUsage | GetBillingUsageTopDimensionValues | GetUser | PatchUser | PutUserPassword | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | GetIntegrationFunction | GetIntegrationFunctions | GetFunctionCode | DeleteIntegrationFunction | GetIntegrationTemplates | GetProviderTemplates | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | PatchConnection | PostConnectionMetadata | GetConnectionRecordModels | GetConnectionRecords | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedEmailVerification | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | ListApiKeys | CreateApiKey | DeleteApiKey | PatchApiKey | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider | PostInternalTriggerFunction | GetMFAStatus | PostMFAEnrollment | PostMFAActivation | PostMFARecoveryCodes | DeleteMFA | GetPlainHmac;
|
|
34
37
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
35
38
|
/**
|
|
36
39
|
* Automatically narrow endpoints type with Method + Path
|
package/dist/billing/types.d.ts
CHANGED
|
@@ -94,10 +94,9 @@ export interface GetBillingUsageOpts {
|
|
|
94
94
|
group_by?: 'environmentId' | 'environmentName' | 'integrationId' | 'type' | 'functionName' | 'model';
|
|
95
95
|
};
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
98
|
-
* when `FLAG_ALLOW_OVERRIDE_GETUSAGE_SERVICE` is enabled
|
|
99
|
-
* everywhere else
|
|
100
|
-
* `UsageTracker.getBillingUsage`; the Orb client itself ignores it.
|
|
97
|
+
* Dev-only escape hatch: pins the request to Orb for parity checks.
|
|
98
|
+
* Honoured only when `FLAG_ALLOW_OVERRIDE_GETUSAGE_SERVICE` is enabled;
|
|
99
|
+
* ignored everywhere else. Default is ClickHouse.
|
|
101
100
|
*/
|
|
102
101
|
source?: 'clickhouse' | 'orb';
|
|
103
102
|
/**
|
|
@@ -133,6 +132,12 @@ export interface GetBillingUsageOpts {
|
|
|
133
132
|
value: string;
|
|
134
133
|
} | undefined;
|
|
135
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* AVG metrics (connections, records) are returned as the point-in-time daily count instead of
|
|
137
|
+
* the billing running-average. Used by the Free caps view, where the cap is a concurrent
|
|
138
|
+
* maximum. CH path only. Default false (billing running-average).
|
|
139
|
+
*/
|
|
140
|
+
avgPerDay?: boolean;
|
|
136
141
|
}
|
|
137
142
|
export interface BillingUsageMetric {
|
|
138
143
|
externalId: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Endpoint } from '../api.js';
|
|
2
|
+
export type CliTelemetryEvent = 'cli:init' | 'cli:create' | 'cli:compile' | 'cli:dev' | 'cli:dryrun' | 'cli:generate:docs' | 'cli:generate:tests' | 'cli:clone' | 'cli:migrate_to_zero_yaml' | 'cli:deploy' | 'cli:pull';
|
|
3
|
+
export type PostCliTelemetry = Endpoint<{
|
|
4
|
+
Method: 'POST';
|
|
5
|
+
Path: '/cli/telemetry';
|
|
6
|
+
Body: {
|
|
7
|
+
deviceId: string;
|
|
8
|
+
event: CliTelemetryEvent;
|
|
9
|
+
ephemeral?: boolean;
|
|
10
|
+
};
|
|
11
|
+
Success: never;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ApiError, Endpoint } from '../api.js';
|
|
2
|
+
export type GetPublicClientMetadata = Endpoint<{
|
|
3
|
+
Method: 'GET';
|
|
4
|
+
Path: '/oauth/client-metadata/:environmentUuid/:providerConfigKey';
|
|
5
|
+
Params: {
|
|
6
|
+
environmentUuid: string;
|
|
7
|
+
providerConfigKey: string;
|
|
8
|
+
};
|
|
9
|
+
Error: ApiError<'unknown_environment'> | ApiError<'unknown_provider_config'>;
|
|
10
|
+
Success: {
|
|
11
|
+
client_id: string;
|
|
12
|
+
client_name: string;
|
|
13
|
+
client_uri: string;
|
|
14
|
+
logo_uri?: string;
|
|
15
|
+
redirect_uris: string[];
|
|
16
|
+
grant_types: string[];
|
|
17
|
+
response_types: string[];
|
|
18
|
+
token_endpoint_auth_method: 'none';
|
|
19
|
+
};
|
|
20
|
+
}>;
|
package/dist/connect/api.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface ConnectSessionInput {
|
|
|
20
20
|
overrides?: Record<string, {
|
|
21
21
|
docs_connect?: string | undefined;
|
|
22
22
|
}> | undefined;
|
|
23
|
+
/** Session-level override of the environment's webhook URLs, applied to the connection created by this session. */
|
|
24
|
+
webhook_url_override?: string | undefined;
|
|
23
25
|
}
|
|
24
26
|
export interface EndUserInput {
|
|
25
27
|
id: string;
|
|
@@ -61,6 +63,7 @@ export type PostPublicConnectSessionsReconnect = Endpoint<{
|
|
|
61
63
|
end_user?: ConnectSessionInput['end_user'] | undefined;
|
|
62
64
|
organization?: ConnectSessionInput['organization'];
|
|
63
65
|
overrides?: ConnectSessionInput['overrides'];
|
|
66
|
+
webhook_url_override?: ConnectSessionInput['webhook_url_override'];
|
|
64
67
|
tags?: ConnectSessionInput['tags'];
|
|
65
68
|
};
|
|
66
69
|
Success: {
|
|
@@ -87,7 +90,7 @@ export type PostInternalConnectSessions = Endpoint<{
|
|
|
87
90
|
Method: 'POST';
|
|
88
91
|
Path: '/api/v1/connect/sessions';
|
|
89
92
|
Success: PostConnectSessions['Success'];
|
|
90
|
-
Body: Pick<ConnectSessionInput, 'allowed_integrations' | 'end_user' | 'organization' | 'integrations_config_defaults' | 'overrides'>;
|
|
93
|
+
Body: Pick<ConnectSessionInput, 'allowed_integrations' | 'end_user' | 'organization' | 'integrations_config_defaults' | 'overrides' | 'webhook_url_override'>;
|
|
91
94
|
}>;
|
|
92
95
|
export type PostPublicConnectTelemetry = Endpoint<{
|
|
93
96
|
Method: 'POST';
|
|
@@ -10,6 +10,8 @@ export interface ConnectSession {
|
|
|
10
10
|
readonly allowedIntegrations: string[] | null;
|
|
11
11
|
readonly integrationsConfigDefaults: Record<string, ConnectSessionIntegrationConfigDefaults> | null;
|
|
12
12
|
readonly overrides: Record<string, ConnectSessionOverrides> | null;
|
|
13
|
+
/** Session-level override of the environment's webhook URLs, applied to the connection created by this session. */
|
|
14
|
+
readonly webhookUrlOverride: string | null;
|
|
13
15
|
readonly endUser: InternalEndUser | null;
|
|
14
16
|
readonly tags: Tags;
|
|
15
17
|
readonly createdAt: Date;
|
|
@@ -7,7 +7,7 @@ import type { ActiveLog } from '../../notification/active-logs/db.js';
|
|
|
7
7
|
import type { ReplaceInObject } from '../../utils.js';
|
|
8
8
|
import type { ConnectionConfig, DBConnection, DBConnectionDecrypted } from '../db.js';
|
|
9
9
|
import type { Merge } from 'type-fest';
|
|
10
|
-
export type ApiConnectionSimple = Pick<Merge<DBConnection, ApiTimestamps>, 'id' | 'connection_id' | 'provider_config_key' | 'created_at' | 'updated_at'> & {
|
|
10
|
+
export type ApiConnectionSimple = Pick<Merge<DBConnection, ApiTimestamps>, 'id' | 'config_id' | 'connection_id' | 'provider_config_key' | 'created_at' | 'updated_at'> & {
|
|
11
11
|
provider: string;
|
|
12
12
|
errors: {
|
|
13
13
|
type: string;
|
|
@@ -83,6 +83,7 @@ export type PostPublicConnection = Endpoint<{
|
|
|
83
83
|
provider_config_key: string;
|
|
84
84
|
metadata?: Record<string, unknown> | undefined;
|
|
85
85
|
connection_config?: ConnectionConfig | undefined;
|
|
86
|
+
webhook_url_override?: string | undefined;
|
|
86
87
|
credentials: Omit<OAuth2Credentials, 'raw'> | Omit<OAuth2ClientCredentials, 'raw'> | Omit<OAuth1Credentials, 'raw'> | Omit<ApiKeyCredentials, 'raw'> | Omit<BasicApiCredentials, 'raw'> | Omit<TbaCredentials, 'raw'> | {
|
|
87
88
|
type: 'APP';
|
|
88
89
|
app_id: string;
|
|
@@ -121,7 +122,7 @@ export type GetConnection = Endpoint<{
|
|
|
121
122
|
};
|
|
122
123
|
};
|
|
123
124
|
}>;
|
|
124
|
-
export type ApiPublicConnectionFull = Pick<DBConnection, 'id' | 'connection_id' | 'connection_config'> & {
|
|
125
|
+
export type ApiPublicConnectionFull = Pick<DBConnection, 'id' | 'connection_id' | 'connection_config' | 'webhook_url_override'> & {
|
|
125
126
|
provider_config_key: string;
|
|
126
127
|
created_at: string;
|
|
127
128
|
updated_at: string;
|
|
@@ -163,11 +164,32 @@ export type PatchPublicConnection = Endpoint<{
|
|
|
163
164
|
Body: {
|
|
164
165
|
end_user?: EndUserInput | undefined;
|
|
165
166
|
tags?: Tags | undefined;
|
|
167
|
+
webhook_url?: string | undefined;
|
|
166
168
|
};
|
|
167
169
|
Success: {
|
|
168
170
|
success: boolean;
|
|
169
171
|
};
|
|
170
|
-
Error: ApiError<'unknown_provider_config'>;
|
|
172
|
+
Error: ApiError<'unknown_provider_config' | 'not_found' | 'server_error' | 'invalid_body'>;
|
|
173
|
+
}>;
|
|
174
|
+
export type PatchConnection = Endpoint<{
|
|
175
|
+
Method: 'PATCH';
|
|
176
|
+
Path: '/api/v1/connections/:connectionId';
|
|
177
|
+
Params: {
|
|
178
|
+
connectionId: string;
|
|
179
|
+
};
|
|
180
|
+
Querystring: {
|
|
181
|
+
provider_config_key: string;
|
|
182
|
+
env: string;
|
|
183
|
+
};
|
|
184
|
+
Body: {
|
|
185
|
+
end_user?: EndUserInput | undefined;
|
|
186
|
+
tags?: Tags | undefined;
|
|
187
|
+
webhook_url?: string | undefined;
|
|
188
|
+
};
|
|
189
|
+
Success: {
|
|
190
|
+
success: boolean;
|
|
191
|
+
};
|
|
192
|
+
Error: ApiError<'unknown_provider_config' | 'not_found' | 'server_error' | 'invalid_body'>;
|
|
171
193
|
}>;
|
|
172
194
|
export type PostConnectionRefresh = Endpoint<{
|
|
173
195
|
Method: 'POST';
|
|
@@ -20,4 +20,22 @@ export type UpdateMetadata = Endpoint<{
|
|
|
20
20
|
Error: MetadataError;
|
|
21
21
|
Success: MetadataBody;
|
|
22
22
|
}>;
|
|
23
|
+
export type PostConnectionMetadata = Endpoint<{
|
|
24
|
+
Method: 'POST';
|
|
25
|
+
Path: '/api/v1/connections/:connectionId/metadata';
|
|
26
|
+
Params: {
|
|
27
|
+
connectionId: string;
|
|
28
|
+
};
|
|
29
|
+
Querystring: {
|
|
30
|
+
env: string;
|
|
31
|
+
provider_config_key: string;
|
|
32
|
+
};
|
|
33
|
+
Body: {
|
|
34
|
+
metadata: Metadata;
|
|
35
|
+
};
|
|
36
|
+
Success: {
|
|
37
|
+
success: boolean;
|
|
38
|
+
};
|
|
39
|
+
Error: ApiError<'unknown_provider_config' | 'not_found' | 'invalid_body'>;
|
|
40
|
+
}>;
|
|
23
41
|
export {};
|
package/dist/connection/db.d.ts
CHANGED
|
@@ -23,6 +23,11 @@ export interface DBConnection extends TimestampsAndDeletedCorrect {
|
|
|
23
23
|
provider_config_key: string;
|
|
24
24
|
connection_id: string;
|
|
25
25
|
connection_config: ConnectionConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Backend-set override of the environment's webhook URLs for this connection. Distinct from `connection_config`,
|
|
28
|
+
* which holds end-user-supplied, provider-declared inputs (see providers.yaml). Only sourced from the connect session.
|
|
29
|
+
*/
|
|
30
|
+
webhook_url_override: string | null;
|
|
26
31
|
environment_id: number;
|
|
27
32
|
metadata: Metadata | null;
|
|
28
33
|
credentials: {
|
|
@@ -55,7 +60,7 @@ export interface FailedConnectionError {
|
|
|
55
60
|
description: string;
|
|
56
61
|
}
|
|
57
62
|
export interface RecentlyFailedConnection {
|
|
58
|
-
connection: DBConnection | Pick<DBConnection, 'connection_id' | 'provider_config_key'
|
|
63
|
+
connection: DBConnection | (Pick<DBConnection, 'connection_id' | 'provider_config_key'> & Partial<Pick<DBConnection, 'webhook_url_override'>>);
|
|
59
64
|
auth_mode: AuthModeType;
|
|
60
65
|
error?: FailedConnectionError;
|
|
61
66
|
operation: AuthOperationType;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type * from './keystore/index.js';
|
|
|
11
11
|
export type * from './action/api.js';
|
|
12
12
|
export type * from './admin/http.api.js';
|
|
13
13
|
export type * from './account/api.js';
|
|
14
|
+
export type * from './account/context.js';
|
|
14
15
|
export type * from './user/api.js';
|
|
15
16
|
export type * from './user/db.js';
|
|
16
17
|
export type * from './plain/api.js';
|
|
@@ -55,6 +56,7 @@ export type * from './deploy/api.js';
|
|
|
55
56
|
export type * from './deploy/index.js';
|
|
56
57
|
export type * from './deploy/incomingFlow.js';
|
|
57
58
|
export type * from './endpoints/db.js';
|
|
59
|
+
export type * from './cli/api.js';
|
|
58
60
|
export type * from './connect/api.js';
|
|
59
61
|
export type * from './connect/session.js';
|
|
60
62
|
export type * from './endUser/index.js';
|
|
@@ -77,6 +79,7 @@ export type * from './environment/variable/api.js';
|
|
|
77
79
|
export type * from './webhooks/api.js';
|
|
78
80
|
export type * from './webhooks/dispatch.js';
|
|
79
81
|
export type * from './webhooks/http.api.js';
|
|
82
|
+
export type * from './clientMetadata/http.api.js';
|
|
80
83
|
export type * from './flow/http.api.js';
|
|
81
84
|
export type * from './flow/index.js';
|
|
82
85
|
export type * from './utils.js';
|
|
@@ -88,7 +91,10 @@ export type * from './jobs/api.js';
|
|
|
88
91
|
export type * from './checkpoint/types.js';
|
|
89
92
|
export type * from './checkpoint/db.js';
|
|
90
93
|
export type * from './mcp/api.js';
|
|
94
|
+
export type * from './mfa/api.js';
|
|
95
|
+
export type * from './mfa/db.js';
|
|
91
96
|
export type * from './functions/api.js';
|
|
97
|
+
export type * from './functions/capabilities.js';
|
|
92
98
|
export type * from './functions/domain.js';
|
|
93
99
|
export type * from './lambda/index.js';
|
|
94
100
|
export type * from './authz/types.js';
|
|
@@ -11,6 +11,7 @@ export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' |
|
|
|
11
11
|
export interface ApiPublicIntegrationInclude {
|
|
12
12
|
webhook_url?: string | null;
|
|
13
13
|
credentials_label?: Record<string, string> | undefined;
|
|
14
|
+
preconfigured_credentials?: string[] | undefined;
|
|
14
15
|
credentials?: {
|
|
15
16
|
type: AuthModes['OAuth2'] | AuthModes['OAuth1'] | AuthModes['TBA'];
|
|
16
17
|
client_id: string | null;
|
|
@@ -131,6 +132,28 @@ export type GetPublicFunctionCode = Endpoint<{
|
|
|
131
132
|
}[];
|
|
132
133
|
}>;
|
|
133
134
|
}>;
|
|
135
|
+
export type GetFunctionCode = Endpoint<{
|
|
136
|
+
Method: 'GET';
|
|
137
|
+
Path: '/api/v1/integrations/:providerConfigKey/functions/:functionName/code';
|
|
138
|
+
Params: {
|
|
139
|
+
providerConfigKey: string;
|
|
140
|
+
functionName: string;
|
|
141
|
+
};
|
|
142
|
+
Querystring: {
|
|
143
|
+
env: string;
|
|
144
|
+
type?: ScriptTypeLiteral | undefined;
|
|
145
|
+
};
|
|
146
|
+
Success: {
|
|
147
|
+
type: ScriptTypeLiteral;
|
|
148
|
+
code: string;
|
|
149
|
+
};
|
|
150
|
+
Error: ApiError<'not_found'> | ApiError<'ambiguous_function', undefined, {
|
|
151
|
+
matches: {
|
|
152
|
+
type: ScriptTypeLiteral;
|
|
153
|
+
name: string;
|
|
154
|
+
}[];
|
|
155
|
+
}>;
|
|
156
|
+
}>;
|
|
134
157
|
export type ApiIntegration = Omit<Merge<IntegrationConfig, ApiTimestamps>, 'oauth_client_secret_iv' | 'oauth_client_secret_tag'>;
|
|
135
158
|
export type ApiIntegrationList = ApiIntegration & {
|
|
136
159
|
meta: {
|
|
@@ -231,6 +254,7 @@ export type GetIntegration = Endpoint<{
|
|
|
231
254
|
data: {
|
|
232
255
|
integration: ApiIntegration;
|
|
233
256
|
template: Provider;
|
|
257
|
+
symLinkTargetName: string | null;
|
|
234
258
|
meta: {
|
|
235
259
|
connectionsCount: number;
|
|
236
260
|
webhookUrl: string | null;
|
package/dist/mcp/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ApiError, Endpoint } from '../api.js';
|
|
2
|
-
export type
|
|
2
|
+
export type PostConnectionToolsMcp = Endpoint<{
|
|
3
3
|
Method: 'POST';
|
|
4
4
|
Path: '/mcp';
|
|
5
5
|
Body: Record<string, unknown>;
|
|
@@ -10,7 +10,18 @@ export type PostMcp = Endpoint<{
|
|
|
10
10
|
Success: Record<string, unknown>;
|
|
11
11
|
Error: ApiError<'missing_connection_id' | 'unknown_connection'>;
|
|
12
12
|
}>;
|
|
13
|
-
export type
|
|
13
|
+
export type GetConnectionToolsMcp = Endpoint<{
|
|
14
|
+
Method: 'GET';
|
|
15
|
+
Path: '/mcp';
|
|
16
|
+
Success: Record<string, unknown>;
|
|
17
|
+
}>;
|
|
18
|
+
export type PostControlPlaneMcp = Endpoint<{
|
|
19
|
+
Method: 'POST';
|
|
20
|
+
Path: '/mcp';
|
|
21
|
+
Body: Record<string, unknown>;
|
|
22
|
+
Success: Record<string, unknown>;
|
|
23
|
+
}>;
|
|
24
|
+
export type GetControlPlaneMcp = Endpoint<{
|
|
14
25
|
Method: 'GET';
|
|
15
26
|
Path: '/mcp';
|
|
16
27
|
Success: Record<string, unknown>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ApiError, Endpoint } from '../api.js';
|
|
2
|
+
type MFAError = ApiError<'invalid_mfa_code'> | ApiError<'mfa_already_enabled'> | ApiError<'mfa_enrollment_not_found'> | ApiError<'mfa_not_enabled'>;
|
|
3
|
+
export type GetMFAStatus = Endpoint<{
|
|
4
|
+
Method: 'GET';
|
|
5
|
+
Path: '/api/v1/account/mfa';
|
|
6
|
+
Success: {
|
|
7
|
+
data: {
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
export type PostMFAEnrollment = Endpoint<{
|
|
13
|
+
Method: 'POST';
|
|
14
|
+
Path: '/api/v1/account/mfa/enroll';
|
|
15
|
+
Error: ApiError<'mfa_already_enabled'>;
|
|
16
|
+
Success: {
|
|
17
|
+
data: {
|
|
18
|
+
otpauthUri: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
export type PostMFAActivation = Endpoint<{
|
|
23
|
+
Method: 'POST';
|
|
24
|
+
Path: '/api/v1/account/mfa/activate';
|
|
25
|
+
Body: {
|
|
26
|
+
code: string;
|
|
27
|
+
};
|
|
28
|
+
Error: ApiError<'invalid_mfa_code'> | ApiError<'mfa_enrollment_not_found'>;
|
|
29
|
+
Success: {
|
|
30
|
+
data: {
|
|
31
|
+
recoveryCodes: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export type PostMFARecoveryCodes = Endpoint<{
|
|
36
|
+
Method: 'POST';
|
|
37
|
+
Path: '/api/v1/account/mfa/recovery-codes';
|
|
38
|
+
Body: {
|
|
39
|
+
code: string;
|
|
40
|
+
};
|
|
41
|
+
Error: ApiError<'invalid_mfa_code'> | ApiError<'mfa_not_enabled'>;
|
|
42
|
+
Success: {
|
|
43
|
+
data: {
|
|
44
|
+
recoveryCodes: string[];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
export type DeleteMFA = Endpoint<{
|
|
49
|
+
Method: 'DELETE';
|
|
50
|
+
Path: '/api/v1/account/mfa';
|
|
51
|
+
Body: {
|
|
52
|
+
code: string;
|
|
53
|
+
};
|
|
54
|
+
Error: ApiError<'invalid_mfa_code'> | ApiError<'mfa_not_enabled'>;
|
|
55
|
+
Success: {
|
|
56
|
+
success: true;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
export type MFAEndpointError = MFAError;
|
|
60
|
+
export {};
|
package/dist/mfa/db.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Timestamps } from '../db.js';
|
|
2
|
+
export type MFAFactorType = 'totp';
|
|
3
|
+
export interface DBMFAFactor extends Timestamps {
|
|
4
|
+
id: string;
|
|
5
|
+
user_id: number;
|
|
6
|
+
type: MFAFactorType;
|
|
7
|
+
encrypted_secret: string;
|
|
8
|
+
iv: string;
|
|
9
|
+
auth_tag: string;
|
|
10
|
+
enabled_at: Date | null;
|
|
11
|
+
last_accepted_counter: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface DBMFARecoveryCode {
|
|
14
|
+
id: string;
|
|
15
|
+
user_id: number;
|
|
16
|
+
code_hash: string;
|
|
17
|
+
created_at: Date;
|
|
18
|
+
consumed_at: Date | null;
|
|
19
|
+
}
|
|
@@ -6,11 +6,6 @@ export type HTTP_METHOD = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
|
|
|
6
6
|
export type SyncTypeLiteral = 'incremental' | 'full';
|
|
7
7
|
export type ScriptFileType = 'actions' | 'syncs' | 'on-events' | 'functions' | 'webhooks' | 'post-connection-scripts';
|
|
8
8
|
export type ScriptTypeLiteral = 'action' | 'sync' | 'on-event';
|
|
9
|
-
/**
|
|
10
|
-
* The `function` primitive is authored via `createFunction()` / `createWebhook()`. It is tracked
|
|
11
|
-
* separately from {@link ScriptTypeLiteral} (sync/action/on-event) while it is introduced additively.
|
|
12
|
-
*/
|
|
13
|
-
export type FunctionScriptTypeLiteral = 'function';
|
|
14
9
|
export interface NangoYamlV1 {
|
|
15
10
|
integrations: Record<string, Record<string, NangoYamlV1Integration>>;
|
|
16
11
|
models: NangoYamlModel;
|
|
@@ -81,7 +76,6 @@ export interface NangoYamlParsedIntegration {
|
|
|
81
76
|
providerConfigKey: string;
|
|
82
77
|
syncs: ParsedNangoSync[];
|
|
83
78
|
actions: ParsedNangoAction[];
|
|
84
|
-
functions: ParsedNangoFunction[];
|
|
85
79
|
onEventScripts: Record<OnEventType, string[]>;
|
|
86
80
|
/**
|
|
87
81
|
* @deprecated
|
|
@@ -107,47 +101,6 @@ export interface ParsedNangoSync {
|
|
|
107
101
|
json_schema?: JSONSchema7 | undefined;
|
|
108
102
|
features?: Feature[] | undefined;
|
|
109
103
|
}
|
|
110
|
-
/** Serializable view of a function trigger (the executable hooks live in the deployed file body). */
|
|
111
|
-
export interface ParsedFunctionTrigger {
|
|
112
|
-
type: 'http' | 'schedule' | 'event';
|
|
113
|
-
/** http trigger: maps to the URL path segment. */
|
|
114
|
-
name?: string;
|
|
115
|
-
/** http trigger: 'integration' (default) or 'connection' for tokenized per-connection URLs. */
|
|
116
|
-
scope?: 'integration' | 'connection';
|
|
117
|
-
/** schedule trigger. */
|
|
118
|
-
schedule?: string;
|
|
119
|
-
/** event trigger. */
|
|
120
|
-
event?: string;
|
|
121
|
-
/** Whether ingress coalescing is configured (the window/key config). */
|
|
122
|
-
debounce?: {
|
|
123
|
-
key?: {
|
|
124
|
-
body: string;
|
|
125
|
-
} | {
|
|
126
|
-
header: string;
|
|
127
|
-
};
|
|
128
|
-
windowMs: number;
|
|
129
|
-
maxWindowMs?: number;
|
|
130
|
-
maxEntities?: number;
|
|
131
|
-
payloadMode?: 'latest' | 'all';
|
|
132
|
-
};
|
|
133
|
-
/** Whether the trigger ships an `ingressChallenge` hook (executed at ingress). */
|
|
134
|
-
hasIngressChallenge?: boolean;
|
|
135
|
-
/** Whether the trigger ships an `ingressValidation` hook (executed at ingress). */
|
|
136
|
-
hasIngressValidation?: boolean;
|
|
137
|
-
}
|
|
138
|
-
export interface ParsedNangoFunction {
|
|
139
|
-
name: string;
|
|
140
|
-
type: 'function';
|
|
141
|
-
description: string;
|
|
142
|
-
triggers: ParsedFunctionTrigger[];
|
|
143
|
-
input: string | null;
|
|
144
|
-
output: string[] | null;
|
|
145
|
-
scopes: string[];
|
|
146
|
-
usedModels: string[];
|
|
147
|
-
version: string;
|
|
148
|
-
json_schema?: JSONSchema7 | undefined;
|
|
149
|
-
features?: Feature[] | undefined;
|
|
150
|
-
}
|
|
151
104
|
export interface ParsedNangoAction {
|
|
152
105
|
name: string;
|
|
153
106
|
type: 'action';
|
|
@@ -193,5 +146,6 @@ export interface FlowsYaml {
|
|
|
193
146
|
export type FlowZeroJson = Omit<NangoYamlParsedIntegration, 'functions'> & {
|
|
194
147
|
jsonSchema?: JSONSchema7;
|
|
195
148
|
sdkVersion: string;
|
|
149
|
+
symLinkTargetName?: string;
|
|
196
150
|
};
|
|
197
151
|
export type FlowsZeroJson = FlowZeroJson[];
|
|
@@ -9,6 +9,7 @@ export interface DBOAuthSession extends Timestamps {
|
|
|
9
9
|
authMode: AuthModeType;
|
|
10
10
|
connect_session_id: number | null;
|
|
11
11
|
connection_config: Record<string, string>;
|
|
12
|
+
webhook_url_override: string | null;
|
|
12
13
|
environment_id: number;
|
|
13
14
|
web_socket_client_id: string | undefined;
|
|
14
15
|
activity_log_id: string;
|
|
@@ -24,6 +25,7 @@ export interface OAuthSession {
|
|
|
24
25
|
authMode: AuthModeType;
|
|
25
26
|
connectSessionId: number | null;
|
|
26
27
|
connectionConfig: Record<string, string>;
|
|
28
|
+
webhookUrlOverride: string | null;
|
|
27
29
|
environmentId: number;
|
|
28
30
|
webSocketClientId: string | undefined;
|
|
29
31
|
activityLogId: string;
|
package/dist/persist/api.d.ts
CHANGED
|
@@ -73,4 +73,116 @@ export interface PutCheckpointSuccess {
|
|
|
73
73
|
checkpoint: Checkpoint;
|
|
74
74
|
version: number;
|
|
75
75
|
}
|
|
76
|
+
export interface GetTaskAbortSuccess {
|
|
77
|
+
aborted: boolean;
|
|
78
|
+
}
|
|
79
|
+
export type PutTaskAbort = Endpoint<{
|
|
80
|
+
Method: 'PUT';
|
|
81
|
+
Path: '/environment/:environmentId/runner/task/:taskId/abort';
|
|
82
|
+
Params: {
|
|
83
|
+
environmentId: number;
|
|
84
|
+
taskId: string;
|
|
85
|
+
};
|
|
86
|
+
Error: ApiError<'put_task_abort_failed'>;
|
|
87
|
+
Success: never;
|
|
88
|
+
}>;
|
|
89
|
+
export type GetTaskAbort = Endpoint<{
|
|
90
|
+
Method: 'GET';
|
|
91
|
+
Path: '/environment/:environmentId/runner/task/:taskId/abort';
|
|
92
|
+
Params: {
|
|
93
|
+
environmentId: number;
|
|
94
|
+
taskId: string;
|
|
95
|
+
};
|
|
96
|
+
Error: ApiError<'get_task_abort_failed'>;
|
|
97
|
+
Success: GetTaskAbortSuccess;
|
|
98
|
+
}>;
|
|
99
|
+
export type PutSyncConflict = Endpoint<{
|
|
100
|
+
Method: 'PUT';
|
|
101
|
+
Path: '/environment/:environmentId/runner/sync-conflict';
|
|
102
|
+
Params: {
|
|
103
|
+
environmentId: number;
|
|
104
|
+
};
|
|
105
|
+
Body: {
|
|
106
|
+
scriptType: 'sync';
|
|
107
|
+
syncId: string;
|
|
108
|
+
refresh?: boolean;
|
|
109
|
+
ttlMs: number;
|
|
110
|
+
};
|
|
111
|
+
Error: ApiError<'sync_conflict' | 'put_sync_conflict_failed'>;
|
|
112
|
+
Success: never;
|
|
113
|
+
}>;
|
|
114
|
+
export type DeleteSyncConflict = Endpoint<{
|
|
115
|
+
Method: 'DELETE';
|
|
116
|
+
Path: '/environment/:environmentId/runner/sync-conflict';
|
|
117
|
+
Params: {
|
|
118
|
+
environmentId: number;
|
|
119
|
+
};
|
|
120
|
+
Body: {
|
|
121
|
+
scriptType: 'sync';
|
|
122
|
+
syncId: string;
|
|
123
|
+
};
|
|
124
|
+
Error: ApiError<'delete_sync_conflict_failed'>;
|
|
125
|
+
Success: never;
|
|
126
|
+
}>;
|
|
127
|
+
export interface TryAcquireLockSuccess {
|
|
128
|
+
acquired: boolean;
|
|
129
|
+
}
|
|
130
|
+
export type PostRunnerLockTryAcquire = Endpoint<{
|
|
131
|
+
Method: 'POST';
|
|
132
|
+
Path: '/environment/:environmentId/runner/locks/try-acquire';
|
|
133
|
+
Params: {
|
|
134
|
+
environmentId: number;
|
|
135
|
+
};
|
|
136
|
+
Body: {
|
|
137
|
+
owner: string;
|
|
138
|
+
key: string;
|
|
139
|
+
ttlMs: number;
|
|
140
|
+
};
|
|
141
|
+
Error: ApiError<'try_acquire_lock_failed'>;
|
|
142
|
+
Success: TryAcquireLockSuccess;
|
|
143
|
+
}>;
|
|
144
|
+
export interface ReleaseLockSuccess {
|
|
145
|
+
released: boolean;
|
|
146
|
+
}
|
|
147
|
+
export type PostRunnerLockRelease = Endpoint<{
|
|
148
|
+
Method: 'POST';
|
|
149
|
+
Path: '/environment/:environmentId/runner/locks/release';
|
|
150
|
+
Params: {
|
|
151
|
+
environmentId: number;
|
|
152
|
+
};
|
|
153
|
+
Body: {
|
|
154
|
+
owner: string;
|
|
155
|
+
key: string;
|
|
156
|
+
};
|
|
157
|
+
Error: ApiError<'release_lock_failed'>;
|
|
158
|
+
Success: ReleaseLockSuccess;
|
|
159
|
+
}>;
|
|
160
|
+
export type PostRunnerLockReleaseAll = Endpoint<{
|
|
161
|
+
Method: 'POST';
|
|
162
|
+
Path: '/environment/:environmentId/runner/locks/release-all';
|
|
163
|
+
Params: {
|
|
164
|
+
environmentId: number;
|
|
165
|
+
};
|
|
166
|
+
Body: {
|
|
167
|
+
owner: string;
|
|
168
|
+
};
|
|
169
|
+
Error: ApiError<'release_all_locks_failed'>;
|
|
170
|
+
Success: never;
|
|
171
|
+
}>;
|
|
172
|
+
export interface HasLockSuccess {
|
|
173
|
+
hasLock: boolean;
|
|
174
|
+
}
|
|
175
|
+
export type GetRunnerLock = Endpoint<{
|
|
176
|
+
Method: 'GET';
|
|
177
|
+
Path: '/environment/:environmentId/runner/locks';
|
|
178
|
+
Params: {
|
|
179
|
+
environmentId: number;
|
|
180
|
+
};
|
|
181
|
+
Querystring: {
|
|
182
|
+
owner: string;
|
|
183
|
+
key: string;
|
|
184
|
+
};
|
|
185
|
+
Error: ApiError<'has_lock_failed'>;
|
|
186
|
+
Success: HasLockSuccess;
|
|
187
|
+
}>;
|
|
76
188
|
export {};
|
package/dist/plans/db.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ type FunctionRuntime = 'runner' | 'lambda';
|
|
|
3
3
|
export interface DBPlan extends Timestamps {
|
|
4
4
|
id: number;
|
|
5
5
|
account_id: number;
|
|
6
|
-
name: 'free' | 'starter-v2' | 'growth-v2' | 'enterprise' | 'starter' | 'growth' | 'starter-legacy' | 'scale-legacy' | 'growth-legacy';
|
|
6
|
+
name: 'free' | 'free-uncapped' | 'startup-deal' | 'starter-v2' | 'growth-v2' | 'enterprise' | 'enterprise-cloud-hosted' | 'starter' | 'growth' | 'starter-legacy' | 'scale-legacy' | 'growth-legacy';
|
|
7
7
|
stripe_customer_id: string | null;
|
|
8
8
|
stripe_payment_id: string | null;
|
|
9
9
|
orb_customer_id: string | null;
|
|
@@ -89,7 +89,7 @@ export interface DBPlan extends Timestamps {
|
|
|
89
89
|
* Change the applied rate limit for the public API
|
|
90
90
|
* @default "m"
|
|
91
91
|
*/
|
|
92
|
-
api_rate_limit_size: 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl';
|
|
92
|
+
api_rate_limit_size: 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | '10xl' | '11xl' | '12xl';
|
|
93
93
|
/**
|
|
94
94
|
* Enable or disable machine auto idling
|
|
95
95
|
* @default true
|
package/dist/plans/http.api.d.ts
CHANGED
|
@@ -71,7 +71,8 @@ export type GetBillingUsageTopDimensionValues = Endpoint<{
|
|
|
71
71
|
dimension: BreakdownDimensions[M];
|
|
72
72
|
from: string;
|
|
73
73
|
to: string;
|
|
74
|
-
|
|
74
|
+
search?: string | undefined;
|
|
75
|
+
page?: string | undefined;
|
|
75
76
|
};
|
|
76
77
|
}[UsageMetric];
|
|
77
78
|
Success: {
|
|
@@ -80,6 +81,11 @@ export type GetBillingUsageTopDimensionValues = Endpoint<{
|
|
|
80
81
|
id: string;
|
|
81
82
|
label: string;
|
|
82
83
|
}[];
|
|
84
|
+
pagination: {
|
|
85
|
+
page: number;
|
|
86
|
+
limit: number;
|
|
87
|
+
hasMore: boolean;
|
|
88
|
+
};
|
|
83
89
|
};
|
|
84
90
|
};
|
|
85
91
|
}>;
|
|
@@ -97,6 +103,7 @@ export type GetBillingUsage = Endpoint<{
|
|
|
97
103
|
} | undefined;
|
|
98
104
|
top?: string | undefined;
|
|
99
105
|
filter?: Partial<Record<UsageMetric, string | undefined>> | undefined;
|
|
106
|
+
avgPerDay?: boolean | undefined;
|
|
100
107
|
};
|
|
101
108
|
Success: {
|
|
102
109
|
data: {
|
package/dist/providers/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Endpoint } from '../api.js';
|
|
2
2
|
import type { AuthModeType } from '../auth/api.js';
|
|
3
|
-
import type { Provider, SimplifiedJSONSchema } from './provider.js';
|
|
3
|
+
import type { McpOAuth2ClientRegistration, Provider, SimplifiedJSONSchema } from './provider.js';
|
|
4
4
|
export type GetPublicProviders = Endpoint<{
|
|
5
5
|
Method: 'GET';
|
|
6
6
|
Path: `/providers`;
|
|
@@ -40,7 +40,7 @@ export interface ApiProviderListItem {
|
|
|
40
40
|
docs_connect?: string | undefined;
|
|
41
41
|
preConfigured: boolean;
|
|
42
42
|
preConfiguredScopes: string[];
|
|
43
|
-
clientRegistration?:
|
|
43
|
+
clientRegistration?: McpOAuth2ClientRegistration;
|
|
44
44
|
integration_config?: Record<string, SimplifiedJSONSchema> | undefined;
|
|
45
45
|
}
|
|
46
46
|
export type GetProviders = Endpoint<{
|
|
@@ -41,6 +41,9 @@ export interface SimplifiedJSONSchema {
|
|
|
41
41
|
equals: string;
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
+
export type ProxyBodyValue = string | {
|
|
45
|
+
[key: string]: ProxyBodyValue;
|
|
46
|
+
};
|
|
44
47
|
export interface BaseProvider {
|
|
45
48
|
display_name: string;
|
|
46
49
|
auth_mode: AuthModeType;
|
|
@@ -50,7 +53,7 @@ export interface BaseProvider {
|
|
|
50
53
|
headers?: Record<string, string>;
|
|
51
54
|
connection_config?: Record<string, string>;
|
|
52
55
|
query?: Record<string, string>;
|
|
53
|
-
body?: Record<string,
|
|
56
|
+
body?: Record<string, ProxyBodyValue>;
|
|
54
57
|
retry?: RetryHeaderConfig;
|
|
55
58
|
decompress?: boolean;
|
|
56
59
|
forward_headers_on_redirect?: boolean;
|
|
@@ -129,7 +132,7 @@ export interface ProviderCustom extends Omit<ProviderOAuth2, 'auth_mode'> {
|
|
|
129
132
|
APP: string;
|
|
130
133
|
};
|
|
131
134
|
}
|
|
132
|
-
export type McpOAuth2ClientRegistration = 'dynamic' | 'static' | '
|
|
135
|
+
export type McpOAuth2ClientRegistration = 'dynamic' | 'static' | 'cimd';
|
|
133
136
|
export interface ProviderMcpOAUTH2 extends Omit<BaseProvider, 'body_format'> {
|
|
134
137
|
auth_mode: 'MCP_OAUTH2';
|
|
135
138
|
registration_url?: string;
|
package/dist/pubsub/events.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export type UsageWebhookForwardEvent = UsageEventBase<'usage.webhook_forward', {
|
|
|
95
95
|
success: boolean;
|
|
96
96
|
};
|
|
97
97
|
}>;
|
|
98
|
-
export type DataTransferCallsite = 'credential_test_hook' | 'credential_verification_hook' | 'connection_hook' | 'webhook_forward' | 'proxy' | 'uncontrolled_fetch' | 'persist_logs' | 'persist_records';
|
|
98
|
+
export type DataTransferCallsite = 'credential_test_hook' | 'credential_verification_hook' | 'connection_hook' | 'webhook_forward' | 'proxy' | 'uncontrolled_fetch' | 'persist_logs' | 'persist_records' | 'get_/records' | 'get_/proxy' | 'patch_/proxy' | 'post_/proxy' | 'put_/proxy' | 'delete_/proxy' | 'unknown_/proxy';
|
|
99
99
|
export type UsageDataTransferEvent = UsageEventBase<'usage.data_transfer', {
|
|
100
100
|
value: number;
|
|
101
101
|
properties: {
|
package/dist/runner/sdk.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { AxiosError, AxiosInterceptorManager, AxiosRequestConfig, AxiosResp
|
|
|
7
7
|
export interface SdkLogger {
|
|
8
8
|
level: LogLevel | 'off';
|
|
9
9
|
}
|
|
10
|
-
export type ConflictResolutionMode = 'IN_MEMORY' | '
|
|
10
|
+
export type ConflictResolutionMode = 'IN_MEMORY' | 'DISTRIBUTED';
|
|
11
11
|
export type ScriptType = 'sync' | 'action' | 'webhook' | 'on-event';
|
|
12
12
|
export interface NangoProps {
|
|
13
13
|
scriptType: ScriptType;
|