@nangohq/types 0.71.3 → 0.71.4

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.
@@ -32,10 +32,7 @@ export type ConfirmEmail = ApiEndpoint<{
32
32
  };
33
33
  Error: ApiError<'error_validating_user'> | ApiError<'invalid_token'> | ApiError<'token_expired'>;
34
34
  Success: {
35
- email: string;
36
- userId: number;
37
- accountId: number;
38
- showHearAboutUs?: boolean;
35
+ user: ApiUser;
39
36
  };
40
37
  }>;
41
38
  export type ResendVerificationEmailByUuid = ApiEndpoint<{
@@ -113,6 +110,7 @@ export type PostSignin = ApiEndpoint<{
113
110
  Error: ApiError<'email_not_verified'> | ApiError<'user_suspended'> | ApiError<'unauthorized'>;
114
111
  Success: {
115
112
  user: ApiUser;
113
+ url: string;
116
114
  } | {
117
115
  data: {
118
116
  mfaRequired: true;
@@ -226,6 +224,35 @@ export type GetOnboardingHearAboutUs = ApiEndpoint<{
226
224
  };
227
225
  };
228
226
  }>;
227
+ export type GetOnboardingAccountDiscovery = ApiEndpoint<{
228
+ Audit: {
229
+ kind: 'no-audit';
230
+ reason: 'non-auditable';
231
+ };
232
+ Method: 'GET';
233
+ Path: '/api/v1/account/onboarding/account-discovery';
234
+ Error: ApiError<'forbidden'>;
235
+ Success: {
236
+ data: {
237
+ suggestedAccountName: string | null;
238
+ };
239
+ };
240
+ }>;
241
+ export type PostOnboardingRequestInvite = ApiEndpoint<{
242
+ Audit: {
243
+ kind: 'no-audit';
244
+ reason: 'non-auditable';
245
+ };
246
+ Method: 'POST';
247
+ Path: '/api/v1/account/onboarding/request-invite';
248
+ Body: never;
249
+ Error: ApiError<'not_found'> | ApiError<'email_delivery_failed'>;
250
+ Success: {
251
+ data: {
252
+ success: true;
253
+ };
254
+ };
255
+ }>;
229
256
  export type PostOnboardingHearAboutUs = ApiEndpoint<{
230
257
  Audit: {
231
258
  kind: 'no-audit';
@@ -0,0 +1,38 @@
1
+ import type { DBAPISecret, DBEnvironment } from '../environment/db.js';
2
+ import type { DBPlan } from '../plans/db.js';
3
+ import type { DBTeam } from '../team/db.js';
4
+ export type ApiKeyAuthSource = 'customer_key' | 'sandbox_token' | 'api_secret' | 'env_var' | 'connect_session';
5
+ export interface ApiKeyPrincipal {
6
+ type: 'api_key';
7
+ source: ApiKeyAuthSource;
8
+ accountId: number;
9
+ scopes: string[];
10
+ environmentIds: number[];
11
+ keyId?: number;
12
+ displayName?: string;
13
+ }
14
+ export type ApiKeyAuthorizationTarget = {
15
+ type: 'account';
16
+ accountId: number;
17
+ } | {
18
+ type: 'environment';
19
+ accountId: number;
20
+ environmentId: number;
21
+ };
22
+ export interface ApiKeyAuthDetails {
23
+ source: Exclude<ApiKeyAuthSource, 'connect_session'>;
24
+ scopes?: string[];
25
+ apiKeyId?: number;
26
+ apiKeyDisplayName?: string;
27
+ purpose?: 'dryrun' | 'deploy';
28
+ dryrunId?: string;
29
+ deploymentId?: string;
30
+ }
31
+ export interface ApiKeyContext {
32
+ account: DBTeam;
33
+ environment?: DBEnvironment;
34
+ secret?: DBAPISecret;
35
+ plan: DBPlan | null;
36
+ principal: ApiKeyPrincipal;
37
+ auth: ApiKeyAuthDetails;
38
+ }
@@ -1,3 +1,5 @@
1
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
- export declare const ALL_SCOPES: string[];
3
+ export declare const ACCOUNT_API_KEY_SCOPES: readonly ["account:*", "account:billing:read", "account:team:invite_member"];
4
+ export type AccountApiKeyScope = (typeof ACCOUNT_API_KEY_SCOPES)[number];
5
+ export type CustomerKeyScope = ApiKeyScope | AccountApiKeyScope;
@@ -1,4 +1,4 @@
1
- import type { ConfirmEmail, GetEmailByExpiredToken, GetEmailByUuid, GetManagedCallback, GetManagedEmailVerification, PostForgotPassword, PostLogout, PostManagedEmailVerification, PostManagedSignup, PostSignin, PostSignup, PutResetPassword } from './account/api.js';
1
+ import type { ConfirmEmail, GetEmailByExpiredToken, GetEmailByUuid, GetManagedCallback, GetManagedEmailVerification, GetOnboardingAccountDiscovery, PostForgotPassword, PostLogout, PostManagedEmailVerification, PostManagedSignup, PostOnboardingRequestInvite, PostSignin, PostSignup, PutResetPassword } from './account/api.js';
2
2
  import type { GetAsyncActionResult, GetPublicV1, PostInternalTriggerFunction, PostPublicTriggerAction } from './action/api.js';
3
3
  import type { PostImpersonate } from './admin/http.api.js';
4
4
  import type { EndpointMethod } from './api.js';
@@ -15,7 +15,7 @@ import type { CreateApiKey, DeleteApiKey, DeleteEnvironment, GetEnvironment, Get
15
15
  import type { PatchWebhook } from './environment/api/webhook.js';
16
16
  import type { PostEnvironmentVariables } from './environment/variable/api.js';
17
17
  import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api.js';
18
- import type { DeleteIntegrationFunction, DeletePublicIntegrationFunction, GetFunctionDeployment, GetFunctionDryrun, GetIntegrationFunction, GetIntegrationFunctions, GetIntegrationTemplates, GetProviderTemplates, GetPublicIntegrationFunction, GetPublicIntegrationFunctions, GetPublicProviderTemplates, PostFunctionCompile, PostFunctionDeployment, PostFunctionDeploymentResult, PostFunctionDryrun, PostFunctionDryrunResult } from './functions/api.js';
18
+ import type { DeleteIntegrationFunction, DeletePublicIntegrationFunction, GetFunctionDeployment, GetFunctionDryrun, GetIntegrationFunction, GetIntegrationFunctions, GetIntegrationTemplates, GetProviderTemplates, GetPublicIntegrationFunction, GetPublicIntegrationFunctions, GetPublicProviderTemplates, PostFunctionCompile, PostFunctionDeployment, PostFunctionDeploymentBundle, PostFunctionDeploymentBundlePreview, PostFunctionDeploymentResult, PostFunctionDryrun, PostFunctionDryrunResult } from './functions/api.js';
19
19
  import type { GetGettingStarted, PatchGettingStarted } from './gettingStarted/api.js';
20
20
  import type { DeleteIntegration, DeletePublicIntegration, GetFunctionCode, GetIntegration, GetIntegrationFlows, GetPublicFunctionCode, GetPublicIntegration, GetPublicListIntegrations, PatchIntegration, PatchPublicIntegration, PostIntegration, PostPublicIntegration, PostPublicQuickstartIntegration } from './integration/api.js';
21
21
  import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
@@ -33,8 +33,8 @@ import type { GetPublicSyncStatus, PostPublicSyncPause, PostPublicSyncStart, Pos
33
33
  import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api.js';
34
34
  import type { GetUser, PatchUser, PutUserPassword } from './user/api.js';
35
35
  import type { PostPublicWebhook } from './webhooks/http.api.js';
36
- export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | 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;
37
- export type PrivateApiEndpoints = GetAuditTrail | ConfirmEmail | 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 | PostMFALoginVerification | DeleteMFA | GetPlainHmac;
36
+ export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | 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 | PostFunctionDeploymentBundle | PostFunctionDeploymentBundlePreview | GetPublicFunctionCode | GetPublicIntegrationFunctions | GetPublicIntegrationFunction | DeletePublicIntegrationFunction | GetPublicProviderTemplates | AllPublicProxy;
37
+ export type PrivateApiEndpoints = GetAuditTrail | ConfirmEmail | 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 | GetOnboardingAccountDiscovery | PostOnboardingRequestInvite | 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 | PostMFALoginVerification | DeleteMFA | GetPlainHmac;
38
38
  export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
39
39
  /**
40
40
  * Automatically narrow endpoints type with Method + Path
@@ -29,6 +29,8 @@ export type GetAuditTrail = ApiEndpoint<{
29
29
  cursor?: string;
30
30
  from?: string;
31
31
  to?: string;
32
+ resources?: string;
33
+ actions?: string;
32
34
  };
33
35
  Success: {
34
36
  data: ApiAuditTrailEvent[];
@@ -1,6 +1,7 @@
1
1
  export type AuditTrailVersion = '2026-07-16';
2
2
  export type AuditActorType = 'user' | 'api_key' | 'system' | 'anonymous';
3
3
  export type AuditOutcome = 'success' | 'failure' | 'denied';
4
+ export type AuditInterface = 'api' | 'mcp';
4
5
  interface AuditEventTable {
5
6
  connection: 'created' | 'updated' | 'metadata_updated' | 'refreshed' | 'deleted';
6
7
  sync: 'enabled' | 'disabled' | 'paused' | 'started' | 'triggered' | 'cancelled' | 'frequency_changed' | 'variant_created' | 'variant_deleted';
@@ -34,6 +35,7 @@ export interface AuditTarget {
34
35
  display?: string;
35
36
  }
36
37
  export interface AuditContext {
38
+ interface?: AuditInterface;
37
39
  ip?: string;
38
40
  userAgent?: string;
39
41
  }
@@ -1,4 +1,11 @@
1
1
  import type { OnEventType } from '../scripts/on-events/api.js';
2
+ export interface FunctionCapabilities {
3
+ usesRecords: boolean;
4
+ usesOutbound: boolean;
5
+ usesCheckpoints: boolean;
6
+ usesMetadata: boolean;
7
+ usesInvoke: boolean;
8
+ }
2
9
  /**
3
10
  * Declares where the debounce/coalescing key is extracted from:
4
11
  * - `{ body: '$.portalId' }`: dot notation path into the body
@@ -12,13 +19,13 @@ export type DebounceKeySource = {
12
19
  /** Coalesces a burst of inbound HTTP requests into a single function run within a sliding window. */
13
20
  export interface DebounceOptions {
14
21
  /** Events sharing the same resolved key coalesce together. */
15
- keyBy?: DebounceKeySource | DebounceKeySource[];
22
+ keyBy?: DebounceKeySource | DebounceKeySource[] | undefined;
16
23
  /** Sliding window in milliseconds. */
17
24
  windowMs: number;
18
25
  /** When exceeded, the window stops sliding. */
19
- maxEntities?: number;
26
+ maxEntities?: number | undefined;
20
27
  /** Which payloads from the coalesced window the handler receives. */
21
- take?: 'latest' | 'first' | 'all';
28
+ take?: 'latest' | 'first' | 'all' | undefined;
22
29
  }
23
30
  /**
24
31
  * Declares how a function is initiated from outside; `kind` discriminates the source.
@@ -32,11 +39,11 @@ export type FunctionTriggerDefinition = {
32
39
  } | {
33
40
  kind: 'schedule';
34
41
  frequency: string;
35
- autoStart?: boolean;
42
+ autoStart?: boolean | undefined;
36
43
  } | {
37
44
  kind: 'http';
38
- subscriptions?: string[];
39
- debounce?: DebounceOptions;
45
+ subscriptions?: string[] | undefined;
46
+ debounce?: DebounceOptions | undefined;
40
47
  } | {
41
48
  kind: 'event';
42
49
  events: OnEventType[];
@@ -45,14 +52,14 @@ export type FunctionConcurrencyLimit = 1 | 'max';
45
52
  export interface FunctionLimits {
46
53
  concurrency?: {
47
54
  perConnection: FunctionConcurrencyLimit;
48
- };
55
+ } | undefined;
49
56
  }
50
- export type Requires = {
51
- connection?: true;
52
- outbound?: boolean;
53
- invoke?: boolean;
57
+ export type FunctionRequires = {
58
+ connection?: true | undefined;
59
+ outbound?: boolean | undefined;
60
+ invoke?: boolean | undefined;
54
61
  } | {
55
62
  connection: false;
56
- outbound?: false;
57
- invoke?: boolean;
63
+ outbound?: false | undefined;
64
+ invoke?: boolean | undefined;
58
65
  };
@@ -1,7 +1,6 @@
1
1
  import type { TimestampsAndDeletedAt } from '../db.js';
2
- import type { FunctionCapabilities } from '../functions/capabilities.js';
3
- import type { FunctionLimits, FunctionTriggerDefinition, Requires } from '../functions/config.js';
4
2
  import type { FunctionSource } from '../syncConfigs/db.js';
3
+ import type { FunctionCapabilities, FunctionLimits, FunctionRequires, FunctionTriggerDefinition } from './config.js';
5
4
  import type { JSONSchema7 } from 'json-schema';
6
5
  export interface DBFunctionConfig extends TimestampsAndDeletedAt {
7
6
  id: number;
@@ -19,7 +18,7 @@ export interface DBFunctionConfigVersion extends TimestampsAndDeletedAt {
19
18
  version: string;
20
19
  source: FunctionSource;
21
20
  trigger: FunctionTriggerDefinition;
22
- requires: Requires;
21
+ requires: FunctionRequires;
23
22
  capabilities: FunctionCapabilities;
24
23
  limits: FunctionLimits;
25
24
  input_schema_ref: string | null;
@@ -1,6 +1,8 @@
1
1
  import type { ApiEndpoint, ApiError } from '../api.js';
2
2
  import type { AuditPolicy } from '../audit-trail/event.js';
3
+ import type { FunctionCapabilities, FunctionLimits, FunctionRequires, FunctionTriggerDefinition } from '../function/config.js';
3
4
  import type { DeployedNangoFunction, FunctionType, NangoActionFunction, NangoFunctionTemplate, NangoSyncFunction } from './domain.js';
5
+ import type { JSONSchema7 } from 'json-schema';
4
6
  export type RunnableFunctionType = Extract<FunctionType, 'action' | 'sync'>;
5
7
  export type FunctionErrorCode = 'invalid_request' | 'server_error' | 'integration_not_found' | 'compilation_error' | 'dryrun_error' | 'deployment_error' | 'connection_not_found' | 'dryrun_not_found' | 'deployment_not_found' | 'function_disabled' | 'execution_environment_unavailable' | 'timeout' | 'validation_error';
6
8
  export interface ProxyCall {
@@ -380,3 +382,69 @@ export type GetIntegrationTemplates = ApiEndpoint<{
380
382
  data: NangoFunctionTemplate[];
381
383
  };
382
384
  }>;
385
+ export interface FunctionDeploymentArtifact {
386
+ name: string;
387
+ integrationId: string;
388
+ description: string;
389
+ trigger: FunctionTriggerDefinition;
390
+ requires: FunctionRequires;
391
+ capabilities: FunctionCapabilities;
392
+ limits: FunctionLimits;
393
+ input_schema_ref: string | null;
394
+ output_schema_ref: string | null;
395
+ model_schema_refs: string[];
396
+ metadata_schema_ref: string | null;
397
+ checkpoint_schema_ref: string | null;
398
+ json_schema: JSONSchema7;
399
+ fileBody: {
400
+ js: string;
401
+ ts: string;
402
+ };
403
+ }
404
+ export type FunctionReconciliationScope = {
405
+ kind: 'environment';
406
+ } | {
407
+ kind: 'integration';
408
+ integrationId: string;
409
+ };
410
+ export interface FunctionDeploymentBundleBody {
411
+ reconciliationScope: FunctionReconciliationScope;
412
+ functions: FunctionDeploymentArtifact[];
413
+ }
414
+ export interface FunctionDeploymentBundleSuccess {
415
+ created: {
416
+ integrationId: string;
417
+ name: string;
418
+ }[];
419
+ updated: {
420
+ integrationId: string;
421
+ name: string;
422
+ }[];
423
+ unchanged: {
424
+ integrationId: string;
425
+ name: string;
426
+ }[];
427
+ deleted: {
428
+ integrationId: string;
429
+ name: string;
430
+ }[];
431
+ }
432
+ export type PostFunctionDeploymentBundlePreview = ApiEndpoint<{
433
+ Audit: {
434
+ kind: 'no-audit';
435
+ reason: 'non-auditable';
436
+ };
437
+ Method: 'POST';
438
+ Path: '/functions/deployments/bundle/preview';
439
+ Body: FunctionDeploymentBundleBody;
440
+ Error: ApiError<'functions_deployment_error' | 'integration_not_found'>;
441
+ Success: FunctionDeploymentBundleSuccess;
442
+ }>;
443
+ export type PostFunctionDeploymentBundle = ApiEndpoint<{
444
+ Audit: AuditPolicy<'function', 'deployed', 'environment'>;
445
+ Method: 'POST';
446
+ Path: '/functions/deployments/bundle';
447
+ Body: FunctionDeploymentBundleBody;
448
+ Error: ApiError<'functions_deployment_error' | 'concurrent_deployment' | 'integration_not_found'>;
449
+ Success: FunctionDeploymentBundleSuccess;
450
+ }>;
package/dist/index.d.ts CHANGED
@@ -71,8 +71,9 @@ export type * from './proxy/http.api.js';
71
71
  export type * from './dbConfig/db.js';
72
72
  export type * from './nangoYaml/index.js';
73
73
  export type * from './environment/db.js';
74
- export { ALL_SCOPES, API_KEY_SCOPES } from './api-keys/scopes.js';
75
- export type { ApiKeyScope } from './api-keys/scopes.js';
74
+ export { ACCOUNT_API_KEY_SCOPES, API_KEY_SCOPES } from './api-keys/scopes.js';
75
+ export type { AccountApiKeyScope, ApiKeyScope, CustomerKeyScope } from './api-keys/scopes.js';
76
+ export type * from './api-keys/auth.js';
76
77
  export type * from './environment/api/index.js';
77
78
  export type * from './environment/api/webhook.js';
78
79
  export type * from './environment/api/otlp.js';
@@ -95,10 +96,9 @@ export type * from './checkpoint/db.js';
95
96
  export type * from './mcp/api.js';
96
97
  export type * from './mfa/api.js';
97
98
  export type * from './mfa/db.js';
99
+ export type * from './function/config.js';
98
100
  export type * from './function/db.js';
99
101
  export type * from './functions/api.js';
100
- export type * from './functions/capabilities.js';
101
- export type * from './functions/config.js';
102
102
  export type * from './functions/domain.js';
103
103
  export type * from './lambda/index.js';
104
104
  export type * from './authz/types.js';
@@ -58,6 +58,7 @@ export type PostPublicIntegration = ApiEndpoint<{
58
58
  credentials?: ApiPublicIntegrationCredentials | undefined;
59
59
  forward_webhooks?: boolean | undefined;
60
60
  integration_config?: Record<string, string> | undefined;
61
+ custom?: Record<string, string> | undefined;
61
62
  };
62
63
  Success: {
63
64
  data: ApiPublicIntegration;
package/dist/mcp/api.d.ts CHANGED
@@ -23,17 +23,17 @@ export type GetConnectionToolsMcp = ApiEndpoint<{
23
23
  Path: '/mcp';
24
24
  Success: Record<string, unknown>;
25
25
  }>;
26
- export type PostControlPlaneMcp = ApiEndpoint<{
26
+ export type PostManagementMcp = ApiEndpoint<{
27
27
  Audit: {
28
28
  kind: 'no-audit';
29
- reason: 'non-auditable';
29
+ reason: 'audited-per-tool';
30
30
  };
31
31
  Method: 'POST';
32
32
  Path: '/mcp';
33
33
  Body: Record<string, unknown>;
34
34
  Success: Record<string, unknown>;
35
35
  }>;
36
- export type GetControlPlaneMcp = ApiEndpoint<{
36
+ export type GetManagementMcp = ApiEndpoint<{
37
37
  Audit: {
38
38
  kind: 'no-audit';
39
39
  reason: 'non-auditable';
package/dist/user/db.d.ts CHANGED
@@ -15,5 +15,7 @@ export interface DBUser extends Timestamps {
15
15
  email_verification_token_expires_at: Date | null;
16
16
  uuid: string;
17
17
  getting_started_closed: boolean;
18
+ account_discovery_pending: boolean;
19
+ account_invitation_requested_at: Date | null;
18
20
  role: Role;
19
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.71.3",
3
+ "version": "0.71.4",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",
@@ -1,7 +0,0 @@
1
- export interface FunctionCapabilities {
2
- usesRecords: boolean;
3
- usesCheckpoints: boolean;
4
- usesMetadata: boolean;
5
- usesOutbound: boolean;
6
- usesInvoke: boolean;
7
- }