@prodigio-io/sdk 2.1.1 → 2.1.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/index.d.mts +123 -0
- package/dist/index.d.ts +123 -0
- package/package.json +12 -3
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
interface ProdigioConfig {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
}
|
|
5
|
+
interface ProdigioInitConfig {
|
|
6
|
+
key: string;
|
|
7
|
+
badgeToken?: string;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
badge?: {
|
|
10
|
+
position?: 'bottom-right' | 'bottom-left';
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface SalaryRange {
|
|
14
|
+
min: number;
|
|
15
|
+
max: number;
|
|
16
|
+
currency: string;
|
|
17
|
+
period: 'monthly' | 'yearly';
|
|
18
|
+
}
|
|
19
|
+
interface PoweredBy {
|
|
20
|
+
text: string;
|
|
21
|
+
url: string;
|
|
22
|
+
}
|
|
23
|
+
interface Job {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
companyName: string;
|
|
27
|
+
department: string;
|
|
28
|
+
location: string;
|
|
29
|
+
type: 'full-time' | 'part-time' | 'contract';
|
|
30
|
+
status: 'active' | 'closed' | 'archived' | 'draft';
|
|
31
|
+
description: string;
|
|
32
|
+
requirements: string;
|
|
33
|
+
eligibilityCriteria?: string;
|
|
34
|
+
salaryRange: SalaryRange | null;
|
|
35
|
+
applicationDeadline: string | null;
|
|
36
|
+
/** ISO 8601 date string e.g. "2026-04-01T09:00:00.000Z" — use new Date(createdAt) to convert */
|
|
37
|
+
createdAt: string;
|
|
38
|
+
/** ISO 8601 date string e.g. "2026-04-01T09:00:00.000Z" — use new Date(updatedAt) to convert */
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
poweredBy: PoweredBy;
|
|
41
|
+
}
|
|
42
|
+
interface Applicant {
|
|
43
|
+
fullName: string;
|
|
44
|
+
email: string;
|
|
45
|
+
phone: string;
|
|
46
|
+
location?: string;
|
|
47
|
+
linkedin?: string;
|
|
48
|
+
}
|
|
49
|
+
interface CVInfo {
|
|
50
|
+
url: string;
|
|
51
|
+
fileName: string;
|
|
52
|
+
fileSize: number;
|
|
53
|
+
mimeType: string;
|
|
54
|
+
path?: string;
|
|
55
|
+
}
|
|
56
|
+
interface Achievement {
|
|
57
|
+
description: string;
|
|
58
|
+
attachment?: UploadResult | null;
|
|
59
|
+
}
|
|
60
|
+
interface SubmitApplicationParams {
|
|
61
|
+
jobId: string;
|
|
62
|
+
applicant: Applicant;
|
|
63
|
+
cv: CVInfo;
|
|
64
|
+
coverLetter?: string;
|
|
65
|
+
achievements?: Achievement[];
|
|
66
|
+
}
|
|
67
|
+
interface ApplicationResult {
|
|
68
|
+
id: string;
|
|
69
|
+
message: string;
|
|
70
|
+
scoringError: string | null;
|
|
71
|
+
}
|
|
72
|
+
interface UploadResult {
|
|
73
|
+
url: string;
|
|
74
|
+
fileName: string;
|
|
75
|
+
fileSize: number;
|
|
76
|
+
mimeType: string;
|
|
77
|
+
path: string;
|
|
78
|
+
}
|
|
79
|
+
interface ListJobsParams {
|
|
80
|
+
status?: 'active' | 'all';
|
|
81
|
+
department?: string;
|
|
82
|
+
}
|
|
83
|
+
interface BadgeProps {
|
|
84
|
+
href: string;
|
|
85
|
+
'data-prodigio-badge': string;
|
|
86
|
+
target: string;
|
|
87
|
+
rel: string;
|
|
88
|
+
text: string;
|
|
89
|
+
}
|
|
90
|
+
declare class ProdigioError extends Error {
|
|
91
|
+
readonly status: number;
|
|
92
|
+
readonly code?: string | undefined;
|
|
93
|
+
constructor(message: string, status: number, code?: string | undefined);
|
|
94
|
+
}
|
|
95
|
+
declare class Prodigio {
|
|
96
|
+
private readonly apiKey;
|
|
97
|
+
private readonly baseUrl;
|
|
98
|
+
constructor(config: ProdigioConfig | string);
|
|
99
|
+
private get;
|
|
100
|
+
private post;
|
|
101
|
+
private postForm;
|
|
102
|
+
readonly jobs: {
|
|
103
|
+
list: (params?: ListJobsParams) => Promise<Job[]>;
|
|
104
|
+
get: (jobId: string) => Promise<Job>;
|
|
105
|
+
};
|
|
106
|
+
readonly upload: {
|
|
107
|
+
cv: (file: File | Blob, fileName?: string) => Promise<UploadResult>;
|
|
108
|
+
achievement: (file: File | Blob, fileName?: string) => Promise<UploadResult>;
|
|
109
|
+
};
|
|
110
|
+
readonly applications: {
|
|
111
|
+
submit: (params: SubmitApplicationParams) => Promise<ApplicationResult>;
|
|
112
|
+
};
|
|
113
|
+
static readonly POWERED_BY: PoweredBy;
|
|
114
|
+
static badge(poweredBy?: PoweredBy): BadgeProps;
|
|
115
|
+
static meta(): {
|
|
116
|
+
name: string;
|
|
117
|
+
content: string;
|
|
118
|
+
};
|
|
119
|
+
static destroy(): void;
|
|
120
|
+
static init(config: ProdigioInitConfig): Promise<void>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { type Achievement, type Applicant, type ApplicationResult, type BadgeProps, type CVInfo, type Job, type ListJobsParams, type PoweredBy, Prodigio, type ProdigioConfig, ProdigioError, type ProdigioInitConfig, type SalaryRange, type SubmitApplicationParams, type UploadResult, Prodigio as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
interface ProdigioConfig {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
}
|
|
5
|
+
interface ProdigioInitConfig {
|
|
6
|
+
key: string;
|
|
7
|
+
badgeToken?: string;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
badge?: {
|
|
10
|
+
position?: 'bottom-right' | 'bottom-left';
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface SalaryRange {
|
|
14
|
+
min: number;
|
|
15
|
+
max: number;
|
|
16
|
+
currency: string;
|
|
17
|
+
period: 'monthly' | 'yearly';
|
|
18
|
+
}
|
|
19
|
+
interface PoweredBy {
|
|
20
|
+
text: string;
|
|
21
|
+
url: string;
|
|
22
|
+
}
|
|
23
|
+
interface Job {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
companyName: string;
|
|
27
|
+
department: string;
|
|
28
|
+
location: string;
|
|
29
|
+
type: 'full-time' | 'part-time' | 'contract';
|
|
30
|
+
status: 'active' | 'closed' | 'archived' | 'draft';
|
|
31
|
+
description: string;
|
|
32
|
+
requirements: string;
|
|
33
|
+
eligibilityCriteria?: string;
|
|
34
|
+
salaryRange: SalaryRange | null;
|
|
35
|
+
applicationDeadline: string | null;
|
|
36
|
+
/** ISO 8601 date string e.g. "2026-04-01T09:00:00.000Z" — use new Date(createdAt) to convert */
|
|
37
|
+
createdAt: string;
|
|
38
|
+
/** ISO 8601 date string e.g. "2026-04-01T09:00:00.000Z" — use new Date(updatedAt) to convert */
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
poweredBy: PoweredBy;
|
|
41
|
+
}
|
|
42
|
+
interface Applicant {
|
|
43
|
+
fullName: string;
|
|
44
|
+
email: string;
|
|
45
|
+
phone: string;
|
|
46
|
+
location?: string;
|
|
47
|
+
linkedin?: string;
|
|
48
|
+
}
|
|
49
|
+
interface CVInfo {
|
|
50
|
+
url: string;
|
|
51
|
+
fileName: string;
|
|
52
|
+
fileSize: number;
|
|
53
|
+
mimeType: string;
|
|
54
|
+
path?: string;
|
|
55
|
+
}
|
|
56
|
+
interface Achievement {
|
|
57
|
+
description: string;
|
|
58
|
+
attachment?: UploadResult | null;
|
|
59
|
+
}
|
|
60
|
+
interface SubmitApplicationParams {
|
|
61
|
+
jobId: string;
|
|
62
|
+
applicant: Applicant;
|
|
63
|
+
cv: CVInfo;
|
|
64
|
+
coverLetter?: string;
|
|
65
|
+
achievements?: Achievement[];
|
|
66
|
+
}
|
|
67
|
+
interface ApplicationResult {
|
|
68
|
+
id: string;
|
|
69
|
+
message: string;
|
|
70
|
+
scoringError: string | null;
|
|
71
|
+
}
|
|
72
|
+
interface UploadResult {
|
|
73
|
+
url: string;
|
|
74
|
+
fileName: string;
|
|
75
|
+
fileSize: number;
|
|
76
|
+
mimeType: string;
|
|
77
|
+
path: string;
|
|
78
|
+
}
|
|
79
|
+
interface ListJobsParams {
|
|
80
|
+
status?: 'active' | 'all';
|
|
81
|
+
department?: string;
|
|
82
|
+
}
|
|
83
|
+
interface BadgeProps {
|
|
84
|
+
href: string;
|
|
85
|
+
'data-prodigio-badge': string;
|
|
86
|
+
target: string;
|
|
87
|
+
rel: string;
|
|
88
|
+
text: string;
|
|
89
|
+
}
|
|
90
|
+
declare class ProdigioError extends Error {
|
|
91
|
+
readonly status: number;
|
|
92
|
+
readonly code?: string | undefined;
|
|
93
|
+
constructor(message: string, status: number, code?: string | undefined);
|
|
94
|
+
}
|
|
95
|
+
declare class Prodigio {
|
|
96
|
+
private readonly apiKey;
|
|
97
|
+
private readonly baseUrl;
|
|
98
|
+
constructor(config: ProdigioConfig | string);
|
|
99
|
+
private get;
|
|
100
|
+
private post;
|
|
101
|
+
private postForm;
|
|
102
|
+
readonly jobs: {
|
|
103
|
+
list: (params?: ListJobsParams) => Promise<Job[]>;
|
|
104
|
+
get: (jobId: string) => Promise<Job>;
|
|
105
|
+
};
|
|
106
|
+
readonly upload: {
|
|
107
|
+
cv: (file: File | Blob, fileName?: string) => Promise<UploadResult>;
|
|
108
|
+
achievement: (file: File | Blob, fileName?: string) => Promise<UploadResult>;
|
|
109
|
+
};
|
|
110
|
+
readonly applications: {
|
|
111
|
+
submit: (params: SubmitApplicationParams) => Promise<ApplicationResult>;
|
|
112
|
+
};
|
|
113
|
+
static readonly POWERED_BY: PoweredBy;
|
|
114
|
+
static badge(poweredBy?: PoweredBy): BadgeProps;
|
|
115
|
+
static meta(): {
|
|
116
|
+
name: string;
|
|
117
|
+
content: string;
|
|
118
|
+
};
|
|
119
|
+
static destroy(): void;
|
|
120
|
+
static init(config: ProdigioInitConfig): Promise<void>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { type Achievement, type Applicant, type ApplicationResult, type BadgeProps, type CVInfo, type Job, type ListJobsParams, type PoweredBy, Prodigio, type ProdigioConfig, ProdigioError, type ProdigioInitConfig, type SalaryRange, type SubmitApplicationParams, type UploadResult, Prodigio as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prodigio-io/sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Official JavaScript SDK for the Prodigio hiring API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -12,14 +12,23 @@
|
|
|
12
12
|
"require": "./dist/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"files": [
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
16
18
|
"scripts": {
|
|
17
19
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
18
20
|
"dev": "tsup src/index.ts --format esm,cjs --dts --watch"
|
|
19
21
|
},
|
|
20
|
-
"keywords": [
|
|
22
|
+
"keywords": [
|
|
23
|
+
"prodigio",
|
|
24
|
+
"hiring",
|
|
25
|
+
"jobs",
|
|
26
|
+
"recruitment",
|
|
27
|
+
"api"
|
|
28
|
+
],
|
|
21
29
|
"license": "MIT",
|
|
22
30
|
"devDependencies": {
|
|
31
|
+
"@types/node": "^25.6.0",
|
|
23
32
|
"tsup": "^8.0.0",
|
|
24
33
|
"typescript": "^5.0.0"
|
|
25
34
|
}
|