@nangohq/types 0.71.2 → 0.71.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/account/api.d.ts +100 -19
- package/dist/action/api.d.ts +21 -5
- package/dist/admin/http.api.d.ts +8 -2
- package/dist/api-keys/auth.d.ts +38 -0
- package/dist/api-keys/scopes.d.ts +3 -1
- package/dist/api.d.ts +7 -0
- package/dist/api.endpoints.d.ts +7 -6
- package/dist/audit-trail/api.d.ts +41 -0
- package/dist/audit-trail/event.d.ts +56 -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/config.d.ts +65 -0
- package/dist/function/db.d.ts +39 -0
- package/dist/functions/api.d.ts +141 -17
- package/dist/gettingStarted/api.d.ts +11 -3
- package/dist/index.d.ts +7 -3
- package/dist/integration/api.d.ts +52 -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/user/db.d.ts +2 -0
- package/dist/webhooks/http.api.d.ts +6 -2
- package/package.json +1 -1
- package/dist/functions/capabilities.d.ts +0 -7
|
@@ -1,4 +1,5 @@
|
|
|
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 { AuthModes, AuthModeType } from '../auth/api.js';
|
|
3
4
|
import type { NangoSyncConfig } from '../flow/index.js';
|
|
4
5
|
import type { ScriptTypeLiteral } from '../nangoYaml/index.js';
|
|
@@ -32,7 +33,11 @@ export interface ApiPublicIntegrationInclude {
|
|
|
32
33
|
private_key: string | null;
|
|
33
34
|
} | null;
|
|
34
35
|
}
|
|
35
|
-
export type GetPublicListIntegrations =
|
|
36
|
+
export type GetPublicListIntegrations = ApiEndpoint<{
|
|
37
|
+
Audit: {
|
|
38
|
+
kind: 'no-audit';
|
|
39
|
+
reason: 'non-auditable';
|
|
40
|
+
};
|
|
36
41
|
Method: 'GET';
|
|
37
42
|
Path: '/integrations';
|
|
38
43
|
Querystring?: {
|
|
@@ -42,7 +47,8 @@ export type GetPublicListIntegrations = Endpoint<{
|
|
|
42
47
|
data: ApiPublicIntegration[];
|
|
43
48
|
};
|
|
44
49
|
}>;
|
|
45
|
-
export type PostPublicIntegration =
|
|
50
|
+
export type PostPublicIntegration = ApiEndpoint<{
|
|
51
|
+
Audit: AuditPolicy<'integration', 'created', 'environment'>;
|
|
46
52
|
Method: 'POST';
|
|
47
53
|
Path: '/integrations';
|
|
48
54
|
Body: {
|
|
@@ -52,12 +58,14 @@ export type PostPublicIntegration = Endpoint<{
|
|
|
52
58
|
credentials?: ApiPublicIntegrationCredentials | undefined;
|
|
53
59
|
forward_webhooks?: boolean | undefined;
|
|
54
60
|
integration_config?: Record<string, string> | undefined;
|
|
61
|
+
custom?: Record<string, string> | undefined;
|
|
55
62
|
};
|
|
56
63
|
Success: {
|
|
57
64
|
data: ApiPublicIntegration;
|
|
58
65
|
};
|
|
59
66
|
}>;
|
|
60
|
-
export type PostPublicQuickstartIntegration =
|
|
67
|
+
export type PostPublicQuickstartIntegration = ApiEndpoint<{
|
|
68
|
+
Audit: AuditPolicy<'integration', 'created', 'environment'>;
|
|
61
69
|
Method: 'POST';
|
|
62
70
|
Path: '/integrations/quickstart';
|
|
63
71
|
Body: {
|
|
@@ -70,7 +78,11 @@ export type PostPublicQuickstartIntegration = Endpoint<{
|
|
|
70
78
|
data: ApiPublicIntegration;
|
|
71
79
|
};
|
|
72
80
|
}>;
|
|
73
|
-
export type GetPublicIntegration =
|
|
81
|
+
export type GetPublicIntegration = ApiEndpoint<{
|
|
82
|
+
Audit: {
|
|
83
|
+
kind: 'no-audit';
|
|
84
|
+
reason: 'non-auditable';
|
|
85
|
+
};
|
|
74
86
|
Method: 'GET';
|
|
75
87
|
Path: '/integrations/:uniqueKey';
|
|
76
88
|
Params: {
|
|
@@ -83,7 +95,8 @@ export type GetPublicIntegration = Endpoint<{
|
|
|
83
95
|
data: ApiPublicIntegration;
|
|
84
96
|
};
|
|
85
97
|
}>;
|
|
86
|
-
export type PatchPublicIntegration =
|
|
98
|
+
export type PatchPublicIntegration = ApiEndpoint<{
|
|
99
|
+
Audit: AuditPolicy<'integration', 'updated', 'environment'>;
|
|
87
100
|
Method: 'PATCH';
|
|
88
101
|
Path: '/integrations/:uniqueKey';
|
|
89
102
|
Params: {
|
|
@@ -101,7 +114,8 @@ export type PatchPublicIntegration = Endpoint<{
|
|
|
101
114
|
data: ApiPublicIntegration;
|
|
102
115
|
};
|
|
103
116
|
}>;
|
|
104
|
-
export type DeletePublicIntegration =
|
|
117
|
+
export type DeletePublicIntegration = ApiEndpoint<{
|
|
118
|
+
Audit: AuditPolicy<'integration', 'deleted', 'environment'>;
|
|
105
119
|
Method: 'DELETE';
|
|
106
120
|
Path: '/integrations/:uniqueKey';
|
|
107
121
|
Params: {
|
|
@@ -111,7 +125,11 @@ export type DeletePublicIntegration = Endpoint<{
|
|
|
111
125
|
success: true;
|
|
112
126
|
};
|
|
113
127
|
}>;
|
|
114
|
-
export type GetPublicFunctionCode =
|
|
128
|
+
export type GetPublicFunctionCode = ApiEndpoint<{
|
|
129
|
+
Audit: {
|
|
130
|
+
kind: 'no-audit';
|
|
131
|
+
reason: 'non-auditable';
|
|
132
|
+
};
|
|
115
133
|
Method: 'GET';
|
|
116
134
|
Path: '/integrations/:uniqueKey/functions/:name/code';
|
|
117
135
|
Params: {
|
|
@@ -132,7 +150,11 @@ export type GetPublicFunctionCode = Endpoint<{
|
|
|
132
150
|
}[];
|
|
133
151
|
}>;
|
|
134
152
|
}>;
|
|
135
|
-
export type GetFunctionCode =
|
|
153
|
+
export type GetFunctionCode = ApiEndpoint<{
|
|
154
|
+
Audit: {
|
|
155
|
+
kind: 'no-audit';
|
|
156
|
+
reason: 'non-auditable';
|
|
157
|
+
};
|
|
136
158
|
Method: 'GET';
|
|
137
159
|
Path: '/api/v1/integrations/:providerConfigKey/functions/:functionName/code';
|
|
138
160
|
Params: {
|
|
@@ -171,7 +193,11 @@ export type ApiIntegrationList = ApiIntegration & {
|
|
|
171
193
|
installation?: 'outbound';
|
|
172
194
|
};
|
|
173
195
|
};
|
|
174
|
-
export type GetIntegrations =
|
|
196
|
+
export type GetIntegrations = ApiEndpoint<{
|
|
197
|
+
Audit: {
|
|
198
|
+
kind: 'no-audit';
|
|
199
|
+
reason: 'non-auditable';
|
|
200
|
+
};
|
|
175
201
|
Method: 'GET';
|
|
176
202
|
Path: '/api/v1/integrations';
|
|
177
203
|
Success: {
|
|
@@ -221,7 +247,8 @@ export interface InstallPluginAuthBody {
|
|
|
221
247
|
password?: string | undefined;
|
|
222
248
|
}
|
|
223
249
|
export type IntegrationAuthBody = OAuthAuthBody | OAuth2CCAuthBody | AppAuthBody | CustomAuthBody | MCPOAuth2AuthBody | MCPOAuth2GenericAuthBody | InstallPluginAuthBody;
|
|
224
|
-
export type PostIntegration =
|
|
250
|
+
export type PostIntegration = ApiEndpoint<{
|
|
251
|
+
Audit: AuditPolicy<'integration', 'created', 'environment'>;
|
|
225
252
|
Method: 'POST';
|
|
226
253
|
Path: '/api/v1/integrations';
|
|
227
254
|
Querystring: {
|
|
@@ -241,7 +268,11 @@ export type PostIntegration = Endpoint<{
|
|
|
241
268
|
data: ApiIntegration;
|
|
242
269
|
};
|
|
243
270
|
}>;
|
|
244
|
-
export type GetIntegration =
|
|
271
|
+
export type GetIntegration = ApiEndpoint<{
|
|
272
|
+
Audit: {
|
|
273
|
+
kind: 'no-audit';
|
|
274
|
+
reason: 'non-auditable';
|
|
275
|
+
};
|
|
245
276
|
Method: 'GET';
|
|
246
277
|
Path: '/api/v1/integrations/:providerConfigKey';
|
|
247
278
|
Querystring: {
|
|
@@ -263,7 +294,8 @@ export type GetIntegration = Endpoint<{
|
|
|
263
294
|
};
|
|
264
295
|
};
|
|
265
296
|
}>;
|
|
266
|
-
export type PatchIntegration =
|
|
297
|
+
export type PatchIntegration = ApiEndpoint<{
|
|
298
|
+
Audit: AuditPolicy<'integration', 'updated', 'environment'>;
|
|
267
299
|
Method: 'PATCH';
|
|
268
300
|
Path: '/api/v1/integrations/:providerConfigKey';
|
|
269
301
|
Querystring: {
|
|
@@ -285,7 +317,8 @@ export type PatchIntegration = Endpoint<{
|
|
|
285
317
|
};
|
|
286
318
|
};
|
|
287
319
|
}>;
|
|
288
|
-
export type DeleteIntegration =
|
|
320
|
+
export type DeleteIntegration = ApiEndpoint<{
|
|
321
|
+
Audit: AuditPolicy<'integration', 'deleted', 'environment'>;
|
|
289
322
|
Method: 'DELETE';
|
|
290
323
|
Path: '/api/v1/integrations/:providerConfigKey';
|
|
291
324
|
Querystring: {
|
|
@@ -300,7 +333,11 @@ export type DeleteIntegration = Endpoint<{
|
|
|
300
333
|
};
|
|
301
334
|
};
|
|
302
335
|
}>;
|
|
303
|
-
export type GetIntegrationFlows =
|
|
336
|
+
export type GetIntegrationFlows = ApiEndpoint<{
|
|
337
|
+
Audit: {
|
|
338
|
+
kind: 'no-audit';
|
|
339
|
+
reason: 'non-auditable';
|
|
340
|
+
};
|
|
304
341
|
Method: 'GET';
|
|
305
342
|
Path: '/api/v1/integrations/:providerConfigKey/flows';
|
|
306
343
|
Querystring: {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
|
+
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
2
3
|
import type { ApiInvitation, ApiTeam } from '../team/api.js';
|
|
3
4
|
import type { ApiUser } from '../user/api.js';
|
|
4
5
|
import type { Role } from '../user/db.js';
|
|
5
|
-
export type PostInvite =
|
|
6
|
+
export type PostInvite = ApiEndpoint<{
|
|
7
|
+
Audit: AuditPolicy<'member', 'invited', 'account'>;
|
|
6
8
|
Method: 'POST';
|
|
7
9
|
Path: '/api/v1/invite';
|
|
8
10
|
Querystring: {
|
|
@@ -18,7 +20,8 @@ export type PostInvite = Endpoint<{
|
|
|
18
20
|
};
|
|
19
21
|
};
|
|
20
22
|
}>;
|
|
21
|
-
export type DeleteInvite =
|
|
23
|
+
export type DeleteInvite = ApiEndpoint<{
|
|
24
|
+
Audit: AuditPolicy<'member', 'invite_revoked', 'account'>;
|
|
22
25
|
Method: 'DELETE';
|
|
23
26
|
Path: '/api/v1/invite';
|
|
24
27
|
Querystring: {
|
|
@@ -33,7 +36,11 @@ export type DeleteInvite = Endpoint<{
|
|
|
33
36
|
};
|
|
34
37
|
};
|
|
35
38
|
}>;
|
|
36
|
-
export type GetInvite =
|
|
39
|
+
export type GetInvite = ApiEndpoint<{
|
|
40
|
+
Audit: {
|
|
41
|
+
kind: 'no-audit';
|
|
42
|
+
reason: 'non-auditable';
|
|
43
|
+
};
|
|
37
44
|
Method: 'GET';
|
|
38
45
|
Path: '/api/v1/invite/:id';
|
|
39
46
|
Params: {
|
|
@@ -49,7 +56,8 @@ export type GetInvite = Endpoint<{
|
|
|
49
56
|
};
|
|
50
57
|
Errors: ApiError<'not_found'>;
|
|
51
58
|
}>;
|
|
52
|
-
export type AcceptInvite =
|
|
59
|
+
export type AcceptInvite = ApiEndpoint<{
|
|
60
|
+
Audit: AuditPolicy<'member', 'invite_accepted', 'account'>;
|
|
53
61
|
Method: 'POST';
|
|
54
62
|
Path: '/api/v1/invite/:id';
|
|
55
63
|
Params: {
|
|
@@ -61,7 +69,8 @@ export type AcceptInvite = Endpoint<{
|
|
|
61
69
|
};
|
|
62
70
|
};
|
|
63
71
|
}>;
|
|
64
|
-
export type DeclineInvite =
|
|
72
|
+
export type DeclineInvite = ApiEndpoint<{
|
|
73
|
+
Audit: AuditPolicy<'member', 'invite_declined', 'account'>;
|
|
65
74
|
Method: 'DELETE';
|
|
66
75
|
Path: '/api/v1/invite/:id';
|
|
67
76
|
Params: {
|
package/dist/logs/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint } from '../api.js';
|
|
2
2
|
import type { PickFromUnion } from '../utils.js';
|
|
3
3
|
import type { MessageRow, OperationList, OperationRow, OperationState } from './messages.js';
|
|
4
4
|
type Concat<T extends OperationList> = T extends {
|
|
@@ -6,7 +6,11 @@ type Concat<T extends OperationList> = T extends {
|
|
|
6
6
|
} ? `${T['type']}:${T['action']}` : never;
|
|
7
7
|
export type ConcatOperationList = Concat<OperationList>;
|
|
8
8
|
export type ConcatOperationListWithGroup = OperationList['type'] | ConcatOperationList;
|
|
9
|
-
export type SearchOperations =
|
|
9
|
+
export type SearchOperations = ApiEndpoint<{
|
|
10
|
+
Audit: {
|
|
11
|
+
kind: 'no-audit';
|
|
12
|
+
reason: 'non-auditable';
|
|
13
|
+
};
|
|
10
14
|
Method: 'POST';
|
|
11
15
|
Path: '/api/v1/logs/operations';
|
|
12
16
|
Querystring: {
|
|
@@ -41,7 +45,11 @@ export interface SearchPeriod {
|
|
|
41
45
|
to: string;
|
|
42
46
|
}
|
|
43
47
|
export type SearchOperationsData = SearchOperations['Success']['data'][0];
|
|
44
|
-
export type GetOperation =
|
|
48
|
+
export type GetOperation = ApiEndpoint<{
|
|
49
|
+
Audit: {
|
|
50
|
+
kind: 'no-audit';
|
|
51
|
+
reason: 'non-auditable';
|
|
52
|
+
};
|
|
45
53
|
Method: 'GET';
|
|
46
54
|
Path: `/api/v1/logs/operations/:operationId`;
|
|
47
55
|
Querystring: {
|
|
@@ -54,7 +62,11 @@ export type GetOperation = Endpoint<{
|
|
|
54
62
|
data: OperationRow;
|
|
55
63
|
};
|
|
56
64
|
}>;
|
|
57
|
-
export type SearchMessages =
|
|
65
|
+
export type SearchMessages = ApiEndpoint<{
|
|
66
|
+
Audit: {
|
|
67
|
+
kind: 'no-audit';
|
|
68
|
+
reason: 'non-auditable';
|
|
69
|
+
};
|
|
58
70
|
Method: 'POST';
|
|
59
71
|
Path: '/api/v1/logs/messages';
|
|
60
72
|
Querystring: {
|
|
@@ -79,7 +91,11 @@ export type SearchMessages = Endpoint<{
|
|
|
79
91
|
};
|
|
80
92
|
}>;
|
|
81
93
|
export type SearchMessagesData = SearchMessages['Success']['data'][0];
|
|
82
|
-
export type SearchFilters =
|
|
94
|
+
export type SearchFilters = ApiEndpoint<{
|
|
95
|
+
Audit: {
|
|
96
|
+
kind: 'no-audit';
|
|
97
|
+
reason: 'non-auditable';
|
|
98
|
+
};
|
|
83
99
|
Method: 'POST';
|
|
84
100
|
Path: '/api/v1/logs/filters';
|
|
85
101
|
Querystring: {
|
|
@@ -97,7 +113,11 @@ export type SearchFilters = Endpoint<{
|
|
|
97
113
|
};
|
|
98
114
|
}>;
|
|
99
115
|
export type SearchFiltersData = SearchMessages['Success']['data'][0];
|
|
100
|
-
export type PostInsights =
|
|
116
|
+
export type PostInsights = ApiEndpoint<{
|
|
117
|
+
Audit: {
|
|
118
|
+
kind: 'no-audit';
|
|
119
|
+
reason: 'non-auditable';
|
|
120
|
+
};
|
|
101
121
|
Method: 'POST';
|
|
102
122
|
Path: '/api/v1/logs/insights';
|
|
103
123
|
Querystring: {
|
package/dist/mcp/api.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type PostConnectionToolsMcp =
|
|
1
|
+
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
|
+
export type PostConnectionToolsMcp = ApiEndpoint<{
|
|
3
|
+
Audit: {
|
|
4
|
+
kind: 'no-audit';
|
|
5
|
+
reason: 'non-auditable';
|
|
6
|
+
};
|
|
3
7
|
Method: 'POST';
|
|
4
8
|
Path: '/mcp';
|
|
5
9
|
Body: Record<string, unknown>;
|
|
@@ -10,18 +14,30 @@ export type PostConnectionToolsMcp = Endpoint<{
|
|
|
10
14
|
Success: Record<string, unknown>;
|
|
11
15
|
Error: ApiError<'missing_connection_id' | 'unknown_connection'>;
|
|
12
16
|
}>;
|
|
13
|
-
export type GetConnectionToolsMcp =
|
|
17
|
+
export type GetConnectionToolsMcp = ApiEndpoint<{
|
|
18
|
+
Audit: {
|
|
19
|
+
kind: 'no-audit';
|
|
20
|
+
reason: 'non-auditable';
|
|
21
|
+
};
|
|
14
22
|
Method: 'GET';
|
|
15
23
|
Path: '/mcp';
|
|
16
24
|
Success: Record<string, unknown>;
|
|
17
25
|
}>;
|
|
18
|
-
export type
|
|
26
|
+
export type PostManagementMcp = ApiEndpoint<{
|
|
27
|
+
Audit: {
|
|
28
|
+
kind: 'no-audit';
|
|
29
|
+
reason: 'audited-per-tool';
|
|
30
|
+
};
|
|
19
31
|
Method: 'POST';
|
|
20
32
|
Path: '/mcp';
|
|
21
33
|
Body: Record<string, unknown>;
|
|
22
34
|
Success: Record<string, unknown>;
|
|
23
35
|
}>;
|
|
24
|
-
export type
|
|
36
|
+
export type GetManagementMcp = ApiEndpoint<{
|
|
37
|
+
Audit: {
|
|
38
|
+
kind: 'no-audit';
|
|
39
|
+
reason: 'non-auditable';
|
|
40
|
+
};
|
|
25
41
|
Method: 'GET';
|
|
26
42
|
Path: '/mcp';
|
|
27
43
|
Success: Record<string, unknown>;
|
package/dist/meta/api.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
2
|
import type { DBEnvironment } from '../environment/db.js';
|
|
3
|
-
export type GetMeta =
|
|
3
|
+
export type GetMeta = ApiEndpoint<{
|
|
4
|
+
Audit: {
|
|
5
|
+
kind: 'no-audit';
|
|
6
|
+
reason: 'non-auditable';
|
|
7
|
+
};
|
|
4
8
|
Method: 'GET';
|
|
5
9
|
Path: '/api/v1/meta';
|
|
6
10
|
Querystring: {
|
|
@@ -14,6 +18,7 @@ export type GetMeta = Endpoint<{
|
|
|
14
18
|
baseUrl: string;
|
|
15
19
|
debugMode: boolean;
|
|
16
20
|
gettingStartedClosed: boolean;
|
|
21
|
+
auditTrail: boolean;
|
|
17
22
|
};
|
|
18
23
|
};
|
|
19
24
|
}>;
|
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'];
|