@nangohq/types 0.71.8 → 0.71.10

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.
@@ -207,6 +207,7 @@ export type PostManagedSignup = ApiEndpoint<{
207
207
  Body: {
208
208
  provider: 'GoogleOAuth';
209
209
  token?: string | undefined;
210
+ returnTo?: string | undefined;
210
211
  };
211
212
  Success: {
212
213
  data: {
package/dist/api.d.ts CHANGED
@@ -14,7 +14,7 @@ export interface ValidationError {
14
14
  path: (string | number)[];
15
15
  }
16
16
  export type ResDefaultErrors = ApiError<'invalid_content_type'> | ApiError<'not_found'> | ApiError<'disabled_resource'> | ApiError<'conflict'> | ApiError<'plan_limit'> | ApiError<'forbidden'> | ApiError<'invalid_query_params', ValidationError[]> | ApiError<'invalid_headers', ValidationError[]> | ApiError<'invalid_body', ValidationError[]> | ApiError<'invalid_uri_params', ValidationError[]> | ApiError<'feature_disabled'> | ApiError<'generic_error_support', undefined, string> | ApiError<'server_error'> | ApiError<'resource_capped'> | ApiError<'missing_auth_header'> | ApiError<'malformed_auth_header'> | ApiError<'unknown_account'> | ApiError<'unknown_connect_session_token'> | ApiError<'invalid_cli_version'> | ApiError<'invalid_permissions'> | ApiError<'invalid_connect_session_token_format'> | ApiError<'request_too_large'>;
17
- export type EndpointMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
17
+ export type EndpointMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'PROPFIND' | 'REPORT';
18
18
  /**
19
19
  * API Request/Response type
20
20
  */
package/dist/index.d.ts CHANGED
@@ -60,6 +60,7 @@ export type * from './integration/db.js';
60
60
  export type * from './providers/provider.js';
61
61
  export type * from './auth/api.js';
62
62
  export type * from './oauthSessions/db.js';
63
+ export type * from './oauth-server/api.js';
63
64
  export type * from './auth/http.api.js';
64
65
  export type * from './deploy/api.js';
65
66
  export type * from './deploy/index.js';
@@ -13,6 +13,7 @@ export interface ApiPublicIntegrationInclude {
13
13
  webhook_url?: string | null;
14
14
  credentials_label?: Record<string, string> | undefined;
15
15
  preconfigured_credentials?: string[] | undefined;
16
+ preconfigured_connection_config?: string[] | undefined;
16
17
  credentials?: {
17
18
  type: AuthModes['OAuth2'] | AuthModes['OAuth1'] | AuthModes['TBA'];
18
19
  client_id: string | null;
@@ -1,7 +1,7 @@
1
1
  import type { OnEventType } from '../scripts/on-events/api.js';
2
2
  import type { Feature } from '../syncConfigs/db.js';
3
3
  import type { JSONSchema7 } from 'json-schema';
4
- export type HTTP_METHOD = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
4
+ export type HTTP_METHOD = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'PROPFIND' | 'REPORT';
5
5
  /** @deprecated **/
6
6
  export type SyncTypeLiteral = 'incremental' | 'full';
7
7
  export type ScriptFileType = 'actions' | 'syncs' | 'on-events' | 'functions' | 'webhooks' | 'post-connection-scripts';
@@ -0,0 +1,126 @@
1
+ import type { ApiError, ValidationError } from '../api.js';
2
+ export type OAuthConsentErrorCode = 'interaction_expired' | 'interaction_completed' | 'interaction_invalid' | 'login_required' | 'invalid_origin' | 'user_suspended' | 'account_unavailable';
3
+ export interface OAuthConsentResource {
4
+ hostname: string;
5
+ scopes: string[];
6
+ }
7
+ export interface OAuthConsentInteraction {
8
+ client: {
9
+ name: string;
10
+ hostname: string;
11
+ };
12
+ redirectUri: string;
13
+ account: {
14
+ name: string;
15
+ };
16
+ resource: OAuthConsentResource;
17
+ }
18
+ export interface GetOAuthConsentInteraction {
19
+ Audit: {
20
+ kind: 'no-audit';
21
+ reason: 'read-only interaction lookup';
22
+ };
23
+ Params: {
24
+ uid: string;
25
+ };
26
+ Reply: {
27
+ status: 200;
28
+ body: {
29
+ data: OAuthConsentInteraction;
30
+ };
31
+ } | {
32
+ status: 202;
33
+ body: {
34
+ data: {
35
+ resumeUrl: string;
36
+ };
37
+ };
38
+ } | {
39
+ status: 204;
40
+ body: never;
41
+ } | {
42
+ status: 401;
43
+ body: ApiError<'login_required'>;
44
+ } | {
45
+ status: 403;
46
+ body: ApiError<'user_suspended' | 'account_unavailable'>;
47
+ } | {
48
+ status: 404;
49
+ body: ApiError<'interaction_invalid'>;
50
+ } | {
51
+ status: 409;
52
+ body: ApiError<'interaction_completed'>;
53
+ } | {
54
+ status: 410;
55
+ body: ApiError<'interaction_expired'>;
56
+ };
57
+ }
58
+ export interface PostOAuthConsentLogin {
59
+ Audit: {
60
+ kind: 'no-audit';
61
+ reason: 'OAuth protocol state';
62
+ };
63
+ Params: {
64
+ uid: string;
65
+ };
66
+ Body: never;
67
+ Reply: {
68
+ status: 200;
69
+ body: {
70
+ data: {
71
+ resumeUrl: string;
72
+ };
73
+ };
74
+ } | {
75
+ status: 400;
76
+ body: ApiError<'invalid_body', ValidationError[]>;
77
+ } | {
78
+ status: 401;
79
+ body: ApiError<'login_required'>;
80
+ } | {
81
+ status: 403;
82
+ body: ApiError<'invalid_origin' | 'user_suspended' | 'account_unavailable'>;
83
+ } | {
84
+ status: 404;
85
+ body: ApiError<'interaction_invalid'>;
86
+ } | {
87
+ status: 409;
88
+ body: ApiError<'interaction_completed'>;
89
+ } | {
90
+ status: 410;
91
+ body: ApiError<'interaction_expired'>;
92
+ };
93
+ }
94
+ export interface PostOAuthConsentDecision {
95
+ Audit: {
96
+ kind: 'no-audit';
97
+ reason: 'TODO: audit coverage pending';
98
+ };
99
+ Params: {
100
+ uid: string;
101
+ };
102
+ Body: never;
103
+ Reply: {
104
+ status: 200;
105
+ body: {
106
+ data: {
107
+ resumeUrl: string;
108
+ };
109
+ };
110
+ } | {
111
+ status: 400;
112
+ body: ApiError<'invalid_body', ValidationError[]>;
113
+ } | {
114
+ status: 403;
115
+ body: ApiError<'invalid_origin' | 'interaction_invalid' | 'user_suspended' | 'account_unavailable'>;
116
+ } | {
117
+ status: 404;
118
+ body: ApiError<'interaction_invalid'>;
119
+ } | {
120
+ status: 409;
121
+ body: ApiError<'interaction_completed'>;
122
+ } | {
123
+ status: 410;
124
+ body: ApiError<'interaction_expired'>;
125
+ };
126
+ }
@@ -46,7 +46,7 @@ export interface BaseProxyConfiguration {
46
46
  }
47
47
  export interface UserProvidedProxyConfiguration extends BaseProxyConfiguration {
48
48
  decompress?: boolean | string;
49
- method?: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'get' | 'post' | 'patch' | 'put' | 'delete';
49
+ method?: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'PROPFIND' | 'REPORT' | 'get' | 'post' | 'patch' | 'put' | 'delete' | 'propfind' | 'report';
50
50
  paginate?: Partial<CursorPagination> | Partial<LinkPagination> | Partial<OffsetPagination>;
51
51
  }
52
52
  export type ConnectionForProxy = Pick<DBConnectionDecrypted, 'connection_id' | 'connection_config' | 'metadata'> & {
@@ -23,6 +23,7 @@ export interface NangoProps {
23
23
  lastSyncDate?: Date;
24
24
  syncId?: string | undefined;
25
25
  syncVariant?: string | undefined;
26
+ variant?: string | undefined;
26
27
  nangoConnectionId: number;
27
28
  syncJobId?: number | undefined;
28
29
  track_deletes?: boolean;
package/dist/web/env.d.ts CHANGED
@@ -3,6 +3,8 @@ export interface WindowEnv {
3
3
  apiUrl: string;
4
4
  /** Where the dashboard sends its own API requests. Equals `apiUrl` unless NANGO_DASHBOARD_API_URL is set. `/` means same-origin. */
5
5
  dashboardApiUrl: string;
6
+ /** OAuth authorization-server issuer used by the browser consent API. */
7
+ oauthServerUrl: string | undefined;
6
8
  publicUrl: string;
7
9
  connectUrl: string;
8
10
  gitHash: string | undefined;
@@ -34,6 +34,7 @@ export interface LegacyDispatchMessage extends DispatchMessageBase {
34
34
  }
35
35
  export interface FunctionDispatchMessage extends DispatchMessageBase {
36
36
  kind: 'function';
37
+ functionConfigId: number;
37
38
  /** Deterministic key used to deduplicate queue redeliveries. */
38
39
  idempotencyKey: string;
39
40
  functionName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.71.8",
3
+ "version": "0.71.10",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",