@ductape/sdk 0.0.4-v55 → 0.0.4-v57

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ImportDocsTypes, IApp, IAppConstants, IAppEnv, IAppVariables, IAppWebhook, IAppWebhookEvent, ICreateAppBuilder, IProduct, IProductApp, IProductCache, IProductDatabase, IProductEnv, IProductJobs, IProductStorage, IActionProcessorInput, IProductMessageBroker, IProductNotification, INotificationProcessorInput, IProductNotificationTemplate, IStorageProcessorInput, IParsedSample, IRegisterWebhook, IGenerateWebhookLink, IAppAuth, IProductMessageBrokerTopic, IAppAction, LogQueryParams, IProductQuota, FetchRemoteCachePayload, IFileReadResult, IProductSession, IActionUpdate, IProductFallback, IFetchUsersPayload, IProductAppHealth, IActionDispatchInput, INotificationDispatchInput, IStorageDispatchInput, IPublishDispatchInput, IDispatchResult } from './types';
1
+ import { ImportDocsTypes, IApp, IAppConstants, IAppEnv, IAppVariables, IAppWebhook, IAppWebhookEvent, ICreateAppBuilder, IProduct, IProductApp, IProductCache, IProductDatabase, IProductEnv, IProductJobs, IProductStorage, IActionProcessorInput, IProductMessageBroker, IProductNotification, INotificationProcessorInput, IProductNotificationTemplate, IStorageProcessorInput, IParsedSample, IRegisterWebhook, IGenerateWebhookLink, IAppAuth, IProductMessageBrokerTopic, IAppAction, LogQueryParams, IProductQuota, FetchRemoteCachePayload, IFileReadResult, IProductSession, IActionUpdate, IProductFallback, IFetchUsersPayload, IActionDispatchInput, INotificationDispatchInput, IStorageDispatchInput, IPublishDispatchInput, IDispatchResult, IDispatchSchedule } from './types';
2
2
  import { IDuctapeInit } from './types/index.types';
3
3
  import { PublicStates } from './types/enums';
4
4
  import { DatabaseService, IActionCreateOptions, IActionUpdateOptions, ISimpleSchemaDefinition, ISimpleCreateOptions, ISimpleDropOptions, ISimpleFieldDefinition, SimpleFieldType, ISimpleIndexOptions, ISchemaOperationResult, IIndexFieldDefinition, ITableSchema, IIndexInfo } from './database';
@@ -6,6 +6,7 @@ import { IConstraintDefinition as IMigrationConstraintDefinition } from './datab
6
6
  import { IDBActionDispatchInput } from './types/processor.types';
7
7
  import { GraphService } from './graph';
8
8
  import { WorkflowService } from './workflows';
9
+ import { IHealthcheckDefineOptions, IDefinedHealthcheck, IQuotaDefineOptions, IDefinedQuota, IFallbackDefineOptions, IDefinedFallback } from './resilience';
9
10
  import { AgentsService } from './agents';
10
11
  import { ModelService } from './models';
11
12
  import { VectorDatabaseService } from './vector';
@@ -278,6 +279,9 @@ export default class Ductape implements IDuctape {
278
279
  private _cacheService;
279
280
  private _jobsService;
280
281
  private _secretsService;
282
+ private _quotaService;
283
+ private _fallbackService;
284
+ private _healthcheckService;
281
285
  private loggerService;
282
286
  private importService;
283
287
  private environment;
@@ -445,38 +449,6 @@ export default class Ductape implements IDuctape {
445
449
  */
446
450
  generateLink: (data: IGenerateWebhookLink) => Promise<string>;
447
451
  };
448
- health: {
449
- /**
450
- * Creates a health check for an app.
451
- * @param {string} product - The product tag.
452
- * @param {Partial<IProductAppHealth>} data - The health check data.
453
- * @returns {Promise<void>} Resolves when the health check is created. Throws on error.
454
- */
455
- create: (product: string, data: Partial<IProductAppHealth>) => Promise<void>;
456
- /**
457
- * Updates a health check by tag.
458
- * @param {string} product - The product tag.
459
- * @param {string} tag - The health check tag.
460
- * @param {Partial<IProductAppHealth>} data - The health check data to update.
461
- * @returns {Promise<void>} Resolves when the health check is updated. Throws on error.
462
- */
463
- update: (product: string, tag: string, data: Partial<IProductAppHealth>) => Promise<void>;
464
- /**
465
- * Fetches a health check by access tag and tag.
466
- * @param {string} product - The product tag.
467
- * @param {string} access_tag - The app access tag.
468
- * @param {string} tag - The health check tag.
469
- * @returns {Promise<IProductAppHealth|null>} The fetched health check, or null if not found.
470
- */
471
- fetch: (product: string, access_tag: string, tag: string) => Promise<IProductAppHealth>;
472
- /**
473
- * Fetches all health checks for an app by access tag.
474
- * @param {string} product - The product tag.
475
- * @param {string} access_tag - The app access tag.
476
- * @returns {Promise<IProductAppHealth[]>} The list of health checks.
477
- */
478
- list: (product: string, access_tag: string) => Promise<IProductAppHealth[]>;
479
- };
480
452
  };
