@databutton/firebase-types 1.154.0 → 1.155.1
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 +5 -0
- package/lib/types/published/enums.js +6 -0
- package/lib/types/published/helpers.d.ts +6 -0
- package/lib/types/published/helpers.js +1 -0
- package/lib/types/published/persisted.d.ts +8 -1
- package/lib/types/published/persisted.js +0 -2
- package/package.json +1 -1
|
@@ -315,3 +315,8 @@ export declare enum NotificationType {
|
|
|
315
315
|
AGENT_TASK_REQUIRE_INPUT = "agent-task-require-input",
|
|
316
316
|
AGENT_SUGGEST_NEXT_STEPS = "agent-suggest-next-steps"
|
|
317
317
|
}
|
|
318
|
+
export declare enum ModelProvider {
|
|
319
|
+
OPENAI = "openai",
|
|
320
|
+
ANTHROPIC = "anthropic",
|
|
321
|
+
GOOGLE = "google"
|
|
322
|
+
}
|
|
@@ -347,4 +347,10 @@ export var NotificationType;
|
|
|
347
347
|
NotificationType["AGENT_TASK_REQUIRE_INPUT"] = "agent-task-require-input";
|
|
348
348
|
NotificationType["AGENT_SUGGEST_NEXT_STEPS"] = "agent-suggest-next-steps";
|
|
349
349
|
})(NotificationType || (NotificationType = {}));
|
|
350
|
+
export var ModelProvider;
|
|
351
|
+
(function (ModelProvider) {
|
|
352
|
+
ModelProvider["OPENAI"] = "openai";
|
|
353
|
+
ModelProvider["ANTHROPIC"] = "anthropic";
|
|
354
|
+
ModelProvider["GOOGLE"] = "google";
|
|
355
|
+
})(ModelProvider || (ModelProvider = {}));
|
|
350
356
|
//# sourceMappingURL=enums.js.map
|
|
@@ -5,6 +5,7 @@ export type ComponentType = "frontend" | "backend" | "module" | "ui-file" | "ui-
|
|
|
5
5
|
export declare namespace AuditLogEntry {
|
|
6
6
|
enum Event {
|
|
7
7
|
ACCOUNT_CREATED = "account-created",
|
|
8
|
+
ACCOUNT_DELETED = "account-deleted",
|
|
8
9
|
MEMBER_ADDED = "member-added",
|
|
9
10
|
MEMBER_REMOVED = "member-removed",
|
|
10
11
|
MEMBER_ROLES_UPDATED = "member-roles-updated",
|
|
@@ -24,6 +25,9 @@ export declare namespace AuditLogEntry {
|
|
|
24
25
|
owner: string;
|
|
25
26
|
ownerEmail: string;
|
|
26
27
|
}>;
|
|
28
|
+
type AccountDeleted = AuditLog<{
|
|
29
|
+
owner: string;
|
|
30
|
+
}>;
|
|
27
31
|
type MemberRemoved = AuditLog<{
|
|
28
32
|
memberId: string;
|
|
29
33
|
memberEmail: string;
|
|
@@ -48,6 +52,8 @@ export declare namespace AuditLogEntry {
|
|
|
48
52
|
type SecretSetCurrentVersion = AuditLog<SecretVersionMetadata>;
|
|
49
53
|
type AuditLogEvent = (AccountCreated & {
|
|
50
54
|
event: Event.ACCOUNT_CREATED;
|
|
55
|
+
}) | (AccountDeleted & {
|
|
56
|
+
event: Event.ACCOUNT_DELETED;
|
|
51
57
|
}) | (MemberAdded & {
|
|
52
58
|
event: Event.MEMBER_ADDED;
|
|
53
59
|
}) | (MemberRemoved & {
|
|
@@ -3,6 +3,7 @@ export var AuditLogEntry;
|
|
|
3
3
|
let Event;
|
|
4
4
|
(function (Event) {
|
|
5
5
|
Event["ACCOUNT_CREATED"] = "account-created";
|
|
6
|
+
Event["ACCOUNT_DELETED"] = "account-deleted";
|
|
6
7
|
Event["MEMBER_ADDED"] = "member-added";
|
|
7
8
|
Event["MEMBER_REMOVED"] = "member-removed";
|
|
8
9
|
Event["MEMBER_ROLES_UPDATED"] = "member-roles-updated";
|
|
@@ -1,8 +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 type { AccountBusinessModel, AccountEmployeeCount, AccountIndustry, AccountRole, ConfigTypes, ImprovementPriority, ImprovementStatus, ModelProvider, TaskPriority, TaskRelation, ThirdPartyAuthName, ThirdPartyDatabaseName, ThirdPartyPaymentsName, ThirdPartyServiceCategory, ThirdPartyStorageName, UiComponentTag } from "./enums.js";
|
|
4
5
|
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";
|
|
6
6
|
/**
|
|
7
7
|
* Types here should reflect data format stored in firestore and
|
|
8
8
|
* either be backwards-compatible or migrated when needed
|
|
@@ -185,6 +185,13 @@ export interface Account {
|
|
|
185
185
|
* Default project extensions applied to all projects in account.
|
|
186
186
|
*/
|
|
187
187
|
requiredExtensions?: ProjectExtensionMap;
|
|
188
|
+
/**
|
|
189
|
+
* Optional policies for the account. Based on contractual agreements with the customer.
|
|
190
|
+
* First case of this is Mesta that don't allow OpenAI models
|
|
191
|
+
*/
|
|
192
|
+
policies?: {
|
|
193
|
+
disabledModelsProviders?: ModelProvider[];
|
|
194
|
+
};
|
|
188
195
|
}
|
|
189
196
|
interface AccountConfigBase {
|
|
190
197
|
enabledBy: PerformedBy;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// NotificationType is imported as a value (not `import type`) because the
|
|
2
|
-
// notification type guards below compare against its members at runtime.
|
|
3
1
|
import { NotificationType } from "./enums.js";
|
|
4
2
|
export function isApprovalNotification(notification) {
|
|
5
3
|
return notification.type === NotificationType.AGENT_TASK_REQUIRE_INPUT;
|