@noxfly/noxus 3.0.0-dev.5 → 3.0.0-dev.7

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/README.md CHANGED
@@ -536,6 +536,12 @@ await client.request({ method: 'GET', path: 'users/list', query: { r
536
536
  await client.request({ method: 'POST', path: 'users/create', body: { name: 'Bob' } });
537
537
  await client.request({ method: 'PUT', path: 'users/42', body: { name: 'Bob Updated' } });
538
538
  await client.request({ method: 'DELETE', path: 'users/42' });
539
+
540
+ // Per-request timeout override (takes precedence over the global requestTimeout)
541
+ const report = await client.request<Report>(
542
+ { method: 'GET', path: 'reports/heavy' },
543
+ { timeout: 60_000 }, // 60s for this specific request
544
+ );
539
545
  ```
540
546
 
541
547
  ### Push events (main → renderer)
package/dist/main.d.mts CHANGED
@@ -181,8 +181,8 @@ declare class Request {
181
181
  readonly body: unknown;
182
182
  readonly context: AppInjector;
183
183
  readonly params: Record<string, string>;
184
- readonly query: Record<string, string>;
185
- constructor(event: Electron.MessageEvent, senderId: number, id: string, method: HttpMethod, path: string, body: unknown, query?: Record<string, string>);
184
+ readonly query: Record<string, unknown>;
185
+ constructor(event: Electron.MessageEvent, senderId: number, id: string, method: HttpMethod, path: string, body: unknown, query?: Record<string, unknown>);
186
186
  }
187
187
  /**
188
188
  * The IRequest interface defines the structure of a request object.
@@ -195,14 +195,14 @@ interface IRequest<TBody = unknown> {
195
195
  path: string;
196
196
  method: HttpMethod;
197
197
  body?: TBody;
198
- query?: Record<string, string>;
198
+ query?: Record<string, unknown>;
199
199
  }
200
200
  interface IBatchRequestItem<TBody = unknown> {
201
201
  requestId?: string;
202
202
  path: string;
203
203
  method: AtomicHttpMethod;
204
204
  body?: TBody;
205
- query?: Record<string, string>;
205
+ query?: Record<string, unknown>;
206
206
  }
207
207
  interface IBatchRequestPayload {
208
208
  requests: IBatchRequestItem[];
package/dist/main.d.ts CHANGED
@@ -181,8 +181,8 @@ declare class Request {
181
181
  readonly body: unknown;
182
182
  readonly context: AppInjector;
183
183
  readonly params: Record<string, string>;
184
- readonly query: Record<string, string>;
185
- constructor(event: Electron.MessageEvent, senderId: number, id: string, method: HttpMethod, path: string, body: unknown, query?: Record<string, string>);
184
+ readonly query: Record<string, unknown>;
185
+ constructor(event: Electron.MessageEvent, senderId: number, id: string, method: HttpMethod, path: string, body: unknown, query?: Record<string, unknown>);
186
186
  }
187
187
  /**
188
188
  * The IRequest interface defines the structure of a request object.
@@ -195,14 +195,14 @@ interface IRequest<TBody = unknown> {
195
195
  path: string;
196
196
  method: HttpMethod;
197
197
  body?: TBody;
198
- query?: Record<string, string>;
198
+ query?: Record<string, unknown>;
199
199
  }
200
200
  interface IBatchRequestItem<TBody = unknown> {
201
201
  requestId?: string;
202
202
  path: string;
203
203
  method: AtomicHttpMethod;
204
204
  body?: TBody;
205
- query?: Record<string, string>;
205
+ query?: Record<string, unknown>;
206
206
  }
207
207
  interface IBatchRequestPayload {
208
208
  requests: IBatchRequestItem[];