@dyrected/sdk 2.5.65 → 2.6.1

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.cjs CHANGED
@@ -95,6 +95,10 @@ var QueryBuilder = class {
95
95
  this.args.depth = depth;
96
96
  return this;
97
97
  }
98
+ search(search) {
99
+ this.args.search = search;
100
+ return this;
101
+ }
98
102
  seed(data) {
99
103
  this.args.initialData = data;
100
104
  return this;
@@ -280,6 +284,7 @@ var DyrectedClient = class {
280
284
  if (args.limit) qb.limit(args.limit);
281
285
  if (args.page) qb.page(args.page);
282
286
  if (args.depth !== void 0) qb.depth(args.depth);
287
+ if (args.search) qb.search(args.search);
283
288
  if (args.initialData) qb.seed(args.initialData);
284
289
  }
285
290
  return qb;
package/dist/index.d.cts CHANGED
@@ -6,6 +6,7 @@ interface QueryArgs<TDoc = UnknownRecord$1> {
6
6
  limit?: number;
7
7
  page?: number;
8
8
  depth?: number;
9
+ search?: string;
9
10
  where?: UnknownRecord$1 | string;
10
11
  sort?: string;
11
12
  initialData?: TDoc[];
@@ -20,6 +21,7 @@ declare class QueryBuilder<T = UnknownRecord$1> {
20
21
  limit(limit: number): this;
21
22
  page(page: number): this;
22
23
  depth(depth: number): this;
24
+ search(search: string): this;
23
25
  seed(data: T[]): this;
24
26
  exec(): Promise<PaginatedResult<T>>;
25
27
  then<TResult1 = PaginatedResult<T>, TResult2 = never>(onfulfilled?: ((value: PaginatedResult<T>) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ interface QueryArgs<TDoc = UnknownRecord$1> {
6
6
  limit?: number;
7
7
  page?: number;
8
8
  depth?: number;
9
+ search?: string;
9
10
  where?: UnknownRecord$1 | string;
10
11
  sort?: string;
11
12
  initialData?: TDoc[];
@@ -20,6 +21,7 @@ declare class QueryBuilder<T = UnknownRecord$1> {
20
21
  limit(limit: number): this;
21
22
  page(page: number): this;
22
23
  depth(depth: number): this;
24
+ search(search: string): this;
23
25
  seed(data: T[]): this;
24
26
  exec(): Promise<PaginatedResult<T>>;
25
27
  then<TResult1 = PaginatedResult<T>, TResult2 = never>(onfulfilled?: ((value: PaginatedResult<T>) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
package/dist/index.js CHANGED
@@ -65,6 +65,10 @@ var QueryBuilder = class {
65
65
  this.args.depth = depth;
66
66
  return this;
67
67
  }
68
+ search(search) {
69
+ this.args.search = search;
70
+ return this;
71
+ }
68
72
  seed(data) {
69
73
  this.args.initialData = data;
70
74
  return this;
@@ -250,6 +254,7 @@ var DyrectedClient = class {
250
254
  if (args.limit) qb.limit(args.limit);
251
255
  if (args.page) qb.page(args.page);
252
256
  if (args.depth !== void 0) qb.depth(args.depth);
257
+ if (args.search) qb.search(args.search);
253
258
  if (args.initialData) qb.seed(args.initialData);
254
259
  }
255
260
  return qb;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/sdk",
3
- "version": "2.5.65",
3
+ "version": "2.6.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  "tsup": "^8.5.1",
31
31
  "typescript": "^5.4.5",
32
32
  "vitest": "^1.0.0",
33
- "@dyrected/core": "2.5.65"
33
+ "@dyrected/core": "2.6.1"
34
34
  },
35
35
  "license": "BSL-1.1",
36
36
  "author": "Busola Okeowo <busolaokemoney@gmail.com>",