@pptb/types 1.0.3 → 1.0.5
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/dataverseAPI.d.ts +31 -1
- package/package.json +1 -1
package/dataverseAPI.d.ts
CHANGED
|
@@ -212,7 +212,7 @@ declare namespace DataverseAPI {
|
|
|
212
212
|
* const metadata = await dataverseAPI.getEntityMetadata('account');
|
|
213
213
|
* console.log('Display Name:', metadata.DisplayName?.LocalizedLabels[0]?.Label);
|
|
214
214
|
* console.log('Attributes:', metadata.Attributes?.length);
|
|
215
|
-
*
|
|
215
|
+
*
|
|
216
216
|
* @example
|
|
217
217
|
* // Get only specific metadata columns
|
|
218
218
|
* const metadata = await dataverseAPI.getEntityMetadata('account', ['LogicalName', 'DisplayName']);
|
|
@@ -286,6 +286,36 @@ declare namespace DataverseAPI {
|
|
|
286
286
|
* });
|
|
287
287
|
*/
|
|
288
288
|
getSolutions: (selectColumns: string[]) => Promise<{ value: Record<string, unknown>[] }>;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Query data from Dataverse using OData query parameters
|
|
292
|
+
*
|
|
293
|
+
* @param odataQuery - OData query string with parameters like $select, $filter, $orderby, $top, $skip, $expand
|
|
294
|
+
* @returns Object with value array containing matching records
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* // Get top 10 active accounts with specific fields
|
|
298
|
+
* const result = await dataverseAPI.queryData(
|
|
299
|
+
* '$select=name,emailaddress1,telephone1&$filter=statecode eq 0&$orderby=name&$top=10'
|
|
300
|
+
* );
|
|
301
|
+
* console.log(`Found ${result.value.length} records`);
|
|
302
|
+
* result.value.forEach(record => {
|
|
303
|
+
* console.log(`${record.name} - ${record.emailaddress1}`);
|
|
304
|
+
* });
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* // Query with expand to include related records
|
|
308
|
+
* const result = await dataverseAPI.queryData(
|
|
309
|
+
* '$select=name,accountid&$expand=contact_customer_accounts($select=fullname,emailaddress1)&$top=5'
|
|
310
|
+
* );
|
|
311
|
+
*
|
|
312
|
+
* @example
|
|
313
|
+
* // Simple query with just a filter
|
|
314
|
+
* const result = await dataverseAPI.queryData(
|
|
315
|
+
* '$filter=contains(fullname, \'Smith\')&$top=20'
|
|
316
|
+
* );
|
|
317
|
+
*/
|
|
318
|
+
queryData: (odataQuery: string) => Promise<{ value: Record<string, unknown>[] }>;
|
|
289
319
|
}
|
|
290
320
|
}
|
|
291
321
|
|