@dvina/sdk 4.0.79 → 4.0.105
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.
- package/dist/_generated_documents-4D2QSLVK.js +4 -0
- package/dist/{_generated_documents-GPAJPXFF.js.map → _generated_documents-4D2QSLVK.js.map} +1 -1
- package/dist/{_generated_documents-KPFSYIQA.cjs → _generated_documents-7IV3BIIO.cjs} +569 -497
- package/dist/{_generated_documents-KPFSYIQA.cjs.map → _generated_documents-7IV3BIIO.cjs.map} +1 -1
- package/dist/adapters/angular/index.cjs +5 -5
- package/dist/adapters/angular/index.d.cts +2 -2
- package/dist/adapters/angular/index.d.ts +2 -2
- package/dist/adapters/angular/index.js +3 -3
- package/dist/{chunk-4QKWHQT2.cjs → chunk-342BFYZZ.cjs} +4 -10
- package/dist/chunk-342BFYZZ.cjs.map +1 -0
- package/dist/{chunk-QOZI2HY5.js → chunk-AE5KAIKK.js} +3 -3
- package/dist/{chunk-QOZI2HY5.js.map → chunk-AE5KAIKK.js.map} +1 -1
- package/dist/{chunk-YMIRF4SC.cjs → chunk-E45DZR4J.cjs} +85 -39
- package/dist/chunk-E45DZR4J.cjs.map +1 -0
- package/dist/{chunk-NPIKZKLU.cjs → chunk-FOKGSMXS.cjs} +5 -5
- package/dist/{chunk-NPIKZKLU.cjs.map → chunk-FOKGSMXS.cjs.map} +1 -1
- package/dist/{chunk-P4BYTXZ7.js → chunk-KEM6SUTS.js} +4 -10
- package/dist/chunk-KEM6SUTS.js.map +1 -0
- package/dist/{chunk-MFUJEBEN.js → chunk-MCS45C4J.js} +63 -35
- package/dist/chunk-MCS45C4J.js.map +1 -0
- package/dist/{chunk-IRMDS6IM.js → chunk-PJ34OU4B.js} +597 -143
- package/dist/chunk-PJ34OU4B.js.map +1 -0
- package/dist/{chunk-UVFQIMJE.cjs → chunk-Q66BI4MQ.cjs} +1335 -869
- package/dist/chunk-Q66BI4MQ.cjs.map +1 -0
- package/dist/{client-DiPeOA1R.d.ts → client-B5LbpEC3.d.ts} +1 -1
- package/dist/{client-BX57zzHy.d.cts → client-Dp5JOq16.d.cts} +1 -1
- package/dist/{index-DFP4l9XY.d.cts → index-BKyI_YQS.d.cts} +1 -1
- package/dist/{index-x3esSuE9.d.ts → index-BrsbEcIx.d.ts} +1 -1
- package/dist/index.cjs +441 -385
- package/dist/index.d.cts +410 -93
- package/dist/index.d.ts +410 -93
- package/dist/index.js +4 -4
- package/dist/pagination/index.cjs +8 -8
- package/dist/pagination/index.d.cts +2 -2
- package/dist/pagination/index.d.ts +2 -2
- package/dist/pagination/index.js +2 -2
- package/dist/{sync-engine-BXCeW3GE.d.ts → sync-engine-BmE8-rhX.d.ts} +1 -0
- package/dist/{sync-engine-DHWuexPR.d.cts → sync-engine-DN0tSqtg.d.cts} +1 -0
- package/package.json +1 -1
- package/dist/_generated_documents-GPAJPXFF.js +0 -4
- package/dist/chunk-4QKWHQT2.cjs.map +0 -1
- package/dist/chunk-IRMDS6IM.js.map +0 -1
- package/dist/chunk-MFUJEBEN.js.map +0 -1
- package/dist/chunk-P4BYTXZ7.js.map +0 -1
- package/dist/chunk-UVFQIMJE.cjs.map +0 -1
- package/dist/chunk-YMIRF4SC.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Request, Connection, PageInfo, defaultConnection } from './chunk-
|
|
1
|
+
import { Request, Connection, PageInfo, defaultConnection } from './chunk-KEM6SUTS.js';
|
|
2
2
|
import { createInferenceClientInternal } from './chunk-PDM2KR7T.js';
|
|
3
3
|
import { createHttpTransport, BillingClient, print, Kind } from './chunk-5TAY5I34.js';
|
|
4
4
|
import { GRAPHQL_ERROR_CODES, DvinaAuthenticationError, DvinaNetworkError, DvinaGraphQLError, DvinaError, createGraphQLError } from './chunk-7XBJ77RJ.js';
|
|
5
|
-
import { ChatConnectionFragmentDoc, ChatFragmentDoc, FileFragmentDoc, ChatMessageFragmentDoc, AgentConnectionFragmentDoc, ArtifactConnectionFragmentDoc, InsightFragmentDoc, ChatMessageConnectionFragmentDoc, ContentBlockFragmentDoc, FeedbackFragmentDoc, DatabaseEngineFragmentDoc, TableConnectionFragmentDoc, DocumentContentFragmentDoc, DocumentFormatFragmentDoc, ReportMemberFragmentDoc, ReportConnectionFragmentDoc, IntegrationProviderFragmentDoc, IntegrationFragmentDoc, InsightConnectionFragmentDoc, DatabaseFragmentDoc, DocumentFragmentDoc, RelationFragmentDoc,
|
|
5
|
+
import { ChatConnectionFragmentDoc, ChatFragmentDoc, FileFragmentDoc, ChatMessageFragmentDoc, AgentConnectionFragmentDoc, ArtifactConnectionFragmentDoc, InsightFragmentDoc, ChatMessageConnectionFragmentDoc, ContentBlockFragmentDoc, FeedbackFragmentDoc, DatabaseEngineFragmentDoc, TableConnectionFragmentDoc, DocumentContentFragmentDoc, DocumentFormatFragmentDoc, FeedSendMessageActionFragmentDoc, FeedArtifactDataFragmentDoc, ReportMemberFragmentDoc, ReportConnectionFragmentDoc, IntegrationProviderFragmentDoc, IntegrationFragmentDoc, InsightConnectionFragmentDoc, DatabaseFragmentDoc, DocumentFragmentDoc, RelationFragmentDoc, AddInsightToReportDocument, CancelOauthFlowDocument, CancelWorkspaceDeletionDocument, ConnectIntegrationDocument, ConsumePulseEventsDocument, ContinueImportedChatDocument, ContinueInterpretationDocument, CreateAgentDocument, CreateChatDocument, CreateDatabaseDocument, CreateDocumentDocument, CreateFeedbackDocument, CreateFolderDocument, CreateInsightDocument, CreateIntegrationDocument, CreateReportDocument, CreateTableDocument, CreateUserSkillFileDocument, CreateUserSkillFolderDocument, DeleteAgentDocument, DeleteArtifactDocument, DeleteChatDocument, DeleteDatabaseDocument, DeleteDocumentDocument, DeleteFolderDocument, DeleteInsightDocument, DeleteInsightsDocument, DeleteIntegrationDocument, DeleteReportDocument, DeleteTableDocument, DeleteUserSkillFileDocument, DeleteUserSkillFolderDocument, DisconnectIntegrationDocument, DismissPulseEventDocument, ExecuteChatImportDocument, GenerateUploadUriDocument, PreviewChatImportDocument, ReanalyzeDocumentDocument, RefineMindInstructionDocument, RefreshDatabaseSchemaDocument, ReinterpretSourceDocument, ReinterpretSourcesOfuserDocument, RelocateInsightDocument, RemoveInsightFromReportDocument, ResetWorkspaceDocument, ResolvePulseEventDocument, ScheduleWorkspaceDeletionDocument, SetDatabasePrimaryKeyDocument, UpdateAgentDocument, UpdateChatDocument, UpdateDatabaseDocument, UpdateDocumentDocument, UpdateFolderDocument, UpdateInsightDocument, UpdateInsightInReportDocument, UpdateInterpDocument, UpdatePulseTriggerDocument, UpdateReportDocument, UpdateTableDocument, UpdateUserSkillFileDocument, UpdateUserSkillFolderDocument, AgentDocument, Agent_ChatsDocument, AgentsDocument, ArtifactDocument, Artifact_ChatDocument, Artifact_Chat_InsightDocument, Artifact_FileDocument, Artifact_MessageDocument, Artifact_Message_ChatDocument, Artifact_Message_ContentsDocument, Artifact_Message_FeedbackDocument, ArtifactsDocument, ChatDocument, Chat_AgentsDocument, Chat_ArtifactsDocument, Chat_InsightDocument, Chat_Insight_ReportMembersDocument, Chat_MessagesDocument, ChatMessageDocument, ChatMessage_ArtifactsDocument, ChatMessage_ChatDocument, ChatMessage_Chat_InsightDocument, ChatMessage_ContentsDocument, ChatMessage_FeedbackDocument, ChatMessagesDocument, ChatsDocument, DatabaseDocument, Database_EngineDocument, Database_Engine_CatalogDocument, Database_TablesDocument, DatabaseCatalogDocument, DatabaseCatalog_EngineDocument, DatabaseCatalogsDocument, DatabaseSchemaDocument, DatabasesDocument, DocumentDocument, Document_ContentsDocument, Document_FileDocument, Document_FormatDocument, Document_Format_CatalogDocument, Document_TablesDocument, DocumentCatalogDocument, DocumentCatalog_FormatDocument, DocumentCatalogsDocument, DocumentsDocument, ExportDocument, ExportWithInsightIdDocument, FeedItemDocument, FeedItem_ActionDocument, FeedItem_DataDocument, FeedItemsDocument, FileDocument, FileMetaDocument, FileUrlsDocument, FindFitTierDocument, FolderDocument, FoldersDocument, GetCapabilityDocument, GetDevAccessTokenDocument, GetLimitDocument, GetRemainingDocument, GetTokenUsageByModelDocument, GetTokenUsageHistoryDocument, GetTokenUsageStatusDocument, UsageWindowsStatusTypeFragmentDoc, GetTokenUsageStatus_WindowsDocument, GetTokenUsageStatus_Windows_DayDocument, GetTokenUsageStatus_Windows_FiveHourDocument, GetTokenUsageStatus_Windows_WeekDocument, GetUsageDocument, InsightDocument, Insight_ChatDocument, Insight_ReportMembersDocument, Insight_ReportsDocument, InsightsDocument, IntegrationDocument, Integration_ProviderDocument, Integration_Provider_CatalogDocument, IntegrationCatalogDocument, IntegrationCatalog_ProviderDocument, IntegrationCatalogToolsDocument, IntegrationCatalogsDocument, IntegrationsDocument, InterpretationsDocument, NotificationDocument, NotificationsDocument, NotificationsByReferenceDocument, PrivacyStatsDocument, PulseAppSummaryDocument, PulseEventDocument, PulseEvent_IntegrationDocument, PulseEvent_Integration_ProviderDocument, PulseEventsDocument, PulseTriggerSettingsDocument, QueryDocument, QueryWithInsightIdDocument, QueryWithMessageIdDocument, ReportDocument, Report_InsightsDocument, Report_LayoutDocument, ReportsDocument, SearchDocument, TableDocument, Table_DatabaseDocument, Table_Database_EngineDocument, Table_DocumentDocument, Table_Document_ContentsDocument, Table_Document_FileDocument, Table_Document_FormatDocument, Table_FromRelationsDocument, Table_ToRelationsDocument, TablesDocument, UserSkillFileDocument, UserSkillFilesDocument, UserSkillFolderDocument, UserSkillFoldersDocument, WorkspaceDeletionScheduleDocument, McpAuthUpdatesDocument, SendMessageStreamDocument, TokenUsageUpdatesDocument } from './chunk-MCS45C4J.js';
|
|
6
6
|
import { __commonJS, __toESM } from './chunk-5WRI5ZAA.js';
|
|
7
7
|
|
|
8
8
|
// ../../node_modules/.pnpm/dexie@4.3.0/node_modules/dexie/dist/dexie.js
|
|
@@ -6996,7 +6996,7 @@ function createWsTransport(options) {
|
|
|
6996
6996
|
}
|
|
6997
6997
|
|
|
6998
6998
|
// src/_generated_store.ts
|
|
6999
|
-
var SCHEMA_HASH = "
|
|
6999
|
+
var SCHEMA_HASH = "af30ecb1b8024d35";
|
|
7000
7000
|
var DB_ENTITY_SCHEMA = {
|
|
7001
7001
|
actions: "id",
|
|
7002
7002
|
agents: "id",
|
|
@@ -7014,7 +7014,15 @@ var DB_ENTITY_SCHEMA = {
|
|
|
7014
7014
|
documentContents: "id",
|
|
7015
7015
|
documentFormats: "key",
|
|
7016
7016
|
documents: "id",
|
|
7017
|
+
feedArtifactDatas: "id",
|
|
7017
7018
|
feedback: "id, &chatMessageId",
|
|
7019
|
+
feedDatabaseDatas: "id",
|
|
7020
|
+
feedDocumentDatas: "id",
|
|
7021
|
+
feedIntegrationDatas: "id",
|
|
7022
|
+
feedItemGenerateds: "id",
|
|
7023
|
+
feedItems: "id",
|
|
7024
|
+
feedPulseDatas: "id",
|
|
7025
|
+
feedSendMessageActions: "id",
|
|
7018
7026
|
files: "id",
|
|
7019
7027
|
folders: "id",
|
|
7020
7028
|
inferenceRequestAudits: "id",
|
|
@@ -7033,7 +7041,6 @@ var DB_ENTITY_SCHEMA = {
|
|
|
7033
7041
|
notifications: "id",
|
|
7034
7042
|
pulseAppSummaryModels: "integrationId",
|
|
7035
7043
|
pulseEvents: "id",
|
|
7036
|
-
pulseEventStatsModels: "id",
|
|
7037
7044
|
pulseTriggerSettingModels: "[integrationId+slug]",
|
|
7038
7045
|
relations: "id",
|
|
7039
7046
|
reportMembers: "[reportId+insightId]",
|
|
@@ -7066,7 +7073,15 @@ var TYPENAME_TO_TABLE = {
|
|
|
7066
7073
|
DocumentCatalog: "documentCatalogs",
|
|
7067
7074
|
DocumentContent: "documentContents",
|
|
7068
7075
|
DocumentFormat: "documentFormats",
|
|
7076
|
+
FeedArtifactData: "feedArtifactDatas",
|
|
7069
7077
|
Feedback: "feedback",
|
|
7078
|
+
FeedDatabaseData: "feedDatabaseDatas",
|
|
7079
|
+
FeedDocumentData: "feedDocumentDatas",
|
|
7080
|
+
FeedIntegrationData: "feedIntegrationDatas",
|
|
7081
|
+
FeedItem: "feedItems",
|
|
7082
|
+
FeedItemGenerated: "feedItemGenerateds",
|
|
7083
|
+
FeedPulseData: "feedPulseDatas",
|
|
7084
|
+
FeedSendMessageAction: "feedSendMessageActions",
|
|
7070
7085
|
File: "files",
|
|
7071
7086
|
Folder: "folders",
|
|
7072
7087
|
InferenceRequestAudit: "inferenceRequestAudits",
|
|
@@ -7085,7 +7100,6 @@ var TYPENAME_TO_TABLE = {
|
|
|
7085
7100
|
Notification: "notifications",
|
|
7086
7101
|
PulseAppSummaryModel: "pulseAppSummaryModels",
|
|
7087
7102
|
PulseEvent: "pulseEvents",
|
|
7088
|
-
PulseEventStatsModel: "pulseEventStatsModels",
|
|
7089
7103
|
PulseTriggerSettingModel: "pulseTriggerSettingModels",
|
|
7090
7104
|
Relation: "relations",
|
|
7091
7105
|
Report: "reports",
|
|
@@ -7118,7 +7132,15 @@ var TABLE_TO_TYPENAME = {
|
|
|
7118
7132
|
documentContents: "DocumentContent",
|
|
7119
7133
|
documentFormats: "DocumentFormat",
|
|
7120
7134
|
documents: "Document",
|
|
7135
|
+
feedArtifactDatas: "FeedArtifactData",
|
|
7121
7136
|
feedback: "Feedback",
|
|
7137
|
+
feedDatabaseDatas: "FeedDatabaseData",
|
|
7138
|
+
feedDocumentDatas: "FeedDocumentData",
|
|
7139
|
+
feedIntegrationDatas: "FeedIntegrationData",
|
|
7140
|
+
feedItemGenerateds: "FeedItemGenerated",
|
|
7141
|
+
feedItems: "FeedItem",
|
|
7142
|
+
feedPulseDatas: "FeedPulseData",
|
|
7143
|
+
feedSendMessageActions: "FeedSendMessageAction",
|
|
7122
7144
|
files: "File",
|
|
7123
7145
|
folders: "Folder",
|
|
7124
7146
|
inferenceRequestAudits: "InferenceRequestAudit",
|
|
@@ -7137,7 +7159,6 @@ var TABLE_TO_TYPENAME = {
|
|
|
7137
7159
|
notifications: "Notification",
|
|
7138
7160
|
pulseAppSummaryModels: "PulseAppSummaryModel",
|
|
7139
7161
|
pulseEvents: "PulseEvent",
|
|
7140
|
-
pulseEventStatsModels: "PulseEventStatsModel",
|
|
7141
7162
|
pulseTriggerSettingModels: "PulseTriggerSettingModel",
|
|
7142
7163
|
relations: "Relation",
|
|
7143
7164
|
reportMembers: "ReportMember",
|
|
@@ -8829,6 +8850,38 @@ function inferCascadeRelationFields(parentEntityType, childEntityType) {
|
|
|
8829
8850
|
return [...fields];
|
|
8830
8851
|
}
|
|
8831
8852
|
|
|
8853
|
+
// src/store/relation-heuristic.ts
|
|
8854
|
+
function toFieldArray(value) {
|
|
8855
|
+
return Array.isArray(value) ? value : [value];
|
|
8856
|
+
}
|
|
8857
|
+
function areFieldsEqual(left, right) {
|
|
8858
|
+
return left.length === right.length && left.every((field, index) => field === right[index]);
|
|
8859
|
+
}
|
|
8860
|
+
function upperFirst(value) {
|
|
8861
|
+
return value.length > 0 ? value[0].toUpperCase() + value.slice(1) : value;
|
|
8862
|
+
}
|
|
8863
|
+
function inferSourceFields(parentEntity, relationField, targetFields) {
|
|
8864
|
+
const sourceFields = targetFields.map((field) => `${relationField}${upperFirst(field)}`);
|
|
8865
|
+
return sourceFields.every((field) => Object.prototype.hasOwnProperty.call(parentEntity, field)) ? sourceFields : void 0;
|
|
8866
|
+
}
|
|
8867
|
+
async function resolveRelationByReference(db, params) {
|
|
8868
|
+
const targetFields = toFieldArray(getPrimaryKeyField(params.targetTable));
|
|
8869
|
+
const sourceFields = inferSourceFields(params.parentEntity, params.relationField, targetFields);
|
|
8870
|
+
if (!sourceFields) {
|
|
8871
|
+
return void 0;
|
|
8872
|
+
}
|
|
8873
|
+
const sourceValues = sourceFields.map((field) => params.parentEntity[field]);
|
|
8874
|
+
if (sourceValues.some((value) => value === void 0 || value === null || value === "")) {
|
|
8875
|
+
return void 0;
|
|
8876
|
+
}
|
|
8877
|
+
const primaryKeyFields = toFieldArray(getPrimaryKeyField(params.targetTable));
|
|
8878
|
+
const relation = areFieldsEqual(targetFields, primaryKeyFields) ? await db.table(params.targetTable).get(targetFields.length === 1 ? String(sourceValues[0]) : sourceValues.map((value) => String(value))) : await db.table(params.targetTable).filter((record) => {
|
|
8879
|
+
const candidate = record;
|
|
8880
|
+
return targetFields.every((field, index) => candidate[field] === sourceValues[index]);
|
|
8881
|
+
}).first();
|
|
8882
|
+
return relation && typeof relation === "object" ? relation : void 0;
|
|
8883
|
+
}
|
|
8884
|
+
|
|
8832
8885
|
// src/store/sync-engine.ts
|
|
8833
8886
|
var SyncEngine = class {
|
|
8834
8887
|
_db;
|
|
@@ -9081,7 +9134,12 @@ var SyncEngine = class {
|
|
|
9081
9134
|
const existing = await table.get(pk).catch(() => void 0);
|
|
9082
9135
|
const { entities, nestedConnections } = normalize({ entity: record }, "entity");
|
|
9083
9136
|
const activeSubscriptions = this._getActiveSubscriptionsForEntityType(tableName);
|
|
9084
|
-
const
|
|
9137
|
+
const materializationRecord = existing ? mergeEntityRecord(existing, record) : record;
|
|
9138
|
+
const materializedRelations = await this._materializeWatchedRelations(
|
|
9139
|
+
tableName,
|
|
9140
|
+
materializationRecord,
|
|
9141
|
+
activeSubscriptions
|
|
9142
|
+
);
|
|
9085
9143
|
if (entities.size > 0) {
|
|
9086
9144
|
await this._queryExecutor.writeEntities(entities);
|
|
9087
9145
|
} else if (existing) {
|
|
@@ -9157,7 +9215,7 @@ var SyncEngine = class {
|
|
|
9157
9215
|
_getActiveSubscriptionsForEntityType(entityType) {
|
|
9158
9216
|
return Array.from(this._subscriptionToQuery.values()).filter((sub) => sub.entityType === entityType);
|
|
9159
9217
|
}
|
|
9160
|
-
_materializeWatchedRelations(parentEntityType, parentRecord, subscriptions) {
|
|
9218
|
+
async _materializeWatchedRelations(parentEntityType, parentRecord, subscriptions) {
|
|
9161
9219
|
const relationMetadata = /* @__PURE__ */ new Map();
|
|
9162
9220
|
for (const sub of subscriptions) {
|
|
9163
9221
|
for (const relation of sub.relationMetadata ?? []) {
|
|
@@ -9169,13 +9227,10 @@ var SyncEngine = class {
|
|
|
9169
9227
|
const nestedConnections = /* @__PURE__ */ new Map();
|
|
9170
9228
|
const parentId = primaryKeyToString(parentEntityType, parentRecord);
|
|
9171
9229
|
for (const relation of relationMetadata.values()) {
|
|
9172
|
-
if (!Object.prototype.hasOwnProperty.call(parentRecord, relation.fieldName)) {
|
|
9173
|
-
states.set(relation.fieldName, { status: "missing" });
|
|
9174
|
-
continue;
|
|
9175
|
-
}
|
|
9176
|
-
const value = parentRecord[relation.fieldName];
|
|
9177
9230
|
const queryKey = `${parentEntityType}.${parentId}.${relation.fieldName}`;
|
|
9178
|
-
|
|
9231
|
+
const value = parentRecord[relation.fieldName];
|
|
9232
|
+
const hasRelationValue = Object.prototype.hasOwnProperty.call(parentRecord, relation.fieldName);
|
|
9233
|
+
if (hasRelationValue && value === null) {
|
|
9179
9234
|
nestedConnections.set(queryKey, {
|
|
9180
9235
|
entityIds: [],
|
|
9181
9236
|
entityType: relation.entityType,
|
|
@@ -9185,6 +9240,21 @@ var SyncEngine = class {
|
|
|
9185
9240
|
states.set(relation.fieldName, { status: "resolved" });
|
|
9186
9241
|
continue;
|
|
9187
9242
|
}
|
|
9243
|
+
if (!hasRelationValue) {
|
|
9244
|
+
const resolvedRelation = await this._resolveStoredRelationFallback(parentRecord, relation);
|
|
9245
|
+
if (resolvedRelation) {
|
|
9246
|
+
nestedConnections.set(queryKey, {
|
|
9247
|
+
entityIds: [primaryKeyToString(relation.entityType, resolvedRelation)],
|
|
9248
|
+
entityType: relation.entityType,
|
|
9249
|
+
fetchedAt: Date.now(),
|
|
9250
|
+
key: queryKey
|
|
9251
|
+
});
|
|
9252
|
+
states.set(relation.fieldName, { status: "resolved" });
|
|
9253
|
+
continue;
|
|
9254
|
+
}
|
|
9255
|
+
states.set(relation.fieldName, { status: "missing" });
|
|
9256
|
+
continue;
|
|
9257
|
+
}
|
|
9188
9258
|
if (relation.isConnection) {
|
|
9189
9259
|
states.set(relation.fieldName, { status: "unsupported" });
|
|
9190
9260
|
continue;
|
|
@@ -9248,6 +9318,17 @@ var SyncEngine = class {
|
|
|
9248
9318
|
relation
|
|
9249
9319
|
);
|
|
9250
9320
|
if (relation.hasNestedIncludes || !this._canMaterializeRelationRecord(childRecord, relation)) {
|
|
9321
|
+
const resolvedRelation = await this._resolveStoredRelationFallback(parentRecord, relation);
|
|
9322
|
+
if (resolvedRelation) {
|
|
9323
|
+
nestedConnections.set(queryKey, {
|
|
9324
|
+
entityIds: [primaryKeyToString(relation.entityType, resolvedRelation)],
|
|
9325
|
+
entityType: relation.entityType,
|
|
9326
|
+
fetchedAt: Date.now(),
|
|
9327
|
+
key: queryKey
|
|
9328
|
+
});
|
|
9329
|
+
states.set(relation.fieldName, { status: "resolved" });
|
|
9330
|
+
continue;
|
|
9331
|
+
}
|
|
9251
9332
|
states.set(relation.fieldName, { status: "unsupported" });
|
|
9252
9333
|
continue;
|
|
9253
9334
|
}
|
|
@@ -9262,6 +9343,13 @@ var SyncEngine = class {
|
|
|
9262
9343
|
}
|
|
9263
9344
|
return { entities, nestedConnections, states };
|
|
9264
9345
|
}
|
|
9346
|
+
async _resolveStoredRelationFallback(parentRecord, relation) {
|
|
9347
|
+
return resolveRelationByReference(this._db, {
|
|
9348
|
+
parentEntity: parentRecord,
|
|
9349
|
+
relationField: relation.fieldName,
|
|
9350
|
+
targetTable: relation.entityType
|
|
9351
|
+
});
|
|
9352
|
+
}
|
|
9265
9353
|
_subscriptionNeedsRevalidation(subscription, relationStates) {
|
|
9266
9354
|
if (!subscription.relationMetadata || subscription.relationMetadata.length === 0) {
|
|
9267
9355
|
return false;
|
|
@@ -9496,7 +9584,7 @@ function createLazySyncEngine(httpTransport, sseUrl, syncPolicyUrl, getToken, ge
|
|
|
9496
9584
|
var DEFAULT_UPLOAD_CONTENT_TYPE = "application/octet-stream";
|
|
9497
9585
|
var AZURE_BLOCK_BLOB_TYPE = "BlockBlob";
|
|
9498
9586
|
async function uploadFile(request, getToken, file, name, options) {
|
|
9499
|
-
const { GenerateUploadUriDocument: GenerateUploadUriDocument2 } = await import('./_generated_documents-
|
|
9587
|
+
const { GenerateUploadUriDocument: GenerateUploadUriDocument2 } = await import('./_generated_documents-4D2QSLVK.js');
|
|
9500
9588
|
const key = `upload_${Date.now()}`;
|
|
9501
9589
|
const response = await request(
|
|
9502
9590
|
GenerateUploadUriDocument2,
|
|
@@ -9773,34 +9861,36 @@ var DvinaModel = class extends Request {
|
|
|
9773
9861
|
};
|
|
9774
9862
|
|
|
9775
9863
|
// src/store/reconstruct.ts
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
const
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9864
|
+
function normalizeRelationIdentifier(value) {
|
|
9865
|
+
return value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
9866
|
+
}
|
|
9867
|
+
function inferTargetTables(fieldName) {
|
|
9868
|
+
const normalizedFieldName = normalizeRelationIdentifier(fieldName);
|
|
9869
|
+
return Object.entries(TABLE_TO_TYPENAME).filter(([tableName, typeName]) => {
|
|
9870
|
+
const normalizedTableName = normalizeRelationIdentifier(tableName);
|
|
9871
|
+
const normalizedTypeName = normalizeRelationIdentifier(typeName);
|
|
9872
|
+
return normalizedTypeName === normalizedFieldName || normalizedTypeName.endsWith(normalizedFieldName) || normalizedTableName === normalizedFieldName || normalizedTableName === `${normalizedFieldName}s`;
|
|
9873
|
+
}).map(([tableName]) => tableName);
|
|
9874
|
+
}
|
|
9875
|
+
async function resolveSingleRelationFallback(db, parentTable, parentEntity, inc) {
|
|
9876
|
+
const targetTables = inc.syncMetadata?.entityType ? [inc.syncMetadata.entityType] : inferTargetTables(inc.fieldName);
|
|
9877
|
+
if (targetTables.length === 0) {
|
|
9878
|
+
return void 0;
|
|
9879
|
+
}
|
|
9880
|
+
for (const targetTable of targetTables) {
|
|
9881
|
+
const relation = await resolveRelationByReference(db, {
|
|
9882
|
+
parentEntity,
|
|
9883
|
+
relationField: inc.fieldName,
|
|
9884
|
+
targetTable
|
|
9885
|
+
});
|
|
9886
|
+
if (relation) {
|
|
9797
9887
|
return {
|
|
9798
|
-
|
|
9799
|
-
|
|
9888
|
+
entity: relation,
|
|
9889
|
+
tableName: targetTable
|
|
9800
9890
|
};
|
|
9801
9891
|
}
|
|
9802
9892
|
}
|
|
9803
|
-
return;
|
|
9893
|
+
return void 0;
|
|
9804
9894
|
}
|
|
9805
9895
|
async function reconstructEntity(db, tableName, entityId, includes) {
|
|
9806
9896
|
const dexieKey = parsePrimaryKeyString(tableName, entityId);
|
|
@@ -9811,7 +9901,7 @@ async function reconstructEntity(db, tableName, entityId, includes) {
|
|
|
9811
9901
|
const connKey = `${tableName}.${entityId}.${inc.fieldName}`;
|
|
9812
9902
|
const qr = await db._queryResults.get(connKey);
|
|
9813
9903
|
if (!qr) {
|
|
9814
|
-
const fallback = inc.isConnection ? void 0 : await resolveSingleRelationFallback(db, result, inc
|
|
9904
|
+
const fallback = inc.isConnection ? void 0 : await resolveSingleRelationFallback(db, tableName, result, inc);
|
|
9815
9905
|
if (fallback) {
|
|
9816
9906
|
if (inc.children && inc.children.length > 0) {
|
|
9817
9907
|
const childId = primaryKeyToString(fallback.tableName, fallback.entity);
|
|
@@ -10640,6 +10730,150 @@ var DocumentFormat = class extends DvinaModel {
|
|
|
10640
10730
|
return new DocumentCatalogQuery(this._request, this._syncEngine, { formatKey: this._catalog?.formatKey }, this._baseUrl);
|
|
10641
10731
|
}
|
|
10642
10732
|
};
|
|
10733
|
+
var FeedArtifactData = class extends DvinaModel {
|
|
10734
|
+
artifactKind;
|
|
10735
|
+
fileId;
|
|
10736
|
+
fileName;
|
|
10737
|
+
fileType;
|
|
10738
|
+
kind;
|
|
10739
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
10740
|
+
super(request, syncEngine, baseUrl);
|
|
10741
|
+
this.artifactKind = data.artifactKind ?? void 0;
|
|
10742
|
+
this.fileId = data.fileId ?? void 0;
|
|
10743
|
+
this.fileName = data.fileName ?? void 0;
|
|
10744
|
+
this.fileType = data.fileType ?? void 0;
|
|
10745
|
+
this.kind = data.kind;
|
|
10746
|
+
}
|
|
10747
|
+
};
|
|
10748
|
+
var FeedDatabaseData = class extends DvinaModel {
|
|
10749
|
+
databaseName;
|
|
10750
|
+
databaseType;
|
|
10751
|
+
kind;
|
|
10752
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
10753
|
+
super(request, syncEngine, baseUrl);
|
|
10754
|
+
this.databaseName = data.databaseName ?? void 0;
|
|
10755
|
+
this.databaseType = data.databaseType ?? void 0;
|
|
10756
|
+
this.kind = data.kind;
|
|
10757
|
+
}
|
|
10758
|
+
};
|
|
10759
|
+
var FeedDocumentData = class extends DvinaModel {
|
|
10760
|
+
fileId;
|
|
10761
|
+
fileName;
|
|
10762
|
+
fileType;
|
|
10763
|
+
kind;
|
|
10764
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
10765
|
+
super(request, syncEngine, baseUrl);
|
|
10766
|
+
this.fileId = data.fileId ?? void 0;
|
|
10767
|
+
this.fileName = data.fileName ?? void 0;
|
|
10768
|
+
this.fileType = data.fileType ?? void 0;
|
|
10769
|
+
this.kind = data.kind;
|
|
10770
|
+
}
|
|
10771
|
+
};
|
|
10772
|
+
var FeedIntegrationData = class extends DvinaModel {
|
|
10773
|
+
integrationProviderKey;
|
|
10774
|
+
kind;
|
|
10775
|
+
status;
|
|
10776
|
+
unreadPulseCount;
|
|
10777
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
10778
|
+
super(request, syncEngine, baseUrl);
|
|
10779
|
+
this.integrationProviderKey = data.integrationProviderKey ?? void 0;
|
|
10780
|
+
this.kind = data.kind;
|
|
10781
|
+
this.status = data.status ?? void 0;
|
|
10782
|
+
this.unreadPulseCount = data.unreadPulseCount ?? void 0;
|
|
10783
|
+
}
|
|
10784
|
+
};
|
|
10785
|
+
var FeedItem = class extends DvinaModel {
|
|
10786
|
+
createdAt;
|
|
10787
|
+
id;
|
|
10788
|
+
kind;
|
|
10789
|
+
sourceRef;
|
|
10790
|
+
title;
|
|
10791
|
+
updatedAt;
|
|
10792
|
+
userId;
|
|
10793
|
+
workspaceId;
|
|
10794
|
+
data;
|
|
10795
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
10796
|
+
super(request, syncEngine, baseUrl);
|
|
10797
|
+
this.createdAt = new Date(data.createdAt);
|
|
10798
|
+
this.id = data.id;
|
|
10799
|
+
this.kind = data.kind;
|
|
10800
|
+
this.sourceRef = data.sourceRef ?? void 0;
|
|
10801
|
+
this.title = data.title;
|
|
10802
|
+
this.updatedAt = new Date(data.updatedAt);
|
|
10803
|
+
this.userId = data.userId;
|
|
10804
|
+
this.workspaceId = data.workspaceId;
|
|
10805
|
+
this.data = (() => {
|
|
10806
|
+
const value = data.data;
|
|
10807
|
+
switch (value.__typename) {
|
|
10808
|
+
case "FeedArtifactData":
|
|
10809
|
+
return new FeedArtifactData(request, value, syncEngine, baseUrl);
|
|
10810
|
+
case "FeedDatabaseData":
|
|
10811
|
+
return new FeedDatabaseData(request, value, syncEngine, baseUrl);
|
|
10812
|
+
case "FeedDocumentData":
|
|
10813
|
+
return new FeedDocumentData(request, value, syncEngine, baseUrl);
|
|
10814
|
+
case "FeedIntegrationData":
|
|
10815
|
+
return new FeedIntegrationData(request, value, syncEngine, baseUrl);
|
|
10816
|
+
case "FeedPulseData":
|
|
10817
|
+
return new FeedPulseData(request, value, syncEngine, baseUrl);
|
|
10818
|
+
default:
|
|
10819
|
+
throw new Error("Unknown FeedItemData member for FeedItem.data.");
|
|
10820
|
+
}
|
|
10821
|
+
})();
|
|
10822
|
+
}
|
|
10823
|
+
/** Query the action relation for this FeedItem. Call .fetch() or .watch() to execute. */
|
|
10824
|
+
action(variables) {
|
|
10825
|
+
return new FeedItem_ActionQuery(this._request, this._syncEngine, { ...variables, id: this.id }, this._baseUrl);
|
|
10826
|
+
}
|
|
10827
|
+
};
|
|
10828
|
+
var FeedItemGenerated = class extends DvinaModel {
|
|
10829
|
+
action;
|
|
10830
|
+
actionType;
|
|
10831
|
+
createdAt;
|
|
10832
|
+
data;
|
|
10833
|
+
id;
|
|
10834
|
+
kind;
|
|
10835
|
+
sourceRef;
|
|
10836
|
+
title;
|
|
10837
|
+
updatedAt;
|
|
10838
|
+
userId;
|
|
10839
|
+
workspaceId;
|
|
10840
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
10841
|
+
super(request, syncEngine, baseUrl);
|
|
10842
|
+
this.action = data.action ?? void 0;
|
|
10843
|
+
this.actionType = data.actionType ?? void 0;
|
|
10844
|
+
this.createdAt = new Date(data.createdAt);
|
|
10845
|
+
this.data = data.data;
|
|
10846
|
+
this.id = data.id;
|
|
10847
|
+
this.kind = data.kind;
|
|
10848
|
+
this.sourceRef = data.sourceRef ?? void 0;
|
|
10849
|
+
this.title = data.title;
|
|
10850
|
+
this.updatedAt = new Date(data.updatedAt);
|
|
10851
|
+
this.userId = data.userId;
|
|
10852
|
+
this.workspaceId = data.workspaceId;
|
|
10853
|
+
}
|
|
10854
|
+
};
|
|
10855
|
+
var FeedPulseData = class extends DvinaModel {
|
|
10856
|
+
kind;
|
|
10857
|
+
priority;
|
|
10858
|
+
providerKey;
|
|
10859
|
+
summary;
|
|
10860
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
10861
|
+
super(request, syncEngine, baseUrl);
|
|
10862
|
+
this.kind = data.kind;
|
|
10863
|
+
this.priority = data.priority ?? void 0;
|
|
10864
|
+
this.providerKey = data.providerKey ?? void 0;
|
|
10865
|
+
this.summary = data.summary ?? void 0;
|
|
10866
|
+
}
|
|
10867
|
+
};
|
|
10868
|
+
var FeedSendMessageAction = class extends DvinaModel {
|
|
10869
|
+
prompt;
|
|
10870
|
+
type;
|
|
10871
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
10872
|
+
super(request, syncEngine, baseUrl);
|
|
10873
|
+
this.prompt = data.prompt;
|
|
10874
|
+
this.type = data.type;
|
|
10875
|
+
}
|
|
10876
|
+
};
|
|
10643
10877
|
var Feedback = class extends DvinaModel {
|
|
10644
10878
|
chatMessageId;
|
|
10645
10879
|
comment;
|
|
@@ -10837,6 +11071,7 @@ var Integration = class extends DvinaModel {
|
|
|
10837
11071
|
id;
|
|
10838
11072
|
providerKey;
|
|
10839
11073
|
status;
|
|
11074
|
+
unreadPulseCount;
|
|
10840
11075
|
updatedAt;
|
|
10841
11076
|
constructor(request, data, syncEngine, baseUrl) {
|
|
10842
11077
|
super(request, syncEngine, baseUrl);
|
|
@@ -10845,6 +11080,7 @@ var Integration = class extends DvinaModel {
|
|
|
10845
11080
|
this.id = data.id;
|
|
10846
11081
|
this.providerKey = data.providerKey;
|
|
10847
11082
|
this.status = data.status;
|
|
11083
|
+
this.unreadPulseCount = data.unreadPulseCount;
|
|
10848
11084
|
this.updatedAt = new Date(data.updatedAt);
|
|
10849
11085
|
}
|
|
10850
11086
|
/** Query the provider relation for this Integration. Call .fetch() or .watch() to execute. */
|
|
@@ -11139,10 +11375,8 @@ var PulseAppSummaryModel = class extends DvinaModel {
|
|
|
11139
11375
|
}
|
|
11140
11376
|
};
|
|
11141
11377
|
var PulseEvent = class extends DvinaModel {
|
|
11142
|
-
acknowledgedAt;
|
|
11143
11378
|
actions;
|
|
11144
11379
|
createdAt;
|
|
11145
|
-
dedupeKey;
|
|
11146
11380
|
dismissedAt;
|
|
11147
11381
|
id;
|
|
11148
11382
|
integrationId;
|
|
@@ -11155,18 +11389,13 @@ var PulseEvent = class extends DvinaModel {
|
|
|
11155
11389
|
remoteLogId;
|
|
11156
11390
|
remoteTriggerId;
|
|
11157
11391
|
resolvedAt;
|
|
11158
|
-
seenAt;
|
|
11159
|
-
status;
|
|
11160
|
-
summary;
|
|
11161
11392
|
title;
|
|
11162
11393
|
triggerSlug;
|
|
11163
11394
|
updatedAt;
|
|
11164
11395
|
constructor(request, data, syncEngine, baseUrl) {
|
|
11165
11396
|
super(request, syncEngine, baseUrl);
|
|
11166
|
-
this.acknowledgedAt = data.acknowledgedAt ? new Date(data.acknowledgedAt) : void 0;
|
|
11167
11397
|
this.actions = data.actions ?? void 0;
|
|
11168
11398
|
this.createdAt = new Date(data.createdAt);
|
|
11169
|
-
this.dedupeKey = data.dedupeKey ?? void 0;
|
|
11170
11399
|
this.dismissedAt = data.dismissedAt ? new Date(data.dismissedAt) : void 0;
|
|
11171
11400
|
this.id = data.id;
|
|
11172
11401
|
this.integrationId = data.integrationId;
|
|
@@ -11179,9 +11408,6 @@ var PulseEvent = class extends DvinaModel {
|
|
|
11179
11408
|
this.remoteLogId = data.remoteLogId ?? void 0;
|
|
11180
11409
|
this.remoteTriggerId = data.remoteTriggerId ?? void 0;
|
|
11181
11410
|
this.resolvedAt = data.resolvedAt ? new Date(data.resolvedAt) : void 0;
|
|
11182
|
-
this.seenAt = data.seenAt ? new Date(data.seenAt) : void 0;
|
|
11183
|
-
this.status = data.status;
|
|
11184
|
-
this.summary = data.summary ?? void 0;
|
|
11185
11411
|
this.title = data.title;
|
|
11186
11412
|
this.triggerSlug = data.triggerSlug;
|
|
11187
11413
|
this.updatedAt = new Date(data.updatedAt);
|
|
@@ -11191,17 +11417,6 @@ var PulseEvent = class extends DvinaModel {
|
|
|
11191
11417
|
return new PulseEvent_IntegrationQuery(this._request, this._syncEngine, { ...variables, id: this.id }, this._baseUrl);
|
|
11192
11418
|
}
|
|
11193
11419
|
};
|
|
11194
|
-
var PulseEventStatsModel = class extends DvinaModel {
|
|
11195
|
-
highPriorityCount;
|
|
11196
|
-
needsActionCount;
|
|
11197
|
-
unreadCount;
|
|
11198
|
-
constructor(request, data, syncEngine, baseUrl) {
|
|
11199
|
-
super(request, syncEngine, baseUrl);
|
|
11200
|
-
this.highPriorityCount = data.highPriorityCount;
|
|
11201
|
-
this.needsActionCount = data.needsActionCount;
|
|
11202
|
-
this.unreadCount = data.unreadCount;
|
|
11203
|
-
}
|
|
11204
|
-
};
|
|
11205
11420
|
var PulseTriggerSettingModel = class extends DvinaModel {
|
|
11206
11421
|
integrationId;
|
|
11207
11422
|
isEnabled;
|
|
@@ -11346,6 +11561,19 @@ var StreamMessageOutput = class extends DvinaModel {
|
|
|
11346
11561
|
this.contents = Array.isArray(data.contents) ? data.contents.filter(Boolean).map((item) => new StreamMessageContentOutput(request, item, syncEngine, baseUrl)) : [];
|
|
11347
11562
|
}
|
|
11348
11563
|
};
|
|
11564
|
+
var StreamableUiDeltaEventOutput = class extends DvinaModel {
|
|
11565
|
+
delta;
|
|
11566
|
+
index;
|
|
11567
|
+
toolCallId;
|
|
11568
|
+
type;
|
|
11569
|
+
constructor(request, data, syncEngine, baseUrl) {
|
|
11570
|
+
super(request, syncEngine, baseUrl);
|
|
11571
|
+
this.delta = data.delta;
|
|
11572
|
+
this.index = data.index;
|
|
11573
|
+
this.toolCallId = data.toolCallId;
|
|
11574
|
+
this.type = data.type;
|
|
11575
|
+
}
|
|
11576
|
+
};
|
|
11349
11577
|
var SyncEvent = class extends DvinaModel {
|
|
11350
11578
|
createdAt;
|
|
11351
11579
|
entityId;
|
|
@@ -11758,6 +11986,17 @@ var DocumentConnection = class extends Connection {
|
|
|
11758
11986
|
);
|
|
11759
11987
|
}
|
|
11760
11988
|
};
|
|
11989
|
+
var FeedConnection = class extends Connection {
|
|
11990
|
+
constructor(request, fetch2, data, syncEngine, baseUrl) {
|
|
11991
|
+
super(
|
|
11992
|
+
request,
|
|
11993
|
+
fetch2,
|
|
11994
|
+
data.nodes?.map((node) => new FeedItem(request, node, syncEngine, baseUrl)) ?? [],
|
|
11995
|
+
new PageInfo(data.pageInfo),
|
|
11996
|
+
data.totalCount ?? void 0
|
|
11997
|
+
);
|
|
11998
|
+
}
|
|
11999
|
+
};
|
|
11761
12000
|
var FolderConnection = class extends Connection {
|
|
11762
12001
|
constructor(request, fetch2, data, syncEngine, baseUrl) {
|
|
11763
12002
|
super(
|
|
@@ -12353,6 +12592,48 @@ var DocumentCatalogSubBuilder = class {
|
|
|
12353
12592
|
return this;
|
|
12354
12593
|
}
|
|
12355
12594
|
};
|
|
12595
|
+
var FeedItemSubBuilder = class {
|
|
12596
|
+
/** @internal */
|
|
12597
|
+
_includes = [];
|
|
12598
|
+
/** Include action in the parent query. */
|
|
12599
|
+
action(variables) {
|
|
12600
|
+
const info = extractIncludeInfo(FeedItem_ActionDocument, "action", ["id"]);
|
|
12601
|
+
this._includes.push({
|
|
12602
|
+
fieldName: "action",
|
|
12603
|
+
fragmentDoc: FeedSendMessageActionFragmentDoc,
|
|
12604
|
+
variables,
|
|
12605
|
+
isConnection: false,
|
|
12606
|
+
isList: false,
|
|
12607
|
+
variableDefinitions: info.variableDefinitions,
|
|
12608
|
+
fieldArguments: info.fieldArguments,
|
|
12609
|
+
syncMetadata: {
|
|
12610
|
+
entityType: "feedSendMessageActions",
|
|
12611
|
+
requiredFields: ["prompt", "type"]
|
|
12612
|
+
},
|
|
12613
|
+
modelFactory: (req, data, se, bu) => new FeedSendMessageAction(req, data, se, bu)
|
|
12614
|
+
});
|
|
12615
|
+
return this;
|
|
12616
|
+
}
|
|
12617
|
+
/** Include data in the parent query. */
|
|
12618
|
+
data(variables) {
|
|
12619
|
+
const info = extractIncludeInfo(FeedItem_DataDocument, "data", ["id"]);
|
|
12620
|
+
this._includes.push({
|
|
12621
|
+
fieldName: "data",
|
|
12622
|
+
fragmentDoc: FeedArtifactDataFragmentDoc,
|
|
12623
|
+
variables,
|
|
12624
|
+
isConnection: false,
|
|
12625
|
+
isList: true,
|
|
12626
|
+
variableDefinitions: info.variableDefinitions,
|
|
12627
|
+
fieldArguments: info.fieldArguments,
|
|
12628
|
+
syncMetadata: {
|
|
12629
|
+
entityType: "feedArtifactDatas",
|
|
12630
|
+
requiredFields: ["kind"]
|
|
12631
|
+
},
|
|
12632
|
+
modelFactory: (req, data, se, bu) => new FeedArtifactData(req, data, se, bu)
|
|
12633
|
+
});
|
|
12634
|
+
return this;
|
|
12635
|
+
}
|
|
12636
|
+
};
|
|
12356
12637
|
var InsightSubBuilder = class {
|
|
12357
12638
|
/** @internal */
|
|
12358
12639
|
_includes = [];
|
|
@@ -12497,7 +12778,7 @@ var PulseEventSubBuilder = class {
|
|
|
12497
12778
|
fieldArguments: info.fieldArguments,
|
|
12498
12779
|
syncMetadata: {
|
|
12499
12780
|
entityType: "integrations",
|
|
12500
|
-
requiredFields: ["createdAt", "id", "providerKey", "status", "updatedAt"]
|
|
12781
|
+
requiredFields: ["createdAt", "id", "providerKey", "status", "unreadPulseCount", "updatedAt"]
|
|
12501
12782
|
},
|
|
12502
12783
|
children,
|
|
12503
12784
|
modelFactory: (req, data, se, bu) => new Integration(req, data, se, bu)
|
|
@@ -12649,13 +12930,6 @@ var TableSubBuilder = class {
|
|
|
12649
12930
|
return this;
|
|
12650
12931
|
}
|
|
12651
12932
|
};
|
|
12652
|
-
var AcknowledgePulseEventMutation = class extends Request {
|
|
12653
|
-
async fetch(variables, options) {
|
|
12654
|
-
const response = await this._syncEngine.mutate(AcknowledgePulseEventDocument, variables, MUTATION_CACHE_RULES["acknowledgePulseEvent"]);
|
|
12655
|
-
const data = response.acknowledgePulseEvent;
|
|
12656
|
-
return new PulseEvent(this._request, data, this._syncEngine, this._baseUrl);
|
|
12657
|
-
}
|
|
12658
|
-
};
|
|
12659
12933
|
var AddInsightToReportMutation = class extends Request {
|
|
12660
12934
|
async fetch(variables, options) {
|
|
12661
12935
|
const response = await this._syncEngine.mutate(AddInsightToReportDocument, variables, MUTATION_CACHE_RULES["addInsightToReport"]);
|
|
@@ -12682,6 +12956,12 @@ var ConnectIntegrationMutation = class extends Request {
|
|
|
12682
12956
|
return new CreateIntegrationOutput(this._request, data, this._syncEngine, this._baseUrl);
|
|
12683
12957
|
}
|
|
12684
12958
|
};
|
|
12959
|
+
var ConsumePulseEventsMutation = class extends Request {
|
|
12960
|
+
async fetch(variables) {
|
|
12961
|
+
const response = await this._syncEngine.mutate(ConsumePulseEventsDocument, variables, MUTATION_CACHE_RULES["consumePulseEvents"]);
|
|
12962
|
+
return response.consumePulseEvents;
|
|
12963
|
+
}
|
|
12964
|
+
};
|
|
12685
12965
|
var ContinueImportedChatMutation = class extends Request {
|
|
12686
12966
|
async fetch(variables) {
|
|
12687
12967
|
const response = await this._syncEngine.mutate(ContinueImportedChatDocument, variables, MUTATION_CACHE_RULES["continueImportedChat"]);
|
|
@@ -12895,13 +13175,6 @@ var GenerateUploadUriMutation = class extends Request {
|
|
|
12895
13175
|
return new FileModel(this._request, data, this._syncEngine, this._baseUrl);
|
|
12896
13176
|
}
|
|
12897
13177
|
};
|
|
12898
|
-
var MarkPulseEventSeenMutation = class extends Request {
|
|
12899
|
-
async fetch(variables, options) {
|
|
12900
|
-
const response = await this._syncEngine.mutate(MarkPulseEventSeenDocument, variables, MUTATION_CACHE_RULES["markPulseEventSeen"]);
|
|
12901
|
-
const data = response.markPulseEventSeen;
|
|
12902
|
-
return new PulseEvent(this._request, data, this._syncEngine, this._baseUrl);
|
|
12903
|
-
}
|
|
12904
|
-
};
|
|
12905
13178
|
var PreviewChatImportMutation = class extends Request {
|
|
12906
13179
|
async fetch(variables, options) {
|
|
12907
13180
|
const response = await this._syncEngine.mutate(PreviewChatImportDocument, variables, MUTATION_CACHE_RULES["previewChatImport"]);
|
|
@@ -15669,6 +15942,237 @@ var ExportWithInsightIdQuery = class extends Request {
|
|
|
15669
15942
|
return response.exportWithInsightId;
|
|
15670
15943
|
}
|
|
15671
15944
|
};
|
|
15945
|
+
var FeedItemQuery = class extends Request {
|
|
15946
|
+
_variables;
|
|
15947
|
+
_includes = [];
|
|
15948
|
+
constructor(request, syncEngine, variables = {}, baseUrl) {
|
|
15949
|
+
super(request, syncEngine, void 0, baseUrl);
|
|
15950
|
+
this._variables = variables;
|
|
15951
|
+
}
|
|
15952
|
+
async fetch(options) {
|
|
15953
|
+
const variables = this._variables;
|
|
15954
|
+
const { document: queryDoc, variables: mergedVars } = buildSmartQuery(FeedItemDocument, "feedItem", this._includes, variables);
|
|
15955
|
+
const response = await this._syncEngine.query(queryDoc, mergedVars, "feedItem");
|
|
15956
|
+
const data = response.feedItem;
|
|
15957
|
+
if (!data) return void 0;
|
|
15958
|
+
const instance = new FeedItem(this._request, data, this._syncEngine, this._baseUrl);
|
|
15959
|
+
if (this._includes.length > 0) {
|
|
15960
|
+
hydrateIncludes(instance, data, this._includes, this._request, this._syncEngine, this._baseUrl);
|
|
15961
|
+
}
|
|
15962
|
+
return instance;
|
|
15963
|
+
}
|
|
15964
|
+
watch(options) {
|
|
15965
|
+
const variables = this._variables;
|
|
15966
|
+
const includes = this._includes;
|
|
15967
|
+
const { document: queryDoc, variables: mergedVars } = buildSmartQuery(FeedItemDocument, "feedItem", includes, variables);
|
|
15968
|
+
const raw = this._syncEngine.watch(
|
|
15969
|
+
queryDoc,
|
|
15970
|
+
mergedVars,
|
|
15971
|
+
"feedItem",
|
|
15972
|
+
async (db) => {
|
|
15973
|
+
const vars = variables;
|
|
15974
|
+
const pkField = getPrimaryKeyField("feedItems");
|
|
15975
|
+
const entityKey = Array.isArray(pkField) ? pkField.map((field) => vars?.[field]) : vars?.[pkField];
|
|
15976
|
+
const hasEntityKey = Array.isArray(entityKey) ? entityKey.every((part) => part !== void 0 && part !== null) : entityKey !== void 0 && entityKey !== null;
|
|
15977
|
+
const entity = hasEntityKey ? await db.table("feedItems").get(entityKey) : void 0;
|
|
15978
|
+
if (includes.length > 0 && entity) {
|
|
15979
|
+
const parentId = Array.isArray(entityKey) ? entityKey.map((part) => String(part)).join(":") : String(entityKey);
|
|
15980
|
+
const result = await reconstructEntity(db, "feedItems", parentId, includes);
|
|
15981
|
+
return { feedItem: result };
|
|
15982
|
+
}
|
|
15983
|
+
return { feedItem: entity ?? null };
|
|
15984
|
+
}
|
|
15985
|
+
);
|
|
15986
|
+
return new MappedDvinaQueryRef(raw, (response) => {
|
|
15987
|
+
const data = response.feedItem;
|
|
15988
|
+
if (!data) return void 0;
|
|
15989
|
+
const instance = new FeedItem(this._request, data, this._syncEngine, this._baseUrl);
|
|
15990
|
+
if (includes.length > 0) {
|
|
15991
|
+
hydrateIncludes(instance, data, includes, this._request, this._syncEngine, this._baseUrl);
|
|
15992
|
+
}
|
|
15993
|
+
return instance;
|
|
15994
|
+
});
|
|
15995
|
+
}
|
|
15996
|
+
/** Include action in this query (Smart Fetch — single HTTP request). */
|
|
15997
|
+
action(variables) {
|
|
15998
|
+
const info = extractIncludeInfo(FeedItem_ActionDocument, "action", ["id"]);
|
|
15999
|
+
this._includes.push({
|
|
16000
|
+
fieldName: "action",
|
|
16001
|
+
fragmentDoc: FeedSendMessageActionFragmentDoc,
|
|
16002
|
+
variables,
|
|
16003
|
+
isConnection: false,
|
|
16004
|
+
isList: false,
|
|
16005
|
+
variableDefinitions: info.variableDefinitions,
|
|
16006
|
+
fieldArguments: info.fieldArguments,
|
|
16007
|
+
syncMetadata: {
|
|
16008
|
+
entityType: "feedSendMessageActions",
|
|
16009
|
+
requiredFields: ["prompt", "type"]
|
|
16010
|
+
},
|
|
16011
|
+
modelFactory: (req, data, se, bu) => new FeedSendMessageAction(req, data, se, bu)
|
|
16012
|
+
});
|
|
16013
|
+
return this;
|
|
16014
|
+
}
|
|
16015
|
+
/** Include data in this query (Smart Fetch — single HTTP request). */
|
|
16016
|
+
data(variables) {
|
|
16017
|
+
const info = extractIncludeInfo(FeedItem_DataDocument, "data", ["id"]);
|
|
16018
|
+
this._includes.push({
|
|
16019
|
+
fieldName: "data",
|
|
16020
|
+
fragmentDoc: FeedArtifactDataFragmentDoc,
|
|
16021
|
+
variables,
|
|
16022
|
+
isConnection: false,
|
|
16023
|
+
isList: true,
|
|
16024
|
+
variableDefinitions: info.variableDefinitions,
|
|
16025
|
+
fieldArguments: info.fieldArguments,
|
|
16026
|
+
syncMetadata: {
|
|
16027
|
+
entityType: "feedArtifactDatas",
|
|
16028
|
+
requiredFields: ["kind"]
|
|
16029
|
+
},
|
|
16030
|
+
modelFactory: (req, data, se, bu) => new FeedArtifactData(req, data, se, bu)
|
|
16031
|
+
});
|
|
16032
|
+
return this;
|
|
16033
|
+
}
|
|
16034
|
+
};
|
|
16035
|
+
var FeedItem_ActionQuery = class extends Request {
|
|
16036
|
+
_variables;
|
|
16037
|
+
constructor(request, syncEngine, variables = {}, baseUrl) {
|
|
16038
|
+
super(request, syncEngine, void 0, baseUrl);
|
|
16039
|
+
this._variables = variables;
|
|
16040
|
+
}
|
|
16041
|
+
async fetch(options) {
|
|
16042
|
+
const variables = this._variables;
|
|
16043
|
+
const response = await this._syncEngine.query(FeedItem_ActionDocument, variables, "feedItem");
|
|
16044
|
+
const data = response.feedItem?.action;
|
|
16045
|
+
return data ? new FeedSendMessageAction(this._request, data, this._syncEngine, this._baseUrl) : void 0;
|
|
16046
|
+
}
|
|
16047
|
+
watch(options) {
|
|
16048
|
+
const variables = this._variables;
|
|
16049
|
+
const raw = this._syncEngine.watch(
|
|
16050
|
+
FeedItem_ActionDocument,
|
|
16051
|
+
variables,
|
|
16052
|
+
"feedItem",
|
|
16053
|
+
async (db) => {
|
|
16054
|
+
const vars = variables;
|
|
16055
|
+
const entity = vars?.id ? await db.table("feedSendMessageActions").get(vars.id) : void 0;
|
|
16056
|
+
return { feedItem: { action: entity ?? null } };
|
|
16057
|
+
}
|
|
16058
|
+
);
|
|
16059
|
+
return new MappedDvinaQueryRef(raw, (response) => {
|
|
16060
|
+
const data = response.feedItem?.action;
|
|
16061
|
+
return data ? new FeedSendMessageAction(this._request, data, this._syncEngine, this._baseUrl) : void 0;
|
|
16062
|
+
});
|
|
16063
|
+
}
|
|
16064
|
+
};
|
|
16065
|
+
var FeedItem_DataQuery = class extends Request {
|
|
16066
|
+
_variables;
|
|
16067
|
+
constructor(request, syncEngine, variables = {}, baseUrl) {
|
|
16068
|
+
super(request, syncEngine, void 0, baseUrl);
|
|
16069
|
+
this._variables = variables;
|
|
16070
|
+
}
|
|
16071
|
+
async fetch(options) {
|
|
16072
|
+
const response = await this._syncEngine.query(FeedItem_DataDocument, this._variables, "feedItem");
|
|
16073
|
+
const data = response.feedItem?.data;
|
|
16074
|
+
if (!Array.isArray(data)) return [];
|
|
16075
|
+
return data.map((item) => new FeedArtifactData(this._request, item, this._syncEngine, this._baseUrl));
|
|
16076
|
+
}
|
|
16077
|
+
};
|
|
16078
|
+
var FeedItemsQuery = class _FeedItemsQuery extends Request {
|
|
16079
|
+
_variables;
|
|
16080
|
+
_includes = [];
|
|
16081
|
+
constructor(request, syncEngine, variables = {}, baseUrl) {
|
|
16082
|
+
super(request, syncEngine, void 0, baseUrl);
|
|
16083
|
+
this._variables = variables;
|
|
16084
|
+
}
|
|
16085
|
+
async fetch(options) {
|
|
16086
|
+
const variables = this._variables;
|
|
16087
|
+
const { document: queryDoc, variables: mergedVars } = buildSmartQuery(FeedItemsDocument, "feedItems", this._includes, variables, true);
|
|
16088
|
+
const response = await this._syncEngine.query(queryDoc, mergedVars, "feedItems");
|
|
16089
|
+
const data = response.feedItems;
|
|
16090
|
+
const connection = new FeedConnection(this._request, (conn, opts) => new _FeedItemsQuery(this._request, this._syncEngine, defaultConnection({ ...variables, ...conn }), this._baseUrl).fetch(opts), data, this._syncEngine, this._baseUrl);
|
|
16091
|
+
if (this._includes.length > 0) {
|
|
16092
|
+
const rawNodes = data.nodes ?? [];
|
|
16093
|
+
for (let i = 0; i < connection.nodes.length; i++) {
|
|
16094
|
+
hydrateIncludes(connection.nodes[i], rawNodes[i] ?? {}, this._includes, this._request, this._syncEngine, this._baseUrl);
|
|
16095
|
+
}
|
|
16096
|
+
}
|
|
16097
|
+
return connection;
|
|
16098
|
+
}
|
|
16099
|
+
watch(options) {
|
|
16100
|
+
const variables = this._variables;
|
|
16101
|
+
const subscriptionId = crypto.randomUUID();
|
|
16102
|
+
const includes = this._includes;
|
|
16103
|
+
const watchedRelations = includes.flatMap((include) => include.syncMetadata ? [{ fieldName: include.fieldName, entityType: include.syncMetadata.entityType, requiredFields: include.syncMetadata.requiredFields, isConnection: include.isConnection, isList: Boolean(include.isList), hasNestedIncludes: Boolean(include.children?.length) }] : []);
|
|
16104
|
+
const { document: queryDoc, variables: mergedVars } = buildSmartQuery(FeedItemsDocument, "feedItems", includes, variables, true);
|
|
16105
|
+
const raw = this._syncEngine.watch(
|
|
16106
|
+
queryDoc,
|
|
16107
|
+
mergedVars,
|
|
16108
|
+
"feedItems",
|
|
16109
|
+
async (db) => {
|
|
16110
|
+
const qr = await db._queryResults.get(buildQueryKey("feedItems", mergedVars, queryDoc));
|
|
16111
|
+
const nodes = qr ? await db.table("feedItems").bulkGet(qr.entityIds) : [];
|
|
16112
|
+
const filteredNodes = nodes.filter(Boolean);
|
|
16113
|
+
const enrichedNodes = includes.length > 0 ? await reconstructConnectionNodes(db, "feedItems", filteredNodes, includes) : filteredNodes;
|
|
16114
|
+
return { feedItems: { __typename: "FeedConnection", nodes: enrichedNodes, pageInfo: qr?.pageInfo ?? { hasNextPage: false, hasPreviousPage: false }, totalCount: qr?.totalCount ?? 0 } };
|
|
16115
|
+
},
|
|
16116
|
+
{
|
|
16117
|
+
id: subscriptionId,
|
|
16118
|
+
entityType: "feedItems",
|
|
16119
|
+
operationName: "feedItems",
|
|
16120
|
+
modelName: "FeedItem",
|
|
16121
|
+
filter: variables?.filter
|
|
16122
|
+
},
|
|
16123
|
+
watchedRelations
|
|
16124
|
+
);
|
|
16125
|
+
return new MappedDvinaQueryRef(raw, (response) => {
|
|
16126
|
+
const data = response.feedItems;
|
|
16127
|
+
const connection = new FeedConnection(this._request, (conn, opts) => new _FeedItemsQuery(this._request, this._syncEngine, defaultConnection({ ...variables, ...conn }), this._baseUrl).fetch(opts), data, this._syncEngine, this._baseUrl);
|
|
16128
|
+
if (includes.length > 0) {
|
|
16129
|
+
const rawNodes = data.nodes ?? [];
|
|
16130
|
+
for (let i = 0; i < connection.nodes.length; i++) {
|
|
16131
|
+
hydrateIncludes(connection.nodes[i], rawNodes[i] ?? {}, includes, this._request, this._syncEngine, this._baseUrl);
|
|
16132
|
+
}
|
|
16133
|
+
}
|
|
16134
|
+
return connection;
|
|
16135
|
+
});
|
|
16136
|
+
}
|
|
16137
|
+
/** Include action in this query (Smart Fetch — single HTTP request). */
|
|
16138
|
+
action(variables) {
|
|
16139
|
+
const info = extractIncludeInfo(FeedItem_ActionDocument, "action", ["id"]);
|
|
16140
|
+
this._includes.push({
|
|
16141
|
+
fieldName: "action",
|
|
16142
|
+
fragmentDoc: FeedSendMessageActionFragmentDoc,
|
|
16143
|
+
variables,
|
|
16144
|
+
isConnection: false,
|
|
16145
|
+
isList: false,
|
|
16146
|
+
variableDefinitions: info.variableDefinitions,
|
|
16147
|
+
fieldArguments: info.fieldArguments,
|
|
16148
|
+
syncMetadata: {
|
|
16149
|
+
entityType: "feedSendMessageActions",
|
|
16150
|
+
requiredFields: ["prompt", "type"]
|
|
16151
|
+
},
|
|
16152
|
+
modelFactory: (req, data, se, bu) => new FeedSendMessageAction(req, data, se, bu)
|
|
16153
|
+
});
|
|
16154
|
+
return this;
|
|
16155
|
+
}
|
|
16156
|
+
/** Include data in this query (Smart Fetch — single HTTP request). */
|
|
16157
|
+
data(variables) {
|
|
16158
|
+
const info = extractIncludeInfo(FeedItem_DataDocument, "data", ["id"]);
|
|
16159
|
+
this._includes.push({
|
|
16160
|
+
fieldName: "data",
|
|
16161
|
+
fragmentDoc: FeedArtifactDataFragmentDoc,
|
|
16162
|
+
variables,
|
|
16163
|
+
isConnection: false,
|
|
16164
|
+
isList: true,
|
|
16165
|
+
variableDefinitions: info.variableDefinitions,
|
|
16166
|
+
fieldArguments: info.fieldArguments,
|
|
16167
|
+
syncMetadata: {
|
|
16168
|
+
entityType: "feedArtifactDatas",
|
|
16169
|
+
requiredFields: ["kind"]
|
|
16170
|
+
},
|
|
16171
|
+
modelFactory: (req, data, se, bu) => new FeedArtifactData(req, data, se, bu)
|
|
16172
|
+
});
|
|
16173
|
+
return this;
|
|
16174
|
+
}
|
|
16175
|
+
};
|
|
15672
16176
|
var FileQuery = class extends Request {
|
|
15673
16177
|
async fetch(variables) {
|
|
15674
16178
|
const response = await this._request(FileDocument, variables);
|
|
@@ -17225,7 +17729,7 @@ var PulseEventQuery = class extends Request {
|
|
|
17225
17729
|
fieldArguments: info.fieldArguments,
|
|
17226
17730
|
syncMetadata: {
|
|
17227
17731
|
entityType: "integrations",
|
|
17228
|
-
requiredFields: ["createdAt", "id", "providerKey", "status", "updatedAt"]
|
|
17732
|
+
requiredFields: ["createdAt", "id", "providerKey", "status", "unreadPulseCount", "updatedAt"]
|
|
17229
17733
|
},
|
|
17230
17734
|
children,
|
|
17231
17735
|
modelFactory: (req, data, se, bu) => new Integration(req, data, se, bu)
|
|
@@ -17293,56 +17797,6 @@ var PulseEvent_Integration_ProviderQuery = class extends Request {
|
|
|
17293
17797
|
});
|
|
17294
17798
|
}
|
|
17295
17799
|
};
|
|
17296
|
-
var PulseEventStatsQuery = class extends Request {
|
|
17297
|
-
_variables;
|
|
17298
|
-
_includes = [];
|
|
17299
|
-
constructor(request, syncEngine, variables = {}, baseUrl) {
|
|
17300
|
-
super(request, syncEngine, void 0, baseUrl);
|
|
17301
|
-
this._variables = variables;
|
|
17302
|
-
}
|
|
17303
|
-
async fetch(options) {
|
|
17304
|
-
const variables = this._variables;
|
|
17305
|
-
const { document: queryDoc, variables: mergedVars } = buildSmartQuery(PulseEventStatsDocument, "pulseEventStats", this._includes, variables);
|
|
17306
|
-
const response = await this._syncEngine.query(queryDoc, mergedVars, "pulseEventStats");
|
|
17307
|
-
const data = response.pulseEventStats;
|
|
17308
|
-
const instance = new PulseEventStatsModel(this._request, data, this._syncEngine, this._baseUrl);
|
|
17309
|
-
if (this._includes.length > 0) {
|
|
17310
|
-
hydrateIncludes(instance, data, this._includes, this._request, this._syncEngine, this._baseUrl);
|
|
17311
|
-
}
|
|
17312
|
-
return instance;
|
|
17313
|
-
}
|
|
17314
|
-
watch(options) {
|
|
17315
|
-
const variables = this._variables;
|
|
17316
|
-
const includes = this._includes;
|
|
17317
|
-
const { document: queryDoc, variables: mergedVars } = buildSmartQuery(PulseEventStatsDocument, "pulseEventStats", includes, variables);
|
|
17318
|
-
const raw = this._syncEngine.watch(
|
|
17319
|
-
queryDoc,
|
|
17320
|
-
mergedVars,
|
|
17321
|
-
"pulseEventStats",
|
|
17322
|
-
async (db) => {
|
|
17323
|
-
const vars = variables;
|
|
17324
|
-
const pkField = getPrimaryKeyField("pulseEventStatsModels");
|
|
17325
|
-
const entityKey = Array.isArray(pkField) ? pkField.map((field) => vars?.[field]) : vars?.[pkField];
|
|
17326
|
-
const hasEntityKey = Array.isArray(entityKey) ? entityKey.every((part) => part !== void 0 && part !== null) : entityKey !== void 0 && entityKey !== null;
|
|
17327
|
-
const entity = hasEntityKey ? await db.table("pulseEventStatsModels").get(entityKey) : void 0;
|
|
17328
|
-
if (includes.length > 0 && entity) {
|
|
17329
|
-
const parentId = Array.isArray(entityKey) ? entityKey.map((part) => String(part)).join(":") : String(entityKey);
|
|
17330
|
-
const result = await reconstructEntity(db, "pulseEventStatsModels", parentId, includes);
|
|
17331
|
-
return { pulseEventStats: result };
|
|
17332
|
-
}
|
|
17333
|
-
return { pulseEventStats: entity ?? null };
|
|
17334
|
-
}
|
|
17335
|
-
);
|
|
17336
|
-
return new MappedDvinaQueryRef(raw, (response) => {
|
|
17337
|
-
const data = response.pulseEventStats;
|
|
17338
|
-
const instance = new PulseEventStatsModel(this._request, data, this._syncEngine, this._baseUrl);
|
|
17339
|
-
if (includes.length > 0) {
|
|
17340
|
-
hydrateIncludes(instance, data, includes, this._request, this._syncEngine, this._baseUrl);
|
|
17341
|
-
}
|
|
17342
|
-
return instance;
|
|
17343
|
-
});
|
|
17344
|
-
}
|
|
17345
|
-
};
|
|
17346
17800
|
var PulseEventsQuery = class _PulseEventsQuery extends Request {
|
|
17347
17801
|
_variables;
|
|
17348
17802
|
_includes = [];
|
|
@@ -17421,7 +17875,7 @@ var PulseEventsQuery = class _PulseEventsQuery extends Request {
|
|
|
17421
17875
|
fieldArguments: info.fieldArguments,
|
|
17422
17876
|
syncMetadata: {
|
|
17423
17877
|
entityType: "integrations",
|
|
17424
|
-
requiredFields: ["createdAt", "id", "providerKey", "status", "updatedAt"]
|
|
17878
|
+
requiredFields: ["createdAt", "id", "providerKey", "status", "unreadPulseCount", "updatedAt"]
|
|
17425
17879
|
},
|
|
17426
17880
|
children,
|
|
17427
17881
|
modelFactory: (req, data, se, bu) => new Integration(req, data, se, bu)
|
|
@@ -18424,10 +18878,6 @@ var DvinaSdk = class extends Request {
|
|
|
18424
18878
|
this.inference = inference;
|
|
18425
18879
|
this.billing = billing;
|
|
18426
18880
|
}
|
|
18427
|
-
/** Mutation: acknowledgePulseEvent */
|
|
18428
|
-
acknowledgePulseEvent(variables) {
|
|
18429
|
-
return new AcknowledgePulseEventMutation(this._request, this._syncEngine, void 0, this._baseUrl).fetch(variables);
|
|
18430
|
-
}
|
|
18431
18881
|
/** Mutation: addInsightToReport */
|
|
18432
18882
|
addInsightToReport(variables) {
|
|
18433
18883
|
return new AddInsightToReportMutation(this._request, this._syncEngine, void 0, this._baseUrl).fetch(variables);
|
|
@@ -18444,6 +18894,10 @@ var DvinaSdk = class extends Request {
|
|
|
18444
18894
|
connectIntegration(variables) {
|
|
18445
18895
|
return new ConnectIntegrationMutation(this._request, this._syncEngine, void 0, this._baseUrl).fetch(variables);
|
|
18446
18896
|
}
|
|
18897
|
+
/** Mutation: consumePulseEvents (scalar) */
|
|
18898
|
+
consumePulseEvents(variables) {
|
|
18899
|
+
return new ConsumePulseEventsMutation(this._request, this._syncEngine).fetch(variables);
|
|
18900
|
+
}
|
|
18447
18901
|
/** Mutation: continueImportedChat (scalar) */
|
|
18448
18902
|
continueImportedChat(variables) {
|
|
18449
18903
|
return new ContinueImportedChatMutation(this._request, this._syncEngine).fetch(variables);
|
|
@@ -18568,10 +19022,6 @@ var DvinaSdk = class extends Request {
|
|
|
18568
19022
|
generateUploadUri(variables) {
|
|
18569
19023
|
return new GenerateUploadUriMutation(this._request, this._syncEngine, void 0, this._baseUrl).fetch(variables);
|
|
18570
19024
|
}
|
|
18571
|
-
/** Mutation: markPulseEventSeen */
|
|
18572
|
-
markPulseEventSeen(variables) {
|
|
18573
|
-
return new MarkPulseEventSeenMutation(this._request, this._syncEngine, void 0, this._baseUrl).fetch(variables);
|
|
18574
|
-
}
|
|
18575
19025
|
/** Mutation: previewChatImport */
|
|
18576
19026
|
previewChatImport(variables) {
|
|
18577
19027
|
return new PreviewChatImportMutation(this._request, this._syncEngine, void 0, this._baseUrl).fetch(variables);
|
|
@@ -18748,6 +19198,14 @@ var DvinaSdk = class extends Request {
|
|
|
18748
19198
|
exportWithInsightId(variables) {
|
|
18749
19199
|
return new ExportWithInsightIdQuery(this._request, this._syncEngine).fetch(variables);
|
|
18750
19200
|
}
|
|
19201
|
+
/** Query: feedItem — call .fetch() or .watch() to execute. */
|
|
19202
|
+
feedItem(variables) {
|
|
19203
|
+
return new FeedItemQuery(this._request, this._syncEngine, variables, this._baseUrl);
|
|
19204
|
+
}
|
|
19205
|
+
/** Query: feedItems — call .fetch() or .watch() to execute. */
|
|
19206
|
+
feedItems(variables) {
|
|
19207
|
+
return new FeedItemsQuery(this._request, this._syncEngine, variables, this._baseUrl);
|
|
19208
|
+
}
|
|
18751
19209
|
/** Query: file (scalar) */
|
|
18752
19210
|
file(variables) {
|
|
18753
19211
|
return new FileQuery(this._request, this._syncEngine).fetch(variables);
|
|
@@ -18860,10 +19318,6 @@ var DvinaSdk = class extends Request {
|
|
|
18860
19318
|
pulseEvent(variables) {
|
|
18861
19319
|
return new PulseEventQuery(this._request, this._syncEngine, variables, this._baseUrl);
|
|
18862
19320
|
}
|
|
18863
|
-
/** Query: pulseEventStats — call .fetch() or .watch() to execute. */
|
|
18864
|
-
pulseEventStats(variables) {
|
|
18865
|
-
return new PulseEventStatsQuery(this._request, this._syncEngine, variables, this._baseUrl);
|
|
18866
|
-
}
|
|
18867
19321
|
/** Query: pulseEvents — call .fetch() or .watch() to execute. */
|
|
18868
19322
|
pulseEvents(variables) {
|
|
18869
19323
|
return new PulseEventsQuery(this._request, this._syncEngine, variables, this._baseUrl);
|
|
@@ -18982,6 +19436,6 @@ var DvinaSdk = class extends Request {
|
|
|
18982
19436
|
}
|
|
18983
19437
|
};
|
|
18984
19438
|
|
|
18985
|
-
export {
|
|
18986
|
-
//# sourceMappingURL=chunk-
|
|
18987
|
-
//# sourceMappingURL=chunk-
|
|
19439
|
+
export { Action, AddInsightToReportMutation, Agent, AgentConnection, AgentQuery, AgentSubBuilder, Agent_ChatsQuery, AgentsQuery, Artifact, ArtifactConnection, ArtifactQuery, ArtifactSubBuilder, Artifact_ChatQuery, Artifact_Chat_InsightQuery, Artifact_FileQuery, Artifact_MessageQuery, Artifact_Message_ChatQuery, Artifact_Message_ContentsQuery, Artifact_Message_FeedbackQuery, ArtifactsQuery, AudioEventOutput, CancelOauthFlowMutation, CancelWorkspaceDeletionMutation, Chat, ChatConnection, ChatImportExecuteOutput, ChatImportPreviewOutput, ChatMessage, ChatMessageConnection, ChatMessageQuery, ChatMessageSubBuilder, ChatMessage_ArtifactsQuery, ChatMessage_ChatQuery, ChatMessage_Chat_InsightQuery, ChatMessage_ContentsQuery, ChatMessage_FeedbackQuery, ChatMessagesQuery, ChatQuery, ChatSubBuilder, ChatTitleEventOutput, Chat_AgentsQuery, Chat_ArtifactsQuery, Chat_InsightQuery, Chat_Insight_ReportMembersQuery, Chat_MessagesQuery, ChatsQuery, ConnectIntegrationMutation, ConsumePulseEventsMutation, ContentBlock, ContentMask, ContinueImportedChatMutation, ContinueInterpretationMutation, CreateAgentMutation, CreateChatMutation, CreateDatabaseMutation, CreateDocumentMutation, CreateFeedbackMutation, CreateFolderMutation, CreateInsightMutation, CreateIntegrationMutation, CreateIntegrationOutput, CreateReportMutation, CreateTableMutation, CreateUserSkillFileMutation, CreateUserSkillFolderMutation, CubeModel, DB_ENTITY_SCHEMA, Database, DatabaseCatalog, DatabaseCatalogConnection, DatabaseCatalogQuery, DatabaseCatalogSubBuilder, DatabaseCatalog_EngineQuery, DatabaseCatalogsQuery, DatabaseConnection, DatabaseEngine, DatabaseQuery, DatabaseSchemaQuery, DatabaseSubBuilder, Database_EngineQuery, Database_Engine_CatalogQuery, Database_TablesQuery, DatabasesQuery, DeepAnalysisUsage, DeferredDvinaQueryRef, DeleteAgentMutation, DeleteArtifactMutation, DeleteChatMutation, DeleteDatabaseMutation, DeleteDocumentMutation, DeleteFolderMutation, DeleteInsightMutation, DeleteInsightsMutation, DeleteIntegrationMutation, DeleteReportMutation, DeleteTableMutation, DeleteUserSkillFileMutation, DeleteUserSkillFolderMutation, DevAccessTokenOutput, DexieLiveQueryRef, DisconnectIntegrationMutation, DismissPulseEventMutation, Document, DocumentCatalog, DocumentCatalogConnection, DocumentCatalogQuery, DocumentCatalogSubBuilder, DocumentCatalog_FormatQuery, DocumentCatalogsQuery, DocumentConnection, DocumentContent, DocumentFormat, DocumentQuery, DocumentSubBuilder, Document_ContentsQuery, Document_FileQuery, Document_FormatQuery, Document_Format_CatalogQuery, Document_TablesQuery, DocumentsQuery, DvinaDatabase, DvinaModel, DvinaSdk, ExecuteChatImportMutation, ExportQuery, ExportWithInsightIdQuery, FeedArtifactData, FeedConnection, FeedDatabaseData, FeedDocumentData, FeedIntegrationData, FeedItem, FeedItemGenerated, FeedItemQuery, FeedItemSubBuilder, FeedItem_ActionQuery, FeedItem_DataQuery, FeedItemsQuery, FeedPulseData, FeedSendMessageAction, Feedback, File, FileMetaQuery, FileModel, FileQuery, FileUrlsQuery, FinalContentEventOutput, FindFitTierQuery, Folder, FolderConnection, FolderQuery, FoldersQuery, GenerateUploadUriMutation, GetCapabilityQuery, GetDevAccessTokenQuery, GetLimitQuery, GetRemainingQuery, GetTokenUsageByModelQuery, GetTokenUsageHistoryQuery, GetTokenUsageStatusQuery, GetTokenUsageStatus_WindowsQuery, GetTokenUsageStatus_Windows_DayQuery, GetTokenUsageStatus_Windows_FiveHourQuery, GetTokenUsageStatus_Windows_WeekQuery, GetUsageQuery, ImportedChatSummaryOutput, IndexContentObject, InferenceRequestAudit, Insight, InsightConnection, InsightQuery, InsightSubBuilder, Insight_ChatQuery, Insight_ReportMembersQuery, Insight_ReportsQuery, InsightsQuery, Integration, IntegrationCatalog, IntegrationCatalogConnection, IntegrationCatalogQuery, IntegrationCatalogSubBuilder, IntegrationCatalogToolsQuery, IntegrationCatalog_ProviderQuery, IntegrationCatalogsQuery, IntegrationConnection, IntegrationProvider, IntegrationQuery, IntegrationSubBuilder, Integration_ProviderQuery, Integration_Provider_CatalogQuery, IntegrationsQuery, Interpretation, InterpretationConnection, InterpretationsQuery, Invocation, MUTATION_CACHE_RULES, MappedDvinaQueryRef, McpAuthUpdateModel, McpAuthUpdatesSubscription, McpClientInformation, McpCodeVerifier, McpServer, McpTokens, McpTool, MessageEndEventOutput, MessageStartEventOutput, ModelTokenUsage, Notification, NotificationConnection, NotificationQuery, NotificationsByReferenceQuery, NotificationsQuery, PRIMARY_KEY_CONFIG, PreviewChatImportMutation, PrivacyStats, PrivacyStatsQuery, PulseAppSummaryModel, PulseAppSummaryQuery, PulseEvent, PulseEventConnection, PulseEventQuery, PulseEventSubBuilder, PulseEvent_IntegrationQuery, PulseEvent_Integration_ProviderQuery, PulseEventsQuery, PulseTriggerSettingModel, PulseTriggerSettingsQuery, QueryQuery, QueryWithInsightIdQuery, QueryWithMessageIdQuery, ReanalyzeDocumentMutation, ReasoningEventOutput, RefineMindInstructionMutation, RefreshDatabaseSchemaMutation, ReinterpretSourceMutation, ReinterpretSourcesOfuserMutation, Relation, RelocateInsightMutation, RemoveInsightFromReportMutation, Report, ReportConnection, ReportMember, ReportQuery, ReportSubBuilder, Report_InsightsQuery, Report_LayoutQuery, ReportsQuery, ResetWorkspaceMutation, ResolvePulseEventMutation, ResolvedFileUrl, ScheduleWorkspaceDeletionMutation, SearchQuery, SendMessageStreamSubscription, SetDatabasePrimaryKeyMutation, StreamMessageContentOutput, StreamMessageOutput, StreamableUiDeltaEventOutput, SyncEngine, SyncEvent, TABLE_TO_TYPENAME, TYPENAME_TO_TABLE, Table, TableConnection, TableQuery, TableSubBuilder, Table_DatabaseQuery, Table_Database_EngineQuery, Table_DocumentQuery, Table_Document_ContentsQuery, Table_Document_FileQuery, Table_Document_FormatQuery, Table_FromRelationsQuery, Table_ToRelationsQuery, TablesQuery, TextBlockEventOutput, TextDeltaEventOutput, TokenUsage, TokenUsageUpdatesSubscription, ToolInputDeltaEventOutput, ToolResultArtifactOutput, ToolResultEventOutput, ToolStartEventOutput, UpdateAgentMutation, UpdateChatMutation, UpdateDatabaseMutation, UpdateDocumentMutation, UpdateFolderMutation, UpdateInsightInReportMutation, UpdateInsightMutation, UpdateInterpMutation, UpdatePulseTriggerMutation, UpdateReportMutation, UpdateTableMutation, UpdateUserSkillFileMutation, UpdateUserSkillFolderMutation, UsageMetaOutput, UsageStatus, UsageWindowsStatusType, UserSkillFile, UserSkillFileModel, UserSkillFileQuery, UserSkillFilesQuery, UserSkillFolder, UserSkillFolderModel, UserSkillFolderQuery, UserSkillFoldersQuery, WindowDetailType, WorkspaceDeleteSchedule, WorkspaceDeletionScheduleQuery, closeDatabase, createDvinaClient, createLazySyncEngine, createSseTransport, createWsTransport, deleteDatabase, getOrCreateDatabase, reconstructConnectionNodes, reconstructEntity, uploadFile };
|
|
19440
|
+
//# sourceMappingURL=chunk-PJ34OU4B.js.map
|
|
19441
|
+
//# sourceMappingURL=chunk-PJ34OU4B.js.map
|