@nangohq/types 0.58.3 → 0.58.5
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.d.ts +1 -1
- package/dist/api.endpoints.d.ts +2 -1
- package/dist/auth/api.d.ts +1 -6
- package/dist/auth/http.api.d.ts +1 -8
- package/dist/deploy/incomingFlow.d.ts +1 -0
- package/dist/environment/api/index.d.ts +3 -1
- package/dist/environment/db.d.ts +2 -2
- package/dist/logs/messages.d.ts +10 -1
- package/dist/plans/db.d.ts +7 -1
- package/dist/plans/http.api.d.ts +14 -1
- package/dist/providers/provider.d.ts +10 -2
- package/dist/team/db.d.ts +0 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface ValidationError {
|
|
|
11
11
|
message: string;
|
|
12
12
|
path: (string | number)[];
|
|
13
13
|
}
|
|
14
|
-
export type ResDefaultErrors = ApiError<'invalid_content_type'> | ApiError<'not_found'> | ApiError<'conflict'> | ApiError<'forbidden'> | ApiError<'invalid_query_params', ValidationError[]> | ApiError<'invalid_headers', ValidationError[]> | ApiError<'invalid_body', ValidationError[]> | ApiError<'invalid_uri_params', ValidationError[]> | ApiError<'feature_disabled'> | ApiError<'generic_error_support', undefined, string> | ApiError<'server_error'> | ApiError<'resource_capped'> | ApiError<'missing_auth_header'> | ApiError<'malformed_auth_header'> | ApiError<'unknown_account'> | ApiError<'unknown_connect_session_token'> | ApiError<'invalid_cli_version'> | ApiError<'invalid_permissions'> | ApiError<'invalid_connect_session_token_format'> | ApiError<'request_too_large'>;
|
|
14
|
+
export type ResDefaultErrors = ApiError<'invalid_content_type'> | ApiError<'not_found'> | ApiError<'conflict'> | ApiError<'plan_limit'> | ApiError<'forbidden'> | ApiError<'invalid_query_params', ValidationError[]> | ApiError<'invalid_headers', ValidationError[]> | ApiError<'invalid_body', ValidationError[]> | ApiError<'invalid_uri_params', ValidationError[]> | ApiError<'feature_disabled'> | ApiError<'generic_error_support', undefined, string> | ApiError<'server_error'> | ApiError<'resource_capped'> | ApiError<'missing_auth_header'> | ApiError<'malformed_auth_header'> | ApiError<'unknown_account'> | ApiError<'unknown_connect_session_token'> | ApiError<'invalid_cli_version'> | ApiError<'invalid_permissions'> | ApiError<'invalid_connect_session_token_format'> | ApiError<'request_too_large'>;
|
|
15
15
|
export type EndpointMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
|
|
16
16
|
/**
|
|
17
17
|
* API Request/Response type
|
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api';
|
|
|
14
14
|
import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api';
|
|
15
15
|
import type { GetMeta } from './meta/api';
|
|
16
16
|
import type { PatchOnboarding } from './onboarding/api';
|
|
17
|
+
import type { PostPlanExtendTrial } from './plans/http.api';
|
|
17
18
|
import type { GetPublicProvider, GetPublicProviders } from './providers/api';
|
|
18
19
|
import type { GetPublicRecords } from './record/api';
|
|
19
20
|
import type { GetPublicScriptsConfig } from './scripts/http.api';
|
|
@@ -22,7 +23,7 @@ import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api';
|
|
|
22
23
|
import type { GetUser, PatchUser } from './user/api';
|
|
23
24
|
import type { PostPublicWebhook } from './webhooks/http.api';
|
|
24
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;
|
|
25
|
-
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | 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;
|
|
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;
|
|
26
27
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
27
28
|
/**
|
|
28
29
|
* Automatically narrow endpoints type with Method + Path
|
package/dist/auth/api.d.ts
CHANGED
|
@@ -131,12 +131,7 @@ export interface TableauCredentials extends CredentialsCommon {
|
|
|
131
131
|
}
|
|
132
132
|
export interface JwtCredentials {
|
|
133
133
|
type: AuthModes['Jwt'];
|
|
134
|
-
|
|
135
|
-
issuerId?: string;
|
|
136
|
-
privateKey: {
|
|
137
|
-
id: string;
|
|
138
|
-
secret: string;
|
|
139
|
-
} | string;
|
|
134
|
+
[key: string]: any;
|
|
140
135
|
token?: string;
|
|
141
136
|
expires_at?: Date | undefined;
|
|
142
137
|
}
|
package/dist/auth/http.api.d.ts
CHANGED
|
@@ -90,14 +90,7 @@ export type PostPublicTableauAuthorization = Endpoint<{
|
|
|
90
90
|
}>;
|
|
91
91
|
export type PostPublicJwtAuthorization = Endpoint<{
|
|
92
92
|
Method: 'POST';
|
|
93
|
-
Body:
|
|
94
|
-
privateKeyId?: string;
|
|
95
|
-
issuerId?: string;
|
|
96
|
-
privateKey: {
|
|
97
|
-
id: string;
|
|
98
|
-
secret: string;
|
|
99
|
-
} | string;
|
|
100
|
-
};
|
|
93
|
+
Body: Record<string, any>;
|
|
101
94
|
Querystring: ConnectionQueryString;
|
|
102
95
|
Params: {
|
|
103
96
|
providerConfigKey: string;
|
|
@@ -44,6 +44,7 @@ export interface PreBuiltFlowConfig {
|
|
|
44
44
|
fileBody?: IncomingScriptFiles;
|
|
45
45
|
endpoints: NangoSyncEndpointV2[];
|
|
46
46
|
input?: NangoModel | LegacySyncModelSchema | undefined;
|
|
47
|
+
version?: string | null;
|
|
47
48
|
}
|
|
48
49
|
export interface CLIDeployFlowConfig {
|
|
49
50
|
type: ScriptTypeLiteral;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiTimestamps, Endpoint } from '../../api';
|
|
1
|
+
import type { ApiError, ApiTimestamps, Endpoint } from '../../api';
|
|
2
2
|
import type { ApiPlan } from '../../plans/http.api';
|
|
3
3
|
import type { DBEnvironment, DBExternalWebhook } from '../db';
|
|
4
4
|
import type { ApiEnvironmentVariable } from '../variable/api';
|
|
@@ -37,6 +37,7 @@ export type PatchEnvironment = Endpoint<{
|
|
|
37
37
|
Method: 'PATCH';
|
|
38
38
|
Path: '/api/v1/environments';
|
|
39
39
|
Body: {
|
|
40
|
+
name?: string | undefined;
|
|
40
41
|
callback_url?: string | undefined;
|
|
41
42
|
hmac_key?: string | undefined;
|
|
42
43
|
hmac_enabled?: boolean | undefined;
|
|
@@ -50,4 +51,5 @@ export type PatchEnvironment = Endpoint<{
|
|
|
50
51
|
Success: {
|
|
51
52
|
data: ApiEnvironment;
|
|
52
53
|
};
|
|
54
|
+
Error: ApiError<'conflict'>;
|
|
53
55
|
}>;
|
package/dist/environment/db.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Timestamps } from '../db';
|
|
1
|
+
import type { Timestamps, TimestampsAndDeletedCorrect } from '../db';
|
|
2
2
|
export interface DBEnvironmentVariable extends Timestamps {
|
|
3
3
|
id: number;
|
|
4
4
|
name: string;
|
|
@@ -7,7 +7,7 @@ export interface DBEnvironmentVariable extends Timestamps {
|
|
|
7
7
|
value_iv: string | null;
|
|
8
8
|
value_tag: string | null;
|
|
9
9
|
}
|
|
10
|
-
export interface DBEnvironment extends
|
|
10
|
+
export interface DBEnvironment extends TimestampsAndDeletedCorrect {
|
|
11
11
|
id: number;
|
|
12
12
|
uuid: string;
|
|
13
13
|
name: string;
|
package/dist/logs/messages.d.ts
CHANGED
|
@@ -93,6 +93,15 @@ export interface MessageRow {
|
|
|
93
93
|
request?: MessageHTTPRequest | undefined;
|
|
94
94
|
response?: MessageHTTPResponse | undefined;
|
|
95
95
|
meta?: MessageMeta | null | undefined;
|
|
96
|
+
persistResults?: {
|
|
97
|
+
model: string;
|
|
98
|
+
added: number;
|
|
99
|
+
addedKeys: string[];
|
|
100
|
+
updated: number;
|
|
101
|
+
updatedKeys: string[];
|
|
102
|
+
deleted: number;
|
|
103
|
+
deleteKeys: string[];
|
|
104
|
+
} | undefined;
|
|
96
105
|
retry?: MessageHTTPRetry | undefined;
|
|
97
106
|
createdAt: string;
|
|
98
107
|
endedAt?: string | undefined;
|
|
@@ -148,7 +157,7 @@ export type OperationRowInsert = Merge<Partial<OperationRow>, Pick<OperationRow,
|
|
|
148
157
|
/**
|
|
149
158
|
* What is required to insert a Message
|
|
150
159
|
*/
|
|
151
|
-
export type MessageRowInsert = Pick<MessageRow, 'type' | 'message' | 'createdAt' | 'level'> & Partial<Omit<MessageRow, 'type' | 'message'>> & {
|
|
160
|
+
export type MessageRowInsert = Pick<MessageRow, 'type' | 'message' | 'createdAt' | 'level'> & Partial<Omit<MessageRow, 'type' | 'message' | 'meta_search'>> & {
|
|
152
161
|
id?: never;
|
|
153
162
|
};
|
|
154
163
|
export type MessageOrOperationRow = MessageRow | OperationRow;
|
package/dist/plans/db.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface DBPlan extends Timestamps {
|
|
|
7
7
|
trial_end_at: Date | null;
|
|
8
8
|
trial_extension_count: number;
|
|
9
9
|
trial_end_notified_at: Date | null;
|
|
10
|
+
trial_expired: boolean | null;
|
|
10
11
|
/**
|
|
11
12
|
* Limit the number of connections with active scripts
|
|
12
13
|
* Set to null to remove limit
|
|
@@ -28,10 +29,15 @@ export interface DBPlan extends Timestamps {
|
|
|
28
29
|
* Enable or disabled sync variant
|
|
29
30
|
* @default false
|
|
30
31
|
*/
|
|
31
|
-
|
|
32
|
+
has_sync_variants: boolean;
|
|
32
33
|
/**
|
|
33
34
|
* Enable or disabled open telemetry export
|
|
34
35
|
* @default false
|
|
35
36
|
*/
|
|
36
37
|
has_otel: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Change the applied rate limit for the public API
|
|
40
|
+
* @default "m"
|
|
41
|
+
*/
|
|
42
|
+
api_rate_limit_size: 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl';
|
|
37
43
|
}
|
package/dist/plans/http.api.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
import type { ReplaceInObject } from '../utils';
|
|
2
|
-
import type { DBPlan } from './db';
|
|
2
|
+
import type { DBPlan } from './db.js';
|
|
3
|
+
import type { Endpoint } from '../api';
|
|
3
4
|
export type ApiPlan = ReplaceInObject<DBPlan, Date, string>;
|
|
5
|
+
export type PostPlanExtendTrial = Endpoint<{
|
|
6
|
+
Method: 'POST';
|
|
7
|
+
Path: '/api/v1/plan/trial/extension';
|
|
8
|
+
Querystring: {
|
|
9
|
+
env: string;
|
|
10
|
+
};
|
|
11
|
+
Success: {
|
|
12
|
+
data: {
|
|
13
|
+
success: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
@@ -53,6 +53,7 @@ export interface BaseProvider {
|
|
|
53
53
|
endpoints: string[];
|
|
54
54
|
base_url_override?: string;
|
|
55
55
|
headers?: Record<string, string>;
|
|
56
|
+
data?: unknown;
|
|
56
57
|
};
|
|
57
58
|
};
|
|
58
59
|
authorization_url?: string;
|
|
@@ -106,13 +107,20 @@ export interface ProviderOAuth1 extends BaseProvider {
|
|
|
106
107
|
}
|
|
107
108
|
export interface ProviderJwt extends BaseProvider {
|
|
108
109
|
auth_mode: 'JWT';
|
|
110
|
+
signature: {
|
|
111
|
+
protocol: 'RSA' | 'HMAC';
|
|
112
|
+
};
|
|
109
113
|
token: {
|
|
114
|
+
signing_key: string;
|
|
110
115
|
expires_in_ms: number;
|
|
111
|
-
|
|
116
|
+
header: {
|
|
112
117
|
alg: string;
|
|
118
|
+
typ?: string;
|
|
113
119
|
};
|
|
114
120
|
payload: {
|
|
115
|
-
aud
|
|
121
|
+
aud?: string;
|
|
122
|
+
iss?: string;
|
|
123
|
+
sub?: string;
|
|
116
124
|
};
|
|
117
125
|
};
|
|
118
126
|
}
|
package/dist/team/db.d.ts
CHANGED