@nangohq/types 0.57.0 → 0.57.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.
@@ -10,7 +10,7 @@ import type { GetUser, PatchUser } from './user/api';
10
10
  import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetIntegrationFlows, GetPublicIntegration, GetPublicListIntegrations, GetPublicListIntegrationsLegacy, PatchIntegration, PostIntegration } from './integration/api';
11
11
  import type { PostPublicTableauAuthorization, PostPublicTbaAuthorization, PostPublicUnauthenticatedAuthorization, PostPublicJwtAuthorization, PostPublicBillAuthorization, PostPublicSignatureAuthorization, PostPublicTwoStepAuthorization, PostPublicApiKeyAuthorization, PostPublicBasicAuthorization, PostPublicAppStoreAuthorization } from './auth/http.api';
12
12
  import type { GetPublicProvider, GetPublicProviders } from './providers/api';
13
- import type { DeleteConnectSession, GetConnectSession, PostConnectSessions, PostInternalConnectSessions, PostPublicConnectSessionsReconnect } from './connect/api';
13
+ import type { DeleteConnectSession, GetConnectSession, PostConnectSessions, PostInternalConnectSessions, PostPublicConnectSessionsReconnect, PostPublicConnectTelemetry } from './connect/api';
14
14
  import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PostConnectionRefresh } from './connection/api/get';
15
15
  import type { GetMeta } from './meta/api';
16
16
  import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api';
@@ -20,7 +20,7 @@ import type { PatchWebhook } from './environment/api/webhook';
20
20
  import type { PostEnvironmentVariables } from './environment/variable/api';
21
21
  import type { GetPublicRecords } from './record/api';
22
22
  import type { GetPublicScriptsConfig } from './scripts/http.api';
23
- export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTbaAuthorization | PostPublicTableauAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrationsLegacy | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicRecords | GetPublicScriptsConfig;
23
+ export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTbaAuthorization | PostPublicTableauAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrationsLegacy | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry;
24
24
  export type PrivateApiEndpoints = PostSignup | PostSignin | GetTeam | PutTeam | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PatchOnboarding | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | PatchWebhook | PostEnvironmentVariables;
25
25
  export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
26
26
  /**
@@ -158,4 +158,6 @@ export type RefreshTokenResponse = AuthorizationTokenResponse;
158
158
  export interface AuthorizationTokenResponse extends Omit<OAuth2Credentials, 'type' | 'raw'> {
159
159
  expires_in?: number;
160
160
  }
161
+ export type TestableCredentials = ApiKeyCredentials | BasicApiCredentials | TbaCredentials | JwtCredentials | SignatureCredentials;
162
+ export type RefreshableCredentials = OAuth2Credentials | AppCredentials | AppStoreCredentials | OAuth2ClientCredentials | TableauCredentials | JwtCredentials | TwoStepCredentials | BillCredentials | SignatureCredentials;
161
163
  export type AllAuthCredentials = OAuth1Credentials | OAuth2Credentials | OAuth2ClientCredentials | BasicApiCredentials | ApiKeyCredentials | AppCredentials | AppStoreCredentials | UnauthCredentials | CustomCredentials | TbaCredentials | TableauCredentials | JwtCredentials | BillCredentials | TwoStepCredentials | SignatureCredentials;
@@ -67,3 +67,16 @@ export type PostInternalConnectSessions = Endpoint<{
67
67
  Success: PostConnectSessions['Success'];
68
68
  Body: Pick<ConnectSessionInput, 'allowed_integrations' | 'end_user' | 'organization'>;
69
69
  }>;
70
+ export type PostPublicConnectTelemetry = Endpoint<{
71
+ Method: 'POST';
72
+ Path: '/connect/telemetry';
73
+ Body: {
74
+ token: string;
75
+ event: 'open' | 'view:list' | 'view:integration' | 'view:unknown_error' | 'view:credentials_error' | 'view:success' | 'click:integration' | 'click:doc' | 'click:doc_section' | 'click:connect' | 'click:close' | 'click:finish' | 'click:outside' | 'popup:blocked_by_browser' | 'popup:closed_early';
76
+ timestamp: Date;
77
+ dimensions?: {
78
+ integration?: string | undefined;
79
+ } | undefined;
80
+ };
81
+ Success: never;
82
+ }>;
@@ -87,7 +87,7 @@ export interface MessageRow {
87
87
  level: LogLevel;
88
88
  type: MessageType;
89
89
  message: string;
90
- context?: 'script' | 'proxy' | 'webhook';
90
+ context?: 'script' | 'proxy' | 'webhook' | undefined;
91
91
  parentId: string;
92
92
  error?: MessageError | undefined;
93
93
  request?: MessageHTTPRequest | undefined;
@@ -148,7 +148,7 @@ export type OperationRowInsert = Merge<Partial<OperationRow>, Pick<OperationRow,
148
148
  /**
149
149
  * What is required to insert a Message
150
150
  */
151
- export type MessageRowInsert = Pick<MessageRow, 'type' | 'message' | 'createdAt'> & Partial<Omit<MessageRow, 'type' | 'message'>> & {
151
+ export type MessageRowInsert = Pick<MessageRow, 'type' | 'message' | 'createdAt' | 'level'> & Partial<Omit<MessageRow, 'type' | 'message'>> & {
152
152
  id?: never;
153
153
  };
154
154
  export type MessageOrOperationRow = MessageRow | OperationRow;
@@ -50,7 +50,7 @@ export interface BaseProvider {
50
50
  paginate?: LinkPagination | CursorPagination | OffsetPagination;
51
51
  verification?: {
52
52
  method: EndpointMethod;
53
- endpoint: string;
53
+ endpoints: string[];
54
54
  base_url_override?: string;
55
55
  headers?: Record<string, string>;
56
56
  };
@@ -74,6 +74,7 @@ export interface BaseProvider {
74
74
  webhook_routing_script?: string;
75
75
  webhook_user_defined_secret?: boolean;
76
76
  post_connection_script?: string;
77
+ credentials_verification_script?: string;
77
78
  categories?: string[];
78
79
  connection_configuration?: string[];
79
80
  connection_config?: Record<string, SimplifiedJSONSchema>;
@@ -140,3 +141,5 @@ export interface ProviderSignature extends BaseProvider {
140
141
  };
141
142
  }
142
143
  export type Provider = BaseProvider | ProviderOAuth1 | ProviderOAuth2 | ProviderJwt | ProviderTwoStep | ProviderSignature;
144
+ export type RefreshableProvider = ProviderOAuth2;
145
+ export type TestableProvider = ProviderJwt | ProviderSignature;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.57.0",
3
+ "version": "0.57.1",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",