@nangohq/types 0.65.0 → 0.66.0
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/connect/api.d.ts +4 -0
- package/dist/connect/session.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/integration/api.d.ts +2 -1
- package/dist/plans/db.d.ts +5 -0
- package/dist/plans/http.api.d.ts +2 -7
- package/dist/sharedCredentials/db.d.ts +13 -0
- package/dist/usage/dto.d.ts +8 -0
- package/package.json +1 -1
package/dist/connect/api.d.ts
CHANGED
|
@@ -18,6 +18,9 @@ export interface ConnectSessionInput {
|
|
|
18
18
|
id: string;
|
|
19
19
|
display_name?: string | undefined;
|
|
20
20
|
} | undefined;
|
|
21
|
+
overrides?: Record<string, {
|
|
22
|
+
docs_connect?: string | undefined;
|
|
23
|
+
}> | undefined;
|
|
21
24
|
}
|
|
22
25
|
export type ConnectSessionOutput = ConnectSessionInput & {
|
|
23
26
|
isReconnecting?: boolean;
|
|
@@ -42,6 +45,7 @@ export type PostPublicConnectSessionsReconnect = Endpoint<{
|
|
|
42
45
|
integrations_config_defaults?: ConnectSessionInput['integrations_config_defaults'];
|
|
43
46
|
end_user?: ConnectSessionInput['end_user'] | undefined;
|
|
44
47
|
organization?: ConnectSessionInput['organization'];
|
|
48
|
+
overrides?: ConnectSessionInput['overrides'];
|
|
45
49
|
};
|
|
46
50
|
Success: {
|
|
47
51
|
data: {
|
|
@@ -7,6 +7,7 @@ export interface ConnectSession {
|
|
|
7
7
|
readonly operationId: string | null;
|
|
8
8
|
readonly allowedIntegrations: string[] | null;
|
|
9
9
|
readonly integrationsConfigDefaults: Record<string, ConnectSessionIntegrationConfigDefaults> | null;
|
|
10
|
+
readonly overrides: Record<string, ConnectSessionOverrides> | null;
|
|
10
11
|
readonly createdAt: Date;
|
|
11
12
|
readonly updatedAt: Date | null;
|
|
12
13
|
}
|
|
@@ -19,3 +20,6 @@ export interface ConnectSessionIntegrationConfigDefaults {
|
|
|
19
20
|
oauth_scopes_override?: string | undefined;
|
|
20
21
|
} | undefined;
|
|
21
22
|
}
|
|
23
|
+
export interface ConnectSessionOverrides {
|
|
24
|
+
docs_connect?: string | undefined;
|
|
25
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export type * from './syncConfigs/db.js';
|
|
|
21
21
|
export type * from './syncConfigs/api.js';
|
|
22
22
|
export type * from './team/api.js';
|
|
23
23
|
export type * from './team/db.js';
|
|
24
|
+
export type * from './sharedCredentials/db.js';
|
|
24
25
|
export type * from './billing/types.js';
|
|
25
26
|
export type * from './billing/http.api.js';
|
|
26
27
|
export type * from './usage/dto.js';
|
|
@@ -84,7 +84,7 @@ export type DeletePublicIntegration = Endpoint<{
|
|
|
84
84
|
success: true;
|
|
85
85
|
};
|
|
86
86
|
}>;
|
|
87
|
-
export type ApiIntegration = Omit<Merge<IntegrationConfig, ApiTimestamps>, 'oauth_client_secret_iv' | 'oauth_client_secret_tag'
|
|
87
|
+
export type ApiIntegration = Omit<Merge<IntegrationConfig, ApiTimestamps>, 'oauth_client_secret_iv' | 'oauth_client_secret_tag'>;
|
|
88
88
|
export type ApiIntegrationList = ApiIntegration & {
|
|
89
89
|
meta: {
|
|
90
90
|
authMode: AuthModeType;
|
|
@@ -114,6 +114,7 @@ export type PostIntegration = Endpoint<{
|
|
|
114
114
|
};
|
|
115
115
|
Body: {
|
|
116
116
|
provider: string;
|
|
117
|
+
useSharedCredentials: boolean;
|
|
117
118
|
};
|
|
118
119
|
Success: {
|
|
119
120
|
data: ApiIntegration;
|
package/dist/plans/db.d.ts
CHANGED
|
@@ -71,4 +71,9 @@ export interface DBPlan extends Timestamps {
|
|
|
71
71
|
* @default false
|
|
72
72
|
*/
|
|
73
73
|
has_webhooks_forward: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Enable or disable the ability to override the docs connect url from the connect session
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
can_override_docs_connect_url: boolean;
|
|
74
79
|
}
|
package/dist/plans/http.api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BillingCustomer, BillingUsageMetric } from '../billing/types.js';
|
|
2
|
+
import type { AccountMetricsUsageSummary } from '../usage/dto.js';
|
|
2
3
|
import type { ReplaceInObject } from '../utils.js';
|
|
3
4
|
import type { DBPlan } from './db.js';
|
|
4
5
|
import type { Endpoint } from '../api.js';
|
|
@@ -60,12 +61,6 @@ export type GetPlan = Endpoint<{
|
|
|
60
61
|
data: ApiPlan;
|
|
61
62
|
};
|
|
62
63
|
}>;
|
|
63
|
-
export interface MetricUsage {
|
|
64
|
-
metric: string;
|
|
65
|
-
label: string;
|
|
66
|
-
usage: number;
|
|
67
|
-
limit: number | null;
|
|
68
|
-
}
|
|
69
64
|
export type GetUsage = Endpoint<{
|
|
70
65
|
Method: 'GET';
|
|
71
66
|
Path: '/api/v1/plans/usage';
|
|
@@ -73,7 +68,7 @@ export type GetUsage = Endpoint<{
|
|
|
73
68
|
env: string;
|
|
74
69
|
};
|
|
75
70
|
Success: {
|
|
76
|
-
data:
|
|
71
|
+
data: AccountMetricsUsageSummary;
|
|
77
72
|
};
|
|
78
73
|
}>;
|
|
79
74
|
export type GetBillingUsage = Endpoint<{
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Timestamps } from '../db.js';
|
|
2
|
+
export interface SharedCredentials {
|
|
3
|
+
oauth_client_id: string;
|
|
4
|
+
oauth_client_secret: string;
|
|
5
|
+
oauth_scopes?: string;
|
|
6
|
+
oauth_client_secret_iv: string;
|
|
7
|
+
oauth_client_secret_tag: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DBSharedCredentials extends Timestamps {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
credentials: SharedCredentials;
|
|
13
|
+
}
|
package/dist/usage/dto.d.ts
CHANGED
|
@@ -9,3 +9,11 @@ export interface UpdateAccountUsageDto {
|
|
|
9
9
|
actions?: DBAccountUsage['actions'];
|
|
10
10
|
activeRecords?: DBAccountUsage['active_records'];
|
|
11
11
|
}
|
|
12
|
+
export type AccountUsageIncrementableMetric = 'actions' | 'active_records';
|
|
13
|
+
export type AccountUsageMetric = AccountUsageIncrementableMetric | 'connections';
|
|
14
|
+
export type AccountMetricsUsageSummary = Record<AccountUsageMetric, MetricUsageSummary>;
|
|
15
|
+
export interface MetricUsageSummary {
|
|
16
|
+
label: string;
|
|
17
|
+
usage: number;
|
|
18
|
+
limit: number | null;
|
|
19
|
+
}
|