481
453
  };
482
454
  /**
@@ -585,42 +557,54 @@ export default class Ductape implements IDuctape {
585
557
  }) => Promise<import("./sessions").IListSessionsResult>;
586
558
  };
587
559
  /**
588
- * Quota-related operations for managing product quotas.
560
+ * Quota-related operations for managing product quotas with weighted distribution.
589
561
  */
590
562
  quota: {
563
+ /**
564
+ * Defines a quota using code-first API.
565
+ * @param {IQuotaDefineOptions} options - The quota definition options.
566
+ * @param {string} [options.product] - The product tag (if provided, registers immediately).
567
+ * @param {string} options.tag - The quota tag.
568
+ * @param {string} [options.name] - The quota name.
569
+ * @param {string} [options.description] - The quota description.
570
+ * @param {Object} [options.input] - The input schema definition.
571
+ * @param {Function} options.handler - The handler function to configure the quota.
572
+ * @returns {Promise<IDefinedQuota>} The defined quota.
573
+ */
574
+ define: (options: IQuotaDefineOptions) => Promise<IDefinedQuota>;
591
575
  /**
592
576
  * Creates a quota for a product.
593
577
  * @param {string} product - The product tag.
594
- * @param {Partial<IProductQuota>} data - The quota data.
595
- * @returns {Promise<void>} Resolves when the quota is created. Throws on error.
578
+ * @param {any} data - The quota data (schema or defined quota).
579
+ * @returns {Promise<any>} The created quota schema.
596
580
  */
597
- create: (product: string, data: Partial<IProductQuota>) => Promise<void>;
581
+ create: (product: string, data: any) => Promise<IProductQuota>;
598
582
  /**
599
583
  * Fetches a quota by tag.
600
584
  * @param {string} product - The product tag.
601
585
  * @param {string} tag - The quota tag.
602
- * @returns {IProductQuota|null} The fetched quota, or null if not found.
586
+ * @returns {Promise<any>} The fetched quota.
603
587
  */
604
588
  fetch: (product: string, tag: string) => Promise<IProductQuota>;
605
589
  /**
606
590
  * Fetches all quotas for a product.
607
591
  * @param {string} product - The product tag.
608
- * @returns {IProductQuota[]} The list of quotas.
592
+ * @returns {Promise<any[]>} The list of quotas.
609
593
  */
610
594
  list: (product: string) => Promise<IProductQuota[]>;
611
595
  /**
612
596
  * Updates a quota by tag.
613
597
  * @param {string} product - The product tag.
614
598
  * @param {string} tag - The quota tag.
615
- * @param {Partial<IProductQuota>} data - The quota data to update.
616
- * @returns {Promise<void>} Resolves when the quota is updated. Throws on error.
599
+ * @param {any} data - The quota data to update.
600
+ * @returns {Promise<any>} The updated quota schema.
617
601
  */
618
- update: (product: string, tag: string, data: Partial<IProductQuota>) => Promise<void>;
602
+ update: (product: string, tag: string, data: any) => Promise<void>;
619
603
  /**
620
604
  * Deletes a quota by tag.
621
605
  * @param {string} product - The product tag.
622
606
  * @param {string} tag - The quota tag.
623
- * @returns {Promise<void>} Resolves when the quota is deleted. Throws on error.
607
+ * @returns {Promise<void>} Resolves when the quota is deleted.
624
608
  */
625
609
  delete: (product: string, tag: string) => Promise<void>;
626
610
  /**
@@ -637,45 +621,76 @@ export default class Ductape implements IDuctape {
637
621
  env: string;
638
622
  tag: string;
639
623
  input: Record<string, unknown>;
640
- }) => Promise<unknown>;
624
+ }) => Promise<import("./resilience/quota.service").IQuotaRunResult<unknown>>;
625
+ /**
626
+ * Dispatches a quota for deferred execution.
627
+ * @param {Object} data - The quota dispatch input.
628
+ * @param {string} data.product - The product tag.
629
+ * @param {string} data.env - The environment slug.
630
+ * @param {string} data.tag - The quota tag.
631
+ * @param {Record<string, unknown>} data.input - The input data for the quota.
632
+ * @param {IDispatchSchedule} [data.schedule] - Optional schedule for deferred execution.
633
+ * @returns {Promise<{ jobId: string }>} The dispatch result with job ID.
634
+ */
635
+ dispatch: (data: {
636
+ product: string;
637
+ env: string;
638
+ tag: string;
639
+ input: Record<string, unknown>;
640
+ schedule?: IDispatchSchedule;
641
+ }) => Promise<{
642
+ jobId: string;
643
+ }>;
641
644
  };
