@collective-intelligence/external-apps-server-sdk 0.4.0 → 0.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 +17 -8
- package/dist/chunks/{index-d1jwmj43.js → index-nwk5jexa.js} +2 -2
- package/dist/effect.d.ts +294 -12
- package/dist/effect.js +1 -1
- package/dist/index.d.ts +369 -13
- package/dist/index.js +1 -1
- package/dist/persistence/drizzle.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -788,7 +788,7 @@ const read = await ci.resources.records.get({
|
|
|
788
788
|
const page = await ci.resources.records.search({
|
|
789
789
|
filter: { field: "status", operator: "eq", value: "open" },
|
|
790
790
|
organizationId,
|
|
791
|
-
pagination: {
|
|
791
|
+
pagination: { limit: 20, mode: "cursor" },
|
|
792
792
|
schemaId: "acme.crm.lead",
|
|
793
793
|
sort: [{ direction: "desc", field: "createdAt" }]
|
|
794
794
|
})
|
|
@@ -800,12 +800,18 @@ const page = await ci.resources.records.search({
|
|
|
800
800
|
also has `included`, and `truncated` names the keys whose records CI cut
|
|
801
801
|
to the first 100.
|
|
802
802
|
- `search` sends `POST /application/v1/resources/:schemaId/search` with
|
|
803
|
-
only the keys that the request gives: `
|
|
804
|
-
`sort` and `textSearch`. The query is the `EntityListQuery`
|
|
805
|
-
`./resources
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
803
|
+
only the keys that the request gives: `exactTotal`, `filter`, `include`,
|
|
804
|
+
`pagination`, `sort` and `textSearch`. The query is the `EntityListQuery`
|
|
805
|
+
of `./resources`. `pagination` is `{ mode: "cursor", cursor?, limit }`:
|
|
806
|
+
send the `nextCursor` of a page as `cursor` for the next page of the same
|
|
807
|
+
search. A page-numbered view sends `{ mode: "page", page, pageSize }`; CI
|
|
808
|
+
refuses a page that starts past the first 10,000 records. `limit` and
|
|
809
|
+
`pageSize` are from 1 to 100. `textSearch` searches all text of a record,
|
|
810
|
+
as the CI Dashboard does. The result (`ServerRecordPage`) has `items`,
|
|
811
|
+
`nextCursor` (null on the last page), `total`, `totalIsLowerBound` and
|
|
812
|
+
`facetsPartial`, and `page` and `pageSize` for a page-numbered read.
|
|
813
|
+
`total` stops at 10,000 with `totalIsLowerBound: true`, unless the search
|
|
814
|
+
sends `exactTotal: true`.
|
|
809
815
|
- A read uses the credentials, the `timeoutMs`, the `signal` and the retry
|
|
810
816
|
policy of a write. A read sends no idempotency key. Each attempt sends
|
|
811
817
|
the same correlation id. A refusal resolves `{ ok: false, error }`; an
|
|
@@ -2269,7 +2275,10 @@ objects validated independently of the parent schema, as are member query field
|
|
|
2269
2275
|
names; CI resolves and authorizes the actual member schema. Abort signals and
|
|
2270
2276
|
correlation IDs pass through the proxy. All four typed read-limit metrics
|
|
2271
2277
|
(`work`, `nodes`, `relation_ids`, `bytes`) retain `invalid_request` details
|
|
2272
|
-
`{ reason: "read_limit_exceeded", budget }` and rejected read outcomes.
|
|
2278
|
+
`{ reason: "read_limit_exceeded", budget }` and rejected read outcomes. The
|
|
2279
|
+
`knowledge_query` and `knowledge_autocomplete` operations answer a page-number
|
|
2280
|
+
read past the first 10,000 rows with `invalid_request` and the reason
|
|
2281
|
+
`page_depth_exceeded`; page by cursor or narrow the search. Local
|
|
2273
2282
|
`defineEntityResource` repositories have no CI relation resolver and return
|
|
2274
2283
|
`capability_not_supported`; the legacy CRUD facade does not expose this route.
|
|
2275
2284
|
See the client SDK README for complete IDs, bounded includes and narrowing guidance.
|