@nangohq/types 0.58.1 → 0.58.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/index.d.ts CHANGED
@@ -44,6 +44,8 @@ export type * from './connect/session.js';
44
44
  export type * from './endUser/index.js';
45
45
  export type * from './runner/index.js';
46
46
  export type * from './runner/sdk.js';
47
+ export type * from './plans/db.js';
48
+ export type * from './plans/http.api.js';
47
49
  export type * from './nangoYaml/index.js';
48
50
  export type * from './environment/db.js';
49
51
  export type * from './environment/api/index.js';
@@ -1,9 +1,9 @@
1
- import type { Merge } from 'type-fest';
2
1
  import type { ApiTimestamps, Endpoint } from '../api';
3
2
  import type { IntegrationConfig } from './db';
4
- import type { Provider } from '../providers/provider';
5
3
  import type { AuthModeType, AuthModes } from '../auth/api';
6
4
  import type { NangoSyncConfig } from '../flow';
5
+ import type { Provider } from '../providers/provider';
6
+ import type { Merge } from 'type-fest';
7
7
  export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' | 'updated_at' | 'unique_key' | 'provider'>, ApiTimestamps> & {
8
8
  logo: string;
9
9
  display_name: string;
@@ -63,11 +63,22 @@ export type DeletePublicIntegration = Endpoint<{
63
63
  };
64
64
  }>;
65
65
  export type ApiIntegration = Omit<Merge<IntegrationConfig, ApiTimestamps>, 'oauth_client_secret_iv' | 'oauth_client_secret_tag'>;
66
+ export type ApiIntegrationList = ApiIntegration & {
67
+ meta: {
68
+ authMode: AuthModeType;
69
+ scriptsCount: number;
70
+ connectionCount: number;
71
+ creationDate: string;
72
+ missingFieldsCount: number;
73
+ connectionConfigParams?: string[];
74
+ credentialParams?: string[];
75
+ };
76
+ };
66
77
  export type GetIntegrations = Endpoint<{
67
78
  Method: 'GET';
68
79
  Path: '/api/v1/integrations';
69
80
  Success: {
70
- data: ApiIntegration[];
81
+ data: ApiIntegrationList[];
71
82
  };
72
83
  }>;
73
84
  export type PostIntegration = Endpoint<{
@@ -0,0 +1,37 @@
1
+ import type { Timestamps } from '../db';
2
+ export interface DBPlan extends Timestamps {
3
+ id: number;
4
+ account_id: number;
5
+ name: string;
6
+ trial_start_at: Date | null;
7
+ trial_end_at: Date | null;
8
+ trial_extension_count: number;
9
+ trial_end_notified_at: Date | null;
10
+ /**
11
+ * Limit the number of connections with active scripts
12
+ * Set to null to remove limit
13
+ * @default 3
14
+ */
15
+ connection_with_scripts_max: number | null;
16
+ /**
17
+ * Limit the number of environments that can be created
18
+ * @default 2
19
+ */
20
+ environments_max: number;
21
+ /**
22
+ * Limit the minimum frequency of a sync
23
+ * Not used yet
24
+ * @default 86400
25
+ */
26
+ sync_frequency_secs_min: number;
27
+ /**
28
+ * Enable or disabled sync variant
29
+ * @default false
30
+ */
31
+ has_sync_variant: boolean;
32
+ /**
33
+ * Enable or disabled open telemetry export
34
+ * @default false
35
+ */
36
+ has_otel: boolean;
37
+ }
@@ -0,0 +1,3 @@
1
+ import type { ReplaceInObject } from '../utils';
2
+ import type { DBPlan } from './db';
3
+ export type ApiPlan = ReplaceInObject<DBPlan, Date, string>;
@@ -1,8 +1,8 @@
1
- import type { Merge } from 'type-fest';
2
1
  import type { ApiError, ApiTimestamps, Endpoint } from '../api';
2
+ import type { DBTeam } from './db';
3
3
  import type { DBInvitation } from '../invitations/db';
4
4
  import type { ApiUser } from '../user/api';
5
- import type { DBTeam } from './db';
5
+ import type { Merge } from 'type-fest';
6
6
  export type GetTeam = Endpoint<{
7
7
  Method: 'GET';
8
8
  Path: '/api/v1/team';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.58.1",
3
+ "version": "0.58.2",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",