@iveri/contracts 0.142.0 → 0.144.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 +4 -0
- package/dist/api/clinic/clinic-online-refund-status.enum.d.ts +13 -0
- package/dist/api/clinic/clinic-online-refund-status.enum.js +14 -0
- package/dist/api/clinic/clinic-payment.type.d.ts +24 -1
- package/dist/api/clinic/clinic-refusal.enum.d.ts +7 -1
- package/dist/api/clinic/clinic-refusal.enum.js +6 -0
- package/dist/api/clinic/index.d.ts +1 -0
- package/dist/api/clinic/index.js +1 -0
- package/dist/api/commerce/commerce-refusal.enum.d.ts +7 -1
- package/dist/api/commerce/commerce-refusal.enum.js +6 -0
- package/dist/api/unibox/ai-agent-setting.type.d.ts +33 -0
- package/dist/api/unibox/ai-agent-setting.type.js +4 -0
- package/dist/api/unibox/index.d.ts +1 -0
- package/dist/api/unibox/index.js +1 -0
- package/dist/api/unibox/message-author-type.enum.d.ts +2 -1
- package/dist/api/unibox/message-author-type.enum.js +2 -1
- package/dist/api/unibox-ai/agent-run.type.d.ts +56 -1
- package/dist/api/unibox-ai/agent-run.type.js +24 -0
- package/dist/enum/user-permission.enum.d.ts +19 -1
- package/dist/enum/user-permission.enum.js +20 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -322,6 +322,10 @@ Conduit's outbox.
|
|
|
322
322
|
`UniboxAgents` under `@iveri/contracts/unibox`, so the inbox picks agents by name.
|
|
323
323
|
- Version `0.139.0` adds a trainer's notes on a member: `GymTrainerNote`, `GymTrainerNotes`, `SaveGymTrainerNoteRequest`,
|
|
324
324
|
`GymMyTrainerNote` and the `GymRefusal` member `not-their-trainer` under `@iveri/contracts/gym`.
|
|
325
|
+
- Version `0.144.0` adds `unibox:ai:run-any`, `AiAgentSetting` and `UpdateAiAgentSettingBody` under
|
|
326
|
+
`@iveri/contracts/unibox`, and `AgentRunOutcome`, `AgentRunResult` and optional `AgentRunRequest` fields under `/unibox-ai`.
|
|
327
|
+
- Version `0.143.0` adds `billing:payment:refund` (moved off `billing:payment:manage`), `ClinicOnlineRefund`,
|
|
328
|
+
`ClinicOnlineRefundStatus` and `ClinicVisitPayments.onlineRefunds`, and refund members of `ClinicRefusal` and `CommerceRefusal`.
|
|
325
329
|
- Version `0.142.0` adds `isErased` on `ChatPersonCard`, `ChatParticipant` and `ChatMessageSender`, and
|
|
326
330
|
`senderIsErased` on `ChatLastMessagePreview` and `ChatReplyPreview`, so a client can say "Deleted account".
|
|
327
331
|
- Version `0.141.0` adds `TranslationMemory`, `TranslationMemorySuggestion`, `TranslationUse`, the
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where giving an online payment back through the bank stands.
|
|
3
|
+
*
|
|
4
|
+
* - `pending`: asked of the bank and not yet confirmed. Nothing is in the ledger yet, and the clinic asks again on its
|
|
5
|
+
* own until the bank answers.
|
|
6
|
+
* - `succeeded`: the bank gave the money back, and the ledger holds a negative `online` line for it.
|
|
7
|
+
* - `failed`: the bank refused or could not; nothing was given back and nothing recorded.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum ClinicOnlineRefundStatus {
|
|
10
|
+
PENDING = "pending",
|
|
11
|
+
SUCCEEDED = "succeeded",
|
|
12
|
+
FAILED = "failed"
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where giving an online payment back through the bank stands.
|
|
3
|
+
*
|
|
4
|
+
* - `pending`: asked of the bank and not yet confirmed. Nothing is in the ledger yet, and the clinic asks again on its
|
|
5
|
+
* own until the bank answers.
|
|
6
|
+
* - `succeeded`: the bank gave the money back, and the ledger holds a negative `online` line for it.
|
|
7
|
+
* - `failed`: the bank refused or could not; nothing was given back and nothing recorded.
|
|
8
|
+
*/
|
|
9
|
+
export var ClinicOnlineRefundStatus;
|
|
10
|
+
(function (ClinicOnlineRefundStatus) {
|
|
11
|
+
ClinicOnlineRefundStatus["PENDING"] = "pending";
|
|
12
|
+
ClinicOnlineRefundStatus["SUCCEEDED"] = "succeeded";
|
|
13
|
+
ClinicOnlineRefundStatus["FAILED"] = "failed";
|
|
14
|
+
})(ClinicOnlineRefundStatus || (ClinicOnlineRefundStatus = {}));
|
|
@@ -3,6 +3,7 @@ import type { Nullable } from '../../type/nil.type.js';
|
|
|
3
3
|
import type { UUID } from '../../type/uuid.type.js';
|
|
4
4
|
import type { ClinicAppointmentStatus } from './clinic-appointment-status.enum.js';
|
|
5
5
|
import type { ClinicCourse, MyClinicCourse } from './clinic-course.type.js';
|
|
6
|
+
import type { ClinicOnlineRefundStatus } from './clinic-online-refund-status.enum.js';
|
|
6
7
|
import type { ClinicPaymentMethod } from './clinic-payment-method.enum.js';
|
|
7
8
|
import type { LocalizedText } from './localized-text.type.js';
|
|
8
9
|
/** One line in the clinic's ledger. It is never edited: money given back is a new line pointing at it. */
|
|
@@ -23,7 +24,7 @@ export interface ClinicPayment {
|
|
|
23
24
|
/** Why money was given back. Only a refund has one. */
|
|
24
25
|
reason: Nullable<string>;
|
|
25
26
|
note: Nullable<string>;
|
|
26
|
-
/** How much of this can still be given back. Always zero on a refund. */
|
|
27
|
+
/** How much of this can still be given back. Always zero on a refund; less any online refund still pending. */
|
|
27
28
|
refundableMinor: number;
|
|
28
29
|
/** Who took it at the desk, or `null` for a deposit paid online, which nobody recorded by hand. */
|
|
29
30
|
recordedByName: Nullable<string>;
|
|
@@ -46,6 +47,26 @@ export interface ClinicBonusBalance {
|
|
|
46
47
|
currency: string;
|
|
47
48
|
amountMinor: number;
|
|
48
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Money a client paid online, being given back through the bank. Only `succeeded` puts a line in the ledger; until then
|
|
52
|
+
* it is this, so the desk can see a refund on its way or one the bank refused.
|
|
53
|
+
*/
|
|
54
|
+
export interface ClinicOnlineRefund {
|
|
55
|
+
id: UUID;
|
|
56
|
+
/** The `online` ledger line being given back. */
|
|
57
|
+
paymentId: UUID;
|
|
58
|
+
/** Positive: how much is being given back. */
|
|
59
|
+
amountMinor: number;
|
|
60
|
+
currency: string;
|
|
61
|
+
status: ClinicOnlineRefundStatus;
|
|
62
|
+
reason: string;
|
|
63
|
+
/** The ledger's negative line, once the bank confirmed. */
|
|
64
|
+
refundPaymentId: Nullable<UUID>;
|
|
65
|
+
requestedByName: Nullable<string>;
|
|
66
|
+
createdAt: IsoDateTime;
|
|
67
|
+
/** When the bank's answer was recorded, either way. */
|
|
68
|
+
settledAt: Nullable<IsoDateTime>;
|
|
69
|
+
}
|
|
49
70
|
/** What reception needs at the desk for one visit. */
|
|
50
71
|
export interface ClinicVisitPayments {
|
|
51
72
|
appointmentId: UUID;
|
|
@@ -59,6 +80,8 @@ export interface ClinicVisitPayments {
|
|
|
59
80
|
paidMinor: number;
|
|
60
81
|
dueMinor: number;
|
|
61
82
|
payments: ClinicPayment[];
|
|
83
|
+
/** Online payments of this visit being given back through the bank, newest first, whatever their state. */
|
|
84
|
+
onlineRefunds: ClinicOnlineRefund[];
|
|
62
85
|
/** This client's bonus in the visit's currency. */
|
|
63
86
|
bonusBalanceMinor: number;
|
|
64
87
|
/** This client's courses that can pay for a line of this visit. */
|
|
@@ -10,5 +10,11 @@ export declare enum ClinicRefusal {
|
|
|
10
10
|
/** Too close to another session of the same treatment; `details.minDaysBetweenSessions` says how far apart. */
|
|
11
11
|
SESSION_GAP = "session-gap",
|
|
12
12
|
/** The chosen specialist does not perform this treatment at this branch. */
|
|
13
|
-
SPECIALIST_INELIGIBLE = "specialist-ineligible"
|
|
13
|
+
SPECIALIST_INELIGIBLE = "specialist-ineligible",
|
|
14
|
+
/** The bank refused to give the online payment back, or could not; nothing was returned and nothing recorded. */
|
|
15
|
+
ONLINE_REFUND_FAILED = "online-refund-failed",
|
|
16
|
+
/** A refund of this online payment is still being confirmed with the bank; wait for it before asking again. */
|
|
17
|
+
ONLINE_REFUND_PENDING = "online-refund-pending",
|
|
18
|
+
/** This clinic cannot give online payments back from here; the money goes back from the payment provider. */
|
|
19
|
+
ONLINE_REFUND_UNAVAILABLE = "online-refund-unavailable"
|
|
14
20
|
}
|
|
@@ -12,4 +12,10 @@ export var ClinicRefusal;
|
|
|
12
12
|
ClinicRefusal["SESSION_GAP"] = "session-gap";
|
|
13
13
|
/** The chosen specialist does not perform this treatment at this branch. */
|
|
14
14
|
ClinicRefusal["SPECIALIST_INELIGIBLE"] = "specialist-ineligible";
|
|
15
|
+
/** The bank refused to give the online payment back, or could not; nothing was returned and nothing recorded. */
|
|
16
|
+
ClinicRefusal["ONLINE_REFUND_FAILED"] = "online-refund-failed";
|
|
17
|
+
/** A refund of this online payment is still being confirmed with the bank; wait for it before asking again. */
|
|
18
|
+
ClinicRefusal["ONLINE_REFUND_PENDING"] = "online-refund-pending";
|
|
19
|
+
/** This clinic cannot give online payments back from here; the money goes back from the payment provider. */
|
|
20
|
+
ClinicRefusal["ONLINE_REFUND_UNAVAILABLE"] = "online-refund-unavailable";
|
|
15
21
|
})(ClinicRefusal || (ClinicRefusal = {}));
|
|
@@ -17,6 +17,7 @@ export * from './clinic-gallery.type.js';
|
|
|
17
17
|
export * from './clinic-media.type.js';
|
|
18
18
|
export * from './clinic-newsletter-channel.enum.js';
|
|
19
19
|
export * from './clinic-newsletter.type.js';
|
|
20
|
+
export * from './clinic-online-refund-status.enum.js';
|
|
20
21
|
export * from './clinic-payment-method.enum.js';
|
|
21
22
|
export * from './clinic-payment.type.js';
|
|
22
23
|
export * from './clinic-profile.type.js';
|
package/dist/api/clinic/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export * from './clinic-gallery.type.js';
|
|
|
17
17
|
export * from './clinic-media.type.js';
|
|
18
18
|
export * from './clinic-newsletter-channel.enum.js';
|
|
19
19
|
export * from './clinic-newsletter.type.js';
|
|
20
|
+
export * from './clinic-online-refund-status.enum.js';
|
|
20
21
|
export * from './clinic-payment-method.enum.js';
|
|
21
22
|
export * from './clinic-payment.type.js';
|
|
22
23
|
export * from './clinic-profile.type.js';
|
|
@@ -43,5 +43,11 @@ export declare enum CommerceRefusal {
|
|
|
43
43
|
* The order, or its shipment, cannot make that move from where it is now, usually because somebody else moved it
|
|
44
44
|
* first; `details.currentStatus` says where it is (merchant only).
|
|
45
45
|
*/
|
|
46
|
-
ORDER_MOVED_ON = "order-moved-on"
|
|
46
|
+
ORDER_MOVED_ON = "order-moved-on",
|
|
47
|
+
/** Only a cancelled order that was paid online can be refunded here, and only once. */
|
|
48
|
+
NOT_REFUNDABLE = "not-refundable",
|
|
49
|
+
/** The bank refused to give the money back, or could not; nothing was returned. Asking again tries once more. */
|
|
50
|
+
REFUND_FAILED = "refund-failed",
|
|
51
|
+
/** A refund of this order is still being confirmed with the bank; it finishes on its own. */
|
|
52
|
+
REFUND_PENDING = "refund-pending"
|
|
47
53
|
}
|
|
@@ -45,4 +45,10 @@ export var CommerceRefusal;
|
|
|
45
45
|
* first; `details.currentStatus` says where it is (merchant only).
|
|
46
46
|
*/
|
|
47
47
|
CommerceRefusal["ORDER_MOVED_ON"] = "order-moved-on";
|
|
48
|
+
/** Only a cancelled order that was paid online can be refunded here, and only once. */
|
|
49
|
+
CommerceRefusal["NOT_REFUNDABLE"] = "not-refundable";
|
|
50
|
+
/** The bank refused to give the money back, or could not; nothing was returned. Asking again tries once more. */
|
|
51
|
+
CommerceRefusal["REFUND_FAILED"] = "refund-failed";
|
|
52
|
+
/** A refund of this order is still being confirmed with the bank; it finishes on its own. */
|
|
53
|
+
CommerceRefusal["REFUND_PENDING"] = "refund-pending";
|
|
48
54
|
})(CommerceRefusal || (CommerceRefusal = {}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
3
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
4
|
+
/** The longest instructions a company may give its AI agent, in characters. */
|
|
5
|
+
export declare const AI_AGENT_INSTRUCTIONS_MAX_LENGTH = 4000;
|
|
6
|
+
/** The most MCP servers one company's AI agent may use. */
|
|
7
|
+
export declare const AI_AGENT_MAX_MCP_SERVERS = 10;
|
|
8
|
+
/**
|
|
9
|
+
* Whether a company's AI agent answers its customers, and with what.
|
|
10
|
+
*
|
|
11
|
+
* **Off unless somebody turns it on.** While it is on, every inbound message on a conversation nobody has taken over is
|
|
12
|
+
* answered by the agent through the company's own channel; a person pressing "Take over" stops it for that
|
|
13
|
+
* conversation for good (`Conversation.handedOverAt`). A company that never saved a setting reads as off, with
|
|
14
|
+
* `updatedAt` null.
|
|
15
|
+
*
|
|
16
|
+
* `mcpServerIds` name servers registered in `unibox-ai` (`McpServer.id`), the only tools the agent may call. An id that
|
|
17
|
+
* no longer names an active server is skipped when a run starts, never an error a customer would see.
|
|
18
|
+
*/
|
|
19
|
+
export interface AiAgentSetting {
|
|
20
|
+
isEnabled: boolean;
|
|
21
|
+
/** The company's own words for the agent (tone, what it may promise). Null uses the default. */
|
|
22
|
+
instructions: Nullable<string>;
|
|
23
|
+
mcpServerIds: UUID[];
|
|
24
|
+
updatedAt: Nullable<IsoDateTime>;
|
|
25
|
+
}
|
|
26
|
+
/** `PUT /api/v1/ai-agent`. The whole setting, replaced. */
|
|
27
|
+
export interface UpdateAiAgentSettingBody {
|
|
28
|
+
isEnabled: boolean;
|
|
29
|
+
/** Up to {@link AI_AGENT_INSTRUCTIONS_MAX_LENGTH} characters; null or blank uses the default. */
|
|
30
|
+
instructions: Nullable<string>;
|
|
31
|
+
/** Up to {@link AI_AGENT_MAX_MCP_SERVERS} distinct ids. */
|
|
32
|
+
mcpServerIds: UUID[];
|
|
33
|
+
}
|
package/dist/api/unibox/index.js
CHANGED
|
@@ -13,7 +13,8 @@ export declare enum MessageAuthorType {
|
|
|
13
13
|
/** A human agent. `authorUserId` names them. */
|
|
14
14
|
AGENT = "agent",
|
|
15
15
|
/**
|
|
16
|
-
* The AI agent.
|
|
16
|
+
* The AI agent. `unibox-api` writes it for a reply `unibox-ai` composed, sent through the company's channel like an
|
|
17
|
+
* agent's; `authorUserId` is null.
|
|
17
18
|
*
|
|
18
19
|
* Distinct from `AGENT` because "did a person say this?" is the question a human asks before
|
|
19
20
|
* taking over, and because a customer who later asks whether they were talking to a bot
|
|
@@ -14,7 +14,8 @@ export var MessageAuthorType;
|
|
|
14
14
|
/** A human agent. `authorUserId` names them. */
|
|
15
15
|
MessageAuthorType["AGENT"] = "agent";
|
|
16
16
|
/**
|
|
17
|
-
* The AI agent.
|
|
17
|
+
* The AI agent. `unibox-api` writes it for a reply `unibox-ai` composed, sent through the company's channel like an
|
|
18
|
+
* agent's; `authorUserId` is null.
|
|
18
19
|
*
|
|
19
20
|
* Distinct from `AGENT` because "did a person say this?" is the question a human asks before
|
|
20
21
|
* taking over, and because a customer who later asks whether they were talking to a bot
|
|
@@ -24,13 +24,68 @@ export interface AgentRunRequest {
|
|
|
24
24
|
contactDisplayName: string;
|
|
25
25
|
conversationStatus: ConversationStatus;
|
|
26
26
|
handedOverAt: Nullable<IsoDateTime>;
|
|
27
|
+
/**
|
|
28
|
+
* The conversation so far, oldest first: what the contact and the company said to each other. Internal notes are
|
|
29
|
+
* never sent. The runtime keeps none of it; it builds the prompt from this and forgets it when the run ends.
|
|
30
|
+
*/
|
|
27
31
|
messages: AgentContextMessage[];
|
|
32
|
+
/**
|
|
33
|
+
* The company the run is for, named only by a token holding `unibox:ai:run-any` from Iveri's operator workspace
|
|
34
|
+
* (403 otherwise). Omitted, the run is for the token's own company.
|
|
35
|
+
*/
|
|
36
|
+
tenantId?: Nullable<UUID>;
|
|
37
|
+
/** `unibox-api`'s own id for the request, kept on the run row so the two records can be joined. */
|
|
38
|
+
agentRequestId?: Nullable<UUID>;
|
|
39
|
+
/** The company's own instructions for the agent (`AiAgentSetting` in `@iveri/contracts/unibox`); null or absent uses the default. */
|
|
40
|
+
instructions?: Nullable<string>;
|
|
41
|
+
/** The company's MCP servers the agent may call. An id naming no active server is skipped. */
|
|
42
|
+
mcpServerIds?: UUID[];
|
|
28
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* How one agent run ended. Only `answered` carries a reply; every other outcome means nothing is sent.
|
|
46
|
+
*
|
|
47
|
+
* - `answered`: the model wrote a reply.
|
|
48
|
+
* - `no-reply`: nothing to answer (the last message is not the contact's) or the model chose to write nothing.
|
|
49
|
+
* - `handed-over`: a person had taken the conversation before the run started; nothing was generated.
|
|
50
|
+
* - `budget-exceeded`: the run hit its token budget or its limit of tool rounds before writing a reply.
|
|
51
|
+
* - `timed-out`: the run hit its time limit, or the caller went away and the run was cancelled.
|
|
52
|
+
* - `refused`: the model declined to answer.
|
|
53
|
+
* - `unavailable`: no model provider is configured, so nothing can be generated.
|
|
54
|
+
* - `failed`: the model provider failed.
|
|
55
|
+
*/
|
|
56
|
+
export declare enum AgentRunOutcome {
|
|
57
|
+
ANSWERED = "answered",
|
|
58
|
+
NO_REPLY = "no-reply",
|
|
59
|
+
HANDED_OVER = "handed-over",
|
|
60
|
+
BUDGET_EXCEEDED = "budget-exceeded",
|
|
61
|
+
TIMED_OUT = "timed-out",
|
|
62
|
+
REFUSED = "refused",
|
|
63
|
+
UNAVAILABLE = "unavailable",
|
|
64
|
+
FAILED = "failed"
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* `POST /api/v1/agent-runs`: the run, finished. The caller decides whether to send `replyText`; the runtime never
|
|
68
|
+
* sends anything itself, so a person who takes the conversation while the model is thinking still wins.
|
|
69
|
+
*/
|
|
70
|
+
export interface AgentRunResult {
|
|
71
|
+
runId: UUID;
|
|
72
|
+
outcome: AgentRunOutcome;
|
|
73
|
+
/** The reply to send. Set only when `outcome` is `answered`. */
|
|
74
|
+
replyText: Nullable<string>;
|
|
75
|
+
/** The model that ran, null when none did. */
|
|
76
|
+
model: Nullable<string>;
|
|
77
|
+
inputTokens: number;
|
|
78
|
+
outputTokens: number;
|
|
79
|
+
/** Tool calls the model asked for, each recorded as an MCP execution row. */
|
|
80
|
+
toolCallCount: number;
|
|
81
|
+
completedAt: IsoDateTime;
|
|
82
|
+
}
|
|
83
|
+
/** @deprecated The acceptance stage `POST /api/v1/agent-runs` answered before runs generated; see {@link AgentRunOutcome}. */
|
|
29
84
|
export declare enum AgentRunStatus {
|
|
30
85
|
ACCEPTED = "accepted",
|
|
31
86
|
HANDED_OVER = "handed_over"
|
|
32
87
|
}
|
|
33
|
-
/** The acceptance response
|
|
88
|
+
/** @deprecated The acceptance response from before runs generated; `POST /api/v1/agent-runs` answers {@link AgentRunResult}. */
|
|
34
89
|
export interface AgentRunAcceptedResponse {
|
|
35
90
|
runId: UUID;
|
|
36
91
|
status: AgentRunStatus;
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one agent run ended. Only `answered` carries a reply; every other outcome means nothing is sent.
|
|
3
|
+
*
|
|
4
|
+
* - `answered`: the model wrote a reply.
|
|
5
|
+
* - `no-reply`: nothing to answer (the last message is not the contact's) or the model chose to write nothing.
|
|
6
|
+
* - `handed-over`: a person had taken the conversation before the run started; nothing was generated.
|
|
7
|
+
* - `budget-exceeded`: the run hit its token budget or its limit of tool rounds before writing a reply.
|
|
8
|
+
* - `timed-out`: the run hit its time limit, or the caller went away and the run was cancelled.
|
|
9
|
+
* - `refused`: the model declined to answer.
|
|
10
|
+
* - `unavailable`: no model provider is configured, so nothing can be generated.
|
|
11
|
+
* - `failed`: the model provider failed.
|
|
12
|
+
*/
|
|
13
|
+
export var AgentRunOutcome;
|
|
14
|
+
(function (AgentRunOutcome) {
|
|
15
|
+
AgentRunOutcome["ANSWERED"] = "answered";
|
|
16
|
+
AgentRunOutcome["NO_REPLY"] = "no-reply";
|
|
17
|
+
AgentRunOutcome["HANDED_OVER"] = "handed-over";
|
|
18
|
+
AgentRunOutcome["BUDGET_EXCEEDED"] = "budget-exceeded";
|
|
19
|
+
AgentRunOutcome["TIMED_OUT"] = "timed-out";
|
|
20
|
+
AgentRunOutcome["REFUSED"] = "refused";
|
|
21
|
+
AgentRunOutcome["UNAVAILABLE"] = "unavailable";
|
|
22
|
+
AgentRunOutcome["FAILED"] = "failed";
|
|
23
|
+
})(AgentRunOutcome || (AgentRunOutcome = {}));
|
|
24
|
+
/** @deprecated The acceptance stage `POST /api/v1/agent-runs` answered before runs generated; see {@link AgentRunOutcome}. */
|
|
1
25
|
export var AgentRunStatus;
|
|
2
26
|
(function (AgentRunStatus) {
|
|
3
27
|
AgentRunStatus["ACCEPTED"] = "accepted";
|
|
@@ -258,6 +258,12 @@ export declare enum UserPermission {
|
|
|
258
258
|
UNIBOX_REALTIME_PUBLISH_ANY = "unibox:realtime:publish-any",
|
|
259
259
|
/** Allows a trusted service principal to submit bounded conversation context for generation. */
|
|
260
260
|
UNIBOX_AI_RUN = "unibox:ai:run",
|
|
261
|
+
/**
|
|
262
|
+
* Ask for an agent run in a company the request names in `tenantId`, rather than the token's own. A platform
|
|
263
|
+
* permission, held beside {@link UserPermission.UNIBOX_AI_RUN} only by `unibox-api`'s credential in Iveri's operator
|
|
264
|
+
* workspace, so one key answers every company's inbound messages, each with that company's own MCP servers.
|
|
265
|
+
*/
|
|
266
|
+
UNIBOX_AI_RUN_ANY = "unibox:ai:run-any",
|
|
261
267
|
/** Read tenant MCP server metadata; credential values are never returned. */
|
|
262
268
|
UNIBOX_MCP_READ = "unibox:mcp:read",
|
|
263
269
|
/** Create, update or disconnect a tenant MCP server. */
|
|
@@ -305,7 +311,19 @@ export declare enum UserPermission {
|
|
|
305
311
|
*/
|
|
306
312
|
BILLING_PAYMENT_CHECKOUT = "billing:payment:checkout",
|
|
307
313
|
/**
|
|
308
|
-
*
|
|
314
|
+
* Give money back from a verified payment, in full or in part. **Separate from `manage` for the same reason as
|
|
315
|
+
* `checkout`:** a clinic giving a deposit back, or a shop refunding an order it cancelled, needs this one thing,
|
|
316
|
+
* and `manage` would also let it charge a saved card again and read or write the merchant's bank credentials.
|
|
317
|
+
*
|
|
318
|
+
* **Moved rather than added**, like `checkout`: nothing outside billing called the refund route before this, so
|
|
319
|
+
* narrowing it cost no backfill. `manage` no longer opens it. It carries no read; the refund's own answer is the
|
|
320
|
+
* outcome, and `billing:payment:read` still reads the session it belongs to.
|
|
321
|
+
*/
|
|
322
|
+
BILLING_PAYMENT_REFUND = "billing:payment:refund",
|
|
323
|
+
/**
|
|
324
|
+
* Operate recurring authorizations and charges, reconciliation, and merchant credentials.
|
|
325
|
+
*
|
|
326
|
+
* Refunds moved to {@link UserPermission.BILLING_PAYMENT_REFUND} on the same terms.
|
|
309
327
|
*
|
|
310
328
|
* Creating a payment session moved to {@link UserPermission.BILLING_PAYMENT_CHECKOUT}. That was
|
|
311
329
|
* affordable as a move rather than an addition because **nothing in the fleet called that route
|
|
@@ -305,6 +305,12 @@ export var UserPermission;
|
|
|
305
305
|
// ── AI runtime ──────────────────────────────────────────────────────────
|
|
306
306
|
/** Allows a trusted service principal to submit bounded conversation context for generation. */
|
|
307
307
|
UserPermission["UNIBOX_AI_RUN"] = "unibox:ai:run";
|
|
308
|
+
/**
|
|
309
|
+
* Ask for an agent run in a company the request names in `tenantId`, rather than the token's own. A platform
|
|
310
|
+
* permission, held beside {@link UserPermission.UNIBOX_AI_RUN} only by `unibox-api`'s credential in Iveri's operator
|
|
311
|
+
* workspace, so one key answers every company's inbound messages, each with that company's own MCP servers.
|
|
312
|
+
*/
|
|
313
|
+
UserPermission["UNIBOX_AI_RUN_ANY"] = "unibox:ai:run-any";
|
|
308
314
|
// ── MCP registry ────────────────────────────────────────────────────────
|
|
309
315
|
/** Read tenant MCP server metadata; credential values are never returned. */
|
|
310
316
|
UserPermission["UNIBOX_MCP_READ"] = "unibox:mcp:read";
|
|
@@ -358,7 +364,19 @@ export var UserPermission;
|
|
|
358
364
|
*/
|
|
359
365
|
UserPermission["BILLING_PAYMENT_CHECKOUT"] = "billing:payment:checkout";
|
|
360
366
|
/**
|
|
361
|
-
*
|
|
367
|
+
* Give money back from a verified payment, in full or in part. **Separate from `manage` for the same reason as
|
|
368
|
+
* `checkout`:** a clinic giving a deposit back, or a shop refunding an order it cancelled, needs this one thing,
|
|
369
|
+
* and `manage` would also let it charge a saved card again and read or write the merchant's bank credentials.
|
|
370
|
+
*
|
|
371
|
+
* **Moved rather than added**, like `checkout`: nothing outside billing called the refund route before this, so
|
|
372
|
+
* narrowing it cost no backfill. `manage` no longer opens it. It carries no read; the refund's own answer is the
|
|
373
|
+
* outcome, and `billing:payment:read` still reads the session it belongs to.
|
|
374
|
+
*/
|
|
375
|
+
UserPermission["BILLING_PAYMENT_REFUND"] = "billing:payment:refund";
|
|
376
|
+
/**
|
|
377
|
+
* Operate recurring authorizations and charges, reconciliation, and merchant credentials.
|
|
378
|
+
*
|
|
379
|
+
* Refunds moved to {@link UserPermission.BILLING_PAYMENT_REFUND} on the same terms.
|
|
362
380
|
*
|
|
363
381
|
* Creating a payment session moved to {@link UserPermission.BILLING_PAYMENT_CHECKOUT}. That was
|
|
364
382
|
* affordable as a move rather than an addition because **nothing in the fleet called that route
|
|
@@ -857,6 +875,7 @@ export const PLATFORM_PERMISSIONS = Object.freeze([
|
|
|
857
875
|
UserPermission.MOBILITY_DISPATCH_OPERATE_ANY,
|
|
858
876
|
UserPermission.CONDUIT_DISPATCH_SEND_ANY,
|
|
859
877
|
UserPermission.UNIBOX_REALTIME_PUBLISH_ANY,
|
|
878
|
+
UserPermission.UNIBOX_AI_RUN_ANY,
|
|
860
879
|
UserPermission.DELIVERY_JOB_READ_ANY,
|
|
861
880
|
UserPermission.DELIVERY_JOB_CREATE_ANY,
|
|
862
881
|
UserPermission.DELIVERY_JOB_OPERATE_ANY,
|