@nangohq/types 0.69.44 → 0.69.46
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/action/api.d.ts +1 -0
- package/dist/connection/api/get.d.ts +1 -0
- package/dist/deploy/api.d.ts +3 -3
- package/dist/deploy/incomingFlow.d.ts +2 -0
- package/dist/environment/api/index.d.ts +3 -2
- package/dist/environment/db.d.ts +1 -0
- package/dist/flow/index.d.ts +2 -1
- package/dist/invitations/db.d.ts +2 -0
- package/dist/meta/api.d.ts +1 -1
- package/dist/nangoYaml/index.d.ts +4 -1
- package/dist/plans/db.d.ts +5 -0
- package/dist/runner/index.d.ts +1 -1
- package/dist/syncConfigs/db.d.ts +2 -0
- package/dist/user/api.d.ts +7 -1
- package/dist/user/db.d.ts +2 -0
- package/package.json +1 -1
package/dist/action/api.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export type PostPublicTriggerAction = Endpoint<{
|
|
|
26
26
|
};
|
|
27
27
|
Success: any;
|
|
28
28
|
}>;
|
|
29
|
+
/** @deprecated Use POST /action/trigger to trigger actions and GET /records to fetch sync records instead. */
|
|
29
30
|
export type GetPublicV1 = Endpoint<{
|
|
30
31
|
Method: 'GET';
|
|
31
32
|
Path: `/v1/:path`;
|
|
@@ -96,6 +96,7 @@ export type PostPublicConnection = Endpoint<{
|
|
|
96
96
|
end_user?: EndUserInput | undefined;
|
|
97
97
|
tags?: Tags | undefined;
|
|
98
98
|
};
|
|
99
|
+
Error: ApiError<'connection_test_failed'> | ApiError<'connection_validation_failed'>;
|
|
99
100
|
Success: ApiPublicConnectionFull;
|
|
100
101
|
}>;
|
|
101
102
|
export type ApiConnectionFull = Omit<ReplaceInObject<DBConnectionDecrypted, Date, string>, 'credentials_iv' | 'end_user_id' | 'credentials_tag' | 'deleted' | 'deleted_at'>;
|
package/dist/deploy/api.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type PostDeployConfirmation = Endpoint<{
|
|
|
11
11
|
onEventScriptsByProvider?: OnEventScriptsByProvider[] | undefined;
|
|
12
12
|
reconcile: boolean;
|
|
13
13
|
debug: boolean;
|
|
14
|
-
|
|
14
|
+
deployMode?: 'all' | 'single' | 'integration';
|
|
15
15
|
/** @deprecated Use CLIDeployFlowConfig.models_json_schema */
|
|
16
16
|
jsonSchema?: JSONSchema7 | undefined;
|
|
17
17
|
sdkVersion?: string | undefined;
|
|
@@ -27,7 +27,7 @@ export type PostDeploy = Endpoint<{
|
|
|
27
27
|
nangoYamlBody: string;
|
|
28
28
|
reconcile: boolean;
|
|
29
29
|
debug: boolean;
|
|
30
|
-
|
|
30
|
+
deployMode?: 'all' | 'single' | 'integration';
|
|
31
31
|
/** @deprecated Use CLIDeployFlowConfig.models_json_schema */
|
|
32
32
|
jsonSchema?: JSONSchema7 | undefined;
|
|
33
33
|
sdkVersion?: string | undefined;
|
|
@@ -46,7 +46,7 @@ export type PostDeployInternal = Endpoint<{
|
|
|
46
46
|
nangoYamlBody: string;
|
|
47
47
|
reconcile: boolean;
|
|
48
48
|
debug: boolean;
|
|
49
|
-
|
|
49
|
+
deployMode?: 'all' | 'single' | 'integration';
|
|
50
50
|
/** @deprecated Use CLIDeployFlowConfig.models_json_schema */
|
|
51
51
|
jsonSchema?: JSONSchema7 | undefined;
|
|
52
52
|
sdkVersion?: string | undefined;
|
|
@@ -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 { Feature } from '../syncConfigs/db.js';
|
|
3
4
|
import type { JSONSchema7 } from 'json-schema';
|
|
4
5
|
import type { Merge } from 'type-fest';
|
|
5
6
|
export interface IncomingScriptFiles {
|
|
@@ -82,6 +83,7 @@ export interface CLIDeployFlowConfig {
|
|
|
82
83
|
sync_type?: SyncTypeLiteral | undefined;
|
|
83
84
|
webhookSubscriptions?: string[] | undefined;
|
|
84
85
|
models_json_schema?: JSONSchema7 | undefined;
|
|
86
|
+
features?: Feature[] | undefined;
|
|
85
87
|
}
|
|
86
88
|
/**
|
|
87
89
|
* Flow shape after being sent by the CLI and cleaned in the backend
|
|
@@ -11,7 +11,7 @@ export type GetEnvironments = Endpoint<{
|
|
|
11
11
|
Method: 'GET';
|
|
12
12
|
Path: '/api/v1/environments';
|
|
13
13
|
Success: {
|
|
14
|
-
data: Pick<DBEnvironment, 'name'>[];
|
|
14
|
+
data: Pick<DBEnvironment, 'name' | 'is_production'>[];
|
|
15
15
|
};
|
|
16
16
|
}>;
|
|
17
17
|
export type PostEnvironment = Endpoint<{
|
|
@@ -45,6 +45,7 @@ export type PatchEnvironment = Endpoint<{
|
|
|
45
45
|
Path: '/api/v1/environments';
|
|
46
46
|
Body: {
|
|
47
47
|
name?: string | undefined;
|
|
48
|
+
is_production?: boolean | undefined;
|
|
48
49
|
callback_url?: string | undefined;
|
|
49
50
|
hmac_key?: string | undefined;
|
|
50
51
|
hmac_enabled?: boolean | undefined;
|
|
@@ -58,7 +59,7 @@ export type PatchEnvironment = Endpoint<{
|
|
|
58
59
|
Success: {
|
|
59
60
|
data: ApiEnvironment;
|
|
60
61
|
};
|
|
61
|
-
Error: ApiError<'conflict'>;
|
|
62
|
+
Error: ApiError<'conflict' | 'cannot_toggle_prod_environment'>;
|
|
62
63
|
}>;
|
|
63
64
|
export type DeleteEnvironment = Endpoint<{
|
|
64
65
|
Method: 'DELETE';
|
package/dist/environment/db.d.ts
CHANGED
package/dist/flow/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LegacySyncModelSchema, NangoConfigMetadata } from '../deploy/incomingFlow.js';
|
|
2
2
|
import type { NangoModel, NangoSyncEndpointV2, ScriptTypeLiteral, SyncTypeLiteral } from '../nangoYaml/index.js';
|
|
3
|
+
import type { Feature } from '../syncConfigs/db.js';
|
|
3
4
|
import type { JSONSchema7 } from 'json-schema';
|
|
4
5
|
export interface NangoSyncConfig {
|
|
5
6
|
name: string;
|
|
@@ -25,9 +26,9 @@ export interface NangoSyncConfig {
|
|
|
25
26
|
enabled?: boolean;
|
|
26
27
|
json_schema: JSONSchema7 | null;
|
|
27
28
|
upgrade_version?: string;
|
|
28
|
-
is_zero_yaml: boolean;
|
|
29
29
|
sdk_version: string | null;
|
|
30
30
|
models?: NangoModel[] | LegacySyncModelSchema[] | undefined;
|
|
31
|
+
features: Feature[];
|
|
31
32
|
}
|
|
32
33
|
export interface StandardNangoConfig {
|
|
33
34
|
providerConfigKey: string;
|
package/dist/invitations/db.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Timestamps } from '../db.js';
|
|
2
|
+
import type { Role } from '../user/db.js';
|
|
2
3
|
export interface DBInvitation extends Timestamps {
|
|
3
4
|
id: number;
|
|
4
5
|
name: string;
|
|
@@ -8,4 +9,5 @@ export interface DBInvitation extends Timestamps {
|
|
|
8
9
|
token: string;
|
|
9
10
|
expires_at: Date;
|
|
10
11
|
accepted: boolean;
|
|
12
|
+
role: Role;
|
|
11
13
|
}
|
package/dist/meta/api.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type GetMeta = Endpoint<{
|
|
|
9
9
|
Error: ApiError<'user_not_found'>;
|
|
10
10
|
Success: {
|
|
11
11
|
data: {
|
|
12
|
-
environments: Pick<DBEnvironment, 'name'>[];
|
|
12
|
+
environments: Pick<DBEnvironment, 'name' | 'is_production'>[];
|
|
13
13
|
version: string;
|
|
14
14
|
baseUrl: string;
|
|
15
15
|
debugMode: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OnEventType } from '../scripts/on-events/api.js';
|
|
2
|
+
import type { Feature } from '../syncConfigs/db.js';
|
|
2
3
|
import type { JSONSchema7 } from 'json-schema';
|
|
3
4
|
export type HTTP_METHOD = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
|
|
4
5
|
/** @deprecated **/
|
|
@@ -98,6 +99,7 @@ export interface ParsedNangoSync {
|
|
|
98
99
|
webhookSubscriptions: string[];
|
|
99
100
|
version: string;
|
|
100
101
|
json_schema?: JSONSchema7 | undefined;
|
|
102
|
+
features?: Feature[] | undefined;
|
|
101
103
|
}
|
|
102
104
|
export interface ParsedNangoAction {
|
|
103
105
|
name: string;
|
|
@@ -110,6 +112,7 @@ export interface ParsedNangoAction {
|
|
|
110
112
|
usedModels: string[];
|
|
111
113
|
version: string;
|
|
112
114
|
json_schema?: JSONSchema7 | undefined;
|
|
115
|
+
features?: Feature[] | undefined;
|
|
113
116
|
}
|
|
114
117
|
export type LayoutMode = 'root' | 'nested';
|
|
115
118
|
export interface NangoModel {
|
|
@@ -141,7 +144,7 @@ export interface FlowsYaml {
|
|
|
141
144
|
}>;
|
|
142
145
|
}
|
|
143
146
|
export type FlowZeroJson = NangoYamlParsedIntegration & {
|
|
144
|
-
jsonSchema
|
|
147
|
+
jsonSchema?: JSONSchema7;
|
|
145
148
|
sdkVersion: string;
|
|
146
149
|
};
|
|
147
150
|
export type FlowsZeroJson = FlowZeroJson[];
|
package/dist/plans/db.d.ts
CHANGED
|
@@ -145,5 +145,10 @@ export interface DBPlan extends Timestamps {
|
|
|
145
145
|
* @default 100
|
|
146
146
|
*/
|
|
147
147
|
variants_per_sync_max: number;
|
|
148
|
+
/**
|
|
149
|
+
* Override the prefix for the function routing
|
|
150
|
+
* @default null
|
|
151
|
+
*/
|
|
152
|
+
fleet_node_routing_override: string | null;
|
|
148
153
|
}
|
|
149
154
|
export {};
|
package/dist/runner/index.d.ts
CHANGED
package/dist/syncConfigs/db.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { TimestampsAndDeleted } from '../db.js';
|
|
|
2
2
|
import type { LegacySyncModelSchema, NangoConfigMetadata } from '../deploy/incomingFlow.js';
|
|
3
3
|
import type { NangoModel, ScriptTypeLiteral, SyncTypeLiteral } from '../nangoYaml/index.js';
|
|
4
4
|
import type { JSONSchema7 } from 'json-schema';
|
|
5
|
+
export type Feature = 'checkpoints';
|
|
5
6
|
export interface DBSyncConfig extends TimestampsAndDeleted {
|
|
6
7
|
id: number;
|
|
7
8
|
sync_name: string;
|
|
@@ -27,5 +28,6 @@ export interface DBSyncConfig extends TimestampsAndDeleted {
|
|
|
27
28
|
enabled: boolean;
|
|
28
29
|
models_json_schema: JSONSchema7 | null;
|
|
29
30
|
sdk_version: string | null;
|
|
31
|
+
features: Feature[];
|
|
30
32
|
}
|
|
31
33
|
export type DBSyncConfigInsert = Omit<DBSyncConfig, 'id'>;
|
package/dist/user/api.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Endpoint } from '../api.js';
|
|
2
|
+
import type { Role } from './db.js';
|
|
2
3
|
export type GetUser = Endpoint<{
|
|
3
4
|
Method: 'GET';
|
|
4
5
|
Path: `/api/v1/user`;
|
|
5
6
|
Success: {
|
|
6
|
-
data:
|
|
7
|
+
data: ApiUserWithPermissions;
|
|
7
8
|
};
|
|
8
9
|
}>;
|
|
9
10
|
export type InternalGetUsers = Endpoint<{
|
|
@@ -35,6 +36,11 @@ export interface ApiUser {
|
|
|
35
36
|
uuid: string;
|
|
36
37
|
gettingStartedClosed: boolean;
|
|
37
38
|
}
|
|
39
|
+
export type AllowedPermissions = Partial<Record<string, Partial<Record<'production' | 'non-production' | 'global', ('create' | 'read' | 'update' | 'delete' | '*')[]>>>>;
|
|
40
|
+
export type ApiUserWithPermissions = ApiUser & {
|
|
41
|
+
role: Role;
|
|
42
|
+
permissions: AllowedPermissions;
|
|
43
|
+
};
|
|
38
44
|
export type PutUserPassword = Endpoint<{
|
|
39
45
|
Method: 'PUT';
|
|
40
46
|
Path: `/api/v1/user/password`;
|
package/dist/user/db.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Timestamps } from '../db.js';
|
|
2
|
+
export type Role = 'administrator' | 'production_support' | 'development_full_access';
|
|
2
3
|
export interface DBUser extends Timestamps {
|
|
3
4
|
id: number;
|
|
4
5
|
email: string;
|
|
@@ -14,4 +15,5 @@ export interface DBUser extends Timestamps {
|
|
|
14
15
|
email_verification_token_expires_at: Date | null;
|
|
15
16
|
uuid: string;
|
|
16
17
|
getting_started_closed: boolean;
|
|
18
|
+
role: Role;
|
|
17
19
|
}
|