@nangohq/types 0.71.4 → 0.71.5

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.
Files changed (40) hide show
  1. package/dist/account/api.d.ts +48 -2
  2. package/dist/action/api.d.ts +4 -0
  3. package/dist/admin/http.api.d.ts +1 -1
  4. package/dist/agent/api.d.ts +88 -0
  5. package/dist/agent/connections.d.ts +44 -0
  6. package/dist/agent/mcp.api.d.ts +28 -0
  7. package/dist/agent/session.d.ts +20 -0
  8. package/dist/agent/toolset.d.ts +43 -0
  9. package/dist/api-keys/scopes.d.ts +9 -4
  10. package/dist/api.endpoints.d.ts +9 -7
  11. package/dist/audit-trail/api.d.ts +19 -7
  12. package/dist/audit-trail/event.d.ts +20 -3
  13. package/dist/auth/http.api.d.ts +11 -40
  14. package/dist/authz/types.d.ts +1 -1
  15. package/dist/billing/types.d.ts +46 -0
  16. package/dist/connection/api/get.d.ts +1 -1
  17. package/dist/connection/api/metadata.d.ts +8 -2
  18. package/dist/environment/api/index.d.ts +86 -0
  19. package/dist/function/trigger.d.ts +61 -0
  20. package/dist/functions/api.d.ts +35 -0
  21. package/dist/index.d.ts +8 -2
  22. package/dist/keystore/index.d.ts +10 -2
  23. package/dist/logs/messages.d.ts +23 -2
  24. package/dist/mfa/api.d.ts +2 -7
  25. package/dist/mfa/credential.d.ts +7 -0
  26. package/dist/mfa/db.d.ts +1 -0
  27. package/dist/persist/api.d.ts +1 -1
  28. package/dist/plans/db.d.ts +20 -0
  29. package/dist/plans/http.api.d.ts +109 -0
  30. package/dist/pubsub/events.d.ts +2 -2
  31. package/dist/runner/sdk.d.ts +1 -1
  32. package/dist/sharedCredentials/api.d.ts +2 -0
  33. package/dist/sharedCredentials/db.d.ts +1 -0
  34. package/dist/sharedCredentials/dto.d.ts +1 -1
  35. package/dist/stripe/http.api.d.ts +3 -0
  36. package/dist/sync/api.d.ts +1 -1
  37. package/dist/usage/index.d.ts +1 -1
  38. package/dist/user/api.d.ts +5 -1
  39. package/dist/web/env.d.ts +3 -0
  40. package/package.json +1 -1
@@ -44,6 +44,7 @@ export interface SharedCredentialsBodyInput {
44
44
  client_id: string;
45
45
  client_secret: string;
46
46
  scopes?: string | undefined;
47
+ app_link?: string | undefined;
47
48
  }
48
49
  export interface SharedCredentialsOutput {
49
50
  id: number;
@@ -52,6 +53,7 @@ export interface SharedCredentialsOutput {
52
53
  client_id: string;
53
54
  client_secret: string;
54
55
  scopes?: string | undefined;
56
+ app_link?: string | undefined;
55
57
  };
56
58
  created_at: string;
57
59
  updated_at: string;
@@ -5,6 +5,7 @@ export interface SharedCredentials {
5
5
  oauth_scopes?: string;
6
6
  oauth_client_secret_iv: string;
7
7
  oauth_client_secret_tag: string;
8
+ app_link?: string;
8
9
  }
9
10
  export interface DBSharedCredentials extends Timestamps {
10
11
  id: number;
@@ -1,2 +1,2 @@
1
1
  import type { SharedCredentials } from './db.js';
2
- export type SharedCredentialsInputDto = Pick<SharedCredentials, 'oauth_client_id' | 'oauth_client_secret' | 'oauth_scopes'>;
2
+ export type SharedCredentialsInputDto = Pick<SharedCredentials, 'oauth_client_id' | 'oauth_client_secret' | 'oauth_scopes' | 'app_link'>;
@@ -12,7 +12,10 @@ export type PostStripeCollectPayment = ApiEndpoint<{
12
12
  }>;
13
13
  export interface StripePaymentMethod {
14
14
  id: string;
15
+ brand: string;
15
16
  last4: string;
17
+ expMonth: number;
18
+ expYear: number;
16
19
  }
17
20
  export type GetStripePaymentMethods = ApiEndpoint<{
18
21
  Audit: {
@@ -4,7 +4,7 @@ import type { ReportedSyncJobStatus } from './index.js';
4
4
  export type PostPublicTrigger = ApiEndpoint<{
5
5
  Audit: {
6
6
  kind: 'no-audit';
7
- reason: 'TODO: audit coverage pending';
7
+ reason: 'data-plane operation';
8
8
  };
9
9
  Method: 'POST';
10
10
  Path: '/sync/trigger';
@@ -1,4 +1,4 @@
1
- export type UsageMetric = 'proxy' | 'connections' | 'function_executions' | 'function_compute_gbms' | 'records' | 'webhook_forwards' | 'function_logs' | 'data_transfer';
1
+ export type UsageMetric = 'proxy' | 'connections' | 'function_executions' | 'function_compute_gbms' | 'function_duration_seconds' | 'records' | 'webhook_forwards' | 'function_logs' | 'data_transfer';
2
2
  export interface MetricUsageSummary {
3
3
  label: string;
4
4
  usage: number;
@@ -1,5 +1,6 @@
1
- import type { ApiEndpoint, Endpoint } from '../api.js';
1
+ import type { ApiEndpoint, ApiError, Endpoint } from '../api.js';
2
2
  import type { AuditPolicy } from '../audit-trail/event.js';
3
+ import type { MFACredential } from '../mfa/credential.js';
3
4
  import type { Role } from './db.js';
4
5
  export type GetUser = ApiEndpoint<{
5
6
  Audit: {
@@ -47,6 +48,7 @@ export type AllowedPermissions = Partial<Record<string, Partial<Record<'producti
47
48
  export type ApiUserWithPermissions = ApiUser & {
48
49
  role: Role;
49
50
  permissions: AllowedPermissions;
51
+ hasPassword: boolean;
50
52
  };
51
53
  export type PutUserPassword = ApiEndpoint<{
52
54
  Audit: AuditPolicy<'app_auth', 'password_changed', 'account'>;
@@ -55,7 +57,9 @@ export type PutUserPassword = ApiEndpoint<{
55
57
  Body: {
56
58
  oldPassword: string;
57
59
  newPassword: string;
60
+ mfa?: MFACredential | undefined;
58
61
  };
62
+ Error: ApiError<'incorrect_password'> | ApiError<'invalid_mfa_code'> | ApiError<'mfa_code_required'>;
59
63
  Success: {
60
64
  success: true;
61
65
  };
package/dist/web/env.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  export interface WindowEnv {
2
+ /** Public API host: OAuth callbacks, webhooks, and the `apiURL` handed to the SDK / Connect UI. */
2
3
  apiUrl: string;
4
+ /** Where the dashboard sends its own API requests. Equals `apiUrl` unless NANGO_DASHBOARD_API_URL is set. `/` means same-origin. */
5
+ dashboardApiUrl: string;
3
6
  publicUrl: string;
4
7
  connectUrl: string;
5
8
  gitHash: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.71.4",
3
+ "version": "0.71.5",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",