@nangohq/types 0.69.47 → 0.69.49

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.
@@ -130,6 +130,29 @@ export type PostManagedSignup = Endpoint<{
130
130
  };
131
131
  };
132
132
  }>;
133
+ export type GetManagedEmailVerification = Endpoint<{
134
+ Method: 'GET';
135
+ Path: '/api/v1/account/managed/verification';
136
+ Error: ApiError<'not_found'>;
137
+ Success: {
138
+ data: {
139
+ email: string;
140
+ };
141
+ };
142
+ }>;
143
+ export type PostManagedEmailVerification = Endpoint<{
144
+ Method: 'POST';
145
+ Path: '/api/v1/account/managed/verification';
146
+ Body: {
147
+ code: string;
148
+ };
149
+ Error: ApiError<'invalid_verification_code'> | ApiError<'not_found'>;
150
+ Success: {
151
+ data: {
152
+ url: string;
153
+ };
154
+ };
155
+ }>;
133
156
  export type GetManagedCallback = Endpoint<{
134
157
  Method: 'GET';
135
158
  Path: '/api/v1/login/callback';
@@ -1,4 +1,4 @@
1
- import type { GetEmailByExpiredToken, GetEmailByUuid, GetManagedCallback, PostForgotPassword, PostLogout, PostManagedSignup, PostSignin, PostSignup, PutResetPassword } from './account/api.js';
1
+ import type { GetEmailByExpiredToken, GetEmailByUuid, GetManagedCallback, GetManagedEmailVerification, PostForgotPassword, PostLogout, PostManagedEmailVerification, PostManagedSignup, PostSignin, PostSignup, PutResetPassword } from './account/api.js';
2
2
  import type { GetAsyncActionResult, GetPublicV1, PostPublicTriggerAction } from './action/api.js';
3
3
  import type { PostImpersonate } from './admin/http.api.js';
4
4
  import type { EndpointMethod } from './api.js';
@@ -28,7 +28,7 @@ import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api
28
28
  import type { GetUser, PatchUser } from './user/api.js';
29
29
  import type { PostPublicWebhook } from './webhooks/http.api.js';
30
30
  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 | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | AllPublicProxy;
31
- export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider;
31
+ export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedEmailVerification | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider;
32
32
  export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
33
33
  /**
34
34
  * Automatically narrow endpoints type with Method + Path
@@ -15,6 +15,7 @@ export type ApiConnectionSimple = Pick<Merge<DBConnection, ApiTimestamps>, 'id'
15
15
  }[];
16
16
  endUser: ApiEndUser | null;
17
17
  tags: Tags;
18
+ pausedSyncs: string[];
18
19
  };
19
20
  export type GetConnections = Endpoint<{
20
21
  Method: 'GET';
package/dist/index.d.ts CHANGED
@@ -38,7 +38,6 @@ export type * from './scripts/on-events/db.js';
38
38
  export type * from './scripts/on-events/api.js';
39
39
  export type * from './scripts/syncs/api.js';
40
40
  export type * from './scripts/http.api.js';
41
- export type * from './apiStatus/api.js';
42
41
  export type * from './slackNotifications/db.js';
43
42
  export type * from './notification/active-logs/db.js';
44
43
  export type * from './connection/api/get.js';
@@ -85,4 +84,6 @@ export type * from './jobs/api.js';
85
84
  export type * from './checkpoint/types.js';
86
85
  export type * from './checkpoint/db.js';
87
86
  export type * from './mcp/api.js';
87
+ export type * from './lambda/index.js';
88
88
  export type * from './authz/types.js';
89
+ export type * from './pubsub/events.js';
@@ -115,6 +115,10 @@ export interface OAuthAuthBody {
115
115
  clientSecret?: string | undefined;
116
116
  scopes?: string | undefined;
117
117
  }
118
+ export interface OAuth2CCAuthBody {
119
+ authType: Extract<AuthModeType, 'OAUTH2_CC'>;
120
+ scopes?: string | undefined;
121
+ }
118
122
  export interface AppAuthBody {
119
123
  authType: Extract<AuthModeType, 'APP'>;
120
124
  appId?: string | undefined;
@@ -147,7 +151,7 @@ export interface InstallPluginAuthBody {
147
151
  username?: string | undefined;
148
152
  password?: string | undefined;
149
153
  }
150
- export type IntegrationAuthBody = OAuthAuthBody | AppAuthBody | CustomAuthBody | MCPOAuth2AuthBody | MCPOAuth2GenericAuthBody | InstallPluginAuthBody;
154
+ export type IntegrationAuthBody = OAuthAuthBody | OAuth2CCAuthBody | AppAuthBody | CustomAuthBody | MCPOAuth2AuthBody | MCPOAuth2GenericAuthBody | InstallPluginAuthBody;
151
155
  export type PostIntegration = Endpoint<{
152
156
  Method: 'POST';
153
157
  Path: '/api/v1/integrations';
@@ -0,0 +1,4 @@
1
+ export type LambdaRequestType = 'readiness_check';
2
+ export interface LambdaReadinessCheck {
3
+ type: LambdaRequestType;
4
+ }
@@ -46,6 +46,7 @@ export interface BaseProvider {
46
46
  query?: Record<string, string>;
47
47
  retry?: RetryHeaderConfig;
48
48
  decompress?: boolean;
49
+ forward_headers_on_redirect?: boolean;
49
50
  paginate?: LinkPagination | CursorPagination | OffsetPagination;
50
51
  verification?: {
51
52
  method: EndpointMethod;
@@ -197,6 +198,7 @@ export interface ProviderTwoStep extends Omit<BaseProvider, 'body_format'> {
197
198
  token_request_method?: 'GET';
198
199
  }[];
199
200
  assertion?: {
201
+ type?: 'saml' | 'jwt';
200
202
  key?: string;
201
203
  issuer?: string;
202
204
  lifetimeInSeconds?: number;
@@ -204,6 +206,8 @@ export interface ProviderTwoStep extends Omit<BaseProvider, 'body_format'> {
204
206
  attributes?: Record<string, string | number | boolean | (string | number | boolean)[]>;
205
207
  sessionIndex?: string;
206
208
  recipient?: string;
209
+ header?: Record<string, string>;
210
+ payload?: Record<string, string>;
207
211
  };
208
212
  assertion_option?: Record<string, SimplifiedJSONSchema>;
209
213
  token_expires_in_ms?: number;
@@ -26,6 +26,12 @@ export interface BaseProxyConfiguration {
26
26
  responseType?: ResponseType | undefined;
27
27
  retryHeader?: RetryHeaderConfig;
28
28
  retryOn?: number[] | null;
29
+ forwardHeadersOnRedirect?: boolean;
30
+ /**
31
+ * If set, called with the absolute URL of each HTTP redirect before Axios follows it.
32
+ * Implementations may throw (e.g. shared `ProxyError`) to abort the redirect.
33
+ */
34
+ validateProxyRedirectUrl?: (absoluteRedirectUrl: string) => void;
29
35
  }
