@nangohq/types 0.42.2 → 0.42.3

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.
@@ -7,7 +7,8 @@ import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api';
7
7
  import type { PostForgotPassword, PutResetPassword, PostSignin, PostSignup } from './account/api';
8
8
  import type { DeleteInvite, PostInvite } from './invitations/api';
9
9
  import type { GetUser, PatchUser } from './user/api';
10
- export type APIEndpoints = PostSignup | PostSignin | GetTeam | PutTeam | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | GetOnboardingStatus | SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation;
10
+ import type { GetListIntegrations } from './integration/api';
11
+ export type APIEndpoints = PostSignup | PostSignin | GetTeam | PutTeam | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | GetOnboardingStatus | SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | GetListIntegrations;
11
12
  /**
12
13
  * Automatically narrow endpoints type with Method + Path
13
14
  */
@@ -1,4 +1,3 @@
1
- import type { BaseConnection } from '../connection/db.js';
2
1
  export interface AuthModes {
3
2
  OAuth1: 'OAUTH1';
4
3
  OAuth2: 'OAUTH2';
@@ -118,5 +117,4 @@ export type RefreshTokenResponse = AuthorizationTokenResponse;
118
117
  export interface AuthorizationTokenResponse extends Omit<OAuth2Credentials, 'type' | 'raw'> {
119
118
  expires_in?: number;
120
119
  }
121
- export type ImportedCredentials = (OAuth2Credentials & Partial<Pick<AuthorizationTokenResponse, 'expires_in'>> & Partial<Pick<BaseConnection, 'metadata' | 'connection_config'>>) | OAuth1Credentials;
122
120
  export type AllAuthCredentials = OAuth1Credentials | OAuth2Credentials | OAuth2ClientCredentials | BasicApiCredentials | ApiKeyCredentials | AppCredentials | AppStoreCredentials | UnauthCredentials | CustomCredentials | TbaCredentials | TableauCredentials;
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export type * from './scripts/post-connection/db.js';
22
22
  export type * from './scripts/syncs/api.js';
23
23
  export type * from './notification/active-logs/db.js';
24
24
  export type * from './connection/api/get.js';
25
+ export type * from './integration/api.js';
25
26
  export type * from './integration/db.js';
26
27
  export type * from './integration/template.js';
27
28
  export type * from './auth/api.js';
@@ -0,0 +1,11 @@
1
+ import type { Endpoint } from '../api';
2
+ export type GetListIntegrations = Endpoint<{
3
+ Method: 'GET';
4
+ Path: '/config';
5
+ Success: {
6
+ configs: {
7
+ provider: string;
8
+ unique_key: string;
9
+ }[];
10
+ };
11
+ }>;
@@ -60,6 +60,7 @@ export interface TemplateOAuth2 extends Template {
60
60
  authorization_method?: OAuthAuthorizationMethodType;
61
61
  body_format?: OAuthBodyFormatType;
62
62
  refresh_url?: string;
63
+ expires_in_unit?: 'milliseconds';
63
64
  token_request_auth_method?: 'basic' | 'custom';
64
65
  }
65
66
  export interface TemplateOAuth1 extends Template {
@@ -3,4 +3,4 @@ export interface SyncResult {
3
3
  updated: number;
4
4
  deleted: number;
5
5
  }
6
- export type SyncType = 'INCREMENTAL' | 'INITIAL';
6
+ export type SyncType = 'INCREMENTAL' | 'FULL';
@@ -1,5 +1,5 @@
1
1
  import type { AuthOperationType, AuthModeType } from '../auth/api.js';
2
- import type { SyncResult, SyncType } from '../scripts/syncs/api.js';
2
+ import type { SyncResult } from '../scripts/syncs/api.js';
3
3
  import type { ErrorPayload } from '../api.js';
4
4
  export type WebhookTypes = 'sync' | 'auth' | 'forward';
5
5
  export interface NangoWebhookBase {
@@ -13,7 +13,7 @@ export interface NangoSyncWebhookBodyBase extends NangoWebhookBase {
13
13
  providerConfigKey: string;
14
14
  syncName: string;
15
15
  model: string;
16
- syncType: SyncType;
16
+ syncType: 'INCREMENTAL' | 'INITIAL';
17
17
  }
18
18
  export interface NangoSyncWebhookBodySuccess extends NangoSyncWebhookBodyBase {
19
19
  success: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.42.2",
3
+ "version": "0.42.3",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",