@nangohq/types 0.71.11 → 0.71.12

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.
@@ -0,0 +1,29 @@
1
+ import type { ApiEndpoint, ApiError } from '../api.js';
2
+ export interface AgentPlaygroundUsage {
3
+ inputTokens: number;
4
+ outputTokens: number;
5
+ }
6
+ export interface AgentPlaygroundMessageMetadata {
7
+ sessionId?: string;
8
+ hidden?: boolean;
9
+ usage?: AgentPlaygroundUsage;
10
+ }
11
+ export type AgentPlaygroundErrorCode = 'feature_disabled' | 'session_creation_failed' | 'model_error';
12
+ export type PostAgentPlaygroundChat = ApiEndpoint<{
13
+ Audit: {
14
+ kind: 'no-audit';
15
+ reason: 'TODO: audit coverage pending';
16
+ };
17
+ Method: 'POST';
18
+ Path: '/api/v1/agent-playground/chat';
19
+ Querystring: {
20
+ env: string;
21
+ };
22
+ Body: {
23
+ sessionId?: string | undefined;
24
+ messages: unknown[];
25
+ timeZone?: string | undefined;
26
+ };
27
+ Success: Record<string, unknown>;
28
+ Error: ApiError<AgentPlaygroundErrorCode>;
29
+ }>;
@@ -3,6 +3,7 @@ import type { GetAsyncActionResult, GetPublicV1, PostInternalTriggerFunction, Po
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';
6
+ import type { PostAgentPlaygroundChat } from './agent/playground.api.js';
6
7
  import type { EndpointMethod } from './api.js';
7
8
  import type { GetAuditTrail, GetAuditTrailExport } from './audit-trail/api.js';
8
9
  import type { PostPublicApiKeyAuthorization, PostPublicAwsSigV4Authorization, PostPublicBasicAuthorization, PostPublicBillAuthorization, PostPublicJwtAuthorization, PostPublicOauthOutboundAuthorization, PostPublicSignatureAuthorization, PostPublicTbaAuthorization, PostPublicTwoStepAuthorization, PostPublicUnauthenticatedAuthorization } from './auth/http.api.js';
@@ -36,7 +37,7 @@ import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api
36
37
  import type { GetUser, PatchUser, PutUserPassword } from './user/api.js';
37
38
  import type { PostPublicWebhook } from './webhooks/http.api.js';
38
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 | GetFunctionInvocation | PostFunctionDeploymentBundle | PostFunctionDeploymentBundlePreview | GetPublicFunctionCode | GetPublicIntegrationFunctions | GetPublicIntegrationFunction | DeletePublicIntegrationFunction | GetPublicProviderTemplates | PostPublicRotateWebhookSigningKey | AllPublicProxy | PostPublicEnvironment | DeletePublicEnvironment | GetPublicEnvironments | GetPublicApiKey | GetPublicApiKeys | PostPublicApiKey | DeletePublicApiKey;
39
- 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 | PostInternalTriggerFunction | GetMFAStatus | PostMFAEnrollment | PostMFAActivation | PostMFARecoveryCodes | PostMFALoginVerification | DeleteMFA | GetPlainHmac;
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 | PostInternalTriggerFunction | GetMFAStatus | PostMFAEnrollment | PostMFAActivation | PostMFARecoveryCodes | PostMFALoginVerification | DeleteMFA | GetPlainHmac | PostAgentPlaygroundChat;
40
41
  export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
41
42
  /**
42
43
  * Automatically narrow endpoints type with Method + Path
package/dist/cli/api.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import type { ApiEndpoint } from '../api.js';
2
- export type CliTelemetryEvent = 'cli:init' | 'cli:create' | 'cli:compile' | 'cli:dev' | 'cli:dryrun' | 'cli:generate:docs' | 'cli:generate:tests' | 'cli:clone' | 'cli:migrate_to_zero_yaml' | 'cli:deploy' | 'cli:pull';
2
+ export type CliTelemetryCommand = 'init' | 'create' | 'compile' | 'dev' | 'dryrun' | 'generate:docs' | 'generate:tests' | 'clone' | 'migrate-to-zero-yaml' | 'deploy' | 'pull';
3
+ /** Released CLIs still send these, so the endpoint keeps accepting them. */
4
+ export type LegacyCliTelemetryEvent = 'cli:init' | 'cli:create' | 'cli:compile' | 'cli:dev' | 'cli:dryrun' | 'cli:generate:docs' | 'cli:generate:tests' | 'cli:clone' | 'cli:migrate_to_zero_yaml' | 'cli:deploy' | 'cli:pull';
3
5
  export type PostCliTelemetry = ApiEndpoint<{
4
6
  Audit: {
5
7
  kind: 'no-audit';
@@ -9,8 +11,13 @@ export type PostCliTelemetry = ApiEndpoint<{
9
11
  Path: '/cli/telemetry';
10
12
  Body: {
11
13
  deviceId: string;
12
- event: CliTelemetryEvent;
13
14
  ephemeral?: boolean;
14
- };
15
+ } & ({
16
+ command: CliTelemetryCommand;
17
+ event?: never;
18
+ } | {
19
+ event: LegacyCliTelemetryEvent;
20
+ command?: never;
21
+ });
15
22
  Success: never;
16
23
  }>;
@@ -288,11 +288,12 @@ export type PostFunctionInvocation = ApiEndpoint<{
288
288
  reason: 'non-auditable';
289
289
  };
290
290
  Method: 'POST';
291
- Path: '/functions/invocations';
291
+ Path: '/connections/:connectionId/functions/:functionUuid/invocations';
292
+ Params: {
293
+ connectionId: string;
294
+ functionUuid: string;
295
+ };
292
296
  Body: {
293
- connection_id: string;
294
- integration_id: string;
295
- name: string;
296
297
  input?: unknown | undefined;
297
298
  invocation_type: FunctionInvocationType;
298
299
  options?: Record<string, unknown> | undefined;
@@ -306,11 +307,13 @@ export type GetFunctionInvocation = ApiEndpoint<{
306
307
  reason: 'non-auditable';
307
308
  };
308
309
  Method: 'GET';
309
- Path: '/functions/invocations/:id';
310
+ Path: '/connections/:connectionId/functions/:functionUuid/invocations/:id';
310
311
  Params: {
312
+ connectionId: string;
313
+ functionUuid: string;
311
314
  id: string;
312
315
  };
313
- Error: ApiError<'invalid_uri_params' | 'not_found' | 'function_failed' | 'server_error'>;
316
+ Error: ApiError<'invalid_uri_params' | 'not_found' | 'function_not_found' | 'connection_not_found' | 'function_failed' | 'server_error'>;
314
317
  Success: FunctionInvocationSuccess;
315
318
  }>;
316
319
  export interface FunctionListFilters {
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export type * from './action/api.js';
15
15
  export type * from './agent/api.js';
16
16
  export type * from './agent/connections.js';
17
17
  export type * from './agent/mcp.api.js';
18
+ export type * from './agent/playground.api.js';
18
19
  export type * from './agent/session.js';
19
20
  export type * from './agent/toolSearch.js';
20
21
  export type * from './agent/toolset.js';
@@ -325,6 +325,7 @@ export type PatchIntegration = ApiEndpoint<{
325
325
  webhookSecret?: string | undefined;
326
326
  displayName?: string | undefined;
327
327
  forward_webhooks?: boolean | undefined;
328
+ allow_unverified_webhooks?: boolean | undefined;
328
329
  integrationConfig?: Record<string, string> | undefined;
329
330
  } | IntegrationAuthBody;
330
331
  Success: {
@@ -16,8 +16,9 @@ export interface IntegrationConfig extends TimestampsAndDeleted {
16
16
  missing_fields: string[];
17
17
  display_name: string | null;
18
18
  forward_webhooks: boolean;
19
+ allow_unverified_webhooks: boolean;
19
20
  shared_credentials_id: number | null;
20
21
  }
21
22
  export type DBIntegrationDecrypted = IntegrationConfig;
22
23
  export type DBIntegrationCrypted = Tagged<IntegrationConfig, 'IntegrationCrypted'>;
23
- export type DBCreateIntegration = SetOptional<NullablePartial<Omit<IntegrationConfig, 'created_at' | 'updated_at'>>, 'missing_fields'>;
24
+ export type DBCreateIntegration = SetOptional<NullablePartial<Omit<IntegrationConfig, 'created_at' | 'updated_at'>>, 'missing_fields' | 'allow_unverified_webhooks'>;
@@ -5,6 +5,7 @@ export type AccountGroupProperties = {
5
5
  name?: string;
6
6
  plan?: string;
7
7
  created_date?: string;
8
+ is_internal?: boolean;
8
9
  };
9
10
  export type GetMeta = ApiEndpoint<{
10
11
  Audit: {
@@ -26,6 +27,7 @@ export type GetMeta = ApiEndpoint<{
26
27
  gettingStartedClosed: boolean;
27
28
  auditTrail: boolean;
28
29
  accountGroup: AccountGroupProperties;
30
+ agentPlayground: boolean;
29
31
  };
30
32
  };
31
33
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.71.11",
3
+ "version": "0.71.12",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",