@centrali-io/centrali-sdk 4.4.8 → 4.5.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.
- package/README.md +25 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,6 +151,31 @@ const products = await centrali.queryRecords('Product', {
|
|
|
151
151
|
});
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
+
### Reserved Query Parameters
|
|
155
|
+
|
|
156
|
+
When using `queryRecords`, the following parameter names are reserved and cannot be used as filter field names. Any other key you pass is treated as a record data filter.
|
|
157
|
+
|
|
158
|
+
| Parameter | Purpose |
|
|
159
|
+
|-----------|---------|
|
|
160
|
+
| `page`, `pageSize`, `limit` | Pagination |
|
|
161
|
+
| `sort` | Sorting |
|
|
162
|
+
| `search`, `searchField`, `searchFields` | Full-text search |
|
|
163
|
+
| `filter` | Structured filter object |
|
|
164
|
+
| `fields`, `select` | Field selection |
|
|
165
|
+
| `expand` | Reference expansion |
|
|
166
|
+
| `includeDeleted`, `includeArchived`, `all` | Include soft-deleted records |
|
|
167
|
+
| `includeTotal` | Include total count in response |
|
|
168
|
+
| `dateWindow` | Date range filtering |
|
|
169
|
+
|
|
170
|
+
To filter by a record field that shares a name with a reserved parameter, use the `data.` prefix:
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
// Filter by a field called "sort" in your record data
|
|
174
|
+
const results = await centrali.queryRecords('MyStructure', {
|
|
175
|
+
'data.sort': 'alphabetical'
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
154
179
|
### Expanding References
|
|
155
180
|
|
|
156
181
|
When querying records with reference fields, use the `expand` parameter to include the full referenced record data:
|