642
645
  /**
643
- * Fallback-related operations for managing product fallbacks.
646
+ * Fallback-related operations for managing product fallbacks with sequential failover.
644
647
  */
645
648
  fallback: {
649
+ /**
650
+ * Defines a fallback using code-first API.
651
+ * @param {IFallbackDefineOptions} options - The fallback definition options.
652
+ * @param {string} [options.product] - The product tag (if provided, registers immediately).
653
+ * @param {string} options.tag - The fallback tag.
654
+ * @param {string} [options.name] - The fallback name.
655
+ * @param {string} [options.description] - The fallback description.
656
+ * @param {Object} [options.input] - The input schema definition.
657
+ * @param {Function} options.handler - The handler function to configure the fallback.
658
+ * @returns {Promise<IDefinedFallback>} The defined fallback.
659
+ */
660
+ define: (options: IFallbackDefineOptions) => Promise<IDefinedFallback>;
646
661
  /**
647
662
  * Creates a fallback for a product.
648
663
  * @param {string} product - The product tag.
649
- * @param {Partial<IProductFallback>} data - The fallback data.
650
- * @returns {Promise<void>} Resolves when the fallback is created. Throws on error.
664
+ * @param {any} data - The fallback data (schema or defined fallback).
665
+ * @returns {Promise<any>} The created fallback schema.
651
666
  */
652
- create: (product: string, data: Partial<IProductFallback>) => Promise<void>;
667
+ create: (product: string, data: any) => Promise<IProductFallback>;
653
668
  /**
654
669
  * Fetches a fallback by tag.
655
670
  * @param {string} product - The product tag.
656
671
  * @param {string} tag - The fallback tag.
657
- * @returns {IProductFallback|null} The fetched fallback, or null if not found.
672
+ * @returns {Promise<any>} The fetched fallback.
658
673
  */
659
674
  fetch: (product: string, tag: string) => Promise<IProductFallback>;
660
675
  /**
661
676
  * Fetches all fallbacks for a product.
662
677
  * @param {string} product - The product tag.
663
- * @returns {IProductFallback[]} The list of fallbacks.
678
+ * @returns {Promise<any[]>} The list of fallbacks.
664
679
  */
665
680
  list: (product: string) => Promise<IProductFallback[]>;
666
681
  /**
667
682
  * Updates a fallback by tag.
668
683
  * @param {string} product - The product tag.
669
684
  * @param {string} tag - The fallback tag.
670
- * @param {Partial<IProductFallback>} data - The fallback data to update.
671
- * @returns {Promise<void>} Resolves when the fallback is updated. Throws on error.
685
+ * @param {any} data - The fallback data to update.
686
+ * @returns {Promise<any>} The updated fallback schema.
672
687
  */
673
- update: (product: string, tag: string, data: Partial<IProductFallback>) => Promise<void>;
688
+ update: (product: string, tag: string, data: any) => Promise<void>;
674
689
  /**
675
690
  * Deletes a fallback by tag.
676
691
  * @param {string} product - The product tag.
677
692
  * @param {string} tag - The fallback tag.
678
- * @returns {Promise<void>} Resolves when the fallback is deleted. Throws on error.
693
+ * @returns {Promise<void>} Resolves when the fallback is deleted.
679
694
  */
680
695
  delete: (product: string, tag: string) => Promise<void>;
681
696
  /**
@@ -692,7 +707,116 @@ export default class Ductape implements IDuctape {
692
707
  env: string;
693
708
  tag: string;
694
709
  input: Record<string, unknown>;
695
- }) => Promise<unknown>;
710
+ }) => Promise<import("./resilience/fallback.service").IFallbackRunResult<unknown>>;
711
+ /**
712
+ * Dispatches a fallback for deferred execution.
713
+ * @param {Object} data - The fallback dispatch input.
714
+ * @param {string} data.product - The product tag.
715
+ * @param {string} data.env - The environment slug.
716
+ * @param {string} data.tag - The fallback tag.
717
+ * @param {Record<string, unknown>} data.input - The input data for the fallback.
718
+ * @param {IDispatchSchedule} [data.schedule] - Optional schedule for deferred execution.
719
+ * @returns {Promise<{ jobId: string }>} The dispatch result with job ID.
720
+ */
721
+ dispatch: (data: {
722
+ product: string;
723
+ env: string;
724
+ tag: string;
725
+ input: Record<string, unknown>;
726
+ schedule?: IDispatchSchedule;
727
+ }) => Promise<{
728
+ jobId: string;
729
+ }>;
730
+ };
731
+ /**
732
+ * Healthcheck-related operations for managing product healthchecks.
733
+ */
734
+ health: {
735
+ /**
736
+ * Defines a healthcheck using code-first API.
737
+ * @param {IHealthcheckDefineOptions} options - The healthcheck definition options.
738
+ * @param {string} [options.product] - The product tag (if provided, registers immediately).
739
+ * @param {string} options.tag - The healthcheck tag.
740
+ * @param {string} [options.name] - The healthcheck name.
741
+ * @param {string} [options.description] - The healthcheck description.
742
+ * @param {Function} options.handler - The handler function to configure the healthcheck.
743
+ * @returns {Promise<IDefinedHealthcheck>} The defined healthcheck.
744
+ */
745
+ define: (options: IHealthcheckDefineOptions) => Promise<IDefinedHealthcheck>;
746
+ /**
747
+ * Creates a healthcheck for a product.
748
+ * @param {string} product - The product tag.
749
+ * @param {Object} data - The healthcheck data (schema or defined healthcheck).
750
+ * @returns {Promise<IHealthcheckSchema>} The created healthcheck schema.
751
+ */
752
+ create: (product: string, data: any) => Promise<import("./resilience").IHealthcheckSchema>;
753
+ /**
754
+ * Fetches a healthcheck by tag.
755
+ * @param {string} product - The product tag.
756
+ * @param {string} tag - The healthcheck tag.
757
+ * @returns {Promise<IHealthcheckSchema>} The fetched healthcheck.
758
+ */
759
+ fetch: (product: string, tag: string) => Promise<import("./resilience").IHealthcheckSchema>;
760
+ /**
761
+ * Fetches all healthchecks for a product.
762
+ * @param {string} product - The product tag.
763
+ * @returns {Promise<IHealthcheckSchema[]>} The list of healthchecks.
764
+ */
765
+ list: (product: string) => Promise<import("./resilience").IHealthcheckSchema[]>;
766
+ /**
767
+ * Updates a healthcheck by tag.
768
+ * @param {string} product - The product tag.
769
+ * @param {string} tag - The healthcheck tag.
770
+ * @param {Object} data - The healthcheck data to update.
771
+ * @returns {Promise<IHealthcheckSchema>} The updated healthcheck schema.
772
+ */
773
+ update: (product: string, tag: string, data: any) => Promise<import("./resilience").IHealthcheckSchema>;
774
+ /**
775
+ * Deletes a healthcheck by tag.
776
+ * @param {string} product - The product tag.
777
+ * @param {string} tag - The healthcheck tag.
778
+ * @returns {Promise<void>} Resolves when the healthcheck is deleted.
779
+ */
780
+ delete: (product: string, tag: string) => Promise<void>;
781
+ /**
782
+ * Gets the current status of a healthcheck.
783
+ * @param {Object} options - The status check options.
784
+ * @param {string} options.product - The product tag.
785
+ * @param {string} options.env - The environment slug.
786
+ * @param {string} options.tag - The healthcheck tag.
787
+ * @returns {Promise<IHealthcheckStatus>} The healthcheck status.
788
+ */
789
+ status: (options: {
790
+ product: string;
791
+ env: string;
792
+ tag: string;
793
+ }) => Promise<import("./resilience").IHealthcheckStatus>;
794
+ /**
795
+ * Manually triggers a healthcheck run.
796
+ * @param {Object} options - The run options.
797
+ * @param {string} options.product - The product tag.
798
+ * @param {string} options.env - The environment slug.
799
+ * @param {string} options.tag - The healthcheck tag.
800
+ * @returns {Promise<IHealthcheckRunResult>} The result of the healthcheck run.
801
+ */
802
+ run: (options: {
803
+ product: string;
804
+ env: string;
805
+ tag: string;
806
+ }) => Promise<import("./resilience").IHealthcheckRunResult>;
807
+ /**
808
+ * Checks the health of a service (alias for status).
809
+ * @param {Object} options - The check options.
810
+ * @param {string} options.product - The product tag.
811
+ * @param {string} options.env - The environment slug.
812
+ * @param {string} options.tag - The healthcheck tag.
813
+ * @returns {Promise<IHealthcheckStatus>} The healthcheck status.
814
+ */
815
+ check: (options: {
816
+ product: string;
817
+ env: string;
818
+ tag: string;
819
+ }) => Promise<import("./resilience").IHealthcheckStatus>;
696
820
  };
