@arke-institute/sdk 2.3.12 → 2.3.14

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.
@@ -111,6 +111,62 @@ declare class ArkeClient {
111
111
  * Check if client is authenticated
112
112
  */
113
113
  get isAuthenticated(): boolean;
114
+ /**
115
+ * Get file content as a Blob
116
+ *
117
+ * This is a convenience method that handles the binary response parsing
118
+ * that openapi-fetch doesn't handle automatically.
119
+ *
120
+ * @example
121
+ * ```typescript
122
+ * const { data, error } = await arke.getFileContent('01ABC...');
123
+ * if (data) {
124
+ * const text = await data.text();
125
+ * // or
126
+ * const arrayBuffer = await data.arrayBuffer();
127
+ * }
128
+ * ```
129
+ */
130
+ getFileContent(fileId: string): Promise<{
131
+ data: Blob | undefined;
132
+ error: unknown;
133
+ }>;
134
+ /**
135
+ * Get file content as an ArrayBuffer
136
+ *
137
+ * This is a convenience method that handles the binary response parsing
138
+ * that openapi-fetch doesn't handle automatically.
139
+ *
140
+ * @example
141
+ * ```typescript
142
+ * const { data, error } = await arke.getFileContentAsArrayBuffer('01ABC...');
143
+ * if (data) {
144
+ * const bytes = new Uint8Array(data);
145
+ * }
146
+ * ```
147
+ */
148
+ getFileContentAsArrayBuffer(fileId: string): Promise<{
149
+ data: ArrayBuffer | undefined;
150
+ error: unknown;
151
+ }>;
152
+ /**
153
+ * Get file content as a ReadableStream
154
+ *
155
+ * This is a convenience method for streaming large files.
156
+ *
157
+ * @example
158
+ * ```typescript
159
+ * const { data, error } = await arke.getFileContentAsStream('01ABC...');
160
+ * if (data) {
161
+ * const reader = data.getReader();
162
+ * // Process chunks...
163
+ * }
164
+ * ```
165
+ */
166
+ getFileContentAsStream(fileId: string): Promise<{
167
+ data: ReadableStream<Uint8Array> | null | undefined;
168
+ error: unknown;
169
+ }>;
114
170
  }
115
171
  /**
116
172
  * Create a new ArkeClient instance
@@ -111,6 +111,62 @@ declare class ArkeClient {
111
111
  * Check if client is authenticated
112
112
  */
113
113
  get isAuthenticated(): boolean;
114
+ /**
115
+ * Get file content as a Blob
116
+ *
117
+ * This is a convenience method that handles the binary response parsing
118
+ * that openapi-fetch doesn't handle automatically.
119
+ *
120
+ * @example
121
+ * ```typescript
122
+ * const { data, error } = await arke.getFileContent('01ABC...');
123
+ * if (data) {
124
+ * const text = await data.text();
125
+ * // or
126
+ * const arrayBuffer = await data.arrayBuffer();
127
+ * }
128
+ * ```
129
+ */
130
+ getFileContent(fileId: string): Promise<{
131
+ data: Blob | undefined;
132
+ error: unknown;
133
+ }>;
134
+ /**
135
+ * Get file content as an ArrayBuffer
136
+ *
137
+ * This is a convenience method that handles the binary response parsing
138
+ * that openapi-fetch doesn't handle automatically.
139
+ *
140
+ * @example
141
+ * ```typescript
142
+ * const { data, error } = await arke.getFileContentAsArrayBuffer('01ABC...');
143
+ * if (data) {
144
+ * const bytes = new Uint8Array(data);
145
+ * }
146
+ * ```
147
+ */
148
+ getFileContentAsArrayBuffer(fileId: string): Promise<{
149
+ data: ArrayBuffer | undefined;
150
+ error: unknown;
151
+ }>;
152
+ /**
153
+ * Get file content as a ReadableStream
154
+ *
155
+ * This is a convenience method for streaming large files.
156
+ *
157
+ * @example
158
+ * ```typescript
159
+ * const { data, error } = await arke.getFileContentAsStream('01ABC...');
160
+ * if (data) {
161
+ * const reader = data.getReader();
162
+ * // Process chunks...
163
+ * }
164
+ * ```
165
+ */
166
+ getFileContentAsStream(fileId: string): Promise<{
167
+ data: ReadableStream<Uint8Array> | null | undefined;
168
+ error: unknown;
169
+ }>;
114
170
  }
115
171
  /**
116
172
  * Create a new ArkeClient instance