@nangohq/types 0.69.39 → 0.69.41

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.
@@ -8,7 +8,7 @@ import type { GetConnectUISettings, PutConnectUISettings } from './connectUISett
8
8
  import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PatchPublicConnection, PostConnectionRefresh, PostPublicConnection } from './connection/api/get.js';
9
9
  import type { SetMetadata, UpdateMetadata } from './connection/api/metadata.js';
10
10
  import type { PostDeploy, PostDeployConfirmation, PostDeployInternal } from './deploy/api.js';
11
- import type { DeleteEnvironment, GetEnvironments, PatchEnvironment, PostEnvironment } from './environment/api/index.js';
11
+ import type { DeleteEnvironment, GetEnvironment, GetEnvironments, PatchEnvironment, PostEnvironment } from './environment/api/index.js';
12
12
  import type { PatchWebhook } from './environment/api/webhook.js';
13
13
  import type { PostEnvironmentVariables } from './environment/variable/api.js';
14
14
  import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api.js';
@@ -28,7 +28,7 @@ import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api.js';
28
28
  import type { GetUser, PatchUser } from './user/api.js';
29
29
  import type { PostPublicWebhook } from './webhooks/http.api.js';
30
30
  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 | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization | PostPublicConnection | PatchPublicConnection | PostPublicSyncStart | PostPublicSyncPause | GetPublicSyncStatus | GetPublicV1 | PostPublicTriggerAction | AllPublicProxy;
31
- export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider;
31
+ export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | PostPlanChange | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | GetEnvironments | GetEnvironment | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted | GetConnectUISettings | PutConnectUISettings | GetProviders | GetProvider;
32
32
  export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
33
33
  /**
34
34
  * Automatically narrow endpoints type with Method + Path
@@ -17,3 +17,7 @@ export type CheckpointValue = string | number | boolean;
17
17
  * ```
18
18
  */
19
19
  export type Checkpoint = Record<string, CheckpointValue>;
20
+ export type CheckpointRange = {
21
+ from: Checkpoint | null;
22
+ to: Checkpoint | null;
23
+ } | null;
@@ -27,6 +27,7 @@ export type PostDeploy = Endpoint<{
27
27
  reconcile: boolean;
28
28
  debug: boolean;
29
29
  singleDeployMode?: boolean;
30
+ /** @deprecated Use CLIDeployFlowConfig.models_json_schema */
30
31
  jsonSchema?: JSONSchema7 | undefined;
31
32
  sdkVersion?: string | undefined;
32
33
  };
@@ -45,6 +46,7 @@ export type PostDeployInternal = Endpoint<{
45
46
  reconcile: boolean;
46
47
  debug: boolean;
47
48
  singleDeployMode?: boolean;
49
+ /** @deprecated Use CLIDeployFlowConfig.models_json_schema */
48
50
  jsonSchema?: JSONSchema7 | undefined;
49
51
  sdkVersion?: string | undefined;
50
52
  };
@@ -1,5 +1,6 @@
1
1
  import type { NangoSyncEndpointOld, NangoSyncEndpointV2, ScriptTypeLiteral, SyncTypeLiteral } from '../nangoYaml/index.js';
2
2
  import type { OnEventType } from '../scripts/on-events/api.js';
3
+ import type { JSONSchema7 } from 'json-schema';
3
4
  import type { Merge } from 'type-fest';
4
5
  export interface IncomingScriptFiles {
5
6
  js: string;
@@ -80,6 +81,7 @@ export interface CLIDeployFlowConfig {
80
81
  /** @deprecated **/
81
82
  sync_type?: SyncTypeLiteral | undefined;
82
83
  webhookSubscriptions?: string[] | undefined;
84
+ models_json_schema?: JSONSchema7 | undefined;
83
85
  }
84
86
  /**
85
87
  * Flow shape after being sent by the CLI and cleaned in the backend
@@ -16,4 +16,5 @@ export interface NodeConfig {
16
16
  readonly idleMaxDurationMs: number;
17
17
  readonly executionTimeoutSecs: number;
18
18
  readonly provisionedConcurrency: number;
19
+ readonly replicas: number;
19
20
  }
@@ -1,4 +1,4 @@
1
- import type { Endpoint } from '../api.js';
1
+ import type { ApiError, Endpoint } from '../api.js';
2
2
  import type { ApiInvitation, ApiTeam } from '../team/api.js';
3
3
  import type { ApiUser } from '../user/api.js';
4
4
  export type PostInvite = Endpoint<{
@@ -45,6 +45,7 @@ export type GetInvite = Endpoint<{
45
45
  newTeamUsers: number;
46
46
  };
47
47
  };
48
+ Errors: ApiError<'not_found'>;
48
49
  }>;
49
50
  export type AcceptInvite = Endpoint<{
50
51
  Method: 'POST';
@@ -1,4 +1,5 @@
1
1
  import type { ApiError, Endpoint } from '../api.js';
2
+ import type { CheckpointRange } from '../checkpoint/types.js';
2
3
  import type { RunnerOutputError } from '../runner/index.js';
3
4
  import type { FunctionRuntime, NangoProps, TelemetryBag } from '../runner/sdk.js';
4
5
  import type { JsonValue } from 'type-fest';
@@ -24,6 +25,7 @@ export type PutTask = Endpoint<{
24
25
  output?: JsonValue | undefined;
25
26
  telemetryBag: TelemetryBag;
26
27
  functionRuntime: FunctionRuntime;
28
+ checkpoints?: CheckpointRange | undefined;
27
29
  };
28
30
  Error: ApiError<'put_task_failed'>;
29
31
  Success: never;
@@ -1,4 +1,5 @@
1
1
  import type { TelemetryBag } from './sdk.js';
2
+ import type { CheckpointRange } from '../checkpoint/types.js';
2
3
  import type { DBPlan } from '../plans/db.js';
3
4
  export interface RunnerOutputError {
4
5
  type: string;
@@ -12,6 +13,7 @@ export interface RunnerOutputError {
12
13
  export interface RunnerOutput {
13
14
  output: unknown;
14
15
  telemetryBag: TelemetryBag;
16
+ checkpoints?: CheckpointRange | undefined;
15
17
  }
16
18
  export interface RunnerFlags {
17
19
  validateActionInput: boolean;
@@ -7,6 +7,7 @@ import type { AxiosError, AxiosInterceptorManager, AxiosRequestConfig, AxiosResp
7
7
  export interface SdkLogger {
8
8
  level: LogLevel | 'off';
9
9
  }
10
+ export type ConflictResolutionMode = 'IN_MEMORY' | 'REDIS';
10
11
  export type ScriptType = 'sync' | 'action' | 'webhook' | 'on-event';
11
12
  export interface NangoProps {
12
13
  scriptType: ScriptType;
@@ -41,6 +42,10 @@ export interface NangoProps {
41
42
  orgId: string | null;
42
43
  } | null;
43
44
  heartbeatTimeoutSecs?: number | undefined;
45
+ lifecycle?: {
46
+ interruptAfterMs: number;
47
+ killAfterMs: number;
48
+ } | undefined;
44
49
  isCLI?: boolean | undefined;
45
50
  integrationConfig?: IntegrationConfigForProxy;
46
51
  axios?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.69.39",
3
+ "version": "0.69.41",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",