@blueskyproject/tiled 0.0.32 → 0.0.34
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/components/Tiled/PreviewNDArray.d.ts.map +1 -1
- package/dist/components/Tiled/api/TiledApiClient.d.ts.map +1 -1
- package/dist/components/Tiled/api/TiledArrayApi.d.ts +7 -0
- package/dist/components/Tiled/api/TiledArrayApi.d.ts.map +1 -1
- package/dist/components/Tiled/api/TiledClientTest.d.ts.map +1 -1
- package/dist/components/Tiled/utils.d.ts +7 -0
- package/dist/components/Tiled/utils.d.ts.map +1 -1
- package/dist/mockServiceWorker.js +1 -1
- package/dist/tiled.css +1 -1
- package/dist/tiled.es.js +7611 -7548
- package/dist/tiled.umd.js +31 -31
- package/package.json +1 -1
- package/dist/components/Tiled/archived_apiClient.d.ts +0 -377
- package/dist/components/Tiled/archived_apiClient.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
import { TiledInfoResponse, TiledSearchResult, TiledAuthProvider, TiledTableRow, TiledStructuredArrayData, TiledTableJSONResponse, TiledBlueskyPlanMetadataResponse, TiledSearchMetadataResult } from './types';
|
|
2
|
-
import { TiledSearchConfig, TiledSearchOptions } from './apiTypes';
|
|
3
|
-
/**
|
|
4
|
-
* Sets the global Tiled server URL that will be used for all subsequent API requests
|
|
5
|
-
* @param url - The Tiled server URL to set, or null to clear it
|
|
6
|
-
* @returns The Tiled server URL that was set
|
|
7
|
-
*/
|
|
8
|
-
export declare const setGlobalUrl: (url: string | null) => string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Sets the global initial path that will be prepended to all search paths
|
|
11
|
-
* Automatically removes leading slash to ensure proper path formatting
|
|
12
|
-
* @param path - The initial path to set, or null to clear it
|
|
13
|
-
* @returns The formatted initial path that was set
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* setInitialPath('my-data-folder'); // Sets path to 'my-data-folder'
|
|
17
|
-
* setInitialPath('/my-data-folder'); // Also sets path to 'my-data-folder' (leading slash removed)
|
|
18
|
-
* setInitialPath(null); // Clears the initial path
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare const setInitialPath: (path: string | null) => string | null;
|
|
22
|
-
/**
|
|
23
|
-
* Configures whether search results should be returned in reverse order
|
|
24
|
-
* @param reverse - If true, results will be sorted in descending order
|
|
25
|
-
* @example
|
|
26
|
-
* ```typescript
|
|
27
|
-
* setReverseSort(true); // Enable reverse sorting
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare const setReverseSort: (reverse: boolean | undefined) => void;
|
|
31
|
-
/**
|
|
32
|
-
* Retrieves the current global initial path setting
|
|
33
|
-
* @returns The current initial path string, or null if not set
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* const currentPath = getInitialPath();
|
|
37
|
-
* if (currentPath) {
|
|
38
|
-
* console.log('Current initial path:', currentPath);
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare const getInitialPath: () => string | null;
|
|
43
|
-
/**
|
|
44
|
-
* Sets the global API key that will be used for all subsequent Tiled API requests
|
|
45
|
-
* This key will be automatically included in authentication headers for API calls
|
|
46
|
-
* @param apiKey - The API key string to use for authentication, or null to clear it
|
|
47
|
-
* @returns The API key that was set
|
|
48
|
-
* @example
|
|
49
|
-
* ```typescript
|
|
50
|
-
* setGlobalApiKey('my-secret-api-key'); // Sets global API key
|
|
51
|
-
* setGlobalApiKey(null); // Clears the global API key
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export declare const setGlobalApiKey: (apiKey: string | null) => string | null;
|
|
55
|
-
type AuthErrorCallback = (error: any) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Sets a callback function to handle authentication errors
|
|
58
|
-
* This callback will be invoked when a 401 authentication error occurs and token refresh fails
|
|
59
|
-
* Useful for implementing custom error handling, logout flows, or user notifications
|
|
60
|
-
* @param callback - Function to call when authentication errors occur. Receives the error as a parameter
|
|
61
|
-
* @example
|
|
62
|
-
* ```typescript
|
|
63
|
-
* setAuthErrorCallback((error) => {
|
|
64
|
-
* console.log('Authentication failed:', error);
|
|
65
|
-
* // Redirect to login page or show error message
|
|
66
|
-
* window.location.href = '/login';
|
|
67
|
-
* });
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
export declare const setAuthErrorCallback: (callback: AuthErrorCallback) => void;
|
|
71
|
-
/**
|
|
72
|
-
* Returns the active Tiled server URL: globalUrl if set, otherwise constructs one from current hostname
|
|
73
|
-
* @returns The Tiled server URL string
|
|
74
|
-
*/
|
|
75
|
-
export declare const getDefaultTiledUrl: () => string;
|
|
76
|
-
/**
|
|
77
|
-
* Sets the Bearer token for authentication in axios requests
|
|
78
|
-
* @param token - The Bearer token string
|
|
79
|
-
* @example
|
|
80
|
-
* ```typescript
|
|
81
|
-
* setBearerToken('your-bearer-token-here');
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
export declare const setBearerToken: (token: string) => void;
|
|
85
|
-
/**
|
|
86
|
-
* Searches for data in a Tiled server instance
|
|
87
|
-
* @param searchPath - Optional path to search within (e.g., 'folder/subfolder')
|
|
88
|
-
* @param url - Optional custom Tiled server URL (defaults to environment variable or localhost:8000)
|
|
89
|
-
* @param cb - Optional callback function that receives the search results
|
|
90
|
-
* @param mock - If true, returns sample mock data instead of making API call
|
|
91
|
-
* @param parameters - Optional additional query parameters to include in the request
|
|
92
|
-
* @param sortingKey - Optional key to sort results by (prefix with '-' for descending)
|
|
93
|
-
* @returns Promise that resolves to TiledSearchResult or null if error occurs
|
|
94
|
-
* @example
|
|
95
|
-
* ```typescript
|
|
96
|
-
* const results = await getSearchResults('my-data-folder');
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
export declare const getSearchResultsOld: (searchPath?: string, url?: string, cb?: (res: TiledSearchResult) => void, mock?: boolean, parameters?: Record<string, string | number | boolean>, sortingKey?: string) => Promise<TiledSearchResult | null>;
|
|
100
|
-
/**
|
|
101
|
-
* Performs the first search with an API key, which sets up authentication for subsequent requests
|
|
102
|
-
* @param apiKey - The API key for authentication with the Tiled server
|
|
103
|
-
* @param searchPath - Optional path to search within
|
|
104
|
-
* @param url - Optional custom Tiled server URL
|
|
105
|
-
* @param cb - Optional callback function that receives the search results
|
|
106
|
-
* @param mock - If true, returns sample mock data instead of making API call
|
|
107
|
-
* @returns Promise that resolves to TiledSearchResult or null if error occurs
|
|
108
|
-
* @example
|
|
109
|
-
* ```typescript
|
|
110
|
-
* const results = await getFirstSearchWithApiKey('your-api-key', 'data-folder');
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
export declare const getFirstSearchWithApiKey: (apiKey: string, searchPath?: string, url?: string, cb?: (res: TiledSearchResult) => void, mock?: boolean) => Promise<TiledSearchResult | null>;
|
|
114
|
-
/**
|
|
115
|
-
* Searches for items that include specific specs
|
|
116
|
-
* @param searchPath - Optional path to search within
|
|
117
|
-
* @param includeSpecs - Array of spec names to include in results
|
|
118
|
-
* @param excludeSpecs - Optional array of spec names to exclude from results
|
|
119
|
-
* @param url - Optional custom Tiled server URL
|
|
120
|
-
* @param cb - Optional callback function that receives the search results
|
|
121
|
-
* @returns Promise that resolves to TiledSearchResult or null if error occurs
|
|
122
|
-
* @example
|
|
123
|
-
* ```typescript
|
|
124
|
-
* // Search for BlueskyEventStream specs
|
|
125
|
-
* const results = await getSearchResultsBySpecs('my-path', ['BlueskyEventStream']);
|
|
126
|
-
*
|
|
127
|
-
* // Search for multiple specs but exclude BlueskyRun
|
|
128
|
-
* const results = await getSearchResultsBySpecs('my-path', ['BlueskyEventStream'], ['BlueskyRun']);
|
|
129
|
-
* ```
|
|
130
|
-
*/
|
|
131
|
-
export declare const getSearchResultsBySpecs: (searchPath?: string, includeSpecs?: string[], excludeSpecs?: string[], url?: string, cb?: (res: TiledSearchResult) => void) => Promise<TiledSearchResult | null>;
|
|
132
|
-
/**
|
|
133
|
-
* Retrieves metadata for a specific item from a Tiled server
|
|
134
|
-
* @param searchPath - The path to the item
|
|
135
|
-
* @param url - Optional custom Tiled server URL
|
|
136
|
-
* @param cb - Optional callback function that receives the metadata
|
|
137
|
-
* @returns Promise that resolves to metadata object or null if error occurs
|
|
138
|
-
* @example
|
|
139
|
-
* ```typescript
|
|
140
|
-
* const metadata = await getItemMetadata('my-item-id');
|
|
141
|
-
* // Returns: { data: { id: "...", attributes: {...} }, ... }
|
|
142
|
-
* ```
|
|
143
|
-
*/
|
|
144
|
-
export declare const getItemMetadata: (searchPath: string, url?: string, cb?: (metadata: {
|
|
145
|
-
[key: string]: unknown;
|
|
146
|
-
}) => void) => Promise<TiledSearchMetadataResult | null>;
|
|
147
|
-
/**
|
|
148
|
-
* Retrieves Bluesky plan metadata for a specific item from a Tiled server
|
|
149
|
-
* @param searchPath - The path to the Bluesky plan item
|
|
150
|
-
* @param url - Optional custom Tiled server URL
|
|
151
|
-
* @param cb - Optional callback function that receives the structured metadata
|
|
152
|
-
* @returns Promise that resolves to Bluesky plan metadata or null if error occurs
|
|
153
|
-
* @example
|
|
154
|
-
* ```typescript
|
|
155
|
-
* const planMetadata = await getBlueskyPlanMetadata('aba7753b-ec5f-464d-abc2-809b620bb66b');
|
|
156
|
-
* if (planMetadata?.data.attributes.metadata.start) {
|
|
157
|
-
* console.log('Plan name:', planMetadata.data.attributes.metadata.start.plan_name);
|
|
158
|
-
* }
|
|
159
|
-
* ```
|
|
160
|
-
*/
|
|
161
|
-
export declare const getBlueskyPlanMetadata: (searchPath: string, url?: string, cb?: (metadata: TiledBlueskyPlanMetadataResponse) => void) => Promise<TiledBlueskyPlanMetadataResponse | null>;
|
|
162
|
-
/**
|
|
163
|
-
* Retrieves table data from a Tiled server for a specific partition
|
|
164
|
-
* @param searchPath - The path to the table data
|
|
165
|
-
* @param partition - The partition number to retrieve (0-based index)
|
|
166
|
-
* @param url - Optional custom Tiled server URL
|
|
167
|
-
* @param cb - Optional callback function that receives the parsed data
|
|
168
|
-
* @returns Promise that resolves to an array of parsed table rows or null if error occurs
|
|
169
|
-
* @example
|
|
170
|
-
* ```typescript
|
|
171
|
-
* const tableData = await getTableDataAsSequence('my-table', 0);
|
|
172
|
-
* // Returns: [{ A: 0.5699, B: 1.1398, C: 1.7098 }, ...]
|
|
173
|
-
* ```
|
|
174
|
-
*/
|
|
175
|
-
export declare const getTableDataAsSequence: (searchPath: string, partition: number, url?: string, cb?: (parsedData: TiledTableRow[]) => void) => Promise<any[] | null>;
|
|
176
|
-
/**
|
|
177
|
-
* Retrieves table data from a Tiled server for a specific partition in JSON format
|
|
178
|
-
* @param searchPath - The path to the table data
|
|
179
|
-
* @param partition - The partition number to retrieve (0-based index)
|
|
180
|
-
* @param url - Optional custom Tiled server URL
|
|
181
|
-
* @param cb - Optional callback function that receives the parsed data
|
|
182
|
-
* @returns Promise that resolves to an array of parsed table rows or null if error occurs
|
|
183
|
-
* @example
|
|
184
|
-
* ```typescript
|
|
185
|
-
* const tableData = await getTableDataAsJson('my-table', 0);
|
|
186
|
-
* // Returns: { A: [0.5699, ...], B: [1.1398, ...], C: [1.7098, ...] }
|
|
187
|
-
* ```
|
|
188
|
-
*/
|
|
189
|
-
export declare const getTableDataAsJson: (searchPath: string, partition: number, url?: string, cb?: (parsedData: TiledTableJSONResponse) => void) => Promise<TiledTableJSONResponse>;
|
|
190
|
-
/**
|
|
191
|
-
* Retrieves structured array data from a Tiled server for a specific block
|
|
192
|
-
* @param searchPath - The path to the structured array data
|
|
193
|
-
* @param block - The block number to retrieve (0-based index)
|
|
194
|
-
* @param url - Optional custom Tiled server URL
|
|
195
|
-
* @param cb - Optional callback function that receives the parsed data
|
|
196
|
-
* @returns Promise that resolves to an array of structured data rows or null if error occurs
|
|
197
|
-
* @example
|
|
198
|
-
* ```typescript
|
|
199
|
-
* const structuredData = await getStructuredArrayData('structured_data/pets', 0);
|
|
200
|
-
* // Returns: [{ name: "Fluffy", age: 3, weight: 4.2 }, ...]
|
|
201
|
-
* ```
|
|
202
|
-
*/
|
|
203
|
-
export declare const getStructuredArrayData: (searchPath: string, block: number, url?: string, cb?: (parsedData: TiledStructuredArrayData) => void) => Promise<any>;
|
|
204
|
-
/**
|
|
205
|
-
* Generates a URL path for retrieving a full PNG image from a Tiled array
|
|
206
|
-
* @param searchPath - The path to the array data
|
|
207
|
-
* @param stepY - Step size for Y-axis sampling (default: 1)
|
|
208
|
-
* @param stepX - Step size for X-axis sampling (default: 1)
|
|
209
|
-
* @param stack - Optional array of stack indices for multi-dimensional arrays
|
|
210
|
-
* @param url - Optional custom Tiled server URL
|
|
211
|
-
* @returns Complete URL string for the PNG image
|
|
212
|
-
* @example
|
|
213
|
-
* ```typescript
|
|
214
|
-
* const imageUrl = generateFullImagePngPath('my-image', 1, 1, [0, 5]);
|
|
215
|
-
* ```
|
|
216
|
-
*/
|
|
217
|
-
export declare const generateFullImagePngPath: (searchPath?: string, stepY?: number, stepX?: number, stack?: number[], url?: string) => string;
|
|
218
|
-
/**
|
|
219
|
-
* Resets all global state variables to their default values
|
|
220
|
-
* Useful for testing to ensure clean state between tests
|
|
221
|
-
* @example
|
|
222
|
-
* ```typescript
|
|
223
|
-
* resetGlobalState(); // Clears all global variables
|
|
224
|
-
* ```
|
|
225
|
-
*/
|
|
226
|
-
export declare const resetGlobalState: () => void;
|
|
227
|
-
/**
|
|
228
|
-
* Retrieves XArray data from a Tiled server for a specific stack
|
|
229
|
-
* @param searchPath - The path to the XArray data
|
|
230
|
-
* @param stack - Optional array of stack indices for multi-dimensional arrays
|
|
231
|
-
* @param url - Optional custom Tiled server URL
|
|
232
|
-
* @param cb - Optional callback function that receives the parsed data
|
|
233
|
-
* @returns Promise that resolves to parsed XArray data or null if error occurs
|
|
234
|
-
* @example
|
|
235
|
-
* ```typescript
|
|
236
|
-
* const xarrayData = await getXArrayData('xarray_dataset/time', [0, 5]);
|
|
237
|
-
* ```
|
|
238
|
-
*/
|
|
239
|
-
export declare const getXArrayData: (searchPath: string, stack: number[], url?: string, cb?: (parsedData: number[][]) => void) => Promise<any>;
|
|
240
|
-
/**
|
|
241
|
-
* Fetches server information from a Tiled server
|
|
242
|
-
* @param url - Optional custom Tiled server URL
|
|
243
|
-
* @returns Promise that resolves to server information or null if error occurs
|
|
244
|
-
* @example
|
|
245
|
-
* ```typescript
|
|
246
|
-
* const serverInfo = await getServerInfo();
|
|
247
|
-
* ```
|
|
248
|
-
*/
|
|
249
|
-
export declare const getServerInfo: (url?: string) => Promise<TiledInfoResponse | null>;
|
|
250
|
-
/**
|
|
251
|
-
* Logs in a user with username and password authentication
|
|
252
|
-
* @param username - The username for authentication
|
|
253
|
-
* @param password - The password for authentication
|
|
254
|
-
* @param url - Optional custom Tiled server URL
|
|
255
|
-
* @param provider - Optional specific authentication provider to use
|
|
256
|
-
* @returns Promise that resolves to authentication tokens or null if login fails
|
|
257
|
-
* @example
|
|
258
|
-
* ```typescript
|
|
259
|
-
* const authResult = await loginUser('myusername', 'mypassword');
|
|
260
|
-
* if (authResult) {
|
|
261
|
-
* console.log('Login successful:', authResult.access_token);
|
|
262
|
-
* }
|
|
263
|
-
* ```
|
|
264
|
-
*/
|
|
265
|
-
export declare const loginUserWithNamePassword: (username: string, password: string, url?: string, provider?: TiledAuthProvider) => Promise<{
|
|
266
|
-
access_token: string;
|
|
267
|
-
refresh_token: string;
|
|
268
|
-
} | null>;
|
|
269
|
-
/**
|
|
270
|
-
* Fetches an image with authentication and returns a blob URL
|
|
271
|
-
* @param imagePath - The complete URL path to the image
|
|
272
|
-
* @returns Promise that resolves to a blob URL string
|
|
273
|
-
*/
|
|
274
|
-
export declare const getAuthenticatedImage: (imagePath: string) => Promise<string>;
|
|
275
|
-
/**
|
|
276
|
-
* Comprehensive search function for Tiled API with full filter and option support
|
|
277
|
-
* @param config - Complete search configuration object
|
|
278
|
-
* @returns Promise<TiledSearchResult[]>
|
|
279
|
-
*/
|
|
280
|
-
export declare const getSearchResults: (config: TiledSearchConfig, cb?: (res: TiledSearchResult) => void) => Promise<TiledSearchResult>;
|
|
281
|
-
/**
|
|
282
|
-
* Search by specs with include/exclude arrays
|
|
283
|
-
* @param baseUrl - Tiled server base URL
|
|
284
|
-
* @param include - Array of specs to include
|
|
285
|
-
* @param exclude - Array of specs to exclude (defaults to empty array)
|
|
286
|
-
* @param path - Optional path within the Tiled server
|
|
287
|
-
* @param options - Additional search options
|
|
288
|
-
* @param apiKey - Optional API key
|
|
289
|
-
* @param initialPath - Optional initial path that takes priority over globalInitialPath
|
|
290
|
-
* @returns Promise<TiledSearchResult[]>
|
|
291
|
-
*/
|
|
292
|
-
export declare const searchBySpecs: (baseUrl: string, include: string[], exclude?: string[], path?: string, options?: TiledSearchOptions, apiKey?: string, initialPath?: string) => Promise<TiledSearchResult>;
|
|
293
|
-
/**
|
|
294
|
-
* Search by fulltext
|
|
295
|
-
* @param baseUrl - Tiled server base URL
|
|
296
|
-
* @param text - Text to search for
|
|
297
|
-
* @param path - Optional path within the Tiled server
|
|
298
|
-
* @param options - Additional search options
|
|
299
|
-
* @param apiKey - Optional API key
|
|
300
|
-
* @param initialPath - Optional initial path that takes priority over globalInitialPath
|
|
301
|
-
* @returns Promise<TiledSearchResult[]>
|
|
302
|
-
*/
|
|
303
|
-
export declare const searchByFulltext: (baseUrl: string, text: string, path?: string, options?: TiledSearchOptions, apiKey?: string, initialPath?: string) => Promise<TiledSearchResult>;
|
|
304
|
-
/**
|
|
305
|
-
* Search by metadata key equality
|
|
306
|
-
* @param baseUrl - Tiled server base URL
|
|
307
|
-
* @param key - Metadata key to search
|
|
308
|
-
* @param value - Value to match
|
|
309
|
-
* @param path - Optional path within the Tiled server
|
|
310
|
-
* @param options - Additional search options
|
|
311
|
-
* @param apiKey - Optional API key
|
|
312
|
-
* @param initialPath - Optional initial path that takes priority over globalInitialPath
|
|
313
|
-
* @returns Promise<TiledSearchResult[]>
|
|
314
|
-
*/
|
|
315
|
-
export declare const searchByMetadataEquals: (baseUrl: string, key: string, value: string, path?: string, options?: TiledSearchOptions, apiKey?: string, initialPath?: string) => Promise<TiledSearchResult>;
|
|
316
|
-
/**
|
|
317
|
-
* Search by metadata key comparison
|
|
318
|
-
* @param baseUrl - Tiled server base URL
|
|
319
|
-
* @param key - Metadata key to search
|
|
320
|
-
* @param operator - Comparison operator ('gt', 'gte', 'lt', 'lte')
|
|
321
|
-
* @param value - Value to compare against
|
|
322
|
-
* @param path - Optional path within the Tiled server
|
|
323
|
-
* @param options - Additional search options
|
|
324
|
-
* @param apiKey - Optional API key
|
|
325
|
-
* @param initialPath - Optional initial path that takes priority over globalInitialPath
|
|
326
|
-
* @returns Promise<TiledSearchResult[]>
|
|
327
|
-
*/
|
|
328
|
-
export declare const searchByMetadataComparison: (baseUrl: string, key: string, operator: "gt" | "gte" | "lt" | "lte", value: string, path?: string, options?: TiledSearchOptions, apiKey?: string, initialPath?: string) => Promise<TiledSearchResult>;
|
|
329
|
-
/**
|
|
330
|
-
* Search by regex pattern on metadata key
|
|
331
|
-
* @param baseUrl - Tiled server base URL
|
|
332
|
-
* @param key - Metadata key to search
|
|
333
|
-
* @param pattern - Regex pattern to match
|
|
334
|
-
* @param caseSensitive - Whether regex should be case sensitive (defaults to false)
|
|
335
|
-
* @param path - Optional path within the Tiled server
|
|
336
|
-
* @param options - Additional search options
|
|
337
|
-
* @param apiKey - Optional API key
|
|
338
|
-
* @param initialPath - Optional initial path that takes priority over globalInitialPath
|
|
339
|
-
* @returns Promise<TiledSearchResult[]>
|
|
340
|
-
*/
|
|
341
|
-
export declare const searchByRegex: (baseUrl: string, key: string, pattern: string, caseSensitive?: boolean, path?: string, options?: TiledSearchOptions, apiKey?: string, initialPath?: string) => Promise<TiledSearchResult>;
|
|
342
|
-
/**
|
|
343
|
-
* Search by structure family
|
|
344
|
-
* @param baseUrl - Tiled server base URL
|
|
345
|
-
* @param structureFamily - Structure family to filter by
|
|
346
|
-
* @param path - Optional path within the Tiled server
|
|
347
|
-
* @param options - Additional search options
|
|
348
|
-
* @param apiKey - Optional API key
|
|
349
|
-
* @param initialPath - Optional initial path that takes priority over globalInitialPath
|
|
350
|
-
* @returns Promise<TiledSearchResult[]>
|
|
351
|
-
*/
|
|
352
|
-
export declare const searchByStructureFamily: (baseUrl: string, structureFamily: "container" | "array" | "table" | "awkward" | "sparse", path?: string, options?: TiledSearchOptions, apiKey?: string, initialPath?: string) => Promise<TiledSearchResult>;
|
|
353
|
-
/**
|
|
354
|
-
* Searches for a specific item by ID with graceful error handling
|
|
355
|
-
* Unlike the normal getSearchResults, this function more gracefully handles failed search paths
|
|
356
|
-
* by returning null instead of throwing errors when the path is not found (404 status).
|
|
357
|
-
* @param config - Complete search configuration object including path, filters, and options
|
|
358
|
-
* @param cb - Optional callback function that receives the search results if found
|
|
359
|
-
* @returns Promise that resolves to TiledSearchResult if found, or null if not found or on error
|
|
360
|
-
* @example
|
|
361
|
-
* ```typescript
|
|
362
|
-
* const config = {
|
|
363
|
-
* baseUrl: 'https://my-tiled-server.com/api/v1',
|
|
364
|
-
* path: 'some-item-id',
|
|
365
|
-
* apiKey: 'my-api-key'
|
|
366
|
-
* };
|
|
367
|
-
* const result = await searchById(config);
|
|
368
|
-
* if (result) {
|
|
369
|
-
* console.log('Item found:', result.data);
|
|
370
|
-
* } else {
|
|
371
|
-
* console.log('Item not found');
|
|
372
|
-
* }
|
|
373
|
-
* ```
|
|
374
|
-
*/
|
|
375
|
-
export declare const searchById: (config: TiledSearchConfig, cb?: (res: TiledSearchResult) => void) => Promise<TiledSearchResult | null>;
|
|
376
|
-
export {};
|
|
377
|
-
//# sourceMappingURL=archived_apiClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archived_apiClient.d.ts","sourceRoot":"","sources":["../../../src/components/Tiled/archived_apiClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAA4B,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,wBAAwB,EAAE,sBAAsB,EAA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