@powerhousedao/connect 6.0.0-dev.89 → 6.0.0-dev.90

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.
@@ -4499,7 +4499,7 @@ var init_package = __esm(() => {
4499
4499
  package_default = {
4500
4500
  name: "@powerhousedao/connect",
4501
4501
  productName: "Powerhouse-Connect",
4502
- version: "6.0.0-dev.88",
4502
+ version: "6.0.0-dev.89",
4503
4503
  description: "Powerhouse Connect",
4504
4504
  main: "dist/index.html",
4505
4505
  type: "module",
@@ -24533,6 +24533,7 @@ __export(exports_src, {
24533
24533
  createUrlWithPreservedParams: () => createUrlWithPreservedParams,
24534
24534
  createProcessorQuery: () => createProcessorQuery,
24535
24535
  createClient: () => createClient,
24536
+ convertRemoteOperations: () => convertRemoteOperations,
24536
24537
  convertLegacyLibToVetraPackage: () => convertLegacyLibToVetraPackage,
24537
24538
  convertLegacyEditorModuleToVetraEditorModule: () => convertLegacyEditorModuleToVetraEditorModule,
24538
24539
  convertLegacyDocumentModelModuleToVetraDocumentModelModule: () => convertLegacyDocumentModelModuleToVetraDocumentModelModule,
@@ -27780,6 +27781,14 @@ function getSdk(client, withWrapper = defaultWrapper) {
27780
27781
  signal
27781
27782
  }), "GetDocument", "query", variables);
27782
27783
  },
27784
+ GetDocumentWithOperations(variables, requestHeaders, signal) {
27785
+ return withWrapper((wrappedRequestHeaders) => client.request({
27786
+ document: GetDocumentWithOperationsDocument,
27787
+ variables,
27788
+ requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },
27789
+ signal
27790
+ }), "GetDocumentWithOperations", "query", variables);
27791
+ },
27783
27792
  GetDocumentChildren(variables, requestHeaders, signal) {
27784
27793
  return withWrapper((wrappedRequestHeaders) => client.request({
27785
27794
  document: GetDocumentChildrenDocument,
@@ -41111,8 +41120,10 @@ class ActionTracker {
41111
41120
 
41112
41121
  class RemoteClient {
41113
41122
  client;
41114
- constructor(client) {
41123
+ pageSize;
41124
+ constructor(client, pageSize) {
41115
41125
  this.client = client;
41126
+ this.pageSize = pageSize ?? DEFAULT_PAGE_SIZE;
41116
41127
  }
41117
41128
  async getDocument(identifier, branch) {
41118
41129
  const result = await this.client.GetDocument({
@@ -41121,9 +41132,39 @@ class RemoteClient {
41121
41132
  });
41122
41133
  return result.document ?? null;
41123
41134
  }
41124
- async getAllOperations(documentId, branch, sinceRevision, scopes) {
41135
+ async getDocumentWithOperations(identifier, branch, operationsCursor) {
41136
+ const result = await this.client.GetDocumentWithOperations({
41137
+ identifier,
41138
+ view: branch ? { branch } : undefined,
41139
+ operationsPaging: {
41140
+ limit: this.pageSize,
41141
+ cursor: operationsCursor ?? null
41142
+ }
41143
+ });
41144
+ if (!result.document)
41145
+ return null;
41146
+ const doc = result.document.document;
41147
+ const opsPage = doc.operations;
41125
41148
  const operationsByScope = {};
41126
- let cursor = undefined;
41149
+ if (opsPage) {
41150
+ for (const op of opsPage.items) {
41151
+ const scope = op.action.scope;
41152
+ (operationsByScope[scope] ??= []).push(op);
41153
+ }
41154
+ }
41155
+ return {
41156
+ document: doc,
41157
+ childIds: result.document.childIds,
41158
+ operations: {
41159
+ operationsByScope,
41160
+ cursor: opsPage?.cursor ?? undefined
41161
+ },
41162
+ hasMoreOperations: opsPage?.hasNextPage ?? false
41163
+ };
41164
+ }
41165
+ async getAllOperations(documentId, branch, sinceRevision, scopes, startCursor) {
41166
+ const operationsByScope = {};
41167
+ let cursor = startCursor ?? undefined;
41127
41168
  let hasNextPage = true;
41128
41169
  while (hasNextPage) {
41129
41170
  const result = await this.client.GetDocumentOperations({
@@ -41134,22 +41175,22 @@ class RemoteClient {
41134
41175
  scopes: scopes ?? null
41135
41176
  },
41136
41177
  paging: {
41137
- limit: 100,
41178
+ limit: this.pageSize,
41138
41179
  cursor: cursor ?? null
41139
41180
  }
41140
41181
  });
41141
41182
  const page = result.documentOperations;
41142
41183
  for (const op of page.items) {
41143
41184
  const scope = op.action.scope;
41144
- if (!operationsByScope[scope]) {
41145
- operationsByScope[scope] = [];
41146
- }
41147
- operationsByScope[scope].push(op);
41185
+ (operationsByScope[scope] ??= []).push(op);
41148
41186
  }
41149
41187
  hasNextPage = page.hasNextPage;
41150
41188
  cursor = page.cursor;
41151
41189
  }
41152
- return operationsByScope;
41190
+ return {
41191
+ operationsByScope,
41192
+ cursor: cursor ?? undefined
41193
+ };
41153
41194
  }
41154
41195
  async pushActions(documentIdentifier, actions2, branch) {
41155
41196
  const result = await this.client.MutateDocument({
@@ -41232,11 +41273,14 @@ function deserializeSignature2(s) {
41232
41273
  parts[4] ?? ""
41233
41274
  ];
41234
41275
  }
41235
- function buildPulledDocument(remoteDoc, operationsByScope, initialDoc, branch) {
41276
+ function convertRemoteOperations(operationsByScope) {
41236
41277
  const operations = {};
41237
41278
  for (const [scope, remoteOps] of Object.entries(operationsByScope)) {
41238
41279
  operations[scope] = remoteOps.map((op) => remoteOperationToLocal(op));
41239
41280
  }
41281
+ return operations;
41282
+ }
41283
+ function buildPulledDocument(remoteDoc, operations, initialDoc, branch) {
41240
41284
  return {
41241
41285
  header: {
41242
41286
  ...initialDoc.header,
@@ -41276,6 +41320,7 @@ class RemoteDocumentController {
41276
41320
  options;
41277
41321
  documentId;
41278
41322
  remoteRevision = {};
41323
+ lastCursor;
41279
41324
  pushScheduled = false;
41280
41325
  pushQueue = Promise.resolve();
41281
41326
  listeners = [];
@@ -41283,7 +41328,7 @@ class RemoteDocumentController {
41283
41328
  this.inner = inner;
41284
41329
  this.options = options;
41285
41330
  this.documentId = options.documentId ?? "";
41286
- this.remoteClient = new RemoteClient(options.client);
41331
+ this.remoteClient = new RemoteClient(options.client, options.operationsPageSize);
41287
41332
  this.setupActionInterceptors();
41288
41333
  }
41289
41334
  get header() {
@@ -41371,14 +41416,9 @@ class RemoteDocumentController {
41371
41416
  if (this.documentId === "") {
41372
41417
  throw new Error("Cannot pull: no document ID set");
41373
41418
  }
41374
- const docResult = await this.remoteClient.getDocument(this.documentId, this.options.branch);
41375
- if (!docResult) {
41376
- throw new Error(`Document "${this.documentId}" not found on remote`);
41377
- }
41378
- const remoteDoc = docResult.document;
41379
- const operationsByScope = await this.remoteClient.getAllOperations(this.documentId, this.options.branch);
41419
+ const { remoteDoc, operations } = await this.fetchDocumentAndOperations();
41380
41420
  const initialDoc = this.inner.module.utils.createDocument();
41381
- const pulledDocument = buildPulledDocument(remoteDoc, operationsByScope, initialDoc, this.options.branch ?? "main");
41421
+ const pulledDocument = buildPulledDocument(remoteDoc, operations, initialDoc, this.options.branch ?? "main");
41382
41422
  const ControllerClass = this.inner.constructor;
41383
41423
  this.inner = new ControllerClass(pulledDocument);
41384
41424
  this.setupActionInterceptors();
@@ -41414,7 +41454,7 @@ class RemoteDocumentController {
41414
41454
  value: (input) => {
41415
41455
  const opCountsBefore = {};
41416
41456
  for (const scope in this.inner.operations) {
41417
- opCountsBefore[scope] = this.inner.operations[scope]?.length ?? 0;
41457
+ opCountsBefore[scope] = this.inner.operations[scope].length;
41418
41458
  }
41419
41459
  this.inner[actionType](input);
41420
41460
  const newOp = this.findNewOperation(opCountsBefore);
@@ -41441,7 +41481,7 @@ class RemoteDocumentController {
41441
41481
  for (const scope in ops) {
41442
41482
  const scopeOps = ops[scope];
41443
41483
  const prevCount = opCountsBefore[scope] ?? 0;
41444
- if (scopeOps && scopeOps.length > prevCount) {
41484
+ if (scopeOps.length > prevCount) {
41445
41485
  return scopeOps[scopeOps.length - 1];
41446
41486
  }
41447
41487
  }
@@ -41449,7 +41489,7 @@ class RemoteDocumentController {
41449
41489
  }
41450
41490
  getLastOperationInScope(scope, excludeOp) {
41451
41491
  const scopeOps = this.inner.operations[scope];
41452
- if (!scopeOps || scopeOps.length === 0)
41492
+ if (scopeOps.length === 0)
41453
41493
  return;
41454
41494
  for (let i = scopeOps.length - 1;i >= 0; i--) {
41455
41495
  if (scopeOps[i] !== excludeOp)
@@ -41470,8 +41510,8 @@ class RemoteDocumentController {
41470
41510
  const conflictingScopes = [...localScopes].filter((scope) => (currentRevision[scope] ?? 0) > (this.remoteRevision[scope] ?? 0));
41471
41511
  const scopeResults = await Promise.all(conflictingScopes.map((scope) => this.remoteClient.getAllOperations(this.documentId, this.options.branch, this.remoteRevision[scope] ?? 0, [scope])));
41472
41512
  const remoteOperations = {};
41473
- for (const result of scopeResults) {
41474
- for (const [scope, ops] of Object.entries(result)) {
41513
+ for (const { operationsByScope } of scopeResults) {
41514
+ for (const [scope, ops] of Object.entries(operationsByScope)) {
41475
41515
  remoteOperations[scope] = ops;
41476
41516
  }
41477
41517
  }
@@ -41535,6 +41575,70 @@ class RemoteDocumentController {
41535
41575
  }
41536
41576
  };
41537
41577
  }
41578
+ async fetchDocumentAndOperations() {
41579
+ const result = await this.remoteClient.getDocumentWithOperations(this.documentId, this.options.branch, this.lastCursor);
41580
+ if (!result) {
41581
+ throw new Error(`Document "${this.documentId}" not found on remote`);
41582
+ }
41583
+ const { document: remoteDoc, hasMoreOperations } = result;
41584
+ let { operations: firstPage } = result;
41585
+ const expectedRevision = extractRevisionMap(remoteDoc.revisionsList);
41586
+ if (hasMoreOperations && firstPage.cursor) {
41587
+ const remaining = await this.remoteClient.getAllOperations(this.documentId, this.options.branch, undefined, undefined, firstPage.cursor);
41588
+ for (const [scope, ops] of Object.entries(remaining.operationsByScope)) {
41589
+ (firstPage.operationsByScope[scope] ??= []).push(...ops);
41590
+ }
41591
+ firstPage = {
41592
+ operationsByScope: firstPage.operationsByScope,
41593
+ cursor: remaining.cursor
41594
+ };
41595
+ }
41596
+ if (this.lastCursor) {
41597
+ const newOps = convertRemoteOperations(firstPage.operationsByScope);
41598
+ const merged = this.mergeOperations(this.inner.operations, newOps);
41599
+ if (this.hasExpectedOperationCounts(merged, expectedRevision)) {
41600
+ this.lastCursor = firstPage.cursor;
41601
+ return { remoteDoc, operations: merged };
41602
+ }
41603
+ return this.fullFetch(remoteDoc);
41604
+ }
41605
+ this.lastCursor = firstPage.cursor;
41606
+ return {
41607
+ remoteDoc,
41608
+ operations: convertRemoteOperations(firstPage.operationsByScope)
41609
+ };
41610
+ }
41611
+ async fullFetch(remoteDoc) {
41612
+ const { operationsByScope, cursor } = await this.remoteClient.getAllOperations(this.documentId, this.options.branch);
41613
+ this.lastCursor = cursor;
41614
+ return {
41615
+ remoteDoc,
41616
+ operations: convertRemoteOperations(operationsByScope)
41617
+ };
41618
+ }
41619
+ hasExpectedOperationCounts(operations, expectedRevision) {
41620
+ for (const [scope, revision] of Object.entries(expectedRevision)) {
41621
+ const opCount = scope in operations ? operations[scope].length : 0;
41622
+ if (opCount !== revision) {
41623
+ return false;
41624
+ }
41625
+ }
41626
+ return true;
41627
+ }
41628
+ mergeOperations(existingOps, newOps) {
41629
+ const merged = {};
41630
+ for (const [scope, ops] of Object.entries(existingOps)) {
41631
+ if (ops.length > 0) {
41632
+ merged[scope] = [...ops];
41633
+ }
41634
+ }
41635
+ for (const [scope, ops] of Object.entries(newOps)) {
41636
+ if (ops.length > 0) {
41637
+ (merged[scope] ??= []).push(...ops);
41638
+ }
41639
+ }
41640
+ return merged;
41641
+ }
41538
41642
  schedulePush() {
41539
41643
  if (this.pushScheduled)
41540
41644
  return;
@@ -42756,7 +42860,7 @@ ${String(result)}`);
42756
42860
  return t;
42757
42861
  };
42758
42862
  return __assign.apply(this, arguments);
42759
- }, docCache, fragmentSourceMap, printFragmentWarnings = true, experimentalFragmentVariables = false, extras, PropagationMode2, PhDocumentFieldsFragmentDoc, GetDocumentModelsDocument, GetDocumentDocument, GetDocumentChildrenDocument, GetDocumentParentsDocument, FindDocumentsDocument, GetDocumentOperationsDocument, GetJobStatusDocument, CreateDocumentDocument, CreateEmptyDocumentDocument, MutateDocumentDocument, MutateDocumentAsyncDocument, RenameDocumentDocument, AddChildrenDocument, RemoveChildrenDocument, MoveChildrenDocument, DeleteDocumentDocument, DeleteDocumentsDocument, DocumentChangesDocument, JobChangesDocument, PollSyncEnvelopesDocument, TouchChannelDocument, PushSyncEnvelopesDocument, defaultWrapper = (action, _operationName, _operationType, _variables) => action(), SPLIT_LOWER_UPPER_RE, SPLIT_UPPER_UPPER_RE, SPLIT_SEPARATE_NUMBER_RE, DEFAULT_STRIP_REGEXP, SPLIT_REPLACE_VALUE = "$1\x00$2", DEFAULT_PREFIX_SUFFIX_CHARACTERS = "", isServer, useLoading, setLoading, addLoadingEventHandler, loading = null, renownEventFunctions, addRenownEventHandler, useRenown, setRenown, RENOWN_URL = "https://www.renown.id", RENOWN_NETWORK_ID = "eip155", RENOWN_CHAIN_ID = "1", DOMAIN_TYPE, VERIFIABLE_CREDENTIAL_EIP712_TYPE, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, ISSUER_TYPE, CREDENTIAL_TYPES, isExternalControlsEnabledEventFunctions, setIsExternalControlsEnabled, useIsExternalControlsEnabled, addIsExternalControlsEnabledEventHandler, isDragAndDropEnabledEventFunctions, setIsDragAndDropEnabled, useIsDragAndDropEnabled, addIsDragAndDropEnabledEventHandler, allowedDocumentTypesEventFunctions, setAllowedDocumentTypes, addAllowedDocumentTypesEventHandler, phDriveEditorConfigSetters, phDocumentEditorConfigSetters, phDriveEditorConfigHooks, phDocumentEditorConfigHooks, vetraPackageManagerFunctions, useVetraPackageManager, useVetraPackages = () => {
42863
+ }, docCache, fragmentSourceMap, printFragmentWarnings = true, experimentalFragmentVariables = false, extras, PropagationMode2, PhDocumentFieldsFragmentDoc, GetDocumentModelsDocument, GetDocumentDocument, GetDocumentWithOperationsDocument, GetDocumentChildrenDocument, GetDocumentParentsDocument, FindDocumentsDocument, GetDocumentOperationsDocument, GetJobStatusDocument, CreateDocumentDocument, CreateEmptyDocumentDocument, MutateDocumentDocument, MutateDocumentAsyncDocument, RenameDocumentDocument, AddChildrenDocument, RemoveChildrenDocument, MoveChildrenDocument, DeleteDocumentDocument, DeleteDocumentsDocument, DocumentChangesDocument, JobChangesDocument, PollSyncEnvelopesDocument, TouchChannelDocument, PushSyncEnvelopesDocument, defaultWrapper = (action, _operationName, _operationType, _variables) => action(), SPLIT_LOWER_UPPER_RE, SPLIT_UPPER_UPPER_RE, SPLIT_SEPARATE_NUMBER_RE, DEFAULT_STRIP_REGEXP, SPLIT_REPLACE_VALUE = "$1\x00$2", DEFAULT_PREFIX_SUFFIX_CHARACTERS = "", isServer, useLoading, setLoading, addLoadingEventHandler, loading = null, renownEventFunctions, addRenownEventHandler, useRenown, setRenown, RENOWN_URL = "https://www.renown.id", RENOWN_NETWORK_ID = "eip155", RENOWN_CHAIN_ID = "1", DOMAIN_TYPE, VERIFIABLE_CREDENTIAL_EIP712_TYPE, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, ISSUER_TYPE, CREDENTIAL_TYPES, isExternalControlsEnabledEventFunctions, setIsExternalControlsEnabled, useIsExternalControlsEnabled, addIsExternalControlsEnabledEventHandler, isDragAndDropEnabledEventFunctions, setIsDragAndDropEnabled, useIsDragAndDropEnabled, addIsDragAndDropEnabledEventHandler, allowedDocumentTypesEventFunctions, setAllowedDocumentTypes, addAllowedDocumentTypesEventHandler, phDriveEditorConfigSetters, phDocumentEditorConfigSetters, phDriveEditorConfigHooks, phDocumentEditorConfigHooks, vetraPackageManagerFunctions, useVetraPackageManager, useVetraPackages = () => {
42760
42864
  const packageManager = useVetraPackageManager();
42761
42865
  return useSyncExternalStore3((cb) => packageManager ? packageManager.subscribe(cb) : () => {}, () => packageManager?.packages ?? []);
42762
42866
  }, addVetraPackageManagerEventHandler, EMPTY_PENDING, EMPTY_DISMISSED, NOOP_UNSUBSCRIBE = () => {}, documentEventFunctions, useDocumentCache, setDocumentCache, addDocumentCacheEventHandler, base64, locales, defaultLocale, initialMulticharmap, initialCharmap, slug_default, drivesEventFunctions, useDrives, setDrives, addDrivesEventHandler, selectedDriveIdEventFunctions, useSelectedDriveId, setSelectedDriveId, addSelectedDriveIdEventHandler, selectedNodeIdEventFunctions, useSelectedNodeId, setSelectedNodeId, addSelectedNodeIdEventHandler, useRouterBasename, setRouterBasename, addRouterBasenameEventHandler, useVersion, setVersion, addVersionEventHandler, useRequiresHardRefresh, setRequiresHardRefresh, addRequiresHardRefreshEventHandler, useWarnOutdatedApp, setWarnOutdatedApp, addWarnOutdatedAppEventHandler, useStudioMode, setStudioMode, addStudioModeEventHandler, useBasePath, setBasePath, addBasePathEventHandler, useVersionCheckInterval, setVersionCheckInterval, addVersionCheckIntervalEventHandler, useCliVersion, setCliVersion, addCliVersionEventHandler, useFileUploadOperationsChunkSize, setFileUploadOperationsChunkSize, addFileUploadOperationsChunkSizeEventHandler, useIsDocumentModelSelectionSettingsEnabled, setIsDocumentModelSelectionSettingsEnabled, addIsDocumentModelSelectionSettingsEnabledEventHandler, useGaTrackingId, setGaTrackingId, addGaTrackingIdEventHandler, useDefaultDrivesUrl, setDefaultDrivesUrl, addDefaultDrivesUrlEventHandler, useDrivesPreserveStrategy, setDrivesPreserveStrategy, addDrivesPreserveStrategyEventHandler, useIsLocalDrivesEnabled, setIsLocalDrivesEnabled, addIsLocalDrivesEnabledEventHandler, useIsAddDriveEnabled, setIsAddDriveEnabled, addIsAddDriveEnabledEventHandler, useIsPublicDrivesEnabled, setIsPublicDrivesEnabled, addIsPublicDrivesEnabledEventHandler, useIsAddPublicDrivesEnabled, setIsAddPublicDrivesEnabled, addIsAddPublicDrivesEnabledEventHandler, useIsDeletePublicDrivesEnabled, setIsDeletePublicDrivesEnabled, addIsDeletePublicDrivesEnabledEventHandler, useIsCloudDrivesEnabled, setIsCloudDrivesEnabled, addIsCloudDrivesEnabledEventHandler, useIsAddCloudDrivesEnabled, setIsAddCloudDrivesEnabled, addIsAddCloudDrivesEnabledEventHandler, useIsDeleteCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, addIsDeleteCloudDrivesEnabledEventHandler, useLocalDrivesEnabled, setLocalDrivesEnabled, addLocalDrivesEnabledEventHandler, useIsAddLocalDrivesEnabled, setIsAddLocalDrivesEnabled, addIsAddLocalDrivesEnabledEventHandler, useIsDeleteLocalDrivesEnabled, setIsDeleteLocalDrivesEnabled, addIsDeleteLocalDrivesEnabledEventHandler, useIsEditorDebugModeEnabled, setIsEditorDebugModeEnabled, addIsEditorDebugModeEnabledEventHandler, useIsEditorReadModeEnabled, setIsEditorReadModeEnabled, addIsEditorReadModeEnabledEventHandler, useIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsDatabaseWorkerEnabled, addIsAnalyticsDatabaseWorkerEnabledEventHandler, useIsDiffAnalyticsEnabled, setIsDiffAnalyticsEnabled, addIsDiffAnalyticsEnabledEventHandler, useIsDriveAnalyticsEnabled, setIsDriveAnalyticsEnabled, addIsDriveAnalyticsEnabledEventHandler, useRenownUrl, setRenownUrl, addRenownUrlEventHandler, useRenownNetworkId, setRenownNetworkId, addRenownNetworkIdEventHandler, useRenownChainId, setRenownChainId, addRenownChainIdEventHandler, useSentryRelease, setSentryRelease, addSentryReleaseEventHandler, useSentryDsn, setSentryDsn, addSentryDsnEventHandler, useSentryEnv, setSentryEnv, addSentryEnvEventHandler, useIsSentryTracingEnabled, setIsSentryTracingEnabled, addIsSentryTracingEnabledEventHandler, useIsExternalProcessorsEnabled, setIsExternalProcessorsEnabled, addIsExternalProcessorsEnabledEventHandler, useIsExternalPackagesEnabled, setIsExternalPackagesEnabled, addIsExternalPackagesEnabledEventHandler, enabledEditorsEventFunctions, setEnabledEditors, useEnabledEditors, addEnabledEditorsEventHandler, disabledEditorsEventFunctions, setDisabledEditors, useDisabledEditors, addDisabledEditorsEventHandler, isRelationalProcessorsEnabled, setIsRelationalProcessorsEnabled, useIsRelationalProcessorsEnabled, addIsRelationalProcessorsEnabledEventHandler, isExternalRelationalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, addIsExternalRelationalProcessorsEnabledEventHandler, isAnalyticsEnabledEventFunctions, setIsAnalyticsEnabled, useIsAnalyticsEnabled, addIsAnalyticsEnabledEventHandler, isAnalyticsExternalProcessorsEnabled, setIsAnalyticsExternalProcessorsEnabled, useIsAnalyticsExternalProcessorsEnabled, addIsAnalyticsExternalProcessorsEnabledEventHandler, analyticsDatabaseNameEventFunctions, setAnalyticsDatabaseName, useAnalyticsDatabaseName, addAnalyticsDatabaseNameEventHandler, logLevelEventFunctions, setLogLevel2, useLogLevel, addLogLevelEventHandler, allowListEventFunctions, setAllowList, useAllowList, addAllowListEventHandler, nonUserConfigSetters, phGlobalConfigSetters, nonUserConfigHooks, phGlobalConfigHooks, reactorClientModuleEventFunctions, reactorClientEventFunctions, useReactorClientModule, setReactorClientModule, addReactorClientModuleEventHandler, useReactorClient, setReactorClient, addReactorClientEventHandler, useSync = () => useReactorClientModule()?.reactorModule?.syncModule?.syncManager, useSyncList = () => {
@@ -43629,7 +43733,7 @@ ${String(result)}`);
43629
43733
  }, MAX_RETRIES = 5, RETRY_DELAY = 200, isRelationNotExistError = (error) => {
43630
43734
  const errorMessage = error instanceof Error ? error.message : typeof error === "string" ? error : String(error);
43631
43735
  return errorMessage.toLowerCase().includes("relation") && errorMessage.toLowerCase().includes("does not exist");
43632
- }, import_lodash, ConflictError, Slot, lightStyles, darkStyles, styles, POPOVER_GAP = 4, POPOVER_HEIGHT = 150, styles2;
43736
+ }, import_lodash, DEFAULT_PAGE_SIZE = 100, ConflictError, Slot, lightStyles, darkStyles, styles, POPOVER_GAP = 4, POPOVER_HEIGHT = 150, styles2;
43633
43737
  var init_src2 = __esm(() => {
43634
43738
  init_src();
43635
43739
  init_src();
@@ -47609,6 +47713,64 @@ spurious results.`);
47609
47713
  }
47610
47714
  }
47611
47715
  ${PhDocumentFieldsFragmentDoc}
47716
+ `;
47717
+ GetDocumentWithOperationsDocument = gql2`
47718
+ query GetDocumentWithOperations(
47719
+ $identifier: String!
47720
+ $view: ViewFilterInput
47721
+ $operationsFilter: DocumentOperationsFilterInput
47722
+ $operationsPaging: PagingInput
47723
+ ) {
47724
+ document(identifier: $identifier, view: $view) {
47725
+ document {
47726
+ ...PHDocumentFields
47727
+ operations(filter: $operationsFilter, paging: $operationsPaging) {
47728
+ items {
47729
+ index
47730
+ timestampUtcMs
47731
+ hash
47732
+ skip
47733
+ error
47734
+ id
47735
+ action {
47736
+ id
47737
+ type
47738
+ timestampUtcMs
47739
+ input
47740
+ scope
47741
+ attachments {
47742
+ data
47743
+ mimeType
47744
+ hash
47745
+ extension
47746
+ fileName
47747
+ }
47748
+ context {
47749
+ signer {
47750
+ user {
47751
+ address
47752
+ networkId
47753
+ chainId
47754
+ }
47755
+ app {
47756
+ name
47757
+ key
47758
+ }
47759
+ signatures
47760
+ }
47761
+ }
47762
+ }
47763
+ }
47764
+ totalCount
47765
+ hasNextPage
47766
+ hasPreviousPage
47767
+ cursor
47768
+ }
47769
+ }
47770
+ childIds
47771
+ }
47772
+ }
47773
+ ${PhDocumentFieldsFragmentDoc}
47612
47774
  `;
47613
47775
  GetDocumentChildrenDocument = gql2`
47614
47776
  query GetDocumentChildren(