@nangohq/types 0.58.3 → 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 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
@@ -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,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
  }>;
@@ -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;
@@ -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
- has_sync_variant: boolean;
32
+ has_sync_variants: boolean;
32
33
  /**
33
34
  * Enable or disabled open telemetry export
34
35
  * @default false
@@ -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
@@ -3,5 +3,4 @@ export interface DBTeam extends Timestamps {
3
3
  id: number;
4
4
  name: string;
5
5
  uuid: string;
6
- is_capped: boolean;
7
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.58.3",
3
+ "version": "0.58.4",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",