@nangohq/types 0.43.0 → 0.44.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/auth/api.d.ts +9 -1
- package/dist/auth/http.api.d.ts +21 -0
- package/dist/endpoints/db.d.ts +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/nangoYaml/index.d.ts +2 -2
- package/dist/providers/provider.d.ts +9 -1
- package/package.json +1 -1
package/dist/auth/api.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface AuthModes {
|
|
|
13
13
|
Jwt: 'JWT';
|
|
14
14
|
Bill: 'BILL';
|
|
15
15
|
TwoStep: 'TWO_STEP';
|
|
16
|
+
Signature: 'SIGNATURE';
|
|
16
17
|
}
|
|
17
18
|
export type AuthModeType = AuthModes[keyof AuthModes];
|
|
18
19
|
export interface AuthOperation {
|
|
@@ -142,9 +143,16 @@ export interface TwoStepCredentials extends CredentialsCommon {
|
|
|
142
143
|
token?: string;
|
|
143
144
|
expires_at?: Date | undefined;
|
|
144
145
|
}
|
|
146
|
+
export interface SignatureCredentials {
|
|
147
|
+
type: AuthModes['Signature'];
|
|
148
|
+
username: string;
|
|
149
|
+
password: string;
|
|
150
|
+
token?: string;
|
|
151
|
+
expires_at?: Date | undefined;
|
|
152
|
+
}
|
|
145
153
|
export type UnauthCredentials = Record<string, never>;
|
|
146
154
|
export type RefreshTokenResponse = AuthorizationTokenResponse;
|
|
147
155
|
export interface AuthorizationTokenResponse extends Omit<OAuth2Credentials, 'type' | 'raw'> {
|
|
148
156
|
expires_in?: number;
|
|
149
157
|
}
|
|
150
|
-
export type AllAuthCredentials = OAuth1Credentials | OAuth2Credentials | OAuth2ClientCredentials | BasicApiCredentials | ApiKeyCredentials | AppCredentials | AppStoreCredentials | UnauthCredentials | CustomCredentials | TbaCredentials | TableauCredentials | JwtCredentials | BillCredentials | TwoStepCredentials;
|
|
158
|
+
export type AllAuthCredentials = OAuth1Credentials | OAuth2Credentials | OAuth2ClientCredentials | BasicApiCredentials | ApiKeyCredentials | AppCredentials | AppStoreCredentials | UnauthCredentials | CustomCredentials | TbaCredentials | TableauCredentials | JwtCredentials | BillCredentials | TwoStepCredentials | SignatureCredentials;
|
package/dist/auth/http.api.d.ts
CHANGED
|
@@ -126,3 +126,24 @@ export type PostPublicTwoStepAuthorization = Endpoint<{
|
|
|
126
126
|
connectionId: string;
|
|
127
127
|
};
|
|
128
128
|
}>;
|
|
129
|
+
export type PostPublicSignatureAuthorization = Endpoint<{
|
|
130
|
+
Method: 'POST';
|
|
131
|
+
Body: {
|
|
132
|
+
username: string;
|
|
133
|
+
password: string;
|
|
134
|
+
};
|
|
135
|
+
Querystring: {
|
|
136
|
+
connection_id?: string | undefined;
|
|
137
|
+
params?: Record<string, any> | undefined;
|
|
138
|
+
hmac?: string | undefined;
|
|
139
|
+
};
|
|
140
|
+
Params: {
|
|
141
|
+
providerConfigKey: string;
|
|
142
|
+
};
|
|
143
|
+
Path: '/auth/signature-based';
|
|
144
|
+
Error: ApiError<'invalid_body'> | ApiError<'invalid_query_params'> | ApiError<'unknown_provider_config'> | ApiError<'unknown_provider_template'> | ApiError<'invalid_auth_mode'> | ApiError<'invalid_credentials'>;
|
|
145
|
+
Success: {
|
|
146
|
+
providerConfigKey: string;
|
|
147
|
+
connectionId: string;
|
|
148
|
+
};
|
|
149
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import type { Timestamps } from '../db';
|
|
3
|
+
import type { HTTP_METHOD } from '../nangoYaml';
|
|
4
|
+
export interface DBSyncEndpoint extends Timestamps {
|
|
5
|
+
id: number;
|
|
6
|
+
sync_config_id: number;
|
|
7
|
+
method: HTTP_METHOD;
|
|
8
|
+
path: string;
|
|
9
|
+
model: string | null;
|
|
10
|
+
group_name: string | null;
|
|
11
|
+
}
|
|
12
|
+
export type DBSyncEndpointCreate = SetOptional<Omit<DBSyncEndpoint, 'id'>, 'model' | 'group_name'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export type * from './auth/http.api.js';
|
|
|
36
36
|
export type * from './deploy/api.js';
|
|
37
37
|
export type * from './deploy/index.js';
|
|
38
38
|
export type * from './deploy/incomingFlow.js';
|
|
39
|
+
export type * from './endpoints/db.js';
|
|
39
40
|
export type * from './connect/api.js';
|
|
40
41
|
export type * from './connect/session.js';
|
|
41
42
|
export type * from './endUser/index.js';
|
|
@@ -22,7 +22,7 @@ export interface NangoYamlV2 {
|
|
|
22
22
|
export interface NangoYamlV2Endpoint {
|
|
23
23
|
method?: HTTP_METHOD;
|
|
24
24
|
path: string;
|
|
25
|
-
|
|
25
|
+
group?: string | undefined;
|
|
26
26
|
}
|
|
27
27
|
export interface NangoYamlV2Integration {
|
|
28
28
|
provider?: string;
|
|
@@ -119,5 +119,5 @@ export type NangoSyncEndpointOld = {
|
|
|
119
119
|
export interface NangoSyncEndpointV2 {
|
|
120
120
|
method: HTTP_METHOD;
|
|
121
121
|
path: string;
|
|
122
|
-
|
|
122
|
+
group?: string | undefined;
|
|
123
123
|
}
|
|
@@ -122,4 +122,12 @@ export interface ProviderTwoStep extends BaseProvider {
|
|
|
122
122
|
token_expires_in_ms?: number;
|
|
123
123
|
proxy_header_authorization?: string;
|
|
124
124
|
}
|
|
125
|
-
export
|
|
125
|
+
export interface ProviderSignature extends BaseProvider {
|
|
126
|
+
signature: {
|
|
127
|
+
protocol: 'WSSE';
|
|
128
|
+
};
|
|
129
|
+
token: {
|
|
130
|
+
expires_in_ms: number;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export type Provider = BaseProvider | ProviderOAuth1 | ProviderOAuth2 | ProviderJwt | ProviderTwoStep | ProviderSignature;
|