@ahoo-wang/fetcher-wow 2.5.5 → 2.5.8

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.es.js CHANGED
@@ -493,6 +493,17 @@ class IE {
493
493
  * Creates a new QueryClientFactory instance with the specified default options.
494
494
  *
495
495
  * @param defaultOptions - The default options to be used for all query clients created by this factory
496
+ *
497
+ * @example
498
+ * ```typescript
499
+ * import { QueryClientFactory, ResourceAttributionPathSpec } from '@ahoo-wang/fetcher-wow';
500
+ *
501
+ * const factory = new QueryClientFactory({
502
+ * contextAlias: 'example',
503
+ * aggregateName: 'cart',
504
+ * resourceAttribution: ResourceAttributionPathSpec.OWNER,
505
+ * });
506
+ * ```
496
507
  */
497
508
  constructor(E) {
498
509
  this.defaultOptions = E;
@@ -505,6 +516,15 @@ class IE {
505
516
  *
506
517
  * @param options - The query client options used to configure the snapshot query client
507
518
  * @returns A new instance of SnapshotQueryClient
519
+ *
520
+ * @example
521
+ * ```typescript
522
+ * const snapshotClient = factory.createSnapshotQueryClient({
523
+ * aggregateName: 'cart',
524
+ * });
525
+ *
526
+ * const cartState = await snapshotClient.singleState({ condition: all() });
527
+ * ```
508
528
  */
509
529
  createSnapshotQueryClient(E) {
510
530
  const T = q({
@@ -521,6 +541,15 @@ class IE {
521
541
  *
522
542
  * @param options - The query client options used to configure the event stream query client
523
543
  * @returns A new instance of EventStreamQueryClient
544
+ *
545
+ * @example
546
+ * ```typescript
547
+ * const eventClient = factory.createEventStreamQueryClient({
548
+ * aggregateName: 'cart',
549
+ * });
550
+ *
551
+ * const events = await eventClient.list({ condition: all() });
552
+ * ```
524
553
  */
525
554
  createEventStreamQueryClient(E) {
526
555
  const T = q({