@nangohq/types 0.70.7 → 0.70.9
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/account/api.d.ts +1 -2
- package/dist/api.endpoints.d.ts +4 -3
- package/dist/billing/types.d.ts +11 -8
- package/dist/deploy/api.d.ts +2 -2
- package/dist/flow/http.api.d.ts +0 -1
- package/dist/functions/api.d.ts +18 -3
- package/dist/gettingStarted/api.d.ts +1 -1
- package/dist/gettingStarted/dto.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/integration/api.d.ts +2 -2
- package/dist/nangoYaml/index.d.ts +49 -2
- package/dist/persist/api.d.ts +1 -0
- package/dist/plain/api.d.ts +11 -0
- package/dist/plans/http.api.d.ts +1 -1
- package/dist/providers/api.d.ts +1 -1
- package/dist/pubsub/events.d.ts +12 -1
- package/dist/record/api.d.ts +45 -0
- package/dist/runner/index.d.ts +1 -1
- package/dist/runner/sdk.d.ts +1 -1
- package/dist/sync/api.d.ts +1 -1
- package/dist/team/api.d.ts +1 -1
- package/dist/usage/index.d.ts +1 -1
- package/dist/web/env.d.ts +1 -0
- package/package.json +2 -2
package/dist/account/api.d.ts
CHANGED
|
@@ -95,12 +95,11 @@ export type PostLogout = Endpoint<{
|
|
|
95
95
|
Success: never;
|
|
96
96
|
}>;
|
|
97
97
|
export type PostForgotPassword = Endpoint<{
|
|
98
|
-
Method: '
|
|
98
|
+
Method: 'POST';
|
|
99
99
|
Path: '/api/v1/account/forgot-password';
|
|
100
100
|
Body: {
|
|
101
101
|
email: string;
|
|
102
102
|
};
|
|
103
|
-
Error: ApiError<'user_not_found'>;
|
|
104
103
|
Success: {
|
|
105
104
|
success: true;
|
|
106
105
|
};
|
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import type { PostImpersonate } from './admin/http.api.js';
|
|
|
4
4
|
import type { EndpointMethod } from './api.js';
|
|
5
5
|
import type { PostPublicApiKeyAuthorization, PostPublicAppStoreAuthorization, PostPublicAwsSigV4Authorization, PostPublicBasicAuthorization, PostPublicBillAuthorization, PostPublicJwtAuthorization, PostPublicOauthOutboundAuthorization, PostPublicSignatureAuthorization, PostPublicTbaAuthorization, PostPublicTwoStepAuthorization, PostPublicUnauthenticatedAuthorization } from './auth/http.api.js';
|
|
6
6
|
import type { DeleteConnectSession, GetConnectSession, PostConnectSessions, PostInternalConnectSessions, PostPublicConnectSessionsReconnect, PostPublicConnectTelemetry } from './connect/api.js';
|
|
7
|
-
import type { GetConnectUISettings, PutConnectUISettings } from './connectUISettings/api.js';
|
|
8
7
|
import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PatchPublicConnection, PostConnectionRefresh, PostPublicConnection } from './connection/api/get.js';
|
|
9
8
|
import type { SetMetadata, UpdateMetadata } from './connection/api/metadata.js';
|
|
9
|
+
import type { GetConnectUISettings, PutConnectUISettings } from './connectUISettings/api.js';
|
|
10
10
|
import type { PostDeploy, PostDeployConfirmation, PostDeployInternal } from './deploy/api.js';
|
|
11
11
|
import type { CreateApiKey, DeleteApiKey, DeleteEnvironment, GetEnvironment, GetEnvironments, ListApiKeys, PatchApiKey, PatchEnvironment, PostEnvironment } from './environment/api/index.js';
|
|
12
12
|
import type { PatchWebhook } from './environment/api/webhook.js';
|
|
@@ -18,10 +18,11 @@ import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetInt
|
|
|
18
18
|
import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
|
|
19
19
|
import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api.js';
|
|
20
20
|
import type { GetMeta } from './meta/api.js';
|
|
21
|
+
import type { GetPlainHmac } from './plain/api.js';
|
|
21
22
|
import type { GetBillingUsage, GetBillingUsageTopDimensionValues, PostPlanChange, PostPlanExtendTrial, PutBillingInvoicingDetails } from './plans/http.api.js';
|
|
22
23
|
import type { GetProvider, GetProviders, GetPublicProvider, GetPublicProviders } from './providers/api.js';
|
|
23
24
|
import type { AllPublicProxy } from './proxy/http.api.js';
|
|
24
|
-
import type { GetPublicRecords, PatchPublicPruneRecords } from './record/api.js';
|
|
25
|
+
import type { GetConnectionRecordModels, GetConnectionRecords, GetPublicRecords, PatchPublicPruneRecords } from './record/api.js';
|
|
25
26
|
import type { GetPublicScriptsConfig } from './scripts/http.api.js';
|
|
26
27
|
import type { GetSharedCredentialsProvider, GetSharedCredentialsProviders, PatchSharedCredentialsProvider, PostSharedCredentialsProvider } from './sharedCredentials/api.js';
|
|
27
28
|
import type { GetPublicSyncStatus, PostPublicSyncPause, PostPublicSyncStart, PostPublicTrigger, PutPublicSyncConnectionFrequency } from './sync/api.js';
|
|
@@ -29,7 +30,7 @@ import type { DeleteTeamUser, GetTeam, PatchTeamUser, PutTeam } from './team/api
|
|
|
29
30
|
import type { GetUser, PatchUser, PutUserPassword } from './user/api.js';
|
|
30
31
|
import type { PostPublicWebhook } from './webhooks/http.api.js';
|
|
31
32
|
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicRecords | PatchPublicPruneRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PostPublicQuickstartIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicAwsSigV4Authorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | PostFunctionCompile | PostFunctionDryrun | GetFunctionDryrun | PostFunctionDryrunResult | PostFunctionDeployment | GetFunctionDeployment | PostFunctionDeploymentResult | GetPublicFunctionCode | GetPublicIntegrationFunctions | GetPublicIntegrationFunction | DeletePublicIntegrationFunction | GetPublicProviderTemplates | AllPublicProxy;
|
|
32
|
-
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | PutBillingInvoicingDetails | GetBillingUsage | GetBillingUsageTopDimensionValues | GetUser | PatchUser | PutUserPassword | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | GetIntegrationFunction | GetIntegrationFunctions | DeleteIntegrationFunction | GetIntegrationTemplates | GetProviderTemplates | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedEmailVerification | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | ListApiKeys | CreateApiKey | DeleteApiKey | PatchApiKey | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider | PostInternalTriggerFunction;
|
|
33
|
+
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | PutBillingInvoicingDetails | GetBillingUsage | GetBillingUsageTopDimensionValues | GetUser | PatchUser | PutUserPassword | PostInvite | DeleteInvite | DeleteTeamUser | PatchTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | GetIntegrationFunction | GetIntegrationFunctions | DeleteIntegrationFunction | GetIntegrationTemplates | GetProviderTemplates | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetConnectionRecordModels | GetConnectionRecords | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | GetManagedEmailVerification | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedEmailVerification | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | ListApiKeys | CreateApiKey | DeleteApiKey | PatchApiKey | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider | PostInternalTriggerFunction | GetPlainHmac;
|
|
33
34
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
34
35
|
/**
|
|
35
36
|
* Automatically narrow endpoints type with Method + Path
|
package/dist/billing/types.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export interface BreakdownDimensions {
|
|
|
80
80
|
webhook_forwards: 'environment_id' | 'integration_id' | 'connection_id' | 'success';
|
|
81
81
|
records: 'environment_id' | 'integration_id' | 'connection_id' | 'model';
|
|
82
82
|
connections: 'environment_id' | 'integration_id';
|
|
83
|
+
data_transfer: 'environment_id' | 'integration_id' | 'connection_id' | 'package' | 'callsite';
|
|
83
84
|
}
|
|
84
85
|
export type DimensionFor<M extends UsageMetric> = 'none' | BreakdownDimensions[M];
|
|
85
86
|
export interface GetBillingUsageOpts {
|
|
@@ -120,9 +121,11 @@ export interface GetBillingUsageOpts {
|
|
|
120
121
|
metrics?: UsageMetric[];
|
|
121
122
|
/**
|
|
122
123
|
* Per-metric row-level filter: scopes that metric's response to rows
|
|
123
|
-
* where the given dimension equals the given value.
|
|
124
|
-
*
|
|
125
|
-
*
|
|
124
|
+
* where the given dimension equals the given value. Composes with
|
|
125
|
+
* `breakdown[<metric>]` on the same metric when the dimensions differ
|
|
126
|
+
* (drill-in: filter to one value, re-break-down by another); controllers
|
|
127
|
+
* reject only the same-dimension pairing. CH path only; the Orb client
|
|
128
|
+
* ignores it.
|
|
126
129
|
*/
|
|
127
130
|
filter?: {
|
|
128
131
|
[M in UsageMetric]?: {
|
|
@@ -159,11 +162,11 @@ export interface BillingUsageMetric {
|
|
|
159
162
|
* dimension-value series (carrying its own `group: {key, value}`), with
|
|
160
163
|
* one 'rest' entry aggregating the long tail.
|
|
161
164
|
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
* `
|
|
165
|
-
*
|
|
166
|
-
* no-dim global and this
|
|
165
|
+
* Paired with the top-level `usage`/`total`: when a breakdown is requested
|
|
166
|
+
* the top-level `usage` is empty (the per-day points live under `breakdown`)
|
|
167
|
+
* and `total` is the sum across the top-N + 'rest' series, which partition
|
|
168
|
+
* every row — so it equals the (filtered) global. When breakdown is NOT
|
|
169
|
+
* requested, the top-level is the no-dim global and this is absent.
|
|
167
170
|
*/
|
|
168
171
|
breakdown?: BillingUsageMetric[];
|
|
169
172
|
}
|
package/dist/deploy/api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ApiError, Endpoint } from '../api.js';
|
|
2
|
-
import type { CLIDeployFlowConfig, OnEventScriptsByProvider } from './incomingFlow.js';
|
|
3
|
-
import type { SyncDeploymentResult } from './index.js';
|
|
4
2
|
import type { OnEventType } from '../scripts/on-events/api.js';
|
|
5
3
|
import type { FunctionSource } from '../syncConfigs/db.js';
|
|
4
|
+
import type { CLIDeployFlowConfig, OnEventScriptsByProvider } from './incomingFlow.js';
|
|
5
|
+
import type { SyncDeploymentResult } from './index.js';
|
|
6
6
|
import type { JSONSchema7 } from 'json-schema';
|
|
7
7
|
export type PostDeployConfirmation = Endpoint<{
|
|
8
8
|
Method: 'POST';
|
package/dist/flow/http.api.d.ts
CHANGED
package/dist/functions/api.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export type FunctionDryrunResultBody = {
|
|
|
68
68
|
payload?: unknown;
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
-
export interface
|
|
71
|
+
export interface FunctionDeploymentCodeBody {
|
|
72
72
|
type: 'function';
|
|
73
73
|
integration_id: string;
|
|
74
74
|
function_name: string;
|
|
@@ -77,9 +77,24 @@ export interface FunctionDeploymentBody {
|
|
|
77
77
|
version?: string | undefined;
|
|
78
78
|
allow_destructive?: boolean | undefined;
|
|
79
79
|
}
|
|
80
|
+
export interface FunctionDeploymentTemplateBody {
|
|
81
|
+
type: 'template';
|
|
82
|
+
integration_id: string;
|
|
83
|
+
template: string;
|
|
84
|
+
/** Optional; inferred from the template name unless a sync and an action share it. */
|
|
85
|
+
function_type?: RunnableFunctionType | undefined;
|
|
86
|
+
}
|
|
87
|
+
export interface FunctionDeploymentTemplateStoredRequest {
|
|
88
|
+
type: 'template';
|
|
89
|
+
integration_id: string;
|
|
90
|
+
template: string;
|
|
91
|
+
function_name: string;
|
|
92
|
+
function_type: RunnableFunctionType;
|
|
93
|
+
}
|
|
94
|
+
export type FunctionDeploymentBody = FunctionDeploymentCodeBody | FunctionDeploymentTemplateBody;
|
|
80
95
|
export interface FunctionDeploymentCreateSuccess {
|
|
81
96
|
id: string;
|
|
82
|
-
status:
|
|
97
|
+
status: FunctionDeploymentStatus;
|
|
83
98
|
created_at: string;
|
|
84
99
|
}
|
|
85
100
|
export interface FunctionDeploymentResultSuccess {
|
|
@@ -154,7 +169,7 @@ export type PostFunctionDeployment = Endpoint<{
|
|
|
154
169
|
Method: 'POST';
|
|
155
170
|
Path: '/functions/deployments';
|
|
156
171
|
Body: FunctionDeploymentBody;
|
|
157
|
-
Error: ApiError<FunctionErrorCode>;
|
|
172
|
+
Error: ApiError<FunctionErrorCode> | ApiError<'template_not_found' | 'ambiguous_function' | 'plan_limit' | 'template_already_deployed'>;
|
|
158
173
|
Success: FunctionDeploymentCreateSuccess;
|
|
159
174
|
}>;
|
|
160
175
|
export type GetFunctionDeployment = Endpoint<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GettingStartedOutput as GettingStartedProgressOutput, PatchGettingStartedInput as PatchGettingStartedProgressInput } from './dto.js';
|
|
2
1
|
import type { ApiError, Endpoint } from '../api.js';
|
|
2
|
+
import type { GettingStartedOutput as GettingStartedProgressOutput, PatchGettingStartedInput as PatchGettingStartedProgressInput } from './dto.js';
|
|
3
3
|
export type GetGettingStarted = Endpoint<{
|
|
4
4
|
Method: 'GET';
|
|
5
5
|
Path: '/api/v1/getting-started';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DBGettingStartedMeta, DBGettingStartedProgress } from './db.js';
|
|
2
1
|
import type { DBConnection } from '../connection/db.js';
|
|
3
2
|
import type { DBEnvironment } from '../environment/db.js';
|
|
4
3
|
import type { IntegrationConfig } from '../integration/db.js';
|
|
4
|
+
import type { DBGettingStartedMeta, DBGettingStartedProgress } from './db.js';
|
|
5
5
|
export interface GettingStartedOutput {
|
|
6
6
|
meta: {
|
|
7
7
|
environment: Pick<DBEnvironment, 'id' | 'name'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type * from './admin/http.api.js';
|
|
|
13
13
|
export type * from './account/api.js';
|
|
14
14
|
export type * from './user/api.js';
|
|
15
15
|
export type * from './user/db.js';
|
|
16
|
+
export type * from './plain/api.js';
|
|
16
17
|
export type * from './connection/api/metadata.js';
|
|
17
18
|
export type * from './connection/db.js';
|
|
18
19
|
export type * from './connectUISettings/dto.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ApiError, ApiTimestamps, Endpoint } from '../api.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type { AuthModeType, AuthModes } from '../auth/api.js';
|
|
2
|
+
import type { AuthModes, AuthModeType } from '../auth/api.js';
|
|
4
3
|
import type { NangoSyncConfig } from '../flow/index.js';
|
|
5
4
|
import type { ScriptTypeLiteral } from '../nangoYaml/index.js';
|
|
6
5
|
import type { Provider } from '../providers/provider.js';
|
|
6
|
+
import type { IntegrationConfig } from './db.js';
|
|
7
7
|
import type { Merge } from 'type-fest';
|
|
8
8
|
export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' | 'updated_at' | 'unique_key' | 'provider' | 'display_name' | 'forward_webhooks'>, ApiTimestamps> & {
|
|
9
9
|
logo: string;
|
|
@@ -4,8 +4,13 @@ import type { JSONSchema7 } from 'json-schema';
|
|
|
4
4
|
export type HTTP_METHOD = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
|
|
5
5
|
/** @deprecated **/
|
|
6
6
|
export type SyncTypeLiteral = 'incremental' | 'full';
|
|
7
|
-
export type ScriptFileType = 'actions' | 'syncs' | 'on-events' | 'post-connection-scripts';
|
|
7
|
+
export type ScriptFileType = 'actions' | 'syncs' | 'on-events' | 'functions' | 'webhooks' | 'post-connection-scripts';
|
|
8
8
|
export type ScriptTypeLiteral = 'action' | 'sync' | 'on-event';
|
|
9
|
+
/**
|
|
10
|
+
* The `function` primitive is authored via `createFunction()` / `createWebhook()`. It is tracked
|
|
11
|
+
* separately from {@link ScriptTypeLiteral} (sync/action/on-event) while it is introduced additively.
|
|
12
|
+
*/
|
|
13
|
+
export type FunctionScriptTypeLiteral = 'function';
|
|
9
14
|
export interface NangoYamlV1 {
|
|
10
15
|
integrations: Record<string, Record<string, NangoYamlV1Integration>>;
|
|
11
16
|
models: NangoYamlModel;
|
|
@@ -76,6 +81,7 @@ export interface NangoYamlParsedIntegration {
|
|
|
76
81
|
providerConfigKey: string;
|
|
77
82
|
syncs: ParsedNangoSync[];
|
|
78
83
|
actions: ParsedNangoAction[];
|
|
84
|
+
functions: ParsedNangoFunction[];
|
|
79
85
|
onEventScripts: Record<OnEventType, string[]>;
|
|
80
86
|
/**
|
|
81
87
|
* @deprecated
|
|
@@ -101,6 +107,47 @@ export interface ParsedNangoSync {
|
|
|
101
107
|
json_schema?: JSONSchema7 | undefined;
|
|
102
108
|
features?: Feature[] | undefined;
|
|
103
109
|
}
|
|
110
|
+
/** Serializable view of a function trigger (the executable hooks live in the deployed file body). */
|
|
111
|
+
export interface ParsedFunctionTrigger {
|
|
112
|
+
type: 'http' | 'schedule' | 'event';
|
|
113
|
+
/** http trigger: maps to the URL path segment. */
|
|
114
|
+
name?: string;
|
|
115
|
+
/** http trigger: 'integration' (default) or 'connection' for tokenized per-connection URLs. */
|
|
116
|
+
scope?: 'integration' | 'connection';
|
|
117
|
+
/** schedule trigger. */
|
|
118
|
+
schedule?: string;
|
|
119
|
+
/** event trigger. */
|
|
120
|
+
event?: string;
|
|
121
|
+
/** Whether ingress coalescing is configured (the window/key config). */
|
|
122
|
+
debounce?: {
|
|
123
|
+
key?: {
|
|
124
|
+
body: string;
|
|
125
|
+
} | {
|
|
126
|
+
header: string;
|
|
127
|
+
};
|
|
128
|
+
windowMs: number;
|
|
129
|
+
maxWindowMs?: number;
|
|
130
|
+
maxEntities?: number;
|
|
131
|
+
payloadMode?: 'latest' | 'all';
|
|
132
|
+
};
|
|
133
|
+
/** Whether the trigger ships an `ingressChallenge` hook (executed at ingress). */
|
|
134
|
+
hasIngressChallenge?: boolean;
|
|
135
|
+
/** Whether the trigger ships an `ingressValidation` hook (executed at ingress). */
|
|
136
|
+
hasIngressValidation?: boolean;
|
|
137
|
+
}
|
|
138
|
+
export interface ParsedNangoFunction {
|
|
139
|
+
name: string;
|
|
140
|
+
type: 'function';
|
|
141
|
+
description: string;
|
|
142
|
+
triggers: ParsedFunctionTrigger[];
|
|
143
|
+
input: string | null;
|
|
144
|
+
output: string[] | null;
|
|
145
|
+
scopes: string[];
|
|
146
|
+
usedModels: string[];
|
|
147
|
+
version: string;
|
|
148
|
+
json_schema?: JSONSchema7 | undefined;
|
|
149
|
+
features?: Feature[] | undefined;
|
|
150
|
+
}
|
|
104
151
|
export interface ParsedNangoAction {
|
|
105
152
|
name: string;
|
|
106
153
|
type: 'action';
|
|
@@ -143,7 +190,7 @@ export interface FlowsYaml {
|
|
|
143
190
|
models: NangoYamlModel;
|
|
144
191
|
}>;
|
|
145
192
|
}
|
|
146
|
-
export type FlowZeroJson = NangoYamlParsedIntegration & {
|
|
193
|
+
export type FlowZeroJson = Omit<NangoYamlParsedIntegration, 'functions'> & {
|
|
147
194
|
jsonSchema?: JSONSchema7;
|
|
148
195
|
sdkVersion: string;
|
|
149
196
|
};
|
package/dist/persist/api.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export type RunnerDataTransferTelemetry = WithTags<{
|
|
|
26
26
|
callsite: 'proxy' | 'uncontrolled_fetch' | 'persist_records' | 'persist_logs';
|
|
27
27
|
bytesSent: number;
|
|
28
28
|
bytesReceived: number;
|
|
29
|
+
count: number;
|
|
29
30
|
}>;
|
|
30
31
|
export type RunnerTelemetry = RunnerDataTransferTelemetry;
|
|
31
32
|
export type PostRunnerTelemetry = Endpoint<{
|
package/dist/plans/http.api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { DBPlan } from './db.js';
|
|
2
1
|
import type { Endpoint } from '../api.js';
|
|
3
2
|
import type { ApiBillingUsageMetrics, BillingCustomer, BillingInvoicingDetails, BreakdownDimensions } from '../billing/types.js';
|
|
4
3
|
import type { MetricUsageSummary, UsageMetric } from '../usage/index.js';
|
|
5
4
|
import type { ReplaceInObject } from '../utils.js';
|
|
5
|
+
import type { DBPlan } from './db.js';
|
|
6
6
|
export type ApiPlan = ReplaceInObject<DBPlan, Date, string>;
|
|
7
7
|
export type PostPlanExtendTrial = Endpoint<{
|
|
8
8
|
Method: 'POST';
|
package/dist/providers/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Endpoint } from '../api.js';
|
|
2
|
-
import type { Provider, SimplifiedJSONSchema } from './provider.js';
|
|
3
2
|
import type { AuthModeType } from '../auth/api.js';
|
|
3
|
+
import type { Provider, SimplifiedJSONSchema } from './provider.js';
|
|
4
4
|
export type GetPublicProviders = Endpoint<{
|
|
5
5
|
Method: 'GET';
|
|
6
6
|
Path: `/providers`;
|
package/dist/pubsub/events.d.ts
CHANGED
|
@@ -95,6 +95,17 @@ export type UsageWebhookForwardEvent = UsageEventBase<'usage.webhook_forward', {
|
|
|
95
95
|
success: boolean;
|
|
96
96
|
};
|
|
97
97
|
}>;
|
|
98
|
+
export type DataTransferCallsite = 'credential_test_hook' | 'credential_verification_hook' | 'connection_hook' | 'webhook_forward' | 'proxy' | 'uncontrolled_fetch' | 'persist_logs' | 'persist_records';
|
|
99
|
+
export type UsageDataTransferEvent = UsageEventBase<'usage.data_transfer', {
|
|
100
|
+
value: number;
|
|
101
|
+
properties: {
|
|
102
|
+
package: 'server' | 'runner' | 'shared';
|
|
103
|
+
callsite: DataTransferCallsite;
|
|
104
|
+
ingressedBytes: number;
|
|
105
|
+
egressedBytes: number;
|
|
106
|
+
syncId?: string;
|
|
107
|
+
};
|
|
108
|
+
}>;
|
|
98
109
|
type EnforceUsageEventBase<T extends UsageEventBase<any, any>> = T;
|
|
99
|
-
export type UsageEvent = EnforceUsageEventBase<UsageMarEvent | UsageRecordsEvent | UsageActionsEvent | UsageConnectionsEvent | UsageFunctionExecutionsEvent | UsageProxyEvent | UsageWebhookForwardEvent>;
|
|
110
|
+
export type UsageEvent = EnforceUsageEventBase<UsageMarEvent | UsageRecordsEvent | UsageActionsEvent | UsageConnectionsEvent | UsageFunctionExecutionsEvent | UsageProxyEvent | UsageWebhookForwardEvent | UsageDataTransferEvent>;
|
|
100
111
|
export {};
|
package/dist/record/api.d.ts
CHANGED
|
@@ -63,3 +63,48 @@ export type PatchPublicPruneRecords = Endpoint<{
|
|
|
63
63
|
has_more: boolean;
|
|
64
64
|
};
|
|
65
65
|
}>;
|
|
66
|
+
export interface ConnectionRecordModel {
|
|
67
|
+
model: string;
|
|
68
|
+
variant: string | null;
|
|
69
|
+
count: number;
|
|
70
|
+
size_bytes: number;
|
|
71
|
+
updated_at: string;
|
|
72
|
+
}
|
|
73
|
+
export type GetConnectionRecordModels = Endpoint<{
|
|
74
|
+
Method: 'GET';
|
|
75
|
+
Path: '/api/v1/connections/:connectionId/records/models';
|
|
76
|
+
Params: {
|
|
77
|
+
connectionId: string;
|
|
78
|
+
};
|
|
79
|
+
Querystring: {
|
|
80
|
+
env: string;
|
|
81
|
+
provider_config_key: string;
|
|
82
|
+
};
|
|
83
|
+
Success: {
|
|
84
|
+
data: ConnectionRecordModel[];
|
|
85
|
+
};
|
|
86
|
+
}>;
|
|
87
|
+
export type GetConnectionRecords = Endpoint<{
|
|
88
|
+
Method: 'GET';
|
|
89
|
+
Path: '/api/v1/connections/:connectionId/records';
|
|
90
|
+
Params: {
|
|
91
|
+
connectionId: string;
|
|
92
|
+
};
|
|
93
|
+
Querystring: {
|
|
94
|
+
env: string;
|
|
95
|
+
provider_config_key: string;
|
|
96
|
+
model: string;
|
|
97
|
+
variant?: string | undefined;
|
|
98
|
+
limit?: number | undefined;
|
|
99
|
+
cursor?: string | undefined;
|
|
100
|
+
metadata_only?: boolean | undefined;
|
|
101
|
+
/** When set, return at most one full record for this external id (for lazy payload fetch). metadata_only is ignored */
|
|
102
|
+
record_id?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
Success: {
|
|
105
|
+
data: {
|
|
106
|
+
next_cursor: string | null;
|
|
107
|
+
records: NangoRecord[];
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}>;
|
package/dist/runner/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { TelemetryBag } from './sdk.js';
|
|
2
1
|
import type { CheckpointRange } from '../checkpoint/types.js';
|
|
3
2
|
import type { DBPlan } from '../plans/db.js';
|
|
4
3
|
import type { Feature } from '../syncConfigs/db.js';
|
|
4
|
+
import type { TelemetryBag } from './sdk.js';
|
|
5
5
|
export interface RunnerOutputError {
|
|
6
6
|
type: string;
|
|
7
7
|
payload: Record<string, unknown> | unknown[];
|
package/dist/runner/sdk.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { RunnerFlags } from './index.js';
|
|
2
1
|
import type { LogLevel } from '../logs/messages.js';
|
|
3
2
|
import type { IntegrationConfigForProxy } from '../proxy/api.js';
|
|
4
3
|
import type { DBSyncConfig } from '../syncConfigs/db.js';
|
|
5
4
|
import type { DBTeam } from '../team/db.js';
|
|
5
|
+
import type { RunnerFlags } from './index.js';
|
|
6
6
|
import type { AxiosError, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
7
7
|
export interface SdkLogger {
|
|
8
8
|
level: LogLevel | 'off';
|
package/dist/sync/api.d.ts
CHANGED
package/dist/team/api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ApiError, ApiTimestamps, Endpoint } from '../api.js';
|
|
2
|
-
import type { DBTeam } from './db.js';
|
|
3
2
|
import type { DBInvitation } from '../invitations/db.js';
|
|
4
3
|
import type { ApiUser } from '../user/api.js';
|
|
5
4
|
import type { Role } from '../user/db.js';
|
|
5
|
+
import type { DBTeam } from './db.js';
|
|
6
6
|
import type { Merge } from 'type-fest';
|
|
7
7
|
export type GetTeam = Endpoint<{
|
|
8
8
|
Method: 'GET';
|
package/dist/usage/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type UsageMetric = 'proxy' | 'connections' | 'function_executions' | 'function_compute_gbms' | 'records' | 'webhook_forwards' | 'function_logs';
|
|
1
|
+
export type UsageMetric = 'proxy' | 'connections' | 'function_executions' | 'function_compute_gbms' | 'records' | 'webhook_forwards' | 'function_logs' | 'data_transfer';
|
|
2
2
|
export interface MetricUsageSummary {
|
|
3
3
|
label: string;
|
|
4
4
|
usage: number;
|
package/dist/web/env.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nangohq/types",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.9",
|
|
4
4
|
"description": "Types used in Nango applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/utils"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"axios": "1.
|
|
15
|
+
"axios": "1.18.0",
|
|
16
16
|
"json-schema": "0.4.0",
|
|
17
17
|
"type-fest": "4.41.0"
|
|
18
18
|
},
|