@nangohq/types 0.66.0 → 0.66.2
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/account/api.d.ts +1 -0
- package/dist/api.endpoints.d.ts +3 -1
- package/dist/auth/api.d.ts +1 -0
- package/dist/connect/api.d.ts +1 -0
- package/dist/endUser/index.d.ts +2 -0
- package/dist/gettingStarted/api.d.ts +23 -0
- package/dist/gettingStarted/db.d.ts +20 -0
- package/dist/gettingStarted/dto.d.ts +18 -0
- package/dist/index.d.ts +5 -0
- package/dist/integration/db.d.ts +1 -0
- package/dist/proxy/api.d.ts +2 -2
- package/dist/runner/sdk.d.ts +1 -0
- package/dist/sharedCredentials/api.d.ts +58 -0
- package/dist/sharedCredentials/dto.d.ts +2 -0
- package/dist/team/db.d.ts +1 -0
- package/package.json +1 -1
package/dist/account/api.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type PostSignup = Endpoint<{
|
|
|
8
8
|
name: string;
|
|
9
9
|
password: string;
|
|
10
10
|
token?: string | undefined;
|
|
11
|
+
foundUs?: string | undefined;
|
|
11
12
|
};
|
|
12
13
|
Error: ApiError<'email_already_verified'> | ApiError<'error_creating_user'> | ApiError<'user_already_exists'> | ApiError<'error_creating_account'> | ApiError<'invalid_invite_token'> | ApiError<'email_not_verified'>;
|
|
13
14
|
Success: {
|
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { DeleteEnvironment, PatchEnvironment, PostEnvironment } from './env
|
|
|
11
11
|
import type { PatchWebhook } from './environment/api/webhook.js';
|
|
12
12
|
import type { PostEnvironmentVariables } from './environment/variable/api.js';
|
|
13
13
|
import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api.js';
|
|
14
|
+
import type { GetGettingStarted, PatchGettingStarted } from './gettingStarted/api.js';
|
|
14
15
|
import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetIntegrationFlows, GetPublicIntegration, GetPublicListIntegrations, PatchIntegration, PatchPublicIntegration, PostIntegration, PostPublicIntegration } from './integration/api.js';
|
|
15
16
|
import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
|
|
16
17
|
import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api.js';
|
|
@@ -20,12 +21,13 @@ import type { PostPlanExtendTrial } from './plans/http.api.js';
|
|
|
20
21
|
import type { GetPublicProvider, GetPublicProviders } from './providers/api.js';
|
|
21
22
|
import type { GetPublicRecords } from './record/api.js';
|
|
22
23
|
import type { GetPublicScriptsConfig } from './scripts/http.api.js';
|
|
24
|
+
import type { GetSharedCredentialsProvider, GetSharedCredentialsProviders, PatchSharedCredentialsProvider, PostSharedCredentialsProvider } from './sharedCredentials/api.js';
|
|
23
25
|
import type { PostPublicTrigger, PutPublicSyncConnectionFrequency } from './sync/api.js';
|
|
24
26
|
import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api.js';
|
|
25
27
|
import type { GetUser, PatchUser } from './user/api.js';
|
|
26
28
|
import type { PostPublicWebhook } from './webhooks/http.api.js';
|
|
27
29
|
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 | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization;
|
|
28
|
-
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PatchOnboarding | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | PatchWebhook | PostEnvironmentVariables | PostImpersonate;
|
|
30
|
+
export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PatchOnboarding | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | PatchWebhook | PostEnvironmentVariables | PostImpersonate | GetSharedCredentialsProviders | GetSharedCredentialsProvider | PostSharedCredentialsProvider | PatchSharedCredentialsProvider | GetGettingStarted | PatchGettingStarted;
|
|
29
31
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
30
32
|
/**
|
|
31
33
|
* Automatically narrow endpoints type with Method + Path
|
package/dist/auth/api.d.ts
CHANGED
package/dist/connect/api.d.ts
CHANGED
package/dist/endUser/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface EndUser {
|
|
|
5
5
|
readonly environmentId: number;
|
|
6
6
|
readonly email: string | null;
|
|
7
7
|
readonly displayName?: string | null;
|
|
8
|
+
readonly tags: Record<string, string> | null;
|
|
8
9
|
readonly organization?: {
|
|
9
10
|
readonly organizationId: string;
|
|
10
11
|
readonly displayName?: string | null;
|
|
@@ -21,6 +22,7 @@ export interface DBEndUser {
|
|
|
21
22
|
readonly display_name: string | null;
|
|
22
23
|
readonly organization_id: string | null;
|
|
23
24
|
readonly organization_display_name: string | null;
|
|
25
|
+
readonly tags: Record<string, string> | null;
|
|
24
26
|
readonly created_at: Date;
|
|
25
27
|
readonly updated_at: Date | null;
|
|
26
28
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GettingStartedOutput as GettingStartedProgressOutput, PatchGettingStartedInput as PatchGettingStartedProgressInput } from './dto.js';
|
|
2
|
+
import type { ApiError, Endpoint } from '../api.js';
|
|
3
|
+
export type GetGettingStarted = Endpoint<{
|
|
4
|
+
Method: 'GET';
|
|
5
|
+
Path: '/api/v1/getting-started';
|
|
6
|
+
Querystring: {
|
|
7
|
+
env: string;
|
|
8
|
+
};
|
|
9
|
+
Success: {
|
|
10
|
+
data: GettingStartedProgressOutput;
|
|
11
|
+
};
|
|
12
|
+
Error: ApiError<'failed_to_get_or_create_getting_started_progress'>;
|
|
13
|
+
}>;
|
|
14
|
+
export type PatchGettingStarted = Endpoint<{
|
|
15
|
+
Method: 'PATCH';
|
|
16
|
+
Path: '/api/v1/getting-started';
|
|
17
|
+
Querystring: {
|
|
18
|
+
env: string;
|
|
19
|
+
};
|
|
20
|
+
Success: never;
|
|
21
|
+
Body: PatchGettingStartedProgressInput;
|
|
22
|
+
Error: ApiError<'connection_not_found' | 'getting_started_progress_not_found' | 'failed_to_update_getting_started_progress'>;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Timestamps } from '../db.js';
|
|
2
|
+
/**
|
|
3
|
+
* One per account. Holds environment and integration used for getting started flow for that account.
|
|
4
|
+
*/
|
|
5
|
+
export interface DBGettingStartedMeta extends Timestamps {
|
|
6
|
+
id: number;
|
|
7
|
+
account_id: number;
|
|
8
|
+
environment_id: number;
|
|
9
|
+
integration_id: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* One per user. Holds progress for each user in the getting started flow.
|
|
13
|
+
*/
|
|
14
|
+
export interface DBGettingStartedProgress extends Timestamps {
|
|
15
|
+
id: number;
|
|
16
|
+
getting_started_meta_id: number;
|
|
17
|
+
user_id: number;
|
|
18
|
+
connection_id: number | null;
|
|
19
|
+
step: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DBGettingStartedMeta, DBGettingStartedProgress } from './db.js';
|
|
2
|
+
import type { DBConnection } from '../connection/db.js';
|
|
3
|
+
import type { DBEnvironment } from '../environment/db.js';
|
|
4
|
+
import type { IntegrationConfig } from '../integration/db.js';
|
|
5
|
+
export interface GettingStartedOutput {
|
|
6
|
+
meta: {
|
|
7
|
+
environment: Pick<DBEnvironment, 'id' | 'name'>;
|
|
8
|
+
integration: Pick<IntegrationConfig, 'id' | 'unique_key' | 'provider' | 'display_name'>;
|
|
9
|
+
};
|
|
10
|
+
connection: Pick<DBConnection, 'id' | 'connection_id'> | null;
|
|
11
|
+
step: number;
|
|
12
|
+
}
|
|
13
|
+
export interface PatchGettingStartedInput {
|
|
14
|
+
connection_id?: string | null | undefined;
|
|
15
|
+
step?: number | undefined;
|
|
16
|
+
}
|
|
17
|
+
export type CreateGettingStartedMeta = Omit<DBGettingStartedMeta, 'id' | 'created_at' | 'updated_at'>;
|
|
18
|
+
export type CreateGettingStartedProgress = Omit<DBGettingStartedProgress, 'id' | 'created_at' | 'updated_at'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export type * from './api.js';
|
|
|
3
3
|
export type * from './api.endpoints.js';
|
|
4
4
|
export type * from './onboarding/db.js';
|
|
5
5
|
export type * from './onboarding/api.js';
|
|
6
|
+
export type * from './gettingStarted/db.js';
|
|
7
|
+
export type * from './gettingStarted/dto.js';
|
|
8
|
+
export type * from './gettingStarted/api.js';
|
|
6
9
|
export type * from './record/api.js';
|
|
7
10
|
export type * from './logs/api.js';
|
|
8
11
|
export type * from './logs/messages.js';
|
|
@@ -21,7 +24,9 @@ export type * from './syncConfigs/db.js';
|
|
|
21
24
|
export type * from './syncConfigs/api.js';
|
|
22
25
|
export type * from './team/api.js';
|
|
23
26
|
export type * from './team/db.js';
|
|
27
|
+
export type * from './sharedCredentials/api.js';
|
|
24
28
|
export type * from './sharedCredentials/db.js';
|
|
29
|
+
export type * from './sharedCredentials/dto.js';
|
|
25
30
|
export type * from './billing/types.js';
|
|
26
31
|
export type * from './billing/http.api.js';
|
|
27
32
|
export type * from './usage/dto.js';
|
package/dist/integration/db.d.ts
CHANGED
|
@@ -18,5 +18,6 @@ export interface IntegrationConfig extends TimestampsAndDeleted {
|
|
|
18
18
|
forward_webhooks: boolean;
|
|
19
19
|
shared_credentials_id: number | null;
|
|
20
20
|
}
|
|
21
|
+
export type DBIntegrationDecrypted = IntegrationConfig;
|
|
21
22
|
export type DBIntegrationCrypted = Tagged<IntegrationConfig, 'IntegrationCrypted'>;
|
|
22
23
|
export type DBCreateIntegration = SetOptional<NullablePartial<Omit<IntegrationConfig, 'created_at' | 'updated_at'>>, 'missing_fields'>;
|
package/dist/proxy/api.d.ts
CHANGED
|
@@ -43,8 +43,8 @@ export interface InternalProxyConfiguration {
|
|
|
43
43
|
providerName: string;
|
|
44
44
|
}
|
|
45
45
|
export interface RetryHeaderConfig {
|
|
46
|
-
at?: string;
|
|
47
|
-
after?: string;
|
|
46
|
+
at?: string[] | string;
|
|
47
|
+
after?: string[] | string;
|
|
48
48
|
remaining?: string;
|
|
49
49
|
error_code?: string[];
|
|
50
50
|
in_body?: {
|
package/dist/runner/sdk.d.ts
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ApiError, Endpoint } from '../api.js';
|
|
2
|
+
export type GetSharedCredentialsProviders = Endpoint<{
|
|
3
|
+
Method: 'GET';
|
|
4
|
+
Path: '/internal/shared-credentials';
|
|
5
|
+
Success: {
|
|
6
|
+
success: boolean;
|
|
7
|
+
data: SharedCredentialsOutput[];
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
export type GetSharedCredentialsProvider = Endpoint<{
|
|
11
|
+
Method: 'GET';
|
|
12
|
+
Path: '/internal/shared-credentials/:id';
|
|
13
|
+
Params: {
|
|
14
|
+
id: number;
|
|
15
|
+
};
|
|
16
|
+
Success: {
|
|
17
|
+
success: boolean;
|
|
18
|
+
data: SharedCredentialsOutput;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
export type PostSharedCredentialsProvider = Endpoint<{
|
|
22
|
+
Method: 'POST';
|
|
23
|
+
Path: '/internal/shared-credentials';
|
|
24
|
+
Body: SharedCredentialsBodyInput;
|
|
25
|
+
Success: {
|
|
26
|
+
success: boolean;
|
|
27
|
+
};
|
|
28
|
+
Error: ApiError<'invalid_body' | 'shared_credentials_already_exists' | 'invalid_provider'>;
|
|
29
|
+
}>;
|
|
30
|
+
export type PatchSharedCredentialsProvider = Endpoint<{
|
|
31
|
+
Method: 'PATCH';
|
|
32
|
+
Path: '/internal/shared-credentials/:id';
|
|
33
|
+
Params: {
|
|
34
|
+
id: number;
|
|
35
|
+
};
|
|
36
|
+
Body: SharedCredentialsBodyInput;
|
|
37
|
+
Success: {
|
|
38
|
+
success: boolean;
|
|
39
|
+
};
|
|
40
|
+
Error: ApiError<'invalid_body' | 'shared_credentials_provider_not_found' | 'shared_credentials_already_exists' | 'invalid_provider'>;
|
|
41
|
+
}>;
|
|
42
|
+
export interface SharedCredentialsBodyInput {
|
|
43
|
+
name: string;
|
|
44
|
+
client_id: string;
|
|
45
|
+
client_secret: string;
|
|
46
|
+
scopes?: string | undefined;
|
|
47
|
+
}
|
|
48
|
+
export interface SharedCredentialsOutput {
|
|
49
|
+
id: number;
|
|
50
|
+
name: string;
|
|
51
|
+
credentials: {
|
|
52
|
+
client_id: string;
|
|
53
|
+
client_secret: string;
|
|
54
|
+
scopes?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
created_at: string;
|
|
57
|
+
updated_at: string;
|
|
58
|
+
}
|
package/dist/team/db.d.ts
CHANGED