@nangohq/types 0.58.2 → 0.58.4
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/environment/api/index.d.ts +5 -1
- package/dist/logs/messages.d.ts +1 -1
- package/dist/plans/db.d.ts +2 -1
- package/dist/plans/http.api.d.ts +14 -1
- package/dist/team/db.d.ts +0 -1
- package/dist/web/env.d.ts +1 -0
- package/package.json +2 -2
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
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ApiTimestamps, Endpoint } from '../../api';
|
|
1
|
+
import type { ApiError, ApiTimestamps, Endpoint } from '../../api';
|
|
2
|
+
import type { ApiPlan } from '../../plans/http.api';
|
|
2
3
|
import type { DBEnvironment, DBExternalWebhook } from '../db';
|
|
3
4
|
import type { ApiEnvironmentVariable } from '../variable/api';
|
|
4
5
|
import type { Merge } from 'type-fest';
|
|
@@ -20,6 +21,7 @@ export type GetEnvironment = Endpoint<{
|
|
|
20
21
|
Method: 'GET';
|
|
21
22
|
Path: '/api/v1/environments/current';
|
|
22
23
|
Success: {
|
|
24
|
+
plan: ApiPlan | null;
|
|
23
25
|
environmentAndAccount: {
|
|
24
26
|
environment: ApiEnvironment;
|
|
25
27
|
env_variables: ApiEnvironmentVariable[];
|
|
@@ -35,6 +37,7 @@ export type PatchEnvironment = Endpoint<{
|
|
|
35
37
|
Method: 'PATCH';
|
|
36
38
|
Path: '/api/v1/environments';
|
|
37
39
|
Body: {
|
|
40
|
+
name?: string | undefined;
|
|
38
41
|
callback_url?: string | undefined;
|
|
39
42
|
hmac_key?: string | undefined;
|
|
40
43
|
hmac_enabled?: boolean | undefined;
|
|
@@ -48,4 +51,5 @@ export type PatchEnvironment = Endpoint<{
|
|
|
48
51
|
Success: {
|
|
49
52
|
data: ApiEnvironment;
|
|
50
53
|
};
|
|
54
|
+
Error: ApiError<'conflict'>;
|
|
51
55
|
}>;
|
package/dist/logs/messages.d.ts
CHANGED
|
@@ -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' | 'level'> & Partial<Omit<MessageRow, 'type' | 'message'>> & {
|
|
151
|
+
export type MessageRowInsert = Pick<MessageRow, 'type' | 'message' | 'createdAt' | 'level'> & Partial<Omit<MessageRow, 'type' | 'message' | 'meta_search'>> & {
|
|
152
152
|
id?: never;
|
|
153
153
|
};
|
|
154
154
|
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,7 +29,7 @@ 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
|
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
|
+
}>;
|
package/dist/team/db.d.ts
CHANGED
package/dist/web/env.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nangohq/types",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.4",
|
|
4
4
|
"description": "Types used in Nango applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/utils"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"axios": "^1.8.
|
|
15
|
+
"axios": "^1.8.4",
|
|
16
16
|
"json-schema": "0.4.0",
|
|
17
17
|
"type-fest": "4.32.0"
|
|
18
18
|
},
|