@nangohq/types 0.71.2 → 0.71.3
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/account/api.d.ts +73 -19
- package/dist/action/api.d.ts +21 -5
- package/dist/admin/http.api.d.ts +8 -2
- package/dist/api.d.ts +7 -0
- package/dist/api.endpoints.d.ts +6 -5
- package/dist/audit-trail/api.d.ts +39 -0
- package/dist/audit-trail/event.d.ts +54 -0
- package/dist/auth/api.d.ts +2 -10
- package/dist/auth/http.api.d.ts +50 -26
- package/dist/authz/types.d.ts +1 -1
- package/dist/billing/http.api.d.ts +6 -2
- package/dist/cli/api.d.ts +6 -2
- package/dist/clientMetadata/http.api.d.ts +6 -2
- package/dist/connect/api.d.ts +36 -7
- package/dist/connectUISettings/api.d.ts +11 -3
- package/dist/connection/api/get.d.ts +39 -12
- package/dist/connection/api/metadata.d.ts +8 -4
- package/dist/db.d.ts +5 -0
- package/dist/deploy/api.d.ts +14 -4
- package/dist/environment/api/index.d.ts +34 -11
- package/dist/environment/api/otlp.d.ts +6 -2
- package/dist/environment/api/webhook.d.ts +4 -2
- package/dist/environment/variable/api.d.ts +4 -2
- package/dist/flow/http.api.d.ts +17 -7
- package/dist/function/db.d.ts +40 -0
- package/dist/functions/api.d.ts +73 -17
- package/dist/functions/config.d.ts +58 -0
- package/dist/gettingStarted/api.d.ts +11 -3
- package/dist/index.d.ts +4 -0
- package/dist/integration/api.d.ts +51 -15
- package/dist/invitations/api.d.ts +15 -6
- package/dist/logs/api.d.ts +26 -6
- package/dist/mcp/api.d.ts +21 -5
- package/dist/meta/api.d.ts +7 -2
- package/dist/mfa/api.d.ts +35 -6
- package/dist/plain/api.d.ts +6 -2
- package/dist/plans/http.api.d.ts +33 -9
- package/dist/providers/api.d.ts +21 -5
- package/dist/providers/provider.d.ts +4 -7
- package/dist/proxy/http.api.d.ts +6 -2
- package/dist/pubsub/events.d.ts +3 -1
- package/dist/record/api.d.ts +21 -5
- package/dist/scripts/http.api.d.ts +6 -2
- package/dist/stripe/http.api.d.ts +16 -5
- package/dist/sync/api.d.ts +22 -8
- package/dist/team/api.d.ts +18 -6
- package/dist/user/api.d.ts +11 -4
- package/dist/webhooks/http.api.d.ts +6 -2
- package/package.json +1 -1
package/dist/mfa/api.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
|
+
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
3
|
+
import type { ApiUser } from '../user/api.js';
|
|
2
4
|
type MFAError = ApiError<'invalid_mfa_code'> | ApiError<'mfa_already_enabled'> | ApiError<'mfa_enrollment_not_found'> | ApiError<'mfa_not_enabled'>;
|
|
3
|
-
export type GetMFAStatus =
|
|
5
|
+
export type GetMFAStatus = ApiEndpoint<{
|
|
6
|
+
Audit: {
|
|
7
|
+
kind: 'no-audit';
|
|
8
|
+
reason: 'non-auditable';
|
|
9
|
+
};
|
|
4
10
|
Method: 'GET';
|
|
5
11
|
Path: '/api/v1/account/mfa';
|
|
6
12
|
Success: {
|
|
@@ -9,7 +15,8 @@ export type GetMFAStatus = Endpoint<{
|
|
|
9
15
|
};
|
|
10
16
|
};
|
|
11
17
|
}>;
|
|
12
|
-
export type PostMFAEnrollment =
|
|
18
|
+
export type PostMFAEnrollment = ApiEndpoint<{
|
|
19
|
+
Audit: AuditPolicy<'mfa', 'enrolled', 'account'>;
|
|
13
20
|
Method: 'POST';
|
|
14
21
|
Path: '/api/v1/account/mfa/enroll';
|
|
15
22
|
Error: ApiError<'mfa_already_enabled'>;
|
|
@@ -19,7 +26,8 @@ export type PostMFAEnrollment = Endpoint<{
|
|
|
19
26
|
};
|
|
20
27
|
};
|
|
21
28
|
}>;
|
|
22
|
-
export type PostMFAActivation =
|
|
29
|
+
export type PostMFAActivation = ApiEndpoint<{
|
|
30
|
+
Audit: AuditPolicy<'mfa', 'enabled', 'account'>;
|
|
23
31
|
Method: 'POST';
|
|
24
32
|
Path: '/api/v1/account/mfa/activate';
|
|
25
33
|
Body: {
|
|
@@ -32,7 +40,8 @@ export type PostMFAActivation = Endpoint<{
|
|
|
32
40
|
};
|
|
33
41
|
};
|
|
34
42
|
}>;
|
|
35
|
-
export type PostMFARecoveryCodes =
|
|
43
|
+
export type PostMFARecoveryCodes = ApiEndpoint<{
|
|
44
|
+
Audit: AuditPolicy<'mfa', 'recovery_regenerated', 'account'>;
|
|
36
45
|
Method: 'POST';
|
|
37
46
|
Path: '/api/v1/account/mfa/recovery-codes';
|
|
38
47
|
Body: {
|
|
@@ -45,7 +54,8 @@ export type PostMFARecoveryCodes = Endpoint<{
|
|
|
45
54
|
};
|
|
46
55
|
};
|
|
47
56
|
}>;
|
|
48
|
-
export type DeleteMFA =
|
|
57
|
+
export type DeleteMFA = ApiEndpoint<{
|
|
58
|
+
Audit: AuditPolicy<'mfa', 'disabled', 'account'>;
|
|
49
59
|
Method: 'DELETE';
|
|
50
60
|
Path: '/api/v1/account/mfa';
|
|
51
61
|
Body: {
|
|
@@ -57,4 +67,23 @@ export type DeleteMFA = Endpoint<{
|
|
|
57
67
|
};
|
|
58
68
|
}>;
|
|
59
69
|
export type MFAEndpointError = MFAError;
|
|
70
|
+
export type PostMFALoginVerification = ApiEndpoint<{
|
|
71
|
+
Audit: AuditPolicy<'mfa', 'verified', 'account'>;
|
|
72
|
+
Method: 'POST';
|
|
73
|
+
Path: '/api/v1/account/mfa/login/verify';
|
|
74
|
+
Body: {
|
|
75
|
+
type: 'code';
|
|
76
|
+
code: string;
|
|
77
|
+
} | {
|
|
78
|
+
type: 'recoveryCode';
|
|
79
|
+
recoveryCode: string;
|
|
80
|
+
};
|
|
81
|
+
Error: ApiError<'invalid_mfa_code'> | ApiError<'mfa_login_expired'>;
|
|
82
|
+
Success: {
|
|
83
|
+
data: {
|
|
84
|
+
user: ApiUser;
|
|
85
|
+
url: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
60
89
|
export {};
|
package/dist/plain/api.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type GetPlainHmac =
|
|
1
|
+
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
|
+
export type GetPlainHmac = ApiEndpoint<{
|
|
3
|
+
Audit: {
|
|
4
|
+
kind: 'no-audit';
|
|
5
|
+
reason: 'non-auditable';
|
|
6
|
+
};
|
|
3
7
|
Method: 'GET';
|
|
4
8
|
Path: `/api/v1/plain`;
|
|
5
9
|
Success: {
|
package/dist/plans/http.api.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint } from '../api.js';
|
|
2
|
+
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
2
3
|
import type { ApiBillingUsageMetrics, BillingCustomer, BillingInvoicingDetails, BreakdownDimensions } from '../billing/types.js';
|
|
3
4
|
import type { MetricUsageSummary, UsageMetric } from '../usage/index.js';
|
|
4
5
|
import type { ReplaceInObject } from '../utils.js';
|
|
5
6
|
import type { DBPlan } from './db.js';
|
|
6
7
|
export type ApiPlan = ReplaceInObject<DBPlan, Date, string>;
|
|
7
|
-
export type PostPlanExtendTrial =
|
|
8
|
+
export type PostPlanExtendTrial = ApiEndpoint<{
|
|
9
|
+
Audit: AuditPolicy<'billing', 'trial_extended', 'account'>;
|
|
8
10
|
Method: 'POST';
|
|
9
11
|
Path: '/api/v1/plans/trial/extension';
|
|
10
12
|
Querystring: {
|
|
@@ -31,7 +33,11 @@ export interface PlanDefinition {
|
|
|
31
33
|
hidden?: boolean;
|
|
32
34
|
flags: Omit<Partial<DBPlan>, 'id' | 'account_id' | 'name'>;
|
|
33
35
|
}
|
|
34
|
-
export type GetPlans =
|
|
36
|
+
export type GetPlans = ApiEndpoint<{
|
|
37
|
+
Audit: {
|
|
38
|
+
kind: 'no-audit';
|
|
39
|
+
reason: 'non-auditable';
|
|
40
|
+
};
|
|
35
41
|
Method: 'GET';
|
|
36
42
|
Path: '/api/v1/plans';
|
|
37
43
|
Querystring: {
|
|
@@ -41,7 +47,11 @@ export type GetPlans = Endpoint<{
|
|
|
41
47
|
data: PlanDefinition[];
|
|
42
48
|
};
|
|
43
49
|
}>;
|
|
44
|
-
export type GetPlan =
|
|
50
|
+
export type GetPlan = ApiEndpoint<{
|
|
51
|
+
Audit: {
|
|
52
|
+
kind: 'no-audit';
|
|
53
|
+
reason: 'non-auditable';
|
|
54
|
+
};
|
|
45
55
|
Method: 'GET';
|
|
46
56
|
Path: '/api/v1/plans/current';
|
|
47
57
|
Querystring: {
|
|
@@ -51,7 +61,11 @@ export type GetPlan = Endpoint<{
|
|
|
51
61
|
data: ApiPlan;
|
|
52
62
|
};
|
|
53
63
|
}>;
|
|
54
|
-
export type GetUsage =
|
|
64
|
+
export type GetUsage = ApiEndpoint<{
|
|
65
|
+
Audit: {
|
|
66
|
+
kind: 'no-audit';
|
|
67
|
+
reason: 'non-auditable';
|
|
68
|
+
};
|
|
55
69
|
Method: 'GET';
|
|
56
70
|
Path: '/api/v1/plans/usage';
|
|
57
71
|
Querystring: {
|
|
@@ -61,7 +75,11 @@ export type GetUsage = Endpoint<{
|
|
|
61
75
|
data: Record<UsageMetric, MetricUsageSummary>;
|
|
62
76
|
};
|
|
63
77
|
}>;
|
|
64
|
-
export type GetBillingUsageTopDimensionValues =
|
|
78
|
+
export type GetBillingUsageTopDimensionValues = ApiEndpoint<{
|
|
79
|
+
Audit: {
|
|
80
|
+
kind: 'no-audit';
|
|
81
|
+
reason: 'non-auditable';
|
|
82
|
+
};
|
|
65
83
|
Method: 'GET';
|
|
66
84
|
Path: '/api/v1/plans/billing-usage/top-dimension-values';
|
|
67
85
|
Querystring: {
|
|
@@ -89,7 +107,11 @@ export type GetBillingUsageTopDimensionValues = Endpoint<{
|
|
|
89
107
|
};
|
|
90
108
|
};
|
|
91
109
|
}>;
|
|
92
|
-
export type GetBillingUsage =
|
|
110
|
+
export type GetBillingUsage = ApiEndpoint<{
|
|
111
|
+
Audit: {
|
|
112
|
+
kind: 'no-audit';
|
|
113
|
+
reason: 'non-auditable';
|
|
114
|
+
};
|
|
93
115
|
Method: 'GET';
|
|
94
116
|
Path: '/api/v1/plans/billing-usage';
|
|
95
117
|
Querystring: {
|
|
@@ -112,7 +134,8 @@ export type GetBillingUsage = Endpoint<{
|
|
|
112
134
|
};
|
|
113
135
|
};
|
|
114
136
|
}>;
|
|
115
|
-
export type PutBillingInvoicingDetails =
|
|
137
|
+
export type PutBillingInvoicingDetails = ApiEndpoint<{
|
|
138
|
+
Audit: AuditPolicy<'billing', 'details_changed', 'account'>;
|
|
116
139
|
Method: 'PUT';
|
|
117
140
|
Path: '/api/v1/plans/billing/invoicing';
|
|
118
141
|
Querystring: {
|
|
@@ -123,7 +146,8 @@ export type PutBillingInvoicingDetails = Endpoint<{
|
|
|
123
146
|
data: BillingCustomer;
|
|
124
147
|
};
|
|
125
148
|
}>;
|
|
126
|
-
export type PostPlanChange =
|
|
149
|
+
export type PostPlanChange = ApiEndpoint<{
|
|
150
|
+
Audit: AuditPolicy<'billing', 'plan_changed', 'account'>;
|
|
127
151
|
Method: 'POST';
|
|
128
152
|
Path: '/api/v1/plans/change';
|
|
129
153
|
Querystring: {
|
package/dist/providers/api.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint } from '../api.js';
|
|
2
2
|
import type { AuthModeType } from '../auth/api.js';
|
|
3
3
|
import type { McpOAuth2ClientRegistration, Provider, SimplifiedJSONSchema } from './provider.js';
|
|
4
|
-
export type GetPublicProviders =
|
|
4
|
+
export type GetPublicProviders = ApiEndpoint<{
|
|
5
|
+
Audit: {
|
|
6
|
+
kind: 'no-audit';
|
|
7
|
+
reason: 'non-auditable';
|
|
8
|
+
};
|
|
5
9
|
Method: 'GET';
|
|
6
10
|
Path: `/providers`;
|
|
7
11
|
Querystring: {
|
|
@@ -16,7 +20,11 @@ export type ApiProvider = Provider & {
|
|
|
16
20
|
name: string;
|
|
17
21
|
logo_url: string;
|
|
18
22
|
};
|
|
19
|
-
export type GetPublicProvider =
|
|
23
|
+
export type GetPublicProvider = ApiEndpoint<{
|
|
24
|
+
Audit: {
|
|
25
|
+
kind: 'no-audit';
|
|
26
|
+
reason: 'non-auditable';
|
|
27
|
+
};
|
|
20
28
|
Method: 'GET';
|
|
21
29
|
Path: `/providers/:provider`;
|
|
22
30
|
Params: {
|
|
@@ -43,14 +51,22 @@ export interface ApiProviderListItem {
|
|
|
43
51
|
clientRegistration?: McpOAuth2ClientRegistration;
|
|
44
52
|
integration_config?: Record<string, SimplifiedJSONSchema> | undefined;
|
|
45
53
|
}
|
|
46
|
-
export type GetProviders =
|
|
54
|
+
export type GetProviders = ApiEndpoint<{
|
|
55
|
+
Audit: {
|
|
56
|
+
kind: 'no-audit';
|
|
57
|
+
reason: 'non-auditable';
|
|
58
|
+
};
|
|
47
59
|
Method: 'GET';
|
|
48
60
|
Path: '/api/v1/providers';
|
|
49
61
|
Success: {
|
|
50
62
|
data: ApiProviderListItem[];
|
|
51
63
|
};
|
|
52
64
|
}>;
|
|
53
|
-
export type GetProvider =
|
|
65
|
+
export type GetProvider = ApiEndpoint<{
|
|
66
|
+
Audit: {
|
|
67
|
+
kind: 'no-audit';
|
|
68
|
+
reason: 'non-auditable';
|
|
69
|
+
};
|
|
54
70
|
Method: 'GET';
|
|
55
71
|
Path: '/api/v1/providers/:providerConfigKey';
|
|
56
72
|
Params: {
|
|
@@ -7,7 +7,6 @@ export interface TokenUrlObject {
|
|
|
7
7
|
OAUTH2CC?: string;
|
|
8
8
|
BASIC?: string;
|
|
9
9
|
API_KEY?: string;
|
|
10
|
-
APP_STORE?: string;
|
|
11
10
|
CUSTOM?: string;
|
|
12
11
|
APP?: string;
|
|
13
12
|
NONE?: string;
|
|
@@ -146,7 +145,7 @@ export interface ProviderMcpOAuth2Generic extends Omit<BaseProvider, 'body_forma
|
|
|
146
145
|
export interface ProviderJwt extends BaseProvider {
|
|
147
146
|
auth_mode: 'JWT';
|
|
148
147
|
signature: {
|
|
149
|
-
protocol: 'RSA' | 'HMAC';
|
|
148
|
+
protocol: 'RSA' | 'HMAC' | 'EC';
|
|
150
149
|
hmac_secret_encoding?: 'hex' | 'utf8';
|
|
151
150
|
};
|
|
152
151
|
token: {
|
|
@@ -155,18 +154,16 @@ export interface ProviderJwt extends BaseProvider {
|
|
|
155
154
|
header: {
|
|
156
155
|
alg: string;
|
|
157
156
|
typ?: string;
|
|
157
|
+
kid?: string;
|
|
158
158
|
};
|
|
159
159
|
payload: {
|
|
160
160
|
aud?: string;
|
|
161
161
|
iss?: string;
|
|
162
162
|
sub?: string;
|
|
163
|
+
scope?: string | string[];
|
|
163
164
|
};
|
|
164
165
|
};
|
|
165
166
|
}
|
|
166
|
-
export interface ProviderAppleAppStore extends BaseProvider {
|
|
167
|
-
auth_mode: 'APP_STORE';
|
|
168
|
-
token_url: string;
|
|
169
|
-
}
|
|
170
167
|
export interface ProviderBill extends BaseProvider {
|
|
171
168
|
auth_mode: 'BILL';
|
|
172
169
|
}
|
|
@@ -248,6 +245,6 @@ export interface ProviderInstallPlugin extends BaseProvider {
|
|
|
248
245
|
auth_mode: 'INSTALL_PLUGIN';
|
|
249
246
|
auth_type: 'BASIC';
|
|
250
247
|
}
|
|
251
|
-
export type Provider = BaseProvider | ProviderOAuth1 | ProviderOAuth2 | ProviderJwt | ProviderTwoStep | ProviderSignature | ProviderAwsSigV4 | ProviderApiKey | ProviderBill | ProviderGithubApp |
|
|
248
|
+
export type Provider = BaseProvider | ProviderOAuth1 | ProviderOAuth2 | ProviderJwt | ProviderTwoStep | ProviderSignature | ProviderAwsSigV4 | ProviderApiKey | ProviderBill | ProviderGithubApp | ProviderCustom | ProviderMcpOAUTH2 | ProviderMcpOAuth2Generic | ProviderInstallPlugin;
|
|
252
249
|
export type RefreshableProvider = ProviderTwoStep | ProviderJwt | ProviderSignature | ProviderOAuth2 | ProviderMcpOAuth2Generic | ProviderAwsSigV4;
|
|
253
250
|
export type TestableProvider = ProviderApiKey;
|
package/dist/proxy/http.api.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type AllPublicProxy =
|
|
1
|
+
import type { ApiEndpoint } from '../api.js';
|
|
2
|
+
export type AllPublicProxy = ApiEndpoint<{
|
|
3
|
+
Audit: {
|
|
4
|
+
kind: 'no-audit';
|
|
5
|
+
reason: 'non-auditable';
|
|
6
|
+
};
|
|
3
7
|
Method: 'GET';
|
|
4
8
|
Path: `/proxy/:anyPath`;
|
|
5
9
|
Params: any;
|
package/dist/pubsub/events.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SerializedAuditEvent } from '../audit-trail/event.js';
|
|
1
2
|
import type { FunctionRuntime } from '../runner/sdk.js';
|
|
2
3
|
import type { DBTeam } from '../team/db.js';
|
|
3
4
|
import type { DBUser } from '../user/db.js';
|
|
@@ -18,7 +19,8 @@ export type LambdaKeepWarmInvokeEvent = EventBase<'lambda_keep_warm', 'lambda_ke
|
|
|
18
19
|
environmentId: number;
|
|
19
20
|
provisionedConcurrency: number;
|
|
20
21
|
}>;
|
|
21
|
-
export type Event = EnforceEventBase<UserCreatedEvent | UsageEvent | TeamUpdatedEvent | LambdaKeepWarmInvokeEvent>;
|
|
22
|
+
export type Event = EnforceEventBase<UserCreatedEvent | UsageEvent | TeamUpdatedEvent | LambdaKeepWarmInvokeEvent | AuditRecordedEvent>;
|
|
23
|
+
export type AuditRecordedEvent = EventBase<'audit', 'audit.recorded', SerializedAuditEvent>;
|
|
22
24
|
export type UserCreatedEvent = EventBase<'user', 'user.created', {
|
|
23
25
|
userId: DBUser['id'];
|
|
24
26
|
teamId: DBTeam['id'];
|
package/dist/record/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
2
|
export type RecordLastAction = 'ADDED' | 'UPDATED' | 'DELETED' | 'added' | 'updated' | 'deleted';
|
|
3
3
|
export type CombinedFilterAction = `${RecordLastAction},${RecordLastAction}`;
|
|
4
4
|
export interface RecordMetadata {
|
|
@@ -21,7 +21,11 @@ export type MergingStrategy = {
|
|
|
21
21
|
cursor?: string | undefined;
|
|
22
22
|
};
|
|
23
23
|
export type CursorOffset = 'first' | 'last';
|
|
24
|
-
export type GetPublicRecords =
|
|
24
|
+
export type GetPublicRecords = ApiEndpoint<{
|
|
25
|
+
Audit: {
|
|
26
|
+
kind: 'no-audit';
|
|
27
|
+
reason: 'non-auditable';
|
|
28
|
+
};
|
|
25
29
|
Method: 'GET';
|
|
26
30
|
Path: `/records`;
|
|
27
31
|
Headers: {
|
|
@@ -44,7 +48,11 @@ export type GetPublicRecords = Endpoint<{
|
|
|
44
48
|
records: NangoRecord[];
|
|
45
49
|
};
|
|
46
50
|
}>;
|
|
47
|
-
export type PatchPublicPruneRecords =
|
|
51
|
+
export type PatchPublicPruneRecords = ApiEndpoint<{
|
|
52
|
+
Audit: {
|
|
53
|
+
kind: 'no-audit';
|
|
54
|
+
reason: 'TODO: audit coverage pending';
|
|
55
|
+
};
|
|
48
56
|
Method: 'PATCH';
|
|
49
57
|
Path: `/records/prune`;
|
|
50
58
|
Headers: {
|
|
@@ -70,7 +78,11 @@ export interface ConnectionRecordModel {
|
|
|
70
78
|
size_bytes: number;
|
|
71
79
|
updated_at: string;
|
|
72
80
|
}
|
|
73
|
-
export type GetConnectionRecordModels =
|
|
81
|
+
export type GetConnectionRecordModels = ApiEndpoint<{
|
|
82
|
+
Audit: {
|
|
83
|
+
kind: 'no-audit';
|
|
84
|
+
reason: 'non-auditable';
|
|
85
|
+
};
|
|
74
86
|
Method: 'GET';
|
|
75
87
|
Path: '/api/v1/connections/:connectionId/records/models';
|
|
76
88
|
Params: {
|
|
@@ -84,7 +96,11 @@ export type GetConnectionRecordModels = Endpoint<{
|
|
|
84
96
|
data: ConnectionRecordModel[];
|
|
85
97
|
};
|
|
86
98
|
}>;
|
|
87
|
-
export type GetConnectionRecords =
|
|
99
|
+
export type GetConnectionRecords = ApiEndpoint<{
|
|
100
|
+
Audit: {
|
|
101
|
+
kind: 'no-audit';
|
|
102
|
+
reason: 'non-auditable';
|
|
103
|
+
};
|
|
88
104
|
Method: 'GET';
|
|
89
105
|
Path: '/api/v1/connections/:connectionId/records';
|
|
90
106
|
Params: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint } from '../api.js';
|
|
2
2
|
import type { StandardNangoConfig } from '../flow/index.js';
|
|
3
3
|
export interface OpenAIFunction {
|
|
4
4
|
name: string;
|
|
@@ -12,7 +12,11 @@ export interface OpenAIFunction {
|
|
|
12
12
|
required: string[];
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export type GetPublicScriptsConfig =
|
|
15
|
+
export type GetPublicScriptsConfig = ApiEndpoint<{
|
|
16
|
+
Audit: {
|
|
17
|
+
kind: 'no-audit';
|
|
18
|
+
reason: 'non-auditable';
|
|
19
|
+
};
|
|
16
20
|
Method: 'GET';
|
|
17
21
|
Path: `/scripts/config`;
|
|
18
22
|
Query: {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ApiEndpoint } from '../api.js';
|
|
2
|
+
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
3
|
+
export type PostStripeCollectPayment = ApiEndpoint<{
|
|
4
|
+
Audit: AuditPolicy<'billing', 'payment_method_added', 'account'>;
|
|
3
5
|
Method: 'POST';
|
|
4
6
|
Path: '/api/v1/stripe/payment_methods';
|
|
5
7
|
Success: {
|
|
@@ -12,14 +14,19 @@ export interface StripePaymentMethod {
|
|
|
12
14
|
id: string;
|
|
13
15
|
last4: string;
|
|
14
16
|
}
|
|
15
|
-
export type GetStripePaymentMethods =
|
|
17
|
+
export type GetStripePaymentMethods = ApiEndpoint<{
|
|
18
|
+
Audit: {
|
|
19
|
+
kind: 'no-audit';
|
|
20
|
+
reason: 'non-auditable';
|
|
21
|
+
};
|
|
16
22
|
Method: 'GET';
|
|
17
23
|
Path: '/api/v1/stripe/payment_methods';
|
|
18
24
|
Success: {
|
|
19
25
|
data: StripePaymentMethod[];
|
|
20
26
|
};
|
|
21
27
|
}>;
|
|
22
|
-
export type DeleteStripePayment =
|
|
28
|
+
export type DeleteStripePayment = ApiEndpoint<{
|
|
29
|
+
Audit: AuditPolicy<'billing', 'payment_method_removed', 'account'>;
|
|
23
30
|
Method: 'DELETE';
|
|
24
31
|
Path: '/api/v1/stripe/payment_methods';
|
|
25
32
|
Querystring: {
|
|
@@ -31,7 +38,11 @@ export type DeleteStripePayment = Endpoint<{
|
|
|
31
38
|
};
|
|
32
39
|
};
|
|
33
40
|
}>;
|
|
34
|
-
export type PostStripeWebhooks =
|
|
41
|
+
export type PostStripeWebhooks = ApiEndpoint<{
|
|
42
|
+
Audit: {
|
|
43
|
+
kind: 'no-audit';
|
|
44
|
+
reason: 'non-auditable';
|
|
45
|
+
};
|
|
35
46
|
Method: 'POST';
|
|
36
47
|
Path: '/api/v1/stripe/webhooks';
|
|
37
48
|
Body: any;
|
package/dist/sync/api.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
|
+
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
2
3
|
import type { ReportedSyncJobStatus } from './index.js';
|
|
3
|
-
export type PostPublicTrigger =
|
|
4
|
+
export type PostPublicTrigger = ApiEndpoint<{
|
|
5
|
+
Audit: {
|
|
6
|
+
kind: 'no-audit';
|
|
7
|
+
reason: 'TODO: audit coverage pending';
|
|
8
|
+
};
|
|
4
9
|
Method: 'POST';
|
|
5
10
|
Path: '/sync/trigger';
|
|
6
11
|
Body: {
|
|
@@ -26,7 +31,8 @@ export type PostPublicTrigger = Endpoint<{
|
|
|
26
31
|
};
|
|
27
32
|
Error: ApiError<'missing_provider_config_key' | 'unknown_provider_config' | 'unknown_connection' | 'no_syncs_found'>;
|
|
28
33
|
}>;
|
|
29
|
-
export type PostSyncVariant =
|
|
34
|
+
export type PostSyncVariant = ApiEndpoint<{
|
|
35
|
+
Audit: AuditPolicy<'sync', 'variant_created', 'environment'>;
|
|
30
36
|
Method: 'POST';
|
|
31
37
|
Path: '/sync/:name/variant/:variant';
|
|
32
38
|
Body: {
|
|
@@ -44,7 +50,8 @@ export type PostSyncVariant = Endpoint<{
|
|
|
44
50
|
variant: string;
|
|
45
51
|
};
|
|
46
52
|
}>;
|
|
47
|
-
export type DeleteSyncVariant =
|
|
53
|
+
export type DeleteSyncVariant = ApiEndpoint<{
|
|
54
|
+
Audit: AuditPolicy<'sync', 'variant_deleted', 'environment'>;
|
|
48
55
|
Method: 'DELETE';
|
|
49
56
|
Path: '/sync/:name/variant/:variant';
|
|
50
57
|
Body: {
|
|
@@ -60,7 +67,8 @@ export type DeleteSyncVariant = Endpoint<{
|
|
|
60
67
|
success: boolean;
|
|
61
68
|
};
|
|
62
69
|
}>;
|
|
63
|
-
export type PutPublicSyncConnectionFrequency =
|
|
70
|
+
export type PutPublicSyncConnectionFrequency = ApiEndpoint<{
|
|
71
|
+
Audit: AuditPolicy<'sync', 'frequency_changed', 'environment'>;
|
|
64
72
|
Method: 'PUT';
|
|
65
73
|
Path: '/sync/update-connection-frequency';
|
|
66
74
|
Body: {
|
|
@@ -75,7 +83,8 @@ export type PutPublicSyncConnectionFrequency = Endpoint<{
|
|
|
75
83
|
};
|
|
76
84
|
Error: ApiError<'unknown_connection' | 'unknown_sync'>;
|
|
77
85
|
}>;
|
|
78
|
-
export type PostPublicSyncPause =
|
|
86
|
+
export type PostPublicSyncPause = ApiEndpoint<{
|
|
87
|
+
Audit: AuditPolicy<'sync', 'paused', 'environment'>;
|
|
79
88
|
Method: 'POST';
|
|
80
89
|
Path: '/sync/pause';
|
|
81
90
|
Body: {
|
|
@@ -91,7 +100,8 @@ export type PostPublicSyncPause = Endpoint<{
|
|
|
91
100
|
};
|
|
92
101
|
Error: ApiError<'no_syncs_found' | 'unknown_connection' | 'unknown_provider_config'>;
|
|
93
102
|
}>;
|
|
94
|
-
export type PostPublicSyncStart =
|
|
103
|
+
export type PostPublicSyncStart = ApiEndpoint<{
|
|
104
|
+
Audit: AuditPolicy<'sync', 'started', 'environment'>;
|
|
95
105
|
Method: 'POST';
|
|
96
106
|
Path: '/sync/start';
|
|
97
107
|
Body: {
|
|
@@ -107,7 +117,11 @@ export type PostPublicSyncStart = Endpoint<{
|
|
|
107
117
|
};
|
|
108
118
|
Error: ApiError<'no_syncs_found' | 'unknown_connection' | 'unknown_provider_config'>;
|
|
109
119
|
}>;
|
|
110
|
-
export type GetPublicSyncStatus =
|
|
120
|
+
export type GetPublicSyncStatus = ApiEndpoint<{
|
|
121
|
+
Audit: {
|
|
122
|
+
kind: 'no-audit';
|
|
123
|
+
reason: 'non-auditable';
|
|
124
|
+
};
|
|
111
125
|
Method: 'GET';
|
|
112
126
|
Path: '/sync/status';
|
|
113
127
|
Querystring: {
|
package/dist/team/api.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import type { ApiError, ApiTimestamps
|
|
1
|
+
import type { ApiEndpoint, ApiError, ApiTimestamps } from '../api.js';
|
|
2
|
+
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
2
3
|
import type { DBInvitation } from '../invitations/db.js';
|
|
3
4
|
import type { ApiUser } from '../user/api.js';
|
|
4
5
|
import type { Role } from '../user/db.js';
|
|
5
6
|
import type { DBTeam } from './db.js';
|
|
6
7
|
import type { Merge } from 'type-fest';
|
|
7
|
-
export type GetTeam =
|
|
8
|
+
export type GetTeam = ApiEndpoint<{
|
|
9
|
+
Audit: {
|
|
10
|
+
kind: 'no-audit';
|
|
11
|
+
reason: 'non-auditable';
|
|
12
|
+
};
|
|
8
13
|
Method: 'GET';
|
|
9
14
|
Path: '/api/v1/team';
|
|
10
15
|
Querystring: {
|
|
@@ -13,15 +18,20 @@ export type GetTeam = Endpoint<{
|
|
|
13
18
|
Success: {
|
|
14
19
|
data: {
|
|
15
20
|
account: ApiTeam;
|
|
16
|
-
users:
|
|
21
|
+
users: ApiTeamUser[];
|
|
17
22
|
invitedUsers: ApiInvitation[];
|
|
18
23
|
isAdminTeam: boolean;
|
|
24
|
+
mfaFeatureEnabled: boolean;
|
|
19
25
|
};
|
|
20
26
|
};
|
|
21
27
|
}>;
|
|
28
|
+
export interface ApiTeamUser extends ApiUser {
|
|
29
|
+
mfaEnabled: boolean;
|
|
30
|
+
}
|
|
22
31
|
export type ApiInvitation = Merge<Omit<DBInvitation, 'token'>, ApiTimestamps>;
|
|
23
32
|
export type ApiTeam = Merge<DBTeam, ApiTimestamps>;
|
|
24
|
-
export type PutTeam =
|
|
33
|
+
export type PutTeam = ApiEndpoint<{
|
|
34
|
+
Audit: AuditPolicy<'team', 'updated', 'account'>;
|
|
25
35
|
Method: 'PUT';
|
|
26
36
|
Path: '/api/v1/team';
|
|
27
37
|
Querystring: {
|
|
@@ -34,7 +44,8 @@ export type PutTeam = Endpoint<{
|
|
|
34
44
|
data: ApiTeam;
|
|
35
45
|
};
|
|
36
46
|
}>;
|
|
37
|
-
export type DeleteTeamUser =
|
|
47
|
+
export type DeleteTeamUser = ApiEndpoint<{
|
|
48
|
+
Audit: AuditPolicy<'member', 'removed', 'account'>;
|
|
38
49
|
Method: 'DELETE';
|
|
39
50
|
Path: '/api/v1/team/users/:id';
|
|
40
51
|
Querystring: {
|
|
@@ -50,7 +61,8 @@ export type DeleteTeamUser = Endpoint<{
|
|
|
50
61
|
};
|
|
51
62
|
};
|
|
52
63
|
}>;
|
|
53
|
-
export type PatchTeamUser =
|
|
64
|
+
export type PatchTeamUser = ApiEndpoint<{
|
|
65
|
+
Audit: AuditPolicy<'member', 'role_changed', 'account'>;
|
|
54
66
|
Method: 'PATCH';
|
|
55
67
|
Path: '/api/v1/team/users/:id';
|
|
56
68
|
Querystring: {
|
package/dist/user/api.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import type { Endpoint } from '../api.js';
|
|
1
|
+
import type { ApiEndpoint, Endpoint } from '../api.js';
|
|
2
|
+
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
2
3
|
import type { Role } from './db.js';
|
|
3
|
-
export type GetUser =
|
|
4
|
+
export type GetUser = ApiEndpoint<{
|
|
5
|
+
Audit: {
|
|
6
|
+
kind: 'no-audit';
|
|
7
|
+
reason: 'non-auditable';
|
|
8
|
+
};
|
|
4
9
|
Method: 'GET';
|
|
5
10
|
Path: `/api/v1/user`;
|
|
6
11
|
Success: {
|
|
@@ -17,7 +22,8 @@ export type InternalGetUsers = Endpoint<{
|
|
|
17
22
|
data: ApiUser[];
|
|
18
23
|
};
|
|
19
24
|
}>;
|
|
20
|
-
export type PatchUser =
|
|
25
|
+
export type PatchUser = ApiEndpoint<{
|
|
26
|
+
Audit: AuditPolicy<'user', 'updated', 'account'>;
|
|
21
27
|
Method: 'PATCH';
|
|
22
28
|
Path: `/api/v1/user`;
|
|
23
29
|
Body: {
|
|
@@ -42,7 +48,8 @@ export type ApiUserWithPermissions = ApiUser & {
|
|
|
42
48
|
role: Role;
|
|
43
49
|
permissions: AllowedPermissions;
|
|
44
50
|
};
|
|
45
|
-
export type PutUserPassword =
|
|
51
|
+
export type PutUserPassword = ApiEndpoint<{
|
|
52
|
+
Audit: AuditPolicy<'app_auth', 'password_changed', 'account'>;
|
|
46
53
|
Method: 'PUT';
|
|
47
54
|
Path: `/api/v1/user/password`;
|
|
48
55
|
Body: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type PostPublicWebhook =
|
|
1
|
+
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
|
+
export type PostPublicWebhook = ApiEndpoint<{
|
|
3
|
+
Audit: {
|
|
4
|
+
kind: 'no-audit';
|
|
5
|
+
reason: 'non-auditable';
|
|
6
|
+
};
|
|
3
7
|
Method: 'POST';
|
|
4
8
|
Path: '/webhook/:environmentUuid/:providerConfigKey';
|
|
5
9
|
Params: {
|