@nangohq/types 0.58.5 → 0.58.6
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/api.endpoints.d.ts +4 -4
- package/dist/environment/api/index.d.ts +6 -0
- package/dist/integration/api.d.ts +3 -2
- package/dist/integration/db.d.ts +2 -1
- package/dist/logs/api.d.ts +1 -1
- package/dist/logs/messages.d.ts +3 -0
- package/dist/persist/api.d.ts +1 -1
- package/dist/plans/db.d.ts +6 -0
- package/dist/plans/http.api.d.ts +21 -1
- package/dist/providers/provider.d.ts +19 -3
- package/dist/sync/api.d.ts +15 -0
- package/dist/web/env.d.ts +1 -0
- package/package.json +1 -1
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { DeleteConnectSession, GetConnectSession, PostConnectSessions, Post
|
|
|
5
5
|
import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PostConnectionRefresh } from './connection/api/get';
|
|
6
6
|
import type { SetMetadata, UpdateMetadata } from './connection/api/metadata';
|
|
7
7
|
import type { PostDeploy, PostDeployConfirmation, PostDeployInternal } from './deploy/api';
|
|
8
|
-
import type { PatchEnvironment, PostEnvironment } from './environment/api';
|
|
8
|
+
import type { DeleteEnvironment, PatchEnvironment, PostEnvironment } from './environment/api';
|
|
9
9
|
import type { PatchWebhook } from './environment/api/webhook';
|
|
10
10
|
import type { PostEnvironmentVariables } from './environment/variable/api';
|
|
11
11
|
import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api';
|
|
@@ -18,12 +18,12 @@ import type { PostPlanExtendTrial } from './plans/http.api';
|
|
|
18
18
|
import type { GetPublicProvider, GetPublicProviders } from './providers/api';
|
|
19
19
|
import type { GetPublicRecords } from './record/api';
|
|
20
20
|
import type { GetPublicScriptsConfig } from './scripts/http.api';
|
|
21
|
-
import type { PostPublicTrigger } from './sync/api';
|
|
21
|
+
import type { PostPublicTrigger, PutPublicSyncConnectionFrequency } from './sync/api';
|
|
22
22
|
import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api';
|
|
23
23
|
import type { GetUser, PatchUser } from './user/api';
|
|
24
24
|
import type { PostPublicWebhook } from './webhooks/http.api';
|
|
25
|
-
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | 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;
|
|
26
|
-
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | 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
|
+
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | 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 | PutPublicSyncConnectionFrequency;
|
|
26
|
+
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | 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 | DeleteEnvironment | PatchWebhook | PostEnvironmentVariables;
|
|
27
27
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
28
28
|
/**
|
|
29
29
|
* Automatically narrow endpoints type with Method + Path
|
|
@@ -53,3 +53,9 @@ export type PatchEnvironment = Endpoint<{
|
|
|
53
53
|
};
|
|
54
54
|
Error: ApiError<'conflict'>;
|
|
55
55
|
}>;
|
|
56
|
+
export type DeleteEnvironment = Endpoint<{
|
|
57
|
+
Method: 'DELETE';
|
|
58
|
+
Path: '/api/v1/environments';
|
|
59
|
+
Success: never;
|
|
60
|
+
Error: ApiError<'cannot_delete_prod_environment'>;
|
|
61
|
+
}>;
|
|
@@ -4,9 +4,8 @@ import type { AuthModeType, AuthModes } from '../auth/api';
|
|
|
4
4
|
import type { NangoSyncConfig } from '../flow';
|
|
5
5
|
import type { Provider } from '../providers/provider';
|
|
6
6
|
import type { Merge } from 'type-fest';
|
|
7
|
-
export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' | 'updated_at' | 'unique_key' | 'provider'>, ApiTimestamps> & {
|
|
7
|
+
export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' | 'updated_at' | 'unique_key' | 'provider' | 'display_name'>, ApiTimestamps> & {
|
|
8
8
|
logo: string;
|
|
9
|
-
display_name: string;
|
|
10
9
|
} & ApiPublicIntegrationInclude;
|
|
11
10
|
export interface ApiPublicIntegrationInclude {
|
|
12
11
|
webhook_url?: string | null;
|
|
@@ -72,6 +71,7 @@ export type ApiIntegrationList = ApiIntegration & {
|
|
|
72
71
|
missingFieldsCount: number;
|
|
73
72
|
connectionConfigParams?: string[];
|
|
74
73
|
credentialParams?: string[];
|
|
74
|
+
displayName: string;
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
export type GetIntegrations = Endpoint<{
|
|
@@ -127,6 +127,7 @@ export type PatchIntegration = Endpoint<{
|
|
|
127
127
|
Body: {
|
|
128
128
|
integrationId?: string | undefined;
|
|
129
129
|
webhookSecret?: string | undefined;
|
|
130
|
+
displayName?: string | undefined;
|
|
130
131
|
} | {
|
|
131
132
|
authType: Extract<AuthModeType, 'OAUTH1' | 'OAUTH2' | 'TBA'>;
|
|
132
133
|
clientId: string;
|
package/dist/integration/db.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SetOptional } from 'type-fest';
|
|
2
1
|
import type { TimestampsAndDeleted } from '../db.js';
|
|
3
2
|
import type { NullablePartial } from '../utils.js';
|
|
3
|
+
import type { SetOptional } from 'type-fest';
|
|
4
4
|
export interface IntegrationConfig extends TimestampsAndDeleted {
|
|
5
5
|
id?: number | undefined;
|
|
6
6
|
unique_key: string;
|
|
@@ -14,5 +14,6 @@ export interface IntegrationConfig extends TimestampsAndDeleted {
|
|
|
14
14
|
app_link?: string | null | undefined;
|
|
15
15
|
custom?: Record<string, string> | undefined | null;
|
|
16
16
|
missing_fields: string[];
|
|
17
|
+
display_name: string | null;
|
|
17
18
|
}
|
|
18
19
|
export type DBCreateIntegration = SetOptional<NullablePartial<Omit<IntegrationConfig, 'created_at' | 'updated_at'>>, 'missing_fields'>;
|
package/dist/logs/api.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type Concat<T extends OperationList> = T extends {
|
|
|
5
5
|
action: string;
|
|
6
6
|
} ? `${T['type']}:${T['action']}` : never;
|
|
7
7
|
export type ConcatOperationList = Concat<OperationList>;
|
|
8
|
-
export type ConcatOperationListWithGroup = OperationList[
|
|
8
|
+
export type ConcatOperationListWithGroup = OperationList['type'] | ConcatOperationList;
|
|
9
9
|
export type SearchOperations = Endpoint<{
|
|
10
10
|
Method: 'POST';
|
|
11
11
|
Path: '/api/v1/logs/operations';
|
package/dist/logs/messages.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ export interface MessageRow {
|
|
|
89
89
|
message: string;
|
|
90
90
|
context?: 'script' | 'proxy' | 'webhook' | 'auth' | undefined;
|
|
91
91
|
parentId: string;
|
|
92
|
+
accountId: number;
|
|
92
93
|
error?: MessageError | undefined;
|
|
93
94
|
request?: MessageHTTPRequest | undefined;
|
|
94
95
|
response?: MessageHTTPResponse | undefined;
|
|
@@ -99,6 +100,8 @@ export interface MessageRow {
|
|
|
99
100
|
addedKeys: string[];
|
|
100
101
|
updated: number;
|
|
101
102
|
updatedKeys: string[];
|
|
103
|
+
unchanged: number;
|
|
104
|
+
unchangedKeys: string[];
|
|
102
105
|
deleted: number;
|
|
103
106
|
deleteKeys: string[];
|
|
104
107
|
} | undefined;
|
package/dist/persist/api.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { MessageRowInsert } from '../logs/messages.js';
|
|
|
3
3
|
import type { MergingStrategy, NangoRecord } from '../record/api.js';
|
|
4
4
|
interface LogBody {
|
|
5
5
|
activityLogId: string;
|
|
6
|
-
log: MessageRowInsert
|
|
6
|
+
log: Omit<MessageRowInsert, 'accountId'>;
|
|
7
7
|
}
|
|
8
8
|
export type PostLog = Endpoint<{
|
|
9
9
|
Method: 'POST';
|
package/dist/plans/db.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ export interface DBPlan extends Timestamps {
|
|
|
14
14
|
* @default 3
|
|
15
15
|
*/
|
|
16
16
|
connection_with_scripts_max: number | null;
|
|
17
|
+
/**
|
|
18
|
+
* Limit the number of total non-deleted connections
|
|
19
|
+
* Set to null to remove limit
|
|
20
|
+
* @default null
|
|
21
|
+
*/
|
|
22
|
+
connections_max: number | null;
|
|
17
23
|
/**
|
|
18
24
|
* Limit the number of environments that can be created
|
|
19
25
|
* @default 2
|
package/dist/plans/http.api.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Endpoint } from '../api';
|
|
|
4
4
|
export type ApiPlan = ReplaceInObject<DBPlan, Date, string>;
|
|
5
5
|
export type PostPlanExtendTrial = Endpoint<{
|
|
6
6
|
Method: 'POST';
|
|
7
|
-
Path: '/api/v1/
|
|
7
|
+
Path: '/api/v1/plans/trial/extension';
|
|
8
8
|
Querystring: {
|
|
9
9
|
env: string;
|
|
10
10
|
};
|
|
@@ -14,3 +14,23 @@ export type PostPlanExtendTrial = Endpoint<{
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
}>;
|
|
17
|
+
export interface PlanDefinition {
|
|
18
|
+
code: string;
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
canUpgrade: boolean;
|
|
22
|
+
canDowngrade: false;
|
|
23
|
+
cta?: string;
|
|
24
|
+
hidden?: boolean;
|
|
25
|
+
flags: Omit<Partial<DBPlan>, 'id' | 'account_id'>;
|
|
26
|
+
}
|
|
27
|
+
export type GetPlans = Endpoint<{
|
|
28
|
+
Method: 'GET';
|
|
29
|
+
Path: '/api/v1/plans';
|
|
30
|
+
Querystring: {
|
|
31
|
+
env: string;
|
|
32
|
+
};
|
|
33
|
+
Success: {
|
|
34
|
+
data: PlanDefinition[];
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RetryHeaderConfig, CursorPagination, LinkPagination, OffsetPagination } from '../proxy/api.js';
|
|
2
|
-
import type { AuthModeType, OAuthAuthorizationMethodType, OAuthBodyFormatType } from '../auth/api.js';
|
|
3
1
|
import type { EndpointMethod } from '../api.js';
|
|
2
|
+
import type { AuthModeType, OAuthAuthorizationMethodType, OAuthBodyFormatType } from '../auth/api.js';
|
|
3
|
+
import type { CursorPagination, LinkPagination, OffsetPagination, RetryHeaderConfig } from '../proxy/api.js';
|
|
4
4
|
export interface TokenUrlObject {
|
|
5
5
|
OAUTH1?: string;
|
|
6
6
|
OAUTH2?: string;
|
|
@@ -124,8 +124,23 @@ export interface ProviderJwt extends BaseProvider {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
+
export interface ProviderAppleAppStore extends BaseProvider {
|
|
128
|
+
auth_mode: 'APP_STORE';
|
|
129
|
+
token_url: string;
|
|
130
|
+
}
|
|
131
|
+
export interface ProviderTableau extends BaseProvider {
|
|
132
|
+
auth_mode: 'TABLEAU';
|
|
133
|
+
}
|
|
134
|
+
export interface ProviderBill extends BaseProvider {
|
|
135
|
+
auth_mode: 'BILL';
|
|
136
|
+
}
|
|
137
|
+
export interface ProviderGithubApp extends BaseProvider {
|
|
138
|
+
auth_mode: 'APP';
|
|
139
|
+
token_url: string;
|
|
140
|
+
}
|
|
127
141
|
export interface ProviderTwoStep extends Omit<BaseProvider, 'body_format'> {
|
|
128
142
|
auth_mode: 'TWO_STEP';
|
|
143
|
+
token_request_method?: 'GET';
|
|
129
144
|
token_headers?: Record<string, string>;
|
|
130
145
|
token_response: {
|
|
131
146
|
token: string;
|
|
@@ -137,6 +152,7 @@ export interface ProviderTwoStep extends Omit<BaseProvider, 'body_format'> {
|
|
|
137
152
|
token_params?: Record<string, string>;
|
|
138
153
|
token_headers?: Record<string, string>;
|
|
139
154
|
token_url: string;
|
|
155
|
+
token_request_method?: 'GET';
|
|
140
156
|
}[];
|
|
141
157
|
token_expires_in_ms?: number;
|
|
142
158
|
proxy_header_authorization?: string;
|
|
@@ -154,6 +170,6 @@ export interface ProviderSignature extends BaseProvider {
|
|
|
154
170
|
export interface ProviderApiKey extends BaseProvider {
|
|
155
171
|
auth_mode: 'API_KEY';
|
|
156
172
|
}
|
|
157
|
-
export type Provider = BaseProvider | ProviderOAuth1 | ProviderOAuth2 | ProviderJwt | ProviderTwoStep | ProviderSignature | ProviderApiKey;
|
|
173
|
+
export type Provider = BaseProvider | ProviderOAuth1 | ProviderOAuth2 | ProviderJwt | ProviderTwoStep | ProviderSignature | ProviderApiKey | ProviderTableau | ProviderBill | ProviderGithubApp | ProviderAppleAppStore;
|
|
158
174
|
export type RefreshableProvider = ProviderTwoStep | ProviderJwt | ProviderSignature | ProviderOAuth2;
|
|
159
175
|
export type TestableProvider = ProviderApiKey;
|
package/dist/sync/api.d.ts
CHANGED
|
@@ -55,3 +55,18 @@ export type DeleteSyncVariant = Endpoint<{
|
|
|
55
55
|
success: boolean;
|
|
56
56
|
};
|
|
57
57
|
}>;
|
|
58
|
+
export type PutPublicSyncConnectionFrequency = Endpoint<{
|
|
59
|
+
Method: 'PUT';
|
|
60
|
+
Path: '/sync/update-connection-frequency';
|
|
61
|
+
Body: {
|
|
62
|
+
sync_name: string;
|
|
63
|
+
sync_variant?: string | undefined;
|
|
64
|
+
provider_config_key: string;
|
|
65
|
+
connection_id: string;
|
|
66
|
+
frequency: string | null;
|
|
67
|
+
};
|
|
68
|
+
Success: {
|
|
69
|
+
frequency: string;
|
|
70
|
+
};
|
|
71
|
+
Error: ApiError<'unknown_connection' | 'unknown_sync'>;
|
|
72
|
+
}>;
|
package/dist/web/env.d.ts
CHANGED