@elqnt/types 2.0.12 → 2.0.14
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 +35 -157
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -507
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -359
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.d.mts +33 -1862
- package/dist/models/index.d.ts +33 -1862
- package/dist/models/index.js +28 -507
- package/dist/models/index.js.map +1 -1
- package/dist/models/index.mjs +21 -359
- package/dist/models/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,189 +1,67 @@
|
|
|
1
1
|
# @elqnt/types
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Core TypeScript type definitions for the Eloquent platform.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
npm install @elqnt/types
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import type { ResponseMetadata, JSONSchema } from "@elqnt/types";
|
|
15
|
-
import type { User, Organization } from "@elqnt/types/models";
|
|
14
|
+
import type { ResponseMetadata, JSONSchema, APIResponse } from "@elqnt/types";
|
|
16
15
|
|
|
17
|
-
//
|
|
18
|
-
interface
|
|
19
|
-
data:
|
|
16
|
+
// Standard API response metadata
|
|
17
|
+
interface MyResponse {
|
|
18
|
+
data: unknown;
|
|
20
19
|
metadata: ResponseMetadata;
|
|
21
20
|
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Exports
|
|
25
|
-
|
|
26
|
-
| Import Path | Description |
|
|
27
|
-
|-------------|-------------|
|
|
28
|
-
| `@elqnt/types` | All type exports |
|
|
29
|
-
| `@elqnt/types/models` | Domain model types |
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
22
|
+
// JSON Schema for dynamic forms
|
|
23
|
+
const schema: JSONSchema = {
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
name: { type: "string", minLength: 1 },
|
|
27
|
+
email: { type: "string", format: "email" },
|
|
28
|
+
},
|
|
29
|
+
required: ["name", "email"],
|
|
30
|
+
};
|
|
40
31
|
```
|
|
41
32
|
|
|
42
|
-
|
|
33
|
+
## Entry Points
|
|
43
34
|
|
|
44
|
-
|
|
35
|
+
| Import | Description |
|
|
36
|
+
|--------|-------------|
|
|
37
|
+
| `@elqnt/types` | Core types (ResponseMetadata, JSONSchema, etc.) |
|
|
38
|
+
| `@elqnt/types/models` | Model types (UserStatus, Widget, Product) |
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
interface ResponseMetadata {
|
|
48
|
-
success: boolean;
|
|
49
|
-
message?: string;
|
|
50
|
-
timestamp?: string;
|
|
51
|
-
}
|
|
52
|
-
```
|
|
40
|
+
## Core Types
|
|
53
41
|
|
|
54
|
-
|
|
42
|
+
- `ResponseMetadata` - Standard API response metadata
|
|
43
|
+
- `APIResponse<T>` - Unified response wrapper
|
|
44
|
+
- `APIError` - Structured error information
|
|
45
|
+
- `JSONSchema` - JSON Schema definition type
|
|
46
|
+
- `Variable` - Workflow/agent variable type
|
|
47
|
+
- `DataType` - Data type enum
|
|
55
48
|
|
|
56
|
-
|
|
49
|
+
## Migration Notice
|
|
57
50
|
|
|
58
|
-
|
|
51
|
+
Admin and billing types have moved to `@elqnt/admin`:
|
|
59
52
|
|
|
60
53
|
```typescript
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
User,
|
|
64
|
-
UserStatus,
|
|
65
|
-
|
|
66
|
-
// Organization
|
|
67
|
-
Organization,
|
|
68
|
-
OrganizationMember,
|
|
69
|
-
|
|
70
|
-
// Admin
|
|
71
|
-
AdminSettings,
|
|
72
|
-
|
|
73
|
-
// Billing
|
|
74
|
-
BillingPlan,
|
|
75
|
-
Subscription,
|
|
76
|
-
CreditBalance,
|
|
77
|
-
|
|
78
|
-
// Knowledge Graph
|
|
79
|
-
KGNode,
|
|
80
|
-
KGEdge,
|
|
81
|
-
|
|
82
|
-
// Documents
|
|
83
|
-
DocLibrary,
|
|
84
|
-
DocFolder,
|
|
85
|
-
DocReference,
|
|
86
|
-
|
|
87
|
-
// Hub
|
|
88
|
-
HubConfig,
|
|
89
|
-
} from "@elqnt/types/models";
|
|
54
|
+
// NEW location for User, Org, Plan, etc.
|
|
55
|
+
import type { User, Org, Plan } from "@elqnt/admin/models";
|
|
90
56
|
```
|
|
91
57
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
```typescript
|
|
95
|
-
interface User {
|
|
96
|
-
id: string;
|
|
97
|
-
email: string;
|
|
98
|
-
name?: string;
|
|
99
|
-
avatar?: string;
|
|
100
|
-
role?: string;
|
|
101
|
-
status?: UserStatus;
|
|
102
|
-
createdAt?: string;
|
|
103
|
-
updatedAt?: string;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
type UserStatus = "active" | "inactive" | "pending";
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Billing Models
|
|
110
|
-
|
|
111
|
-
```typescript
|
|
112
|
-
interface BillingPlan {
|
|
113
|
-
id: string;
|
|
114
|
-
name: string;
|
|
115
|
-
description?: string;
|
|
116
|
-
priceMonthly: number;
|
|
117
|
-
priceYearly: number;
|
|
118
|
-
features: string[];
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface Subscription {
|
|
122
|
-
id: string;
|
|
123
|
-
planId: string;
|
|
124
|
-
status: string;
|
|
125
|
-
currentPeriodEnd?: string;
|
|
126
|
-
seats: number;
|
|
127
|
-
}
|
|
128
|
-
```
|
|
58
|
+
## Documentation
|
|
129
59
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
interface DocLibrary {
|
|
134
|
-
id: string;
|
|
135
|
-
name: string;
|
|
136
|
-
description?: string;
|
|
137
|
-
isDefault?: boolean;
|
|
138
|
-
ownerEmail?: string;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
interface DocFolder {
|
|
142
|
-
id: string;
|
|
143
|
-
libraryId: string;
|
|
144
|
-
name: string;
|
|
145
|
-
parentFolderId?: string;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
interface DocReference {
|
|
149
|
-
id: string;
|
|
150
|
-
libraryId: string;
|
|
151
|
-
folderId?: string;
|
|
152
|
-
name: string;
|
|
153
|
-
mimeType?: string;
|
|
154
|
-
size?: number;
|
|
155
|
-
url?: string;
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Utility Types
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
import { getStatusColor, getStatusLabel } from "@elqnt/types/utils";
|
|
163
|
-
|
|
164
|
-
// UI helpers for status display
|
|
165
|
-
const color = getStatusColor("active"); // "green"
|
|
166
|
-
const label = getStatusLabel("pending"); // "Pending"
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Usage with Other Packages
|
|
170
|
-
|
|
171
|
-
This package is a dependency of most `@elqnt/*` packages:
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
// Used by @elqnt/entity
|
|
175
|
-
import type { ResponseMetadata } from "@elqnt/types";
|
|
176
|
-
|
|
177
|
-
// Used by @elqnt/workflow
|
|
178
|
-
import type { JSONSchema } from "@elqnt/types";
|
|
179
|
-
|
|
180
|
-
// Used by @elqnt/admin
|
|
181
|
-
import type { User, Organization } from "@elqnt/types/models";
|
|
182
|
-
```
|
|
60
|
+
Full reference: https://docs.eloquent.ai/packages/types
|
|
183
61
|
|
|
184
|
-
##
|
|
62
|
+
## Changelog
|
|
185
63
|
|
|
186
|
-
|
|
64
|
+
See [CHANGELOG.md](./CHANGELOG.md)
|
|
187
65
|
|
|
188
66
|
## License
|
|
189
67
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { APIError, APIResponse,
|
|
1
|
+
export { APIError, APIResponse, AggregateType, AggregateTypeAverage, AggregateTypeCount, AggregateTypeDistinct, AggregateTypeMax, AggregateTypeMin, AggregateTypeSum, ChartSettings, ChartType, ChartTypeBar, ChartTypeDoughnut, ChartTypeLine, ChartTypeMetic, ChartTypePie, DataType, DataTypeArray, DataTypeBoolean, DataTypeDate, DataTypeFile, DataTypeFloat, DataTypeInputFields, DataTypeInt, DataTypeJSON, DataTypeObjectList, DataTypeString, DateValue, JSONSchema, MetricResult, ProductName, ProductNameAafya, ProductNameCRM, ProductNameDoneProjects, ProductNameEloquent, ProductNameFahim, ProductNameInvoiceBrain, ProductNameLegal, ProductNameOptionTS, ProductNameSanad, ProductNameShopAssist, ProductNameTS, ProductNameZomi, ProductNames, ResponseMetadata, ServiceEvent, ServiceEventMetadata, UpdateUserStatusRequest, UpdateUserStatusResponse, UpdateUserStatusSubject, UserStatusTS, Variable, VariableReference, VariableScope, VariableScopeEdge, VariableScopeGlobal, VariableScopeNode, VariableValidation, Widget, WidgetType, WidgetTypeAccounts, WidgetTypeActivities, WidgetTypeCalendar, WidgetTypeChart, WidgetTypeContacts, WidgetTypeEmail, WidgetTypeFiles, WidgetTypeLeads, WidgetTypeNotes, WidgetTypeOpportunities, WidgetTypeOrders, WidgetTypeTasks } from './models/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { APIError, APIResponse,
|
|
1
|
+
export { APIError, APIResponse, AggregateType, AggregateTypeAverage, AggregateTypeCount, AggregateTypeDistinct, AggregateTypeMax, AggregateTypeMin, AggregateTypeSum, ChartSettings, ChartType, ChartTypeBar, ChartTypeDoughnut, ChartTypeLine, ChartTypeMetic, ChartTypePie, DataType, DataTypeArray, DataTypeBoolean, DataTypeDate, DataTypeFile, DataTypeFloat, DataTypeInputFields, DataTypeInt, DataTypeJSON, DataTypeObjectList, DataTypeString, DateValue, JSONSchema, MetricResult, ProductName, ProductNameAafya, ProductNameCRM, ProductNameDoneProjects, ProductNameEloquent, ProductNameFahim, ProductNameInvoiceBrain, ProductNameLegal, ProductNameOptionTS, ProductNameSanad, ProductNameShopAssist, ProductNameTS, ProductNameZomi, ProductNames, ResponseMetadata, ServiceEvent, ServiceEventMetadata, UpdateUserStatusRequest, UpdateUserStatusResponse, UpdateUserStatusSubject, UserStatusTS, Variable, VariableReference, VariableScope, VariableScopeEdge, VariableScopeGlobal, VariableScopeNode, VariableValidation, Widget, WidgetType, WidgetTypeAccounts, WidgetTypeActivities, WidgetTypeCalendar, WidgetTypeChart, WidgetTypeContacts, WidgetTypeEmail, WidgetTypeFiles, WidgetTypeLeads, WidgetTypeNotes, WidgetTypeOpportunities, WidgetTypeOrders, WidgetTypeTasks } from './models/index.js';
|