@iveri/contracts 0.126.0 → 0.127.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 CHANGED
@@ -184,6 +184,12 @@ one person, and only that person or a service on their behalf can send through i
184
184
  `ConversationStatus`, `MessageDirection`, `MessageAuthorType`, `MessageStatus`,
185
185
  `MessageContentType`.
186
186
 
187
+ - **`UniboxRefusal` is the refusals an agent can act on**, sent as `details.reason` (`channel-inactive`,
188
+ `status-not-allowed` with `currentStatus` and `requestedStatus`, `snooze-in-past`, `shortcut-taken`,
189
+ `team-name-taken`, `channel-key-taken`, `send-rate-limited` and `rate-limited` with `retryAfterSeconds`,
190
+ `dispatch-refused`, `dispatch-unavailable`). `unibox-web` says each in its reader's language and shows the API's
191
+ English for a reason it does not know.
192
+
187
193
  ### `api/unibox-ai/` → `@iveri/contracts/unibox-ai`
188
194
 
189
195
  The authenticated agent-runtime boundary: bounded conversation context, the handoff-aware agent
@@ -299,6 +305,7 @@ Conduit's outbox.
299
305
  `localization:render` permissions.
300
306
  - Version `0.100.0` adds `notification:send-any`, the password-reset bodies and Conduit's usage metrics.
301
307
  - Version `0.101.0` adds `UsageHistory`, a company's closed months of a product by metric.
308
+ - Version `0.127.0` adds `UniboxRefusal` and `SocialRefusal.STORAGE_UNAVAILABLE` (`storage-unavailable`).
302
309
  - Version `0.123.0` adds `HrRefusal`, the HR refusals a client says in the reader's language.
303
310
  - Version `0.122.0` adds `RestaurantRefusal`, the restaurant refusals a client says in the reader's language.
304
311
  - Version `0.121.0` adds Conduit's route test: `RouteTestResult`, `TestRouteBody`, `RouteCriterion` and
