@ecodrix/erix-api 1.2.0 → 1.2.1
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/dist/cli.js +5 -5
- package/dist/index.d.ts +283 -43
- package/dist/ts/browser/index.global.js +14 -14
- package/dist/ts/browser/index.global.js.map +1 -1
- package/dist/ts/cjs/index.cjs +1 -1
- package/dist/ts/cjs/index.cjs.map +1 -1
- package/dist/ts/cjs/index.d.cts +283 -43
- package/dist/ts/esm/index.d.ts +283 -43
- package/dist/ts/esm/index.js +1 -1
- package/dist/ts/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/core.ts +16 -17
- package/src/index.ts +2 -0
- package/src/resources/crm/leads.ts +64 -0
- package/src/resources/crm/pipelines.ts +37 -1
- package/src/resources/email.ts +108 -26
- package/src/resources/health.ts +25 -22
- package/src/resources/logs.ts +97 -0
- package/src/resources/media.ts +6 -9
- package/src/resources/whatsapp/templates.ts +45 -0
- package/src/types/metadata.ts +71 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The specific UI control type suggested for a field.
|
|
3
|
+
*/
|
|
4
|
+
export type FieldType =
|
|
5
|
+
| "string"
|
|
6
|
+
| "number"
|
|
7
|
+
| "boolean"
|
|
8
|
+
| "date"
|
|
9
|
+
| "datetime"
|
|
10
|
+
| "select"
|
|
11
|
+
| "multi-select"
|
|
12
|
+
| "phone"
|
|
13
|
+
| "email"
|
|
14
|
+
| "currency"
|
|
15
|
+
| "json"
|
|
16
|
+
| "textarea"
|
|
17
|
+
| "richtext"
|
|
18
|
+
| "file"
|
|
19
|
+
| "image";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Metadata defining a single field within a resource.
|
|
23
|
+
* Used by UI kits to automatically generate forms and validation logic.
|
|
24
|
+
*/
|
|
25
|
+
export interface FieldManifest {
|
|
26
|
+
/** The technical key name used in API requests. */
|
|
27
|
+
key: string;
|
|
28
|
+
/** Human-readable label (localized if possible). */
|
|
29
|
+
label: string;
|
|
30
|
+
/** Suggested UI type. */
|
|
31
|
+
type: FieldType;
|
|
32
|
+
/** Short hint/placeholder text. */
|
|
33
|
+
description?: string;
|
|
34
|
+
/** Whether the field is required for creation. */
|
|
35
|
+
required: boolean;
|
|
36
|
+
/** Whether the field should be hidden from standard create/edit forms. */
|
|
37
|
+
hidden?: boolean;
|
|
38
|
+
/** If type is 'select', the available options. */
|
|
39
|
+
options?: Array<{ label: string; value: string | number }>;
|
|
40
|
+
/** Validation constraints. */
|
|
41
|
+
validation?: {
|
|
42
|
+
regex?: string;
|
|
43
|
+
min?: number;
|
|
44
|
+
max?: number;
|
|
45
|
+
message?: string;
|
|
46
|
+
};
|
|
47
|
+
/** Whether the field is read-only. */
|
|
48
|
+
readOnly?: boolean;
|
|
49
|
+
/** UI grouping/category name. */
|
|
50
|
+
group?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A logical grouping of fields and UI hints for a top-level resource.
|
|
55
|
+
* Provides a 'blueprint' for erix-react components.
|
|
56
|
+
*/
|
|
57
|
+
export interface ResourceManifest {
|
|
58
|
+
/** The unique name of the resource (e.g., 'Lead', 'Template'). */
|
|
59
|
+
name: string;
|
|
60
|
+
/** All available fields for this resource. */
|
|
61
|
+
fields: FieldManifest[];
|
|
62
|
+
/** Suggested UI configurations. */
|
|
63
|
+
uiHints?: {
|
|
64
|
+
icon?: string;
|
|
65
|
+
primaryColor?: string;
|
|
66
|
+
/** Default sort order. */
|
|
67
|
+
defaultSort?: { field: string; direction: "asc" | "desc" };
|
|
68
|
+
/** Fields to show in a compact table view. */
|
|
69
|
+
summaryFields?: string[];
|
|
70
|
+
};
|
|
71
|
+
}
|