@databutton/firebase-types 1.114.0 → 1.116.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.
@@ -101,7 +101,8 @@ export declare enum AccountRole {
101
101
  OWNER = "owner",
102
102
  ADMIN = "admin",
103
103
  COLLABORATOR = "collaborator",
104
- BILLING = "billing"
104
+ BILLING = "billing",
105
+ SUPPORT = "support"
105
106
  }
106
107
  export declare enum DatabuttonIdPrefix {
107
108
  AGENT_SKILL = "ask",
@@ -105,6 +105,7 @@ export var AccountRole;
105
105
  AccountRole["ADMIN"] = "admin";
106
106
  AccountRole["COLLABORATOR"] = "collaborator";
107
107
  AccountRole["BILLING"] = "billing";
108
+ AccountRole["SUPPORT"] = "support";
108
109
  })(AccountRole || (AccountRole = {}));
109
110
  export var DatabuttonIdPrefix;
110
111
  (function (DatabuttonIdPrefix) {
@@ -2056,11 +2056,12 @@ export interface CreditTransactionRecord {
2056
2056
  customerId: string;
2057
2057
  userId?: string | null;
2058
2058
  comment?: string | null;
2059
+ internalComment?: string | null;
2059
2060
  amountInCents: number;
2060
2061
  createdAt: Timestamp;
2061
2062
  projectId: string | null;
2062
2063
  recordedAt: Timestamp;
2063
- type: "creditsPurchased" | "computeHourUsed" | "agentUsed" | "manualAdjustment" | "monthlyReset";
2064
+ type: "creditsPurchased" | "computeHourUsed" | "agentUsed" | "manualAdjustment" | "adminAdjustment" | "monthlyReset";
2064
2065
  sourceRef: string | null;
2065
2066
  }
2066
2067
  export interface ComputeHourUsageRecord {
@@ -87,6 +87,22 @@ export type AdminCommandsForPalleteLink = {
87
87
  export type AdminCommandsForPalleteResponse = {
88
88
  links: AdminCommandsForPalleteLink[];
89
89
  };
90
+ export type AdminAddCreditsPayload = {
91
+ customerId: string;
92
+ credits: number;
93
+ reason: string;
94
+ };
95
+ export type AdminAddCreditsResult = {
96
+ success: boolean;
97
+ };
98
+ export type AdminCallableRequest = {
99
+ action: "addCredits";
100
+ payload: AdminAddCreditsPayload;
101
+ };
102
+ export type AdminCallableResponse = {
103
+ action: "addCredits";
104
+ result: AdminAddCreditsResult;
105
+ };
90
106
  export type CreateBillingPortalSessionRequest = {
91
107
  returnUrl: string;
92
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.114.0",
3
+ "version": "1.116.0",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {