@nangohq/types 0.67.2 → 0.67.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.
@@ -19,6 +19,7 @@ import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchO
19
19
  import type { GetMeta } from './meta/api.js';
20
20
  import type { PostPlanExtendTrial } from './plans/http.api.js';
21
21
  import type { GetPublicProvider, GetPublicProviders } from './providers/api.js';
22
+ import type { AllPublicProxy } from './proxy/http.api.js';
22
23
  import type { GetPublicRecords } from './record/api.js';
23
24
  import type { GetPublicScriptsConfig } from './scripts/http.api.js';
24
25
  import type { GetSharedCredentialsProvider, GetSharedCredentialsProviders, PatchSharedCredentialsProvider, PostSharedCredentialsProvider } from './sharedCredentials/api.js';
@@ -26,7 +27,7 @@ import type { GetPublicSyncStatus, PostPublicSyncPause, PostPublicSyncStart, Pos
26
27
  import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api.js';
27
28
  import type { GetUser, PatchUser } from './user/api.js';
28
29
  import type { PostPublicWebhook } from './webhooks/http.api.js';
29
- 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 | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction;
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 | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | AllPublicProxy;
30
31
  export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | 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 | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings;
31
32
  export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
32
33
  /**
@@ -1,5 +1,6 @@
1
1
  import type { Endpoint } from '../api.js';
2
2
  import type { ConnectUISettings } from '../connectUISettings/dto.js';
3
+ import type { ApiEndUser } from '../endUser/index.js';
3
4
  export interface ConnectSessionInput {
4
5
  allowed_integrations?: string[] | undefined;
5
6
  integrations_config_defaults?: Record<string, {
@@ -25,7 +26,8 @@ export interface EndUserInput {
25
26
  display_name?: string | undefined;
26
27
  tags?: Record<string, string> | undefined;
27
28
  }
28
- export type ConnectSessionOutput = ConnectSessionInput & {
29
+ export type ConnectSessionOutput = Omit<ConnectSessionInput, 'end_user' | 'organization'> & {
30
+ endUser: ApiEndUser;
29
31
  isReconnecting?: boolean;
30
32
  connectUISettings: ConnectUISettings;
31
33
  };
@@ -1,6 +1,10 @@
1
+ import type { InternalEndUser } from '../endUser/index.js';
1
2
  export interface ConnectSession {
2
3
  readonly id: number;
3
- readonly endUserId: number;
4
+ /**
5
+ * @deprecated use endUser instead
6
+ */
7
+ readonly endUserId: number | null;
4
8
  readonly accountId: number;
5
9
  readonly environmentId: number;
6
10
  readonly connectionId: number | null;
@@ -8,6 +12,7 @@ export interface ConnectSession {
8
12
  readonly allowedIntegrations: string[] | null;
9
13
  readonly integrationsConfigDefaults: Record<string, ConnectSessionIntegrationConfigDefaults> | null;
10
14
  readonly overrides: Record<string, ConnectSessionOverrides> | null;
15
+ readonly endUser: InternalEndUser | null;
11
16
  readonly createdAt: Date;
12
17
  readonly updatedAt: Date | null;
13
18
  }
@@ -130,6 +130,7 @@ export type GetPublicConnection = Endpoint<{
130
130
  provider_config_key: string;
131
131
  refresh_token?: boolean | undefined;
132
132
  force_refresh?: boolean | undefined;
133
+ refresh_github_app_jwt_token?: boolean | undefined;
133
134
  };
134
135
  Path: '/connection/:connectionId';
135
136
  Error: ApiError<'unknown_provider_config' | 'invalid_credentials'>;
@@ -1,6 +1,6 @@
1
1
  import type { AllAuthCredentials, AuthModeType, AuthOperationType } from '../auth/api.js';
2
2
  import type { TimestampsAndDeletedCorrect } from '../db.js';
3
- import type { EndUser } from '../endUser/index.js';
3
+ import type { InternalEndUser } from '../endUser/index.js';
4
4
  import type { DBEnvironment } from '../environment/db.js';
5
5
  import type { DBTeam } from '../team/db.js';
6
6
  import type { ReplaceInObject } from '../utils.js';
@@ -47,7 +47,7 @@ export interface RecentlyCreatedConnection {
47
47
  operation: AuthOperationType;
48
48
  environment: DBEnvironment;
49
49
  account: DBTeam;
50
- endUser: EndUser | undefined;
50
+ endUser: InternalEndUser | null | undefined;
51
51
  }
52
52
  export interface FailedConnectionError {
53
53
  type: string;
@@ -37,3 +37,4 @@ export interface ApiEndUser {
37
37
  display_name: string | null;
38
38
  } | null;
39
39
  }
40
+ export type InternalEndUser = Omit<EndUser, 'id' | 'accountId' | 'environmentId' | 'createdAt' | 'updatedAt'>;
package/dist/index.d.ts CHANGED
@@ -63,6 +63,7 @@ export type * from './runner/sdk.js';
63
63
  export type * from './plans/db.js';
64
64
  export type * from './plans/http.api.js';
65
65
  export type * from './stripe/http.api.js';
66
+ export type * from './proxy/http.api.js';
66
67
  export type * from './nangoYaml/index.js';
67
68
  export type * from './environment/db.js';
68
69
  export type * from './environment/api/index.js';
@@ -21,7 +21,7 @@ export interface BaseProxyConfiguration {
21
21
  files?: ProxyFile[];
22
22
  headers?: Record<string, string>;
23
23
  params?: string | Record<string, string | number | string[] | number[]>;
24
- baseUrlOverride?: string;
24
+ baseUrlOverride?: string | undefined;
25
25
  responseType?: ResponseType | undefined;
26
26
  retryHeader?: RetryHeaderConfig;
27
27
  retryOn?: number[] | null;
@@ -0,0 +1,20 @@
1
+ import type { Endpoint } from '../api.js';
2
+ export type AllPublicProxy = Endpoint<{
3
+ Method: 'GET';
4
+ Path: `/proxy/:anyPath`;
5
+ Params: any;
6
+ Body: any;
7
+ Querystring: any;
8
+ Headers: {
9
+ 'connection-id': string;
10
+ 'provider-config-key': string;
11
+ retries?: number | undefined;
12
+ 'base-url-override'?: string | undefined;
13
+ decompress?: string | undefined;
14
+ 'retry-on'?: string | undefined;
15
+ 'nango-activity-log-id'?: string | undefined;
16
+ 'nango-is-sync'?: string | undefined;
17
+ 'nango-is-dry-run'?: string | undefined;
18
+ };
19
+ Success: any;
20
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.67.2",
3
+ "version": "0.67.4",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",