@nangohq/types 0.69.50 → 0.70.1
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.endpoints.d.ts +2 -1
- package/dist/functions/api.d.ts +75 -0
- package/dist/index.d.ts +1 -0
- package/dist/plans/db.d.ts +16 -0
- package/package.json +1 -1
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { DeleteEnvironment, GetEnvironment, GetEnvironments, PatchEnvironme
|
|
|
12
12
|
import type { PatchWebhook } from './environment/api/webhook.js';
|
|
13
13
|
import type { PostEnvironmentVariables } from './environment/variable/api.js';
|
|
14
14
|
import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api.js';
|
|
15
|
+
import type { PostRemoteFunctionCompile, PostRemoteFunctionDeploy, PostRemoteFunctionDryrun } from './functions/api.js';
|
|
15
16
|
import type { GetGettingStarted, PatchGettingStarted } from './gettingStarted/api.js';
|
|
16
17
|
import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetIntegrationFlows, GetPublicIntegration, GetPublicListIntegrations, PatchIntegration, PatchPublicIntegration, PostIntegration, PostPublicIntegration } from './integration/api.js';
|
|
17
18
|
import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
|
|
@@ -27,7 +28,7 @@ import type { GetPublicSyncStatus, PostPublicSyncPause, PostPublicSyncStart, Pos
|
|
|
27
28
|
import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api.js';
|
|
28
29
|
import type { GetUser, PatchUser } from './user/api.js';
|
|
29
30
|
import type { PostPublicWebhook } from './webhooks/http.api.js';
|
|
30
|
-
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicRecords | PatchPublicPruneRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | AllPublicProxy;
|
|
31
|
+
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicRecords | PatchPublicPruneRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | PostRemoteFunctionCompile | PostRemoteFunctionDryrun | PostRemoteFunctionDeploy | AllPublicProxy;
|
|
31
32
|
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | PutBillingInvoicingDetails | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedEmailVerification | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider | PostInternalTriggerFunction;
|
|
32
33
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
33
34
|
/**
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ApiError, Endpoint } from '../api.js';
|
|
2
|
+
export type FunctionType = 'action' | 'sync';
|
|
3
|
+
export type FunctionErrorCode = 'invalid_request' | 'integration_not_found' | 'compilation_error' | 'dryrun_error' | 'deployment_error' | 'connection_not_found' | 'function_disabled' | 'timeout' | 'validation_error';
|
|
4
|
+
export interface ProxyCall {
|
|
5
|
+
method: string;
|
|
6
|
+
endpoint: string;
|
|
7
|
+
status: number;
|
|
8
|
+
request: {
|
|
9
|
+
params?: Record<string, unknown>;
|
|
10
|
+
headers?: Record<string, unknown>;
|
|
11
|
+
data?: unknown;
|
|
12
|
+
};
|
|
13
|
+
response: unknown;
|
|
14
|
+
headers: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export type PostRemoteFunctionCompile = Endpoint<{
|
|
17
|
+
Method: 'POST';
|
|
18
|
+
Path: '/remote-function/compile';
|
|
19
|
+
Body: {
|
|
20
|
+
integration_id: string;
|
|
21
|
+
function_name: string;
|
|
22
|
+
function_type: FunctionType;
|
|
23
|
+
code: string;
|
|
24
|
+
};
|
|
25
|
+
Error: ApiError<FunctionErrorCode>;
|
|
26
|
+
Success: {
|
|
27
|
+
integration_id: string;
|
|
28
|
+
function_name: string;
|
|
29
|
+
function_type: FunctionType;
|
|
30
|
+
bundle_size_bytes: number;
|
|
31
|
+
bundled_js: string;
|
|
32
|
+
compiled_at: string;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export type PostRemoteFunctionDryrun = Endpoint<{
|
|
36
|
+
Method: 'POST';
|
|
37
|
+
Path: '/remote-function/dryrun';
|
|
38
|
+
Body: {
|
|
39
|
+
integration_id: string;
|
|
40
|
+
function_name: string;
|
|
41
|
+
function_type: FunctionType;
|
|
42
|
+
code: string;
|
|
43
|
+
connection_id: string;
|
|
44
|
+
input?: unknown;
|
|
45
|
+
metadata?: Record<string, unknown> | undefined;
|
|
46
|
+
checkpoint?: Record<string, unknown> | undefined;
|
|
47
|
+
last_sync_date?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
Error: ApiError<FunctionErrorCode>;
|
|
50
|
+
Success: {
|
|
51
|
+
integration_id: string;
|
|
52
|
+
function_name: string;
|
|
53
|
+
function_type: FunctionType;
|
|
54
|
+
execution_timeout_at: string;
|
|
55
|
+
duration_ms: number;
|
|
56
|
+
output: string;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
export type PostRemoteFunctionDeploy = Endpoint<{
|
|
60
|
+
Method: 'POST';
|
|
61
|
+
Path: '/remote-function/deploy';
|
|
62
|
+
Body: {
|
|
63
|
+
integration_id: string;
|
|
64
|
+
function_name: string;
|
|
65
|
+
function_type: FunctionType;
|
|
66
|
+
code: string;
|
|
67
|
+
};
|
|
68
|
+
Error: ApiError<FunctionErrorCode>;
|
|
69
|
+
Success: {
|
|
70
|
+
integration_id: string;
|
|
71
|
+
function_name: string;
|
|
72
|
+
function_type: FunctionType;
|
|
73
|
+
output: string;
|
|
74
|
+
};
|
|
75
|
+
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export type * from './jobs/api.js';
|
|
|
84
84
|
export type * from './checkpoint/types.js';
|
|
85
85
|
export type * from './checkpoint/db.js';
|
|
86
86
|
export type * from './mcp/api.js';
|
|
87
|
+
export type * from './functions/api.js';
|
|
87
88
|
export type * from './lambda/index.js';
|
|
88
89
|
export type * from './authz/types.js';
|
|
89
90
|
export type * from './pubsub/events.js';
|
package/dist/plans/db.d.ts
CHANGED
|
@@ -100,6 +100,12 @@ export interface DBPlan extends Timestamps {
|
|
|
100
100
|
* @default false
|
|
101
101
|
*/
|
|
102
102
|
has_webhooks_forward: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Enable role-based access control (non-administrator roles)
|
|
105
|
+
* When false, all users/invites must be 'administrator'
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
has_rbac: boolean;
|
|
103
109
|
/**
|
|
104
110
|
* Enable or disable the ability to override the docs connect url from the connect session
|
|
105
111
|
* @default false
|
|
@@ -115,11 +121,21 @@ export interface DBPlan extends Timestamps {
|
|
|
115
121
|
* @default false
|
|
116
122
|
*/
|
|
117
123
|
can_disable_connect_ui_watermark: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Enable or disable remote function compile, dry-run, and deploy endpoints
|
|
126
|
+
* @default false
|
|
127
|
+
*/
|
|
128
|
+
remote_functions: boolean;
|
|
118
129
|
/**
|
|
119
130
|
* Sync Function Runtime
|
|
120
131
|
* @default "runner"
|
|
121
132
|
*/
|
|
122
133
|
sync_function_runtime: FunctionRuntime;
|
|
134
|
+
/**
|
|
135
|
+
* When true, syncs routed to the Lambda fleet require the checkpoints feature or they run on the runner fleet.
|
|
136
|
+
* @default true
|
|
137
|
+
*/
|
|
138
|
+
sync_lambda_checkpoint_required: boolean;
|
|
123
139
|
/**
|
|
124
140
|
* Action Function Runtime
|
|
125
141
|
* @default "runner"
|