697
821
  /**
698
822
  * Storage-related operations for managing product storages.
@@ -1417,9 +1541,364 @@ export default class Ductape implements IDuctape {
1417
1541
  */
1418
1542
  graph: {
1419
1543
  /**
1420
- * Get the underlying GraphService instance
1544
+ * Get the underlying GraphService instance for advanced operations.
1545
+ * @returns {Promise<GraphService>} The graph service instance.
1421
1546
  */
1422
1547
  getService: () => Promise<GraphService>;
1548
+ /**
1549
+ * Creates a graph configuration for a product.
1550
+ * @param {any} graphConfig - The graph configuration.
1551
+ * @param {string} [productTag] - The product tag.
1552
+ * @returns {Promise<void>} Resolves when the graph is created.
1553
+ */
1554
+ create: (graphConfig: any, productTag?: string) => Promise<void>;
1555
+ /**
1556
+ * Fetches a graph configuration by tag.
1557
+ * @param {string} graphTag - The graph tag.
1558
+ * @param {string} [productTag] - The product tag.
1559
+ * @returns {Promise<any>} The fetched graph configuration.
1560
+ */
1561
+ fetch: (graphTag: string, productTag?: string) => Promise<import("./graph").IGraphConfig>;
1562
+ /**
1563
+ * Fetches all graph configurations for a product.
1564
+ * @param {string} [productTag] - The product tag.
1565
+ * @returns {Promise<any[]>} The list of graph configurations.
1566
+ */
1567
+ list: (productTag?: string) => Promise<import("./graph").IGraphConfig[]>;
1568
+ /**
1569
+ * Updates a graph configuration by tag.
1570
+ * @param {string} graphTag - The graph tag.
1571
+ * @param {any} updates - The updates to apply.
1572
+ * @param {string} [productTag] - The product tag.
1573
+ * @returns {Promise<void>} Resolves when the graph is updated.
1574
+ */
1575
+ update: (graphTag: string, updates: any, productTag?: string) => Promise<void>;
1576
+ /**
1577
+ * Deletes a graph configuration by tag.
1578
+ * @param {string} graphTag - The graph tag.
1579
+ * @param {string} [productTag] - The product tag.
1580
+ * @returns {Promise<void>} Resolves when the graph is deleted.
1581
+ */
1582
+ delete: (graphTag: string, productTag?: string) => Promise<void>;
1583
+ /**
1584
+ * Connects to a graph database.
1585
+ * @param {any} config - The connection configuration.
1586
+ * @returns {Promise<any>} The connection result.
1587
+ */
1588
+ connect: (config: any) => Promise<import("./graph").IGraphConnectionResult>;
1589
+ /**
1590
+ * Disconnects from the current graph database.
1591
+ * @returns {Promise<void>} Resolves when disconnected.
1592
+ */
1593
+ disconnect: () => Promise<void>;
1594
+ /**
1595
+ * Closes all graph database connections.
1596
+ * @returns {Promise<void>} Resolves when all connections are closed.
1597
+ */
1598
+ closeAll: () => Promise<void>;
1599
+ /**
1600
+ * Tests a connection to a graph database without persisting.
1601
+ * @param {any} config - The connection configuration.
1602
+ * @returns {Promise<any>} The test connection result.
1603
+ */
1604
+ testConnection: (config: any) => Promise<import("./graph").IGraphTestConnectionResult>;
1605
+ /**
1606
+ * Creates a node in the graph.
1607
+ * @param {any} options - The node creation options.
1608
+ * @param {any} [transaction] - Optional transaction.
1609
+ * @returns {Promise<any>} The created node result.
1610
+ */
1611
+ createNode: (options: any, transaction?: any) => Promise<import("./graph").ICreateNodeResult<any>>;
1612
+ /**
1613
+ * Finds nodes by criteria.
1614
+ * @param {any} options - The find options.
1615
+ * @param {any} [transaction] - Optional transaction.
1616
+ * @returns {Promise<any>} The found nodes result.
1617
+ */
1618
+ findNodes: (options: any, transaction?: any) => Promise<import("./graph").IFindNodesResult<any>>;
1619
+ /**
1620
+ * Finds a node by ID.
1621
+ * @param {string | number} id - The node ID.
1622
+ * @param {any} [transaction] - Optional transaction.
1623
+ * @returns {Promise<any>} The found node or null.
1624
+ */
1625
+ findNodeById: (id: string | number, transaction?: any) => Promise<import("./graph").INode<any>>;
1626
+ /**
1627
+ * Updates a node.
1628
+ * @param {any} options - The update options.
1629
+ * @param {any} [transaction] - Optional transaction.
1630
+ * @returns {Promise<any>} The updated node result.
1631
+ */
1632
+ updateNode: (options: any, transaction?: any) => Promise<import("./graph").IUpdateNodeResult<any>>;
1633
+ /**
1634
+ * Deletes a node.
1635
+ * @param {any} options - The delete options.
1636
+ * @param {any} [transaction] - Optional transaction.
1637
+ * @returns {Promise<any>} The delete result.
1638
+ */
1639
+ deleteNode: (options: any, transaction?: any) => Promise<import("./graph").IDeleteNodeResult>;
1640
+ /**
1641
+ * Merges a node (create or update).
1642
+ * @param {any} options - The merge options.
1643
+ * @param {any} [transaction] - Optional transaction.
1644
+ * @returns {Promise<any>} The merge result.
1645
+ */
1646
+ mergeNode: (options: any, transaction?: any) => Promise<import("./graph").IMergeNodeResult<any>>;
1647
+ /**
1648
+ * Adds labels to an existing node.
1649
+ * @param {any} options - The add labels options (id, labels).
1650
+ * @param {any} [transaction] - Optional transaction.
1651
+ * @returns {Promise<any>} The result with added labels.
1652
+ */
1653
+ addLabels: (options: any, transaction?: any) => Promise<import("./graph").IAddLabelsResult<any>>;
1654
+ /**
1655
+ * Removes labels from an existing node.
1656
+ * @param {any} options - The remove labels options (id, labels).
1657
+ * @param {any} [transaction] - Optional transaction.
1658
+ * @returns {Promise<any>} The result with removed labels.
1659
+ */
1660
+ removeLabels: (options: any, transaction?: any) => Promise<import("./graph").IRemoveLabelsResult<any>>;
1661
+ /**
1662
+ * Sets labels on a node (replaces all existing labels).
1663
+ * @param {any} options - The set labels options (id, labels).
1664
+ * @param {any} [transaction] - Optional transaction.
1665
+ * @returns {Promise<any>} The result with previous and new labels.
1666
+ */
1667
+ setLabels: (options: any, transaction?: any) => Promise<import("./graph").ISetLabelsResult<any>>;
1668
+ /**
1669
+ * Creates a relationship between nodes.
1670
+ * @param {any} options - The relationship creation options.
1671
+ * @param {any} [transaction] - Optional transaction.
1672
+ * @returns {Promise<any>} The created relationship result.
1673
+ */
1674
+ createRelationship: (options: any, transaction?: any) => Promise<import("./graph").ICreateRelationshipResult<any>>;
1675
+ /**
1676
+ * Finds relationships by criteria.
1677
+ * @param {any} options - The find options.
1678
+ * @param {any} [transaction] - Optional transaction.
1679
+ * @returns {Promise<any>} The found relationships result.
1680
+ */
1681
+ findRelationships: (options: any, transaction?: any) => Promise<import("./graph").IFindRelationshipsResult<any>>;
1682
+ /**
1683
+ * Finds a relationship by ID.
1684
+ * @param {string | number} id - The relationship ID.
1685
+ * @param {any} [transaction] - Optional transaction.
1686
+ * @returns {Promise<any>} The found relationship or null.
1687
+ */
1688
+ findRelationshipById: (id: string | number, transaction?: any) => Promise<import("./graph").IRelationship<any>>;
1689
+ /**
1690
+ * Updates a relationship.
1691
+ * @param {any} options - The update options.
1692
+ * @param {any} [transaction] - Optional transaction.
1693
+ * @returns {Promise<any>} The updated relationship result.
1694
+ */
1695
+ updateRelationship: (options: any, transaction?: any) => Promise<import("./graph").IUpdateRelationshipResult<any>>;
1696
+ /**
1697
+ * Deletes a relationship.
1698
+ * @param {any} options - The delete options.
1699
+ * @param {any} [transaction] - Optional transaction.
1700
+ * @returns {Promise<any>} The delete result.
1701
+ */
1702
+ deleteRelationship: (options: any, transaction?: any) => Promise<import("./graph").IDeleteRelationshipResult>;
1703
+ /**
1704
+ * Merges a relationship (create or update).
1705
+ * @param {any} options - The merge options.
1706
+ * @param {any} [transaction] - Optional transaction.
1707
+ * @returns {Promise<any>} The merge result.
1708
+ */
1709
+ mergeRelationship: (options: any, transaction?: any) => Promise<import("./graph").IMergeRelationshipResult<any>>;
1710
+ /**
1711
+ * Traverses the graph from a starting node.
1712
+ * @param {any} options - The traversal options.
1713
+ * @param {any} [transaction] - Optional transaction.
1714
+ * @returns {Promise<any>} The traversal result.
1715
+ */
1716
+ traverse: (options: any, transaction?: any) => Promise<import("./graph").ITraverseResult<any, any>>;
1717
+ /**
1718
+ * Finds the shortest path between two nodes.
1719
+ * @param {any} options - The shortest path options.
1720
+ * @param {any} [transaction] - Optional transaction.
1721
+ * @returns {Promise<any>} The shortest path result.
1722
+ */
1723
+ shortestPath: (options: any, transaction?: any) => Promise<import("./graph").IShortestPathResult<any, any>>;
1724
+ /**
1725
+ * Finds all paths between two nodes.
1726
+ * @param {any} options - The all paths options.
1727
+ * @param {any} [transaction] - Optional transaction.
1728
+ * @returns {Promise<any>} The all paths result.
1729
+ */
1730
+ allPaths: (options: any, transaction?: any) => Promise<import("./graph").IAllPathsResult<any, any>>;
1731
+ /**
1732
+ * Gets the neighborhood of a node.
1733
+ * @param {any} options - The neighborhood options.
1734
+ * @param {any} [transaction] - Optional transaction.
1735
+ * @returns {Promise<any>} The neighborhood result.
1736
+ */
1737
+ getNeighborhood: (options: any, transaction?: any) => Promise<import("./graph").INeighborhoodResult<any, any>>;
1738
+ /**
1739
+ * Finds connected components in the graph.
1740
+ * @param {any} options - The connected components options.
1741
+ * @param {any} [transaction] - Optional transaction.
1742
+ * @returns {Promise<any>} The connected components result.
1743
+ */
1744
+ findConnectedComponents: (options: any, transaction?: any) => Promise<import("./graph").IConnectedComponentsResult<any>>;
1745
+ /**
1746
+ * Executes a raw Cypher query against the graph database.
1747
+ * @param {string} query - The Cypher query string.
1748
+ * @param {Record<string, any>} [params] - Query parameters.
1749
+ * @param {any} [transaction] - Optional transaction.
1750
+ * @returns {Promise<any>} The query result.
1751
+ */
1752
+ query: (query: string, params?: Record<string, any>, transaction?: any) => Promise<import("./graph").IRawQueryResult<any>>;
1753
+ /**
1754
+ * Gets graph statistics.
1755
+ * @param {any} [transaction] - Optional transaction.
1756
+ * @returns {Promise<any>} The graph statistics.
1757
+ */
1758
+ getStatistics: (transaction?: any) => Promise<import("./graph").IGraphStatistics>;
1759
+ /**
1760
+ * Counts nodes matching criteria.
1761
+ * @param {string[]} [labels] - Node labels to filter by.
1762
+ * @param {any} [where] - Where clause for filtering.
1763
+ * @param {any} [transaction] - Optional transaction.
1764
+ * @returns {Promise<any>} The count result.
1765
+ */
1766
+ countNodes: (labels?: string[], where?: any, transaction?: any) => Promise<import("./graph").ICountNodesResult>;
1767
+ /**
1768
+ * Counts relationships matching criteria.
1769
+ * @param {string[]} [types] - Relationship types to filter by.
1770
+ * @param {any} [where] - Where clause for filtering.
1771
+ * @param {any} [transaction] - Optional transaction.
1772
+ * @returns {Promise<any>} The count result.
1773
+ */
1774
+ countRelationships: (types?: string[], where?: any, transaction?: any) => Promise<import("./graph").ICountRelationshipsResult>;
1775
+ /**
1776
+ * Performs full-text search.
1777
+ * @param {any} options - The search options.
1778
+ * @param {any} [transaction] - Optional transaction.
1779
+ * @returns {Promise<any>} The search result.
1780
+ */
1781
+ fullTextSearch: (options: any, transaction?: any) => Promise<import("./graph").IFullTextSearchResult<any>>;
1782
+ /**
1783
+ * Performs vector similarity search.
1784
+ * @param {any} options - The search options.
1785
+ * @param {any} [transaction] - Optional transaction.
1786
+ * @returns {Promise<any>} The search result.
1787
+ */
1788
+ vectorSearch: (options: any, transaction?: any) => Promise<import("./graph").IVectorSearchResult<any>>;
1789
+ /**
1790
+ * Creates a node index.
1791
+ * @param {any} options - The index creation options.
1792
+ * @returns {Promise<any>} The index creation result.
1793
+ */
1794
+ createNodeIndex: (options: any) => Promise<import("./graph").ICreateIndexResult>;
1795
+ /**
1796
+ * Creates a node constraint.
1797
+ * @param {any} options - The constraint creation options.
1798
+ * @returns {Promise<any>} The constraint creation result.
1799
+ */
1800
+ createNodeConstraint: (options: any) => Promise<import("./graph").ICreateConstraintResult>;
1801
+ /**
1802
+ * Creates a relationship index.
1803
+ * @param {any} options - The index creation options.
1804
+ * @returns {Promise<any>} The index creation result.
1805
+ */
1806
+ createRelationshipIndex: (options: any) => Promise<import("./graph").ICreateIndexResult>;
1807
+ /**
1808
+ * Lists all indexes.
1809
+ * @returns {Promise<any>} The list of indexes.
1810
+ */
1811
+ listIndexes: () => Promise<import("./graph").IListIndexesResult>;
1812
+ /**
1813
+ * Lists all constraints.
1814
+ * @returns {Promise<any>} The list of constraints.
1815
+ */
1816
+ listConstraints: () => Promise<import("./graph").IListConstraintsResult>;
1817
+ /**
1818
+ * Drops an index by name.
1819
+ * @param {string} name - The index name.
1820
+ * @returns {Promise<any>} The drop result.
1821
+ */
1822
+ dropIndex: (name: string) => Promise<import("./graph").IDropIndexResult>;
1823
+ /**
1824
+ * Drops a constraint by name.
1825
+ * @param {string} name - The constraint name.
1826
+ * @returns {Promise<any>} The drop result.
1827
+ */
1828
+ dropConstraint: (name: string) => Promise<import("./graph").IDropConstraintResult>;
1829
+ /**
1830
+ * Lists all node labels.
1831
+ * @returns {Promise<any>} The list of labels.
1832
+ */
1833
+ listLabels: () => Promise<import("./graph").IListLabelsResult>;
1834
+ /**
1835
+ * Lists all relationship types.
1836
+ * @returns {Promise<any>} The list of relationship types.
1837
+ */
1838
+ listRelationshipTypes: () => Promise<import("./graph").IListRelationshipTypesResult>;
1839
+ /**
1840
+ * Creates a graph action.
1841
+ * @param {any} options - The action creation options.
1842
+ * @param {string} [productTag] - The product tag.
1843
+ * @returns {Promise<any>} The created action.
1844
+ */
1845
+ createAction: (options: any, productTag?: string) => Promise<import("./graph").IGraphAction>;
1846
+ /**
1847
+ * Lists graph actions.
1848
+ * @param {string} [graphTag] - The graph tag.
1849
+ * @param {string} [productTag] - The product tag.
1850
+ * @returns {Promise<any>} The list of actions.
1851
+ */
1852
+ listActions: (graphTag?: string, productTag?: string) => Promise<import("./graph").IListGraphActionsResult>;
1853
+ /**
1854
+ * Gets a graph action by tag.
1855
+ * @param {string} actionTag - The action tag.
1856
+ * @param {string} [graphTag] - The graph tag.
1857
+ * @param {string} [productTag] - The product tag.
1858
+ * @returns {Promise<any>} The action or null.
1859
+ */
1860
+ getAction: (actionTag: string, graphTag?: string, productTag?: string) => Promise<import("./graph").IGraphAction>;
1861
+ /**
1862
+ * Updates a graph action.
1863
+ * @param {string} actionTag - The action tag.
1864
+ * @param {any} updates - The updates to apply.
1865
+ * @param {string} [graphTag] - The graph tag.
1866
+ * @param {string} [productTag] - The product tag.
1867
+ * @returns {Promise<any>} The updated action.
1868
+ */
1869
+ updateAction: (actionTag: string, updates: any, graphTag?: string, productTag?: string) => Promise<import("./graph").IGraphAction>;
1870
+ /**
1871
+ * Deletes a graph action.
1872
+ * @param {string} actionTag - The action tag.
1873
+ * @param {string} [graphTag] - The graph tag.
1874
+ * @param {string} [productTag] - The product tag.
1875
+ * @returns {Promise<void>} Resolves when the action is deleted.
1876
+ */
1877
+ deleteAction: (actionTag: string, graphTag?: string, productTag?: string) => Promise<void>;
1878
+ /**
1879
+ * Begins a new transaction.
1880
+ * @param {any} [options] - Transaction options.
1881
+ * @returns {Promise<any>} The transaction object.
1882
+ */
1883
+ beginTransaction: (options?: any) => Promise<import("./graph").IGraphTransaction>;
1884
+ /**
1885
+ * Commits a transaction.
1886
+ * @param {any} transaction - The transaction to commit.
1887
+ * @returns {Promise<void>} Resolves when committed.
1888
+ */
1889
+ commitTransaction: (transaction: any) => Promise<void>;
1890
+ /**
1891
+ * Rolls back a transaction.
1892
+ * @param {any} transaction - The transaction to rollback.
1893
+ * @returns {Promise<void>} Resolves when rolled back.
1894
+ */
1895
+ rollbackTransaction: (transaction: any) => Promise<void>;
1896
+ /**
1897
+ * Dispatches a graph operation for deferred execution.
1898
+ * @param {any} data - The dispatch input.
1899
+ * @returns {Promise<any>} The dispatch result.
1900
+ */
1901
+ dispatch: (data: any) => Promise<IDispatchResult>;
1423
1902
  };
1424
1903
  /**
1425
1904
  * Workflow service for building and executing durable workflows.
@@ -2450,14 +2929,19 @@ export default class Ductape implements IDuctape {
2450
2929
  private createNewBrokersService;
2451
2930
  /**
2452
2931
  * Create a new QuotaService instance with authenticated config
2453
- * @returns QuotaService instance
2932
+ * @returns QuotaService instance (cached)
2454
2933
  */
2455
2934
  private createNewQuotaService;
2456
2935
  /**
2457
2936
  * Create a new FallbackService instance with authenticated config
2458
- * @returns FallbackService instance
2937
+ * @returns FallbackService instance (cached)
2459
2938
  */
2460
2939
  private createNewFallbackService;
2940
+ /**
2941
+ * Create a new HealthcheckService instance with authenticated config
2942
+ * @returns HealthcheckService instance (cached)
2943
+ */
2944
+ private createNewHealthcheckService;
2461
2945
  private fetchSession;
2462
2946
  private validateWorkspace;
2463
2947
  private createNewAppBuilderSession;