30
36
  export interface UserProvidedProxyConfiguration extends BaseProxyConfiguration {
31
37
  decompress?: boolean | string;
@@ -12,6 +12,7 @@ export type AllPublicProxy = Endpoint<{
12
12
  'base-url-override'?: string | undefined;
13
13
  decompress?: string | undefined;
14
14
  'retry-on'?: string | undefined;
15
+ 'forward-headers-on-redirect'?: string | undefined;
15
16
  'nango-activity-log-id'?: string | undefined;
16
17
  'nango-is-sync'?: string | undefined;
17
18
  'nango-is-dry-run'?: string | undefined;
@@ -0,0 +1,91 @@
1
+ import type { FunctionRuntime } from '../runner/sdk.js';
2
+ import type { DBTeam } from '../team/db.js';
3
+ import type { DBUser } from '../user/db.js';
4
+ type Serializable = string | number | boolean | Date | null | undefined | Serializable[] | {
5
+ [key: string]: Serializable;
6
+ };
7
+ interface EventBase<TSubject extends string, TType extends string, TPayload extends Serializable> {
8
+ idempotencyKey: string;
9
+ subject: TSubject;
10
+ type: TType;
11
+ payload: TPayload;
12
+ source?: string | undefined;
13
+ createdAt: Date;
14
+ }
15
+ type EnforceEventBase<T extends EventBase<any, any, any>> = T;
16
+ export type Event = EnforceEventBase<UserCreatedEvent | UsageEvent | TeamUpdatedEvent>;
17
+ export type UserCreatedEvent = EventBase<'user', 'user.created', {
18
+ userId: DBUser['id'];
19
+ teamId: DBTeam['id'];
20
+ }>;
21
+ export type TeamUpdatedEvent = EventBase<'team', 'team.updated', {
22
+ id: DBTeam['id'];
23
+ }>;
24
+ interface UsageEventBase<TType extends string, TPayload extends Serializable> extends EventBase<'usage', TType, TPayload> {
25
+ subject: 'usage';
26
+ type: TType;
27
+ payload: TPayload & {
28
+ value: number;
29
+ properties: {
30
+ accountId: number;
31
+ environmentId: number;
32
+ environmentName: string;
33
+ integrationId: string;
34
+ connectionId: string;
35
+ };
36
+ };
37
+ }
38
+ export type UsageRecordsEvent = UsageEventBase<'usage.records', {
39
+ value: number;
40
+ properties: {
41
+ syncId: string;
42
+ model: string;
43
+ };
44
+ }>;
45
+ export type UsageMarEvent = UsageEventBase<'usage.monthly_active_records', {
46
+ value: number;
47
+ properties: {
48
+ syncId: string;
49
+ model: string;
50
+ };
51
+ }>;
52
+ export type UsageActionsEvent = UsageEventBase<'usage.actions', {
53
+ value: number;
54
+ properties: {
55
+ actionName: string;
56
+ };
57
+ }>;
58
+ export type UsageConnectionsEvent = UsageEventBase<'usage.connections', {
59
+ value: number;
60
+ }>;
61
+ export type UsageFunctionExecutionsEvent = UsageEventBase<'usage.function_executions', {
62
+ value: number;
63
+ properties: {
64
+ type: 'sync' | 'action' | 'webhook' | 'on-event';
65
+ success: boolean;
66
+ functionName: string;
67
+ runtime: FunctionRuntime | undefined;
68
+ telemetryBag: {
69
+ durationMs: number;
70
+ memoryGb: number;
71
+ customLogs: number;
72
+ proxyCalls: number;
73
+ } | undefined;
74
+ frequencyMs?: number | undefined;
75
+ };
76
+ }>;
77
+ export type UsageProxyEvent = UsageEventBase<'usage.proxy', {
78
+ value: number;
79
+ properties: {
80
+ success: boolean;
81
+ };
82
+ }>;
83
+ export type UsageWebhookForwardEvent = UsageEventBase<'usage.webhook_forward', {
84
+ value: number;
85
+ properties: {
86
+ success: boolean;
87
+ };
88
+ }>;
89
+ type EnforceUsageEventBase<T extends UsageEventBase<any, any>> = T;
90
+ export type UsageEvent = EnforceUsageEventBase<UsageMarEvent | UsageRecordsEvent | UsageActionsEvent | UsageConnectionsEvent | UsageFunctionExecutionsEvent | UsageProxyEvent | UsageWebhookForwardEvent>;
91
+ export {};
package/dist/web/env.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export interface WindowEnv {
2
2
  apiUrl: string;
3
- apiDownWatchPublicKey: string;
4
3
  publicUrl: string;
5
4
  connectUrl: string;
6
5
  gitHash: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.69.47",
3
+ "version": "0.69.49",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/utils"
13
13
  },
14
14
  "dependencies": {
15
- "axios": "1.13.5",
15
+ "axios": "1.15.0",
16
16
  "json-schema": "0.4.0",
17
17
  "type-fest": "4.41.0"
18
18
  },
@@ -1,15 +0,0 @@
1
- import type { Endpoint } from '../api.js';
2
- export type GetApiStatus = Endpoint<{
3
- Method: 'GET';
4
- Path: '/api/v1/api-status/:service';
5
- Params: {
6
- service: string;
7
- };
8
- Success: {
9
- data: ApiStatusResponse;
10
- };
11
- }>;
12
- export type ApiStatus = 'operational' | 'degraded_performance' | 'major_outage' | 'unknown';
13
- export interface ApiStatusResponse {
14
- status: ApiStatus;
15
- }