ikoncomponents 1.2.0 → 1.2.2
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/ikoncomponents/activity-sheet/index.d.ts +11 -0
- package/dist/ikoncomponents/activity-sheet/index.js +23 -0
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +5 -0
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +16 -0
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +2 -0
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +39 -0
- package/dist/ikoncomponents/big-calendar/index.d.ts +4 -0
- package/dist/ikoncomponents/big-calendar/index.js +35 -0
- package/dist/ikoncomponents/big-calendar/type.d.ts +31 -0
- package/dist/ikoncomponents/big-calendar/type.js +1 -0
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +1 -0
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +15 -0
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.js +85 -0
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +7 -0
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +145 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +6 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +92 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +6 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +14 -0
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +14 -0
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.js +87 -0
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts +27 -0
- package/dist/ikoncomponents/image-cropper-upload/index.js +49 -0
- package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +16 -0
- package/dist/ikoncomponents/image-cropper-upload/utils/index.js +73 -0
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +5 -9
- package/dist/ikoncomponents/main-layout/main-sidebar.js +2 -2
- package/dist/ikoncomponents/provider-wrapper/index.d.ts +5 -0
- package/dist/ikoncomponents/provider-wrapper/index.js +10 -0
- package/dist/ikoncomponents/resource-spreadsheet/index.d.ts +21 -21
- package/dist/ikoncomponents/resource-spreadsheet/index.js +36 -36
- package/dist/index.d.ts +15 -0
- package/dist/index.js +9 -0
- package/dist/styles.css +95 -0
- package/dist/utils/actions/account/index.d.ts +5 -0
- package/dist/utils/actions/account/index.js +28 -0
- package/dist/utils/actions/account/type.d.ts +4 -0
- package/dist/utils/actions/account/type.js +1 -0
- package/dist/utils/actions/auth/index.d.ts +7 -0
- package/dist/utils/actions/auth/index.js +58 -0
- package/dist/utils/actions/common/utils.d.ts +5 -0
- package/dist/utils/actions/common/utils.js +25 -0
- package/dist/utils/actions/software/index.d.ts +11 -0
- package/dist/utils/actions/software/index.js +75 -0
- package/dist/utils/api/accountService/index.d.ts +23 -0
- package/dist/utils/api/accountService/index.js +64 -0
- package/dist/utils/api/accountService/type.d.ts +4 -0
- package/dist/utils/api/accountService/type.js +1 -0
- package/dist/utils/api/file-upload/index.d.ts +5 -0
- package/dist/utils/api/file-upload/index.js +80 -0
- package/dist/utils/api/file-upload/type.d.ts +6 -0
- package/dist/utils/api/file-upload/type.js +1 -0
- package/dist/utils/api/ikonBaseApi.d.ts +12 -0
- package/dist/utils/api/ikonBaseApi.js +104 -0
- package/dist/utils/api/loginService/index.d.ts +12 -0
- package/dist/utils/api/loginService/index.js +72 -0
- package/dist/utils/api/loginService/type.d.ts +31 -0
- package/dist/utils/api/loginService/type.js +1 -0
- package/dist/utils/api/softwareService/index.d.ts +64 -0
- package/dist/utils/api/softwareService/index.js +212 -0
- package/dist/utils/api/softwareService/type.d.ts +54 -0
- package/dist/utils/api/softwareService/type.js +1 -0
- package/package.json +6 -2
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { redirect } from 'next/navigation';
|
|
4
|
+
import { getActiveAccountId } from '../actions/account';
|
|
5
|
+
import { getBaseSoftwareId, getCurrentSoftwareId } from '../actions/software';
|
|
6
|
+
import { getTicket } from '../actions/auth';
|
|
7
|
+
// Create an Axios instance
|
|
8
|
+
export const axiosInstance = axios.create({
|
|
9
|
+
baseURL: "https://ikoncloud-dev.keross.com/ikon-api"
|
|
10
|
+
});
|
|
11
|
+
async function ikonBaseApi({ service, operation, arguments_, accountId, softwareId, isTicketRequried = true, isServerApi = false }) {
|
|
12
|
+
var _a;
|
|
13
|
+
//console.log("ikonBaseApi called with params: ", { service, operation, arguments_, accountId, softwareId, isTicketRequried });
|
|
14
|
+
const queryParams = new URLSearchParams({
|
|
15
|
+
inZip: String(false),
|
|
16
|
+
outZip: String(true),
|
|
17
|
+
inFormat: "freejson",
|
|
18
|
+
outFormat: "freejson",
|
|
19
|
+
service: service,
|
|
20
|
+
operation: operation,
|
|
21
|
+
});
|
|
22
|
+
if (isTicketRequried) {
|
|
23
|
+
const globalTicket = await getTicket();
|
|
24
|
+
if (globalTicket) {
|
|
25
|
+
queryParams.append('ticket', globalTicket);
|
|
26
|
+
if (accountId) {
|
|
27
|
+
queryParams.append('activeAccountId', accountId);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const activeAccountId = await getActiveAccountId();
|
|
31
|
+
if (activeAccountId) {
|
|
32
|
+
queryParams.append('activeAccountId', activeAccountId);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (softwareId) {
|
|
36
|
+
queryParams.append('softwareId', softwareId);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const currentSoftwareId = await getCurrentSoftwareId();
|
|
40
|
+
if (currentSoftwareId) {
|
|
41
|
+
queryParams.append('softwareId', currentSoftwareId);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const baseSoftwareId = await getBaseSoftwareId();
|
|
45
|
+
if (baseSoftwareId) {
|
|
46
|
+
queryParams.append('softwareId', baseSoftwareId);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const contentType = 'application/x-www-form-urlencoded; charset=UTF-8;';
|
|
53
|
+
const requestData = JSON.stringify(arguments_);
|
|
54
|
+
try {
|
|
55
|
+
const result = await axiosInstance({
|
|
56
|
+
method: 'POST',
|
|
57
|
+
url: `https://ikoncloud-dev.keross.com/ikon-api?${queryParams.toString()}`,
|
|
58
|
+
headers: { 'Content-Type': contentType },
|
|
59
|
+
data: { arguments: requestData },
|
|
60
|
+
responseType: 'json'
|
|
61
|
+
});
|
|
62
|
+
return { data: result.data, status: result.status };
|
|
63
|
+
}
|
|
64
|
+
catch (axiosError) {
|
|
65
|
+
const error = axiosError;
|
|
66
|
+
const { status, response } = error;
|
|
67
|
+
console.error(status);
|
|
68
|
+
// console.error(axiosError)
|
|
69
|
+
// if (status === 401) {
|
|
70
|
+
// redirect("/login")
|
|
71
|
+
// }
|
|
72
|
+
// throw Error(error.message)
|
|
73
|
+
const ikonErrorCode = (_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a["ikon-error-code"];
|
|
74
|
+
console.error(ikonErrorCode);
|
|
75
|
+
if (ikonErrorCode == "AUTHENTICATIONEXCEPTION") {
|
|
76
|
+
const message = "You are re-directed to Login Page. Possible reasons are:\n\t1) Your session has been idle for more than allowed timeout value.\n\t2) This is an unauthenticated access.";
|
|
77
|
+
if (isServerApi) {
|
|
78
|
+
throw new Error("AUTHENTICATIONEXCEPTION");
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
redirect("/login");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
if (ikonErrorCode == "TASKNOTEXISTSEXCEPTION") {
|
|
86
|
+
console.error(error.message, "Task does not exist!");
|
|
87
|
+
}
|
|
88
|
+
if (ikonErrorCode == "AUTHORIZATIONEXCEPTION") {
|
|
89
|
+
console.error(error.message, "Authorization Error!");
|
|
90
|
+
}
|
|
91
|
+
if (ikonErrorCode == "INTERNALIKONEXCEPTION") {
|
|
92
|
+
console.error("Internal IKON Error - " + error.message, "IKON Error!");
|
|
93
|
+
}
|
|
94
|
+
if (ikonErrorCode == "DATAEXCEPTION") {
|
|
95
|
+
console.error(response, error.message);
|
|
96
|
+
}
|
|
97
|
+
if (ikonErrorCode == "UNCAUGHTEXCEPTION") {
|
|
98
|
+
console.error("Internal IKON Error - " + error.message, "IKON Error!");
|
|
99
|
+
}
|
|
100
|
+
throw new Error(error.message);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export default ikonBaseApi;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ForgotPasswordProps, GetLoggedInUserProfileDetailsReturnProps, GetLoggedInUserProfileReturnProps, LoginProps, UpdateUserProfileProps, ValidateOTPProps } from "./type";
|
|
2
|
+
export declare const login: ({ userName, password }: LoginProps) => Promise<any>;
|
|
3
|
+
export declare const resetPassword: ({ userName }: ForgotPasswordProps) => Promise<any>;
|
|
4
|
+
export declare const generateOTP: ({ temporaryTicket, otpMedium, }: {
|
|
5
|
+
temporaryTicket: string;
|
|
6
|
+
otpMedium?: string;
|
|
7
|
+
}) => Promise<any>;
|
|
8
|
+
export declare const validateOTP: ({ temporaryTicket, otp, }: ValidateOTPProps) => Promise<any>;
|
|
9
|
+
export declare const logout: () => Promise<any>;
|
|
10
|
+
export declare const getLoggedInUserProfile: (isServerApi?: boolean) => Promise<GetLoggedInUserProfileReturnProps>;
|
|
11
|
+
export declare const getLoggedInUserProfileDetails: (isServerApi?: boolean) => Promise<GetLoggedInUserProfileDetailsReturnProps>;
|
|
12
|
+
export declare const updateUserProfile: ({ userName, userPassword, userPhone, userEmail, userThumbnail, }: UpdateUserProfileProps) => Promise<any>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import sha512 from "crypto-js/sha512";
|
|
3
|
+
import ikonBaseApi from "../../api/ikonBaseApi";
|
|
4
|
+
import { revalidateTag } from "next/cache";
|
|
5
|
+
export const login = async ({ userName, password }) => {
|
|
6
|
+
const result = await ikonBaseApi({
|
|
7
|
+
service: "loginService",
|
|
8
|
+
operation: "login",
|
|
9
|
+
arguments_: [userName, sha512(password).toString()],
|
|
10
|
+
isTicketRequried: false,
|
|
11
|
+
});
|
|
12
|
+
return result.data;
|
|
13
|
+
};
|
|
14
|
+
export const resetPassword = async ({ userName }) => {
|
|
15
|
+
const result = await ikonBaseApi({
|
|
16
|
+
service: "loginService",
|
|
17
|
+
operation: "resetPassword",
|
|
18
|
+
arguments_: [userName],
|
|
19
|
+
isTicketRequried: false,
|
|
20
|
+
});
|
|
21
|
+
return result.data;
|
|
22
|
+
};
|
|
23
|
+
export const generateOTP = async ({ temporaryTicket, otpMedium = "EMAIL", }) => {
|
|
24
|
+
const result = await ikonBaseApi({
|
|
25
|
+
service: "loginService",
|
|
26
|
+
operation: "generateOTP",
|
|
27
|
+
arguments_: [temporaryTicket, otpMedium],
|
|
28
|
+
isTicketRequried: false,
|
|
29
|
+
});
|
|
30
|
+
return result.data;
|
|
31
|
+
};
|
|
32
|
+
export const validateOTP = async ({ temporaryTicket, otp, }) => {
|
|
33
|
+
const result = await ikonBaseApi({
|
|
34
|
+
service: "loginService",
|
|
35
|
+
operation: "validateOTP",
|
|
36
|
+
arguments_: [temporaryTicket, otp],
|
|
37
|
+
isTicketRequried: false,
|
|
38
|
+
});
|
|
39
|
+
return result.data;
|
|
40
|
+
};
|
|
41
|
+
export const logout = async () => {
|
|
42
|
+
const result = await ikonBaseApi({
|
|
43
|
+
service: "loginService",
|
|
44
|
+
operation: "logout",
|
|
45
|
+
});
|
|
46
|
+
return result.data;
|
|
47
|
+
};
|
|
48
|
+
export const getLoggedInUserProfile = async (isServerApi) => {
|
|
49
|
+
const result = await ikonBaseApi({
|
|
50
|
+
service: "loginService",
|
|
51
|
+
operation: "getLoggedInUserProfile",
|
|
52
|
+
isServerApi,
|
|
53
|
+
});
|
|
54
|
+
return result.data;
|
|
55
|
+
};
|
|
56
|
+
export const getLoggedInUserProfileDetails = async (isServerApi) => {
|
|
57
|
+
const result = await ikonBaseApi({
|
|
58
|
+
service: "loginService",
|
|
59
|
+
operation: "getLoggedInUserProfileDetails",
|
|
60
|
+
isServerApi,
|
|
61
|
+
});
|
|
62
|
+
return result.data;
|
|
63
|
+
};
|
|
64
|
+
export const updateUserProfile = async ({ userName, userPassword, userPhone, userEmail, userThumbnail, }) => {
|
|
65
|
+
const result = await ikonBaseApi({
|
|
66
|
+
service: "loginService",
|
|
67
|
+
operation: "updateUserProfile",
|
|
68
|
+
arguments_: [userName, userPassword, userPhone, userEmail, userThumbnail],
|
|
69
|
+
});
|
|
70
|
+
revalidateTag("profile");
|
|
71
|
+
return result.data;
|
|
72
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface LoginProps {
|
|
2
|
+
userName: string;
|
|
3
|
+
password: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ForgotPasswordProps {
|
|
6
|
+
userName: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ValidateOTPProps {
|
|
9
|
+
temporaryTicket: string;
|
|
10
|
+
otp: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GetLoggedInUserProfileReturnProps {
|
|
13
|
+
USER_NAME: string;
|
|
14
|
+
USER_LOGIN: string;
|
|
15
|
+
USER_ID: string;
|
|
16
|
+
CNT: number;
|
|
17
|
+
USER_THUMBNAIL?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface GetLoggedInUserProfileDetailsReturnProps {
|
|
20
|
+
USER_NAME: string;
|
|
21
|
+
USER_EMAIL: string;
|
|
22
|
+
USER_PHONE: string;
|
|
23
|
+
USER_THUMBNAIL?: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface UpdateUserProfileProps {
|
|
26
|
+
userName: string;
|
|
27
|
+
userPassword: string;
|
|
28
|
+
userPhone: string;
|
|
29
|
+
userEmail: string;
|
|
30
|
+
userThumbnail?: string | null;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CreateSoftwareProps, EditSoftwareProps, getAccessibleSoftwareForUserProps, getAllSubscribedSoftwaresForClientProps, getAvailableSoftwaresForAccountProps, getMySoftwaresProps, getMySoftwaresV2Props, mapSoftwareNameProps } from "./type";
|
|
2
|
+
export declare const mapSoftwareName: ({ softwareName, version, }: mapSoftwareNameProps) => Promise<string>;
|
|
3
|
+
export declare const createSoftware: ({ softwareName, softwareDescription, softwareVersion, softwareOwnerAccount, softwareDeveloperAccount, softwareManagerAccount, softwareAccessibility, softwareStatus, }: CreateSoftwareProps) => Promise<string>;
|
|
4
|
+
export declare const editSoftware: ({ softwareId, softwareName, softwareDescription, softwareVersion, softwareDeveloperAccount, softwareManagerAccount, softwareAccessibility, softwareStatus, }: EditSoftwareProps) => Promise<string>;
|
|
5
|
+
export declare const getAccessibleSoftwareForUser: ({ accountId, userId, }: getAccessibleSoftwareForUserProps) => Promise<any>;
|
|
6
|
+
export declare const getAllSubscribedSoftwaresForClient: ({ accountId }: getAllSubscribedSoftwaresForClientProps, isServerApi?: boolean) => Promise<any>;
|
|
7
|
+
export declare const inviteAccountForSoftware: ({ accountId, softwareId, expirationTime, }: {
|
|
8
|
+
accountId: string;
|
|
9
|
+
softwareId: string;
|
|
10
|
+
expirationTime?: number | string;
|
|
11
|
+
}) => Promise<any>;
|
|
12
|
+
export declare const getAllSentSoftwareInviteRequests: ({ accountId, }: {
|
|
13
|
+
accountId: string;
|
|
14
|
+
}) => Promise<any>;
|
|
15
|
+
export declare const getAllReceivedSoftwareInviteRequests: ({ accountId, }: {
|
|
16
|
+
accountId: string;
|
|
17
|
+
}) => Promise<any>;
|
|
18
|
+
export declare const getAllSoftwareInvitesV2: ({ accountId, }: {
|
|
19
|
+
accountId: string;
|
|
20
|
+
}) => Promise<any>;
|
|
21
|
+
export declare const acceptInvitationRequestForSoftware: ({ requestId, shareKey, }: {
|
|
22
|
+
requestId: string;
|
|
23
|
+
shareKey: string;
|
|
24
|
+
}) => Promise<any>;
|
|
25
|
+
export declare const cancelInvitationRequestForSoftware: ({ requestId, }: {
|
|
26
|
+
requestId: string;
|
|
27
|
+
}) => Promise<any>;
|
|
28
|
+
export declare const rejectInvitationRequestForSoftware: ({ requestId, }: {
|
|
29
|
+
requestId: string;
|
|
30
|
+
}) => Promise<any>;
|
|
31
|
+
export declare const activateSoftwareInviteForAccount: ({ invitationId, }: {
|
|
32
|
+
invitationId: string;
|
|
33
|
+
}) => Promise<any>;
|
|
34
|
+
export declare const deactivateSoftwareInviteForAccount: ({ invitationId, }: {
|
|
35
|
+
invitationId: string;
|
|
36
|
+
}) => Promise<any>;
|
|
37
|
+
export declare const getAllPendingInvitationRequestsForUser: ({ userId, }: {
|
|
38
|
+
userId: string;
|
|
39
|
+
}) => Promise<any>;
|
|
40
|
+
export declare const getAllInvitationRequestsSentByAccount: ({ accountId, }: {
|
|
41
|
+
accountId: string;
|
|
42
|
+
}) => Promise<any>;
|
|
43
|
+
export declare const inviteUserToMyAccount: ({ accountId, userLogin, }: {
|
|
44
|
+
accountId: string;
|
|
45
|
+
userLogin: string;
|
|
46
|
+
}) => Promise<any>;
|
|
47
|
+
export declare const getMySoftwares: ({ accountId }: getMySoftwaresProps) => Promise<any>;
|
|
48
|
+
export declare const getMySoftwaresV2: ({ accountId, onlyActive, }: getMySoftwaresV2Props) => Promise<any>;
|
|
49
|
+
export declare const getAvailableSoftwaresForAccount: ({ accountId, }: getAvailableSoftwaresForAccountProps) => Promise<any>;
|
|
50
|
+
export declare const getSoftwareById: ({ softwareId, }: {
|
|
51
|
+
softwareId: string;
|
|
52
|
+
}) => Promise<any>;
|
|
53
|
+
export declare const activateSoftware: ({ softwareId, }: {
|
|
54
|
+
softwareId: string;
|
|
55
|
+
}) => Promise<any>;
|
|
56
|
+
export declare const deactivateSoftware: ({ softwareId, }: {
|
|
57
|
+
softwareId: string;
|
|
58
|
+
}) => Promise<any>;
|
|
59
|
+
export declare const requestForFinalSubscription: ({ accountId, userId, softwareId, suggestedDate, }: {
|
|
60
|
+
accountId: string;
|
|
61
|
+
userId: string;
|
|
62
|
+
softwareId: string;
|
|
63
|
+
suggestedDate?: string | null;
|
|
64
|
+
}) => Promise<any>;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import ikonBaseApi from "../ikonBaseApi";
|
|
2
|
+
export const mapSoftwareName = async ({ softwareName, version, }) => {
|
|
3
|
+
const result = await ikonBaseApi({
|
|
4
|
+
service: "softwareService",
|
|
5
|
+
operation: "mapSoftwareName",
|
|
6
|
+
arguments_: [softwareName, version],
|
|
7
|
+
});
|
|
8
|
+
return result.data;
|
|
9
|
+
};
|
|
10
|
+
export const createSoftware = async ({ softwareName, softwareDescription, softwareVersion, softwareOwnerAccount, softwareDeveloperAccount, softwareManagerAccount, softwareAccessibility, softwareStatus, }) => {
|
|
11
|
+
const result = await ikonBaseApi({
|
|
12
|
+
service: "softwareService",
|
|
13
|
+
operation: "createSoftware",
|
|
14
|
+
arguments_: [
|
|
15
|
+
softwareName,
|
|
16
|
+
softwareDescription,
|
|
17
|
+
softwareVersion,
|
|
18
|
+
softwareOwnerAccount,
|
|
19
|
+
softwareDeveloperAccount,
|
|
20
|
+
softwareManagerAccount,
|
|
21
|
+
softwareAccessibility,
|
|
22
|
+
softwareStatus,
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
return result.data;
|
|
26
|
+
};
|
|
27
|
+
export const editSoftware = async ({ softwareId, softwareName, softwareDescription, softwareVersion, softwareDeveloperAccount, softwareManagerAccount, softwareAccessibility, softwareStatus, }) => {
|
|
28
|
+
const result = await ikonBaseApi({
|
|
29
|
+
service: "softwareService",
|
|
30
|
+
operation: "editSoftware",
|
|
31
|
+
arguments_: [
|
|
32
|
+
softwareId,
|
|
33
|
+
softwareName,
|
|
34
|
+
softwareDescription,
|
|
35
|
+
softwareVersion,
|
|
36
|
+
softwareDeveloperAccount,
|
|
37
|
+
softwareManagerAccount,
|
|
38
|
+
softwareAccessibility,
|
|
39
|
+
softwareStatus,
|
|
40
|
+
],
|
|
41
|
+
});
|
|
42
|
+
return result.data;
|
|
43
|
+
};
|
|
44
|
+
export const getAccessibleSoftwareForUser = async ({ accountId, userId, }) => {
|
|
45
|
+
const result = await ikonBaseApi({
|
|
46
|
+
service: "softwareService",
|
|
47
|
+
operation: "getAccessibleSoftwareForUser",
|
|
48
|
+
arguments_: [userId, accountId],
|
|
49
|
+
});
|
|
50
|
+
return result.data;
|
|
51
|
+
};
|
|
52
|
+
export const getAllSubscribedSoftwaresForClient = async ({ accountId }, isServerApi) => {
|
|
53
|
+
const result = await ikonBaseApi({
|
|
54
|
+
service: "softwareSubscriptionService",
|
|
55
|
+
operation: "getAllSubscribedSoftwaresForClient",
|
|
56
|
+
arguments_: [accountId],
|
|
57
|
+
isServerApi: isServerApi,
|
|
58
|
+
});
|
|
59
|
+
return result.data;
|
|
60
|
+
};
|
|
61
|
+
export const inviteAccountForSoftware = async ({ accountId, softwareId, expirationTime, }) => {
|
|
62
|
+
const result = await ikonBaseApi({
|
|
63
|
+
service: "accountInvitationService",
|
|
64
|
+
operation: "inviteAccountForSoftware",
|
|
65
|
+
arguments_: [accountId, softwareId, expirationTime],
|
|
66
|
+
});
|
|
67
|
+
return result.data;
|
|
68
|
+
};
|
|
69
|
+
export const getAllSentSoftwareInviteRequests = async ({ accountId, }) => {
|
|
70
|
+
const result = await ikonBaseApi({
|
|
71
|
+
service: "accountInvitationService",
|
|
72
|
+
operation: "getAllSentSoftwareInviteRequests",
|
|
73
|
+
arguments_: [accountId],
|
|
74
|
+
});
|
|
75
|
+
return result.data;
|
|
76
|
+
};
|
|
77
|
+
export const getAllReceivedSoftwareInviteRequests = async ({ accountId, }) => {
|
|
78
|
+
const result = await ikonBaseApi({
|
|
79
|
+
service: "accountInvitationService",
|
|
80
|
+
operation: "getAllReceivedSoftwareInviteRequests",
|
|
81
|
+
arguments_: [accountId],
|
|
82
|
+
});
|
|
83
|
+
return result.data;
|
|
84
|
+
};
|
|
85
|
+
export const getAllSoftwareInvitesV2 = async ({ accountId, }) => {
|
|
86
|
+
const result = await ikonBaseApi({
|
|
87
|
+
service: "accountInvitationService",
|
|
88
|
+
operation: "getAllSoftwareInvitesV2",
|
|
89
|
+
arguments_: [accountId],
|
|
90
|
+
});
|
|
91
|
+
return result.data;
|
|
92
|
+
};
|
|
93
|
+
export const acceptInvitationRequestForSoftware = async ({ requestId, shareKey, }) => {
|
|
94
|
+
const result = await ikonBaseApi({
|
|
95
|
+
service: "accountInvitationService",
|
|
96
|
+
operation: "acceptInvitationRequestForSoftware",
|
|
97
|
+
arguments_: [requestId, shareKey],
|
|
98
|
+
});
|
|
99
|
+
return result.data;
|
|
100
|
+
};
|
|
101
|
+
export const cancelInvitationRequestForSoftware = async ({ requestId, }) => {
|
|
102
|
+
const result = await ikonBaseApi({
|
|
103
|
+
service: "accountInvitationService",
|
|
104
|
+
operation: "cancelInvitationRequestForSoftware",
|
|
105
|
+
arguments_: [requestId],
|
|
106
|
+
});
|
|
107
|
+
return result.data;
|
|
108
|
+
};
|
|
109
|
+
export const rejectInvitationRequestForSoftware = async ({ requestId, }) => {
|
|
110
|
+
const result = await ikonBaseApi({
|
|
111
|
+
service: "accountInvitationService",
|
|
112
|
+
operation: "rejectInvitationRequestForSoftware",
|
|
113
|
+
arguments_: [requestId],
|
|
114
|
+
});
|
|
115
|
+
return result.data;
|
|
116
|
+
};
|
|
117
|
+
export const activateSoftwareInviteForAccount = async ({ invitationId, }) => {
|
|
118
|
+
const result = await ikonBaseApi({
|
|
119
|
+
service: "accountInvitationService",
|
|
120
|
+
operation: "activateSoftwareInviteForAccount",
|
|
121
|
+
arguments_: [invitationId],
|
|
122
|
+
});
|
|
123
|
+
return result.data;
|
|
124
|
+
};
|
|
125
|
+
export const deactivateSoftwareInviteForAccount = async ({ invitationId, }) => {
|
|
126
|
+
const result = await ikonBaseApi({
|
|
127
|
+
service: "accountInvitationService",
|
|
128
|
+
operation: "deactivateSoftwareInviteForAccount",
|
|
129
|
+
arguments_: [invitationId],
|
|
130
|
+
});
|
|
131
|
+
return result.data;
|
|
132
|
+
};
|
|
133
|
+
export const getAllPendingInvitationRequestsForUser = async ({ userId, }) => {
|
|
134
|
+
const result = await ikonBaseApi({
|
|
135
|
+
service: "userInvitationService",
|
|
136
|
+
operation: "getAllPendingInvitationRequestsForUser",
|
|
137
|
+
arguments_: [userId],
|
|
138
|
+
});
|
|
139
|
+
return result.data;
|
|
140
|
+
};
|
|
141
|
+
export const getAllInvitationRequestsSentByAccount = async ({ accountId, }) => {
|
|
142
|
+
const result = await ikonBaseApi({
|
|
143
|
+
service: "userInvitationService",
|
|
144
|
+
operation: "getAllInvitationRequestsSentByAccount",
|
|
145
|
+
arguments_: [accountId],
|
|
146
|
+
});
|
|
147
|
+
return result.data;
|
|
148
|
+
};
|
|
149
|
+
export const inviteUserToMyAccount = async ({ accountId, userLogin, }) => {
|
|
150
|
+
const result = await ikonBaseApi({
|
|
151
|
+
service: "userInvitationService",
|
|
152
|
+
operation: "inviteUserToMyAccount",
|
|
153
|
+
arguments_: [accountId, userLogin],
|
|
154
|
+
});
|
|
155
|
+
return result.data;
|
|
156
|
+
};
|
|
157
|
+
export const getMySoftwares = async ({ accountId }) => {
|
|
158
|
+
const result = await ikonBaseApi({
|
|
159
|
+
service: "softwareService",
|
|
160
|
+
operation: "getMySoftwares",
|
|
161
|
+
arguments_: [accountId],
|
|
162
|
+
});
|
|
163
|
+
return result.data;
|
|
164
|
+
};
|
|
165
|
+
export const getMySoftwaresV2 = async ({ accountId, onlyActive = false, }) => {
|
|
166
|
+
const result = await ikonBaseApi({
|
|
167
|
+
service: "softwareService",
|
|
168
|
+
operation: "getMySoftwaresV2",
|
|
169
|
+
arguments_: [accountId, onlyActive],
|
|
170
|
+
});
|
|
171
|
+
return result.data;
|
|
172
|
+
};
|
|
173
|
+
export const getAvailableSoftwaresForAccount = async ({ accountId, }) => {
|
|
174
|
+
const result = await ikonBaseApi({
|
|
175
|
+
service: "softwareService",
|
|
176
|
+
operation: "getAvailableSoftwaresForAccount",
|
|
177
|
+
arguments_: [accountId],
|
|
178
|
+
});
|
|
179
|
+
return result.data;
|
|
180
|
+
};
|
|
181
|
+
export const getSoftwareById = async ({ softwareId, }) => {
|
|
182
|
+
const result = await ikonBaseApi({
|
|
183
|
+
service: "softwareService",
|
|
184
|
+
operation: "getSoftwareById",
|
|
185
|
+
arguments_: [softwareId],
|
|
186
|
+
});
|
|
187
|
+
return result.data;
|
|
188
|
+
};
|
|
189
|
+
export const activateSoftware = async ({ softwareId, }) => {
|
|
190
|
+
const result = await ikonBaseApi({
|
|
191
|
+
service: "softwareService",
|
|
192
|
+
operation: "activateSoftware",
|
|
193
|
+
arguments_: [softwareId],
|
|
194
|
+
});
|
|
195
|
+
return result.data;
|
|
196
|
+
};
|
|
197
|
+
export const deactivateSoftware = async ({ softwareId, }) => {
|
|
198
|
+
const result = await ikonBaseApi({
|
|
199
|
+
service: "softwareService",
|
|
200
|
+
operation: "deactivateSoftware",
|
|
201
|
+
arguments_: [softwareId],
|
|
202
|
+
});
|
|
203
|
+
return result.data;
|
|
204
|
+
};
|
|
205
|
+
export const requestForFinalSubscription = async ({ accountId, userId, softwareId, suggestedDate = null, }) => {
|
|
206
|
+
const result = await ikonBaseApi({
|
|
207
|
+
service: "requestService",
|
|
208
|
+
operation: "requestForFinalSubscription",
|
|
209
|
+
arguments_: [accountId, userId, softwareId, suggestedDate],
|
|
210
|
+
});
|
|
211
|
+
return result.data;
|
|
212
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface mapSoftwareNameProps {
|
|
2
|
+
softwareName: string;
|
|
3
|
+
version: string;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateSoftwareProps {
|
|
6
|
+
softwareName: string;
|
|
7
|
+
softwareDescription: string;
|
|
8
|
+
softwareVersion: number;
|
|
9
|
+
softwareOwnerAccount: string;
|
|
10
|
+
softwareDeveloperAccount: string;
|
|
11
|
+
softwareManagerAccount: string | null;
|
|
12
|
+
softwareAccessibility: string;
|
|
13
|
+
softwareStatus: string;
|
|
14
|
+
}
|
|
15
|
+
export interface EditSoftwareProps {
|
|
16
|
+
softwareId: string;
|
|
17
|
+
softwareName: string;
|
|
18
|
+
softwareDescription: string;
|
|
19
|
+
softwareVersion: number;
|
|
20
|
+
softwareDeveloperAccount: string;
|
|
21
|
+
softwareManagerAccount: string | null;
|
|
22
|
+
softwareAccessibility: string;
|
|
23
|
+
softwareStatus: string;
|
|
24
|
+
}
|
|
25
|
+
export interface getAllSubscribedSoftwaresForClientProps {
|
|
26
|
+
accountId?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface getAccessibleSoftwareForUserProps {
|
|
29
|
+
accountId?: string;
|
|
30
|
+
userId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface getMySoftwaresProps {
|
|
33
|
+
accountId?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface getMySoftwaresV2Props {
|
|
36
|
+
accountId?: string;
|
|
37
|
+
onlyActive?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface getAvailableSoftwaresForAccountProps {
|
|
40
|
+
accountId?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface SubscribeSoftwareProps {
|
|
43
|
+
ACCOUNT_ID: string;
|
|
44
|
+
SOFTWARE_ID: string;
|
|
45
|
+
SOFTWARE_NAME: string;
|
|
46
|
+
SOFTWARE_VERSION: number;
|
|
47
|
+
SOFTWARE_DESCRIPTION: string;
|
|
48
|
+
SOFTWARE_OWNER_ID: string;
|
|
49
|
+
SOFTWARE_OWNER_NAME: string;
|
|
50
|
+
SOFTWARE_ACCESSIBILITY: "PUBLIC" | "PRIVATE";
|
|
51
|
+
ACTIVE: boolean;
|
|
52
|
+
PURCHASE_DATE: string;
|
|
53
|
+
EXPIRES_ON: string | null;
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ikoncomponents",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"css": "dist/styles.css",
|
|
@@ -46,17 +46,19 @@
|
|
|
46
46
|
"cmdk": "^1.1.1",
|
|
47
47
|
"countries-list": "^3.1.1",
|
|
48
48
|
"country-flag-icons": "^1.5.21",
|
|
49
|
+
"crypto-js": "^4.2.0",
|
|
49
50
|
"date-fns": "^4.1.0",
|
|
50
51
|
"echarts": "^6.0.0",
|
|
51
52
|
"eslint": "^9",
|
|
52
53
|
"framer-motion": "^12.23.22",
|
|
53
54
|
"input-otp": "^1.4.2",
|
|
54
|
-
"lucide-react": "^0.
|
|
55
|
+
"lucide-react": "^0.552.0",
|
|
55
56
|
"motion": "^12.23.22",
|
|
56
57
|
"next": "16.0.0",
|
|
57
58
|
"next-themes": "^0.4.6",
|
|
58
59
|
"react": "^18.2.0",
|
|
59
60
|
"react-big-calendar": "^1.19.4",
|
|
61
|
+
"react-cropper": "^2.3.3",
|
|
60
62
|
"react-day-picker": "^9.9.0",
|
|
61
63
|
"react-dom": "^18.2.0",
|
|
62
64
|
"react-hook-form": "^7.64.0",
|
|
@@ -64,11 +66,13 @@
|
|
|
64
66
|
"sonner": "^2.0.7",
|
|
65
67
|
"tailwind-merge": "^3.3.1",
|
|
66
68
|
"tailwindcss-animate": "^1.0.7",
|
|
69
|
+
"uuid": "^13.0.0",
|
|
67
70
|
"vaul": "^1.1.2",
|
|
68
71
|
"zxcvbn": "^4.4.2"
|
|
69
72
|
},
|
|
70
73
|
"devDependencies": {
|
|
71
74
|
"@tailwindcss/postcss": "^4",
|
|
75
|
+
"@types/crypto-js": "^4.2.2",
|
|
72
76
|
"@types/node": "^20",
|
|
73
77
|
"@types/react": "^19",
|
|
74
78
|
"@types/react-big-calendar": "^1.16.3",
|