@nangohq/types 0.71.5 → 0.71.6
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/agent/toolSearch.d.ts +34 -0
- package/dist/api-keys/auth.d.ts +2 -0
- package/dist/audit-trail/api.d.ts +3 -2
- package/dist/audit-trail/event.d.ts +119 -16
- package/dist/audit-trail/metadata.d.ts +99 -0
- package/dist/auth/api.d.ts +1 -1
- package/dist/billing/types.d.ts +10 -10
- package/dist/environment/api/index.d.ts +15 -10
- package/dist/environment/api/webhook.d.ts +1 -0
- package/dist/environment/db.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/logs/messages.d.ts +1 -1
- package/dist/meta/api.d.ts +1 -0
- package/dist/plans/db.d.ts +1 -1
- package/dist/providers/provider.d.ts +1 -0
- package/dist/webhooks/api.d.ts +2 -1
- package/package.json +1 -1
package/dist/account/api.d.ts
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
2
|
+
export type AgentSessionToolConnectionState = {
|
|
3
|
+
readonly status: 'connected';
|
|
4
|
+
readonly connection_id: string;
|
|
5
|
+
} | {
|
|
6
|
+
readonly status: 'not_connected';
|
|
7
|
+
};
|
|
8
|
+
/** `schema` carries the arguments, `none` means there are none, `unavailable` means they could not be read. */
|
|
9
|
+
export type AgentSessionToolInput = {
|
|
10
|
+
readonly kind: 'schema';
|
|
11
|
+
readonly schema: JSONSchema7;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: 'none';
|
|
14
|
+
} | {
|
|
15
|
+
readonly kind: 'unavailable';
|
|
16
|
+
};
|
|
17
|
+
export interface AgentSessionToolMatch {
|
|
18
|
+
/** What to pass to nango_execute. Names are sanitised and clipped, so use it as given. */
|
|
19
|
+
readonly tool: string;
|
|
20
|
+
readonly integration: string;
|
|
21
|
+
readonly action: string;
|
|
22
|
+
readonly provider: string;
|
|
23
|
+
readonly description: string;
|
|
24
|
+
/** Whether the tool is in the agent's tool list, under the same name. */
|
|
25
|
+
readonly listed: boolean;
|
|
26
|
+
readonly connection: AgentSessionToolConnectionState;
|
|
27
|
+
/** Only on a best match. A soft match is a lead to narrow down, not something to call yet. */
|
|
28
|
+
readonly input?: AgentSessionToolInput;
|
|
29
|
+
}
|
|
30
|
+
export interface AgentSessionToolSearchResult {
|
|
31
|
+
readonly guidance: string;
|
|
32
|
+
readonly matches: AgentSessionToolMatch[];
|
|
33
|
+
readonly related: AgentSessionToolMatch[];
|
|
34
|
+
}
|
package/dist/api-keys/auth.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface ApiKeyAuthDetails {
|
|
|
23
23
|
source: Exclude<ApiKeyAuthSource, 'connect_session'>;
|
|
24
24
|
scopes?: string[];
|
|
25
25
|
apiKeyId?: number;
|
|
26
|
+
/** Public identifier of a customer key; absent for the other auth sources, which have no key row. */
|
|
27
|
+
apiKeyUuid?: string;
|
|
26
28
|
apiKeyDisplayName?: string;
|
|
27
29
|
purpose?: 'dryrun' | 'deploy';
|
|
28
30
|
dryrunId?: string;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ApiEndpoint, ApiError } from '../api.js';
|
|
2
|
-
import type { AuditAction, AuditActor, AuditContext, AuditOutcome, AuditPolicy, AuditResource, AuditTarget, AuditTrailVersion, AuditVia } from './event.js';
|
|
2
|
+
import type { AuditAction, AuditActor, AuditContext, AuditOutcome, AuditPolicy, AuditResource, AuditScope, AuditTarget, AuditTrailVersion, AuditVia } from './event.js';
|
|
3
3
|
export interface ApiAuditTrailEvent {
|
|
4
4
|
id: string;
|
|
5
5
|
version: AuditTrailVersion;
|
|
6
6
|
occurredAt: string;
|
|
7
7
|
accountId: number;
|
|
8
|
+
scope: AuditScope;
|
|
8
9
|
environment: {
|
|
9
|
-
id:
|
|
10
|
+
id: string;
|
|
10
11
|
display: string;
|
|
11
12
|
} | null;
|
|
12
13
|
actor: AuditActor;
|
|
@@ -1,29 +1,101 @@
|
|
|
1
|
+
import type { ApiKeyUpdatedMetadata, AppAuthLoginMetadata, AuditTrailFiltersMetadata, AuditTrailQueriedMetadata, BillingPaymentMethodRemovedMetadata, BillingPlanChangedMetadata, BillingSpendAlertChangedMetadata, ConnectionMetadata, ConnectionUpdatedMetadata, EnvironmentCreatedMetadata, EnvironmentUpdatedMetadata, EnvironmentVariablesChangedMetadata, EnvironmentWebhookMetadata, FunctionDeletedMetadata, FunctionDeployedMetadata, FunctionUpgradedMetadata, IntegrationProviderMetadata, IntegrationUpdatedMetadata, MemberInvitedMetadata, MemberRoleChangedMetadata, MfaVerifiedMetadata, SyncBaseMetadata, SyncFrequencyChangedMetadata, SyncTriggeredMetadata, SyncVariantMetadata, TeamUpdatedMetadata, UserUpdatedMetadata } from './metadata.js';
|
|
1
2
|
export type AuditTrailVersion = '2026-07-16';
|
|
2
|
-
export type AuditActorType = 'user' | 'api_key' | 'connect_session' | 'anonymous' | 'unknown';
|
|
3
|
+
export type AuditActorType = 'user' | 'api_key' | 'public_key' | 'connect_session' | 'anonymous' | 'unknown';
|
|
3
4
|
export type AuditOutcome = 'success' | 'failure' | 'denied';
|
|
4
5
|
export type AuditViaType = 'impersonation';
|
|
5
6
|
export type AuditInterface = 'api' | 'mcp';
|
|
6
7
|
interface AuditEventTable {
|
|
7
|
-
connection:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
connection: {
|
|
9
|
+
created: ConnectionMetadata;
|
|
10
|
+
updated: ConnectionUpdatedMetadata;
|
|
11
|
+
metadata_updated: ConnectionMetadata;
|
|
12
|
+
refreshed: ConnectionMetadata;
|
|
13
|
+
deleted: ConnectionMetadata;
|
|
14
|
+
};
|
|
15
|
+
sync: {
|
|
16
|
+
enabled: SyncBaseMetadata;
|
|
17
|
+
disabled: SyncBaseMetadata;
|
|
18
|
+
paused: SyncBaseMetadata;
|
|
19
|
+
started: SyncBaseMetadata;
|
|
20
|
+
triggered: SyncTriggeredMetadata;
|
|
21
|
+
cancelled: SyncBaseMetadata;
|
|
22
|
+
frequency_changed: SyncFrequencyChangedMetadata;
|
|
23
|
+
variant_created: SyncVariantMetadata;
|
|
24
|
+
variant_deleted: SyncVariantMetadata;
|
|
25
|
+
};
|
|
26
|
+
function: {
|
|
27
|
+
deployed: FunctionDeployedMetadata;
|
|
28
|
+
upgraded: FunctionUpgradedMetadata;
|
|
29
|
+
deleted: FunctionDeletedMetadata;
|
|
30
|
+
};
|
|
31
|
+
integration: {
|
|
32
|
+
created: IntegrationProviderMetadata;
|
|
33
|
+
updated: IntegrationProviderMetadata & IntegrationUpdatedMetadata;
|
|
34
|
+
deleted: IntegrationProviderMetadata;
|
|
35
|
+
};
|
|
36
|
+
api_key: {
|
|
37
|
+
created: ApiKeyUpdatedMetadata;
|
|
38
|
+
updated: ApiKeyUpdatedMetadata;
|
|
39
|
+
deleted: never;
|
|
40
|
+
};
|
|
41
|
+
member: {
|
|
42
|
+
invited: MemberInvitedMetadata;
|
|
43
|
+
invite_accepted: never;
|
|
44
|
+
invite_declined: never;
|
|
45
|
+
invite_revoked: never;
|
|
46
|
+
role_changed: MemberRoleChangedMetadata;
|
|
47
|
+
removed: never;
|
|
48
|
+
};
|
|
49
|
+
team: {
|
|
50
|
+
updated: TeamUpdatedMetadata;
|
|
51
|
+
};
|
|
52
|
+
user: {
|
|
53
|
+
updated: UserUpdatedMetadata;
|
|
54
|
+
};
|
|
55
|
+
environment: {
|
|
56
|
+
created: EnvironmentCreatedMetadata;
|
|
57
|
+
updated: EnvironmentUpdatedMetadata;
|
|
58
|
+
variables_changed: EnvironmentVariablesChangedMetadata;
|
|
59
|
+
webhook_urls_changed: EnvironmentWebhookMetadata;
|
|
60
|
+
webhook_signing_key_rotated: never;
|
|
61
|
+
deleted: never;
|
|
62
|
+
};
|
|
63
|
+
app_auth: {
|
|
64
|
+
login: AppAuthLoginMetadata;
|
|
65
|
+
logout: never;
|
|
66
|
+
signup: never;
|
|
67
|
+
password_changed: never;
|
|
68
|
+
password_reset: never;
|
|
69
|
+
};
|
|
70
|
+
mfa: {
|
|
71
|
+
enrolled: never;
|
|
72
|
+
enabled: never;
|
|
73
|
+
disabled: never;
|
|
74
|
+
verified: MfaVerifiedMetadata;
|
|
75
|
+
recovery_regenerated: never;
|
|
76
|
+
};
|
|
77
|
+
billing: {
|
|
78
|
+
plan_changed: BillingPlanChangedMetadata;
|
|
79
|
+
trial_extended: never;
|
|
80
|
+
details_changed: never;
|
|
81
|
+
payment_method_added: never;
|
|
82
|
+
payment_method_removed: BillingPaymentMethodRemovedMetadata;
|
|
83
|
+
spend_alert_changed: BillingSpendAlertChangedMetadata;
|
|
84
|
+
spend_alert_removed: never;
|
|
85
|
+
};
|
|
86
|
+
audit_trail: {
|
|
87
|
+
exported: AuditTrailFiltersMetadata;
|
|
88
|
+
queried: AuditTrailQueriedMetadata;
|
|
89
|
+
};
|
|
20
90
|
}
|
|
21
91
|
export type AuditResource = keyof AuditEventTable;
|
|
22
|
-
export type AuditActionOf<R extends AuditResource> = AuditEventTable[R];
|
|
92
|
+
export type AuditActionOf<R extends AuditResource> = R extends AuditResource ? keyof AuditEventTable[R] & string : never;
|
|
23
93
|
export type AuditAction = AuditActionOf<AuditResource>;
|
|
24
94
|
export type AuditEventKey = {
|
|
25
|
-
[R in AuditResource]: `${R}.${
|
|
95
|
+
[R in AuditResource]: `${R}.${AuditActionOf<R>}`;
|
|
26
96
|
}[AuditResource];
|
|
97
|
+
/** The metadata an action may carry. `never` for the actions that carry none. */
|
|
98
|
+
export type AuditMetadataFor<R extends AuditResource, A> = A extends keyof AuditEventTable[R] ? AuditEventTable[R][A] : never;
|
|
27
99
|
export type AuditScope = 'account' | 'environment';
|
|
28
100
|
export type AuditTargetType = 'connection' | 'sync' | 'function' | 'integration' | 'api_key' | 'member' | 'team' | 'user' | 'environment';
|
|
29
101
|
export interface AuditActor {
|
|
@@ -70,4 +142,35 @@ export type EndpointAudit = AuditPolicy | NoAudit<string>;
|
|
|
70
142
|
export type SerializedAuditEvent = {
|
|
71
143
|
event: string;
|
|
72
144
|
};
|
|
145
|
+
export type AuditResourceAction = {
|
|
146
|
+
[R in AuditResource]: {
|
|
147
|
+
[A in AuditActionOf<R>]: [AuditMetadataFor<R, A>] extends [never] ? {
|
|
148
|
+
resource: R;
|
|
149
|
+
action: A;
|
|
150
|
+
} : {
|
|
151
|
+
resource: R;
|
|
152
|
+
action: A;
|
|
153
|
+
metadata?: AuditMetadataFor<R, A>;
|
|
154
|
+
};
|
|
155
|
+
}[AuditActionOf<R>];
|
|
156
|
+
}[AuditResource];
|
|
157
|
+
interface AuditEventCommon {
|
|
158
|
+
occurredAt: string;
|
|
159
|
+
accountId: number;
|
|
160
|
+
scope: AuditScope;
|
|
161
|
+
environment: {
|
|
162
|
+
id: string;
|
|
163
|
+
display: string;
|
|
164
|
+
} | null;
|
|
165
|
+
actor: AuditActor;
|
|
166
|
+
via?: AuditVia[];
|
|
167
|
+
targets: AuditTarget[];
|
|
168
|
+
context: AuditContext;
|
|
169
|
+
outcome: AuditOutcome;
|
|
170
|
+
}
|
|
171
|
+
export type AuditEvent = AuditEventCommon & AuditResourceAction;
|
|
172
|
+
export type StoredAuditEvent = AuditEvent & {
|
|
173
|
+
id: string;
|
|
174
|
+
version: AuditTrailVersion;
|
|
175
|
+
};
|
|
73
176
|
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { FunctionSource } from '../syncConfigs/db.js';
|
|
2
|
+
export interface ConnectionMetadata {
|
|
3
|
+
providerConfigKey?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ConnectionUpdatedMetadata {
|
|
6
|
+
providerConfigKey?: string;
|
|
7
|
+
changedFields?: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface IntegrationProviderMetadata {
|
|
10
|
+
provider?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IntegrationUpdatedMetadata {
|
|
13
|
+
changedFields?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface EnvironmentCreatedMetadata {
|
|
16
|
+
name?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AuditTrailFiltersMetadata {
|
|
19
|
+
from?: string;
|
|
20
|
+
to?: string;
|
|
21
|
+
resources?: string[];
|
|
22
|
+
actions?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface AuditTrailQueriedMetadata extends AuditTrailFiltersMetadata {
|
|
25
|
+
continued?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface MemberInvitedMetadata {
|
|
28
|
+
role?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface FunctionDeployedMetadata {
|
|
31
|
+
source?: FunctionSource;
|
|
32
|
+
type?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface FunctionUpgradedMetadata {
|
|
35
|
+
upgradeVersion?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface FunctionDeletedMetadata {
|
|
38
|
+
type?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ApiKeyUpdatedMetadata {
|
|
41
|
+
displayName?: string;
|
|
42
|
+
scopes?: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface SyncBaseMetadata {
|
|
45
|
+
providerConfigKey?: string;
|
|
46
|
+
connectionId?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface SyncFrequencyChangedMetadata extends SyncBaseMetadata {
|
|
49
|
+
frequency?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface SyncVariantMetadata extends SyncBaseMetadata {
|
|
52
|
+
variant?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface SyncTriggeredMetadata extends SyncBaseMetadata {
|
|
55
|
+
reset?: boolean;
|
|
56
|
+
emptyCache?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface MemberRoleChangedMetadata {
|
|
59
|
+
fromRole?: string;
|
|
60
|
+
toRole?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface TeamUpdatedMetadata {
|
|
63
|
+
name?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface UserUpdatedMetadata {
|
|
66
|
+
name?: string;
|
|
67
|
+
gettingStartedClosed?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface EnvironmentUpdatedMetadata {
|
|
70
|
+
name?: string;
|
|
71
|
+
changedFields?: string[];
|
|
72
|
+
}
|
|
73
|
+
export interface EnvironmentVariablesChangedMetadata {
|
|
74
|
+
variableCount?: number;
|
|
75
|
+
variableNames?: string[];
|
|
76
|
+
}
|
|
77
|
+
export interface EnvironmentWebhookMetadata {
|
|
78
|
+
changedFields?: string[];
|
|
79
|
+
primaryUrl?: string;
|
|
80
|
+
secondaryUrl?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface BillingPlanChangedMetadata {
|
|
83
|
+
fromPlan?: string;
|
|
84
|
+
toPlan?: string;
|
|
85
|
+
}
|
|
86
|
+
export type AppAuthLoginMethod = 'local' | 'sso' | 'managed';
|
|
87
|
+
export interface AppAuthLoginMetadata {
|
|
88
|
+
mfaRequired?: boolean;
|
|
89
|
+
method?: AppAuthLoginMethod;
|
|
90
|
+
}
|
|
91
|
+
export interface BillingPaymentMethodRemovedMetadata {
|
|
92
|
+
paymentMethodId?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface MfaVerifiedMetadata {
|
|
95
|
+
method?: 'totp' | 'recovery_code';
|
|
96
|
+
}
|
|
97
|
+
export interface BillingSpendAlertChangedMetadata {
|
|
98
|
+
thresholdInCents?: number;
|
|
99
|
+
}
|
package/dist/auth/api.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface AuthModes {
|
|
|
20
20
|
AwsSigV4: 'AWS_SIGV4';
|
|
21
21
|
}
|
|
22
22
|
export type AuthModeType = AuthModes[keyof AuthModes];
|
|
23
|
-
export type AuthOperationType = 'creation' | 'override' | 'refresh' | 'unknown';
|
|
23
|
+
export type AuthOperationType = 'creation' | 'override' | 'refresh' | 'deletion' | 'unknown';
|
|
24
24
|
export interface OAuthAuthorizationMethod {
|
|
25
25
|
BODY: 'body';
|
|
26
26
|
HEADER: 'header';
|
package/dist/billing/types.d.ts
CHANGED
|
@@ -32,16 +32,16 @@ export interface BillingClient {
|
|
|
32
32
|
applyPendingChanges: (opts: {
|
|
33
33
|
pendingChangeId: string;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Payment collected up front.
|
|
36
|
+
*
|
|
37
|
+
* Omitted for a plan billed fully in arrears, where nothing is collected when the change is applied.
|
|
36
38
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
amountCollected: string;
|
|
39
|
+
payment?: {
|
|
40
|
+
/** The external payment ID; for Stripe, it's the PaymentIntent ID. */
|
|
41
|
+
externalId: string;
|
|
42
|
+
/** Amount collected in dollars. */
|
|
43
|
+
amountCollected: string;
|
|
44
|
+
} | undefined;
|
|
45
45
|
}) => Promise<Result<BillingSubscription>>;
|
|
46
46
|
cancelPendingChanges: (opts: {
|
|
47
47
|
pendingChangeId: string;
|
|
@@ -126,7 +126,7 @@ export interface BreakdownDimensions {
|
|
|
126
126
|
webhook_forwards: 'environment_id' | 'integration_id' | 'connection_id' | 'success';
|
|
127
127
|
records: 'environment_id' | 'integration_id' | 'connection_id' | 'model';
|
|
128
128
|
connections: 'environment_id' | 'integration_id';
|
|
129
|
-
data_transfer: 'environment_id' | 'integration_id' | 'connection_id' | '
|
|
129
|
+
data_transfer: 'environment_id' | 'integration_id' | 'connection_id' | 'source';
|
|
130
130
|
}
|
|
131
131
|
export type DimensionFor<M extends UsageMetric> = 'none' | BreakdownDimensions[M];
|
|
132
132
|
export interface GetBillingUsageOpts {
|
|
@@ -28,7 +28,7 @@ export type PostEnvironment = ApiEndpoint<{
|
|
|
28
28
|
name: string;
|
|
29
29
|
};
|
|
30
30
|
Success: {
|
|
31
|
-
data: Pick<DBEnvironment, 'id' | 'name'>;
|
|
31
|
+
data: Pick<DBEnvironment, 'id' | 'uuid' | 'name'>;
|
|
32
32
|
};
|
|
33
33
|
Error: ApiError<'conflict' | 'resource_capped' | 'invalid_is_prod_flag'>;
|
|
34
34
|
}>;
|
|
@@ -50,16 +50,16 @@ export type PostPublicEnvironment = ApiEndpoint<{
|
|
|
50
50
|
}[] | undefined;
|
|
51
51
|
};
|
|
52
52
|
Success: {
|
|
53
|
-
data: Pick<DBEnvironment, 'id' | 'name'>;
|
|
53
|
+
data: Pick<DBEnvironment, 'id' | 'uuid' | 'name'>;
|
|
54
54
|
};
|
|
55
55
|
Error: ApiError<'conflict' | 'resource_capped' | 'invalid_is_prod_flag'>;
|
|
56
56
|
}>;
|
|
57
57
|
export type DeletePublicEnvironment = ApiEndpoint<{
|
|
58
58
|
Audit: AuditPolicy<'environment', 'deleted', 'account'>;
|
|
59
59
|
Method: 'DELETE';
|
|
60
|
-
Path: '/environments/:
|
|
60
|
+
Path: '/environments/:environmentUuid';
|
|
61
61
|
Params: {
|
|
62
|
-
|
|
62
|
+
environmentUuid: string;
|
|
63
63
|
};
|
|
64
64
|
Success: never;
|
|
65
65
|
Error: ApiError<'cannot_delete_prod_environment'>;
|
|
@@ -159,6 +159,7 @@ export type ListApiKeys = ApiEndpoint<{
|
|
|
159
159
|
Success: {
|
|
160
160
|
data: {
|
|
161
161
|
id: number;
|
|
162
|
+
uuid: string;
|
|
162
163
|
display_name: string;
|
|
163
164
|
scopes: ApiKeyScope[];
|
|
164
165
|
secret: string;
|
|
@@ -178,6 +179,7 @@ export type CreateApiKey = ApiEndpoint<{
|
|
|
178
179
|
Success: {
|
|
179
180
|
data: {
|
|
180
181
|
id: number;
|
|
182
|
+
uuid: string;
|
|
181
183
|
display_name: string;
|
|
182
184
|
scopes: ApiKeyScope[];
|
|
183
185
|
secret: string;
|
|
@@ -189,14 +191,17 @@ export type CreateApiKey = ApiEndpoint<{
|
|
|
189
191
|
export type PostPublicApiKey = ApiEndpoint<{
|
|
190
192
|
Audit: AuditPolicy<'api_key', 'created', 'environment'>;
|
|
191
193
|
Method: 'POST';
|
|
192
|
-
Path: '/
|
|
194
|
+
Path: '/environments/:environmentUuid/api-keys';
|
|
195
|
+
Params: {
|
|
196
|
+
environmentUuid: string;
|
|
197
|
+
};
|
|
193
198
|
Body: {
|
|
194
|
-
environment_id: number;
|
|
195
199
|
display_name: string;
|
|
196
200
|
};
|
|
197
201
|
Success: {
|
|
198
202
|
data: {
|
|
199
203
|
id: number;
|
|
204
|
+
uuid: string;
|
|
200
205
|
display_name: string;
|
|
201
206
|
scopes: ApiKeyScope[];
|
|
202
207
|
secret: string;
|
|
@@ -208,10 +213,10 @@ export type PostPublicApiKey = ApiEndpoint<{
|
|
|
208
213
|
export type DeletePublicApiKey = ApiEndpoint<{
|
|
209
214
|
Audit: AuditPolicy<'api_key', 'deleted', 'environment'>;
|
|
210
215
|
Method: 'DELETE';
|
|
211
|
-
Path: '/
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
216
|
+
Path: '/environments/:environmentUuid/api-keys/:keyUuid';
|
|
217
|
+
Params: {
|
|
218
|
+
environmentUuid: string;
|
|
219
|
+
keyUuid: string;
|
|
215
220
|
};
|
|
216
221
|
Success: {
|
|
217
222
|
success: true;
|
|
@@ -15,6 +15,7 @@ export type PatchWebhook = ApiEndpoint<{
|
|
|
15
15
|
on_auth_refresh_error?: boolean | undefined;
|
|
16
16
|
on_sync_error?: boolean | undefined;
|
|
17
17
|
on_async_action_completion?: boolean | undefined;
|
|
18
|
+
on_connection_deletion?: boolean | undefined;
|
|
18
19
|
};
|
|
19
20
|
Success: {
|
|
20
21
|
success: boolean;
|
package/dist/environment/db.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export interface DBExternalWebhook extends Timestamps {
|
|
|
63
63
|
on_auth_refresh_error: boolean;
|
|
64
64
|
on_sync_error: boolean;
|
|
65
65
|
on_async_action_completion: boolean;
|
|
66
|
+
on_connection_deletion: boolean;
|
|
66
67
|
}
|
|
67
68
|
export interface DBAPISecret extends Timestamps {
|
|
68
69
|
id: number;
|
|
@@ -77,6 +78,7 @@ export interface DBAPISecret extends Timestamps {
|
|
|
77
78
|
export type CustomerKeyType = 'api' | 'webhook_signing';
|
|
78
79
|
export interface DBCustomerKey extends Timestamps {
|
|
79
80
|
id: number;
|
|
81
|
+
uuid: string;
|
|
80
82
|
account_id: number;
|
|
81
83
|
key_type: CustomerKeyType;
|
|
82
84
|
display_name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type * from './api.js';
|
|
|
3
3
|
export type * from './api.endpoints.js';
|
|
4
4
|
export type * from './audit-trail/api.js';
|
|
5
5
|
export type * from './audit-trail/event.js';
|
|
6
|
+
export type * from './audit-trail/metadata.js';
|
|
6
7
|
export type * from './gettingStarted/db.js';
|
|
7
8
|
export type * from './gettingStarted/dto.js';
|
|
8
9
|
export type * from './gettingStarted/api.js';
|
|
@@ -15,6 +16,7 @@ export type * from './agent/api.js';
|
|
|
15
16
|
export type * from './agent/connections.js';
|
|
16
17
|
export type * from './agent/mcp.api.js';
|
|
17
18
|
export type * from './agent/session.js';
|
|
19
|
+
export type * from './agent/toolSearch.js';
|
|
18
20
|
export type * from './agent/toolset.js';
|
|
19
21
|
export type * from './admin/http.api.js';
|
|
20
22
|
export type * from './account/api.js';
|
package/dist/logs/messages.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface OperationAdmin {
|
|
|
50
50
|
}
|
|
51
51
|
export interface OperationWebhook {
|
|
52
52
|
type: 'webhook';
|
|
53
|
-
action: 'incoming' | 'forward' | 'sync' | 'connection_create' | 'connection_refresh';
|
|
53
|
+
action: 'incoming' | 'forward' | 'sync' | 'connection_create' | 'connection_refresh' | 'connection_delete';
|
|
54
54
|
}
|
|
55
55
|
export interface OperationDeploy {
|
|
56
56
|
type: 'deploy';
|
package/dist/meta/api.d.ts
CHANGED
package/dist/plans/db.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ type FunctionRuntime = 'runner' | 'lambda';
|
|
|
3
3
|
export interface DBPlan extends Timestamps {
|
|
4
4
|
id: number;
|
|
5
5
|
account_id: number;
|
|
6
|
-
name: 'free' | 'free-uncapped' | 'startup-deal' | 'starter-v2' | 'growth-v2' | 'enterprise' | 'enterprise-cloud-hosted' | 'starter' | 'growth' | 'starter-legacy' | 'scale-legacy' | 'growth-legacy';
|
|
6
|
+
name: 'free' | 'free-uncapped' | 'startup-deal' | 'pay-as-you-go' | 'starter-v2' | 'growth-v2' | 'enterprise' | 'enterprise-cloud-hosted' | 'starter' | 'growth' | 'starter-legacy' | 'scale-legacy' | 'growth-legacy';
|
|
7
7
|
stripe_customer_id: string | null;
|
|
8
8
|
stripe_payment_id: string | null;
|
|
9
9
|
orb_customer_id: string | null;
|
|
@@ -220,6 +220,7 @@ export interface ProviderTwoStep extends Omit<BaseProvider, 'body_format'> {
|
|
|
220
220
|
recipient?: string;
|
|
221
221
|
header?: Record<string, string>;
|
|
222
222
|
payload?: Record<string, string>;
|
|
223
|
+
singleUse?: boolean;
|
|
223
224
|
};
|
|
224
225
|
assertion_option?: Record<string, SimplifiedJSONSchema>;
|
|
225
226
|
token_expires_in_ms?: number;
|
package/dist/webhooks/api.d.ts
CHANGED
|
@@ -39,7 +39,8 @@ export type NangoSyncWebhookBody = NangoSyncWebhookBodySuccess | NangoSyncWebhoo
|
|
|
39
39
|
export interface NangoAuthWebhookBodyBase extends NangoWebhookBase {
|
|
40
40
|
type: 'auth';
|
|
41
41
|
connectionId: string;
|
|
42
|
-
|
|
42
|
+
/** 'unknown' when the connection's integration could no longer be resolved (e.g. it was deleted). */
|
|
43
|
+
authMode: AuthModeType | 'unknown';
|
|
43
44
|
providerConfigKey: string;
|
|
44
45
|
provider: string;
|
|
45
46
|
environment: string;
|