@nangohq/types 0.71.0 → 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.endpoints.d.ts +5 -4
- package/dist/billing/types.d.ts +6 -0
- package/dist/connect/api.d.ts +4 -2
- package/dist/connect/session.d.ts +2 -0
- package/dist/connection/api/get.d.ts +2 -1
- package/dist/connection/api/metadata.d.ts +18 -0
- package/dist/connection/db.d.ts +6 -2
- package/dist/index.d.ts +3 -0
- package/dist/integration/api.d.ts +1 -0
- package/dist/mfa/api.d.ts +60 -0
- package/dist/mfa/db.d.ts +19 -0
- package/dist/oauthSessions/db.d.ts +2 -0
- package/dist/plans/db.d.ts +1 -1
- package/dist/plans/http.api.d.ts +1 -0
- package/dist/providers/provider.d.ts +4 -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
|
+
}
|
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import type { PostPublicApiKeyAuthorization, PostPublicAppStoreAuthorization, Po
|
|
|
6
6
|
import type { PostCliTelemetry } from './cli/api.js';
|
|
7
7
|
import type { GetPublicClientMetadata } from './clientMetadata/http.api.js';
|
|
8
8
|
import type { DeleteConnectSession, GetConnectSession, PostConnectSessions, PostInternalConnectSessions, PostPublicConnectSessionsReconnect, PostPublicConnectTelemetry } from './connect/api.js';
|
|
9
|
-
import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PatchConnection, PatchPublicConnection, PostConnectionRefresh, PostPublicConnection } from './connection/api/get.js';
|
|
10
|
-
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';
|
|
11
11
|
import type { GetConnectUISettings, PutConnectUISettings } from './connectUISettings/api.js';
|
|
12
12
|
import type { PostDeploy, PostDeployConfirmation, PostDeployInternal } from './deploy/api.js';
|
|
13
13
|
import type { CreateApiKey, DeleteApiKey, DeleteEnvironment, GetEnvironment, GetEnvironments, ListApiKeys, PatchApiKey, PatchEnvironment, PostEnvironment } from './environment/api/index.js';
|
|
@@ -20,6 +20,7 @@ import type { DeleteIntegration, DeletePublicIntegration, GetFunctionCode, GetIn
|
|
|
20
20
|
import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
|
|
21
21
|
import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api.js';
|
|
22
22
|
import type { GetMeta } from './meta/api.js';
|
|
23
|
+
import type { DeleteMFA, GetMFAStatus, PostMFAActivation, PostMFAEnrollment, PostMFARecoveryCodes } from './mfa/api.js';
|
|
23
24
|
import type { GetPlainHmac } from './plain/api.js';
|
|
24
25
|
import type { GetBillingUsage, GetBillingUsageTopDimensionValues, PostPlanChange, PostPlanExtendTrial, PutBillingInvoicingDetails } from './plans/http.api.js';
|
|
25
26
|
import type { GetProvider, GetProviders, GetPublicProvider, GetPublicProviders } from './providers/api.js';
|
|
@@ -31,8 +32,8 @@ import type { GetPublicSyncStatus, PostPublicSyncPause, PostPublicSyncStart, Pos
|
|
|
31
32
|
import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api.js';
|
|
32
33
|
import type { GetUser, PatchUser, PutUserPassword } from './user/api.js';
|
|
33
34
|
import type { PostPublicWebhook } from './webhooks/http.api.js';
|
|
34
|
-
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 | 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;
|
|
35
|
-
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 | GetConnectionRecordModels | GetConnectionRecords | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh |
|
|
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;
|
|
36
37
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
37
38
|
/**
|
|
38
39
|
* Automatically narrow endpoints type with Method + Path
|
package/dist/billing/types.d.ts
CHANGED
|
@@ -132,6 +132,12 @@ export interface GetBillingUsageOpts {
|
|
|
132
132
|
value: string;
|
|
133
133
|
} | undefined;
|
|
134
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;
|
|
135
141
|
}
|
|
136
142
|
export interface BillingUsageMetric {
|
|
137
143
|
externalId: string;
|
package/dist/connect/api.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export interface ConnectSessionInput {
|
|
|
9
9
|
connection_config?: {
|
|
10
10
|
[key: string]: unknown;
|
|
11
11
|
oauth_scopes_override?: string | undefined;
|
|
12
|
-
webhook_url?: string | undefined;
|
|
13
12
|
} | undefined;
|
|
14
13
|
}> | undefined;
|
|
15
14
|
end_user: EndUserInput;
|
|
@@ -21,6 +20,8 @@ export interface ConnectSessionInput {
|
|
|
21
20
|
overrides?: Record<string, {
|
|
22
21
|
docs_connect?: string | undefined;
|
|
23
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;
|
|
24
25
|
}
|
|
25
26
|
export interface EndUserInput {
|
|
26
27
|
id: string;
|
|
@@ -62,6 +63,7 @@ export type PostPublicConnectSessionsReconnect = Endpoint<{
|
|
|
62
63
|
end_user?: ConnectSessionInput['end_user'] | undefined;
|
|
63
64
|
organization?: ConnectSessionInput['organization'];
|
|
64
65
|
overrides?: ConnectSessionInput['overrides'];
|
|
66
|
+
webhook_url_override?: ConnectSessionInput['webhook_url_override'];
|
|
65
67
|
tags?: ConnectSessionInput['tags'];
|
|
66
68
|
};
|
|
67
69
|
Success: {
|
|
@@ -88,7 +90,7 @@ export type PostInternalConnectSessions = Endpoint<{
|
|
|
88
90
|
Method: 'POST';
|
|
89
91
|
Path: '/api/v1/connect/sessions';
|
|
90
92
|
Success: PostConnectSessions['Success'];
|
|
91
|
-
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'>;
|
|
92
94
|
}>;
|
|
93
95
|
export type PostPublicConnectTelemetry = Endpoint<{
|
|
94
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;
|
|
@@ -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;
|
|
@@ -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
|
@@ -11,7 +11,6 @@ export interface ConnectionConfig {
|
|
|
11
11
|
oauth_scopes_override?: string[] | undefined;
|
|
12
12
|
oauth_scopes?: string | undefined;
|
|
13
13
|
authorization_params?: Record<string, string> | undefined;
|
|
14
|
-
webhook_url?: string | undefined;
|
|
15
14
|
}
|
|
16
15
|
export interface DBConnection extends TimestampsAndDeletedCorrect {
|
|
17
16
|
id: number;
|
|
@@ -24,6 +23,11 @@ export interface DBConnection extends TimestampsAndDeletedCorrect {
|
|
|
24
23
|
provider_config_key: string;
|
|
25
24
|
connection_id: string;
|
|
26
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;
|
|
27
31
|
environment_id: number;
|
|
28
32
|
metadata: Metadata | null;
|
|
29
33
|
credentials: {
|
|
@@ -56,7 +60,7 @@ export interface FailedConnectionError {
|
|
|
56
60
|
description: string;
|
|
57
61
|
}
|
|
58
62
|
export interface RecentlyFailedConnection {
|
|
59
|
-
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'>>);
|
|
60
64
|
auth_mode: AuthModeType;
|
|
61
65
|
error?: FailedConnectionError;
|
|
62
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';
|
|
@@ -90,6 +91,8 @@ export type * from './jobs/api.js';
|
|
|
90
91
|
export type * from './checkpoint/types.js';
|
|
91
92
|
export type * from './checkpoint/db.js';
|
|
92
93
|
export type * from './mcp/api.js';
|
|
94
|
+
export type * from './mfa/api.js';
|
|
95
|
+
export type * from './mfa/db.js';
|
|
93
96
|
export type * from './functions/api.js';
|
|
94
97
|
export type * from './functions/capabilities.js';
|
|
95
98
|
export type * from './functions/domain.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;
|
|
@@ -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
|
+
}
|
|
@@ -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/plans/db.d.ts
CHANGED
|
@@ -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' | '5xl' | '6xl';
|
|
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
|
@@ -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;
|