@databutton/firebase-types 1.150.0 → 1.152.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/lib/types/published/enums.d.ts +2 -1
- package/lib/types/published/enums.js +1 -0
- package/lib/types/published/persisted.d.ts +40 -2
- package/lib/types/published/persisted.js +9 -0
- package/lib/types/published/requests.d.ts +17 -8
- package/lib/types/published/requests.js +4 -0
- package/package.json +1 -1
|
@@ -307,5 +307,6 @@ export declare enum AccountEmployeeCount {
|
|
|
307
307
|
COUNT_5000_PLUS = "5000+"
|
|
308
308
|
}
|
|
309
309
|
export declare enum NotificationType {
|
|
310
|
-
AGENT_TASK_REQUIRE_INPUT = "agent-task-require-input"
|
|
310
|
+
AGENT_TASK_REQUIRE_INPUT = "agent-task-require-input",
|
|
311
|
+
AGENT_SUGGEST_NEXT_STEPS = "agent-suggest-next-steps"
|
|
311
312
|
}
|
|
@@ -339,5 +339,6 @@ export var AccountEmployeeCount;
|
|
|
339
339
|
export var NotificationType;
|
|
340
340
|
(function (NotificationType) {
|
|
341
341
|
NotificationType["AGENT_TASK_REQUIRE_INPUT"] = "agent-task-require-input";
|
|
342
|
+
NotificationType["AGENT_SUGGEST_NEXT_STEPS"] = "agent-suggest-next-steps";
|
|
342
343
|
})(NotificationType || (NotificationType = {}));
|
|
343
344
|
//# sourceMappingURL=enums.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Timestamp } from "firebase/firestore";
|
|
2
2
|
import type { JsonObject, Primitive } from "type-fest";
|
|
3
3
|
import type { ProjectMigration } from "../internal/enums.js";
|
|
4
|
-
import
|
|
4
|
+
import { NotificationType } from "./enums.js";
|
|
5
|
+
import type { AccountBusinessModel, AccountEmployeeCount, AccountIndustry, AccountRole, ConfigTypes, ImprovementPriority, ImprovementStatus, TaskPriority, TaskRelation, ThirdPartyAuthName, ThirdPartyDatabaseName, ThirdPartyPaymentsName, ThirdPartyServiceCategory, ThirdPartyStorageName, UiComponentTag } from "./enums.js";
|
|
5
6
|
/**
|
|
6
7
|
* Types here should reflect data format stored in firestore and
|
|
7
8
|
* either be backwards-compatible or migrated when needed
|
|
@@ -47,12 +48,15 @@ export interface SubscribedNotificationGroup {
|
|
|
47
48
|
groupId: string;
|
|
48
49
|
mode: NotificationGroupMode;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
interface NotificationBase {
|
|
51
52
|
createdBy: PerformedBy;
|
|
52
53
|
createdAt: Timestamp;
|
|
53
54
|
userId: string | null;
|
|
54
55
|
groupId: string | null;
|
|
55
56
|
read: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** A tool call is awaiting human approval. */
|
|
59
|
+
export interface NotificationForApproval extends NotificationBase {
|
|
56
60
|
type: NotificationType.AGENT_TASK_REQUIRE_INPUT;
|
|
57
61
|
metadata: {
|
|
58
62
|
projectId: string;
|
|
@@ -68,6 +72,27 @@ export interface Notification {
|
|
|
68
72
|
environment?: "dev" | "prod" | null;
|
|
69
73
|
};
|
|
70
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* The agent reached a natural stop point and is asking the human for input
|
|
77
|
+
* (via the suggest_next_steps tool). The suggested options live on the tool
|
|
78
|
+
* call in the session, not on the notification.
|
|
79
|
+
*/
|
|
80
|
+
export interface NotificationForSuggestNextSteps extends NotificationBase {
|
|
81
|
+
type: NotificationType.AGENT_SUGGEST_NEXT_STEPS;
|
|
82
|
+
metadata: {
|
|
83
|
+
projectId: string;
|
|
84
|
+
title: string;
|
|
85
|
+
description: string;
|
|
86
|
+
sessionId: string;
|
|
87
|
+
taskId?: string | null;
|
|
88
|
+
displayId?: string | null;
|
|
89
|
+
taskTitle?: string | null;
|
|
90
|
+
environment?: "dev" | "prod" | null;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export type Notification = NotificationForApproval | NotificationForSuggestNextSteps;
|
|
94
|
+
export declare function isApprovalNotification(notification: Notification): notification is NotificationForApproval;
|
|
95
|
+
export declare function isSuggestNextStepsNotification(notification: Notification): notification is NotificationForSuggestNextSteps;
|
|
71
96
|
export interface PublicUsername {
|
|
72
97
|
username: string;
|
|
73
98
|
slug: string;
|
|
@@ -195,6 +220,13 @@ export interface SSOConfig extends AccountConfigBase {
|
|
|
195
220
|
* }
|
|
196
221
|
*/
|
|
197
222
|
riffToWorkosRoleMapping?: Record<string, string[]>;
|
|
223
|
+
/**
|
|
224
|
+
* Account-wide default for gating the deployed app bundle at the edge.
|
|
225
|
+
* When true, CloudFront will not serve the JS bundle until the visitor has
|
|
226
|
+
* logged in — an extra layer on top of the runtime WorkOS auth.
|
|
227
|
+
* Absent = false. Can be overridden per project via ProjectSSOConfig.
|
|
228
|
+
*/
|
|
229
|
+
gateBundle?: boolean;
|
|
198
230
|
}
|
|
199
231
|
export interface PostHogConfig extends AccountConfigBase {
|
|
200
232
|
type: ConfigTypes.POSTHOG;
|
|
@@ -241,6 +273,11 @@ export interface ProjectSSOConfig extends ProjectConfigBase {
|
|
|
241
273
|
* If not set, falls back to the account-level mapping.
|
|
242
274
|
*/
|
|
243
275
|
riffToWorkosRoleMapping?: Record<string, string[]>;
|
|
276
|
+
/**
|
|
277
|
+
* Project-level override for edge-gating the deployed app bundle.
|
|
278
|
+
* undefined/null = inherit the account-level SSOConfig.gateBundle.
|
|
279
|
+
*/
|
|
280
|
+
gateBundle?: boolean | null;
|
|
244
281
|
}
|
|
245
282
|
export type ProjectConfig = ProjectSSOConfig;
|
|
246
283
|
export interface SSOConfigLookupEntry {
|
|
@@ -1039,6 +1076,7 @@ export interface WorkosAuthExtensionConfig {
|
|
|
1039
1076
|
clientId: string;
|
|
1040
1077
|
orgId: string;
|
|
1041
1078
|
refreshKey?: string;
|
|
1079
|
+
gateBundle?: boolean;
|
|
1042
1080
|
}
|
|
1043
1081
|
export interface StackAuthExtensionConfig {
|
|
1044
1082
|
projectId: string;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
// NotificationType is imported as a value (not `import type`) because the
|
|
2
|
+
// notification type guards below compare against its members at runtime.
|
|
3
|
+
import { NotificationType } from "./enums.js";
|
|
4
|
+
export function isApprovalNotification(notification) {
|
|
5
|
+
return notification.type === NotificationType.AGENT_TASK_REQUIRE_INPUT;
|
|
6
|
+
}
|
|
7
|
+
export function isSuggestNextStepsNotification(notification) {
|
|
8
|
+
return notification.type === NotificationType.AGENT_SUGGEST_NEXT_STEPS;
|
|
9
|
+
}
|
|
1
10
|
export var FrontendBuildStage;
|
|
2
11
|
(function (FrontendBuildStage) {
|
|
3
12
|
FrontendBuildStage["PROTOTYPE"] = "prototype";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Timestamp } from "firebase/firestore";
|
|
2
2
|
import type { RunMigrationsResponse } from "../db-api.js";
|
|
3
|
-
import type { CreateNeonTransferErrorCode, CreateProjectErrorCode, CreateStackAuthTransferErrorCode, CreateTeamAccountErrorCode, MigrateToRiffErrorCode } from "./enums.js";
|
|
3
|
+
import type { CreateNeonTransferErrorCode, CreateProjectErrorCode, CreateStackAuthTransferErrorCode, CreateTeamAccountErrorCode, MigrateToRiffErrorCode, NotificationType } from "./enums.js";
|
|
4
4
|
import type { ApprovalLevel, Datafile, Dataframe, Job, Project, ProjectPermissionName, ProjectTemplate, ScheduleTarget, ScheduleWhen } from "./persisted.js";
|
|
5
5
|
export type DeleteJob = Pick<Job, "markedForDeletionAt" | "markedForDeletionBy">;
|
|
6
6
|
export type DeleteProject = Pick<Project, "markedForDeletionAt" | "markedForDeletionBy">;
|
|
@@ -57,7 +57,8 @@ export declare enum CustomDomainFailureCode {
|
|
|
57
57
|
DOMAIN_FROZEN = "DOMAIN_FROZEN",
|
|
58
58
|
DOMAIN_NEEDS_MIGRATION = "DOMAIN_NEEDS_MIGRATION",
|
|
59
59
|
UNSUPPORTED_TOP_LEVEL_DOMAIN = "UNSUPPORTED_TOP_LEVEL_DOMAIN",
|
|
60
|
-
INVALID_DOMAIN_FORMAT = "INVALID_DOMAIN_FORMAT"
|
|
60
|
+
INVALID_DOMAIN_FORMAT = "INVALID_DOMAIN_FORMAT",
|
|
61
|
+
BUNDLE_GATING_ENABLED = "BUNDLE_GATING_ENABLED"
|
|
61
62
|
}
|
|
62
63
|
export type CustomDomainResponse = {
|
|
63
64
|
status: "Success";
|
|
@@ -575,21 +576,29 @@ export type RegisterSlackAppResponse = {
|
|
|
575
576
|
errorCode: string;
|
|
576
577
|
errorMessage?: string;
|
|
577
578
|
};
|
|
578
|
-
|
|
579
|
+
/**
|
|
580
|
+
* Request for the single agent-notification callable. `type` selects the
|
|
581
|
+
* notification kind (defaults to AGENT_TASK_REQUIRE_INPUT / approval when
|
|
582
|
+
* omitted). Type-specific fields are optional: approval uses `toolName` /
|
|
583
|
+
* `reason` / `messageSequence` / `toolUseId`; suggest-next-steps uses `message`.
|
|
584
|
+
*/
|
|
585
|
+
export type CreateNotificationRequest = {
|
|
586
|
+
type?: NotificationType | null;
|
|
579
587
|
projectId: string;
|
|
580
588
|
accountId: string;
|
|
581
589
|
userId: string | null;
|
|
582
|
-
toolName: string;
|
|
583
590
|
sessionId: string;
|
|
584
|
-
messageSequence?: string | null;
|
|
585
|
-
toolUseId?: string | null;
|
|
586
591
|
taskId?: string | null;
|
|
587
592
|
displayId?: string | null;
|
|
588
|
-
reason?: string | null;
|
|
589
593
|
taskTitle?: string | null;
|
|
590
594
|
environment?: "dev" | "prod" | null;
|
|
595
|
+
toolName?: string | null;
|
|
596
|
+
reason?: string | null;
|
|
597
|
+
messageSequence?: string | null;
|
|
598
|
+
toolUseId?: string | null;
|
|
599
|
+
message?: string | null;
|
|
591
600
|
};
|
|
592
|
-
export type
|
|
601
|
+
export type CreateNotificationResponse = {
|
|
593
602
|
notificationId: string;
|
|
594
603
|
};
|
|
595
604
|
export {};
|
|
@@ -10,6 +10,10 @@ export var CustomDomainFailureCode;
|
|
|
10
10
|
CustomDomainFailureCode["DOMAIN_NEEDS_MIGRATION"] = "DOMAIN_NEEDS_MIGRATION";
|
|
11
11
|
CustomDomainFailureCode["UNSUPPORTED_TOP_LEVEL_DOMAIN"] = "UNSUPPORTED_TOP_LEVEL_DOMAIN";
|
|
12
12
|
CustomDomainFailureCode["INVALID_DOMAIN_FORMAT"] = "INVALID_DOMAIN_FORMAT";
|
|
13
|
+
// App has edge bundle gating (WorkOS gateBundle) enabled. Custom domains are
|
|
14
|
+
// served from a different CloudFront distribution that does not enforce the
|
|
15
|
+
// gate, so allowing one would bypass it. Rejected on the backend (DAT-13050).
|
|
16
|
+
CustomDomainFailureCode["BUNDLE_GATING_ENABLED"] = "BUNDLE_GATING_ENABLED";
|
|
13
17
|
})(CustomDomainFailureCode || (CustomDomainFailureCode = {}));
|
|
14
18
|
export var TimeRangeFilter;
|
|
15
19
|
(function (TimeRangeFilter) {
|