@databutton/firebase-types 1.129.0 → 1.130.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.
@@ -44,6 +44,7 @@ export declare enum CollectionName {
44
44
  ACCOUNT_APPROVAL_REQUESTS = "approval-requests",
45
45
  ACCOUNT_INVITES = "account-invites",
46
46
  ACCOUNT_KNOWLEDGE_SUGGESTIONS = "knowledge-suggestions",
47
+ ACCOUNT_NOTIFICATIONS = "notifications",
47
48
  ROLES = "roles",
48
49
  MESSAGES = "messages",
49
50
  MODULES = "modules",
@@ -144,6 +145,7 @@ export declare enum DatabuttonIdPrefix {
144
145
  MESSAGE = "me",
145
146
  INTEGRATION = "in",
146
147
  APPROVAL_REQUEST = "ar",
148
+ NOTIFICATION = "ntf",
147
149
  LEGACY_UNUSED_JOB_DEPLOY = "jd",
148
150
  LEGACY_UNUSED_JOB = "jb",
149
151
  LEGACY_UNUSED_JOB_RUN = "jr",
@@ -287,3 +289,6 @@ export declare enum AccountEmployeeCount {
287
289
  COUNT_1001_TO_5000 = "1001-5000",
288
290
  COUNT_5000_PLUS = "5000+"
289
291
  }
292
+ export declare enum NotificationType {
293
+ AGENT_TASK_REQUIRE_INPUT = "agent-task-require-input"
294
+ }
@@ -45,6 +45,7 @@ export var CollectionName;
45
45
  CollectionName["ACCOUNT_APPROVAL_REQUESTS"] = "approval-requests";
46
46
  CollectionName["ACCOUNT_INVITES"] = "account-invites";
47
47
  CollectionName["ACCOUNT_KNOWLEDGE_SUGGESTIONS"] = "knowledge-suggestions";
48
+ CollectionName["ACCOUNT_NOTIFICATIONS"] = "notifications";
48
49
  CollectionName["ROLES"] = "roles";
49
50
  CollectionName["MESSAGES"] = "messages";
50
51
  CollectionName["MODULES"] = "modules";
@@ -149,6 +150,7 @@ export var DatabuttonIdPrefix;
149
150
  DatabuttonIdPrefix["INTEGRATION"] = "in";
150
151
  //
151
152
  DatabuttonIdPrefix["APPROVAL_REQUEST"] = "ar";
153
+ DatabuttonIdPrefix["NOTIFICATION"] = "ntf";
152
154
  //
153
155
  DatabuttonIdPrefix["LEGACY_UNUSED_JOB_DEPLOY"] = "jd";
154
156
  DatabuttonIdPrefix["LEGACY_UNUSED_JOB"] = "jb";
@@ -315,4 +317,8 @@ export var AccountEmployeeCount;
315
317
  AccountEmployeeCount["COUNT_1001_TO_5000"] = "1001-5000";
316
318
  AccountEmployeeCount["COUNT_5000_PLUS"] = "5000+";
317
319
  })(AccountEmployeeCount || (AccountEmployeeCount = {}));
320
+ export var NotificationType;
321
+ (function (NotificationType) {
322
+ NotificationType["AGENT_TASK_REQUIRE_INPUT"] = "agent-task-require-input";
323
+ })(NotificationType || (NotificationType = {}));
318
324
  //# sourceMappingURL=enums.js.map
@@ -1,7 +1,7 @@
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, TaskPriority, TaskRelation, ThirdPartyAuthName, ThirdPartyDatabaseName, ThirdPartyPaymentsName, ThirdPartyServiceCategory, ThirdPartyStorageName, UiComponentTag } from "./enums.js";
4
+ import type { AccountBusinessModel, AccountEmployeeCount, AccountIndustry, AccountRole, ConfigTypes, NotificationType, TaskPriority, TaskRelation, ThirdPartyAuthName, ThirdPartyDatabaseName, ThirdPartyPaymentsName, ThirdPartyServiceCategory, ThirdPartyStorageName, UiComponentTag } from "./enums.js";
5
5
  /**
6
6
  * Types here should reflect data format stored in firestore and
7
7
  * either be backwards-compatible or migrated when needed
@@ -30,6 +30,20 @@ export type PerformedBy = PerformedByUser | PerformedBySystem | PerformedByAnony
30
30
  export interface ProjectEventsReadMap {
31
31
  [projectId: string]: Timestamp;
32
32
  }
33
+ export interface Notification {
34
+ createdBy: PerformedBy;
35
+ createdAt: Timestamp;
36
+ userId: string;
37
+ groupId: string | null;
38
+ read: boolean;
39
+ type: NotificationType.AGENT_TASK_REQUIRE_INPUT;
40
+ metadata: {
41
+ projectId: string;
42
+ title: string;
43
+ description: string;
44
+ taskId: string;
45
+ };
46
+ }
33
47
  export interface PublicUsername {
34
48
  username: string;
35
49
  slug: string;
@@ -100,13 +100,26 @@ export type AdminAddCreditsPayload = {
100
100
  export type AdminAddCreditsResult = {
101
101
  success: boolean;
102
102
  };
103
+ export type AdminSetAccountTypePayload = {
104
+ customerId: string;
105
+ accountType: "internal" | "enterprise" | "enterprise_trial";
106
+ };
107
+ export type AdminSetAccountTypeResult = {
108
+ success: boolean;
109
+ };
103
110
  export type AdminCallableRequest = {
104
111
  action: "addCredits";
105
112
  payload: AdminAddCreditsPayload;
113
+ } | {
114
+ action: "setAccountType";
115
+ payload: AdminSetAccountTypePayload;
106
116
  };
107
117
  export type AdminCallableResponse = {
108
118
  action: "addCredits";
109
119
  result: AdminAddCreditsResult;
120
+ } | {
121
+ action: "setAccountType";
122
+ result: AdminSetAccountTypeResult;
110
123
  };
111
124
  export type CreateBillingPortalSessionRequest = {
112
125
  returnUrl: string;
@@ -486,6 +499,7 @@ export type ReviewApprovalRequestResponse = {
486
499
  export type CreateTeamAccountRequest = {
487
500
  name: string;
488
501
  publicUsername?: string;
502
+ teamType?: "internal" | "enterprise" | "enterprise_trial";
489
503
  };
490
504
  export type CreateTeamAccountResponse = {
491
505
  success: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.129.0",
3
+ "version": "1.130.0",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {