@nangohq/types 0.53.1 → 0.54.0
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/logs/messages.d.ts +10 -7
- package/dist/proxy/api.d.ts +19 -7
- package/dist/runner/sdk.d.ts +1 -13
- package/package.json +1 -1
package/dist/logs/messages.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Merge } from 'type-fest';
|
|
1
|
+
import type { Merge, SetNonNullable } from 'type-fest';
|
|
2
2
|
/**
|
|
3
3
|
* Level of the log and operation
|
|
4
4
|
*/
|
|
@@ -111,6 +111,11 @@ export interface MessageRow {
|
|
|
111
111
|
headers: Record<string, string>;
|
|
112
112
|
} | null;
|
|
113
113
|
meta: MessageMeta | null;
|
|
114
|
+
retry?: {
|
|
115
|
+
attempt: number;
|
|
116
|
+
max: number;
|
|
117
|
+
waited: number;
|
|
118
|
+
} | undefined;
|
|
114
119
|
createdAt: string;
|
|
115
120
|
updatedAt: string;
|
|
116
121
|
startedAt: string | null;
|
|
@@ -123,15 +128,13 @@ export interface MessageRow {
|
|
|
123
128
|
export type OperationRowInsert = Omit<Merge<Partial<MessageRow>, {
|
|
124
129
|
operation: OperationList;
|
|
125
130
|
}>, 'message'>;
|
|
126
|
-
export type OperationRow =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
accountName: string;
|
|
130
|
-
}>;
|
|
131
|
+
export type OperationRow = SetNonNullable<Omit<MessageRow, 'operation'>, 'id' | 'message' | 'source' | 'createdAt' | 'accountId' | 'accountName' | 'type' | 'level' | 'expiresAt' | 'state'> & {
|
|
132
|
+
operation: OperationList;
|
|
133
|
+
};
|
|
131
134
|
/**
|
|
132
135
|
* What is required to insert a Message
|
|
133
136
|
*/
|
|
134
|
-
export type MessageRowInsert = Pick<MessageRow, 'type' | 'message'> & Partial<Omit<MessageRow, 'type' | 'message'>> & {
|
|
137
|
+
export type MessageRowInsert = Pick<MessageRow, 'type' | 'message' | 'createdAt'> & Partial<Omit<MessageRow, 'type' | 'message'>> & {
|
|
135
138
|
id?: never;
|
|
136
139
|
};
|
|
137
140
|
export type MessageOrOperationRow = MessageRow | OperationRow;
|
package/dist/proxy/api.d.ts
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BasicApiCredentials, ApiKeyCredentials, AppCredentials } from '../auth/api.js';
|
|
1
|
+
import type { BasicApiCredentials, ApiKeyCredentials, AppCredentials, TbaCredentials, TableauCredentials, JwtCredentials, TwoStepCredentials, SignatureCredentials } from '../auth/api.js';
|
|
3
2
|
import type { DBConnectionDecrypted } from '../connection/db.js';
|
|
3
|
+
import type { HTTP_METHOD } from '../nangoYaml/index.js';
|
|
4
4
|
import type { Provider } from '../providers/provider.js';
|
|
5
|
+
export interface ProxyFile {
|
|
6
|
+
fieldname: string;
|
|
7
|
+
originalname: string;
|
|
8
|
+
encoding: string;
|
|
9
|
+
mimetype: string;
|
|
10
|
+
size: number;
|
|
11
|
+
destination: string;
|
|
12
|
+
filename: string;
|
|
13
|
+
path: string;
|
|
14
|
+
buffer: Buffer;
|
|
15
|
+
}
|
|
5
16
|
export interface BaseProxyConfiguration {
|
|
6
17
|
providerConfigKey: string;
|
|
7
18
|
connectionId: string;
|
|
8
19
|
endpoint: string;
|
|
9
20
|
retries?: number;
|
|
10
21
|
data?: unknown;
|
|
22
|
+
files?: ProxyFile[];
|
|
11
23
|
headers?: Record<string, string>;
|
|
12
24
|
params?: string | Record<string, string | number>;
|
|
13
25
|
baseUrlOverride?: string;
|
|
14
|
-
responseType?: ResponseType;
|
|
26
|
+
responseType?: ResponseType | undefined;
|
|
15
27
|
retryHeader?: RetryHeaderConfig;
|
|
16
28
|
retryOn?: number[] | null;
|
|
17
29
|
}
|
|
@@ -22,16 +34,16 @@ export interface UserProvidedProxyConfiguration extends BaseProxyConfiguration {
|
|
|
22
34
|
}
|
|
23
35
|
export interface ApplicationConstructedProxyConfiguration extends BaseProxyConfiguration {
|
|
24
36
|
decompress?: boolean;
|
|
25
|
-
method:
|
|
37
|
+
method: HTTP_METHOD;
|
|
26
38
|
providerName: string;
|
|
27
|
-
token: string | BasicApiCredentials | ApiKeyCredentials | AppCredentials;
|
|
39
|
+
token: string | BasicApiCredentials | ApiKeyCredentials | AppCredentials | TbaCredentials | TableauCredentials | JwtCredentials | TwoStepCredentials | SignatureCredentials;
|
|
28
40
|
provider: Provider;
|
|
29
|
-
connection: DBConnectionDecrypted
|
|
41
|
+
connection: Pick<DBConnectionDecrypted, 'connection_id' | 'connection_config' | 'credentials' | 'metadata'>;
|
|
30
42
|
}
|
|
31
43
|
export type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
|
|
32
44
|
export interface InternalProxyConfiguration {
|
|
33
45
|
providerName: string;
|
|
34
|
-
connection: DBConnectionDecrypted
|
|
46
|
+
connection: Pick<DBConnectionDecrypted, 'connection_id' | 'connection_config' | 'credentials' | 'metadata'>;
|
|
35
47
|
existingActivityLogId?: string | null | undefined;
|
|
36
48
|
}
|
|
37
49
|
export interface RetryHeaderConfig {
|
package/dist/runner/sdk.d.ts
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import type { AxiosError, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
2
|
import type { RunnerFlags } from '.';
|
|
3
|
-
import type { Metadata } from '../connection/db';
|
|
4
3
|
import type { DBTeam } from '../team/db';
|
|
5
4
|
import type { DBSyncConfig } from '../syncConfigs/db';
|
|
6
|
-
export interface RunArgs {
|
|
7
|
-
sync: string;
|
|
8
|
-
connectionId: string;
|
|
9
|
-
lastSyncDate?: string;
|
|
10
|
-
useServerLastSyncDate?: boolean;
|
|
11
|
-
input?: object;
|
|
12
|
-
metadata?: Metadata;
|
|
13
|
-
autoConfirm: boolean;
|
|
14
|
-
debug: boolean;
|
|
15
|
-
optionalEnvironment?: string;
|
|
16
|
-
optionalProviderConfigKey?: string;
|
|
17
|
-
}
|
|
18
5
|
export interface NangoProps {
|
|
19
6
|
scriptType: 'sync' | 'action' | 'webhook' | 'on-event';
|
|
20
7
|
host?: string;
|
|
@@ -28,6 +15,7 @@ export interface NangoProps {
|
|
|
28
15
|
provider: string;
|
|
29
16
|
lastSyncDate?: Date;
|
|
30
17
|
syncId?: string | undefined;
|
|
18
|
+
syncVariant?: string | undefined;
|
|
31
19
|
nangoConnectionId?: number;
|
|
32
20
|
syncJobId?: number | undefined;
|
|
33
21
|
track_deletes?: boolean;
|