@databutton/firebase-types 1.78.151 → 1.78.153

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.
@@ -25,7 +25,6 @@ export declare enum CollectionName {
25
25
  FEATURE_FLAGS = "feature-flags",
26
26
  FRONTENDS = "frontends",
27
27
  FRONTEND_PACKAGES = "frontend-packages",
28
- JOBS = "jobs",
29
28
  KNOWLEDGE_BASES = "knowledge-bases",
30
29
  LAUNCH_WAITLIST = "launch-waitlist",
31
30
  LIFE_STAGE_CHANGE_REQUESTS = "life-stage-change-requests",
@@ -33,7 +32,6 @@ export declare enum CollectionName {
33
32
  MESSAGES = "messages",
34
33
  MODULES = "modules",
35
34
  MIGRATIONS = "migrations",
36
- MULTIPAGE_APPS = "multipage-apps",
37
35
  NOTEBOOKS = "notebooks",
38
36
  INTEGRATIONS = "integrations",
39
37
  PAGES = "pages",
@@ -71,7 +69,9 @@ export declare enum CollectionName {
71
69
  TOKEN_USAGE_ENTRIES = "entries",
72
70
  COMPUTE_HOUR_USAGE = "compute-hour-usage",
73
71
  CREDIT_TRANSACTIONS = "credit-transactions",
74
- WRITE_ATTEMPTS = "write-attempts"
72
+ WRITE_ATTEMPTS = "write-attempts",
73
+ LEGACY_UNUSED_JOBS = "jobs",
74
+ LEGACY_UNUSED_MULTIPAGE_APPS = "multipage-apps"
75
75
  }
76
76
  export declare enum DatabuttonIdPrefix {
77
77
  API_KEY = "dbtk",
@@ -86,13 +86,8 @@ export declare enum DatabuttonIdPrefix {
86
86
  COMMIT = "cm",
87
87
  COMMIT_REQUEST = "cmr",
88
88
  FRONTEND = "fe",
89
- JOB = "jb",
90
- JOB_DEPLOY = "jd",
91
- JOB_RUN = "jr",
92
89
  LAUNCH_WAITLIST = "lw",
93
- MULTIPAGE_APP_DEPLOYMENT = "mad",
94
90
  MODULE = "mo",
95
- MULTIPAGE_APP_PAGE = "mp",
96
91
  NOTEBOOK = "nb",
97
92
  FRONTEND_PACKAGES = "fp",
98
93
  PROJECT_BUILD = "pb",
@@ -101,7 +96,6 @@ export declare enum DatabuttonIdPrefix {
101
96
  PROJECT_REQUIREMENTS = "pr",
102
97
  PROJECT_TEMPLATE = "pt",
103
98
  SCHEDULE = "sc",
104
- STREAMLIT_APP = "st",
105
99
  TASKS = "ts",
106
100
  THREADS = "th",
107
101
  UI_COMPONENT = "uic",
@@ -111,7 +105,13 @@ export declare enum DatabuttonIdPrefix {
111
105
  PAGE = "pa",
112
106
  SHARING_KEY = "sk",
113
107
  ANONYMOUS_USER = "an",
114
- MESSAGE = "me"
108
+ MESSAGE = "me",
109
+ LEGACY_UNUSED_JOB_DEPLOY = "jd",
110
+ LEGACY_UNUSED_JOB = "jb",
111
+ LEGACY_UNUSED_JOB_RUN = "jr",
112
+ LEGACY_UNUSED_MULTIPAGE_APP_DEPLOYMENT = "mad",
113
+ LEGACY_UNUSED_MULTIPAGE_APP_PAGE = "mp",
114
+ LEGACY_UNUSED_STREAMLIT_APP = "st"
115
115
  }
116
116
  export declare enum ThirdPartyStorageName {
117
117
  FIREBASE = "firebase",
@@ -26,7 +26,6 @@ export var CollectionName;
26
26
  CollectionName["FEATURE_FLAGS"] = "feature-flags";
27
27
  CollectionName["FRONTENDS"] = "frontends";
28
28
  CollectionName["FRONTEND_PACKAGES"] = "frontend-packages";
29
- CollectionName["JOBS"] = "jobs";
30
29
  CollectionName["KNOWLEDGE_BASES"] = "knowledge-bases";
31
30
  CollectionName["LAUNCH_WAITLIST"] = "launch-waitlist";
32
31
  CollectionName["LIFE_STAGE_CHANGE_REQUESTS"] = "life-stage-change-requests";
@@ -34,7 +33,6 @@ export var CollectionName;
34
33
  CollectionName["MESSAGES"] = "messages";
35
34
  CollectionName["MODULES"] = "modules";
36
35
  CollectionName["MIGRATIONS"] = "migrations";
37
- CollectionName["MULTIPAGE_APPS"] = "multipage-apps";
38
36
  CollectionName["NOTEBOOKS"] = "notebooks";
39
37
  CollectionName["INTEGRATIONS"] = "integrations";
40
38
  CollectionName["PAGES"] = "pages";
@@ -73,6 +71,9 @@ export var CollectionName;
73
71
  CollectionName["COMPUTE_HOUR_USAGE"] = "compute-hour-usage";
74
72
  CollectionName["CREDIT_TRANSACTIONS"] = "credit-transactions";
75
73
  CollectionName["WRITE_ATTEMPTS"] = "write-attempts";
74
+ //
75
+ CollectionName["LEGACY_UNUSED_JOBS"] = "jobs";
76
+ CollectionName["LEGACY_UNUSED_MULTIPAGE_APPS"] = "multipage-apps";
76
77
  })(CollectionName || (CollectionName = {}));
77
78
  export var DatabuttonIdPrefix;
78
79
  (function (DatabuttonIdPrefix) {
@@ -88,13 +89,8 @@ export var DatabuttonIdPrefix;
88
89
  DatabuttonIdPrefix["COMMIT"] = "cm";
89
90
  DatabuttonIdPrefix["COMMIT_REQUEST"] = "cmr";
90
91
  DatabuttonIdPrefix["FRONTEND"] = "fe";
91
- DatabuttonIdPrefix["JOB"] = "jb";
92
- DatabuttonIdPrefix["JOB_DEPLOY"] = "jd";
93
- DatabuttonIdPrefix["JOB_RUN"] = "jr";
94
92
  DatabuttonIdPrefix["LAUNCH_WAITLIST"] = "lw";
95
- DatabuttonIdPrefix["MULTIPAGE_APP_DEPLOYMENT"] = "mad";
96
93
  DatabuttonIdPrefix["MODULE"] = "mo";
97
- DatabuttonIdPrefix["MULTIPAGE_APP_PAGE"] = "mp";
98
94
  DatabuttonIdPrefix["NOTEBOOK"] = "nb";
99
95
  DatabuttonIdPrefix["FRONTEND_PACKAGES"] = "fp";
100
96
  DatabuttonIdPrefix["PROJECT_BUILD"] = "pb";
@@ -103,7 +99,6 @@ export var DatabuttonIdPrefix;
103
99
  DatabuttonIdPrefix["PROJECT_REQUIREMENTS"] = "pr";
104
100
  DatabuttonIdPrefix["PROJECT_TEMPLATE"] = "pt";
105
101
  DatabuttonIdPrefix["SCHEDULE"] = "sc";
106
- DatabuttonIdPrefix["STREAMLIT_APP"] = "st";
107
102
  DatabuttonIdPrefix["TASKS"] = "ts";
108
103
  DatabuttonIdPrefix["THREADS"] = "th";
109
104
  DatabuttonIdPrefix["UI_COMPONENT"] = "uic";
@@ -114,6 +109,13 @@ export var DatabuttonIdPrefix;
114
109
  DatabuttonIdPrefix["SHARING_KEY"] = "sk";
115
110
  DatabuttonIdPrefix["ANONYMOUS_USER"] = "an";
116
111
  DatabuttonIdPrefix["MESSAGE"] = "me";
112
+ //
113
+ DatabuttonIdPrefix["LEGACY_UNUSED_JOB_DEPLOY"] = "jd";
114
+ DatabuttonIdPrefix["LEGACY_UNUSED_JOB"] = "jb";
115
+ DatabuttonIdPrefix["LEGACY_UNUSED_JOB_RUN"] = "jr";
116
+ DatabuttonIdPrefix["LEGACY_UNUSED_MULTIPAGE_APP_DEPLOYMENT"] = "mad";
117
+ DatabuttonIdPrefix["LEGACY_UNUSED_MULTIPAGE_APP_PAGE"] = "mp";
118
+ DatabuttonIdPrefix["LEGACY_UNUSED_STREAMLIT_APP"] = "st";
117
119
  })(DatabuttonIdPrefix || (DatabuttonIdPrefix = {}));
118
120
  export var ThirdPartyStorageName;
119
121
  (function (ThirdPartyStorageName) {
@@ -203,93 +203,6 @@ export interface UserSegment {
203
203
  name: string;
204
204
  }
205
205
  export type FeatureFlag = PartialRolloutFeatureFlag | OnOffFeatureFlag | SegmentFeatureFlag;
206
- export type MultipageAppTheme = {
207
- name: string;
208
- createdBy: PerformedBy;
209
- primaryColor: string;
210
- backgroundColor: string;
211
- secondaryBackgroundColor: string;
212
- textColor: string;
213
- font: "sans serif" | "serif" | "monospace";
214
- };
215
- export type MultipageAppConfig = {
216
- theme?: MultipageAppTheme | null;
217
- };
218
- /**
219
- * Subcollection under projects
220
- *
221
- * Every project contains 1 multipage app which in turn contains 0-n pages.
222
- *
223
- * @deprecated streamlit only
224
- */
225
- export interface MultipageApp {
226
- /**
227
- * Name of the multipage app
228
- *
229
- * As of 2023-02-09 this is synced with the project and will equal the project name
230
- */
231
- displayName: string;
232
- /**
233
- * Synced with the project life stage
234
- */
235
- hibernated?: boolean;
236
- /**
237
- * Autogenerated short-url for this multipage app (/v/something)
238
- */
239
- shortUrl: string;
240
- /**
241
- * Where or not this multipage app should be accessible by link
242
- */
243
- isPublic: boolean;
244
- /**
245
- * The theme used for this multipage app
246
- */
247
- activeThemeId: string;
248
- }
249
- export interface Page {
250
- /**
251
- * Name of the page
252
- */
253
- name: string;
254
- /**
255
- * Slug for the page. Used for URLs
256
- */
257
- slug: string;
258
- /**
259
- * Ref to the code block representing this page
260
- */
261
- codeBlockRef: string;
262
- createdBy: PerformedBy;
263
- markedForDeletionBy: PerformedBy | null;
264
- }
265
- /**
266
- * Subcollection under multipage-apps
267
- * @deprecated streamlit only
268
- */
269
- export interface MultipageAppPage {
270
- /**
271
- * Name of the page
272
- */
273
- name: string;
274
- /**
275
- * Slug for the page. Used for URLs
276
- */
277
- slug: string;
278
- /**
279
- * Ref to the code block representing this page
280
- */
281
- codeBlockRef: string;
282
- createdBy: PerformedBy;
283
- markedForDeletionBy: PerformedBy | null;
284
- /**
285
- * Used to indicate if this page should be hidden from the navbar
286
- */
287
- hidden: boolean;
288
- /**
289
- * Used for ordering pages in the navbar.
290
- */
291
- sequence: number;
292
- }
293
206
  export declare enum FrontendBuildStage {
294
207
  PROTOTYPE = "prototype",
295
208
  ITERATE = "iterate"
@@ -411,22 +324,13 @@ export declare enum AgentAccess {
411
324
  READ_WRITE = "read-write",
412
325
  READ_ONLY = "read-only"
413
326
  }
414
- export interface CodeBlockBase {
327
+ export interface CodeBlock {
328
+ type: "module" | "backend" | "frontend" | "ui-component" | "ui-file";
415
329
  createdAtUtc: Timestamp;
416
330
  componentId: string;
417
331
  controlTakenBy?: PerformedBy | null;
418
332
  agentAccess?: AgentAccess | null;
419
333
  }
420
- /**
421
- * @deprecated No longer in product, but might still exist in the firebase
422
- */
423
- export interface CodeBlockDeprecated extends CodeBlockBase {
424
- type: "app";
425
- }
426
- export interface CodeBlockLive extends CodeBlockBase {
427
- type: "job" | "module" | "page" | "frontend" | "backend" | "ui-component" | "ui-file";
428
- }
429
- export type CodeBlock = CodeBlockLive | CodeBlockDeprecated;
430
334
  export interface CodeBlockCheckpoint {
431
335
  title: string | null;
432
336
  codeBlockVersionRef: string;
@@ -444,38 +348,6 @@ export interface CodeBlockVersion {
444
348
  hash?: number;
445
349
  createdReason?: "initial" | "autosave" | "restore-version" | "accept-suggestion" | "rename" | "ai-generated";
446
350
  }
447
- export interface ModuleRef {
448
- moduleRef: string;
449
- lastCodeBlockVersionRef: string;
450
- }
451
- export interface Deployment {
452
- createdAt: Timestamp;
453
- createdById: string;
454
- createdByName: string;
455
- deployFinishedAt?: Timestamp | null;
456
- deployFailedAt?: Timestamp | null;
457
- codeBlockId: string;
458
- codeBlockVersionId: string;
459
- codeRef: string;
460
- modules?: ModuleRef[];
461
- requirementsRef?: string | null;
462
- projectEventRef?: string | null;
463
- }
464
- export interface PageRef {
465
- pageRef: string;
466
- lastCodeBlockVersionRef: string;
467
- sequence: number;
468
- hidden: boolean;
469
- }
470
- export interface MultipageAppDeploymentDeprecated {
471
- createdBy: PerformedBy;
472
- deployFinishedAt: Timestamp | null;
473
- deployFailedAt: Timestamp | null;
474
- pages: PageRef[];
475
- modules: ModuleRef[];
476
- requirementsRef: string | null;
477
- projectEventRef: string | null;
478
- }
479
351
  export interface CommitRequest {
480
352
  createdBy: PerformedBy;
481
353
  commitId?: string;
@@ -489,41 +361,31 @@ export interface FullDeploymentRequest {
489
361
  deploymentRef: string | null;
490
362
  undeploy?: boolean;
491
363
  }
492
- interface LegacyComponentDeploymentRequest {
493
- createdBy: PerformedBy;
494
- deploymentRef: string | null;
495
- }
496
- /**
497
- * Document created by the web app to signal that a component should be deployed.
498
- *
499
- * @deprecated no longer in use
500
- */
501
- export interface JobDeploymentRequest extends LegacyComponentDeploymentRequest {
364
+ export interface ScheduleTarget {
365
+ type: "endpoint";
366
+ dev: boolean;
367
+ endpoint: string;
368
+ method: "POST";
369
+ body: string;
370
+ headers: Record<string, string>;
371
+ }
372
+ export interface ScheduleWhen {
373
+ type: "cron";
502
374
  cronExpression: string;
503
- cronTimezone: string;
504
- scheduleForm: "Weekly" | "Custom";
505
- }
506
- /**
507
- * @deprecated no longer in use
508
- */
509
- export type MultipageAppDeploymentRequest = LegacyComponentDeploymentRequest;
510
- export declare enum ScheduleState {
511
- ACTIVE = "ACTIVE",
512
- PAUSED = "PAUSED",
513
- DELETED = "DELETED"
375
+ timezone: string;
514
376
  }
515
377
  export interface Schedule {
516
- createdAt: Timestamp;
517
- updatedAt: Timestamp;
518
- markedForDeletionAt?: Timestamp | null;
519
- scheduleForm?: "Weekly" | "Custom";
520
- cronExpression: string;
521
- cronTimezone: string;
522
- pending?: boolean;
523
- paused?: boolean;
524
- cronExpressionUtc: string;
525
- state?: ScheduleState;
526
- previousState?: ScheduleState | null;
378
+ createdBy: PerformedBy;
379
+ lastUpdatedBy: PerformedBy;
380
+ markedForDeletionBy: PerformedBy | null;
381
+ displayName: string;
382
+ target: ScheduleTarget;
383
+ when: ScheduleWhen;
384
+ pendingAt: Timestamp | null;
385
+ pausedAt: Timestamp | null;
386
+ syncNeededAt: Timestamp;
387
+ syncSucceededAt: Timestamp | null;
388
+ syncFailedAt: Timestamp | null;
527
389
  }
528
390
  export interface Property {
529
391
  name: string;
@@ -924,7 +786,7 @@ export interface Integration {
924
786
  codeSnippet: string;
925
787
  } | null;
926
788
  }
927
- export type ProjectVariant = "streamlit" | "beyond-streamlit" | "riff";
789
+ export type ProjectVariant = "beyond-streamlit" | "riff";
928
790
  export interface CompanyKnowledgeBase {
929
791
  createdBy: PerformedBy;
930
792
  lastUpdatedBy: PerformedBy;
@@ -953,7 +815,7 @@ export interface Project {
953
815
  createdAt: Timestamp;
954
816
  createdBy?: PerformedBy;
955
817
  createdFromProjectTemplateId?: string | null;
956
- variant?: ProjectVariant;
818
+ variant: ProjectVariant;
957
819
  startingPrompt?: string | null;
958
820
  startingPointGeneratedBy?: PerformedBy | null;
959
821
  extensions?: ProjectExtensions;
@@ -1127,14 +989,6 @@ export interface ProjectTemplate {
1127
989
  title: string;
1128
990
  description: string;
1129
991
  }[];
1130
- /** @deprecated streamlit templates are all deleted */
1131
- multipageAppPages?: ProjectTemplatePage[];
1132
- /** @deprecated streamlit templates are all deleted */
1133
- jobs?: {
1134
- name: string;
1135
- code: string;
1136
- agentAccess?: AgentAccess | null;
1137
- }[];
1138
992
  uiComponents?: {
1139
993
  name: string;
1140
994
  code: string;
@@ -1169,7 +1023,7 @@ export interface ProjectTemplate {
1169
1023
  requirements?: ProjectTemplateRequirementsSnapshot | null;
1170
1024
  build: ProjectTemplateBuildSnapshot;
1171
1025
  targetPoolSize?: number;
1172
- variant: "beyond-streamlit" | "riff";
1026
+ variant: ProjectVariant;
1173
1027
  initialPromptInstructions?: string;
1174
1028
  secretNames?: string[];
1175
1029
  agentConfig?: Project["agentConfig"];
@@ -1270,40 +1124,6 @@ export type Pulse = {
1270
1124
  eventName: string;
1271
1125
  properties: Record<string, Primitive | Primitive[]>;
1272
1126
  };
1273
- export interface ModuleSnapshotDeprecated {
1274
- id: string;
1275
- codeBlockId: string;
1276
- version: string;
1277
- name: string;
1278
- codeHash: number;
1279
- }
1280
- export interface ComponentSnapshot {
1281
- id: string;
1282
- codeBlockId: string;
1283
- version: string;
1284
- name: string;
1285
- codeHash: number;
1286
- }
1287
- export interface PageSnapshotDeprecated extends ComponentSnapshot {
1288
- hidden: boolean;
1289
- sequence: number;
1290
- }
1291
- export interface JobSnapshotDeprecated extends ComponentSnapshot {
1292
- requirementsHash: string;
1293
- modules: ModuleSnapshotDeprecated[];
1294
- }
1295
- export interface MultipageAppSnapshotDeprecated {
1296
- id: string;
1297
- requirementsHash: string;
1298
- modules: ModuleSnapshotDeprecated[];
1299
- pages: PageSnapshotDeprecated[];
1300
- }
1301
- export interface AppConfigSnapshot {
1302
- deploymentId: string | null;
1303
- createdBy: PerformedBy;
1304
- multipageApps: MultipageAppSnapshotDeprecated[];
1305
- jobs: JobSnapshotDeprecated[];
1306
- }
1307
1127
  export type RequirementsSnapshot = {
1308
1128
  requirementsId: string;
1309
1129
  baseRequirementsTxt: string;
@@ -1381,7 +1201,7 @@ type WithDocRef<T> = T & {
1381
1201
  export type ComponentSnapshotBase = {
1382
1202
  component: WithDocRef<{
1383
1203
  name: string;
1384
- type: "page" | "job" | "module" | "frontend" | "backend" | "ui-component" | "ui-file";
1204
+ type: "module" | "frontend" | "backend" | "ui-component" | "ui-file";
1385
1205
  }>;
1386
1206
  codeBlock: WithDocRef<{
1387
1207
  version: WithDocRef<{
@@ -1406,31 +1226,9 @@ export type UiComponentSnapshot<T = ComponentSnapshotBase> = T;
1406
1226
  export type FrontendSnapshot<T = ComponentSnapshotBase> = T & {
1407
1227
  config?: FrontendConfig;
1408
1228
  };
1409
- export type ComponentDependenciesSnapshot<T = ComponentSnapshotBase> = {
1410
- modules: ModuleSnapshot<T>[];
1411
- venv: {
1412
- hash: string;
1413
- };
1414
- };
1415
- export type PageSnapshot<T = ComponentSnapshotBase> = T & {
1416
- hidden: boolean;
1417
- sequence: number;
1418
- slug: string;
1419
- };
1420
- export type MultipageAppSnapshot<T = ComponentSnapshotBase> = {
1421
- id: "main" | string;
1422
- pages: PageSnapshot<T>[];
1423
- config?: MultipageAppConfig | null;
1424
- dependencies: ComponentDependenciesSnapshot<T>;
1425
- };
1426
- export type JobSnapshot<T = ComponentSnapshotBase> = T & {
1427
- dependencies: ComponentDependenciesSnapshot<T>;
1428
- };
1429
1229
  export type AppSnapshot<T = ComponentSnapshotBase> = {
1430
1230
  deployedBy: PerformedBy;
1431
- multipageApps?: MultipageAppSnapshot<T>[];
1432
1231
  modules?: ModuleSnapshot<T>[];
1433
- jobs?: JobSnapshot<T>[];
1434
1232
  backends?: BackendSnapshot<T>[];
1435
1233
  uiFiles?: UiFileSnapshot<T>[];
1436
1234
  uiComponents?: UiComponentSnapshot<T>[];
@@ -1492,7 +1290,7 @@ export interface ContextBase {
1492
1290
  export interface ComponentContext extends ContextBase {
1493
1291
  type: "component";
1494
1292
  componentId: string;
1495
- componentType: "job" | "page" | "module" | "frontend" | "backend" | "ui-component" | "ui-file";
1293
+ componentType: "module" | "frontend" | "backend" | "ui-component" | "ui-file";
1496
1294
  }
1497
1295
  export interface ProjectContext extends ContextBase {
1498
1296
  type: "project";
@@ -1535,7 +1333,7 @@ export type Appbutler = {
1535
1333
  updatedBy?: PerformedBy;
1536
1334
  routingChangedAt?: Timestamp;
1537
1335
  markedForDeletionAt: Timestamp | null;
1538
- variant?: "riff" | "beyond-streamlit";
1336
+ variant: ProjectVariant;
1539
1337
  provider?: string;
1540
1338
  serviceType: string;
1541
1339
  resources: AppbutlerResources;
@@ -24,13 +24,6 @@ export var AgentAccess;
24
24
  AgentAccess["READ_WRITE"] = "read-write";
25
25
  AgentAccess["READ_ONLY"] = "read-only";
26
26
  })(AgentAccess || (AgentAccess = {}));
27
- export var ScheduleState;
28
- (function (ScheduleState) {
29
- ScheduleState["ACTIVE"] = "ACTIVE";
30
- ScheduleState["PAUSED"] = "PAUSED";
31
- // @deprecated use markedForDeletionAt instead
32
- ScheduleState["DELETED"] = "DELETED";
33
- })(ScheduleState || (ScheduleState = {}));
34
27
  export var ProjectLifeStage;
35
28
  (function (ProjectLifeStage) {
36
29
  ProjectLifeStage["Creating"] = "creating";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.78.151",
3
+ "version": "1.78.153",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {