@databutton/firebase-types 1.85.15 → 1.85.17

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.
@@ -193,3 +193,6 @@ export declare enum IntegrationType {
193
193
  GRAPHQL = "graphql",
194
194
  WEBHOOK = "webhook"
195
195
  }
196
+ export declare enum CreateProjectErrorCode {
197
+ ACTIVE_PROJECT_LIMIT_REACHED = "ACTIVE_PROJECT_LIMIT_REACHED"
198
+ }
@@ -209,4 +209,8 @@ export var IntegrationType;
209
209
  IntegrationType["GRAPHQL"] = "graphql";
210
210
  IntegrationType["WEBHOOK"] = "webhook";
211
211
  })(IntegrationType || (IntegrationType = {}));
212
+ export var CreateProjectErrorCode;
213
+ (function (CreateProjectErrorCode) {
214
+ CreateProjectErrorCode["ACTIVE_PROJECT_LIMIT_REACHED"] = "ACTIVE_PROJECT_LIMIT_REACHED";
215
+ })(CreateProjectErrorCode || (CreateProjectErrorCode = {}));
212
216
  //# sourceMappingURL=enums.js.map
@@ -870,6 +870,11 @@ export interface IntegrationPackages {
870
870
  dev: string[];
871
871
  };
872
872
  }
873
+ export interface IntegrationScope {
874
+ sectionName: string;
875
+ scopes: string[];
876
+ permission?: "read" | "write" | "read-write";
877
+ }
873
878
  /**
874
879
  * Pre-defined integrations. To speed up the process for the user by pre-defining auth strategy and other fields.
875
880
  * These include OAuth connections managed by Riff.
@@ -890,10 +895,7 @@ export interface IntegrationTemplate {
890
895
  name: string;
891
896
  };
892
897
  /** Optional scopes for the integration. e.g. "read:contacts", "write:contacts". Allows for managing these via the admin panel and comparing installed vs available scopes. Broken down into sections for easier management and allowing users to select scope sections they need. */
893
- optionalScopes?: {
894
- sectionName: string;
895
- scopes: string[];
896
- }[];
898
+ optionalScopes?: IntegrationScope[];
897
899
  /**
898
900
  * Riff-oauth are integrations that use our provided Riff OAuth flow
899
901
  * Any integration using a custom flow should have usage descriubed in the guide field
@@ -953,10 +955,7 @@ export interface InstalledIntegration {
953
955
  name: string;
954
956
  };
955
957
  /** Installed optional scopes for the integration. e.g. "read:contacts", "write:contacts". Allows for managing these via the admin panel and comparing installed vs available scopes. Broken down into sections for easier management and allowing users to select scope sections they need. */
956
- optionalScopes?: {
957
- sectionName: string;
958
- scopes: string[];
959
- }[];
958
+ optionalScopes?: IntegrationScope[];
960
959
  authStrategy: "riff-oauth" | "oauth" | "api-key" | "custom";
961
960
  /**
962
961
  * human/agent-readable notes (scopes, pagination, rate limits, usage examples). Living document. used by agent, and for debug
@@ -1,5 +1,6 @@
1
1
  import type { Timestamp } from "firebase/firestore";
2
2
  import type { RunMigrationsResponse } from "../db-api.js";
3
+ import type { CreateProjectErrorCode } from "./enums.js";
3
4
  import type { Datafile, Dataframe, Job, Project, ProjectTemplate, ScheduleTarget, ScheduleWhen } from "./persisted.js";
4
5
  export type DeleteJob = Pick<Job, "markedForDeletionAt" | "markedForDeletionBy">;
5
6
  export type DeleteProject = Pick<Project, "markedForDeletionAt" | "markedForDeletionBy">;
@@ -20,10 +21,13 @@ export type CreateProjectRequest = {
20
21
  initialAppIdea?: string | null;
21
22
  projectTemplateId: string;
22
23
  requestSentAt: Timestamp;
23
- variant?: Project["variant"];
24
24
  };
25
25
  export type CreateProjectResponse = {
26
+ success: true;
26
27
  projectId: string;
28
+ } | {
29
+ success: false;
30
+ code: CreateProjectErrorCode;
27
31
  };
28
32
  export type HibernateProjectRequest = {
29
33
  projectId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.85.15",
3
+ "version": "1.85.17",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {