@iblai/data-layer 1.10.0 → 1.11.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/index.d.ts +61831 -42087
- package/dist/index.esm.js +1214 -38
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1329 -37
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/constants.d.ts +2 -1
- package/dist/src/features/chat/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/chat/api-slice.d.ts +882 -1
- package/dist/src/features/chat/constants.d.ts +7 -0
- package/dist/src/features/core/api-slice.d.ts +1314 -345
- package/dist/src/features/core/types.d.ts +57 -0
- package/dist/src/features/evaluations/api-slice.d.ts +4314 -0
- package/dist/src/features/evaluations/constants.d.ts +102 -0
- package/dist/src/features/evaluations/types.d.ts +285 -0
- package/dist/src/features/mentor/privacy.d.ts +1 -1
- package/dist/src/features/platform/api-slice.d.ts +8610 -2
- package/dist/src/features/platform/types.d.ts +219 -0
- package/dist/src/features/studio-authoring/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/studio-authoring/api-slice.d.ts +1601 -0
- package/dist/src/features/studio-authoring/constants.d.ts +39 -0
- package/dist/src/features/studio-authoring/types.d.ts +65 -0
- package/dist/src/features/support-tickets/api-slice.d.ts +2356 -0
- package/dist/src/features/support-tickets/constants.d.ts +29 -0
- package/dist/src/features/support-tickets/types.d.ts +114 -0
- package/dist/src/features/utils.d.ts +5 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/utils/__tests__/index.test.d.ts +1 -0
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/tests/features/platform/api-slice.test.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SERVICES } from '@data-layer/constants';
|
|
2
|
+
export declare const SUPPORT_TICKETS_REDUCER_PATH = "supportTicketsApiSlice";
|
|
3
|
+
export declare const SUPPORT_TICKETS_TAGS: {
|
|
4
|
+
TICKETS: string;
|
|
5
|
+
TICKET: string;
|
|
6
|
+
TICKET_MESSAGES: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const SUPPORT_TICKETS_ENDPOINTS: {
|
|
9
|
+
TICKETS: {
|
|
10
|
+
service: SERVICES;
|
|
11
|
+
path: (org: string, userId: string) => string;
|
|
12
|
+
};
|
|
13
|
+
TICKET: {
|
|
14
|
+
service: SERVICES;
|
|
15
|
+
path: (org: string, userId: string, id: number) => string;
|
|
16
|
+
};
|
|
17
|
+
TICKET_CLOSE: {
|
|
18
|
+
service: SERVICES;
|
|
19
|
+
path: (org: string, userId: string, id: number) => string;
|
|
20
|
+
};
|
|
21
|
+
TICKET_MESSAGES: {
|
|
22
|
+
service: SERVICES;
|
|
23
|
+
path: (org: string, userId: string) => string;
|
|
24
|
+
};
|
|
25
|
+
TICKET_MESSAGE: {
|
|
26
|
+
service: SERVICES;
|
|
27
|
+
path: (org: string, userId: string, id: number) => string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the Human Support ticket endpoints
|
|
3
|
+
* (`/api/ai-mentor/orgs/{org}/users/{user_id}/support-tickets/` and
|
|
4
|
+
* `/api/ai-mentor/orgs/{org}/users/{user_id}/support-ticket-messages/`).
|
|
5
|
+
*
|
|
6
|
+
* Mirrors the generated `HumanSupportTicket` / `TicketMessage` models. The
|
|
7
|
+
* endpoints are not part of the pinned `@iblai/iblai-api` release yet, so the
|
|
8
|
+
* slice is hand-written (see `api-slice.ts`).
|
|
9
|
+
*/
|
|
10
|
+
export type SupportTicketStatus = 'open' | 'in_progress' | 'closed';
|
|
11
|
+
export interface SupportTicket {
|
|
12
|
+
readonly id: number;
|
|
13
|
+
/** Username of the user who opened the ticket. */
|
|
14
|
+
readonly username: string;
|
|
15
|
+
/** Email of the user who opened the ticket. */
|
|
16
|
+
readonly email: string;
|
|
17
|
+
readonly full_name: string;
|
|
18
|
+
/** Numeric user id of the user who opened the ticket. */
|
|
19
|
+
readonly user: number;
|
|
20
|
+
readonly session: string;
|
|
21
|
+
subject: string;
|
|
22
|
+
/** Ticket body — rendered from the human-support template (HTML). */
|
|
23
|
+
description: string;
|
|
24
|
+
status?: SupportTicketStatus;
|
|
25
|
+
readonly mentor_id: string;
|
|
26
|
+
readonly created_at: string;
|
|
27
|
+
readonly updated_at: string;
|
|
28
|
+
readonly resolved_at: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface SupportTicketMessage {
|
|
31
|
+
readonly id: number;
|
|
32
|
+
ticket: number;
|
|
33
|
+
/** Numeric user id of the sender; null for system-generated messages. */
|
|
34
|
+
sender?: number | null;
|
|
35
|
+
message: string;
|
|
36
|
+
readonly timestamp: string;
|
|
37
|
+
}
|
|
38
|
+
export interface PaginatedSupportTicketList {
|
|
39
|
+
count: number;
|
|
40
|
+
next?: string | null;
|
|
41
|
+
previous?: string | null;
|
|
42
|
+
results: Array<SupportTicket>;
|
|
43
|
+
}
|
|
44
|
+
export interface PaginatedSupportTicketMessageList {
|
|
45
|
+
count: number;
|
|
46
|
+
next?: string | null;
|
|
47
|
+
previous?: string | null;
|
|
48
|
+
results: Array<SupportTicketMessage>;
|
|
49
|
+
}
|
|
50
|
+
export interface GetSupportTicketsParams {
|
|
51
|
+
org: string;
|
|
52
|
+
userId: string;
|
|
53
|
+
/** Filter tickets to a single mentor (mentor unique id). */
|
|
54
|
+
mentorId?: string;
|
|
55
|
+
page?: number;
|
|
56
|
+
pageSize?: number;
|
|
57
|
+
session?: string;
|
|
58
|
+
status?: SupportTicketStatus;
|
|
59
|
+
/** Filter tickets to a single requester. */
|
|
60
|
+
username?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface SupportTicketDetailParams {
|
|
63
|
+
org: string;
|
|
64
|
+
userId: string;
|
|
65
|
+
id: number;
|
|
66
|
+
}
|
|
67
|
+
export interface UpdateSupportTicketParams extends SupportTicketDetailParams {
|
|
68
|
+
body: Pick<SupportTicket, 'subject' | 'description'> & {
|
|
69
|
+
status?: SupportTicketStatus;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export interface PatchSupportTicketParams extends SupportTicketDetailParams {
|
|
73
|
+
body: Partial<Pick<SupportTicket, 'subject' | 'description'>> & {
|
|
74
|
+
status?: SupportTicketStatus;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export interface GetSupportTicketMessagesParams {
|
|
78
|
+
org: string;
|
|
79
|
+
userId: string;
|
|
80
|
+
/** Filter messages to a single ticket. */
|
|
81
|
+
ticket?: number;
|
|
82
|
+
/** Filter messages by sender. */
|
|
83
|
+
sender?: string;
|
|
84
|
+
page?: number;
|
|
85
|
+
pageSize?: number;
|
|
86
|
+
}
|
|
87
|
+
export interface SupportTicketMessageDetailParams {
|
|
88
|
+
org: string;
|
|
89
|
+
userId: string;
|
|
90
|
+
id: number;
|
|
91
|
+
}
|
|
92
|
+
export interface CreateSupportTicketMessageParams {
|
|
93
|
+
org: string;
|
|
94
|
+
userId: string;
|
|
95
|
+
body: {
|
|
96
|
+
ticket: number;
|
|
97
|
+
message: string;
|
|
98
|
+
sender?: number | null;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export interface UpdateSupportTicketMessageParams extends SupportTicketMessageDetailParams {
|
|
102
|
+
body: {
|
|
103
|
+
ticket: number;
|
|
104
|
+
message: string;
|
|
105
|
+
sender?: number | null;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export interface PatchSupportTicketMessageParams extends SupportTicketMessageDetailParams {
|
|
109
|
+
body: Partial<{
|
|
110
|
+
ticket: number;
|
|
111
|
+
message: string;
|
|
112
|
+
sender: number | null;
|
|
113
|
+
}>;
|
|
114
|
+
}
|
|
@@ -9,6 +9,11 @@ type CustomError = {
|
|
|
9
9
|
* Get the service URL based on the provided service type.
|
|
10
10
|
*/
|
|
11
11
|
export declare const getServiceUrl: (service: SERVICES) => string;
|
|
12
|
+
/**
|
|
13
|
+
* Read a cookie value by name. Returns null outside the browser or when the
|
|
14
|
+
* cookie is absent. Used for Studio's CSRF token (`csrftoken`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const getCookieValue: (name: string) => string | null;
|
|
12
17
|
/**
|
|
13
18
|
* Get the headers required for API requests based on the provided service type.
|
|
14
19
|
*/
|
package/dist/src/index.d.ts
CHANGED
|
@@ -46,6 +46,9 @@ export * from './features/course-metadata/api-slice';
|
|
|
46
46
|
export * from './features/course-metadata/types';
|
|
47
47
|
export * from './features/edx-sso/api-slice';
|
|
48
48
|
export * from './features/edx-sso/types';
|
|
49
|
+
export * from './features/studio-authoring/api-slice';
|
|
50
|
+
export * from './features/studio-authoring/constants';
|
|
51
|
+
export * from './features/studio-authoring/types';
|
|
49
52
|
export * from './features/search/api-slice';
|
|
50
53
|
export * from './features/career/api-slice';
|
|
51
54
|
export * from './features/artifacts/api-slice';
|
|
@@ -62,6 +65,9 @@ export * from './features/notifications/api-slice';
|
|
|
62
65
|
export * from './features/notifications/custom-api-slice';
|
|
63
66
|
export * from './features/notifications/types';
|
|
64
67
|
export * from './features/notifications/constants';
|
|
68
|
+
export * from './features/support-tickets/api-slice';
|
|
69
|
+
export * from './features/support-tickets/types';
|
|
70
|
+
export * from './features/support-tickets/constants';
|
|
65
71
|
export * from './features/mentor/custom-api-slice';
|
|
66
72
|
export * from './features/call-configurations/api-slice';
|
|
67
73
|
export * from './features/call-configurations/constants';
|
|
@@ -112,6 +118,9 @@ export * from './features/workflows/constants';
|
|
|
112
118
|
export * from './features/audit-logs/api-slice';
|
|
113
119
|
export * from './features/audit-logs/constants';
|
|
114
120
|
export * from './features/audit-logs/types';
|
|
121
|
+
export * from './features/evaluations/api-slice';
|
|
122
|
+
export * from './features/evaluations/constants';
|
|
123
|
+
export * from './features/evaluations/types';
|
|
115
124
|
export * from './features/watched-groups/api-slice';
|
|
116
125
|
export * from './features/watched-groups/constants';
|
|
117
126
|
export * from './features/watched-groups/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|