@@ -20,6 +20,8 @@ export declare enum SocialRefusal {
20
20
  IMAGE_UNREADABLE = "image-unreadable",
21
21
  IMAGE_TOO_LARGE = "image-too-large",
22
22
  MEDIA_UNAVAILABLE = "media-unavailable",
23
+ /** Where photographs and videos are kept cannot be reached just now, so an upload did not go through. */
24
+ STORAGE_UNAVAILABLE = "storage-unavailable",
23
25
  VIDEO_UNREADABLE = "video-unreadable",
24
26
  VIDEO_TOO_LARGE = "video-too-large",
25
27
  VIDEO_TOO_LONG = "video-too-long",
@@ -21,6 +21,8 @@ export var SocialRefusal;
21
21
  SocialRefusal["IMAGE_UNREADABLE"] = "image-unreadable";
22
22
  SocialRefusal["IMAGE_TOO_LARGE"] = "image-too-large";
23
23
  SocialRefusal["MEDIA_UNAVAILABLE"] = "media-unavailable";
24
+ /** Where photographs and videos are kept cannot be reached just now, so an upload did not go through. */
25
+ SocialRefusal["STORAGE_UNAVAILABLE"] = "storage-unavailable";
24
26
  SocialRefusal["VIDEO_UNREADABLE"] = "video-unreadable";
25
27
  SocialRefusal["VIDEO_TOO_LARGE"] = "video-too-large";
26
28
  SocialRefusal["VIDEO_TOO_LONG"] = "video-too-long";
@@ -12,3 +12,4 @@ export * from './message.type.js';
12
12
  export * from './realtime-event.enum.js';
13
13
  export * from './realtime.type.js';
14
14
  export * from './team.type.js';
15
+ export * from './unibox-refusal.enum.js';
@@ -12,3 +12,4 @@ export * from './message.type.js';
12
12
  export * from './realtime-event.enum.js';
13
13
  export * from './realtime.type.js';
14
14
  export * from './team.type.js';
15
+ export * from './unibox-refusal.enum.js';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Why `unibox-api` refused something an agent can do something about.
3
+ *
4
+ * Sent as `error.details.reason`. An inbox shown in Georgian cannot print the API's English sentence at the agent, so
5
+ * each of these is a key `unibox-web` translates. The English `message` remains for a log line and for anything that
6
+ * does not know this list.
7
+ */
8
+ export declare enum UniboxRefusal {
9
+ /** The conversation's channel has been switched off, so a reply has nowhere to go. */
10
+ CHANNEL_INACTIVE = "channel-inactive",
11
+ /** The conversation cannot move to that status from where it is now. Carries `currentStatus` and `requestedStatus`. */
12
+ STATUS_NOT_ALLOWED = "status-not-allowed",
13
+ /** A conversation is snoozed until a moment that has to be in the future. */
14
+ SNOOZE_IN_PAST = "snooze-in-past",
15
+ /** Another canned reply already uses that shortcut. */
16
+ SHORTCUT_TAKEN = "shortcut-taken",
17
+ /** Another team already has that name. */
18
+ TEAM_NAME_TAKEN = "team-name-taken",
19
+ /** Another channel already has that key. */
20
+ CHANNEL_KEY_TAKEN = "channel-key-taken",
21
+ /** Too many replies in one conversation at once. Carries `retryAfterSeconds`. */
22
+ SEND_RATE_LIMITED = "send-rate-limited",
23
+ /** Too many requests at once. Carries `retryAfterSeconds`. */
24
+ RATE_LIMITED = "rate-limited",
25
+ /** Conduit would not take the reply, which is the channel's connection or operation, not the reply itself. */
26
+ DISPATCH_REFUSED = "dispatch-refused",
27
+ /** Conduit could not be reached, so the reply was not handed over. Trying again may work. */
28
+ DISPATCH_UNAVAILABLE = "dispatch-unavailable"
29
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Why `unibox-api` refused something an agent can do something about.
3
+ *
4
+ * Sent as `error.details.reason`. An inbox shown in Georgian cannot print the API's English sentence at the agent, so
5
+ * each of these is a key `unibox-web` translates. The English `message` remains for a log line and for anything that
6
+ * does not know this list.
7
+ */
8
+ export var UniboxRefusal;
9
+ (function (UniboxRefusal) {
10
+ /** The conversation's channel has been switched off, so a reply has nowhere to go. */
11
+ UniboxRefusal["CHANNEL_INACTIVE"] = "channel-inactive";
12
+ /** The conversation cannot move to that status from where it is now. Carries `currentStatus` and `requestedStatus`. */
13
+ UniboxRefusal["STATUS_NOT_ALLOWED"] = "status-not-allowed";
14
+ /** A conversation is snoozed until a moment that has to be in the future. */
15
+ UniboxRefusal["SNOOZE_IN_PAST"] = "snooze-in-past";
16
+ /** Another canned reply already uses that shortcut. */
17
+ UniboxRefusal["SHORTCUT_TAKEN"] = "shortcut-taken";
18
+ /** Another team already has that name. */
19
+ UniboxRefusal["TEAM_NAME_TAKEN"] = "team-name-taken";
20
+ /** Another channel already has that key. */
21
+ UniboxRefusal["CHANNEL_KEY_TAKEN"] = "channel-key-taken";
22
+ /** Too many replies in one conversation at once. Carries `retryAfterSeconds`. */
23
+ UniboxRefusal["SEND_RATE_LIMITED"] = "send-rate-limited";
24
+ /** Too many requests at once. Carries `retryAfterSeconds`. */
25
+ UniboxRefusal["RATE_LIMITED"] = "rate-limited";
26
+ /** Conduit would not take the reply, which is the channel's connection or operation, not the reply itself. */
27
+ UniboxRefusal["DISPATCH_REFUSED"] = "dispatch-refused";
28
+ /** Conduit could not be reached, so the reply was not handed over. Trying again may work. */
29
+ UniboxRefusal["DISPATCH_UNAVAILABLE"] = "dispatch-unavailable";
30
+ })(UniboxRefusal || (UniboxRefusal = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.126.0",
3
+ "version": "0.127.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {