@nangohq/types 0.67.0 → 0.67.2
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.
- package/dist/action/api.d.ts +27 -0
- package/dist/api.endpoints.d.ts +5 -5
- package/dist/auth/api.d.ts +8 -8
- package/dist/billing/types.d.ts +1 -0
- package/dist/connect/api.d.ts +9 -6
- package/dist/connectUISettings/api.d.ts +25 -0
- package/dist/connectUISettings/db.d.ts +9 -0
- package/dist/connectUISettings/dto.d.ts +16 -0
- package/dist/connection/api/get.d.ts +20 -1
- package/dist/connection/db.d.ts +3 -3
- package/dist/endUser/index.d.ts +1 -0
- package/dist/environment/api/index.d.ts +8 -0
- package/dist/index.d.ts +5 -2
- package/dist/integration/api.d.ts +2 -0
- package/dist/meta/api.d.ts +1 -1
- package/dist/plans/db.d.ts +10 -0
- package/dist/providers/provider.d.ts +2 -2
- package/dist/scripts/syncs/api.d.ts +0 -5
- package/dist/sync/api.d.ts +43 -0
- package/dist/sync/db.d.ts +11 -0
- package/dist/sync/index.d.ts +23 -0
- package/dist/user/api.d.ts +3 -1
- package/dist/user/db.d.ts +1 -0
- package/dist/web/env.d.ts +0 -2
- package/dist/webhooks/api.d.ts +1 -1
- package/package.json +1 -1
- package/dist/onboarding/api.d.ts +0 -13
- package/dist/onboarding/db.d.ts +0 -10
package/dist/action/api.d.ts
CHANGED
|
@@ -11,3 +11,30 @@ export type GetAsyncActionResult = Endpoint<{
|
|
|
11
11
|
};
|
|
12
12
|
Success: Record<string, any>;
|
|
13
13
|
}>;
|
|
14
|
+
export type PostPublicTriggerAction = Endpoint<{
|
|
15
|
+
Method: 'POST';
|
|
16
|
+
Path: '/action/trigger';
|
|
17
|
+
Body: {
|
|
18
|
+
action_name: string;
|
|
19
|
+
input: unknown;
|
|
20
|
+
};
|
|
21
|
+
Headers: {
|
|
22
|
+
'provider-config-key': string;
|
|
23
|
+
'connection-id': string;
|
|
24
|
+
'x-async'?: boolean;
|
|
25
|
+
'x-max-retries'?: number;
|
|
26
|
+
};
|
|
27
|
+
Success: any;
|
|
28
|
+
}>;
|
|
29
|
+
export type GetPublicV1 = Endpoint<{
|
|
30
|
+
Method: 'GET';
|
|
31
|
+
Path: `/v1/:path`;
|
|
32
|
+
Params: any;
|
|
33
|
+
Body: any;
|
|
34
|
+
Querystring: any;
|
|
35
|
+
Headers: {
|
|
36
|
+
'provider-config-key': string;
|
|
37
|
+
'connection-id': string;
|
|
38
|
+
};
|
|
39
|
+
Success: any;
|
|
40
|
+
}>;
|
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { GetEmailByExpiredToken, GetEmailByUuid, GetManagedCallback, PostForgotPassword, PostLogout, PostManagedSignup, PostSignin, PostSignup, PutResetPassword } from './account/api.js';
|
|
2
|
-
import type { GetAsyncActionResult } from './action/api.js';
|
|
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';
|
|
5
5
|
import type { PostPublicApiKeyAuthorization, PostPublicAppStoreAuthorization, PostPublicBasicAuthorization, PostPublicBillAuthorization, PostPublicJwtAuthorization, PostPublicOauthOutboundAuthorization, PostPublicSignatureAuthorization, PostPublicTbaAuthorization, PostPublicTwoStepAuthorization, PostPublicUnauthenticatedAuthorization } from './auth/http.api.js';
|
|
6
6
|
import type { DeleteConnectSession, GetConnectSession, PostConnectSessions, PostInternalConnectSessions, PostPublicConnectSessionsReconnect, PostPublicConnectTelemetry } from './connect/api.js';
|
|
7
|
+
import type { GetConnectUISettings, PutConnectUISettings } from './connectUISettings/api.js';
|
|
7
8
|
import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PostConnectionRefresh, PostPublicConnection } from './connection/api/get.js';
|
|
8
9
|
import type { SetMetadata, UpdateMetadata } from './connection/api/metadata.js';
|
|
9
10
|
import type { PostDeploy, PostDeployConfirmation, PostDeployInternal } from './deploy/api.js';
|
|
@@ -16,18 +17,17 @@ import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetInt
|
|
|
16
17
|
import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
|
|
17
18
|
import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api.js';
|
|
18
19
|
import type { GetMeta } from './meta/api.js';
|
|
19
|
-
import type { PatchOnboarding } from './onboarding/api.js';
|
|
20
20
|
import type { PostPlanExtendTrial } from './plans/http.api.js';
|
|
21
21
|
import type { GetPublicProvider, GetPublicProviders } from './providers/api.js';
|
|
22
22
|
import type { GetPublicRecords } from './record/api.js';
|
|
23
23
|
import type { GetPublicScriptsConfig } from './scripts/http.api.js';
|
|
24
24
|
import type { GetSharedCredentialsProvider, GetSharedCredentialsProviders, PatchSharedCredentialsProvider, PostSharedCredentialsProvider } from './sharedCredentials/api.js';
|
|
25
|
-
import type { PostPublicTrigger, PutPublicSyncConnectionFrequency } from './sync/api.js';
|
|
25
|
+
import type { GetPublicSyncStatus, PostPublicSyncPause, PostPublicSyncStart, PostPublicTrigger, PutPublicSyncConnectionFrequency } from './sync/api.js';
|
|
26
26
|
import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api.js';
|
|
27
27
|
import type { GetUser, PatchUser } from './user/api.js';
|
|
28
28
|
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;
|
|
30
|
-
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters |
|
|
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 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
31
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
32
32
|
/**
|
|
33
33
|
* Automatically narrow endpoints type with Method + Path
|
package/dist/auth/api.d.ts
CHANGED
|
@@ -70,12 +70,12 @@ export interface AppStoreCredentials {
|
|
|
70
70
|
export interface OAuth2Credentials extends CredentialsCommon {
|
|
71
71
|
type: AuthModes['OAuth2'];
|
|
72
72
|
access_token: string;
|
|
73
|
-
refresh_token?: string;
|
|
73
|
+
refresh_token?: string | undefined;
|
|
74
74
|
expires_at?: Date | undefined;
|
|
75
75
|
config_override?: {
|
|
76
|
-
client_id?: string;
|
|
77
|
-
client_secret?: string;
|
|
78
|
-
};
|
|
76
|
+
client_id?: string | undefined;
|
|
77
|
+
client_secret?: string | undefined;
|
|
78
|
+
} | undefined;
|
|
79
79
|
}
|
|
80
80
|
export interface CustomCredentials extends CredentialsCommon {
|
|
81
81
|
type: AuthModes['Custom'];
|
|
@@ -103,10 +103,10 @@ export interface TbaCredentials {
|
|
|
103
103
|
type: AuthModes['TBA'];
|
|
104
104
|
token_id: string;
|
|
105
105
|
token_secret: string;
|
|
106
|
-
config_override
|
|
107
|
-
client_id?: string;
|
|
108
|
-
client_secret?: string;
|
|
109
|
-
};
|
|
106
|
+
config_override?: {
|
|
107
|
+
client_id?: string | undefined;
|
|
108
|
+
client_secret?: string | undefined;
|
|
109
|
+
} | undefined;
|
|
110
110
|
}
|
|
111
111
|
export interface BillCredentials extends CredentialsCommon {
|
|
112
112
|
type: AuthModes['Bill'];
|
package/dist/billing/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { DBUser } from '../user/db.js';
|
|
|
4
4
|
export interface BillingClient {
|
|
5
5
|
ingest: (events: BillingIngestEvent[]) => Promise<void>;
|
|
6
6
|
upsertCustomer: (team: DBTeam, user: DBUser) => Promise<Result<BillingCustomer>>;
|
|
7
|
+
updateCustomer: (customerId: string, name: string) => Promise<Result<void>>;
|
|
7
8
|
linkStripeToCustomer(teamId: number, customerId: string): Promise<Result<void>>;
|
|
8
9
|
getCustomer: (accountId: number) => Promise<Result<BillingCustomer>>;
|
|
9
10
|
getSubscription: (accountId: number) => Promise<Result<BillingSubscription | null>>;
|
package/dist/connect/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Endpoint } from '../api.js';
|
|
2
|
+
import type { ConnectUISettings } from '../connectUISettings/dto.js';
|
|
2
3
|
export interface ConnectSessionInput {
|
|
3
4
|
allowed_integrations?: string[] | undefined;
|
|
4
5
|
integrations_config_defaults?: Record<string, {
|
|
@@ -9,12 +10,7 @@ export interface ConnectSessionInput {
|
|
|
9
10
|
oauth_scopes_override?: string | undefined;
|
|
10
11
|
} | undefined;
|
|
11
12
|
}> | undefined;
|
|
12
|
-
end_user:
|
|
13
|
-
id: string;
|
|
14
|
-
email?: string | undefined;
|
|
15
|
-
display_name?: string | undefined;
|
|
16
|
-
tags?: Record<string, string> | undefined;
|
|
17
|
-
};
|
|
13
|
+
end_user: EndUserInput;
|
|
18
14
|
organization?: {
|
|
19
15
|
id: string;
|
|
20
16
|
display_name?: string | undefined;
|
|
@@ -23,8 +19,15 @@ export interface ConnectSessionInput {
|
|
|
23
19
|
docs_connect?: string | undefined;
|
|
24
20
|
}> | undefined;
|
|
25
21
|
}
|
|
22
|
+
export interface EndUserInput {
|
|
23
|
+
id: string;
|
|
24
|
+
email?: string | undefined;
|
|
25
|
+
display_name?: string | undefined;
|
|
26
|
+
tags?: Record<string, string> | undefined;
|
|
27
|
+
}
|
|
26
28
|
export type ConnectSessionOutput = ConnectSessionInput & {
|
|
27
29
|
isReconnecting?: boolean;
|
|
30
|
+
connectUISettings: ConnectUISettings;
|
|
28
31
|
};
|
|
29
32
|
export type PostConnectSessions = Endpoint<{
|
|
30
33
|
Method: 'POST';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ApiError, Endpoint } from '../api.js';
|
|
2
|
+
import type { ConnectUISettings } from './dto.js';
|
|
3
|
+
export type GetConnectUISettings = Endpoint<{
|
|
4
|
+
Method: 'GET';
|
|
5
|
+
Path: '/api/v1/connect-ui-settings';
|
|
6
|
+
Querystring: {
|
|
7
|
+
env: string;
|
|
8
|
+
};
|
|
9
|
+
Success: {
|
|
10
|
+
data: ConnectUISettings;
|
|
11
|
+
};
|
|
12
|
+
Error: ApiError<'failed_to_get_connect_ui_settings'>;
|
|
13
|
+
}>;
|
|
14
|
+
export type PutConnectUISettings = Endpoint<{
|
|
15
|
+
Method: 'PUT';
|
|
16
|
+
Path: '/api/v1/connect-ui-settings';
|
|
17
|
+
Querystring: {
|
|
18
|
+
env: string;
|
|
19
|
+
};
|
|
20
|
+
Body: ConnectUISettings;
|
|
21
|
+
Success: {
|
|
22
|
+
data: ConnectUISettings;
|
|
23
|
+
};
|
|
24
|
+
Error: ApiError<'failed_to_update_connect_ui_settings'>;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ConnectUISettings {
|
|
2
|
+
theme: ConnectUIThemeSettings;
|
|
3
|
+
showWatermark: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface ConnectUIThemeSettings {
|
|
6
|
+
light: ConnectUIColorPalette;
|
|
7
|
+
dark: ConnectUIColorPalette;
|
|
8
|
+
}
|
|
9
|
+
export interface ConnectUIColorPalette {
|
|
10
|
+
background: string;
|
|
11
|
+
foreground: string;
|
|
12
|
+
primary: string;
|
|
13
|
+
primaryForeground: string;
|
|
14
|
+
textPrimary: string;
|
|
15
|
+
textMuted: string;
|
|
16
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ApiError, ApiTimestamps, Endpoint } from '../../api.js';
|
|
2
2
|
import type { AllAuthCredentials, ApiKeyCredentials, BasicApiCredentials, OAuth1Credentials, OAuth2ClientCredentials, OAuth2Credentials, TbaCredentials } from '../../auth/api.js';
|
|
3
|
+
import type { EndUserInput } from '../../connect/api.js';
|
|
3
4
|
import type { ApiEndUser } from '../../endUser/index.js';
|
|
4
5
|
import type { ActiveLog } from '../../notification/active-logs/db.js';
|
|
5
6
|
import type { ReplaceInObject } from '../../utils.js';
|
|
@@ -74,13 +75,14 @@ export type PostPublicConnection = Endpoint<{
|
|
|
74
75
|
provider_config_key: string;
|
|
75
76
|
metadata?: Record<string, unknown> | undefined;
|
|
76
77
|
connection_config?: ConnectionConfig | undefined;
|
|
77
|
-
credentials: OAuth2Credentials | OAuth2ClientCredentials | OAuth1Credentials | ApiKeyCredentials | BasicApiCredentials | TbaCredentials | {
|
|
78
|
+
credentials: Omit<OAuth2Credentials, 'raw'> | Omit<OAuth2ClientCredentials, 'raw'> | Omit<OAuth1Credentials, 'raw'> | Omit<ApiKeyCredentials, 'raw'> | Omit<BasicApiCredentials, 'raw'> | Omit<TbaCredentials, 'raw'> | {
|
|
78
79
|
type: 'APP';
|
|
79
80
|
app_id: string;
|
|
80
81
|
installation_id: string;
|
|
81
82
|
} | {
|
|
82
83
|
type: 'NONE';
|
|
83
84
|
};
|
|
85
|
+
end_user?: EndUserInput | undefined;
|
|
84
86
|
};
|
|
85
87
|
Success: ApiPublicConnectionFull;
|
|
86
88
|
}>;
|
|
@@ -133,6 +135,23 @@ export type GetPublicConnection = Endpoint<{
|
|
|
133
135
|
Error: ApiError<'unknown_provider_config' | 'invalid_credentials'>;
|
|
134
136
|
Success: ApiPublicConnectionFull;
|
|
135
137
|
}>;
|
|
138
|
+
export type PatchPublicConnection = Endpoint<{
|
|
139
|
+
Method: 'PATCH';
|
|
140
|
+
Path: '/connections/:connectionId';
|
|
141
|
+
Params: {
|
|
142
|
+
connectionId: string;
|
|
143
|
+
};
|
|
144
|
+
Querystring: {
|
|
145
|
+
provider_config_key: string;
|
|
146
|
+
};
|
|
147
|
+
Body: {
|
|
148
|
+
end_user?: EndUserInput | undefined;
|
|
149
|
+
};
|
|
150
|
+
Success: {
|
|
151
|
+
success: boolean;
|
|
152
|
+
};
|
|
153
|
+
Error: ApiError<'unknown_provider_config'>;
|
|
154
|
+
}>;
|
|
136
155
|
export type PostConnectionRefresh = Endpoint<{
|
|
137
156
|
Method: 'POST';
|
|
138
157
|
Params: {
|
package/dist/connection/db.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ import type { Merge, Simplify } from 'type-fest';
|
|
|
8
8
|
export type Metadata = Record<string, unknown>;
|
|
9
9
|
export interface ConnectionConfig {
|
|
10
10
|
[key: string]: any;
|
|
11
|
-
oauth_scopes_override?: string[];
|
|
12
|
-
oauth_scopes?: string;
|
|
13
|
-
authorization_params?: Record<string, string
|
|
11
|
+
oauth_scopes_override?: string[] | undefined;
|
|
12
|
+
oauth_scopes?: string | undefined;
|
|
13
|
+
authorization_params?: Record<string, string> | undefined;
|
|
14
14
|
}
|
|
15
15
|
export interface DBConnection extends TimestampsAndDeletedCorrect {
|
|
16
16
|
id: number;
|
package/dist/endUser/index.d.ts
CHANGED
|
@@ -59,3 +59,11 @@ export type DeleteEnvironment = Endpoint<{
|
|
|
59
59
|
Success: never;
|
|
60
60
|
Error: ApiError<'cannot_delete_prod_environment'>;
|
|
61
61
|
}>;
|
|
62
|
+
export type GetPublicEnvironmentVariables = Endpoint<{
|
|
63
|
+
Method: 'GET';
|
|
64
|
+
Path: '/api/v1/environment-variables';
|
|
65
|
+
Success: {
|
|
66
|
+
name: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}[];
|
|
69
|
+
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export type * from './db.js';
|
|
2
2
|
export type * from './api.js';
|
|
3
3
|
export type * from './api.endpoints.js';
|
|
4
|
-
export type * from './onboarding/db.js';
|
|
5
|
-
export type * from './onboarding/api.js';
|
|
6
4
|
export type * from './gettingStarted/db.js';
|
|
7
5
|
export type * from './gettingStarted/dto.js';
|
|
8
6
|
export type * from './gettingStarted/api.js';
|
|
@@ -17,6 +15,9 @@ export type * from './user/api.js';
|
|
|
17
15
|
export type * from './user/db.js';
|
|
18
16
|
export type * from './connection/api/metadata.js';
|
|
19
17
|
export type * from './connection/db.js';
|
|
18
|
+
export type * from './connectUISettings/dto.js';
|
|
19
|
+
export type * from './connectUISettings/db.js';
|
|
20
|
+
export type * from './connectUISettings/api.js';
|
|
20
21
|
export type * from './meta/api.js';
|
|
21
22
|
export type * from './invitations/api.js';
|
|
22
23
|
export type * from './invitations/db.js';
|
|
@@ -42,6 +43,8 @@ export type * from './slackNotifications/db.js';
|
|
|
42
43
|
export type * from './notification/active-logs/db.js';
|
|
43
44
|
export type * from './connection/api/get.js';
|
|
44
45
|
export type * from './sync/api.js';
|
|
46
|
+
export type * from './sync/db.js';
|
|
47
|
+
export type * from './sync/index.js';
|
|
45
48
|
export type * from './integration/api.js';
|
|
46
49
|
export type * from './integration/db.js';
|
|
47
50
|
export type * from './providers/provider.js';
|
|
@@ -14,6 +14,7 @@ export interface ApiPublicIntegrationInclude {
|
|
|
14
14
|
client_id: string | null;
|
|
15
15
|
client_secret: string | null;
|
|
16
16
|
scopes: string | null;
|
|
17
|
+
webhook_secret: string | null;
|
|
17
18
|
} | {
|
|
18
19
|
type: AuthModes['App'];
|
|
19
20
|
app_id: string | null;
|
|
@@ -214,6 +215,7 @@ export type ApiPublicIntegrationCredentials = {
|
|
|
214
215
|
client_id: string;
|
|
215
216
|
client_secret: string;
|
|
216
217
|
scopes?: string | undefined;
|
|
218
|
+
webhook_secret?: string | undefined;
|
|
217
219
|
} | {
|
|
218
220
|
type: Extract<AuthModeType, 'APP'>;
|
|
219
221
|
app_id: string;
|
package/dist/meta/api.d.ts
CHANGED
package/dist/plans/db.d.ts
CHANGED
|
@@ -76,4 +76,14 @@ export interface DBPlan extends Timestamps {
|
|
|
76
76
|
* @default false
|
|
77
77
|
*/
|
|
78
78
|
can_override_docs_connect_url: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Enable or disable the ability to customize the connect UI theme
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
can_customize_connect_ui_theme: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Enable or disable the ability to disable the connect UI watermark
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
can_disable_connect_ui_watermark: boolean;
|
|
79
89
|
}
|
|
@@ -155,8 +155,8 @@ export interface ProviderTwoStep extends Omit<BaseProvider, 'body_format'> {
|
|
|
155
155
|
token_headers?: Record<string, string>;
|
|
156
156
|
token_response: {
|
|
157
157
|
token: string;
|
|
158
|
-
token_expiration
|
|
159
|
-
token_expiration_strategy
|
|
158
|
+
token_expiration?: string;
|
|
159
|
+
token_expiration_strategy?: 'expireAt' | 'expireIn';
|
|
160
160
|
};
|
|
161
161
|
additional_steps?: {
|
|
162
162
|
body_format?: 'json' | 'form';
|
package/dist/sync/api.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReportedSyncJobStatus } from './index.js';
|
|
1
2
|
import type { ApiError, Endpoint } from '../api.js';
|
|
2
3
|
export type PostPublicTrigger = Endpoint<{
|
|
3
4
|
Method: 'POST';
|
|
@@ -70,3 +71,45 @@ export type PutPublicSyncConnectionFrequency = Endpoint<{
|
|
|
70
71
|
};
|
|
71
72
|
Error: ApiError<'unknown_connection' | 'unknown_sync'>;
|
|
72
73
|
}>;
|
|
74
|
+
export type PostPublicSyncPause = Endpoint<{
|
|
75
|
+
Method: 'POST';
|
|
76
|
+
Path: '/sync/pause';
|
|
77
|
+
Body: {
|
|
78
|
+
syncs: (string | {
|
|
79
|
+
name: string;
|
|
80
|
+
variant: string;
|
|
81
|
+
})[];
|
|
82
|
+
provider_config_key: string;
|
|
83
|
+
connection_id?: string | undefined;
|
|
84
|
+
};
|
|
85
|
+
Success: {
|
|
86
|
+
success: boolean;
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
89
|
+
export type PostPublicSyncStart = Endpoint<{
|
|
90
|
+
Method: 'POST';
|
|
91
|
+
Path: '/sync/start';
|
|
92
|
+
Body: {
|
|
93
|
+
syncs: (string | {
|
|
94
|
+
name: string;
|
|
95
|
+
variant: string;
|
|
96
|
+
})[];
|
|
97
|
+
provider_config_key: string;
|
|
98
|
+
connection_id?: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
Success: {
|
|
101
|
+
success: boolean;
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
export type GetPublicSyncStatus = Endpoint<{
|
|
105
|
+
Method: 'GET';
|
|
106
|
+
Path: '/sync/status';
|
|
107
|
+
Querystring: {
|
|
108
|
+
syncs: string;
|
|
109
|
+
provider_config_key: string;
|
|
110
|
+
connection_id?: string | undefined;
|
|
111
|
+
};
|
|
112
|
+
Success: {
|
|
113
|
+
syncs: ReportedSyncJobStatus[];
|
|
114
|
+
};
|
|
115
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TimestampsAndDeletedCorrect } from '../db.js';
|
|
2
|
+
export interface DBSync extends TimestampsAndDeletedCorrect {
|
|
3
|
+
id: string;
|
|
4
|
+
nango_connection_id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
variant: string;
|
|
7
|
+
last_sync_date: Date | null;
|
|
8
|
+
frequency: string | null;
|
|
9
|
+
last_fetched_at: Date | null;
|
|
10
|
+
sync_config_id: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type SyncStatus = 'RUNNING' | 'PAUSED' | 'STOPPED' | 'SUCCESS' | 'ERROR';
|
|
2
|
+
export type SyncJobsType = 'INCREMENTAL' | 'FULL' | 'WEBHOOK' | 'ON_EVENT_SCRIPT' | 'ACTION';
|
|
3
|
+
export interface SyncResult {
|
|
4
|
+
added: number;
|
|
5
|
+
updated: number;
|
|
6
|
+
deleted: number;
|
|
7
|
+
}
|
|
8
|
+
export type SyncResultByModel = Record<string, SyncResult>;
|
|
9
|
+
export interface ReportedSyncJobStatus {
|
|
10
|
+
id?: string;
|
|
11
|
+
type: SyncJobsType | 'INITIAL';
|
|
12
|
+
name?: string;
|
|
13
|
+
variant?: string;
|
|
14
|
+
connection_id?: string;
|
|
15
|
+
status: SyncStatus;
|
|
16
|
+
latestResult?: SyncResultByModel | undefined;
|
|
17
|
+
jobStatus?: SyncStatus;
|
|
18
|
+
frequency: string | null;
|
|
19
|
+
finishedAt: Date | undefined;
|
|
20
|
+
nextScheduledSyncAt: Date | null;
|
|
21
|
+
latestExecutionStatus: SyncStatus | undefined;
|
|
22
|
+
recordCount: Record<string, number>;
|
|
23
|
+
}
|
package/dist/user/api.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ export type PatchUser = Endpoint<{
|
|
|
10
10
|
Method: 'PATCH';
|
|
11
11
|
Path: `/api/v1/user`;
|
|
12
12
|
Body: {
|
|
13
|
-
name
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
gettingStartedClosed?: boolean | undefined;
|
|
14
15
|
};
|
|
15
16
|
Success: {
|
|
16
17
|
data: ApiUser;
|
|
@@ -22,6 +23,7 @@ export interface ApiUser {
|
|
|
22
23
|
email: string;
|
|
23
24
|
name: string;
|
|
24
25
|
uuid: string;
|
|
26
|
+
gettingStartedClosed: boolean;
|
|
25
27
|
}
|
|
26
28
|
export type PutUserPassword = Endpoint<{
|
|
27
29
|
Method: 'PUT';
|
package/dist/user/db.d.ts
CHANGED
package/dist/web/env.d.ts
CHANGED
package/dist/webhooks/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AsyncActionResponse } from '../action/api.js';
|
|
2
2
|
import type { ErrorPayload } from '../api.js';
|
|
3
3
|
import type { AuthModeType, AuthOperationType } from '../auth/api.js';
|
|
4
|
-
import type { SyncResult } from '../
|
|
4
|
+
import type { SyncResult } from '../sync/index.js';
|
|
5
5
|
export type WebhookTypes = 'sync' | 'auth' | 'forward' | 'async_action';
|
|
6
6
|
export interface NangoWebhookBase {
|
|
7
7
|
from: string;
|
package/package.json
CHANGED
package/dist/onboarding/api.d.ts
DELETED