@databutton/firebase-types 1.95.3 → 1.95.4

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.
@@ -132,6 +132,7 @@ export declare enum DatabuttonIdPrefix {
132
132
  ANONYMOUS_USER = "an",
133
133
  MESSAGE = "me",
134
134
  INTEGRATION = "in",
135
+ APPROVAL_REQUEST = "ar",
135
136
  LEGACY_UNUSED_JOB_DEPLOY = "jd",
136
137
  LEGACY_UNUSED_JOB = "jb",
137
138
  LEGACY_UNUSED_JOB_RUN = "jr",
@@ -137,6 +137,8 @@ export var DatabuttonIdPrefix;
137
137
  DatabuttonIdPrefix["MESSAGE"] = "me";
138
138
  DatabuttonIdPrefix["INTEGRATION"] = "in";
139
139
  //
140
+ DatabuttonIdPrefix["APPROVAL_REQUEST"] = "ar";
141
+ //
140
142
  DatabuttonIdPrefix["LEGACY_UNUSED_JOB_DEPLOY"] = "jd";
141
143
  DatabuttonIdPrefix["LEGACY_UNUSED_JOB"] = "jb";
142
144
  DatabuttonIdPrefix["LEGACY_UNUSED_JOB_RUN"] = "jr";
@@ -96,18 +96,21 @@ export interface PostHogConfig extends AccountConfigBase {
96
96
  */
97
97
  host: string;
98
98
  }
99
- export type PermissionName = "deploy";
99
+ export type ProjectPermissionName = "deploy";
100
+ export interface Permission {
101
+ approvalRequestRef?: string;
102
+ }
100
103
  export type ApprovalLevel = "role" | "permission" | "approval";
101
104
  export interface GatingConfig extends AccountConfigBase {
102
105
  type: ConfigTypes.GATING;
103
- approvalLevelRequiredFor: Record<PermissionName, ApprovalLevel>;
106
+ approvalLevelRequiredFor: Record<ProjectPermissionName, ApprovalLevel>;
104
107
  }
105
108
  export type AccountConfig = SSOConfig | PostHogConfig | GatingConfig;
106
109
  export interface SSOConfigLookupEntry {
107
110
  lastUpdatedAt: Timestamp;
108
111
  organizationId: string;
109
112
  }
110
- interface Approvable {
113
+ export interface Approvable {
111
114
  approvalRequestRef?: string | null;
112
115
  approvedBy?: PerformedBy | null;
113
116
  deniedBy?: PerformedBy | null;
@@ -128,7 +131,7 @@ interface ApprovalRequestBase<T = string, M = Record<string, string>> {
128
131
  type AddPermissionApprovalConfig = {
129
132
  projectId: string;
130
133
  userId: string;
131
- permission: PermissionName;
134
+ permission: ProjectPermissionName;
132
135
  };
133
136
  export type AddPermissionApprovalRequest = ApprovalRequestBase<"add-permission", AddPermissionApprovalConfig>;
134
137
  type UseIntegrationApprovalConfig = {
@@ -1183,7 +1186,7 @@ export interface Project {
1183
1186
  markedForDeletionAt: Timestamp | null;
1184
1187
  markedForDeletionBy?: PerformedBy | null;
1185
1188
  members: string[];
1186
- permittedUsers?: Record<PermissionName, string[]>;
1189
+ permittedUsers?: Record<ProjectPermissionName, string[]>;
1187
1190
  name: string;
1188
1191
  tags?: string[];
1189
1192
  slug?: string;
@@ -1,7 +1,7 @@
1
1
  import type { Timestamp } from "firebase/firestore";
2
2
  import type { RunMigrationsResponse } from "../db-api.js";
3
3
  import type { CreateProjectErrorCode, MigrateToRiffErrorCode } from "./enums.js";
4
- import type { ApprovalLevel, Datafile, Dataframe, Job, PermissionName, Project, ProjectTemplate, ScheduleTarget, ScheduleWhen } from "./persisted.js";
4
+ import type { ApprovalLevel, Datafile, Dataframe, Job, ProjectPermissionName, Project, ProjectTemplate, ScheduleTarget, ScheduleWhen } from "./persisted.js";
5
5
  export type DeleteJob = Pick<Job, "markedForDeletionAt" | "markedForDeletionBy">;
6
6
  export type DeleteProject = Pick<Project, "markedForDeletionAt" | "markedForDeletionBy">;
7
7
  export type DeleteDataframe = Pick<Dataframe, "markedForDeletionAt" | "markedForDeletionBy">;
@@ -415,7 +415,7 @@ export type MigrateToRiffResponse = {
415
415
  };
416
416
  export type UpsertGatingConfigRequest = {
417
417
  accountId: string;
418
- approvalLevelRequiredFor: Record<PermissionName, ApprovalLevel>;
418
+ approvalLevelRequiredFor: Record<ProjectPermissionName, ApprovalLevel>;
419
419
  };
420
420
  export type UpsertGatingConfigResponse = {
421
421
  success: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.95.3",
3
+ "version": "1.95.4",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {