@nangohq/types 0.52.4 → 0.52.5
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/api.endpoints.d.ts +4 -2
- package/dist/environment/api/index.d.ts +25 -2
- package/dist/environment/api/webhook.d.ts +9 -36
- package/dist/environment/db.d.ts +13 -7
- package/dist/environment/variable/api.d.ts +16 -0
- package/dist/fleet/api.d.ts +2 -2
- package/dist/fleet/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -15,9 +15,11 @@ import type { DeletePublicConnection, GetConnection, GetConnections, GetConnecti
|
|
|
15
15
|
import type { GetMeta } from './meta/api';
|
|
16
16
|
import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api';
|
|
17
17
|
import type { PostPublicWebhook } from './webhooks/http.api';
|
|
18
|
-
import type { PostEnvironment } from './environment/api';
|
|
18
|
+
import type { PatchEnvironment, PostEnvironment } from './environment/api';
|
|
19
|
+
import type { PatchWebhook } from './environment/api/webhook';
|
|
20
|
+
import type { PostEnvironmentVariables } from './environment/variable/api';
|
|
19
21
|
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTbaAuthorization | PostPublicTableauAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrationsLegacy | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook;
|
|
20
|
-
export type PrivateApiEndpoints = PostSignup | PostSignin | GetTeam | PutTeam | 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;
|
|
22
|
+
export type PrivateApiEndpoints = PostSignup | PostSignin | GetTeam | PutTeam | 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 | PatchWebhook | PostEnvironmentVariables;
|
|
21
23
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
22
24
|
/**
|
|
23
25
|
* Automatically narrow endpoints type with Method + Path
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Merge } from 'type-fest';
|
|
2
|
+
import type { ApiTimestamps, Endpoint } from '../../api';
|
|
3
|
+
import type { DBEnvironment, DBExternalWebhook } from '../db';
|
|
4
|
+
export type ApiEnvironment = Omit<Merge<DBEnvironment, {
|
|
5
|
+
callback_url: string;
|
|
6
|
+
} & ApiTimestamps>, 'secret_key_iv' | 'secret_key_tag' | 'secret_key_hashed' | 'pending_secret_key_iv' | 'pending_secret_key_tag' | 'pending_public_key'>;
|
|
7
|
+
export type ApiWebhooks = Omit<DBExternalWebhook, 'id' | 'environment_id' | 'created_at' | 'updated_at'>;
|
|
3
8
|
export type PostEnvironment = Endpoint<{
|
|
4
9
|
Method: 'POST';
|
|
5
10
|
Path: '/api/v1/environments';
|
|
@@ -10,3 +15,21 @@ export type PostEnvironment = Endpoint<{
|
|
|
10
15
|
data: Pick<DBEnvironment, 'id' | 'name'>;
|
|
11
16
|
};
|
|
12
17
|
}>;
|
|
18
|
+
export type PatchEnvironment = Endpoint<{
|
|
19
|
+
Method: 'PATCH';
|
|
20
|
+
Path: '/api/v1/environments';
|
|
21
|
+
Body: {
|
|
22
|
+
callback_url?: string | undefined;
|
|
23
|
+
hmac_key?: string | undefined;
|
|
24
|
+
hmac_enabled?: boolean | undefined;
|
|
25
|
+
slack_notifications?: boolean | undefined;
|
|
26
|
+
otlp_endpoint?: string | undefined;
|
|
27
|
+
otlp_headers?: {
|
|
28
|
+
name: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}[] | undefined;
|
|
31
|
+
};
|
|
32
|
+
Success: {
|
|
33
|
+
data: ApiEnvironment;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
@@ -1,46 +1,19 @@
|
|
|
1
1
|
import type { Endpoint } from '../../api.js';
|
|
2
|
-
export
|
|
3
|
-
alwaysSendWebhook: boolean;
|
|
4
|
-
sendAuthWebhook: boolean;
|
|
5
|
-
sendRefreshFailedWebhook: boolean;
|
|
6
|
-
sendSyncFailedWebhook: boolean;
|
|
7
|
-
}
|
|
8
|
-
export type UpdateWebhookSettings = Endpoint<{
|
|
2
|
+
export type PatchWebhook = Endpoint<{
|
|
9
3
|
Method: 'PATCH';
|
|
10
4
|
Querystring: {
|
|
11
5
|
env: string;
|
|
12
6
|
};
|
|
13
|
-
Path: '/api/v1/
|
|
14
|
-
Body: WebhookSettings;
|
|
15
|
-
Success: WebhookSettings;
|
|
16
|
-
}>;
|
|
17
|
-
export type UpdatePrimaryUrl = Endpoint<{
|
|
18
|
-
Method: 'PATCH';
|
|
19
|
-
Querystring: {
|
|
20
|
-
env: string;
|
|
21
|
-
};
|
|
22
|
-
Path: '/api/v1/environment/webhook/url/primary-url';
|
|
23
|
-
Body: {
|
|
24
|
-
url: string;
|
|
25
|
-
};
|
|
26
|
-
Success: {
|
|
27
|
-
data: {
|
|
28
|
-
url: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}>;
|
|
32
|
-
export type UpdateSecondaryUrl = Endpoint<{
|
|
33
|
-
Method: 'PATCH';
|
|
34
|
-
Querystring: {
|
|
35
|
-
env: string;
|
|
36
|
-
};
|
|
37
|
-
Path: '/api/v1/environment/webhook/secondary-url';
|
|
7
|
+
Path: '/api/v1/environments/webhook';
|
|
38
8
|
Body: {
|
|
39
|
-
|
|
9
|
+
primary_url?: string | undefined;
|
|
10
|
+
secondary_url?: string | undefined;
|
|
11
|
+
on_sync_completion_always?: boolean | undefined;
|
|
12
|
+
on_auth_creation?: boolean | undefined;
|
|
13
|
+
on_auth_refresh_error?: boolean | undefined;
|
|
14
|
+
on_sync_error?: boolean | undefined;
|
|
40
15
|
};
|
|
41
16
|
Success: {
|
|
42
|
-
|
|
43
|
-
url: string;
|
|
44
|
-
};
|
|
17
|
+
success: boolean;
|
|
45
18
|
};
|
|
46
19
|
}>;
|
package/dist/environment/db.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Timestamps } from '../db';
|
|
2
2
|
export interface DBEnvironmentVariable extends Timestamps {
|
|
3
|
-
id
|
|
3
|
+
id: number;
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
environment_id: number;
|
|
7
|
-
value_iv
|
|
8
|
-
value_tag
|
|
7
|
+
value_iv: string | null;
|
|
8
|
+
value_tag: string | null;
|
|
9
9
|
}
|
|
10
10
|
export interface DBEnvironment extends Timestamps {
|
|
11
11
|
id: number;
|
|
@@ -18,7 +18,13 @@ export interface DBEnvironment extends Timestamps {
|
|
|
18
18
|
secret_key_tag?: string | null;
|
|
19
19
|
secret_key_hashed?: string | null;
|
|
20
20
|
callback_url: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
*/
|
|
21
24
|
webhook_url: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
*/
|
|
22
28
|
webhook_url_secondary: string | null;
|
|
23
29
|
websockets_path: string | null;
|
|
24
30
|
hmac_enabled: boolean;
|
|
@@ -33,17 +39,17 @@ export interface DBEnvironment extends Timestamps {
|
|
|
33
39
|
pending_secret_key_tag?: string | null;
|
|
34
40
|
pending_public_key?: string | null;
|
|
35
41
|
slack_notifications: boolean;
|
|
36
|
-
webhook_receive_url
|
|
42
|
+
webhook_receive_url: string | null;
|
|
37
43
|
otlp_settings: {
|
|
38
44
|
endpoint: string;
|
|
39
45
|
headers: Record<string, string>;
|
|
40
46
|
} | null;
|
|
41
47
|
}
|
|
42
|
-
export interface
|
|
48
|
+
export interface DBExternalWebhook extends Timestamps {
|
|
43
49
|
id: number;
|
|
44
50
|
environment_id: number;
|
|
45
|
-
primary_url: string;
|
|
46
|
-
secondary_url: string;
|
|
51
|
+
primary_url: string | null;
|
|
52
|
+
secondary_url: string | null;
|
|
47
53
|
on_sync_completion_always: boolean;
|
|
48
54
|
on_auth_creation: boolean;
|
|
49
55
|
on_auth_refresh_error: boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Endpoint } from '../../api';
|
|
2
|
+
import type { DBEnvironmentVariable } from '../db';
|
|
3
|
+
export type ApiEnvironmentVariable = Pick<DBEnvironmentVariable, 'name' | 'value'>;
|
|
4
|
+
export type PostEnvironmentVariables = Endpoint<{
|
|
5
|
+
Method: 'POST';
|
|
6
|
+
Path: '/api/v1/environments/variables';
|
|
7
|
+
Body: {
|
|
8
|
+
variables: {
|
|
9
|
+
name: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
Success: {
|
|
14
|
+
success: boolean;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
package/dist/fleet/api.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Endpoint, ApiError } from '../api.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Deployment } from './index.js';
|
|
3
3
|
export type PostRollout = Endpoint<{
|
|
4
4
|
Method: 'POST';
|
|
5
5
|
Path: '/fleet/:fleetId/rollout';
|
|
6
6
|
Body: {
|
|
7
|
-
|
|
7
|
+
image: string;
|
|
8
8
|
};
|
|
9
9
|
Params: {
|
|
10
10
|
fleetId: string;
|
package/dist/fleet/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export type * from './environment/api/index.js';
|
|
|
48
48
|
export type * from './environment/api/webhook.js';
|
|
49
49
|
export type * from './environment/api/otlp.js';
|
|
50
50
|
export type * from './environment/variable/index.js';
|
|
51
|
+
export type * from './environment/variable/api.js';
|
|
51
52
|
export type * from './webhooks/api.js';
|
|
52
53
|
export type * from './webhooks/http.api.js';
|
|
53
54
|
export type * from './flow/http.api.js';
|