@elqnt/admin 2.0.5 → 2.1.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 +47 -192
- package/dist/admin-Dlsd5IZ0.d.cts +767 -0
- package/dist/admin-Dlsd5IZ0.d.ts +767 -0
- package/dist/api/index.cjs +213 -27
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +121 -3
- package/dist/api/index.d.ts +121 -3
- package/dist/api/index.js +192 -27
- package/dist/api/index.js.map +1 -1
- package/dist/hooks/index.cjs +765 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +119 -0
- package/dist/hooks/index.d.ts +119 -0
- package/dist/hooks/index.js +735 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.cjs +695 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +532 -27
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +491 -0
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +1095 -29
- package/dist/models/index.d.ts +1095 -29
- package/dist/models/index.js +341 -0
- package/dist/models/index.js.map +1 -1
- package/package.json +9 -3
package/dist/api/index.d.cts
CHANGED
|
@@ -1,12 +1,130 @@
|
|
|
1
1
|
import { CompleteOnboardingResponse, CreateAgentResponse, CreateCheckoutResponse, CreateKnowledgeResponse, CreateOrgResponse, PaymentSessionResponse, PortalSessionResponse, PlansResponse, CreditsResponse, OnboardingResponse, SubscriptionResponse, ProvisionAgentsResponse, ProvisionEntitiesResponse, ProvisionWorkflowsResponse, SendInvitesResponse } from '../models/index.cjs';
|
|
2
|
-
export {
|
|
2
|
+
export { CreditBalance, OrganizationBilling, Plan, UsageSummary } from '../models/index.cjs';
|
|
3
3
|
export { clearGatewayTokenCache } from '@elqnt/api-client/browser';
|
|
4
4
|
import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
|
|
5
5
|
import { ResponseMetadata } from '@elqnt/types';
|
|
6
|
-
|
|
6
|
+
import { ab as Org, ah as OrgResponse, ad as OrgInfoResponse, X as ListOrgsResponse, bj as User, bm as UserResponse, bo as UserSettingsResponse, Y as ListUsersResponse, bn as UserSettings, Z as NotificationPreferences, G as InviteResponse, V as ListInvitesResponse, F as InviteInput, R as InvitesResult } from '../admin-Dlsd5IZ0.cjs';
|
|
7
|
+
export { I as Invite, $ as OnboardingState } from '../admin-Dlsd5IZ0.cjs';
|
|
7
8
|
import { OrgSettings, OrgSettingsResponse } from '@elqnt/agents/models';
|
|
8
9
|
export { OrgSettings, OrgSettingsResponse } from '@elqnt/agents/models';
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Organizations Admin API
|
|
13
|
+
*
|
|
14
|
+
* Browser-side API client for organization management.
|
|
15
|
+
* Uses @elqnt/api-client for HTTP requests with automatic token management.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* List all organizations (admin scope required)
|
|
20
|
+
*/
|
|
21
|
+
declare function listOrgsApi(options: ApiClientOptions): Promise<ApiResponse<ListOrgsResponse>>;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new organization
|
|
24
|
+
*/
|
|
25
|
+
declare function createOrgApi(org: Partial<Org>, options: ApiClientOptions): Promise<ApiResponse<OrgResponse>>;
|
|
26
|
+
/**
|
|
27
|
+
* Get an organization by ID
|
|
28
|
+
*/
|
|
29
|
+
declare function getOrgApi(orgId: string, options: ApiClientOptions): Promise<ApiResponse<OrgResponse>>;
|
|
30
|
+
/**
|
|
31
|
+
* Update an organization
|
|
32
|
+
*/
|
|
33
|
+
declare function updateOrgApi(orgId: string, updates: Partial<Org>, options: ApiClientOptions): Promise<ApiResponse<OrgResponse>>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete an organization
|
|
36
|
+
*/
|
|
37
|
+
declare function deleteOrgApi(orgId: string, options: ApiClientOptions): Promise<ApiResponse<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
}>>;
|
|
40
|
+
/**
|
|
41
|
+
* Get organization info (lightweight response)
|
|
42
|
+
*/
|
|
43
|
+
declare function getOrgInfoApi(orgId: string, options: ApiClientOptions): Promise<ApiResponse<OrgInfoResponse>>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Users Admin API
|
|
47
|
+
*
|
|
48
|
+
* Browser-side API client for user management.
|
|
49
|
+
* Uses @elqnt/api-client for HTTP requests with automatic token management.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* List all users in the organization
|
|
54
|
+
*/
|
|
55
|
+
declare function listUsersApi(options: ApiClientOptions): Promise<ApiResponse<ListUsersResponse>>;
|
|
56
|
+
/**
|
|
57
|
+
* Create a new user
|
|
58
|
+
*/
|
|
59
|
+
declare function createUserApi(user: Partial<User>, options: ApiClientOptions): Promise<ApiResponse<UserResponse>>;
|
|
60
|
+
/**
|
|
61
|
+
* Get a user by ID
|
|
62
|
+
*/
|
|
63
|
+
declare function getUserApi(userId: string, options: ApiClientOptions): Promise<ApiResponse<UserResponse>>;
|
|
64
|
+
/**
|
|
65
|
+
* Get a user by email
|
|
66
|
+
*/
|
|
67
|
+
declare function getUserByEmailApi(email: string, options: ApiClientOptions): Promise<ApiResponse<UserResponse>>;
|
|
68
|
+
/**
|
|
69
|
+
* Update a user
|
|
70
|
+
*/
|
|
71
|
+
declare function updateUserApi(userId: string, updates: Partial<User>, options: ApiClientOptions): Promise<ApiResponse<UserResponse>>;
|
|
72
|
+
/**
|
|
73
|
+
* Delete a user
|
|
74
|
+
*/
|
|
75
|
+
declare function deleteUserApi(userId: string, options: ApiClientOptions): Promise<ApiResponse<{
|
|
76
|
+
success: boolean;
|
|
77
|
+
}>>;
|
|
78
|
+
/**
|
|
79
|
+
* Get user settings
|
|
80
|
+
*/
|
|
81
|
+
declare function getUserSettingsApi(userId: string, options: ApiClientOptions): Promise<ApiResponse<UserSettingsResponse>>;
|
|
82
|
+
/**
|
|
83
|
+
* Update user settings
|
|
84
|
+
*/
|
|
85
|
+
declare function updateUserSettingsApi(userId: string, settings: {
|
|
86
|
+
settings?: UserSettings;
|
|
87
|
+
notificationPreferences?: NotificationPreferences;
|
|
88
|
+
}, options: ApiClientOptions): Promise<ApiResponse<UserSettingsResponse>>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Invites Admin API
|
|
92
|
+
*
|
|
93
|
+
* Browser-side API client for invitation management.
|
|
94
|
+
* Uses @elqnt/api-client for HTTP requests with automatic token management.
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* List all invites in the organization
|
|
99
|
+
*/
|
|
100
|
+
declare function listInvitesApi(options: ApiClientOptions): Promise<ApiResponse<ListInvitesResponse>>;
|
|
101
|
+
/**
|
|
102
|
+
* Send invites to multiple users
|
|
103
|
+
*/
|
|
104
|
+
declare function sendInvitesApi(invites: InviteInput[], options: ApiClientOptions): Promise<ApiResponse<InvitesResult>>;
|
|
105
|
+
/**
|
|
106
|
+
* Send a single invite
|
|
107
|
+
*/
|
|
108
|
+
declare function sendInviteApi(invite: InviteInput, options: ApiClientOptions): Promise<ApiResponse<InviteResponse>>;
|
|
109
|
+
/**
|
|
110
|
+
* Get an invite by ID
|
|
111
|
+
*/
|
|
112
|
+
declare function getInviteApi(inviteId: string, options: ApiClientOptions): Promise<ApiResponse<InviteResponse>>;
|
|
113
|
+
/**
|
|
114
|
+
* Resend an invite
|
|
115
|
+
*/
|
|
116
|
+
declare function resendInviteApi(inviteId: string, options: ApiClientOptions): Promise<ApiResponse<InviteResponse>>;
|
|
117
|
+
/**
|
|
118
|
+
* Revoke an invite
|
|
119
|
+
*/
|
|
120
|
+
declare function revokeInviteApi(inviteId: string, options: ApiClientOptions): Promise<ApiResponse<{
|
|
121
|
+
success: boolean;
|
|
122
|
+
}>>;
|
|
123
|
+
/**
|
|
124
|
+
* Accept an invite (used by invited users)
|
|
125
|
+
*/
|
|
126
|
+
declare function acceptInviteApi(inviteId: string, options: ApiClientOptions): Promise<ApiResponse<InviteResponse>>;
|
|
127
|
+
|
|
10
128
|
/**
|
|
11
129
|
* Admin API functions
|
|
12
130
|
*
|
|
@@ -105,4 +223,4 @@ declare function provisionEntitiesApi(definitions: unknown[], options: ApiClient
|
|
|
105
223
|
*/
|
|
106
224
|
declare function provisionWorkflowsApi(definitions: unknown[], options: ApiClientOptions): Promise<ApiResponse<ProvisionWorkflowsResponse>>;
|
|
107
225
|
|
|
108
|
-
export { CreditsResponse, type OnboardingApiOptions, OnboardingResponse, PlansResponse, ProvisionAgentsResponse, ProvisionEntitiesResponse, ProvisionWorkflowsResponse, SubscriptionResponse, cancelSubscriptionApi, completeOnboardingApi, createAgentWithSkillsApi, createCheckoutSessionApi, createOnboardingAgentApi, createOnboardingKnowledgeApi, createOrgSettingsApi, createOrganizationApi, createPaymentSessionApi, createPortalSessionApi, getBillingPlansApi, getCreditsApi, getOnboardingStatusApi, getOrgSettingsApi, getSubscriptionApi, provisionDefaultAgentsApi, provisionEntitiesApi, provisionWorkflowsApi, purchaseCreditsApi, sendOnboardingInvitesApi, skipOnboardingStepApi, startOnboardingApi, updateEntityDefinitionsApi, updateOrgAgentsApi, updateOrgSettingsApi, updateWorkflowDefinitionsApi };
|
|
226
|
+
export { CreditsResponse, InviteInput, InviteResponse, InvitesResult, ListInvitesResponse, ListOrgsResponse, ListUsersResponse, NotificationPreferences, type OnboardingApiOptions, OnboardingResponse, Org, OrgInfoResponse, OrgResponse, PlansResponse, ProvisionAgentsResponse, ProvisionEntitiesResponse, ProvisionWorkflowsResponse, SubscriptionResponse, User, UserResponse, UserSettings, UserSettingsResponse, acceptInviteApi, cancelSubscriptionApi, completeOnboardingApi, createAgentWithSkillsApi, createCheckoutSessionApi, createOnboardingAgentApi, createOnboardingKnowledgeApi, createOrgApi, createOrgSettingsApi, createOrganizationApi, createPaymentSessionApi, createPortalSessionApi, createUserApi, deleteOrgApi, deleteUserApi, getBillingPlansApi, getCreditsApi, getInviteApi, getOnboardingStatusApi, getOrgApi, getOrgInfoApi, getOrgSettingsApi, getSubscriptionApi, getUserApi, getUserByEmailApi, getUserSettingsApi, listInvitesApi, listOrgsApi, listUsersApi, provisionDefaultAgentsApi, provisionEntitiesApi, provisionWorkflowsApi, purchaseCreditsApi, resendInviteApi, revokeInviteApi, sendInviteApi, sendInvitesApi, sendOnboardingInvitesApi, skipOnboardingStepApi, startOnboardingApi, updateEntityDefinitionsApi, updateOrgAgentsApi, updateOrgApi, updateOrgSettingsApi, updateUserApi, updateUserSettingsApi, updateWorkflowDefinitionsApi };
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,12 +1,130 @@
|
|
|
1
1
|
import { CompleteOnboardingResponse, CreateAgentResponse, CreateCheckoutResponse, CreateKnowledgeResponse, CreateOrgResponse, PaymentSessionResponse, PortalSessionResponse, PlansResponse, CreditsResponse, OnboardingResponse, SubscriptionResponse, ProvisionAgentsResponse, ProvisionEntitiesResponse, ProvisionWorkflowsResponse, SendInvitesResponse } from '../models/index.js';
|
|
2
|
-
export {
|
|
2
|
+
export { CreditBalance, OrganizationBilling, Plan, UsageSummary } from '../models/index.js';
|
|
3
3
|
export { clearGatewayTokenCache } from '@elqnt/api-client/browser';
|
|
4
4
|
import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
|
|
5
5
|
import { ResponseMetadata } from '@elqnt/types';
|
|
6
|
-
|
|
6
|
+
import { ab as Org, ah as OrgResponse, ad as OrgInfoResponse, X as ListOrgsResponse, bj as User, bm as UserResponse, bo as UserSettingsResponse, Y as ListUsersResponse, bn as UserSettings, Z as NotificationPreferences, G as InviteResponse, V as ListInvitesResponse, F as InviteInput, R as InvitesResult } from '../admin-Dlsd5IZ0.js';
|
|
7
|
+
export { I as Invite, $ as OnboardingState } from '../admin-Dlsd5IZ0.js';
|
|
7
8
|
import { OrgSettings, OrgSettingsResponse } from '@elqnt/agents/models';
|
|
8
9
|
export { OrgSettings, OrgSettingsResponse } from '@elqnt/agents/models';
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Organizations Admin API
|
|
13
|
+
*
|
|
14
|
+
* Browser-side API client for organization management.
|
|
15
|
+
* Uses @elqnt/api-client for HTTP requests with automatic token management.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* List all organizations (admin scope required)
|
|
20
|
+
*/
|
|
21
|
+
declare function listOrgsApi(options: ApiClientOptions): Promise<ApiResponse<ListOrgsResponse>>;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new organization
|
|
24
|
+
*/
|
|
25
|
+
declare function createOrgApi(org: Partial<Org>, options: ApiClientOptions): Promise<ApiResponse<OrgResponse>>;
|
|
26
|
+
/**
|
|
27
|
+
* Get an organization by ID
|
|
28
|
+
*/
|
|
29
|
+
declare function getOrgApi(orgId: string, options: ApiClientOptions): Promise<ApiResponse<OrgResponse>>;
|
|
30
|
+
/**
|
|
31
|
+
* Update an organization
|
|
32
|
+
*/
|
|
33
|
+
declare function updateOrgApi(orgId: string, updates: Partial<Org>, options: ApiClientOptions): Promise<ApiResponse<OrgResponse>>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete an organization
|
|
36
|
+
*/
|
|
37
|
+
declare function deleteOrgApi(orgId: string, options: ApiClientOptions): Promise<ApiResponse<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
}>>;
|
|
40
|
+
/**
|
|
41
|
+
* Get organization info (lightweight response)
|
|
42
|
+
*/
|
|
43
|
+
declare function getOrgInfoApi(orgId: string, options: ApiClientOptions): Promise<ApiResponse<OrgInfoResponse>>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Users Admin API
|
|
47
|
+
*
|
|
48
|
+
* Browser-side API client for user management.
|
|
49
|
+
* Uses @elqnt/api-client for HTTP requests with automatic token management.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* List all users in the organization
|
|
54
|
+
*/
|
|
55
|
+
declare function listUsersApi(options: ApiClientOptions): Promise<ApiResponse<ListUsersResponse>>;
|
|
56
|
+
/**
|
|
57
|
+
* Create a new user
|
|
58
|
+
*/
|
|
59
|
+
declare function createUserApi(user: Partial<User>, options: ApiClientOptions): Promise<ApiResponse<UserResponse>>;
|
|
60
|
+
/**
|
|
61
|
+
* Get a user by ID
|
|
62
|
+
*/
|
|
63
|
+
declare function getUserApi(userId: string, options: ApiClientOptions): Promise<ApiResponse<UserResponse>>;
|
|
64
|
+
/**
|
|
65
|
+
* Get a user by email
|
|
66
|
+
*/
|
|
67
|
+
declare function getUserByEmailApi(email: string, options: ApiClientOptions): Promise<ApiResponse<UserResponse>>;
|
|
68
|
+
/**
|
|
69
|
+
* Update a user
|
|
70
|
+
*/
|
|
71
|
+
declare function updateUserApi(userId: string, updates: Partial<User>, options: ApiClientOptions): Promise<ApiResponse<UserResponse>>;
|
|
72
|
+
/**
|
|
73
|
+
* Delete a user
|
|
74
|
+
*/
|
|
75
|
+
declare function deleteUserApi(userId: string, options: ApiClientOptions): Promise<ApiResponse<{
|
|
76
|
+
success: boolean;
|
|
77
|
+
}>>;
|
|
78
|
+
/**
|
|
79
|
+
* Get user settings
|
|
80
|
+
*/
|
|
81
|
+
declare function getUserSettingsApi(userId: string, options: ApiClientOptions): Promise<ApiResponse<UserSettingsResponse>>;
|
|
82
|
+
/**
|
|
83
|
+
* Update user settings
|
|
84
|
+
*/
|
|
85
|
+
declare function updateUserSettingsApi(userId: string, settings: {
|
|
86
|
+
settings?: UserSettings;
|
|
87
|
+
notificationPreferences?: NotificationPreferences;
|
|
88
|
+
}, options: ApiClientOptions): Promise<ApiResponse<UserSettingsResponse>>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Invites Admin API
|
|
92
|
+
*
|
|
93
|
+
* Browser-side API client for invitation management.
|
|
94
|
+
* Uses @elqnt/api-client for HTTP requests with automatic token management.
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* List all invites in the organization
|
|
99
|
+
*/
|
|
100
|
+
declare function listInvitesApi(options: ApiClientOptions): Promise<ApiResponse<ListInvitesResponse>>;
|
|
101
|
+
/**
|
|
102
|
+
* Send invites to multiple users
|
|
103
|
+
*/
|
|
104
|
+
declare function sendInvitesApi(invites: InviteInput[], options: ApiClientOptions): Promise<ApiResponse<InvitesResult>>;
|
|
105
|
+
/**
|
|
106
|
+
* Send a single invite
|
|
107
|
+
*/
|
|
108
|
+
declare function sendInviteApi(invite: InviteInput, options: ApiClientOptions): Promise<ApiResponse<InviteResponse>>;
|
|
109
|
+
/**
|
|
110
|
+
* Get an invite by ID
|
|
111
|
+
*/
|
|
112
|
+
declare function getInviteApi(inviteId: string, options: ApiClientOptions): Promise<ApiResponse<InviteResponse>>;
|
|
113
|
+
/**
|
|
114
|
+
* Resend an invite
|
|
115
|
+
*/
|
|
116
|
+
declare function resendInviteApi(inviteId: string, options: ApiClientOptions): Promise<ApiResponse<InviteResponse>>;
|
|
117
|
+
/**
|
|
118
|
+
* Revoke an invite
|
|
119
|
+
*/
|
|
120
|
+
declare function revokeInviteApi(inviteId: string, options: ApiClientOptions): Promise<ApiResponse<{
|
|
121
|
+
success: boolean;
|
|
122
|
+
}>>;
|
|
123
|
+
/**
|
|
124
|
+
* Accept an invite (used by invited users)
|
|
125
|
+
*/
|
|
126
|
+
declare function acceptInviteApi(inviteId: string, options: ApiClientOptions): Promise<ApiResponse<InviteResponse>>;
|
|
127
|
+
|
|
10
128
|
/**
|
|
11
129
|
* Admin API functions
|
|
12
130
|
*
|
|
@@ -105,4 +223,4 @@ declare function provisionEntitiesApi(definitions: unknown[], options: ApiClient
|
|
|
105
223
|
*/
|
|
106
224
|
declare function provisionWorkflowsApi(definitions: unknown[], options: ApiClientOptions): Promise<ApiResponse<ProvisionWorkflowsResponse>>;
|
|
107
225
|
|
|
108
|
-
export { CreditsResponse, type OnboardingApiOptions, OnboardingResponse, PlansResponse, ProvisionAgentsResponse, ProvisionEntitiesResponse, ProvisionWorkflowsResponse, SubscriptionResponse, cancelSubscriptionApi, completeOnboardingApi, createAgentWithSkillsApi, createCheckoutSessionApi, createOnboardingAgentApi, createOnboardingKnowledgeApi, createOrgSettingsApi, createOrganizationApi, createPaymentSessionApi, createPortalSessionApi, getBillingPlansApi, getCreditsApi, getOnboardingStatusApi, getOrgSettingsApi, getSubscriptionApi, provisionDefaultAgentsApi, provisionEntitiesApi, provisionWorkflowsApi, purchaseCreditsApi, sendOnboardingInvitesApi, skipOnboardingStepApi, startOnboardingApi, updateEntityDefinitionsApi, updateOrgAgentsApi, updateOrgSettingsApi, updateWorkflowDefinitionsApi };
|
|
226
|
+
export { CreditsResponse, InviteInput, InviteResponse, InvitesResult, ListInvitesResponse, ListOrgsResponse, ListUsersResponse, NotificationPreferences, type OnboardingApiOptions, OnboardingResponse, Org, OrgInfoResponse, OrgResponse, PlansResponse, ProvisionAgentsResponse, ProvisionEntitiesResponse, ProvisionWorkflowsResponse, SubscriptionResponse, User, UserResponse, UserSettings, UserSettingsResponse, acceptInviteApi, cancelSubscriptionApi, completeOnboardingApi, createAgentWithSkillsApi, createCheckoutSessionApi, createOnboardingAgentApi, createOnboardingKnowledgeApi, createOrgApi, createOrgSettingsApi, createOrganizationApi, createPaymentSessionApi, createPortalSessionApi, createUserApi, deleteOrgApi, deleteUserApi, getBillingPlansApi, getCreditsApi, getInviteApi, getOnboardingStatusApi, getOrgApi, getOrgInfoApi, getOrgSettingsApi, getSubscriptionApi, getUserApi, getUserByEmailApi, getUserSettingsApi, listInvitesApi, listOrgsApi, listUsersApi, provisionDefaultAgentsApi, provisionEntitiesApi, provisionWorkflowsApi, purchaseCreditsApi, resendInviteApi, revokeInviteApi, sendInviteApi, sendInvitesApi, sendOnboardingInvitesApi, skipOnboardingStepApi, startOnboardingApi, updateEntityDefinitionsApi, updateOrgAgentsApi, updateOrgApi, updateOrgSettingsApi, updateUserApi, updateUserSettingsApi, updateWorkflowDefinitionsApi };
|
package/dist/api/index.js
CHANGED
|
@@ -1,14 +1,158 @@
|
|
|
1
1
|
// api/index.ts
|
|
2
|
-
import { browserApiRequest, clearGatewayTokenCache } from "@elqnt/api-client/browser";
|
|
2
|
+
import { browserApiRequest as browserApiRequest4, clearGatewayTokenCache } from "@elqnt/api-client/browser";
|
|
3
|
+
|
|
4
|
+
// api/orgs.ts
|
|
5
|
+
import { browserApiRequest } from "@elqnt/api-client/browser";
|
|
6
|
+
async function listOrgsApi(options) {
|
|
7
|
+
return browserApiRequest("/api/v1/admin/orgs", {
|
|
8
|
+
method: "GET",
|
|
9
|
+
...options
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
async function createOrgApi(org, options) {
|
|
13
|
+
return browserApiRequest("/api/v1/admin/orgs", {
|
|
14
|
+
method: "POST",
|
|
15
|
+
body: org,
|
|
16
|
+
...options
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async function getOrgApi(orgId, options) {
|
|
20
|
+
return browserApiRequest(`/api/v1/admin/orgs/${orgId}`, {
|
|
21
|
+
method: "GET",
|
|
22
|
+
...options
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async function updateOrgApi(orgId, updates, options) {
|
|
26
|
+
return browserApiRequest(`/api/v1/admin/orgs/${orgId}`, {
|
|
27
|
+
method: "PUT",
|
|
28
|
+
body: updates,
|
|
29
|
+
...options
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
async function deleteOrgApi(orgId, options) {
|
|
33
|
+
return browserApiRequest(`/api/v1/admin/orgs/${orgId}`, {
|
|
34
|
+
method: "DELETE",
|
|
35
|
+
...options
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async function getOrgInfoApi(orgId, options) {
|
|
39
|
+
return browserApiRequest(`/api/v1/admin/orgs/${orgId}/info`, {
|
|
40
|
+
method: "GET",
|
|
41
|
+
...options
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// api/users.ts
|
|
46
|
+
import { browserApiRequest as browserApiRequest2 } from "@elqnt/api-client/browser";
|
|
47
|
+
async function listUsersApi(options) {
|
|
48
|
+
return browserApiRequest2("/api/v1/admin/users", {
|
|
49
|
+
method: "GET",
|
|
50
|
+
...options
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async function createUserApi(user, options) {
|
|
54
|
+
return browserApiRequest2("/api/v1/admin/users", {
|
|
55
|
+
method: "POST",
|
|
56
|
+
body: user,
|
|
57
|
+
...options
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
async function getUserApi(userId, options) {
|
|
61
|
+
return browserApiRequest2(`/api/v1/admin/users/${userId}`, {
|
|
62
|
+
method: "GET",
|
|
63
|
+
...options
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async function getUserByEmailApi(email, options) {
|
|
67
|
+
return browserApiRequest2(`/api/v1/admin/users/by-email?email=${encodeURIComponent(email)}`, {
|
|
68
|
+
method: "GET",
|
|
69
|
+
...options
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
async function updateUserApi(userId, updates, options) {
|
|
73
|
+
return browserApiRequest2(`/api/v1/admin/users/${userId}`, {
|
|
74
|
+
method: "PUT",
|
|
75
|
+
body: updates,
|
|
76
|
+
...options
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async function deleteUserApi(userId, options) {
|
|
80
|
+
return browserApiRequest2(`/api/v1/admin/users/${userId}`, {
|
|
81
|
+
method: "DELETE",
|
|
82
|
+
...options
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async function getUserSettingsApi(userId, options) {
|
|
86
|
+
return browserApiRequest2(`/api/v1/admin/users/${userId}/settings`, {
|
|
87
|
+
method: "GET",
|
|
88
|
+
...options
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
async function updateUserSettingsApi(userId, settings, options) {
|
|
92
|
+
return browserApiRequest2(`/api/v1/admin/users/${userId}/settings`, {
|
|
93
|
+
method: "PUT",
|
|
94
|
+
body: settings,
|
|
95
|
+
...options
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// api/invites.ts
|
|
100
|
+
import { browserApiRequest as browserApiRequest3 } from "@elqnt/api-client/browser";
|
|
101
|
+
async function listInvitesApi(options) {
|
|
102
|
+
return browserApiRequest3("/api/v1/admin/invites", {
|
|
103
|
+
method: "GET",
|
|
104
|
+
...options
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
async function sendInvitesApi(invites, options) {
|
|
108
|
+
return browserApiRequest3("/api/v1/admin/invites", {
|
|
109
|
+
method: "POST",
|
|
110
|
+
body: { invites },
|
|
111
|
+
...options
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
async function sendInviteApi(invite, options) {
|
|
115
|
+
return browserApiRequest3("/api/v1/admin/invites/single", {
|
|
116
|
+
method: "POST",
|
|
117
|
+
body: invite,
|
|
118
|
+
...options
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
async function getInviteApi(inviteId, options) {
|
|
122
|
+
return browserApiRequest3(`/api/v1/admin/invites/${inviteId}`, {
|
|
123
|
+
method: "GET",
|
|
124
|
+
...options
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
async function resendInviteApi(inviteId, options) {
|
|
128
|
+
return browserApiRequest3(`/api/v1/admin/invites/${inviteId}/resend`, {
|
|
129
|
+
method: "POST",
|
|
130
|
+
...options
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
async function revokeInviteApi(inviteId, options) {
|
|
134
|
+
return browserApiRequest3(`/api/v1/admin/invites/${inviteId}`, {
|
|
135
|
+
method: "DELETE",
|
|
136
|
+
...options
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
async function acceptInviteApi(inviteId, options) {
|
|
140
|
+
return browserApiRequest3(`/api/v1/admin/invites/${inviteId}/accept`, {
|
|
141
|
+
method: "POST",
|
|
142
|
+
...options
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// api/index.ts
|
|
3
147
|
async function getOnboardingStatusApi(options) {
|
|
4
|
-
return
|
|
148
|
+
return browserApiRequest4("/api/v1/onboarding/status", {
|
|
5
149
|
method: "GET",
|
|
6
150
|
...options,
|
|
7
151
|
orgId: options.orgId || ""
|
|
8
152
|
});
|
|
9
153
|
}
|
|
10
154
|
async function startOnboardingApi(options) {
|
|
11
|
-
return
|
|
155
|
+
return browserApiRequest4("/api/v1/onboarding/start", {
|
|
12
156
|
method: "POST",
|
|
13
157
|
body: {},
|
|
14
158
|
...options,
|
|
@@ -16,7 +160,7 @@ async function startOnboardingApi(options) {
|
|
|
16
160
|
});
|
|
17
161
|
}
|
|
18
162
|
async function createPaymentSessionApi(params, options) {
|
|
19
|
-
return
|
|
163
|
+
return browserApiRequest4("/api/v1/onboarding/step/payment", {
|
|
20
164
|
method: "POST",
|
|
21
165
|
body: params,
|
|
22
166
|
...options,
|
|
@@ -24,7 +168,7 @@ async function createPaymentSessionApi(params, options) {
|
|
|
24
168
|
});
|
|
25
169
|
}
|
|
26
170
|
async function createOrganizationApi(org, options) {
|
|
27
|
-
return
|
|
171
|
+
return browserApiRequest4("/api/v1/onboarding/step/organization", {
|
|
28
172
|
method: "POST",
|
|
29
173
|
body: org,
|
|
30
174
|
...options,
|
|
@@ -32,7 +176,7 @@ async function createOrganizationApi(org, options) {
|
|
|
32
176
|
});
|
|
33
177
|
}
|
|
34
178
|
async function sendOnboardingInvitesApi(invites, options) {
|
|
35
|
-
return
|
|
179
|
+
return browserApiRequest4("/api/v1/onboarding/step/invites", {
|
|
36
180
|
method: "POST",
|
|
37
181
|
body: { invites },
|
|
38
182
|
...options,
|
|
@@ -40,7 +184,7 @@ async function sendOnboardingInvitesApi(invites, options) {
|
|
|
40
184
|
});
|
|
41
185
|
}
|
|
42
186
|
async function createOnboardingKnowledgeApi(knowledge, options) {
|
|
43
|
-
return
|
|
187
|
+
return browserApiRequest4("/api/v1/onboarding/step/knowledge", {
|
|
44
188
|
method: "POST",
|
|
45
189
|
body: knowledge,
|
|
46
190
|
...options,
|
|
@@ -48,7 +192,7 @@ async function createOnboardingKnowledgeApi(knowledge, options) {
|
|
|
48
192
|
});
|
|
49
193
|
}
|
|
50
194
|
async function createOnboardingAgentApi(agent, options) {
|
|
51
|
-
return
|
|
195
|
+
return browserApiRequest4("/api/v1/onboarding/step/agent", {
|
|
52
196
|
method: "POST",
|
|
53
197
|
body: agent,
|
|
54
198
|
...options,
|
|
@@ -56,7 +200,7 @@ async function createOnboardingAgentApi(agent, options) {
|
|
|
56
200
|
});
|
|
57
201
|
}
|
|
58
202
|
async function createAgentWithSkillsApi(payload, options) {
|
|
59
|
-
return
|
|
203
|
+
return browserApiRequest4("/api/v1/onboarding/agent-with-skills", {
|
|
60
204
|
method: "POST",
|
|
61
205
|
body: payload,
|
|
62
206
|
...options,
|
|
@@ -64,7 +208,7 @@ async function createAgentWithSkillsApi(payload, options) {
|
|
|
64
208
|
});
|
|
65
209
|
}
|
|
66
210
|
async function completeOnboardingApi(options) {
|
|
67
|
-
return
|
|
211
|
+
return browserApiRequest4("/api/v1/onboarding/complete", {
|
|
68
212
|
method: "POST",
|
|
69
213
|
body: {},
|
|
70
214
|
...options,
|
|
@@ -72,7 +216,7 @@ async function completeOnboardingApi(options) {
|
|
|
72
216
|
});
|
|
73
217
|
}
|
|
74
218
|
async function skipOnboardingStepApi(step, options) {
|
|
75
|
-
return
|
|
219
|
+
return browserApiRequest4("/api/v1/onboarding/skip-step", {
|
|
76
220
|
method: "POST",
|
|
77
221
|
body: { step },
|
|
78
222
|
...options,
|
|
@@ -80,114 +224,115 @@ async function skipOnboardingStepApi(step, options) {
|
|
|
80
224
|
});
|
|
81
225
|
}
|
|
82
226
|
async function getOrgSettingsApi(options) {
|
|
83
|
-
return
|
|
227
|
+
return browserApiRequest4("/api/v1/org/settings", {
|
|
84
228
|
method: "GET",
|
|
85
229
|
...options
|
|
86
230
|
});
|
|
87
231
|
}
|
|
88
232
|
async function createOrgSettingsApi(settings, options) {
|
|
89
|
-
return
|
|
233
|
+
return browserApiRequest4("/api/v1/org/settings", {
|
|
90
234
|
method: "POST",
|
|
91
235
|
body: settings,
|
|
92
236
|
...options
|
|
93
237
|
});
|
|
94
238
|
}
|
|
95
239
|
async function updateOrgSettingsApi(settings, options) {
|
|
96
|
-
return
|
|
240
|
+
return browserApiRequest4("/api/v1/org/settings", {
|
|
97
241
|
method: "PUT",
|
|
98
242
|
body: settings,
|
|
99
243
|
...options
|
|
100
244
|
});
|
|
101
245
|
}
|
|
102
246
|
async function updateOrgAgentsApi(agentIds, options) {
|
|
103
|
-
return
|
|
247
|
+
return browserApiRequest4("/api/v1/org/agents", {
|
|
104
248
|
method: "PUT",
|
|
105
249
|
body: { agentIds },
|
|
106
250
|
...options
|
|
107
251
|
});
|
|
108
252
|
}
|
|
109
253
|
async function updateEntityDefinitionsApi(entityNames, options) {
|
|
110
|
-
return
|
|
254
|
+
return browserApiRequest4("/api/v1/org/entities", {
|
|
111
255
|
method: "PUT",
|
|
112
256
|
body: { entityNames },
|
|
113
257
|
...options
|
|
114
258
|
});
|
|
115
259
|
}
|
|
116
260
|
async function updateWorkflowDefinitionsApi(workflowIds, options) {
|
|
117
|
-
return
|
|
261
|
+
return browserApiRequest4("/api/v1/org/workflows", {
|
|
118
262
|
method: "PUT",
|
|
119
263
|
body: { workflowIds },
|
|
120
264
|
...options
|
|
121
265
|
});
|
|
122
266
|
}
|
|
123
267
|
async function getBillingPlansApi(options) {
|
|
124
|
-
return
|
|
268
|
+
return browserApiRequest4("/api/v1/billing/plans", {
|
|
125
269
|
method: "GET",
|
|
126
270
|
...options
|
|
127
271
|
});
|
|
128
272
|
}
|
|
129
273
|
async function getSubscriptionApi(options) {
|
|
130
|
-
return
|
|
274
|
+
return browserApiRequest4("/api/v1/billing/subscription", {
|
|
131
275
|
method: "GET",
|
|
132
276
|
...options
|
|
133
277
|
});
|
|
134
278
|
}
|
|
135
279
|
async function getCreditsApi(options) {
|
|
136
|
-
return
|
|
280
|
+
return browserApiRequest4("/api/v1/billing/credits", {
|
|
137
281
|
method: "GET",
|
|
138
282
|
...options
|
|
139
283
|
});
|
|
140
284
|
}
|
|
141
285
|
async function createCheckoutSessionApi(params, options) {
|
|
142
|
-
return
|
|
286
|
+
return browserApiRequest4("/api/v1/billing/checkout", {
|
|
143
287
|
method: "POST",
|
|
144
288
|
body: params,
|
|
145
289
|
...options
|
|
146
290
|
});
|
|
147
291
|
}
|
|
148
292
|
async function createPortalSessionApi(params, options) {
|
|
149
|
-
return
|
|
293
|
+
return browserApiRequest4("/api/v1/billing/portal", {
|
|
150
294
|
method: "POST",
|
|
151
295
|
body: params,
|
|
152
296
|
...options
|
|
153
297
|
});
|
|
154
298
|
}
|
|
155
299
|
async function cancelSubscriptionApi(options) {
|
|
156
|
-
return
|
|
300
|
+
return browserApiRequest4("/api/v1/billing/subscription/cancel", {
|
|
157
301
|
method: "POST",
|
|
158
302
|
body: {},
|
|
159
303
|
...options
|
|
160
304
|
});
|
|
161
305
|
}
|
|
162
306
|
async function purchaseCreditsApi(params, options) {
|
|
163
|
-
return
|
|
307
|
+
return browserApiRequest4("/api/v1/billing/credits/purchase", {
|
|
164
308
|
method: "POST",
|
|
165
309
|
body: params,
|
|
166
310
|
...options
|
|
167
311
|
});
|
|
168
312
|
}
|
|
169
313
|
async function provisionDefaultAgentsApi(definitions, options) {
|
|
170
|
-
return
|
|
314
|
+
return browserApiRequest4("/api/v1/admin/provision/agents", {
|
|
171
315
|
method: "POST",
|
|
172
316
|
body: { definitions },
|
|
173
317
|
...options
|
|
174
318
|
});
|
|
175
319
|
}
|
|
176
320
|
async function provisionEntitiesApi(definitions, options) {
|
|
177
|
-
return
|
|
321
|
+
return browserApiRequest4("/api/v1/admin/entities/update", {
|
|
178
322
|
method: "POST",
|
|
179
323
|
body: { definitions },
|
|
180
324
|
...options
|
|
181
325
|
});
|
|
182
326
|
}
|
|
183
327
|
async function provisionWorkflowsApi(definitions, options) {
|
|
184
|
-
return
|
|
328
|
+
return browserApiRequest4("/api/v1/admin/provision/workflows", {
|
|
185
329
|
method: "POST",
|
|
186
330
|
body: { definitions },
|
|
187
331
|
...options
|
|
188
332
|
});
|
|
189
333
|
}
|
|
190
334
|
export {
|
|
335
|
+
acceptInviteApi,
|
|
191
336
|
cancelSubscriptionApi,
|
|
192
337
|
clearGatewayTokenCache,
|
|
193
338
|
completeOnboardingApi,
|
|
@@ -195,25 +340,45 @@ export {
|
|
|
195
340
|
createCheckoutSessionApi,
|
|
196
341
|
createOnboardingAgentApi,
|
|
197
342
|
createOnboardingKnowledgeApi,
|
|
343
|
+
createOrgApi,
|
|
198
344
|
createOrgSettingsApi,
|
|
199
345
|
createOrganizationApi,
|
|
200
346
|
createPaymentSessionApi,
|
|
201
347
|
createPortalSessionApi,
|
|
348
|
+
createUserApi,
|
|
349
|
+
deleteOrgApi,
|
|
350
|
+
deleteUserApi,
|
|
202
351
|
getBillingPlansApi,
|
|
203
352
|
getCreditsApi,
|
|
353
|
+
getInviteApi,
|
|
204
354
|
getOnboardingStatusApi,
|
|
355
|
+
getOrgApi,
|
|
356
|
+
getOrgInfoApi,
|
|
205
357
|
getOrgSettingsApi,
|
|
206
358
|
getSubscriptionApi,
|
|
359
|
+
getUserApi,
|
|
360
|
+
getUserByEmailApi,
|
|
361
|
+
getUserSettingsApi,
|
|
362
|
+
listInvitesApi,
|
|
363
|
+
listOrgsApi,
|
|
364
|
+
listUsersApi,
|
|
207
365
|
provisionDefaultAgentsApi,
|
|
208
366
|
provisionEntitiesApi,
|
|
209
367
|
provisionWorkflowsApi,
|
|
210
368
|
purchaseCreditsApi,
|
|
369
|
+
resendInviteApi,
|
|
370
|
+
revokeInviteApi,
|
|
371
|
+
sendInviteApi,
|
|
372
|
+
sendInvitesApi,
|
|
211
373
|
sendOnboardingInvitesApi,
|
|
212
374
|
skipOnboardingStepApi,
|
|
213
375
|
startOnboardingApi,
|
|
214
376
|
updateEntityDefinitionsApi,
|
|
215
377
|
updateOrgAgentsApi,
|
|
378
|
+
updateOrgApi,
|
|
216
379
|
updateOrgSettingsApi,
|
|
380
|
+
updateUserApi,
|
|
381
|
+
updateUserSettingsApi,
|
|
217
382
|
updateWorkflowDefinitionsApi
|
|
218
383
|
};
|
|
219
384
|
//# sourceMappingURL=index.js.map
|