@quartal/messages-types 0.2.1 → 0.4.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 +19 -19
- package/dist/mod.d.ts +59 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# @quartal/messages-types
|
|
2
|
-
|
|
3
|
-
Schema and API contract for **Quartal Messages** — pure TypeScript shapes for the domain tables, the
|
|
4
|
-
agent-configuration catalog (models, tools, skills), and the views the Messages API returns
|
|
5
|
-
(`api.ts`: `ThreadSummary`, `ChatMessage`, `ChannelMembership`, `LiveEvent`, …).
|
|
6
|
-
|
|
7
|
-
No runtime dependencies; types only. Consumed by the API (`apps/quartal-messages-api`), the SDK
|
|
8
|
-
([`@quartal/messages-client`](../messages-client)) and the Vue UI layer (`@quartal/ui-messages`).
|
|
9
|
-
|
|
10
|
-
A pnpm workspace package of this repo (`workspace:*`); it is not published.
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```ts
|
|
15
|
-
import type { Agent, Channel, ChatMessage, ThreadSummary } from '@quartal/messages-types';
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
The exports are camelCase. The API maps database rows to these shapes
|
|
19
|
-
(`apps/quartal-messages-api/src/data/rows.ts`), so nothing outside the API sees snake_case rows.
|
|
1
|
+
# @quartal/messages-types
|
|
2
|
+
|
|
3
|
+
Schema and API contract for **Quartal Messages** — pure TypeScript shapes for the domain tables, the
|
|
4
|
+
agent-configuration catalog (models, tools, skills), and the views the Messages API returns
|
|
5
|
+
(`api.ts`: `ThreadSummary`, `ChatMessage`, `ChannelMembership`, `LiveEvent`, …).
|
|
6
|
+
|
|
7
|
+
No runtime dependencies; types only. Consumed by the API (`apps/quartal-messages-api`), the SDK
|
|
8
|
+
([`@quartal/messages-client`](../messages-client)) and the Vue UI layer (`@quartal/ui-messages`).
|
|
9
|
+
|
|
10
|
+
A pnpm workspace package of this repo (`workspace:*`); it is not published.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import type { Agent, Channel, ChatMessage, ThreadSummary } from '@quartal/messages-types';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The exports are camelCase. The API maps database rows to these shapes
|
|
19
|
+
(`apps/quartal-messages-api/src/data/rows.ts`), so nothing outside the API sees snake_case rows.
|
package/dist/mod.d.ts
CHANGED
|
@@ -904,6 +904,11 @@ interface PluginInfo {
|
|
|
904
904
|
description: string;
|
|
905
905
|
/** Version. */
|
|
906
906
|
version?: string;
|
|
907
|
+
/**
|
|
908
|
+
* A plugin on the plugin host: when it was last built (ISO 8601). A new build serves new widget
|
|
909
|
+
* documents, so what is cached of the plugin is keyed on it.
|
|
910
|
+
*/
|
|
911
|
+
builtAt?: string;
|
|
907
912
|
/** Homepage URL. */
|
|
908
913
|
homepage?: string;
|
|
909
914
|
/** Where the source code is, when the plugin publishes it: a local copy can then be made from it. */
|
|
@@ -1374,6 +1379,59 @@ interface HubConfigurationPatch {
|
|
|
1374
1379
|
skin?: SkinId | null;
|
|
1375
1380
|
}
|
|
1376
1381
|
//#endregion
|
|
1382
|
+
//#region src/seedData.d.ts
|
|
1383
|
+
/** A customer the demo can be built around. */
|
|
1384
|
+
interface SeedCustomer {
|
|
1385
|
+
/** Company id. */
|
|
1386
|
+
id: string;
|
|
1387
|
+
/** The company's name. */
|
|
1388
|
+
name: string;
|
|
1389
|
+
}
|
|
1390
|
+
/** Whether an organization can be reset to seed data, and with which customers. */
|
|
1391
|
+
interface SeedDataInfo {
|
|
1392
|
+
/**
|
|
1393
|
+
* Whether the reset is offered: the environment is a test environment (`HUB_SEED_REF` is set),
|
|
1394
|
+
* the organization has a plugin host, and the caller is a direct admin of it.
|
|
1395
|
+
*/
|
|
1396
|
+
available: boolean;
|
|
1397
|
+
/** The branch or tag of the plugin repository the reset goes to; set when {@link available}. */
|
|
1398
|
+
ref?: string;
|
|
1399
|
+
/** The organization's customers, by name: the demo is built around some of them. */
|
|
1400
|
+
customers: SeedCustomer[];
|
|
1401
|
+
/** The customers chosen by default: the first five by name. */
|
|
1402
|
+
defaultCustomers: string[];
|
|
1403
|
+
}
|
|
1404
|
+
/** The outcome of resetting an organization to its seed data. */
|
|
1405
|
+
interface SeedResetResult {
|
|
1406
|
+
/** The commit of the plugin repository the organization is at afterwards. */
|
|
1407
|
+
head: string;
|
|
1408
|
+
/** Whether the environment's branch was pushed to match it; false with the reason in {@link pushError}. */
|
|
1409
|
+
pushed: boolean;
|
|
1410
|
+
/** Why the push failed. */
|
|
1411
|
+
pushError?: string;
|
|
1412
|
+
/** The channels synced with the definitions at the seed commit. */
|
|
1413
|
+
channels: ChannelSyncResult;
|
|
1414
|
+
/** The customers the demo was built around, in their order (customer 1 first). */
|
|
1415
|
+
customers: SeedCustomer[];
|
|
1416
|
+
/** What the fixtures (`hub-seed/`) made. */
|
|
1417
|
+
fixtures: SeedFixturesResult;
|
|
1418
|
+
}
|
|
1419
|
+
/** What the fixtures of a seed made. */
|
|
1420
|
+
interface SeedFixturesResult {
|
|
1421
|
+
/** Listings written: a channel and a company it lists. */
|
|
1422
|
+
listings: number;
|
|
1423
|
+
/** Demo users created or updated (advisors and one sender per customer). */
|
|
1424
|
+
users: number;
|
|
1425
|
+
/** Threads written. */
|
|
1426
|
+
threads: number;
|
|
1427
|
+
/** Messages written. */
|
|
1428
|
+
messages: number;
|
|
1429
|
+
/** What was left out, with the reason (a channel the seed names that was not made, a customer position that has no customer). */
|
|
1430
|
+
skipped: string[];
|
|
1431
|
+
/** What failed, with the reason. */
|
|
1432
|
+
failed: string[];
|
|
1433
|
+
}
|
|
1434
|
+
//#endregion
|
|
1377
1435
|
//#region src/api.d.ts
|
|
1378
1436
|
/** A thread as list and kanban views show it. */
|
|
1379
1437
|
interface ThreadSummary {
|
|
@@ -1671,4 +1729,4 @@ interface ShownHomeView {
|
|
|
1671
1729
|
resourceUri: string;
|
|
1672
1730
|
}
|
|
1673
1731
|
//#endregion
|
|
1674
|
-
export { Agent, AgentPlugin, AgentPluginAuth, Archivable, Avatar, AvatarType, BootstrapColor, CatalogRepositoryInfo, Channel, ChannelAgentAssignment, type ChannelAgentSchedule, type ChannelAgentTrigger, type ChannelBaseStatus, ChannelCompany, ChannelCompanyListing, type ChannelDefinition, ChannelDefinitionInfo, type ChannelKind, ChannelMessageFile, ChannelStats, ChannelStatus, ChannelSyncResult, ChannelsStats, ChatMessage, Color, CompanyStats, CompanySummary, DEFAULT_AGENT_NAME, ExternalPlugin, FinishReason, HOSTED_PLUGIN_GROUPS, HUB_CONFIGURATION_FILE, HexColor, HomeView, HostedPlugin, HostedPluginBuild, HostedPluginContent, HostedPluginGroup, HostedPluginSource, HostedPluginState, HostedPluginTier, HubConfiguration, HubConfigurationInfo, HubConfigurationPatch, type HubToolGroup, type HubToolLevel, type HubToolSetting, Icon, IsoTimestamp, LiveEvent, type LocalizedText, Message, MessageFileContent, MessageRole, MessageUsage, Model, ModelCatalogRefreshResult, ModelGateway, ModelGatewayKind, ModelPrices, Period, PluginAgent, PluginCodeAttachment, PluginCodeChat, PluginCodeChatMessage, PluginCodeChatPart, PluginCodeChatSummary, PluginCounts, PluginFile, PluginHostGitChange, PluginHostGitCommit, PluginHostGitDiscardResult, PluginHostGitDiscardScope, PluginHostGitFileVersions, PluginHostGitResetMode, PluginHostGitResetResult, PluginHostGitStatus, PluginHostInfo, PluginHostPullResult, PluginHostPushResult, PluginInfo, PluginKind, PluginMember, PluginParameter, PluginRepository, PluginSyncResult, PluginTestSubject, PluginTestToken, PluginTestTool, Registration, RegistrationCompanies, RegistrationEffort, RegistrationErrors, RegistrationInput, RegistrationPlans, RegistrationRole, RegistrationTimeline, ReplyState, RowMeta, SKIN_IDS, ShownHomeView, SkinId, Tenancy, Thread, ThreadAgent, ThreadSummary, Timestamped, ToolCallState, ToolExecutor, Transport, UIFilePart, UIMessagePart, UIMessagePartBase, UIMessagePartState, UIReasoningPart, UITextPart, UIThreadDataPart, UIThreadPeriodPart, UIThreadStatusPart, UIToolApproval, UIToolPart, UIToolWidget, UIWidgetContextPart, UsageCost, UserCompany, UserInfo, UserProfile, UserRoles, Uuid, Validity, WidgetCsp, WidgetResource, WidgetToolResult, allowCatalogEdits, englishCompanyName };
|
|
1732
|
+
export { Agent, AgentPlugin, AgentPluginAuth, Archivable, Avatar, AvatarType, BootstrapColor, CatalogRepositoryInfo, Channel, ChannelAgentAssignment, type ChannelAgentSchedule, type ChannelAgentTrigger, type ChannelBaseStatus, ChannelCompany, ChannelCompanyListing, type ChannelDefinition, ChannelDefinitionInfo, type ChannelKind, ChannelMessageFile, ChannelStats, ChannelStatus, ChannelSyncResult, ChannelsStats, ChatMessage, Color, CompanyStats, CompanySummary, DEFAULT_AGENT_NAME, ExternalPlugin, FinishReason, HOSTED_PLUGIN_GROUPS, HUB_CONFIGURATION_FILE, HexColor, HomeView, HostedPlugin, HostedPluginBuild, HostedPluginContent, HostedPluginGroup, HostedPluginSource, HostedPluginState, HostedPluginTier, HubConfiguration, HubConfigurationInfo, HubConfigurationPatch, type HubToolGroup, type HubToolLevel, type HubToolSetting, Icon, IsoTimestamp, LiveEvent, type LocalizedText, Message, MessageFileContent, MessageRole, MessageUsage, Model, ModelCatalogRefreshResult, ModelGateway, ModelGatewayKind, ModelPrices, Period, PluginAgent, PluginCodeAttachment, PluginCodeChat, PluginCodeChatMessage, PluginCodeChatPart, PluginCodeChatSummary, PluginCounts, PluginFile, PluginHostGitChange, PluginHostGitCommit, PluginHostGitDiscardResult, PluginHostGitDiscardScope, PluginHostGitFileVersions, PluginHostGitResetMode, PluginHostGitResetResult, PluginHostGitStatus, PluginHostInfo, PluginHostPullResult, PluginHostPushResult, PluginInfo, PluginKind, PluginMember, PluginParameter, PluginRepository, PluginSyncResult, PluginTestSubject, PluginTestToken, PluginTestTool, Registration, RegistrationCompanies, RegistrationEffort, RegistrationErrors, RegistrationInput, RegistrationPlans, RegistrationRole, RegistrationTimeline, ReplyState, RowMeta, SKIN_IDS, SeedCustomer, SeedDataInfo, SeedFixturesResult, SeedResetResult, ShownHomeView, SkinId, Tenancy, Thread, ThreadAgent, ThreadSummary, Timestamped, ToolCallState, ToolExecutor, Transport, UIFilePart, UIMessagePart, UIMessagePartBase, UIMessagePartState, UIReasoningPart, UITextPart, UIThreadDataPart, UIThreadPeriodPart, UIThreadStatusPart, UIToolApproval, UIToolPart, UIToolWidget, UIWidgetContextPart, UsageCost, UserCompany, UserInfo, UserProfile, UserRoles, Uuid, Validity, WidgetCsp, WidgetResource, WidgetToolResult, allowCatalogEdits, englishCompanyName };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quartal/messages-types",
|
|
3
3
|
"description": "Schema contract for Quartal Messages",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Quartal Accounting Software Oy",
|
|
7
7
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@quartal/core": "^1.5.1",
|
|
33
|
-
"@quartal/hub-plugin": "0.
|
|
33
|
+
"@quartal/hub-plugin": "0.4.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|