@elqnt/entity 2.1.2 → 2.2.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 +70 -19
- package/dist/api/index.d.mts +17 -2
- package/dist/api/index.d.ts +17 -2
- package/dist/api/index.js +4 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +3 -1
- package/dist/chunk-5BPHCJ2G.js +427 -0
- package/dist/chunk-5BPHCJ2G.js.map +1 -0
- package/dist/{chunk-SXBB42DJ.js → chunk-6SB5QDL5.js} +10 -2
- package/dist/chunk-6SB5QDL5.js.map +1 -0
- package/dist/chunk-F7ZN7FHI.mjs +427 -0
- package/dist/chunk-F7ZN7FHI.mjs.map +1 -0
- package/dist/{chunk-UHASYUCH.mjs → chunk-SHMUKUYC.mjs} +10 -2
- package/dist/{chunk-UHASYUCH.mjs.map → chunk-SHMUKUYC.mjs.map} +1 -1
- package/dist/hooks/index.d.mts +113 -18
- package/dist/hooks/index.d.ts +113 -18
- package/dist/hooks/index.js +13 -3
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +14 -4
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -147
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -146
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.js +108 -73
- package/dist/models/index.js.map +1 -1
- package/dist/models/index.mjs +108 -73
- package/dist/models/index.mjs.map +1 -1
- package/dist/use-entities-CC3WhBDv.d.ts +45 -0
- package/dist/use-entities-gK_B9I2n.d.mts +45 -0
- package/package.json +15 -13
- package/dist/chunk-4GC36G4D.js +0 -184
- package/dist/chunk-4GC36G4D.js.map +0 -1
- package/dist/chunk-GQJJP4YL.js +0 -204
- package/dist/chunk-GQJJP4YL.js.map +0 -1
- package/dist/chunk-JEDTIUWW.mjs +0 -204
- package/dist/chunk-JEDTIUWW.mjs.map +0 -1
- package/dist/chunk-LIACJMHV.mjs +0 -184
- package/dist/chunk-LIACJMHV.mjs.map +0 -1
- package/dist/chunk-SXBB42DJ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../api/index.ts"],"sourcesContent":["/**\n * Entity API functions\n *\n * Browser-side API client for entity operations.\n * Uses @elqnt/api-client for HTTP requests with automatic token management.\n */\n\nimport { browserApiRequest } from \"@elqnt/api-client/browser\";\nimport type { ApiResponse, ApiClientOptions } from \"@elqnt/api-client\";\nimport type { ResponseMetadata } from \"@elqnt/types\";\nimport type {\n EntityDefinition,\n EntityRecord,\n ListEntityDefinitionsResponse,\n EntityDefinitionResponse,\n ListEntityRecordsResponse,\n EntityRecordResponse,\n} from \"../models\";\n\n// =============================================================================\n// ENTITY DEFINITIONS\n// =============================================================================\n\nexport async function listEntityDefinitionsApi(\n options: ApiClientOptions\n): Promise<ApiResponse<ListEntityDefinitionsResponse>> {\n return browserApiRequest(\"/api/v1/entities/definitions\", { method: \"GET\", ...options });\n}\n\nexport async function getEntityDefinitionApi(\n entityName: string,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityDefinitionResponse>> {\n return browserApiRequest(`/api/v1/entities/definitions/${entityName}`, { method: \"GET\", ...options });\n}\n\nexport async function createEntityDefinitionApi(\n definition: Partial<EntityDefinition>,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityDefinitionResponse>> {\n return browserApiRequest(\"/api/v1/entities/definitions\", { method: \"POST\", body: definition, ...options });\n}\n\nexport async function updateEntityDefinitionApi(\n entityName: string,\n definition: Partial<EntityDefinition>,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityDefinitionResponse>> {\n return browserApiRequest(`/api/v1/entities/definitions/${entityName}`, { method: \"PUT\", body: definition, ...options });\n}\n\nexport async function deleteEntityDefinitionApi(\n entityName: string,\n options: ApiClientOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/definitions/${entityName}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// ENTITY RECORDS\n// =============================================================================\n\nexport async function queryEntityRecordsApi(\n entityName: string,\n query: Record<string, unknown>,\n options: ApiClientOptions\n): Promise<ApiResponse<ListEntityRecordsResponse>> {\n const params = new URLSearchParams();\n Object.entries(query).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n params.set(key, String(value));\n }\n });\n const queryString = params.toString();\n const endpoint = `/api/v1/entities/${entityName}/records${queryString ? `?${queryString}` : \"\"}`;\n return browserApiRequest(endpoint, { method: \"GET\", ...options });\n}\n\nexport async function getEntityRecordApi(\n entityName: string,\n recordId: string,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityRecordResponse>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/${recordId}`, { method: \"GET\", ...options });\n}\n\nexport async function createEntityRecordApi(\n entityName: string,\n record: Partial<EntityRecord>,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityRecordResponse>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records`, { method: \"POST\", body: record, ...options });\n}\n\nexport async function updateEntityRecordApi(\n entityName: string,\n recordId: string,\n record: Partial<EntityRecord>,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityRecordResponse>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/${recordId}`, { method: \"PUT\", body: record, ...options });\n}\n\nexport async function deleteEntityRecordApi(\n entityName: string,\n recordId: string,\n options: ApiClientOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/${recordId}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// BULK OPERATIONS\n// =============================================================================\n\nexport async function bulkCreateEntityRecordsApi(\n entityName: string,\n records: Partial<EntityRecord>[],\n options: ApiClientOptions\n): Promise<ApiResponse<{ records: EntityRecord[]; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/bulk`, { method: \"POST\", body: { records }, ...options });\n}\n\nexport async function bulkUpdateEntityRecordsApi(\n entityName: string,\n records: Partial<EntityRecord>[],\n options: ApiClientOptions\n): Promise<ApiResponse<{ records: EntityRecord[]; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/bulk`, { method: \"PUT\", body: { records }, ...options });\n}\n\nexport async function bulkDeleteEntityRecordsApi(\n entityName: string,\n recordIds: string[],\n options: ApiClientOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/bulk`, { method: \"DELETE\", body: { recordIds }, ...options });\n}\n\n// =============================================================================\n// COUNT\n// =============================================================================\n\nexport async function countEntityRecordsApi(\n entityName: string,\n filters: Record<string, unknown>,\n options: ApiClientOptions\n): Promise<ApiResponse<{ count: number; metadata: ResponseMetadata }>> {\n const params = new URLSearchParams();\n Object.entries(filters).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n params.set(key, String(value));\n }\n });\n const queryString = params.toString();\n const endpoint = `/api/v1/entities/${entityName}/records/count${queryString ? `?${queryString}` : \"\"}`;\n return browserApiRequest(endpoint, { method: \"GET\", ...options });\n}\n"],"mappings":"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","names":[]}
|
|
1
|
+
{"version":3,"sources":["../api/index.ts"],"sourcesContent":["/**\n * Entity API functions\n *\n * Browser-side API client for entity operations.\n * Uses @elqnt/api-client for HTTP requests with automatic token management.\n */\n\nimport { browserApiRequest } from \"@elqnt/api-client/browser\";\nimport type { ApiResponse, ApiClientOptions } from \"@elqnt/api-client\";\nimport type { ResponseMetadata } from \"@elqnt/types\";\nimport type {\n EntityDefinition,\n EntityRecord,\n ListEntityDefinitionsResponse,\n EntityDefinitionResponse,\n ListEntityRecordsResponse,\n EntityRecordResponse,\n} from \"../models\";\n\n// =============================================================================\n// ENTITY DEFINITIONS\n// =============================================================================\n\nexport async function listEntityDefinitionsApi(\n options: ApiClientOptions\n): Promise<ApiResponse<ListEntityDefinitionsResponse>> {\n return browserApiRequest(\"/api/v1/entities/definitions\", { method: \"GET\", ...options });\n}\n\nexport async function getEntityDefinitionApi(\n entityName: string,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityDefinitionResponse>> {\n return browserApiRequest(`/api/v1/entities/definitions/${entityName}`, { method: \"GET\", ...options });\n}\n\nexport async function createEntityDefinitionApi(\n definition: Partial<EntityDefinition>,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityDefinitionResponse>> {\n return browserApiRequest(\"/api/v1/entities/definitions\", { method: \"POST\", body: definition, ...options });\n}\n\nexport async function updateEntityDefinitionApi(\n entityName: string,\n definition: Partial<EntityDefinition>,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityDefinitionResponse>> {\n return browserApiRequest(`/api/v1/entities/definitions/${entityName}`, { method: \"PUT\", body: definition, ...options });\n}\n\nexport async function deleteEntityDefinitionApi(\n entityName: string,\n options: ApiClientOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/definitions/${entityName}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// ENTITY RECORDS\n// =============================================================================\n\nexport async function queryEntityRecordsApi(\n entityName: string,\n query: Record<string, unknown>,\n options: ApiClientOptions\n): Promise<ApiResponse<ListEntityRecordsResponse>> {\n const params = new URLSearchParams();\n Object.entries(query).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n params.set(key, String(value));\n }\n });\n const queryString = params.toString();\n const endpoint = `/api/v1/entities/${entityName}/records${queryString ? `?${queryString}` : \"\"}`;\n return browserApiRequest(endpoint, { method: \"GET\", ...options });\n}\n\nexport async function getEntityRecordApi(\n entityName: string,\n recordId: string,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityRecordResponse>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/${recordId}`, { method: \"GET\", ...options });\n}\n\nexport async function createEntityRecordApi(\n entityName: string,\n record: Partial<EntityRecord>,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityRecordResponse>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records`, { method: \"POST\", body: record, ...options });\n}\n\nexport async function updateEntityRecordApi(\n entityName: string,\n recordId: string,\n record: Partial<EntityRecord>,\n options: ApiClientOptions\n): Promise<ApiResponse<EntityRecordResponse>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/${recordId}`, { method: \"PUT\", body: record, ...options });\n}\n\nexport async function deleteEntityRecordApi(\n entityName: string,\n recordId: string,\n options: ApiClientOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/${recordId}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// BULK OPERATIONS\n// =============================================================================\n\nexport async function bulkCreateEntityRecordsApi(\n entityName: string,\n records: Partial<EntityRecord>[],\n options: ApiClientOptions\n): Promise<ApiResponse<{ records: EntityRecord[]; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/bulk`, { method: \"POST\", body: { records }, ...options });\n}\n\nexport async function bulkUpdateEntityRecordsApi(\n entityName: string,\n records: Partial<EntityRecord>[],\n options: ApiClientOptions\n): Promise<ApiResponse<{ records: EntityRecord[]; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/bulk`, { method: \"PUT\", body: { records }, ...options });\n}\n\nexport async function bulkDeleteEntityRecordsApi(\n entityName: string,\n recordIds: string[],\n options: ApiClientOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/entities/${entityName}/records/bulk`, { method: \"DELETE\", body: { recordIds }, ...options });\n}\n\n// =============================================================================\n// COUNT\n// =============================================================================\n\nexport async function countEntityRecordsApi(\n entityName: string,\n filters: Record<string, unknown>,\n options: ApiClientOptions\n): Promise<ApiResponse<{ count: number; metadata: ResponseMetadata }>> {\n const params = new URLSearchParams();\n Object.entries(filters).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n params.set(key, String(value));\n }\n });\n const queryString = params.toString();\n const endpoint = `/api/v1/entities/${entityName}/records/count${queryString ? `?${queryString}` : \"\"}`;\n return browserApiRequest(endpoint, { method: \"GET\", ...options });\n}\n\n// =============================================================================\n// PROVISIONING\n// =============================================================================\n\nexport interface ProvisionEntitiesResponse {\n created: number;\n updated: number;\n errors: string[];\n success: boolean;\n metadata: ResponseMetadata;\n}\n\n/**\n * Provision entity definitions for an organization.\n * Creates or updates entity definitions in bulk.\n *\n * @param definitions - Array of EntityDefinition to provision\n * @param options - API client options (baseUrl, orgId)\n */\nexport async function provisionEntitiesApi(\n definitions: EntityDefinition[],\n options: ApiClientOptions\n): Promise<ApiResponse<ProvisionEntitiesResponse>> {\n return browserApiRequest(\"/api/v1/admin/entities/update\", {\n method: \"POST\",\n body: { definitions },\n ...options,\n });\n}\n"],"mappings":";;;AAOA,SAAS,yBAAyB;AAgBlC,eAAsB,yBACpB,SACqD;AACrD,SAAO,kBAAkB,gCAAgC,EAAE,QAAQ,OAAO,GAAG,QAAQ,CAAC;AACxF;AAEA,eAAsB,uBACpB,YACA,SACgD;AAChD,SAAO,kBAAkB,gCAAgC,UAAU,IAAI,EAAE,QAAQ,OAAO,GAAG,QAAQ,CAAC;AACtG;AAEA,eAAsB,0BACpB,YACA,SACgD;AAChD,SAAO,kBAAkB,gCAAgC,EAAE,QAAQ,QAAQ,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC3G;AAEA,eAAsB,0BACpB,YACA,YACA,SACgD;AAChD,SAAO,kBAAkB,gCAAgC,UAAU,IAAI,EAAE,QAAQ,OAAO,MAAM,YAAY,GAAG,QAAQ,CAAC;AACxH;AAEA,eAAsB,0BACpB,YACA,SACwE;AACxE,SAAO,kBAAkB,gCAAgC,UAAU,IAAI,EAAE,QAAQ,UAAU,GAAG,QAAQ,CAAC;AACzG;AAMA,eAAsB,sBACpB,YACA,OACA,SACiD;AACjD,QAAM,SAAS,IAAI,gBAAgB;AACnC,SAAO,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC,aAAO,IAAI,KAAK,OAAO,KAAK,CAAC;AAAA,IAC/B;AAAA,EACF,CAAC;AACD,QAAM,cAAc,OAAO,SAAS;AACpC,QAAM,WAAW,oBAAoB,UAAU,WAAW,cAAc,IAAI,WAAW,KAAK,EAAE;AAC9F,SAAO,kBAAkB,UAAU,EAAE,QAAQ,OAAO,GAAG,QAAQ,CAAC;AAClE;AAEA,eAAsB,mBACpB,YACA,UACA,SAC4C;AAC5C,SAAO,kBAAkB,oBAAoB,UAAU,YAAY,QAAQ,IAAI,EAAE,QAAQ,OAAO,GAAG,QAAQ,CAAC;AAC9G;AAEA,eAAsB,sBACpB,YACA,QACA,SAC4C;AAC5C,SAAO,kBAAkB,oBAAoB,UAAU,YAAY,EAAE,QAAQ,QAAQ,MAAM,QAAQ,GAAG,QAAQ,CAAC;AACjH;AAEA,eAAsB,sBACpB,YACA,UACA,QACA,SAC4C;AAC5C,SAAO,kBAAkB,oBAAoB,UAAU,YAAY,QAAQ,IAAI,EAAE,QAAQ,OAAO,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAC5H;AAEA,eAAsB,sBACpB,YACA,UACA,SACwE;AACxE,SAAO,kBAAkB,oBAAoB,UAAU,YAAY,QAAQ,IAAI,EAAE,QAAQ,UAAU,GAAG,QAAQ,CAAC;AACjH;AAMA,eAAsB,2BACpB,YACA,SACA,SAC+E;AAC/E,SAAO,kBAAkB,oBAAoB,UAAU,iBAAiB,EAAE,QAAQ,QAAQ,MAAM,EAAE,QAAQ,GAAG,GAAG,QAAQ,CAAC;AAC3H;AAEA,eAAsB,2BACpB,YACA,SACA,SAC+E;AAC/E,SAAO,kBAAkB,oBAAoB,UAAU,iBAAiB,EAAE,QAAQ,OAAO,MAAM,EAAE,QAAQ,GAAG,GAAG,QAAQ,CAAC;AAC1H;AAEA,eAAsB,2BACpB,YACA,WACA,SACwE;AACxE,SAAO,kBAAkB,oBAAoB,UAAU,iBAAiB,EAAE,QAAQ,UAAU,MAAM,EAAE,UAAU,GAAG,GAAG,QAAQ,CAAC;AAC/H;AAMA,eAAsB,sBACpB,YACA,SACA,SACqE;AACrE,QAAM,SAAS,IAAI,gBAAgB;AACnC,SAAO,QAAQ,OAAO,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAChD,QAAI,UAAU,UAAa,UAAU,MAAM;AACzC,aAAO,IAAI,KAAK,OAAO,KAAK,CAAC;AAAA,IAC/B;AAAA,EACF,CAAC;AACD,QAAM,cAAc,OAAO,SAAS;AACpC,QAAM,WAAW,oBAAoB,UAAU,iBAAiB,cAAc,IAAI,WAAW,KAAK,EAAE;AACpG,SAAO,kBAAkB,UAAU,EAAE,QAAQ,OAAO,GAAG,QAAQ,CAAC;AAClE;AAqBA,eAAsB,qBACpB,aACA,SACiD;AACjD,SAAO,kBAAkB,iCAAiC;AAAA,IACxD,QAAQ;AAAA,IACR,MAAM,EAAE,YAAY;AAAA,IACpB,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,46 +1,141 @@
|
|
|
1
|
-
import { ApiClientOptions } from '@elqnt/api-client';
|
|
1
|
+
import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
|
|
2
2
|
import { EntityDefinition, EntityRecord } from '../models/index.mjs';
|
|
3
|
+
export { Q as QueryOptions, a as QueryResult, U as UseEntitiesOptions, u as useEntities } from '../use-entities-gK_B9I2n.mjs';
|
|
4
|
+
import * as react from 'react';
|
|
3
5
|
import '@elqnt/types';
|
|
4
6
|
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
+
type UseEntityDefinitionsOptions = ApiClientOptions;
|
|
8
|
+
/**
|
|
9
|
+
* Hook for entity definition CRUD operations
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const { loading, error, listDefinitions, getDefinition, createDefinition } = useEntityDefinitions({
|
|
14
|
+
* baseUrl: apiGatewayUrl,
|
|
15
|
+
* orgId: selectedOrgId,
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* const definitions = await listDefinitions();
|
|
19
|
+
* const definition = await getDefinition("contacts");
|
|
20
|
+
* const newDef = await createDefinition({ name: "leads", title: "Leads" });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare function useEntityDefinitions(options: UseEntityDefinitionsOptions): {
|
|
24
|
+
loading: boolean;
|
|
25
|
+
error: string | null;
|
|
26
|
+
listDefinitions: () => Promise<EntityDefinition[]>;
|
|
27
|
+
getDefinition: (entityName: string) => Promise<EntityDefinition | null>;
|
|
28
|
+
createDefinition: (definition: Partial<EntityDefinition>) => Promise<EntityDefinition | null>;
|
|
29
|
+
updateDefinition: (entityName: string, definition: Partial<EntityDefinition>) => Promise<EntityDefinition | null>;
|
|
30
|
+
deleteDefinition: (entityName: string) => Promise<boolean>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
interface UseEntityRecordsOptions extends ApiClientOptions {
|
|
34
|
+
/** Entity name to operate on */
|
|
35
|
+
entityName: string;
|
|
36
|
+
}
|
|
37
|
+
interface QueryRecordsParams {
|
|
7
38
|
page?: number;
|
|
8
39
|
pageSize?: number;
|
|
9
40
|
filters?: Record<string, unknown>;
|
|
10
41
|
sortBy?: string;
|
|
11
42
|
sortOrder?: "asc" | "desc";
|
|
12
43
|
}
|
|
13
|
-
interface
|
|
44
|
+
interface QueryRecordsResult {
|
|
14
45
|
records: EntityRecord[];
|
|
15
46
|
total: number;
|
|
16
47
|
page: number;
|
|
17
48
|
pageSize: number;
|
|
18
49
|
}
|
|
50
|
+
interface BulkOperationResult {
|
|
51
|
+
records?: EntityRecord[];
|
|
52
|
+
success: boolean;
|
|
53
|
+
}
|
|
19
54
|
/**
|
|
20
|
-
* Hook for entity CRUD operations
|
|
55
|
+
* Hook for entity record CRUD operations
|
|
21
56
|
*
|
|
22
57
|
* @example
|
|
23
58
|
* ```tsx
|
|
24
|
-
* const {
|
|
59
|
+
* const {
|
|
60
|
+
* loading, error,
|
|
61
|
+
* queryRecords, getRecord, createRecord, updateRecord, deleteRecord,
|
|
62
|
+
* countRecords, bulkCreate, bulkUpdate, bulkDelete
|
|
63
|
+
* } = useEntityRecords({
|
|
25
64
|
* baseUrl: apiGatewayUrl,
|
|
26
65
|
* orgId: selectedOrgId,
|
|
27
|
-
*
|
|
28
|
-
* userEmail: user?.email,
|
|
66
|
+
* entityName: "contacts",
|
|
29
67
|
* });
|
|
30
68
|
*
|
|
31
|
-
* const records = await queryRecords(
|
|
69
|
+
* const { records, total } = await queryRecords({ page: 1, pageSize: 20 });
|
|
70
|
+
* const record = await getRecord("record-id");
|
|
71
|
+
* const count = await countRecords({ status: "active" });
|
|
32
72
|
* ```
|
|
33
73
|
*/
|
|
34
|
-
declare function
|
|
74
|
+
declare function useEntityRecords(options: UseEntityRecordsOptions): {
|
|
35
75
|
loading: boolean;
|
|
36
76
|
error: string | null;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
77
|
+
queryRecords: (params?: QueryRecordsParams | undefined) => Promise<QueryRecordsResult>;
|
|
78
|
+
getRecord: (recordId: string) => Promise<EntityRecord | null>;
|
|
79
|
+
createRecord: (record: Partial<EntityRecord>) => Promise<EntityRecord | null>;
|
|
80
|
+
updateRecord: (recordId: string, record: Partial<EntityRecord>) => Promise<EntityRecord | null>;
|
|
81
|
+
deleteRecord: (recordId: string) => Promise<boolean>;
|
|
82
|
+
countRecords: (filters?: Record<string, unknown> | undefined) => Promise<number>;
|
|
83
|
+
bulkCreate: (records: Partial<EntityRecord>[]) => Promise<BulkOperationResult>;
|
|
84
|
+
bulkUpdate: (records: Partial<EntityRecord>[]) => Promise<BulkOperationResult>;
|
|
85
|
+
bulkDelete: (recordIds: string[]) => Promise<boolean>;
|
|
44
86
|
};
|
|
45
87
|
|
|
46
|
-
|
|
88
|
+
interface UseAsyncOptions {
|
|
89
|
+
/** Reset error on new request */
|
|
90
|
+
resetErrorOnRequest?: boolean;
|
|
91
|
+
}
|
|
92
|
+
interface UseAsyncReturn<TArgs extends unknown[], TResult> {
|
|
93
|
+
execute: (...args: TArgs) => Promise<TResult>;
|
|
94
|
+
loading: boolean;
|
|
95
|
+
error: string | null;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Generic async operation hook with loading/error states
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```tsx
|
|
102
|
+
* const { execute: fetchUser, loading, error } = useAsync(
|
|
103
|
+
* (userId: string) => getUserApi(userId, options),
|
|
104
|
+
* (data) => data.user,
|
|
105
|
+
* null
|
|
106
|
+
* );
|
|
107
|
+
*
|
|
108
|
+
* const user = await fetchUser("user-123");
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
declare function useAsync<TArgs extends unknown[], TData, TResult>(asyncFn: (...args: TArgs) => Promise<ApiResponse<TData>>, transform: (data: TData) => TResult, defaultValue: TResult, options?: UseAsyncOptions): UseAsyncReturn<TArgs, TResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Simplified async hook for API operations
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```tsx
|
|
117
|
+
* const { execute: getUsers, loading, error } = useApiAsync(
|
|
118
|
+
* () => listUsersApi(optionsRef.current),
|
|
119
|
+
* (data) => data.users,
|
|
120
|
+
* []
|
|
121
|
+
* );
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
declare function useApiAsync<TArgs extends unknown[], TData, TResult>(asyncFn: (...args: TArgs) => Promise<ApiResponse<TData>>, transform: (data: TData) => TResult, defaultValue: TResult): UseAsyncReturn<TArgs, TResult>;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Hook that keeps options in a ref for stable callback access
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```tsx
|
|
131
|
+
* const optionsRef = useOptionsRef({ baseUrl, orgId });
|
|
132
|
+
*
|
|
133
|
+
* const fetchData = useCallback(async () => {
|
|
134
|
+
* // Always accesses latest options without recreating callback
|
|
135
|
+
* await api.fetch(optionsRef.current);
|
|
136
|
+
* }, []); // No dependencies needed
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
declare function useOptionsRef<T>(options: T): react.RefObject<T>;
|
|
140
|
+
|
|
141
|
+
export { type BulkOperationResult, type QueryRecordsParams, type QueryRecordsResult, type UseAsyncOptions, type UseAsyncReturn, type UseEntityDefinitionsOptions, type UseEntityRecordsOptions, useApiAsync, useAsync, useEntityDefinitions, useEntityRecords, useOptionsRef };
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,46 +1,141 @@
|
|
|
1
|
-
import { ApiClientOptions } from '@elqnt/api-client';
|
|
1
|
+
import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
|
|
2
2
|
import { EntityDefinition, EntityRecord } from '../models/index.js';
|
|
3
|
+
export { Q as QueryOptions, a as QueryResult, U as UseEntitiesOptions, u as useEntities } from '../use-entities-CC3WhBDv.js';
|
|
4
|
+
import * as react from 'react';
|
|
3
5
|
import '@elqnt/types';
|
|
4
6
|
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
+
type UseEntityDefinitionsOptions = ApiClientOptions;
|
|
8
|
+
/**
|
|
9
|
+
* Hook for entity definition CRUD operations
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const { loading, error, listDefinitions, getDefinition, createDefinition } = useEntityDefinitions({
|
|
14
|
+
* baseUrl: apiGatewayUrl,
|
|
15
|
+
* orgId: selectedOrgId,
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* const definitions = await listDefinitions();
|
|
19
|
+
* const definition = await getDefinition("contacts");
|
|
20
|
+
* const newDef = await createDefinition({ name: "leads", title: "Leads" });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare function useEntityDefinitions(options: UseEntityDefinitionsOptions): {
|
|
24
|
+
loading: boolean;
|
|
25
|
+
error: string | null;
|
|
26
|
+
listDefinitions: () => Promise<EntityDefinition[]>;
|
|
27
|
+
getDefinition: (entityName: string) => Promise<EntityDefinition | null>;
|
|
28
|
+
createDefinition: (definition: Partial<EntityDefinition>) => Promise<EntityDefinition | null>;
|
|
29
|
+
updateDefinition: (entityName: string, definition: Partial<EntityDefinition>) => Promise<EntityDefinition | null>;
|
|
30
|
+
deleteDefinition: (entityName: string) => Promise<boolean>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
interface UseEntityRecordsOptions extends ApiClientOptions {
|
|
34
|
+
/** Entity name to operate on */
|
|
35
|
+
entityName: string;
|
|
36
|
+
}
|
|
37
|
+
interface QueryRecordsParams {
|
|
7
38
|
page?: number;
|
|
8
39
|
pageSize?: number;
|
|
9
40
|
filters?: Record<string, unknown>;
|
|
10
41
|
sortBy?: string;
|
|
11
42
|
sortOrder?: "asc" | "desc";
|
|
12
43
|
}
|
|
13
|
-
interface
|
|
44
|
+
interface QueryRecordsResult {
|
|
14
45
|
records: EntityRecord[];
|
|
15
46
|
total: number;
|
|
16
47
|
page: number;
|
|
17
48
|
pageSize: number;
|
|
18
49
|
}
|
|
50
|
+
interface BulkOperationResult {
|
|
51
|
+
records?: EntityRecord[];
|
|
52
|
+
success: boolean;
|
|
53
|
+
}
|
|
19
54
|
/**
|
|
20
|
-
* Hook for entity CRUD operations
|
|
55
|
+
* Hook for entity record CRUD operations
|
|
21
56
|
*
|
|
22
57
|
* @example
|
|
23
58
|
* ```tsx
|
|
24
|
-
* const {
|
|
59
|
+
* const {
|
|
60
|
+
* loading, error,
|
|
61
|
+
* queryRecords, getRecord, createRecord, updateRecord, deleteRecord,
|
|
62
|
+
* countRecords, bulkCreate, bulkUpdate, bulkDelete
|
|
63
|
+
* } = useEntityRecords({
|
|
25
64
|
* baseUrl: apiGatewayUrl,
|
|
26
65
|
* orgId: selectedOrgId,
|
|
27
|
-
*
|
|
28
|
-
* userEmail: user?.email,
|
|
66
|
+
* entityName: "contacts",
|
|
29
67
|
* });
|
|
30
68
|
*
|
|
31
|
-
* const records = await queryRecords(
|
|
69
|
+
* const { records, total } = await queryRecords({ page: 1, pageSize: 20 });
|
|
70
|
+
* const record = await getRecord("record-id");
|
|
71
|
+
* const count = await countRecords({ status: "active" });
|
|
32
72
|
* ```
|
|
33
73
|
*/
|
|
34
|
-
declare function
|
|
74
|
+
declare function useEntityRecords(options: UseEntityRecordsOptions): {
|
|
35
75
|
loading: boolean;
|
|
36
76
|
error: string | null;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
77
|
+
queryRecords: (params?: QueryRecordsParams | undefined) => Promise<QueryRecordsResult>;
|
|
78
|
+
getRecord: (recordId: string) => Promise<EntityRecord | null>;
|
|
79
|
+
createRecord: (record: Partial<EntityRecord>) => Promise<EntityRecord | null>;
|
|
80
|
+
updateRecord: (recordId: string, record: Partial<EntityRecord>) => Promise<EntityRecord | null>;
|
|
81
|
+
deleteRecord: (recordId: string) => Promise<boolean>;
|
|
82
|
+
countRecords: (filters?: Record<string, unknown> | undefined) => Promise<number>;
|
|
83
|
+
bulkCreate: (records: Partial<EntityRecord>[]) => Promise<BulkOperationResult>;
|
|
84
|
+
bulkUpdate: (records: Partial<EntityRecord>[]) => Promise<BulkOperationResult>;
|
|
85
|
+
bulkDelete: (recordIds: string[]) => Promise<boolean>;
|
|
44
86
|
};
|
|
45
87
|
|
|
46
|
-
|
|
88
|
+
interface UseAsyncOptions {
|
|
89
|
+
/** Reset error on new request */
|
|
90
|
+
resetErrorOnRequest?: boolean;
|
|
91
|
+
}
|
|
92
|
+
interface UseAsyncReturn<TArgs extends unknown[], TResult> {
|
|
93
|
+
execute: (...args: TArgs) => Promise<TResult>;
|
|
94
|
+
loading: boolean;
|
|
95
|
+
error: string | null;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Generic async operation hook with loading/error states
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```tsx
|
|
102
|
+
* const { execute: fetchUser, loading, error } = useAsync(
|
|
103
|
+
* (userId: string) => getUserApi(userId, options),
|
|
104
|
+
* (data) => data.user,
|
|
105
|
+
* null
|
|
106
|
+
* );
|
|
107
|
+
*
|
|
108
|
+
* const user = await fetchUser("user-123");
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
declare function useAsync<TArgs extends unknown[], TData, TResult>(asyncFn: (...args: TArgs) => Promise<ApiResponse<TData>>, transform: (data: TData) => TResult, defaultValue: TResult, options?: UseAsyncOptions): UseAsyncReturn<TArgs, TResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Simplified async hook for API operations
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```tsx
|
|
117
|
+
* const { execute: getUsers, loading, error } = useApiAsync(
|
|
118
|
+
* () => listUsersApi(optionsRef.current),
|
|
119
|
+
* (data) => data.users,
|
|
120
|
+
* []
|
|
121
|
+
* );
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
declare function useApiAsync<TArgs extends unknown[], TData, TResult>(asyncFn: (...args: TArgs) => Promise<ApiResponse<TData>>, transform: (data: TData) => TResult, defaultValue: TResult): UseAsyncReturn<TArgs, TResult>;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Hook that keeps options in a ref for stable callback access
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```tsx
|
|
131
|
+
* const optionsRef = useOptionsRef({ baseUrl, orgId });
|
|
132
|
+
*
|
|
133
|
+
* const fetchData = useCallback(async () => {
|
|
134
|
+
* // Always accesses latest options without recreating callback
|
|
135
|
+
* await api.fetch(optionsRef.current);
|
|
136
|
+
* }, []); // No dependencies needed
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
declare function useOptionsRef<T>(options: T): react.RefObject<T>;
|
|
140
|
+
|
|
141
|
+
export { type BulkOperationResult, type QueryRecordsParams, type QueryRecordsResult, type UseAsyncOptions, type UseAsyncReturn, type UseEntityDefinitionsOptions, type UseEntityRecordsOptions, useApiAsync, useAsync, useEntityDefinitions, useEntityRecords, useOptionsRef };
|
package/dist/hooks/index.js
CHANGED
|
@@ -2,9 +2,19 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var _chunkGQJJP4YLjs = require('../chunk-GQJJP4YL.js');
|
|
6
|
-
require('../chunk-SXBB42DJ.js');
|
|
7
5
|
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunk5BPHCJ2Gjs = require('../chunk-5BPHCJ2G.js');
|
|
11
|
+
require('../chunk-6SB5QDL5.js');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.useApiAsync = _chunk5BPHCJ2Gjs.useApiAsync; exports.useAsync = _chunk5BPHCJ2Gjs.useAsync; exports.useEntities = _chunk5BPHCJ2Gjs.useEntities; exports.useEntityDefinitions = _chunk5BPHCJ2Gjs.useEntityDefinitions; exports.useEntityRecords = _chunk5BPHCJ2Gjs.useEntityRecords; exports.useOptionsRef = _chunk5BPHCJ2Gjs.useOptionsRef;
|
|
10
20
|
//# sourceMappingURL=index.js.map
|
package/dist/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/eloquent
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/eloquent/eloquent/packages/@elqnt/entity/dist/hooks/index.js"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,iVAAC","file":"/home/runner/work/eloquent/eloquent/packages/@elqnt/entity/dist/hooks/index.js"}
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
useApiAsync,
|
|
5
|
+
useAsync,
|
|
6
|
+
useEntities,
|
|
7
|
+
useEntityDefinitions,
|
|
8
|
+
useEntityRecords,
|
|
9
|
+
useOptionsRef
|
|
10
|
+
} from "../chunk-F7ZN7FHI.mjs";
|
|
11
|
+
import "../chunk-SHMUKUYC.mjs";
|
|
7
12
|
export {
|
|
8
|
-
|
|
13
|
+
useApiAsync,
|
|
14
|
+
useAsync,
|
|
15
|
+
useEntities,
|
|
16
|
+
useEntityDefinitions,
|
|
17
|
+
useEntityRecords,
|
|
18
|
+
useOptionsRef
|
|
9
19
|
};
|
|
10
20
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EntityDefinition, EntityView, EntityRecord, EntityQuery, ListResult } from './models/index.mjs';
|
|
2
|
-
export {
|
|
2
|
+
export { EntityDefinitionResponse, EntityFilterOperatorTS, EntityRecordResponse, Filter, GetEntityRecordResponse, ListEntityDefinitionsResponse, ListEntityRecordsResponse, ResponseMetadata, Sort, ViewColumn, ViewFilter } from './models/index.mjs';
|
|
3
|
+
export { Q as QueryOptions, a as QueryResult, U as UseEntitiesOptions, u as useEntities } from './use-entities-gK_B9I2n.mjs';
|
|
3
4
|
export { bulkCreateEntityRecordsApi, bulkDeleteEntityRecordsApi, bulkUpdateEntityRecordsApi, countEntityRecordsApi, createEntityDefinitionApi, createEntityRecordApi, deleteEntityDefinitionApi, deleteEntityRecordApi, getEntityDefinitionApi, getEntityRecordApi, listEntityDefinitionsApi, queryEntityRecordsApi, updateEntityDefinitionApi, updateEntityRecordApi } from './api/index.mjs';
|
|
4
|
-
|
|
5
|
-
import * as redux from 'redux';
|
|
5
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
6
6
|
import '@elqnt/types';
|
|
7
7
|
import '@elqnt/api-client';
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ interface EntityDefinitionState {
|
|
|
18
18
|
interface EntityDefinitionSelector {
|
|
19
19
|
entityDefinition: EntityDefinitionState;
|
|
20
20
|
}
|
|
21
|
-
declare const entityDefinitionReducer:
|
|
21
|
+
declare const entityDefinitionReducer: _reduxjs_toolkit.Reducer<EntityDefinitionState>;
|
|
22
22
|
|
|
23
23
|
interface EntityRecordState {
|
|
24
24
|
records: {
|
|
@@ -38,7 +38,7 @@ interface EntityRecordState {
|
|
|
38
38
|
interface EntityRecordSelector {
|
|
39
39
|
entityRecord: EntityRecordState;
|
|
40
40
|
}
|
|
41
|
-
declare const entityRecordReducer:
|
|
41
|
+
declare const entityRecordReducer: _reduxjs_toolkit.Reducer<EntityRecordState>;
|
|
42
42
|
|
|
43
43
|
declare const PREDEFINED_COLORS: {
|
|
44
44
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EntityDefinition, EntityView, EntityRecord, EntityQuery, ListResult } from './models/index.js';
|
|
2
|
-
export {
|
|
2
|
+
export { EntityDefinitionResponse, EntityFilterOperatorTS, EntityRecordResponse, Filter, GetEntityRecordResponse, ListEntityDefinitionsResponse, ListEntityRecordsResponse, ResponseMetadata, Sort, ViewColumn, ViewFilter } from './models/index.js';
|
|
3
|
+
export { Q as QueryOptions, a as QueryResult, U as UseEntitiesOptions, u as useEntities } from './use-entities-CC3WhBDv.js';
|
|
3
4
|
export { bulkCreateEntityRecordsApi, bulkDeleteEntityRecordsApi, bulkUpdateEntityRecordsApi, countEntityRecordsApi, createEntityDefinitionApi, createEntityRecordApi, deleteEntityDefinitionApi, deleteEntityRecordApi, getEntityDefinitionApi, getEntityRecordApi, listEntityDefinitionsApi, queryEntityRecordsApi, updateEntityDefinitionApi, updateEntityRecordApi } from './api/index.js';
|
|
4
|
-
|
|
5
|
-
import * as redux from 'redux';
|
|
5
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
6
6
|
import '@elqnt/types';
|
|
7
7
|
import '@elqnt/api-client';
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ interface EntityDefinitionState {
|
|
|
18
18
|
interface EntityDefinitionSelector {
|
|
19
19
|
entityDefinition: EntityDefinitionState;
|
|
20
20
|
}
|
|
21
|
-
declare const entityDefinitionReducer:
|
|
21
|
+
declare const entityDefinitionReducer: _reduxjs_toolkit.Reducer<EntityDefinitionState>;
|
|
22
22
|
|
|
23
23
|
interface EntityRecordState {
|
|
24
24
|
records: {
|
|
@@ -38,7 +38,7 @@ interface EntityRecordState {
|
|
|
38
38
|
interface EntityRecordSelector {
|
|
39
39
|
entityRecord: EntityRecordState;
|
|
40
40
|
}
|
|
41
|
-
declare const entityRecordReducer:
|
|
41
|
+
declare const entityRecordReducer: _reduxjs_toolkit.Reducer<EntityRecordState>;
|
|
42
42
|
|
|
43
43
|
declare const PREDEFINED_COLORS: {
|
|
44
44
|
value: string;
|