@brivioio/api-server-types 1.0.8
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 +56 -0
- package/dist/admin.types.d.ts +34 -0
- package/dist/admin.types.d.ts.map +1 -0
- package/dist/admin.types.js +1 -0
- package/dist/candidates.types.d.ts +128 -0
- package/dist/candidates.types.d.ts.map +1 -0
- package/dist/candidates.types.js +1 -0
- package/dist/enums.types.d.ts +111 -0
- package/dist/enums.types.d.ts.map +1 -0
- package/dist/enums.types.js +131 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/organizations.types.d.ts +35 -0
- package/dist/organizations.types.d.ts.map +1 -0
- package/dist/organizations.types.js +1 -0
- package/dist/positions.types.d.ts +234 -0
- package/dist/positions.types.d.ts.map +1 -0
- package/dist/positions.types.js +1 -0
- package/dist/utils.types.d.ts +7 -0
- package/dist/utils.types.d.ts.map +1 -0
- package/dist/utils.types.js +1 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @brivioio/api-server-types
|
|
2
|
+
|
|
3
|
+
TypeScript type definitions for Brivio API Server.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @brivioio/api-server-types
|
|
9
|
+
# or
|
|
10
|
+
yarn add @brivioio/api-server-types
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import {
|
|
17
|
+
IPosition,
|
|
18
|
+
ICandidate,
|
|
19
|
+
IOrganization,
|
|
20
|
+
IAdmin,
|
|
21
|
+
AdminPositionsAPITypes,
|
|
22
|
+
CandidatePositionsAPITypes,
|
|
23
|
+
// ... and more
|
|
24
|
+
} from '@brivioio/api-server-types';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Available Types
|
|
28
|
+
|
|
29
|
+
This package includes type definitions for:
|
|
30
|
+
|
|
31
|
+
- **Admin Types**: Admin user interfaces and API types
|
|
32
|
+
- **Candidate Types**: Candidate profiles, authentication, and API types
|
|
33
|
+
- **Organization Types**: Organization data and API types
|
|
34
|
+
- **Position Types**: Job position interfaces and API types
|
|
35
|
+
- **Enums**: All enumerations used across the API
|
|
36
|
+
- **Utils**: Common utility types like `IResponse`
|
|
37
|
+
|
|
38
|
+
## Development
|
|
39
|
+
|
|
40
|
+
To build this package from source:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Install dependencies
|
|
44
|
+
yarn install
|
|
45
|
+
|
|
46
|
+
# Build the package
|
|
47
|
+
yarn build
|
|
48
|
+
|
|
49
|
+
# Publish to npm (requires authentication)
|
|
50
|
+
npm publish
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|
|
56
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IResponse } from './utils.types';
|
|
2
|
+
export interface IAdmin {
|
|
3
|
+
_id: string;
|
|
4
|
+
email: string;
|
|
5
|
+
isEmailVerified: boolean;
|
|
6
|
+
internalTags: {
|
|
7
|
+
key: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}[];
|
|
10
|
+
isDeleted: boolean;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace AdminAPITypes {
|
|
15
|
+
type TLoginRequestBody = {
|
|
16
|
+
email: string;
|
|
17
|
+
};
|
|
18
|
+
type TLoginResponse = IResponse<null>;
|
|
19
|
+
type TVerifyOtpRequestBody = {
|
|
20
|
+
email: string;
|
|
21
|
+
otp: string;
|
|
22
|
+
};
|
|
23
|
+
type TVerifyOtpResponse = IResponse<{
|
|
24
|
+
adminId: string;
|
|
25
|
+
token: string;
|
|
26
|
+
email: string;
|
|
27
|
+
} | null>;
|
|
28
|
+
type TVerifySessionResponse = IResponse<{
|
|
29
|
+
adminId: string;
|
|
30
|
+
email: string;
|
|
31
|
+
} | null>;
|
|
32
|
+
type TLogoutResponse = IResponse<null>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=admin.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.types.d.ts","sourceRoot":"","sources":["../src/admin.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,aAAa,CAAC;IAC7B,KAAY,iBAAiB,GAAG;QAC9B,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAY,cAAc,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC7C,KAAY,qBAAqB,GAAG;QAClC,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,KAAY,kBAAkB,GAAG,SAAS,CAAC;QACzC,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,IAAI,CAAC,CAAC;IACV,KAAY,sBAAsB,GAAG,SAAS,CAAC;QAC7C,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,IAAI,CAAC,CAAC;IACV,KAAY,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { CandidateAuthMode, EducationCredentialType, EducationDegree, EducationDeliveryMode, WorkEmploymentType, CandidateSource, WorkLocationMode } from './enums.types';
|
|
2
|
+
import type { IResponse } from './utils.types';
|
|
3
|
+
export interface ICandidate {
|
|
4
|
+
_id: string;
|
|
5
|
+
email: string;
|
|
6
|
+
authMode: CandidateAuthMode;
|
|
7
|
+
candidateSource: CandidateSource;
|
|
8
|
+
isEmailVerified: boolean;
|
|
9
|
+
baseProfile?: {
|
|
10
|
+
isProfileComplete?: boolean;
|
|
11
|
+
firstName?: string;
|
|
12
|
+
lastName?: string;
|
|
13
|
+
phone?: {
|
|
14
|
+
countryCode?: number;
|
|
15
|
+
phoneNumber?: number;
|
|
16
|
+
};
|
|
17
|
+
urls?: {
|
|
18
|
+
linkedin?: string;
|
|
19
|
+
github?: string;
|
|
20
|
+
codechef?: string;
|
|
21
|
+
leetcode?: string;
|
|
22
|
+
codeforces?: string;
|
|
23
|
+
portfolio?: string;
|
|
24
|
+
blog?: string;
|
|
25
|
+
others: string[];
|
|
26
|
+
};
|
|
27
|
+
currentLocation?: {
|
|
28
|
+
city?: string;
|
|
29
|
+
state?: string;
|
|
30
|
+
};
|
|
31
|
+
preferredLocation?: {
|
|
32
|
+
city?: string;
|
|
33
|
+
state?: string;
|
|
34
|
+
};
|
|
35
|
+
currentCashCompInLPA?: number;
|
|
36
|
+
expectedCashCompInLPA?: number;
|
|
37
|
+
noticePeriodInDays?: number;
|
|
38
|
+
skills: string[];
|
|
39
|
+
teamLeadExperienceInYears?: number;
|
|
40
|
+
workExperience: {
|
|
41
|
+
organizationName?: string;
|
|
42
|
+
roleTitle?: string;
|
|
43
|
+
employmentType?: WorkEmploymentType;
|
|
44
|
+
employmentTypeOther?: string;
|
|
45
|
+
locationMode?: WorkLocationMode;
|
|
46
|
+
location?: {
|
|
47
|
+
city?: string;
|
|
48
|
+
state?: string;
|
|
49
|
+
};
|
|
50
|
+
startDate?: {
|
|
51
|
+
month?: number;
|
|
52
|
+
year?: number;
|
|
53
|
+
};
|
|
54
|
+
endDate?: {
|
|
55
|
+
month?: number;
|
|
56
|
+
year?: number;
|
|
57
|
+
isOngoing?: boolean;
|
|
58
|
+
};
|
|
59
|
+
description?: string;
|
|
60
|
+
skills?: string[];
|
|
61
|
+
}[];
|
|
62
|
+
education: {
|
|
63
|
+
instituteName?: string;
|
|
64
|
+
startDate?: {
|
|
65
|
+
month?: number;
|
|
66
|
+
year?: number;
|
|
67
|
+
};
|
|
68
|
+
endDate?: {
|
|
69
|
+
month?: number;
|
|
70
|
+
year?: number;
|
|
71
|
+
};
|
|
72
|
+
courseName?: string;
|
|
73
|
+
educationDeliveryMode?: EducationDeliveryMode;
|
|
74
|
+
credentialType?: EducationCredentialType;
|
|
75
|
+
credentialTypeOther?: string;
|
|
76
|
+
degree?: EducationDegree;
|
|
77
|
+
degreeOther?: string;
|
|
78
|
+
}[];
|
|
79
|
+
otherWorks: {
|
|
80
|
+
title?: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
}[];
|
|
83
|
+
createdAt?: string;
|
|
84
|
+
updatedAt?: string;
|
|
85
|
+
};
|
|
86
|
+
cv?: {
|
|
87
|
+
assetId?: string;
|
|
88
|
+
unformattedText?: string;
|
|
89
|
+
markdownFormattedText?: string;
|
|
90
|
+
createdAt?: string;
|
|
91
|
+
updatedAt?: string;
|
|
92
|
+
};
|
|
93
|
+
internalTags: {
|
|
94
|
+
key: string;
|
|
95
|
+
value: string;
|
|
96
|
+
}[];
|
|
97
|
+
isDeleted: boolean;
|
|
98
|
+
createdAt: string;
|
|
99
|
+
updatedAt: string;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace CandidatesAPITypes {
|
|
102
|
+
type TLoginRequestBody = {
|
|
103
|
+
email: string;
|
|
104
|
+
};
|
|
105
|
+
type TLoginResponse = IResponse<null>;
|
|
106
|
+
type TVerifyOtpRequestBody = {
|
|
107
|
+
email: string;
|
|
108
|
+
otp: string;
|
|
109
|
+
};
|
|
110
|
+
type TVerifyOtpResponse = IResponse<{
|
|
111
|
+
token: string;
|
|
112
|
+
email: string;
|
|
113
|
+
candidateId: string;
|
|
114
|
+
} | null>;
|
|
115
|
+
type TUploadCVRequestBody = {
|
|
116
|
+
cvBase64: string;
|
|
117
|
+
};
|
|
118
|
+
type TUploadCVResponse = IResponse<null>;
|
|
119
|
+
type TGetCandidateBaseProfileResponse = IResponse<ICandidate['baseProfile'] | null>;
|
|
120
|
+
type TUpdateCandidateBaseProfileRequestBody = Omit<NonNullable<ICandidate['baseProfile']>, 'createdAt' | 'updatedAt' | 'isProfileComplete'>;
|
|
121
|
+
type TUpdateCandidateBaseProfileResponse = IResponse<null>;
|
|
122
|
+
type TVerifySessionResponse = IResponse<{
|
|
123
|
+
email: string;
|
|
124
|
+
candidateId: string;
|
|
125
|
+
} | null>;
|
|
126
|
+
type TLogoutResponse = IResponse<null>;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=candidates.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidates.types.d.ts","sourceRoot":"","sources":["../src/candidates.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE;QAEZ,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB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 @@
|
|
|
1
|
+
export declare enum StorageProvider {
|
|
2
|
+
S3 = "s3"
|
|
3
|
+
}
|
|
4
|
+
export declare enum AssetType {
|
|
5
|
+
ORGANIZATION_LOGO = "organizationLogo",
|
|
6
|
+
CANDIDATE_CV = "candidateCV"
|
|
7
|
+
}
|
|
8
|
+
export declare enum AssetOwnerModel {
|
|
9
|
+
ORGANIZATIONS = "organizations",
|
|
10
|
+
CANDIDATES = "candidates"
|
|
11
|
+
}
|
|
12
|
+
export declare enum AssetVisibility {
|
|
13
|
+
PUBLIC = "public",
|
|
14
|
+
PRIVATE = "private"
|
|
15
|
+
}
|
|
16
|
+
export declare enum LocationMode {
|
|
17
|
+
ONSITE = "onsite",
|
|
18
|
+
REMOTE = "remote",
|
|
19
|
+
HYBRID = "hybrid"
|
|
20
|
+
}
|
|
21
|
+
export declare enum EmploymentType {
|
|
22
|
+
FULLTIME = "fulltime",
|
|
23
|
+
INTERNSHIP = "internship",
|
|
24
|
+
CONTRACT = "contract",
|
|
25
|
+
FREELANCE = "freelance",
|
|
26
|
+
OTHER = "other"
|
|
27
|
+
}
|
|
28
|
+
export declare enum PositionQuestionType {
|
|
29
|
+
TEXT = "text",
|
|
30
|
+
MCQ = "mcq",
|
|
31
|
+
NUMBER = "number"
|
|
32
|
+
}
|
|
33
|
+
export declare enum TextQuestionType {
|
|
34
|
+
SHORT_ANSWER = "shortAnswer",
|
|
35
|
+
LONG_ANSWER = "longAnswer"
|
|
36
|
+
}
|
|
37
|
+
export declare enum McqQuestionType {
|
|
38
|
+
SINGLE_SELECT = "singleSelect",
|
|
39
|
+
MULTI_SELECT = "multiSelect"
|
|
40
|
+
}
|
|
41
|
+
export declare enum PositionListType {
|
|
42
|
+
NEW = "new",
|
|
43
|
+
USER_CREATED = "userCreated",
|
|
44
|
+
AI_CREATED = "aiCreated"
|
|
45
|
+
}
|
|
46
|
+
export declare enum CandidateAuthMode {
|
|
47
|
+
EMAIL_OTP = "emailOtp"
|
|
48
|
+
}
|
|
49
|
+
export declare enum EmailType {
|
|
50
|
+
CANDIDATE_LOGIN_OTP = "candidateLoginOtp",
|
|
51
|
+
ADMIN_LOGIN_OTP = "adminLoginOtp"
|
|
52
|
+
}
|
|
53
|
+
export declare enum EmailDeliveryStatus {
|
|
54
|
+
SENT = "sent",
|
|
55
|
+
DELIVERED = "delivered"
|
|
56
|
+
}
|
|
57
|
+
export declare enum EmailDeliveryProvider {
|
|
58
|
+
RESEND = "resend"
|
|
59
|
+
}
|
|
60
|
+
export declare enum WorkEmploymentType {
|
|
61
|
+
FULLTIME = "fulltime",
|
|
62
|
+
INTERNSHIP = "internship",
|
|
63
|
+
CONTRACT = "contract",
|
|
64
|
+
FREELANCE = "freelance",
|
|
65
|
+
OTHER = "other"
|
|
66
|
+
}
|
|
67
|
+
export declare enum WorkLocationMode {
|
|
68
|
+
ONSITE = "onsite",
|
|
69
|
+
HYBRID = "hybrid",
|
|
70
|
+
REMOTE = "remote"
|
|
71
|
+
}
|
|
72
|
+
export declare enum EducationDeliveryMode {
|
|
73
|
+
OFFLINE = "offline",
|
|
74
|
+
ONLINE = "online"
|
|
75
|
+
}
|
|
76
|
+
export declare enum EducationCredentialType {
|
|
77
|
+
MAJOR = "major",
|
|
78
|
+
MINOR = "minor",
|
|
79
|
+
DIPLOMA = "diploma",
|
|
80
|
+
CERTIFICATE = "certificate",
|
|
81
|
+
OTHER = "other"
|
|
82
|
+
}
|
|
83
|
+
export declare enum EducationDegree {
|
|
84
|
+
BE = "BE",
|
|
85
|
+
BTECH = "BTech",
|
|
86
|
+
BSC = "BSc",
|
|
87
|
+
BS = "BS",
|
|
88
|
+
BA = "BA",
|
|
89
|
+
MA = "MA",
|
|
90
|
+
MS = "MS",
|
|
91
|
+
ME = "ME",
|
|
92
|
+
MTECH = "MTech",
|
|
93
|
+
MSC = "MSc",
|
|
94
|
+
PHD = "PhD",
|
|
95
|
+
POSTDOC = "PostDoc",
|
|
96
|
+
BCA = "BCA",
|
|
97
|
+
MCA = "MCA",
|
|
98
|
+
BDESIGN = "BDes",
|
|
99
|
+
BARC = "BArc",
|
|
100
|
+
OTHER = "other"
|
|
101
|
+
}
|
|
102
|
+
export declare enum UserRole {
|
|
103
|
+
CANDIDATE = "candidate",
|
|
104
|
+
ADMIN = "admin"
|
|
105
|
+
}
|
|
106
|
+
export declare enum CandidateSource {
|
|
107
|
+
DEFAULT = "default",// job listings, inbound, etc.
|
|
108
|
+
REFERRAL = "referral",// referred by a friend
|
|
109
|
+
ADMIN = "admin"
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=enums.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.types.d.ts","sourceRoot":"","sources":["../src/enums.types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,EAAE,OAAO;CACV;AAED,oBAAY,SAAS;IACnB,iBAAiB,qBAAqB;IACtC,YAAY,gBAAgB;CAC7B;AAED,oBAAY,eAAe;IACzB,aAAa,kBAAkB;IAC/B,UAAU,eAAe;CAC1B;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,KAAK,UAAU;CAChB;AAED,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,oBAAY,gBAAgB;IAC1B,YAAY,gBAAgB;IAC5B,WAAW,eAAe;CAC3B;AAED,oBAAY,eAAe;IACzB,aAAa,iBAAiB;IAC9B,YAAY,gBAAgB;CAC7B;AAED,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,YAAY,gBAAgB;IAC5B,UAAU,cAAc;CACzB;AAED,oBAAY,iBAAiB;IAC3B,SAAS,aAAa;CACvB;AAED,oBAAY,SAAS;IACnB,mBAAmB,sBAAsB;IACzC,eAAe,kBAAkB;CAClC;AAED,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,SAAS,cAAc;CACxB;AAED,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;CAClB;AAED,oBAAY,kBAAkB;IAC5B,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,KAAK,UAAU;CAChB;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,qBAAqB;IAC/B,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,oBAAY,uBAAuB;IACjC,KAAK,UAAU;IACf,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;CAChB;AAED,oBAAY,eAAe;IACzB,EAAE,OAAO;IACT,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,OAAO,SAAS;IAChB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,QAAQ;IAClB,SAAS,cAAc;IACvB,KAAK,UAAU;CAChB;AAED,oBAAY,eAAe;IACzB,OAAO,YAAY,CAAE,8BAA8B;IACnD,QAAQ,aAAa,CAAE,uBAAuB;IAC9C,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export var StorageProvider;
|
|
2
|
+
(function (StorageProvider) {
|
|
3
|
+
StorageProvider["S3"] = "s3";
|
|
4
|
+
})(StorageProvider || (StorageProvider = {}));
|
|
5
|
+
export var AssetType;
|
|
6
|
+
(function (AssetType) {
|
|
7
|
+
AssetType["ORGANIZATION_LOGO"] = "organizationLogo";
|
|
8
|
+
AssetType["CANDIDATE_CV"] = "candidateCV";
|
|
9
|
+
})(AssetType || (AssetType = {}));
|
|
10
|
+
export var AssetOwnerModel;
|
|
11
|
+
(function (AssetOwnerModel) {
|
|
12
|
+
AssetOwnerModel["ORGANIZATIONS"] = "organizations";
|
|
13
|
+
AssetOwnerModel["CANDIDATES"] = "candidates";
|
|
14
|
+
})(AssetOwnerModel || (AssetOwnerModel = {}));
|
|
15
|
+
export var AssetVisibility;
|
|
16
|
+
(function (AssetVisibility) {
|
|
17
|
+
AssetVisibility["PUBLIC"] = "public";
|
|
18
|
+
AssetVisibility["PRIVATE"] = "private";
|
|
19
|
+
})(AssetVisibility || (AssetVisibility = {}));
|
|
20
|
+
export var LocationMode;
|
|
21
|
+
(function (LocationMode) {
|
|
22
|
+
LocationMode["ONSITE"] = "onsite";
|
|
23
|
+
LocationMode["REMOTE"] = "remote";
|
|
24
|
+
LocationMode["HYBRID"] = "hybrid";
|
|
25
|
+
})(LocationMode || (LocationMode = {}));
|
|
26
|
+
export var EmploymentType;
|
|
27
|
+
(function (EmploymentType) {
|
|
28
|
+
EmploymentType["FULLTIME"] = "fulltime";
|
|
29
|
+
EmploymentType["INTERNSHIP"] = "internship";
|
|
30
|
+
EmploymentType["CONTRACT"] = "contract";
|
|
31
|
+
EmploymentType["FREELANCE"] = "freelance";
|
|
32
|
+
EmploymentType["OTHER"] = "other";
|
|
33
|
+
})(EmploymentType || (EmploymentType = {}));
|
|
34
|
+
export var PositionQuestionType;
|
|
35
|
+
(function (PositionQuestionType) {
|
|
36
|
+
PositionQuestionType["TEXT"] = "text";
|
|
37
|
+
PositionQuestionType["MCQ"] = "mcq";
|
|
38
|
+
PositionQuestionType["NUMBER"] = "number";
|
|
39
|
+
})(PositionQuestionType || (PositionQuestionType = {}));
|
|
40
|
+
export var TextQuestionType;
|
|
41
|
+
(function (TextQuestionType) {
|
|
42
|
+
TextQuestionType["SHORT_ANSWER"] = "shortAnswer";
|
|
43
|
+
TextQuestionType["LONG_ANSWER"] = "longAnswer";
|
|
44
|
+
})(TextQuestionType || (TextQuestionType = {}));
|
|
45
|
+
export var McqQuestionType;
|
|
46
|
+
(function (McqQuestionType) {
|
|
47
|
+
McqQuestionType["SINGLE_SELECT"] = "singleSelect";
|
|
48
|
+
McqQuestionType["MULTI_SELECT"] = "multiSelect";
|
|
49
|
+
})(McqQuestionType || (McqQuestionType = {}));
|
|
50
|
+
export var PositionListType;
|
|
51
|
+
(function (PositionListType) {
|
|
52
|
+
PositionListType["NEW"] = "new";
|
|
53
|
+
PositionListType["USER_CREATED"] = "userCreated";
|
|
54
|
+
PositionListType["AI_CREATED"] = "aiCreated";
|
|
55
|
+
})(PositionListType || (PositionListType = {}));
|
|
56
|
+
export var CandidateAuthMode;
|
|
57
|
+
(function (CandidateAuthMode) {
|
|
58
|
+
CandidateAuthMode["EMAIL_OTP"] = "emailOtp";
|
|
59
|
+
})(CandidateAuthMode || (CandidateAuthMode = {}));
|
|
60
|
+
export var EmailType;
|
|
61
|
+
(function (EmailType) {
|
|
62
|
+
EmailType["CANDIDATE_LOGIN_OTP"] = "candidateLoginOtp";
|
|
63
|
+
EmailType["ADMIN_LOGIN_OTP"] = "adminLoginOtp";
|
|
64
|
+
})(EmailType || (EmailType = {}));
|
|
65
|
+
export var EmailDeliveryStatus;
|
|
66
|
+
(function (EmailDeliveryStatus) {
|
|
67
|
+
EmailDeliveryStatus["SENT"] = "sent";
|
|
68
|
+
EmailDeliveryStatus["DELIVERED"] = "delivered";
|
|
69
|
+
})(EmailDeliveryStatus || (EmailDeliveryStatus = {}));
|
|
70
|
+
export var EmailDeliveryProvider;
|
|
71
|
+
(function (EmailDeliveryProvider) {
|
|
72
|
+
EmailDeliveryProvider["RESEND"] = "resend";
|
|
73
|
+
})(EmailDeliveryProvider || (EmailDeliveryProvider = {}));
|
|
74
|
+
export var WorkEmploymentType;
|
|
75
|
+
(function (WorkEmploymentType) {
|
|
76
|
+
WorkEmploymentType["FULLTIME"] = "fulltime";
|
|
77
|
+
WorkEmploymentType["INTERNSHIP"] = "internship";
|
|
78
|
+
WorkEmploymentType["CONTRACT"] = "contract";
|
|
79
|
+
WorkEmploymentType["FREELANCE"] = "freelance";
|
|
80
|
+
WorkEmploymentType["OTHER"] = "other";
|
|
81
|
+
})(WorkEmploymentType || (WorkEmploymentType = {}));
|
|
82
|
+
export var WorkLocationMode;
|
|
83
|
+
(function (WorkLocationMode) {
|
|
84
|
+
WorkLocationMode["ONSITE"] = "onsite";
|
|
85
|
+
WorkLocationMode["HYBRID"] = "hybrid";
|
|
86
|
+
WorkLocationMode["REMOTE"] = "remote";
|
|
87
|
+
})(WorkLocationMode || (WorkLocationMode = {}));
|
|
88
|
+
export var EducationDeliveryMode;
|
|
89
|
+
(function (EducationDeliveryMode) {
|
|
90
|
+
EducationDeliveryMode["OFFLINE"] = "offline";
|
|
91
|
+
EducationDeliveryMode["ONLINE"] = "online";
|
|
92
|
+
})(EducationDeliveryMode || (EducationDeliveryMode = {}));
|
|
93
|
+
export var EducationCredentialType;
|
|
94
|
+
(function (EducationCredentialType) {
|
|
95
|
+
EducationCredentialType["MAJOR"] = "major";
|
|
96
|
+
EducationCredentialType["MINOR"] = "minor";
|
|
97
|
+
EducationCredentialType["DIPLOMA"] = "diploma";
|
|
98
|
+
EducationCredentialType["CERTIFICATE"] = "certificate";
|
|
99
|
+
EducationCredentialType["OTHER"] = "other";
|
|
100
|
+
})(EducationCredentialType || (EducationCredentialType = {}));
|
|
101
|
+
export var EducationDegree;
|
|
102
|
+
(function (EducationDegree) {
|
|
103
|
+
EducationDegree["BE"] = "BE";
|
|
104
|
+
EducationDegree["BTECH"] = "BTech";
|
|
105
|
+
EducationDegree["BSC"] = "BSc";
|
|
106
|
+
EducationDegree["BS"] = "BS";
|
|
107
|
+
EducationDegree["BA"] = "BA";
|
|
108
|
+
EducationDegree["MA"] = "MA";
|
|
109
|
+
EducationDegree["MS"] = "MS";
|
|
110
|
+
EducationDegree["ME"] = "ME";
|
|
111
|
+
EducationDegree["MTECH"] = "MTech";
|
|
112
|
+
EducationDegree["MSC"] = "MSc";
|
|
113
|
+
EducationDegree["PHD"] = "PhD";
|
|
114
|
+
EducationDegree["POSTDOC"] = "PostDoc";
|
|
115
|
+
EducationDegree["BCA"] = "BCA";
|
|
116
|
+
EducationDegree["MCA"] = "MCA";
|
|
117
|
+
EducationDegree["BDESIGN"] = "BDes";
|
|
118
|
+
EducationDegree["BARC"] = "BArc";
|
|
119
|
+
EducationDegree["OTHER"] = "other";
|
|
120
|
+
})(EducationDegree || (EducationDegree = {}));
|
|
121
|
+
export var UserRole;
|
|
122
|
+
(function (UserRole) {
|
|
123
|
+
UserRole["CANDIDATE"] = "candidate";
|
|
124
|
+
UserRole["ADMIN"] = "admin";
|
|
125
|
+
})(UserRole || (UserRole = {}));
|
|
126
|
+
export var CandidateSource;
|
|
127
|
+
(function (CandidateSource) {
|
|
128
|
+
CandidateSource["DEFAULT"] = "default";
|
|
129
|
+
CandidateSource["REFERRAL"] = "referral";
|
|
130
|
+
CandidateSource["ADMIN"] = "admin";
|
|
131
|
+
})(CandidateSource || (CandidateSource = {}));
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IResponse } from './utils.types';
|
|
2
|
+
export interface IOrganization {
|
|
3
|
+
_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
about: string;
|
|
6
|
+
logoAssetId: string;
|
|
7
|
+
urls: {
|
|
8
|
+
website: string;
|
|
9
|
+
others: string[];
|
|
10
|
+
};
|
|
11
|
+
internalTags: {
|
|
12
|
+
key: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
isDeleted: boolean;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
export type TOrganizationWithLogoUrl = IOrganization & {
|
|
20
|
+
logoUrl: string | null;
|
|
21
|
+
};
|
|
22
|
+
export declare namespace AdminOrganizationsAPITypes {
|
|
23
|
+
type TCreateOrganizationRequestBody = {
|
|
24
|
+
name: string;
|
|
25
|
+
about: string;
|
|
26
|
+
logoBase64: string;
|
|
27
|
+
urls: {
|
|
28
|
+
website: string;
|
|
29
|
+
others: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type TCreateOrganizationResponse = IResponse<null>;
|
|
33
|
+
type TGetAllOrganizationsResponse = IResponse<TOrganizationWithLogoUrl[] | null>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=organizations.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.types.d.ts","sourceRoot":"","sources":["../src/organizations.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;IACF,YAAY,EAAE;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG;IACrD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,yBAAiB,0BAA0B,CAAC;IAC1C,KAAY,8BAA8B,GAAG;QAC3C,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAC;YAChB,MAAM,EAAE,MAAM,EAAE,CAAC;SAClB,CAAC;KACH,CAAC;IACF,KAAY,2BAA2B,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC1D,KAAY,4BAA4B,GAAG,SAAS,CAAC,wBAAwB,EAAE,GAAG,IAAI,CAAC,CAAC;CACzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import type { EmploymentType, LocationMode, McqQuestionType, PositionListType, PositionQuestionType, TextQuestionType } from './enums.types';
|
|
2
|
+
import type { IOrganization } from './organizations.types';
|
|
3
|
+
import type { IResponse } from './utils.types';
|
|
4
|
+
export interface IPosition {
|
|
5
|
+
_id: string;
|
|
6
|
+
organizationId: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
slugs: {
|
|
10
|
+
short: string;
|
|
11
|
+
long: string;
|
|
12
|
+
};
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
isPublished: boolean;
|
|
15
|
+
jobDescription: {
|
|
16
|
+
requiredExperience: string;
|
|
17
|
+
locationMode: LocationMode;
|
|
18
|
+
location: string;
|
|
19
|
+
datePosted: string;
|
|
20
|
+
skills: string[];
|
|
21
|
+
tags: string[];
|
|
22
|
+
jdMarkdown: string;
|
|
23
|
+
employmentType: EmploymentType;
|
|
24
|
+
employmentTypeOther?: string;
|
|
25
|
+
salary: string;
|
|
26
|
+
};
|
|
27
|
+
questions: {
|
|
28
|
+
id: string;
|
|
29
|
+
type: PositionQuestionType;
|
|
30
|
+
order: number;
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
isRequired: boolean;
|
|
34
|
+
textConfig?: {
|
|
35
|
+
type: TextQuestionType;
|
|
36
|
+
minCharacters?: number;
|
|
37
|
+
maxCharacters?: number;
|
|
38
|
+
validationFailErrorMessage?: string;
|
|
39
|
+
};
|
|
40
|
+
mcqConfig?: {
|
|
41
|
+
options: string[];
|
|
42
|
+
type: McqQuestionType;
|
|
43
|
+
};
|
|
44
|
+
numberConfig?: {
|
|
45
|
+
minValue?: number;
|
|
46
|
+
maxValue?: number;
|
|
47
|
+
validationFailErrorMessage?: string;
|
|
48
|
+
};
|
|
49
|
+
isDeleted: boolean;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
updatedAt: string;
|
|
52
|
+
}[];
|
|
53
|
+
lists: {
|
|
54
|
+
id: string;
|
|
55
|
+
order: number;
|
|
56
|
+
title: string;
|
|
57
|
+
description: string;
|
|
58
|
+
isDeleted: boolean;
|
|
59
|
+
type: PositionListType;
|
|
60
|
+
createdAt: string;
|
|
61
|
+
updatedAt: string;
|
|
62
|
+
}[];
|
|
63
|
+
internalTags: {
|
|
64
|
+
key: string;
|
|
65
|
+
value: string;
|
|
66
|
+
}[];
|
|
67
|
+
isDeleted: boolean;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
updatedAt: string;
|
|
70
|
+
}
|
|
71
|
+
export type TPositionWithOrganization = Omit<IPosition, 'organizationId'> & {
|
|
72
|
+
organization: IOrganization & {
|
|
73
|
+
logoUrl: string | null;
|
|
74
|
+
};
|
|
75
|
+
totalApplications: number;
|
|
76
|
+
};
|
|
77
|
+
export declare namespace AdminPositionsAPITypes {
|
|
78
|
+
type TGetAllPositionsResponse = IResponse<TPositionWithOrganization[] | null>;
|
|
79
|
+
type TGetPositionByIdResponse = IResponse<TPositionWithOrganization | null>;
|
|
80
|
+
type TCreatePositionRequestBody = {
|
|
81
|
+
organizationId: string;
|
|
82
|
+
title: string;
|
|
83
|
+
description: string;
|
|
84
|
+
slugs: {
|
|
85
|
+
short: string;
|
|
86
|
+
long: string;
|
|
87
|
+
};
|
|
88
|
+
isOpen: boolean;
|
|
89
|
+
isPublished: boolean;
|
|
90
|
+
jobDescription: {
|
|
91
|
+
requiredExperience: string;
|
|
92
|
+
locationMode: string;
|
|
93
|
+
location: string;
|
|
94
|
+
datePosted: string;
|
|
95
|
+
skills: string[];
|
|
96
|
+
tags: string[];
|
|
97
|
+
jdMarkdown: string;
|
|
98
|
+
employmentType: string;
|
|
99
|
+
employmentTypeOther?: string;
|
|
100
|
+
salary: string;
|
|
101
|
+
};
|
|
102
|
+
questions: {
|
|
103
|
+
type: PositionQuestionType;
|
|
104
|
+
order: number;
|
|
105
|
+
title: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
isRequired: boolean;
|
|
108
|
+
textConfig?: {
|
|
109
|
+
type: TextQuestionType;
|
|
110
|
+
minCharacters?: number;
|
|
111
|
+
maxCharacters?: number;
|
|
112
|
+
validationFailErrorMessage?: string;
|
|
113
|
+
};
|
|
114
|
+
mcqConfig?: {
|
|
115
|
+
options: string[];
|
|
116
|
+
type: McqQuestionType;
|
|
117
|
+
};
|
|
118
|
+
numberConfig?: {
|
|
119
|
+
minValue?: number;
|
|
120
|
+
maxValue?: number;
|
|
121
|
+
validationFailErrorMessage?: string;
|
|
122
|
+
};
|
|
123
|
+
}[];
|
|
124
|
+
};
|
|
125
|
+
type TCreatePositionResponse = IResponse<{
|
|
126
|
+
positionId: string;
|
|
127
|
+
} | null>;
|
|
128
|
+
type TEditPositionRequestBody = {
|
|
129
|
+
organizationId: string;
|
|
130
|
+
title: string;
|
|
131
|
+
description: string;
|
|
132
|
+
slugs: {
|
|
133
|
+
short: string;
|
|
134
|
+
long: string;
|
|
135
|
+
};
|
|
136
|
+
isOpen: boolean;
|
|
137
|
+
isPublished: boolean;
|
|
138
|
+
jobDescription: {
|
|
139
|
+
requiredExperience: string;
|
|
140
|
+
locationMode: string;
|
|
141
|
+
location: string;
|
|
142
|
+
datePosted: string;
|
|
143
|
+
skills: string[];
|
|
144
|
+
tags: string[];
|
|
145
|
+
jdMarkdown: string;
|
|
146
|
+
employmentType: string;
|
|
147
|
+
employmentTypeOther?: string;
|
|
148
|
+
salary: string;
|
|
149
|
+
};
|
|
150
|
+
questions: {
|
|
151
|
+
id: string;
|
|
152
|
+
type: PositionQuestionType;
|
|
153
|
+
order: number;
|
|
154
|
+
title: string;
|
|
155
|
+
description?: string;
|
|
156
|
+
isRequired: boolean;
|
|
157
|
+
textConfig?: {
|
|
158
|
+
type: TextQuestionType;
|
|
159
|
+
minCharacters?: number;
|
|
160
|
+
maxCharacters?: number;
|
|
161
|
+
validationFailErrorMessage?: string;
|
|
162
|
+
};
|
|
163
|
+
mcqConfig?: {
|
|
164
|
+
options: string[];
|
|
165
|
+
type: McqQuestionType;
|
|
166
|
+
};
|
|
167
|
+
numberConfig?: {
|
|
168
|
+
minValue?: number;
|
|
169
|
+
maxValue?: number;
|
|
170
|
+
validationFailErrorMessage?: string;
|
|
171
|
+
};
|
|
172
|
+
isDeleted: boolean;
|
|
173
|
+
}[];
|
|
174
|
+
};
|
|
175
|
+
type TEditPositionResponse = IResponse<{
|
|
176
|
+
positionId: string;
|
|
177
|
+
} | null>;
|
|
178
|
+
type TDeletePositionResponse = IResponse<{
|
|
179
|
+
positionId: string;
|
|
180
|
+
} | null>;
|
|
181
|
+
type TDuplicatePositionResponse = IResponse<{
|
|
182
|
+
positionId: string;
|
|
183
|
+
} | null>;
|
|
184
|
+
}
|
|
185
|
+
export interface IPositionDetailsForCandidate {
|
|
186
|
+
_id: string;
|
|
187
|
+
title: string;
|
|
188
|
+
description: string;
|
|
189
|
+
slugs: {
|
|
190
|
+
short: string;
|
|
191
|
+
long: string;
|
|
192
|
+
};
|
|
193
|
+
isOpen: boolean;
|
|
194
|
+
isPublished: boolean;
|
|
195
|
+
organization: {
|
|
196
|
+
name: string;
|
|
197
|
+
logoUrl: string | null;
|
|
198
|
+
about: string;
|
|
199
|
+
urls: {
|
|
200
|
+
website: string;
|
|
201
|
+
others: string[];
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
jobDescription: {
|
|
205
|
+
requiredExperience: string;
|
|
206
|
+
locationMode: LocationMode;
|
|
207
|
+
location: string;
|
|
208
|
+
datePosted: string;
|
|
209
|
+
skills: string[];
|
|
210
|
+
tags: string[];
|
|
211
|
+
jdMarkdown: string;
|
|
212
|
+
employmentType: EmploymentType;
|
|
213
|
+
employmentTypeOther?: string;
|
|
214
|
+
salary: string;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
export declare namespace CandidatePositionsAPITypes {
|
|
218
|
+
type TGetPositionBySlugResponse = IResponse<IPositionDetailsForCandidate | null>;
|
|
219
|
+
type TGetPositionApplicationStatusResponse = IResponse<null>;
|
|
220
|
+
type TGetPositionApplicationQuestionsResponse = IResponse<Omit<IPosition['questions'][number], 'isDeleted'>[] | null>;
|
|
221
|
+
type TSubmitPositionApplicationRequestBody = {
|
|
222
|
+
questionsAndAnswers: {
|
|
223
|
+
questionId: string;
|
|
224
|
+
answer: {
|
|
225
|
+
text?: string;
|
|
226
|
+
mcq?: string[];
|
|
227
|
+
number?: number;
|
|
228
|
+
};
|
|
229
|
+
questionUpdatedAtEpochMS: number;
|
|
230
|
+
}[];
|
|
231
|
+
};
|
|
232
|
+
type TSubmitPositionApplicationResponse = IResponse<null>;
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=positions.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positions.types.d.ts","sourceRoot":"","sources":["../src/positions.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,K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0B,CAAC;IAC1C,KAAY,0BAA0B,GAAG,SAAS,CAAC,4BAA4B,GAAG,IAAI,CAAC,CAAC;IACxF,KAAY,qCAAqC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IACpE,KAAY,wCAAwC,GAAG,SAAS,CAC9D,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,EAAE,GAAG,IAAI,CAC3D,CAAC;IACF,KAAY,qCAAqC,GAAG;QAClD,mBAAmB,EAAE;YACnB,UAAU,EAAE,MAAM,CAAC;YACnB,MAAM,EAAE;gBACN,IAAI,CAAC,EAAE,MAAM,CAAC;gBACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;gBACf,MAAM,CAAC,EAAE,MAAM,CAAC;aACjB,CAAC;YACF,wBAAwB,EAAE,MAAM,CAAC;SAClC,EAAE,CAAC;KACL,CAAC;IACF,KAAY,kCAAkC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;CAClE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.types.d.ts","sourceRoot":"","sources":["../src/utils.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,CAAC,CAAC;CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@brivioio/api-server-types",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "TypeScript type definitions for Brivio API Server",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"clean": "rm -rf dist src",
|
|
13
|
+
"build:process": "tsx build.ts",
|
|
14
|
+
"build:compile": "tsc",
|
|
15
|
+
"build": "yarn clean && yarn build:process && yarn build:compile",
|
|
16
|
+
"prepublishOnly": "yarn build",
|
|
17
|
+
"publish:interactive": "zsh ./scripts/publish.sh",
|
|
18
|
+
"publish:quick": "zsh ./scripts/update-and-publish.sh"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"typescript",
|
|
22
|
+
"types",
|
|
23
|
+
"brivio",
|
|
24
|
+
"api-server"
|
|
25
|
+
],
|
|
26
|
+
"author": "Brivio",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^25.0.3",
|
|
30
|
+
"tsx": "^4.7.0",
|
|
31
|
+
"typescript": "^5.3.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
}
|
|
36
|
+
}
|