@nangohq/types 0.60.1 → 0.60.3
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Merge } from 'type-fest';
|
|
2
1
|
import type { NangoModel, NangoSyncEndpointOld, NangoSyncEndpointV2, ScriptTypeLiteral, SyncTypeLiteral } from '../nangoYaml';
|
|
3
2
|
import type { OnEventType } from '../scripts/on-events/api';
|
|
3
|
+
import type { Merge } from 'type-fest';
|
|
4
4
|
export interface IncomingScriptFiles {
|
|
5
5
|
js: string;
|
|
6
6
|
ts: string;
|
|
@@ -25,10 +25,28 @@ export interface LegacySyncModelSchema {
|
|
|
25
25
|
type: string;
|
|
26
26
|
}[];
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
29
|
-
type:
|
|
28
|
+
export interface PreBuiltAction {
|
|
29
|
+
type: 'action';
|
|
30
30
|
models: string[];
|
|
31
|
-
|
|
31
|
+
attributes?: object | undefined;
|
|
32
|
+
metadata?: NangoConfigMetadata | undefined;
|
|
33
|
+
model_schema: string | NangoModel[];
|
|
34
|
+
providerConfigKey: string;
|
|
35
|
+
provider: string;
|
|
36
|
+
is_public: boolean;
|
|
37
|
+
public_route: string;
|
|
38
|
+
name: string;
|
|
39
|
+
syncName?: string;
|
|
40
|
+
nango_config_id?: number;
|
|
41
|
+
fileBody?: IncomingScriptFiles;
|
|
42
|
+
endpoints: NangoSyncEndpointV2[];
|
|
43
|
+
input?: NangoModel | LegacySyncModelSchema | undefined;
|
|
44
|
+
version?: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface PreBuiltSync {
|
|
47
|
+
type: 'sync';
|
|
48
|
+
models: string[];
|
|
49
|
+
runs: string;
|
|
32
50
|
auto_start?: boolean | undefined;
|
|
33
51
|
attributes?: object | undefined;
|
|
34
52
|
metadata?: NangoConfigMetadata | undefined;
|
|
@@ -46,6 +64,7 @@ export interface PreBuiltFlowConfig {
|
|
|
46
64
|
input?: NangoModel | LegacySyncModelSchema | undefined;
|
|
47
65
|
version?: string | null;
|
|
48
66
|
}
|
|
67
|
+
export type PreBuiltFlowConfig = PreBuiltAction | PreBuiltSync;
|
|
49
68
|
export interface CLIDeployFlowConfig {
|
|
50
69
|
type: ScriptTypeLiteral;
|
|
51
70
|
models: string[];
|
package/dist/flow/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { JSONSchema7 } from 'json-schema';
|
|
2
1
|
import type { LegacySyncModelSchema, NangoConfigMetadata } from '../deploy/incomingFlow';
|
|
3
2
|
import type { NangoModel, NangoSyncEndpointV2, ScriptTypeLiteral, SyncTypeLiteral } from '../nangoYaml';
|
|
3
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
4
4
|
export interface NangoSyncConfig {
|
|
5
5
|
name: string;
|
|
6
6
|
type?: ScriptTypeLiteral;
|
|
@@ -4,7 +4,7 @@ import type { AuthModeType, AuthModes } from '../auth/api';
|
|
|
4
4
|
import type { NangoSyncConfig } from '../flow';
|
|
5
5
|
import type { Provider } from '../providers/provider';
|
|
6
6
|
import type { Merge } from 'type-fest';
|
|
7
|
-
export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' | 'updated_at' | 'unique_key' | 'provider' | 'display_name'>, ApiTimestamps> & {
|
|
7
|
+
export type ApiPublicIntegration = Merge<Pick<IntegrationConfig, 'created_at' | 'updated_at' | 'unique_key' | 'provider' | 'display_name' | 'forward_webhooks'>, ApiTimestamps> & {
|
|
8
8
|
logo: string;
|
|
9
9
|
} & ApiPublicIntegrationInclude;
|
|
10
10
|
export interface ApiPublicIntegrationInclude {
|
|
@@ -46,6 +46,7 @@ export type PostPublicIntegration = Endpoint<{
|
|
|
46
46
|
unique_key: string;
|
|
47
47
|
display_name?: string | undefined;
|
|
48
48
|
credentials?: ApiPublicIntegrationCredentials | undefined;
|
|
49
|
+
forward_webhooks?: boolean | undefined;
|
|
49
50
|
};
|
|
50
51
|
Success: {
|
|
51
52
|
data: ApiPublicIntegration;
|
|
@@ -74,6 +75,7 @@ export type PatchPublicIntegration = Endpoint<{
|
|
|
74
75
|
unique_key?: string | undefined;
|
|
75
76
|
display_name?: string | undefined;
|
|
76
77
|
credentials?: ApiPublicIntegrationCredentials | undefined;
|
|
78
|
+
forward_webhooks?: boolean | undefined;
|
|
77
79
|
};
|
|
78
80
|
Success: {
|
|
79
81
|
data: ApiPublicIntegration;
|
|
@@ -166,6 +168,7 @@ export type PatchIntegration = Endpoint<{
|
|
|
166
168
|
integrationId?: string | undefined;
|
|
167
169
|
webhookSecret?: string | undefined;
|
|
168
170
|
displayName?: string | undefined;
|
|
171
|
+
forward_webhooks?: boolean | undefined;
|
|
169
172
|
} | {
|
|
170
173
|
authType: Extract<AuthModeType, 'OAUTH1' | 'OAUTH2' | 'TBA'>;
|
|
171
174
|
clientId: string;
|
package/dist/integration/db.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface IntegrationConfig extends TimestampsAndDeleted {
|
|
|
15
15
|
custom?: Record<string, string> | undefined | null;
|
|
16
16
|
missing_fields: string[];
|
|
17
17
|
display_name: string | null;
|
|
18
|
+
forward_webhooks: boolean;
|
|
18
19
|
}
|
|
19
20
|
export type DBIntegrationCrypted = Tagged<IntegrationConfig, 'IntegrationCrypted'>;
|
|
20
21
|
export type DBCreateIntegration = SetOptional<NullablePartial<Omit<IntegrationConfig, 'created_at' | 'updated_at'>>, 'missing_fields'>;
|