@nangohq/types 0.72.1 → 0.72.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/agent/toolset.d.ts +15 -2
- package/dist/analytics/catalogue.d.ts +58 -2
- package/dist/api-keys/scopes.d.ts +1 -1
- package/dist/api.endpoints.d.ts +4 -4
- package/dist/audit-trail/metadata.d.ts +2 -0
- package/dist/deploy/api.d.ts +7 -0
- package/dist/environment/api/index.d.ts +31 -11
- package/dist/environment/api/webhook.d.ts +12 -11
- package/dist/functions/api.d.ts +10 -4
- package/dist/gettingStarted/api.d.ts +38 -0
- package/dist/gettingStarted/db.d.ts +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/license.d.ts +9 -0
- package/dist/meta/api.d.ts +2 -0
- package/dist/providers/provider.d.ts +1 -1
- package/dist/sharedCredentials/db.d.ts +1 -0
- package/package.json +1 -1
package/dist/agent/toolset.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface AgentSessionIntegrationPolicy {
|
|
|
8
8
|
}
|
|
9
9
|
export type AgentSessionToolsetPolicy = '*' | Readonly<Record<string, AgentSessionIntegrationPolicy>>;
|
|
10
10
|
export type AgentSessionPinnedTools = Readonly<Record<string, readonly string[]>>;
|
|
11
|
-
/** A tool the integration's MCP server listed
|
|
11
|
+
/** A tool the integration's MCP server listed, as opposed to a deployed action. */
|
|
12
12
|
export interface AgentSessionMcpToolDefinition {
|
|
13
13
|
readonly inputSchema: Record<string, unknown>;
|
|
14
14
|
readonly annotations?: Record<string, unknown>;
|
|
@@ -17,14 +17,27 @@ export interface AgentSessionCompiledTool {
|
|
|
17
17
|
readonly name: string;
|
|
18
18
|
readonly description: string;
|
|
19
19
|
readonly mcp?: AgentSessionMcpToolDefinition;
|
|
20
|
+
/**
|
|
21
|
+
* The name the session serves the tool under, stored only for a tool added after the session was
|
|
22
|
+
* created. The rest are named in a fixed order on every request, which a late tool would shift.
|
|
23
|
+
*/
|
|
24
|
+
readonly slug?: string;
|
|
20
25
|
}
|
|
21
26
|
/** `unavailable` means the MCP server could not be listed, so the session carries none of its tools. */
|
|
22
27
|
export type AgentSessionMcpServerStatus = 'available' | 'unavailable';
|
|
28
|
+
/**
|
|
29
|
+
* An MCP server that was not connected when the session was created. It keeps the policy its tools go
|
|
30
|
+
* through once the agent connects it and the server is listed.
|
|
31
|
+
*/
|
|
32
|
+
export interface AgentSessionPendingMcpServer extends AgentSessionIntegrationPolicy {
|
|
33
|
+
readonly status: 'pending';
|
|
34
|
+
readonly pinnedNames: readonly string[];
|
|
35
|
+
}
|
|
23
36
|
export interface AgentSessionCompiledIntegration {
|
|
24
37
|
readonly provider: string;
|
|
25
38
|
readonly pinned: AgentSessionCompiledTool[];
|
|
26
39
|
readonly searchable: AgentSessionCompiledTool[];
|
|
27
|
-
readonly mcpServer?: AgentSessionMcpServerStatus;
|
|
40
|
+
readonly mcpServer?: AgentSessionMcpServerStatus | AgentSessionPendingMcpServer;
|
|
28
41
|
}
|
|
29
42
|
export type AgentSessionCompiledToolset = Record<string, AgentSessionCompiledIntegration>;
|
|
30
43
|
export interface AgentSessionToolNames {
|
|
@@ -264,6 +264,59 @@ export declare const analyticsEventCatalogue: {
|
|
|
264
264
|
readonly fires: "When someone clicks to set up their own integration at the end of Getting Started";
|
|
265
265
|
readonly properties: z.ZodRecord<z.ZodString, z.ZodNever>;
|
|
266
266
|
};
|
|
267
|
+
readonly 'onboarding:copy_prompt_button_click': {
|
|
268
|
+
readonly surface: "web";
|
|
269
|
+
readonly insight: "How many accounts start adding Nango to their own agent from Getting Started";
|
|
270
|
+
readonly fires: "When someone copies the install prompt for their agent on the Getting Started page";
|
|
271
|
+
readonly properties: z.ZodObject<{
|
|
272
|
+
has_api_key: z.ZodBoolean;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
};
|
|
275
|
+
readonly 'onboarding:copy_api_key_button_click': {
|
|
276
|
+
readonly surface: "web";
|
|
277
|
+
readonly insight: "How often people need the API key on its own while installing Nango in their agent";
|
|
278
|
+
readonly fires: "When someone copies the API key on the Getting Started page";
|
|
279
|
+
readonly properties: z.ZodRecord<z.ZodString, z.ZodNever>;
|
|
280
|
+
};
|
|
281
|
+
readonly 'onboarding:playground_link_click': {
|
|
282
|
+
readonly surface: "web";
|
|
283
|
+
readonly insight: "How many accounts try the Agent Playground before installing Nango in their own agent";
|
|
284
|
+
readonly fires: "When someone follows the Agent Playground link on the Getting Started page";
|
|
285
|
+
readonly properties: z.ZodRecord<z.ZodString, z.ZodNever>;
|
|
286
|
+
};
|
|
287
|
+
readonly 'onboarding:try_prompt_button_click': {
|
|
288
|
+
readonly surface: "web";
|
|
289
|
+
readonly insight: "Which integrations people try first with their own agent";
|
|
290
|
+
readonly fires: "When someone copies an example prompt for their agent on the Getting Started page";
|
|
291
|
+
readonly properties: z.ZodObject<{
|
|
292
|
+
integration: z.ZodString;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
};
|
|
295
|
+
readonly 'onboarding:go_further_link_click': {
|
|
296
|
+
readonly surface: "web";
|
|
297
|
+
readonly insight: "Where accounts go after finishing Getting Started";
|
|
298
|
+
readonly fires: "When someone opens a Go further link on the Getting Started page";
|
|
299
|
+
readonly properties: z.ZodObject<{
|
|
300
|
+
destination: z.ZodEnum<{
|
|
301
|
+
catalog: "catalog";
|
|
302
|
+
integrations: "integrations";
|
|
303
|
+
logs: "logs";
|
|
304
|
+
syncs_docs: "syncs_docs";
|
|
305
|
+
}>;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
};
|
|
308
|
+
readonly 'onboarding:restart_button_click': {
|
|
309
|
+
readonly surface: "web";
|
|
310
|
+
readonly insight: "How often accounts start Getting Started over";
|
|
311
|
+
readonly fires: "When someone confirms restarting Getting Started";
|
|
312
|
+
readonly properties: z.ZodRecord<z.ZodString, z.ZodNever>;
|
|
313
|
+
};
|
|
314
|
+
readonly 'onboarding:dismiss_button_click': {
|
|
315
|
+
readonly surface: "web";
|
|
316
|
+
readonly insight: "How many accounts hide Getting Started";
|
|
317
|
+
readonly fires: "When someone hides Getting Started from the sidebar";
|
|
318
|
+
readonly properties: z.ZodRecord<z.ZodString, z.ZodNever>;
|
|
319
|
+
};
|
|
267
320
|
readonly 'connections:create_button_click': {
|
|
268
321
|
readonly surface: "web";
|
|
269
322
|
readonly insight: "How many people start creating a connection, and for which provider";
|
|
@@ -631,7 +684,7 @@ export declare const analyticsEventCatalogue: {
|
|
|
631
684
|
};
|
|
632
685
|
readonly 'agents:tool_call_complete': {
|
|
633
686
|
readonly surface: "server";
|
|
634
|
-
readonly insight: "Which tools do agents call most,
|
|
687
|
+
readonly insight: "Which tools do agents call most, which fail most often, and what the agent was trying to get done with each call";
|
|
635
688
|
readonly fires: "When a tool call in an agent session returns";
|
|
636
689
|
readonly properties: z.ZodObject<{
|
|
637
690
|
tool_name: z.ZodOptional<z.ZodString>;
|
|
@@ -640,6 +693,8 @@ export declare const analyticsEventCatalogue: {
|
|
|
640
693
|
integration_id: z.ZodOptional<z.ZodString>;
|
|
641
694
|
underlying_error_code: z.ZodOptional<z.ZodString>;
|
|
642
695
|
is_mcp_tool: z.ZodOptional<z.ZodBoolean>;
|
|
696
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
697
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
643
698
|
is_success: z.ZodBoolean;
|
|
644
699
|
log_operation_id: z.ZodOptional<z.ZodString>;
|
|
645
700
|
error_code: z.ZodOptional<z.ZodString>;
|
|
@@ -667,10 +722,11 @@ export declare const analyticsEventCatalogue: {
|
|
|
667
722
|
};
|
|
668
723
|
readonly 'agents:tool_search_complete': {
|
|
669
724
|
readonly surface: "server";
|
|
670
|
-
readonly insight: "How often does tool search return a tool the agent then uses
|
|
725
|
+
readonly insight: "How often does tool search return a tool the agent then uses, read against the task the agent was searching for";
|
|
671
726
|
readonly fires: "When a tool search in an agent session returns";
|
|
672
727
|
readonly properties: z.ZodObject<{
|
|
673
728
|
query: z.ZodOptional<z.ZodString>;
|
|
729
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
674
730
|
match_count: z.ZodNumber;
|
|
675
731
|
related_count: z.ZodNumber;
|
|
676
732
|
top_match_confidence: z.ZodOptional<z.ZodNumber>;
|
|
@@ -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: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"];
|
|
7
|
+
export declare const ACCOUNT_API_KEY_SCOPES: readonly ["account:environments:list", "account:environments:read", "account:environments:read_secret", "account:environments:update", "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
|
@@ -14,12 +14,12 @@ 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, GetPublicEnvironment, GetPublicEnvironments, ListApiKeys, PatchApiKey, PatchEnvironment, PatchPublicApiKey, 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, PatchPublicEnvironment, 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
21
|
import type { DeleteFunctionVariant, DeleteIntegrationFunction, DeletePublicIntegrationFunction, GetFunction, GetFunctionDeployment, GetFunctionDryrun, GetFunctionInvocation, GetFunctions, GetIntegrationFunction, GetIntegrationFunctions, GetIntegrationTemplates, GetProviderTemplateCode, GetProviderTemplates, GetPublicIntegrationFunction, GetPublicIntegrationFunctions, GetPublicProviderTemplateCode, GetPublicProviderTemplates, PatchConnectionFunction, PatchFunction, PatchFunctionVariant, PostFunctionCompile, PostFunctionDeployment, PostFunctionDeploymentBundle, PostFunctionDeploymentBundlePreview, PostFunctionDeploymentResult, PostFunctionDryrun, PostFunctionDryrunResult, PostFunctionInvocation, PostFunctionVariant, PostToolCall } from './functions/api.js';
|
|
22
|
-
import type { GetGettingStarted, PatchGettingStarted } from './gettingStarted/api.js';
|
|
22
|
+
import type { GetAgentGettingStarted, GetGettingStarted, PatchGettingStarted, PostAgentGettingStartedDismiss, PostAgentGettingStartedRestart } 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';
|
|
@@ -37,8 +37,8 @@ import type { GetConnectionSyncs, GetPublicSyncStatus, PostPublicSyncPause, Post
|
|
|
37
37
|
import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api.js';
|
|
38
38
|
import type { GetUser, PatchUser, PutUserPassword } from './user/api.js';
|
|
39
39
|
import type { PostPublicWebhook } from './webhooks/http.api.js';
|
|
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 | GetPublicProviderTemplateCode | 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 | GetProviderTemplateCode | 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;
|
|
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 | GetPublicProviderTemplateCode | PostPublicRotateWebhookSigningKey | AllPublicProxy | PostPublicEnvironment | PatchPublicEnvironment | 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 | GetProviderTemplateCode | 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 | GetAgentGettingStarted | PostAgentGettingStartedRestart | PostAgentGettingStartedDismiss | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider | PostInternalInvokeFunction | GetMFAStatus | PostMFAEnrollment | PostMFAActivation | PostMFARecoveryCodes | PostMFALoginVerification | DeleteMFA | GetPlainHmac | PostAgentPlaygroundChat;
|
|
42
42
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
43
43
|
/**
|
|
44
44
|
* Automatically narrow endpoints type with Method + Path
|
package/dist/deploy/api.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
2
|
import type { AuditPolicy } from '../audit-trail/event.js';
|
|
3
|
+
import type { FunctionReconciliationScope } from '../functions/api.js';
|
|
3
4
|
import type { OnEventType } from '../scripts/on-events/api.js';
|
|
4
5
|
import type { FunctionSource } from '../syncConfigs/db.js';
|
|
5
6
|
import type { CLIDeployFlowConfig, OnEventScriptsByProvider } from './incomingFlow.js';
|
|
@@ -17,7 +18,9 @@ export type PostDeployConfirmation = ApiEndpoint<{
|
|
|
17
18
|
onEventScriptsByProvider?: OnEventScriptsByProvider[] | undefined;
|
|
18
19
|
reconcile: boolean;
|
|
19
20
|
debug: boolean;
|
|
21
|
+
/** @deprecated Use reconciliationScope. */
|
|
20
22
|
deployMode?: 'all' | 'single' | 'integration';
|
|
23
|
+
reconciliationScope?: FunctionReconciliationScope | undefined;
|
|
21
24
|
/** @deprecated Use CLIDeployFlowConfig.models_json_schema */
|
|
22
25
|
jsonSchema?: JSONSchema7 | undefined;
|
|
23
26
|
sdkVersion?: string | undefined;
|
|
@@ -34,7 +37,9 @@ export type PostDeploy = ApiEndpoint<{
|
|
|
34
37
|
nangoYamlBody: string;
|
|
35
38
|
reconcile: boolean;
|
|
36
39
|
debug: boolean;
|
|
40
|
+
/** @deprecated Use reconciliationScope. */
|
|
37
41
|
deployMode?: 'all' | 'single' | 'integration';
|
|
42
|
+
reconciliationScope?: FunctionReconciliationScope | undefined;
|
|
38
43
|
/** @deprecated Use CLIDeployFlowConfig.models_json_schema */
|
|
39
44
|
jsonSchema?: JSONSchema7 | undefined;
|
|
40
45
|
sdkVersion?: string | undefined;
|
|
@@ -58,7 +63,9 @@ export type PostDeployInternal = ApiEndpoint<{
|
|
|
58
63
|
nangoYamlBody: string;
|
|
59
64
|
reconcile: boolean;
|
|
60
65
|
debug: boolean;
|
|
66
|
+
/** @deprecated Use reconciliationScope. */
|
|
61
67
|
deployMode?: 'all' | 'single' | 'integration';
|
|
68
|
+
reconciliationScope?: FunctionReconciliationScope | undefined;
|
|
62
69
|
/** @deprecated Use CLIDeployFlowConfig.models_json_schema */
|
|
63
70
|
jsonSchema?: JSONSchema7 | undefined;
|
|
64
71
|
sdkVersion?: string | undefined;
|
|
@@ -4,6 +4,7 @@ import type { AuditPolicy } from '../../audit-trail/event.js';
|
|
|
4
4
|
import type { ApiPlan } from '../../plans/http.api.js';
|
|
5
5
|
import type { DBEnvironment, DBExternalWebhook } from '../db.js';
|
|
6
6
|
import type { ApiEnvironmentVariable } from '../variable/api.js';
|
|
7
|
+
import type { WebhookSettings } from './webhook.js';
|
|
7
8
|
import type { Merge } from 'type-fest';
|
|
8
9
|
export type ApiEnvironment = Merge<DBEnvironment, {
|
|
9
10
|
callback_url: string;
|
|
@@ -94,17 +95,9 @@ export type PostPublicEnvironment = ApiEndpoint<{
|
|
|
94
95
|
name: string;
|
|
95
96
|
value: string;
|
|
96
97
|
}[] | 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;
|
|
98
|
+
webhooks?: (WebhookSettings & {
|
|
106
99
|
signing_key?: string | undefined;
|
|
107
|
-
} | undefined;
|
|
100
|
+
}) | undefined;
|
|
108
101
|
};
|
|
109
102
|
Success: {
|
|
110
103
|
data: {
|
|
@@ -126,6 +119,30 @@ export type PostPublicEnvironment = ApiEndpoint<{
|
|
|
126
119
|
};
|
|
127
120
|
Error: ApiError<'conflict' | 'resource_capped' | 'invalid_is_prod_flag'>;
|
|
128
121
|
}>;
|
|
122
|
+
export type PatchPublicEnvironment = ApiEndpoint<{
|
|
123
|
+
Audit: AuditPolicy<'environment', 'updated', 'environment'>;
|
|
124
|
+
Method: 'PATCH';
|
|
125
|
+
Path: '/environments/:environmentUuid';
|
|
126
|
+
Params: {
|
|
127
|
+
environmentUuid: string;
|
|
128
|
+
};
|
|
129
|
+
Body: {
|
|
130
|
+
name?: string | undefined;
|
|
131
|
+
is_production?: boolean | undefined;
|
|
132
|
+
callback_url?: string | undefined;
|
|
133
|
+
slack_notifications?: boolean | undefined;
|
|
134
|
+
otlp_endpoint?: string | undefined;
|
|
135
|
+
otlp_headers?: {
|
|
136
|
+
name: string;
|
|
137
|
+
value: string;
|
|
138
|
+
}[] | undefined;
|
|
139
|
+
webhooks?: WebhookSettings | undefined;
|
|
140
|
+
};
|
|
141
|
+
Success: {
|
|
142
|
+
success: true;
|
|
143
|
+
};
|
|
144
|
+
Error: ApiError<'conflict' | 'cannot_change_prod_environment_name' | 'cannot_toggle_prod_environment'>;
|
|
145
|
+
}>;
|
|
129
146
|
export type DeletePublicEnvironment = ApiEndpoint<{
|
|
130
147
|
Audit: AuditPolicy<'environment', 'deleted', 'account'>;
|
|
131
148
|
Method: 'DELETE';
|
|
@@ -178,7 +195,7 @@ export type PatchEnvironment = ApiEndpoint<{
|
|
|
178
195
|
Success: {
|
|
179
196
|
data: ApiEnvironment;
|
|
180
197
|
};
|
|
181
|
-
Error: ApiError<'conflict' | 'cannot_toggle_prod_environment'>;
|
|
198
|
+
Error: ApiError<'conflict' | 'cannot_change_prod_environment_name' | 'cannot_toggle_prod_environment'>;
|
|
182
199
|
}>;
|
|
183
200
|
export type DeleteEnvironment = ApiEndpoint<{
|
|
184
201
|
Audit: AuditPolicy<'environment', 'deleted', 'environment'>;
|
|
@@ -202,6 +219,9 @@ export type PostPublicRotateWebhookSigningKey = ApiEndpoint<{
|
|
|
202
219
|
Audit: AuditPolicy<'environment', 'webhook_signing_key_rotated', 'environment'>;
|
|
203
220
|
Method: 'POST';
|
|
204
221
|
Path: '/environment/webhook-signing-key/rotate';
|
|
222
|
+
Body: {
|
|
223
|
+
webhook_signing_key?: string | undefined;
|
|
224
|
+
};
|
|
205
225
|
Success: {
|
|
206
226
|
data: {
|
|
207
227
|
webhook_signing_key: string;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import type { ApiEndpoint } from '../../api.js';
|
|
2
2
|
import type { AuditPolicy } from '../../audit-trail/event.js';
|
|
3
|
+
export interface WebhookSettings {
|
|
4
|
+
primary_url?: string | undefined;
|
|
5
|
+
secondary_url?: string | undefined;
|
|
6
|
+
on_sync_completion_always?: boolean | undefined;
|
|
7
|
+
on_auth_creation?: boolean | undefined;
|
|
8
|
+
on_auth_refresh_error?: boolean | undefined;
|
|
9
|
+
on_sync_error?: boolean | undefined;
|
|
10
|
+
on_async_action_completion?: boolean | undefined;
|
|
11
|
+
on_connection_deletion?: boolean | undefined;
|
|
12
|
+
}
|
|
3
13
|
export type PatchWebhook = ApiEndpoint<{
|
|
4
|
-
Audit: AuditPolicy<'environment', '
|
|
14
|
+
Audit: AuditPolicy<'environment', 'updated', 'environment'>;
|
|
5
15
|
Method: 'PATCH';
|
|
6
16
|
Querystring: {
|
|
7
17
|
env: string;
|
|
8
18
|
};
|
|
9
19
|
Path: '/api/v1/environments/webhook';
|
|
10
|
-
Body:
|
|
11
|
-
primary_url?: string | undefined;
|
|
12
|
-
secondary_url?: string | undefined;
|
|
13
|
-
on_sync_completion_always?: boolean | undefined;
|
|
14
|
-
on_auth_creation?: boolean | undefined;
|
|
15
|
-
on_auth_refresh_error?: boolean | undefined;
|
|
16
|
-
on_sync_error?: boolean | undefined;
|
|
17
|
-
on_async_action_completion?: boolean | undefined;
|
|
18
|
-
on_connection_deletion?: boolean | undefined;
|
|
19
|
-
};
|
|
20
|
+
Body: WebhookSettings;
|
|
20
21
|
Success: {
|
|
21
22
|
success: boolean;
|
|
22
23
|
};
|
package/dist/functions/api.d.ts
CHANGED
|
@@ -102,6 +102,10 @@ export interface FunctionDeploymentCreateSuccess {
|
|
|
102
102
|
status: FunctionDeploymentStatus;
|
|
103
103
|
created_at: string;
|
|
104
104
|
}
|
|
105
|
+
export interface DeployedFunction {
|
|
106
|
+
name: string;
|
|
107
|
+
version?: string | undefined;
|
|
108
|
+
}
|
|
105
109
|
export interface FunctionDeploymentResultSuccess {
|
|
106
110
|
id: string;
|
|
107
111
|
status: FunctionDeploymentStatus;
|
|
@@ -114,10 +118,7 @@ export interface FunctionDeploymentResultSuccess {
|
|
|
114
118
|
completed_at?: string | undefined;
|
|
115
119
|
duration_ms?: number | undefined;
|
|
116
120
|
deployed?: boolean | undefined;
|
|
117
|
-
deployed_functions?:
|
|
118
|
-
name: string;
|
|
119
|
-
version: string;
|
|
120
|
-
}[] | undefined;
|
|
121
|
+
deployed_functions?: DeployedFunction[] | undefined;
|
|
121
122
|
output?: string | undefined;
|
|
122
123
|
error?: ApiError<FunctionErrorCode>['error'] | undefined;
|
|
123
124
|
}
|
|
@@ -636,12 +637,17 @@ export interface FunctionDeploymentArtifact {
|
|
|
636
637
|
js: string;
|
|
637
638
|
ts: string;
|
|
638
639
|
};
|
|
640
|
+
source: Exclude<FunctionSource, 'catalog'>;
|
|
639
641
|
}
|
|
640
642
|
export type FunctionReconciliationScope = {
|
|
641
643
|
kind: 'environment';
|
|
642
644
|
} | {
|
|
643
645
|
kind: 'integration';
|
|
644
646
|
integrationId: string;
|
|
647
|
+
} | {
|
|
648
|
+
kind: 'function';
|
|
649
|
+
integrationId: string;
|
|
650
|
+
name: string;
|
|
645
651
|
};
|
|
646
652
|
export interface FunctionDeploymentBundleBody {
|
|
647
653
|
reconciliationScope: FunctionReconciliationScope;
|
|
@@ -29,3 +29,41 @@ export type PatchGettingStarted = ApiEndpoint<{
|
|
|
29
29
|
Body: PatchGettingStartedProgressInput;
|
|
30
30
|
Error: ApiError<'connection_not_found' | 'getting_started_progress_not_found' | 'failed_to_update_getting_started_progress'>;
|
|
31
31
|
}>;
|
|
32
|
+
export interface ApiAgentGettingStarted {
|
|
33
|
+
first_agent_connection_at: string | null;
|
|
34
|
+
first_tool_call_at: string | null;
|
|
35
|
+
dismissed_at: string | null;
|
|
36
|
+
}
|
|
37
|
+
export type GetAgentGettingStarted = ApiEndpoint<{
|
|
38
|
+
Audit: {
|
|
39
|
+
kind: 'no-audit';
|
|
40
|
+
reason: 'non-auditable';
|
|
41
|
+
};
|
|
42
|
+
Method: 'GET';
|
|
43
|
+
Path: '/api/v1/agent-getting-started';
|
|
44
|
+
Success: {
|
|
45
|
+
data: ApiAgentGettingStarted;
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
export type PostAgentGettingStartedRestart = ApiEndpoint<{
|
|
49
|
+
Audit: {
|
|
50
|
+
kind: 'no-audit';
|
|
51
|
+
reason: 'non-auditable';
|
|
52
|
+
};
|
|
53
|
+
Method: 'POST';
|
|
54
|
+
Path: '/api/v1/agent-getting-started/restart';
|
|
55
|
+
Success: {
|
|
56
|
+
data: ApiAgentGettingStarted;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
export type PostAgentGettingStartedDismiss = ApiEndpoint<{
|
|
60
|
+
Audit: {
|
|
61
|
+
kind: 'no-audit';
|
|
62
|
+
reason: 'non-auditable';
|
|
63
|
+
};
|
|
64
|
+
Method: 'POST';
|
|
65
|
+
Path: '/api/v1/agent-getting-started/dismiss';
|
|
66
|
+
Success: {
|
|
67
|
+
data: ApiAgentGettingStarted;
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
@@ -8,6 +8,16 @@ export interface DBGettingStartedMeta extends Timestamps {
|
|
|
8
8
|
environment_id: number;
|
|
9
9
|
integration_id: number;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* One per account. Progress of the agent-first getting started flow, shared by everyone in the account.
|
|
13
|
+
* Each timestamp is set the first time its event happens.
|
|
14
|
+
*/
|
|
15
|
+
export interface DBAccountGettingStarted extends Timestamps {
|
|
16
|
+
account_id: number;
|
|
17
|
+
first_agent_connection_at: Date | null;
|
|
18
|
+
first_tool_call_at: Date | null;
|
|
19
|
+
dismissed_at: Date | null;
|
|
20
|
+
}
|
|
11
21
|
/**
|
|
12
22
|
* One per user. Holds progress for each user in the getting started flow.
|
|
13
23
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ export type * from './web/env.js';
|
|
|
101
101
|
export type * from './fleet/api.js';
|
|
102
102
|
export type * from './fleet/index.js';
|
|
103
103
|
export type * from './internal-auth.js';
|
|
104
|
+
export type * from './license.js';
|
|
104
105
|
export type * from './persist/api.js';
|
|
105
106
|
export type * from './jobs/api.js';
|
|
106
107
|
export type * from './checkpoint/types.js';
|
package/dist/meta/api.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export type GetMeta = ApiEndpoint<{
|
|
|
27
27
|
baseUrl: string;
|
|
28
28
|
debugMode: boolean;
|
|
29
29
|
gettingStartedClosed: boolean;
|
|
30
|
+
/** Getting started was hidden for the whole account */
|
|
31
|
+
gettingStartedDismissed: boolean;
|
|
30
32
|
auditTrail: boolean;
|
|
31
33
|
toolsCatalog: boolean;
|
|
32
34
|
accountGroup: AccountGroupProperties;
|
|
@@ -103,7 +103,7 @@ export interface BaseProvider {
|
|
|
103
103
|
body_format?: OAuthBodyFormatType;
|
|
104
104
|
require_client_certificate?: boolean;
|
|
105
105
|
allow_unverified_https?: boolean;
|
|
106
|
-
token_request_auth_method?: 'basic' | 'custom' | 'private_key_jwt';
|
|
106
|
+
token_request_auth_method?: 'basic' | 'custom' | 'private_key_jwt' | 'none';
|
|
107
107
|
available_scopes?: string[];
|
|
108
108
|
}
|
|
109
109
|
export interface ProviderOAuth2 extends BaseProvider {
|