@collective-intelligence/external-apps-server-sdk 0.2.4 → 0.2.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/README.md CHANGED
@@ -74,6 +74,8 @@ error } }`.
74
74
  throws `TypeError`.
75
75
  - `defineCiEntityResource` keeps each failure as a value of its
76
76
  `ResourceResult`, with `transport_error` and its `outcome`.
77
+ - A refusal of `ci.access` rejects with `ServerAccessError`, a
78
+ `Schema.TaggedError` with the HTTP `status` and CI's error `body`.
77
79
  - `GatewayEffectRuntimeError` is a `Schema.TaggedError`; `new
78
80
  GatewayEffectRuntimeError(cause)` keeps its positional form.
79
81
 
@@ -578,7 +580,10 @@ API key as the delegated token. CI authorizes each call with the caller's
578
580
  Tuples: members and invitations need `admin.users`, guests `admin.guests`,
579
581
  grants `admin.grants`, Groups `admin.groups`, and the read-only model
580
582
  `admin.profiles`. A refused call rejects with `ServerAccessError` (`status`
581
- and CI's error `body`). Calls are not retried.
583
+ and CI's error `body`); a request that does not reach CI rejects with
584
+ `CiTransportError`. Calls are not retried. In `/effect`, the same methods
585
+ are `access` of `ServerClient` and fail with `ServerAccessError` or
586
+ `CiTransportError` ([Effect authoring](#effect-authoring)).
582
587
 
583
588
  ```ts
584
589
  const created = await ci.access.members.create({
@@ -1064,7 +1069,11 @@ request)` keeps the CI error envelope as a value; `execute` fails with
1064
1069
  `records.get`, `records.search` ([Record reads](#record-reads)) and
1065
1070
  `records.create`, `records.update`, `records.delete`
1066
1071
  ([Record writes](#record-writes)) fail with `CiError`; `recordsResult`
1067
- has the same methods and keeps the refusal of CI as a value.
1072
+ has the same methods and keeps the refusal of CI as a value. `access`
1073
+ has the methods of `ci.access`
1074
+ ([Members, guests, grants and Groups](#members-guests-grants-and-groups-ciaccess));
1075
+ each fails with `ServerAccessError` or `CiTransportError` and is not
1076
+ retried.
1068
1077
  - `layerDelegatedServerClient(config)`: one app-wide `ServerClient` that
1069
1078
  calls CI as the member of each request. `config` is a client config
1070
1079
  without `authentication`. Each attempt sends the `DelegatedAccessToken` of