@nangohq/types 0.71.13 → 0.71.14
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 +1 -1
- package/dist/account/signupAdvertising.d.ts +8 -0
- package/dist/action/api.d.ts +5 -5
- package/dist/agent/playground.api.d.ts +22 -2
- package/dist/agent/session.d.ts +10 -0
- package/dist/analytics/catalogue.d.ts +700 -0
- package/dist/analytics/catalogue.unit.test.d.ts +1 -0
- package/dist/analytics/taxonomy.d.ts +72 -0
- package/dist/api-keys/scopes.d.ts +1 -1
- package/dist/api.endpoints.d.ts +6 -5
- package/dist/environment/api/index.d.ts +83 -1
- package/dist/function/tool.d.ts +5 -0
- package/dist/functions/api.d.ts +26 -4
- package/dist/functions/domain.d.ts +17 -2
- package/dist/index.d.ts +4 -0
- package/dist/integration/api.d.ts +11 -11
- package/dist/meta/api.d.ts +1 -0
- package/dist/plans/http.api.d.ts +1 -0
- package/dist/team/api.d.ts +1 -1
- package/dist/team/db.d.ts +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export type AnalyticsSurface = 'web' | 'cli' | 'server';
|
|
2
|
+
export interface AnalyticsCategories {
|
|
3
|
+
auth: 'Signing up, logging in and account access';
|
|
4
|
+
audit: "The account's audit trail: who did what in the account. Not function logs";
|
|
5
|
+
onboarding: 'Getting Started';
|
|
6
|
+
connections: 'Creating and managing connections';
|
|
7
|
+
playground: 'The dashboard Playground';
|
|
8
|
+
functions: 'Writing, deploying and running syncs and actions, including from the CLI';
|
|
9
|
+
billing: 'Plans, usage and payment';
|
|
10
|
+
agents: 'Agent sessions and the tools agents call through them';
|
|
11
|
+
integrations: 'Creating and configuring integrations';
|
|
12
|
+
environments: 'Environments and their settings';
|
|
13
|
+
team: 'The people in an account and their roles';
|
|
14
|
+
logs: 'Searching and reading operation logs';
|
|
15
|
+
}
|
|
16
|
+
export interface AnalyticsObjects {
|
|
17
|
+
account: 'A Nango account';
|
|
18
|
+
user: 'A person in an account';
|
|
19
|
+
connection: "An end user's authorised link to an integration";
|
|
20
|
+
integration: 'A provider configured in an environment. Never `provider`';
|
|
21
|
+
deploy: 'Pushing functions to an environment';
|
|
22
|
+
command: 'A CLI command, such as `compile` or `deploy`';
|
|
23
|
+
function: 'A sync or an action';
|
|
24
|
+
run: 'One execution of a function';
|
|
25
|
+
api_key: 'An account or environment key';
|
|
26
|
+
environment: 'Dev, prod or a custom environment';
|
|
27
|
+
plan: "The account's pricing plan";
|
|
28
|
+
session: 'An agent session';
|
|
29
|
+
tool_call: 'One call an agent makes to a tool in its session';
|
|
30
|
+
proxy_request: "One request an agent sends to an integration's API through the proxy";
|
|
31
|
+
tool_search: 'One search an agent runs for tools in its session';
|
|
32
|
+
usage: "The Usage page's metrics and charts";
|
|
33
|
+
playground: 'The dashboard Playground panel';
|
|
34
|
+
agent_turn: 'One message and its reply in an Agent Playground chat';
|
|
35
|
+
approval: 'A tool call in an Agent Playground chat that waits for the user to approve or deny it';
|
|
36
|
+
two_factor: "A user's two-factor authentication";
|
|
37
|
+
recovery_codes: "A user's two-factor recovery codes";
|
|
38
|
+
password: "A user's password";
|
|
39
|
+
join_request: 'A request to join an existing account';
|
|
40
|
+
export: 'A file of records produced for download, such as the audit trail';
|
|
41
|
+
sync_command: "A run, full resync, pause, resume or cancel sent to a connection's sync";
|
|
42
|
+
operation: 'One entry in the logs, such as a sync run or an auth attempt';
|
|
43
|
+
filter: 'A search or filter on a dashboard list';
|
|
44
|
+
}
|
|
45
|
+
export interface AnalyticsUiElements {
|
|
46
|
+
button: 'A dashboard button, such as `create_button`';
|
|
47
|
+
link: 'A dashboard link, such as `invoice_link`';
|
|
48
|
+
tab: 'A dashboard tab';
|
|
49
|
+
modal: 'A dashboard modal';
|
|
50
|
+
page: 'A dashboard page, such as `create_page`';
|
|
51
|
+
}
|
|
52
|
+
export interface AnalyticsActions {
|
|
53
|
+
click: 'A UI element was clicked';
|
|
54
|
+
submit: 'A form or request was sent';
|
|
55
|
+
create: 'A new thing was created, or a creation attempt finished. Include `is_success` when failures are tracked';
|
|
56
|
+
view: 'A page or item was seen';
|
|
57
|
+
add: 'Something was added to an existing thing';
|
|
58
|
+
invite: 'Someone was invited';
|
|
59
|
+
update: 'Something changed';
|
|
60
|
+
delete: 'Something was destroyed';
|
|
61
|
+
remove: 'Something was taken out of an existing thing, not destroyed';
|
|
62
|
+
start: 'Something with a lifetime began, such as a session. Pairs with `end`';
|
|
63
|
+
end: 'Something with a lifetime stopped. Pairs with `start`';
|
|
64
|
+
complete: 'An operation that produces no new thing finished, such as a run or a tool call. Always carries `is_success`';
|
|
65
|
+
cancel: 'Someone stopped a process';
|
|
66
|
+
generate: 'Something was produced automatically';
|
|
67
|
+
send: 'Something was sent to someone';
|
|
68
|
+
}
|
|
69
|
+
export type AnalyticsCategory = keyof AnalyticsCategories;
|
|
70
|
+
export type AnalyticsObject = keyof AnalyticsObjects | `${string}_${keyof AnalyticsUiElements}`;
|
|
71
|
+
export type AnalyticsAction = keyof AnalyticsActions;
|
|
72
|
+
export type AnalyticsEventName = `${AnalyticsCategory}:${AnalyticsObject}_${AnalyticsAction}`;
|
|
@@ -4,7 +4,7 @@ export declare const API_KEY_SCOPES: readonly ["environment:integrations:list",
|
|
|
4
4
|
export type ConcreteApiKeyScope = (typeof API_KEY_SCOPES)[number];
|
|
5
5
|
/** A scope, or a wildcard over scopes. Which wildcards resolve to something is checked at runtime. */
|
|
6
6
|
export type ApiKeyScope = ConcreteApiKeyScope | WildcardsFor<'environment'>;
|
|
7
|
-
export declare const ACCOUNT_API_KEY_SCOPES: readonly ["account:environments:list", "account:environments:create", "account:environments:delete", "account:environments:set_production", "account:environments:api_keys:list", "account:environments:api_keys:read", "account:environments:api_keys:create", "account:environments:api_keys:delete"];
|
|
7
|
+
export declare const ACCOUNT_API_KEY_SCOPES: readonly ["account:environments:list", "account:environments:read", "account:environments:read_secret", "account:environments:create", "account:environments:delete", "account:environments:set_production", "account:environments:api_keys:list", "account:environments:api_keys:read", "account:environments:api_keys:create", "account:environments:api_keys:update", "account:environments:api_keys:delete"];
|
|
8
8
|
export type ConcreteAccountApiKeyScope = (typeof ACCOUNT_API_KEY_SCOPES)[number];
|
|
9
9
|
export type AccountApiKeyScope = ConcreteAccountApiKeyScope | WildcardsFor<'account'>;
|
|
10
10
|
export type CustomerKeyScope = ApiKeyScope | AccountApiKeyScope;
|
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ConfirmEmail, CreateAccountApiKey, DeleteAccountApiKey, GetEmailByExpiredToken, GetEmailByUuid, GetManagedCallback, GetManagedEmailVerification, GetOnboardingAccountDiscovery, ListAccountApiKeys, PostForgotPassword, PostLogout, PostManagedEmailVerification, PostManagedSignup, PostOnboardingRequestInvite, PostSignin, PostSignup, PutResetPassword } from './account/api.js';
|
|
2
|
-
import type { GetAsyncActionResult, GetPublicV1,
|
|
2
|
+
import type { GetAsyncActionResult, GetPublicV1, PostInternalInvokeFunction, PostPublicTriggerAction } from './action/api.js';
|
|
3
3
|
import type { PostImpersonate } from './admin/http.api.js';
|
|
4
4
|
import type { DeleteAgentSession, PostAgentSessions } from './agent/api.js';
|
|
5
5
|
import type { GetAgentSessionMcp, PostAgentSessionMcp } from './agent/mcp.api.js';
|
|
@@ -14,15 +14,16 @@ import type { DeleteConnection, DeletePublicConnection, GetConnection, GetConnec
|
|
|
14
14
|
import type { PostConnectionMetadata, SetMetadata, UpdateMetadata } from './connection/api/metadata.js';
|
|
15
15
|
import type { GetConnectUISettings, PutConnectUISettings } from './connectUISettings/api.js';
|
|
16
16
|
import type { PostDeploy, PostDeployConfirmation, PostDeployInternal } from './deploy/api.js';
|
|
17
|
-
import type { CreateApiKey, DeleteApiKey, DeleteEnvironment, DeletePublicApiKey, DeletePublicEnvironment, GetEnvironment, GetEnvironments, GetPublicApiKey, GetPublicApiKeys, GetPublicEnvironments, ListApiKeys, PatchApiKey, PatchEnvironment, PostEnvironment, PostPublicApiKey, PostPublicEnvironment, PostPublicRotateWebhookSigningKey, PostRotateWebhookSigningKey } from './environment/api/index.js';
|
|
17
|
+
import type { CreateApiKey, DeleteApiKey, DeleteEnvironment, DeletePublicApiKey, DeletePublicEnvironment, GetEnvironment, GetEnvironments, GetPublicApiKey, GetPublicApiKeys, GetPublicEnvironment, GetPublicEnvironments, ListApiKeys, PatchApiKey, PatchEnvironment, PatchPublicApiKey, PostEnvironment, PostPublicApiKey, PostPublicEnvironment, PostPublicRotateWebhookSigningKey, PostRotateWebhookSigningKey } from './environment/api/index.js';
|
|
18
18
|
import type { PatchWebhook } from './environment/api/webhook.js';
|
|
19
19
|
import type { PostEnvironmentVariables } from './environment/variable/api.js';
|
|
20
20
|
import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api.js';
|
|
21
|
-
import type { DeleteFunctionVariant, DeleteIntegrationFunction, DeletePublicIntegrationFunction, GetFunction, GetFunctionDeployment, GetFunctionDryrun, GetFunctionInvocation, GetFunctions, GetIntegrationFunction, GetIntegrationFunctions, GetIntegrationTemplates, GetProviderTemplates, GetPublicIntegrationFunction, GetPublicIntegrationFunctions, GetPublicProviderTemplates, PatchConnectionFunction, PatchFunction, PatchFunctionVariant, PostFunctionCompile, PostFunctionDeployment, PostFunctionDeploymentBundle, PostFunctionDeploymentBundlePreview, PostFunctionDeploymentResult, PostFunctionDryrun, PostFunctionDryrunResult, PostFunctionInvocation, PostFunctionVariant } from './functions/api.js';
|
|
21
|
+
import type { DeleteFunctionVariant, DeleteIntegrationFunction, DeletePublicIntegrationFunction, GetFunction, GetFunctionDeployment, GetFunctionDryrun, GetFunctionInvocation, GetFunctions, GetIntegrationFunction, GetIntegrationFunctions, GetIntegrationTemplates, GetProviderTemplates, GetPublicIntegrationFunction, GetPublicIntegrationFunctions, GetPublicProviderTemplates, PatchConnectionFunction, PatchFunction, PatchFunctionVariant, PostFunctionCompile, PostFunctionDeployment, PostFunctionDeploymentBundle, PostFunctionDeploymentBundlePreview, PostFunctionDeploymentResult, PostFunctionDryrun, PostFunctionDryrunResult, PostFunctionInvocation, PostFunctionVariant, PostToolCall } from './functions/api.js';
|
|
22
22
|
import type { GetGettingStarted, PatchGettingStarted } from './gettingStarted/api.js';
|
|
23
23
|
import type { DeleteIntegration, DeletePublicIntegration, GetFunctionCode, GetIntegration, GetIntegrationFlows, GetPublicFunctionCode, GetPublicIntegration, GetPublicListIntegrations, PatchIntegration, PatchPublicIntegration, PostIntegration, PostPublicIntegration, PostPublicQuickstartIntegration } from './integration/api.js';
|
|
24
24
|
import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
|
|
25
25
|
import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api.js';
|
|
26
|
+
import type { GetConnectionToolsMcp, PostConnectionToolsMcp } from './mcp/api.js';
|
|
26
27
|
import type { GetMeta } from './meta/api.js';
|
|
27
28
|
import type { DeleteMFA, GetMFAStatus, PostMFAActivation, PostMFAEnrollment, PostMFALoginVerification, PostMFARecoveryCodes } from './mfa/api.js';
|
|
28
29
|
import type { GetPlainHmac } from './plain/api.js';
|
|
@@ -36,8 +37,8 @@ import type { GetConnectionSyncs, GetPublicSyncStatus, PostPublicSyncPause, Post
|
|
|
36
37
|
import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api.js';
|
|
37
38
|
import type { GetUser, PatchUser, PutUserPassword } from './user/api.js';
|
|
38
39
|
import type { PostPublicWebhook } from './webhooks/http.api.js';
|
|
39
|
-
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostAgentSessions | DeleteAgentSession | PostAgentSessionMcp | GetAgentSessionMcp | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | DeleteConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicClientMetadata | GetPublicRecords | PatchPublicPruneRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PostCliTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PostPublicQuickstartIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicAwsSigV4Authorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | PostFunctionCompile | GetFunction | GetFunctions | PatchFunction | PostFunctionDryrun | GetFunctionDryrun | PostFunctionDryrunResult | PostFunctionDeployment | GetFunctionDeployment | PostFunctionDeploymentResult | PostFunctionInvocation | PostFunctionVariant | PatchFunctionVariant | PatchConnectionFunction | DeleteFunctionVariant | GetFunctionInvocation | PostFunctionDeploymentBundle | PostFunctionDeploymentBundlePreview | GetPublicFunctionCode | GetPublicIntegrationFunctions | GetPublicIntegrationFunction | DeletePublicIntegrationFunction | GetPublicProviderTemplates | PostPublicRotateWebhookSigningKey | AllPublicProxy | PostPublicEnvironment | DeletePublicEnvironment | GetPublicEnvironments | GetPublicApiKey | GetPublicApiKeys | PostPublicApiKey | DeletePublicApiKey;
|
|
40
|
-
export type PrivateApiEndpoints = GetAuditTrail | GetAuditTrailExport | ListAccountApiKeys | CreateAccountApiKey | DeleteAccountApiKey | ConfirmEmail | PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | PutBillingInvoicingDetails | GetOverdueInvoices | GetBillingUsage | GetBillingUsageTopDimensionValues | GetUpcomingInvoice | GetBillingPeriodCosts | GetProjectedCosts | GetSpendAlert | PutSpendAlert | DeleteSpendAlert | GetUser | PatchUser | PutUserPassword | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | GetIntegrationFunction | GetIntegrationFunctions | GetFunctionCode | DeleteIntegrationFunction | GetIntegrationTemplates | GetProviderTemplates | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | PatchConnection | PostConnectionMetadata | GetConnectionRecordModels | GetConnectionRecords | GetConnectionSyncs | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | GetOnboardingAccountDiscovery | PostOnboardingRequestInvite | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedEmailVerification | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | PostRotateWebhookSigningKey | ListApiKeys | CreateApiKey | DeleteApiKey | PatchApiKey | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider |
|
|
40
|
+
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostAgentSessions | DeleteAgentSession | PostAgentSessionMcp | GetAgentSessionMcp | PostConnectionToolsMcp | GetConnectionToolsMcp | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | DeleteConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicClientMetadata | GetPublicRecords | PatchPublicPruneRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PostCliTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PostPublicQuickstartIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicAwsSigV4Authorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | PostFunctionCompile | GetFunction | GetFunctions | PatchFunction | PostFunctionDryrun | GetFunctionDryrun | PostFunctionDryrunResult | PostFunctionDeployment | GetFunctionDeployment | PostFunctionDeploymentResult | PostFunctionInvocation | PostFunctionVariant | PatchFunctionVariant | PatchConnectionFunction | DeleteFunctionVariant | GetFunctionInvocation | PostFunctionDeploymentBundle | PostFunctionDeploymentBundlePreview | GetPublicFunctionCode | GetPublicIntegrationFunctions | GetPublicIntegrationFunction | PostToolCall | DeletePublicIntegrationFunction | GetPublicProviderTemplates | PostPublicRotateWebhookSigningKey | AllPublicProxy | PostPublicEnvironment | DeletePublicEnvironment | GetPublicEnvironment | GetPublicEnvironments | GetPublicApiKey | GetPublicApiKeys | PostPublicApiKey | PatchPublicApiKey | DeletePublicApiKey;
|
|
41
|
+
export type PrivateApiEndpoints = GetAuditTrail | GetAuditTrailExport | ListAccountApiKeys | CreateAccountApiKey | DeleteAccountApiKey | ConfirmEmail | PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | PutBillingInvoicingDetails | GetOverdueInvoices | GetBillingUsage | GetBillingUsageTopDimensionValues | GetUpcomingInvoice | GetBillingPeriodCosts | GetProjectedCosts | GetSpendAlert | PutSpendAlert | DeleteSpendAlert | GetUser | PatchUser | PutUserPassword | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | GetIntegrationFunction | GetIntegrationFunctions | GetFunctionCode | DeleteIntegrationFunction | GetIntegrationTemplates | GetProviderTemplates | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | PatchConnection | PostConnectionMetadata | GetConnectionRecordModels | GetConnectionRecords | GetConnectionSyncs | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | GetOnboardingAccountDiscovery | PostOnboardingRequestInvite | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedEmailVerification | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | PostRotateWebhookSigningKey | ListApiKeys | CreateApiKey | DeleteApiKey | PatchApiKey | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider | PostInternalInvokeFunction | GetMFAStatus | PostMFAEnrollment | PostMFAActivation | PostMFARecoveryCodes | PostMFALoginVerification | DeleteMFA | GetPlainHmac | PostAgentPlaygroundChat;
|
|
41
42
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
42
43
|
/**
|
|
43
44
|
* Automatically narrow endpoints type with Method + Path
|
|
@@ -34,6 +34,38 @@ export type GetPublicEnvironments = ApiEndpoint<{
|
|
|
34
34
|
data: Pick<DBEnvironment, 'id' | 'uuid' | 'name' | 'is_production'>[];
|
|
35
35
|
};
|
|
36
36
|
}>;
|
|
37
|
+
export type GetPublicEnvironment = ApiEndpoint<{
|
|
38
|
+
Audit: {
|
|
39
|
+
kind: 'no-audit';
|
|
40
|
+
reason: 'non-auditable';
|
|
41
|
+
};
|
|
42
|
+
Method: 'GET';
|
|
43
|
+
Path: '/environments/:environmentUuid';
|
|
44
|
+
Params: {
|
|
45
|
+
environmentUuid: string;
|
|
46
|
+
};
|
|
47
|
+
Querystring: {
|
|
48
|
+
with_secrets?: 'true' | 'false' | undefined;
|
|
49
|
+
};
|
|
50
|
+
Success: {
|
|
51
|
+
data: {
|
|
52
|
+
id: number;
|
|
53
|
+
uuid: string;
|
|
54
|
+
name: string;
|
|
55
|
+
is_production: boolean;
|
|
56
|
+
callback_url: string;
|
|
57
|
+
slack_notifications: boolean;
|
|
58
|
+
otlp_endpoint: string | null;
|
|
59
|
+
otlp_headers?: {
|
|
60
|
+
name: string;
|
|
61
|
+
value: string;
|
|
62
|
+
}[];
|
|
63
|
+
webhooks: ApiWebhooks & {
|
|
64
|
+
signing_key?: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
37
69
|
export type PostEnvironment = ApiEndpoint<{
|
|
38
70
|
Audit: AuditPolicy<'environment', 'created', 'account'>;
|
|
39
71
|
Method: 'POST';
|
|
@@ -62,9 +94,34 @@ export type PostPublicEnvironment = ApiEndpoint<{
|
|
|
62
94
|
name: string;
|
|
63
95
|
value: string;
|
|
64
96
|
}[] | undefined;
|
|
97
|
+
webhooks?: {
|
|
98
|
+
primary_url?: string | undefined;
|
|
99
|
+
secondary_url?: string | undefined;
|
|
100
|
+
on_sync_completion_always?: boolean | undefined;
|
|
101
|
+
on_auth_creation?: boolean | undefined;
|
|
102
|
+
on_auth_refresh_error?: boolean | undefined;
|
|
103
|
+
on_sync_error?: boolean | undefined;
|
|
104
|
+
on_async_action_completion?: boolean | undefined;
|
|
105
|
+
on_connection_deletion?: boolean | undefined;
|
|
106
|
+
} | undefined;
|
|
65
107
|
};
|
|
66
108
|
Success: {
|
|
67
|
-
data:
|
|
109
|
+
data: {
|
|
110
|
+
id: number;
|
|
111
|
+
uuid: string;
|
|
112
|
+
name: string;
|
|
113
|
+
is_production: boolean;
|
|
114
|
+
callback_url: string;
|
|
115
|
+
slack_notifications: boolean;
|
|
116
|
+
otlp_endpoint: string | null;
|
|
117
|
+
otlp_headers: {
|
|
118
|
+
name: string;
|
|
119
|
+
value: string;
|
|
120
|
+
}[];
|
|
121
|
+
webhooks: ApiWebhooks & {
|
|
122
|
+
signing_key: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
68
125
|
};
|
|
69
126
|
Error: ApiError<'conflict' | 'resource_capped' | 'invalid_is_prod_flag'>;
|
|
70
127
|
}>;
|
|
@@ -211,6 +268,7 @@ export type PostPublicApiKey = ApiEndpoint<{
|
|
|
211
268
|
};
|
|
212
269
|
Body: {
|
|
213
270
|
display_name: string;
|
|
271
|
+
scopes?: ApiKeyScope[];
|
|
214
272
|
};
|
|
215
273
|
Success: {
|
|
216
274
|
data: {
|
|
@@ -271,6 +329,30 @@ export type GetPublicApiKey = ApiEndpoint<{
|
|
|
271
329
|
};
|
|
272
330
|
};
|
|
273
331
|
}>;
|
|
332
|
+
export type PatchPublicApiKey = ApiEndpoint<{
|
|
333
|
+
Audit: AuditPolicy<'api_key', 'updated', 'environment'>;
|
|
334
|
+
Method: 'PATCH';
|
|
335
|
+
Path: '/environments/:environmentUuid/api-keys/:keyUuid';
|
|
336
|
+
Params: {
|
|
337
|
+
environmentUuid: string;
|
|
338
|
+
keyUuid: string;
|
|
339
|
+
};
|
|
340
|
+
Body: {
|
|
341
|
+
display_name?: string;
|
|
342
|
+
scopes?: ApiKeyScope[];
|
|
343
|
+
};
|
|
344
|
+
Success: {
|
|
345
|
+
data: {
|
|
346
|
+
id: number;
|
|
347
|
+
uuid: string;
|
|
348
|
+
display_name: string;
|
|
349
|
+
scopes: ApiKeyScope[];
|
|
350
|
+
last_used_at: string | null;
|
|
351
|
+
created_at: string;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
Error: ApiError<'conflict' | 'not_found'>;
|
|
355
|
+
}>;
|
|
274
356
|
export type DeletePublicApiKey = ApiEndpoint<{
|
|
275
357
|
Audit: AuditPolicy<'api_key', 'deleted', 'environment'>;
|
|
276
358
|
Method: 'DELETE';
|
package/dist/functions/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ApiEndpoint, ApiError } from '../api.js';
|
|
|
2
2
|
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
3
3
|
import type { FunctionCapabilities, FunctionLimits, FunctionRequires, FunctionTags, FunctionTriggerDefinition } from '../function/config.js';
|
|
4
4
|
import type { FunctionSource } from '../syncConfigs/db.js';
|
|
5
|
-
import type { FunctionType, ListedNangoFunction, NangoActionFunction, NangoFunctionTemplate, NangoSyncFunction } from './domain.js';
|
|
5
|
+
import type { FunctionListType, FunctionType, ListedNangoFunction, NangoActionFunction, NangoFunctionTemplate, NangoSyncFunction } from './domain.js';
|
|
6
6
|
import type { JSONSchema7 } from 'json-schema';
|
|
7
7
|
export type RunnableFunctionType = Extract<FunctionType, 'action' | 'sync'>;
|
|
8
8
|
export type FunctionErrorCode = 'invalid_request' | 'server_error' | 'integration_not_found' | 'compilation_error' | 'dryrun_error' | 'deployment_error' | 'connection_not_found' | 'dryrun_not_found' | 'deployment_not_found' | 'function_disabled' | 'execution_environment_unavailable' | 'timeout' | 'validation_error';
|
|
@@ -233,6 +233,8 @@ export interface GetFunctionResponse {
|
|
|
233
233
|
state: 'enabled' | 'disabled';
|
|
234
234
|
source: FunctionSource;
|
|
235
235
|
trigger: FunctionTriggerDefinition;
|
|
236
|
+
input_json_schema: JSONSchema7 | null;
|
|
237
|
+
output_json_schema: JSONSchema7 | null;
|
|
236
238
|
created_at: string;
|
|
237
239
|
updated_at: string;
|
|
238
240
|
}
|
|
@@ -387,7 +389,7 @@ export type GetFunctionInvocation = ApiEndpoint<{
|
|
|
387
389
|
Success: FunctionInvocationSuccess;
|
|
388
390
|
}>;
|
|
389
391
|
export interface FunctionListFilters {
|
|
390
|
-
type?:
|
|
392
|
+
type?: FunctionListType;
|
|
391
393
|
search?: string;
|
|
392
394
|
page?: number;
|
|
393
395
|
limit?: number;
|
|
@@ -435,7 +437,7 @@ export type GetIntegrationFunction = ApiEndpoint<{
|
|
|
435
437
|
Path: '/api/v1/integrations/:providerConfigKey/functions/:functionName';
|
|
436
438
|
Querystring: {
|
|
437
439
|
env: string;
|
|
438
|
-
type?:
|
|
440
|
+
type?: FunctionListType;
|
|
439
441
|
};
|
|
440
442
|
Params: {
|
|
441
443
|
providerConfigKey: string;
|
|
@@ -495,7 +497,7 @@ export type GetPublicIntegrationFunction = ApiEndpoint<{
|
|
|
495
497
|
Method: 'GET';
|
|
496
498
|
Path: '/integrations/:uniqueKey/functions/:name';
|
|
497
499
|
Querystring: {
|
|
498
|
-
type?:
|
|
500
|
+
type?: FunctionListType;
|
|
499
501
|
};
|
|
500
502
|
Params: {
|
|
501
503
|
uniqueKey: string;
|
|
@@ -518,6 +520,26 @@ export type DeletePublicIntegrationFunction = ApiEndpoint<{
|
|
|
518
520
|
Error: ApiError<'function_managed_by_deploy' | 'invalid_request'>;
|
|
519
521
|
Success: FunctionDeletionSuccess;
|
|
520
522
|
}>;
|
|
523
|
+
export type PostToolCall = ApiEndpoint<{
|
|
524
|
+
Audit: {
|
|
525
|
+
kind: 'no-audit';
|
|
526
|
+
reason: 'data-plane operation';
|
|
527
|
+
};
|
|
528
|
+
Method: 'POST';
|
|
529
|
+
Path: '/connections/:connectionId/tools/:name/calls';
|
|
530
|
+
Params: {
|
|
531
|
+
connectionId: string;
|
|
532
|
+
name: string;
|
|
533
|
+
};
|
|
534
|
+
Headers: {
|
|
535
|
+
'provider-config-key'?: string | undefined;
|
|
536
|
+
};
|
|
537
|
+
Body: {
|
|
538
|
+
input?: unknown | undefined;
|
|
539
|
+
};
|
|
540
|
+
Error: ApiError<FunctionInvocationErrorCode | 'ambiguous_connection'>;
|
|
541
|
+
Success: FunctionInvocationSuccess;
|
|
542
|
+
}>;
|
|
521
543
|
export type GetPublicProviderTemplates = ApiEndpoint<{
|
|
522
544
|
Audit: {
|
|
523
545
|
kind: 'no-audit';
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { FunctionTags } from '../function/config.js';
|
|
2
|
+
import type { ToolTags } from '../function/tool.js';
|
|
1
3
|
import type { OnEventType } from '../scripts/on-events/api.js';
|
|
2
4
|
import type { FunctionSource } from '../syncConfigs/db.js';
|
|
3
5
|
import type { JSONSchema7 } from 'json-schema';
|
|
4
6
|
/** `tools-catalog` is list/API only — never a DB `FunctionSource`. */
|
|
5
7
|
export type FunctionListSource = FunctionSource | 'tools-catalog';
|
|
6
8
|
export type FunctionType = 'action' | 'sync' | 'on-event';
|
|
9
|
+
export type FunctionListType = FunctionType | 'tool';
|
|
7
10
|
interface NangoFunctionBase {
|
|
8
11
|
name: string;
|
|
9
12
|
description?: string;
|
|
@@ -40,7 +43,7 @@ export interface FunctionAvailability {
|
|
|
40
43
|
}
|
|
41
44
|
/** A row in a function list. Catalog actions have no deployed row. */
|
|
42
45
|
export interface ListedFunctionAvailability {
|
|
43
|
-
/** Sync-config id. `null` when the function is served from the catalog (no deployed row). */
|
|
46
|
+
/** Sync-config id. `null` when the function is served from the catalog (no deployed row) or is a tool (identified by `uuid`). */
|
|
44
47
|
id: number | null;
|
|
45
48
|
enabled: boolean;
|
|
46
49
|
/** ISO-8601 timestamp. `null` when the function was never deployed. */
|
|
@@ -50,7 +53,19 @@ export interface ListedFunctionAvailability {
|
|
|
50
53
|
export type ListedNangoSyncFunction = NangoSyncFunction & ListedFunctionAvailability;
|
|
51
54
|
export type ListedNangoActionFunction = NangoActionFunction & ListedFunctionAvailability;
|
|
52
55
|
export type ListedNangoOnEventFunction = NangoOnEventFunction & ListedFunctionAvailability;
|
|
53
|
-
export type
|
|
56
|
+
export type ListedNangoToolFunction = NangoFunctionBase & ListedFunctionAvailability & {
|
|
57
|
+
type: 'tool';
|
|
58
|
+
uuid: string;
|
|
59
|
+
integration_id: string;
|
|
60
|
+
provider: string;
|
|
61
|
+
description: string;
|
|
62
|
+
input_json_schema: JSONSchema7 | null;
|
|
63
|
+
output_json_schema: JSONSchema7 | null;
|
|
64
|
+
meta: Pick<ToolTags, 'instructions' | 'required_scopes'> & {
|
|
65
|
+
tags: FunctionTags;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export type ListedNangoFunction = ListedNangoSyncFunction | ListedNangoActionFunction | ListedNangoOnEventFunction | ListedNangoToolFunction;
|
|
54
69
|
export type NangoFunctionTemplate = (NangoSyncFunction | NangoActionFunction) & {
|
|
55
70
|
deployed?: FunctionAvailability;
|
|
56
71
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export type * from './api.endpoints.js';
|
|
|
4
4
|
export type * from './audit-trail/api.js';
|
|
5
5
|
export type * from './audit-trail/event.js';
|
|
6
6
|
export type * from './audit-trail/metadata.js';
|
|
7
|
+
export type * from './analytics/catalogue.js';
|
|
8
|
+
export type * from './analytics/taxonomy.js';
|
|
7
9
|
export type * from './gettingStarted/db.js';
|
|
8
10
|
export type * from './gettingStarted/dto.js';
|
|
9
11
|
export type * from './gettingStarted/api.js';
|
|
@@ -110,7 +112,9 @@ export type * from './mfa/db.js';
|
|
|
110
112
|
export type * from './function/config.js';
|
|
111
113
|
export type * from './function/db.js';
|
|
112
114
|
export type * from './function/trigger.js';
|
|
115
|
+
export type * from './function/tool.js';
|
|
113
116
|
export type * from './functions/api.js';
|
|
114
117
|
export type * from './functions/domain.js';
|
|
115
118
|
export type * from './lambda/index.js';
|
|
116
119
|
export type * from './pubsub/events.js';
|
|
120
|
+
export type { SignupAdvertising } from './account/signupAdvertising.js';
|
|
@@ -6,7 +6,7 @@ import type { ScriptTypeLiteral } from '../nangoYaml/index.js';
|
|
|
6
6
|
import type { Provider } from '../providers/provider.js';
|
|
7
7
|
import type { IntegrationConfig } from './db.js';
|
|
8
8
|
import type { Merge } from 'type-fest';
|
|
9
|
-
export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' | 'updated_at' | 'unique_key' | 'provider' | 'display_name' | 'forward_webhooks'>, ApiTimestamps> & {
|
|
9
|
+
export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' | 'updated_at' | 'unique_key' | 'provider' | 'display_name' | 'forward_webhooks' | 'missing_fields'>, ApiTimestamps> & {
|
|
10
10
|
logo: string;
|
|
11
11
|
} & ApiPublicIntegrationInclude;
|
|
12
12
|
export interface ApiPublicIntegrationInclude {
|
|
@@ -371,22 +371,22 @@ export type GetIntegrationFlows = ApiEndpoint<{
|
|
|
371
371
|
}>;
|
|
372
372
|
export type ApiPublicIntegrationCredentials = {
|
|
373
373
|
type: Extract<AuthModeType, 'OAUTH1' | 'OAUTH2' | 'TBA'>;
|
|
374
|
-
client_id
|
|
375
|
-
client_secret
|
|
374
|
+
client_id?: string | undefined;
|
|
375
|
+
client_secret?: string | undefined;
|
|
376
376
|
scopes?: string | undefined;
|
|
377
377
|
webhook_secret?: string | undefined;
|
|
378
378
|
} | {
|
|
379
379
|
type: Extract<AuthModeType, 'APP'>;
|
|
380
|
-
app_id
|
|
381
|
-
app_link
|
|
382
|
-
private_key
|
|
380
|
+
app_id?: string | undefined;
|
|
381
|
+
app_link?: string | undefined;
|
|
382
|
+
private_key?: string | undefined;
|
|
383
383
|
} | {
|
|
384
384
|
type: Extract<AuthModeType, 'CUSTOM'>;
|
|
385
|
-
client_id
|
|
386
|
-
client_secret
|
|
387
|
-
app_id
|
|
388
|
-
app_link
|
|
389
|
-
private_key
|
|
385
|
+
client_id?: string | undefined;
|
|
386
|
+
client_secret?: string | undefined;
|
|
387
|
+
app_id?: string | undefined;
|
|
388
|
+
app_link?: string | undefined;
|
|
389
|
+
private_key?: string | undefined;
|
|
390
390
|
} | {
|
|
391
391
|
type: Extract<AuthModeType, 'MCP_OAUTH2_GENERIC'>;
|
|
392
392
|
client_name?: string | undefined;
|
package/dist/meta/api.d.ts
CHANGED
package/dist/plans/http.api.d.ts
CHANGED
package/dist/team/api.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface ApiTeamUser extends ApiUser {
|
|
|
28
28
|
mfaEnabled: boolean;
|
|
29
29
|
}
|
|
30
30
|
export type ApiInvitation = Merge<Omit<DBInvitation, 'token'>, ApiTimestamps>;
|
|
31
|
-
export type ApiTeam = Merge<DBTeam, ApiTimestamps>;
|
|
31
|
+
export type ApiTeam = Merge<Omit<DBTeam, 'has_baa'>, ApiTimestamps>;
|
|
32
32
|
export type PutTeam = ApiEndpoint<{
|
|
33
33
|
Audit: AuditPolicy<'team', 'updated', 'account'>;
|
|
34
34
|
Method: 'PUT';
|
package/dist/team/db.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nangohq/types",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.14",
|
|
4
4
|
"description": "Types used in Nango applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"axios": "1.20.0",
|
|
16
16
|
"json-schema": "0.4.0",
|
|
17
|
-
"type-fest": "4.41.0"
|
|
17
|
+
"type-fest": "4.41.0",
|
|
18
|
+
"zod": "4.6.7"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
21
|
"@types/json-schema": "7.0.15"
|