@plyaz/types 1.41.3 → 1.42.0

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.
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * Types for useFileDownload hook.
5
5
  */
6
+ import type { ServiceOptions } from '../../../api';
6
7
  /**
7
8
  * Options for useFileDownload hook
8
9
  *
@@ -21,10 +22,15 @@ export interface CoreFileDownloadOptions {
21
22
  *
22
23
  * Note: Errors propagate through global error handling (error boundaries,
23
24
  * global error alert store). Results are returned from the Promise.
25
+ *
26
+ * Download accepts optional ServiceOptions for debugging/auditing:
27
+ * - `apiConfig.unifiedStrategy` - Override the unified strategy
28
+ * - `apiConfig.timeout` - Override timeout
29
+ * - etc.
24
30
  */
25
31
  export interface CoreFileDownloadResult {
26
32
  /** Download a file by ID */
27
- download: (fileId: string, options?: CoreFileDownloadOptions) => Promise<Blob | null>;
33
+ download: (fileId: string, options?: CoreFileDownloadOptions, serviceOptions?: ServiceOptions) => Promise<Blob | null>;
28
34
  /** Whether currently downloading */
29
35
  isDownloading: boolean;
30
36
  /** Current download ID (if any) */
@@ -4,7 +4,7 @@
4
4
  * Types for useFileUpload hook.
5
5
  * Uses Pick to extend from existing API types where applicable.
6
6
  */
7
- import type { UploadFileRequest, GenerateDocumentRequest } from '../../../api';
7
+ import type { UploadFileRequest, GenerateDocumentRequest, ServiceOptions } from '../../../api';
8
8
  import type { FILE_CATEGORY, ENTITY_TYPE } from '../../../storage/enums';
9
9
  /**
10
10
  * Options for useFileUpload hook - direct file upload
@@ -72,18 +72,23 @@ export interface CoreBulkTemplateUploadOptions {
72
72
  *
73
73
  * Note: Errors propagate through global error handling (error boundaries,
74
74
  * global error alert store). Results are returned from the Promise.
75
+ *
76
+ * All methods accept optional ServiceOptions for debugging/auditing:
77
+ * - `apiConfig.unifiedStrategy` - Override the unified strategy
78
+ * - `apiConfig.timeout` - Override timeout
79
+ * - etc.
75
80
  */
76
81
  export interface CoreFileUploadResult {
77
82
  /** Upload a file directly */
78
- upload: (file: File, options?: CoreFileUploadOptions) => Promise<unknown>;
83
+ upload: (file: File, options?: CoreFileUploadOptions, serviceOptions?: ServiceOptions) => Promise<unknown>;
79
84
  /** Upload multiple files directly */
80
- uploadMultiple: (files: File[], options?: CoreFileUploadOptions) => Promise<unknown[]>;
85
+ uploadMultiple: (files: File[], options?: CoreFileUploadOptions, serviceOptions?: ServiceOptions) => Promise<unknown[]>;
81
86
  /** Generate document from template and upload to storage */
82
- uploadFromTemplate: (options: CoreTemplateUploadOptions) => Promise<unknown>;
87
+ uploadFromTemplate: (options: CoreTemplateUploadOptions, serviceOptions?: ServiceOptions) => Promise<unknown>;
83
88
  /** Generate multiple documents from templates and upload to storage */
84
- uploadMultipleFromTemplate: (options: CoreBulkTemplateUploadOptions) => Promise<unknown[]>;
89
+ uploadMultipleFromTemplate: (options: CoreBulkTemplateUploadOptions, serviceOptions?: ServiceOptions) => Promise<unknown[]>;
85
90
  /** Generate document from template (no upload - returns buffer for client download) */
86
- generate: (options: CoreGenerateOptions) => Promise<{
91
+ generate: (options: CoreGenerateOptions, serviceOptions?: ServiceOptions) => Promise<{
87
92
  buffer: string;
88
93
  size: number;
89
94
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.41.3",
3
+ "version": "1.42.0",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",