@nangohq/types 0.69.3 → 0.69.4

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/api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { RunnerOutputError } from './runner/index.js';
1
2
  export interface ApiError<TCode extends string, TErrors = Error[] | ValidationError[] | undefined, TPayload = unknown> {
2
3
  error: {
3
4
  code: TCode;
@@ -67,6 +68,10 @@ export interface Endpoint<T extends EndpointDefinition> {
67
68
  export interface ErrorPayload {
68
69
  type: string;
69
70
  description: string;
71
+ payload?: RunnerOutputError['payload'];
72
+ }
73
+ export interface SyncErrorPayload extends ErrorPayload {
74
+ additional_properties?: RunnerOutputError['additional_properties'];
70
75
  }
71
76
  export interface ApiTimestamps {
72
77
  created_at: string;
@@ -15,6 +15,7 @@ export interface AuthModes {
15
15
  TwoStep: 'TWO_STEP';
16
16
  Signature: 'SIGNATURE';
17
17
  MCP_OAUTH2: 'MCP_OAUTH2';
18
+ MCP_OAUTH2_GENERIC: 'MCP_OAUTH2_GENERIC';
18
19
  }
19
20
  export type AuthModeType = AuthModes[keyof AuthModes];
20
21
  export type AuthOperationType = 'creation' | 'override' | 'refresh' | 'unknown';
@@ -176,6 +176,11 @@ export type PatchIntegration = Endpoint<{
176
176
  } | {
177
177
  authType: Extract<AuthModeType, 'MCP_OAUTH2'>;
178
178
  scopes?: string | undefined;
179
+ } | {
180
+ authType: Extract<AuthModeType, 'MCP_OAUTH2_GENERIC'>;
181
+ clientName?: string | undefined;
182
+ clientUri?: string | undefined;
183
+ clientLogoUri?: string | undefined;
179
184
  };
180
185
  Success: {
181
186
  data: {
@@ -21,6 +21,38 @@ export interface DBPlan extends Timestamps {
21
21
  * @default null
22
22
  */
23
23
  connections_max: number | null;
24
+ /**
25
+ * Limit the number of total non-deleted records
26
+ * Set to null to remove limit
27
+ * @default null
28
+ */
29
+ records_max: number | null;
30
+ /**
31
+ * Limit the number of total proxy requests that can be made in a month
32
+ * Set to null to remove limit
33
+ * @default null
34
+ */
35
+ proxy_max: number | null;
36
+ /** Limit the number of function executions that can be triggered in a month
37
+ * Set to null to remove limit
38
+ * @default null
39
+ */
40
+ function_executions_max: number | null;
41
+ /** Limit the amount of compute time (in gb/ms) that can be used by functions in a month
42
+ * Set to null to remove limit
43
+ * @default null
44
+ */
45
+ function_compute_gbms_max: number | null;
46
+ /** Limit the number of external webhooks that can be triggered in a month
47
+ * Set to null to remove limit
48
+ * @default null
49
+ */
50
+ external_webhooks_max: number | null;
51
+ /** Limit the number of log entries in functions that can be created in a month
52
+ * Set to null to remove limit
53
+ * @default null
54
+ */
55
+ function_logs_max: number | null;
24
56
  /**
25
57
  * Limit the number of environments that can be created
26
58
  * @default 2
@@ -1,5 +1,5 @@
1
1
  import type { BillingCustomer, BillingUsageMetric } from '../billing/types.js';
2
- import type { AccountMetricsUsageSummary } from '../usage/dto.js';
2
+ import type { MetricUsageSummary } from '../usage/dto.js';
3
3
  import type { ReplaceInObject } from '../utils.js';
4
4
  import type { DBPlan } from './db.js';
5
5
  import type { Endpoint } from '../api.js';
@@ -68,7 +68,7 @@ export type GetUsage = Endpoint<{
68
68
  env: string;
69
69
  };
70
70
  Success: {
71
- data: AccountMetricsUsageSummary;
71
+ data: Record<string, MetricUsageSummary>;
72
72
  };
73
73
  }>;
74
74
  export type GetBillingUsage = Endpoint<{
@@ -121,6 +121,9 @@ export interface ProviderMcpOAUTH2 extends Omit<BaseProvider, 'body_format'> {
121
121
  auth_mode: 'MCP_OAUTH2';
122
122
  registration_url?: string;
123
123
  }
124
+ export interface ProviderMcpOAuth2Generic extends Omit<BaseProvider, 'body_format'> {
125
+ auth_mode: 'MCP_OAUTH2_GENERIC';
126
+ }
124
127
  export interface ProviderJwt extends BaseProvider {
125
128
  auth_mode: 'JWT';
126
129
  signature: {
@@ -200,6 +203,6 @@ export interface ProviderSignature extends BaseProvider {
200
203
  export interface ProviderApiKey extends BaseProvider {
201
204
  auth_mode: 'API_KEY';
202
205
  }
203
- export type Provider = BaseProvider | ProviderOAuth1 | ProviderOAuth2 | ProviderJwt | ProviderTwoStep | ProviderSignature | ProviderApiKey | ProviderBill | ProviderGithubApp | ProviderAppleAppStore | ProviderCustom | ProviderMcpOAUTH2;
204
- export type RefreshableProvider = ProviderTwoStep | ProviderJwt | ProviderSignature | ProviderOAuth2;
206
+ export type Provider = BaseProvider | ProviderOAuth1 | ProviderOAuth2 | ProviderJwt | ProviderTwoStep | ProviderSignature | ProviderApiKey | ProviderBill | ProviderGithubApp | ProviderAppleAppStore | ProviderCustom | ProviderMcpOAUTH2 | ProviderMcpOAuth2Generic;
207
+ export type RefreshableProvider = ProviderTwoStep | ProviderJwt | ProviderSignature | ProviderOAuth2 | ProviderMcpOAuth2Generic;
205
208
  export type TestableProvider = ProviderApiKey;
@@ -17,4 +17,5 @@ export interface RunnerFlags {
17
17
  validateActionOutput: boolean;
18
18
  validateSyncRecords: boolean;
19
19
  validateSyncMetadata: boolean;
20
+ functionLogs: boolean;
20
21
  }
@@ -1,5 +1,5 @@
1
1
  import type { AsyncActionResponse } from '../action/api.js';
2
- import type { ErrorPayload } from '../api.js';
2
+ import type { ErrorPayload, SyncErrorPayload } from '../api.js';
3
3
  import type { AuthModeType, AuthOperationType } from '../auth/api.js';
4
4
  import type { SyncResult } from '../sync/index.js';
5
5
  export type WebhookTypes = 'sync' | 'auth' | 'forward' | 'async_action';
@@ -28,7 +28,7 @@ export interface NangoSyncWebhookBodySuccess extends NangoSyncWebhookBodyBase {
28
28
  }
29
29
  export interface NangoSyncWebhookBodyError extends NangoSyncWebhookBodyBase {
30
30
  success: false;
31
- error: ErrorPayload;
31
+ error: SyncErrorPayload;
32
32
  startedAt: string;
33
33
  failedAt: string;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.69.3",
3
+ "version": "0.69.4",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",