@databutton/firebase-types 1.95.12 → 1.97.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.
|
@@ -46,7 +46,8 @@ export declare enum CollectionName {
|
|
|
46
46
|
NOTEBOOKS = "notebooks",
|
|
47
47
|
INTEGRATIONS = "integrations",
|
|
48
48
|
INTEGRATION_TEMPLATES = "integration-templates",
|
|
49
|
-
|
|
49
|
+
INTEGRATION_CONNECTIONS = "installed-integrations",
|
|
50
|
+
INTEGRATION_DATA_ACCESS_RESOURCES = "data-access",
|
|
50
51
|
PAGES = "pages",
|
|
51
52
|
PATCH_ATTEMPTS = "patch-attempts",
|
|
52
53
|
PROFILES = "profiles",
|
|
@@ -47,7 +47,8 @@ export var CollectionName;
|
|
|
47
47
|
CollectionName["NOTEBOOKS"] = "notebooks";
|
|
48
48
|
CollectionName["INTEGRATIONS"] = "integrations";
|
|
49
49
|
CollectionName["INTEGRATION_TEMPLATES"] = "integration-templates";
|
|
50
|
-
CollectionName["
|
|
50
|
+
CollectionName["INTEGRATION_CONNECTIONS"] = "installed-integrations";
|
|
51
|
+
CollectionName["INTEGRATION_DATA_ACCESS_RESOURCES"] = "data-access";
|
|
51
52
|
CollectionName["PAGES"] = "pages";
|
|
52
53
|
CollectionName["PATCH_ATTEMPTS"] = "patch-attempts";
|
|
53
54
|
CollectionName["PROFILES"] = "profiles";
|
|
@@ -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 { AccountRole, ConfigTypes,
|
|
4
|
+
import type { AccountRole, ConfigTypes, 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
|
|
@@ -162,6 +162,7 @@ export interface AccountList {
|
|
|
162
162
|
export interface AccountMember {
|
|
163
163
|
createdBy: PerformedBy;
|
|
164
164
|
lastUpdatedBy: PerformedBy;
|
|
165
|
+
displayName: string;
|
|
165
166
|
email: string;
|
|
166
167
|
roles: Array<AccountRole>;
|
|
167
168
|
}
|
|
@@ -956,40 +957,6 @@ export interface ProjectMigrationRecord {
|
|
|
956
957
|
name: ProjectMigration;
|
|
957
958
|
migratedAt: Timestamp;
|
|
958
959
|
}
|
|
959
|
-
/**
|
|
960
|
-
* Collection of integrations that you can add to your project. @deprecated Use InstalledIntegration and IntegrationTemplate instead.
|
|
961
|
-
*/
|
|
962
|
-
export interface Integration {
|
|
963
|
-
displayName: string;
|
|
964
|
-
version: string;
|
|
965
|
-
state: "active" | "early-access" | "inactive";
|
|
966
|
-
/**
|
|
967
|
-
* The type of integration
|
|
968
|
-
*/
|
|
969
|
-
type: IntegrationType;
|
|
970
|
-
/**
|
|
971
|
-
* The name of the Python packages needed to use the integration
|
|
972
|
-
*/
|
|
973
|
-
pythonPackageNames: string[];
|
|
974
|
-
/**
|
|
975
|
-
* Short description of the integration
|
|
976
|
-
* Ment for the user to understand what the integration does
|
|
977
|
-
*/
|
|
978
|
-
description: string;
|
|
979
|
-
/**
|
|
980
|
-
* URL to the documentation for the integration
|
|
981
|
-
*/
|
|
982
|
-
documentationUrl: string | null;
|
|
983
|
-
createdBy: PerformedBy;
|
|
984
|
-
lastUpdatedBy: PerformedBy;
|
|
985
|
-
credentials: string[];
|
|
986
|
-
/**
|
|
987
|
-
* Example code snippet to test if the integration is working
|
|
988
|
-
*/
|
|
989
|
-
healthCheck: {
|
|
990
|
-
codeSnippet: string;
|
|
991
|
-
} | null;
|
|
992
|
-
}
|
|
993
960
|
export type ProjectVariant = "beyond-streamlit" | "riff";
|
|
994
961
|
export interface IntegrationPackages {
|
|
995
962
|
npmPackages: {
|
|
@@ -1084,62 +1051,6 @@ export interface IntegrationTemplate {
|
|
|
1084
1051
|
lastUpdatedBy: PerformedBy;
|
|
1085
1052
|
}
|
|
1086
1053
|
export type IntegrationStatus = "connecting" | "connected" | "needs_reconnect";
|
|
1087
|
-
/**
|
|
1088
|
-
* Integrations installed to user apps. If supported taken from AvailableIntegrations, otherwise custom.
|
|
1089
|
-
* Once installed they evolve by themselves.
|
|
1090
|
-
*/
|
|
1091
|
-
export interface InstalledIntegration {
|
|
1092
|
-
status?: IntegrationStatus;
|
|
1093
|
-
displayName: string;
|
|
1094
|
-
templateSemVerVersion: string;
|
|
1095
|
-
templateId: string;
|
|
1096
|
-
enabled: boolean;
|
|
1097
|
-
logoUrl?: string;
|
|
1098
|
-
apiVersion?: IntegrationApiVersion;
|
|
1099
|
-
metadata?: Record<string, string>;
|
|
1100
|
-
credentials: {
|
|
1101
|
-
key: string;
|
|
1102
|
-
ref: string;
|
|
1103
|
-
}[];
|
|
1104
|
-
/**
|
|
1105
|
-
* Learnings are notes collected by the agent as it learns about the integration and the way a given company uses it.
|
|
1106
|
-
* This should evolve over time and allow the agent to provide mroe acurate results tailored to the specific dataset.
|
|
1107
|
-
* e.g. For example in intercom user_id is called external_ref
|
|
1108
|
-
*/
|
|
1109
|
-
learnings: string[];
|
|
1110
|
-
managedBy: "riff" | "riff-custom" | "community";
|
|
1111
|
-
/**
|
|
1112
|
-
* Short description of the integration
|
|
1113
|
-
* Ment for the user to understand what the integration does
|
|
1114
|
-
*/
|
|
1115
|
-
description: string;
|
|
1116
|
-
provider: {
|
|
1117
|
-
name: string;
|
|
1118
|
-
};
|
|
1119
|
-
/** 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. */
|
|
1120
|
-
optionalScopes?: IntegrationScope[];
|
|
1121
|
-
authStrategy: "riff-oauth" | "oauth" | "api-key" | "custom";
|
|
1122
|
-
/**
|
|
1123
|
-
* human/agent-readable notes (scopes, pagination, rate limits, usage examples). Living document. used by agent, and for debug
|
|
1124
|
-
*/
|
|
1125
|
-
guide: string | null;
|
|
1126
|
-
/**
|
|
1127
|
-
* Set of URLs for the agent to learn about how to use the integration.
|
|
1128
|
-
* Quickstart is a human-friendly guide from the integration docs
|
|
1129
|
-
* OpenAPI is the API spec to learn from
|
|
1130
|
-
* Docs is a generic catch all for the documentation presented by the provider. e.g. docs.stripe.com
|
|
1131
|
-
*/
|
|
1132
|
-
documentationUrls: {
|
|
1133
|
-
type: "quickstart" | "openapi" | "docs";
|
|
1134
|
-
url: string;
|
|
1135
|
-
}[];
|
|
1136
|
-
/**
|
|
1137
|
-
* The name of the Python packages needed to use the integration
|
|
1138
|
-
*/
|
|
1139
|
-
packages: IntegrationPackages;
|
|
1140
|
-
installedBy: PerformedBy;
|
|
1141
|
-
lastUpdatedBy: PerformedBy;
|
|
1142
|
-
}
|
|
1143
1054
|
/**
|
|
1144
1055
|
* Summary information for an integration template
|
|
1145
1056
|
* Stored at: /integration-templates/{label}
|
|
@@ -1195,14 +1106,15 @@ export interface IntegrationTemplateVersion {
|
|
|
1195
1106
|
* This document is lightweight and references the template for most data.
|
|
1196
1107
|
* Only instance-specific data is stored here.
|
|
1197
1108
|
*/
|
|
1198
|
-
export interface
|
|
1109
|
+
export interface Integration {
|
|
1199
1110
|
installedBy: PerformedBy;
|
|
1200
1111
|
lastUpdatedBy: PerformedBy;
|
|
1201
1112
|
templateId: string;
|
|
1202
1113
|
templateVersion: string;
|
|
1203
1114
|
displayName: string;
|
|
1115
|
+
userDescription?: string;
|
|
1204
1116
|
enabled: boolean;
|
|
1205
|
-
status?:
|
|
1117
|
+
status?: IntegrationStatus;
|
|
1206
1118
|
metadata?: Record<string, string>;
|
|
1207
1119
|
credentials: {
|
|
1208
1120
|
key: string;
|
|
@@ -1221,6 +1133,18 @@ export interface IntegrationLearning {
|
|
|
1221
1133
|
createdBy: PerformedBy;
|
|
1222
1134
|
createdAt: Timestamp;
|
|
1223
1135
|
}
|
|
1136
|
+
export interface IntegrationDataAccessResource {
|
|
1137
|
+
resourceType: string;
|
|
1138
|
+
resourceName: string;
|
|
1139
|
+
accessLevel: string;
|
|
1140
|
+
allowedRoles?: string[];
|
|
1141
|
+
permissions?: string[];
|
|
1142
|
+
description?: string;
|
|
1143
|
+
createdBy: PerformedBy;
|
|
1144
|
+
createdAt: Timestamp;
|
|
1145
|
+
lastUpdatedBy: PerformedBy;
|
|
1146
|
+
lastUpdatedAt: Timestamp;
|
|
1147
|
+
}
|
|
1224
1148
|
/**
|
|
1225
1149
|
* Account integration usage tracking
|
|
1226
1150
|
* Stored at: /accounts/{account_id}/integrations/{integration_label}/usage/{project_id}
|
|
@@ -1233,13 +1157,13 @@ export interface AccountIntegrationUsage {
|
|
|
1233
1157
|
lastUsedAt?: Timestamp;
|
|
1234
1158
|
}
|
|
1235
1159
|
/**
|
|
1236
|
-
* Integration
|
|
1160
|
+
* Integration connection links to either account or project integration
|
|
1237
1161
|
* Stored at: /projects/{project_id}/installed-integrations/{integration_label}
|
|
1238
1162
|
*
|
|
1239
1163
|
* This is the mount point that determines how the integration is accessed
|
|
1240
1164
|
* and where it's actually stored (account vs project level)
|
|
1241
1165
|
*/
|
|
1242
|
-
export interface
|
|
1166
|
+
export interface IntegrationConnection {
|
|
1243
1167
|
parent: string;
|
|
1244
1168
|
templateId: string;
|
|
1245
1169
|
templateVersion: string;
|