@prodigio-io/sdk 2.1.0 → 2.1.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.js CHANGED
@@ -271,6 +271,9 @@ var _Prodigio = class _Prodigio {
271
271
  if (typeof window === "undefined") return;
272
272
  if (_initialized) return;
273
273
  _initialized = true;
274
+ if (process.env.NODE_ENV !== "production" && !document.querySelector('meta[name="prodigio-badge"]')) {
275
+ console.warn('[Prodigio] Missing <meta name="prodigio-badge" content="true"> in your page <head>. This is required for compliance detection. See docs.prodigio.io');
276
+ }
274
277
  const { key, badgeToken, baseUrl = DEFAULT_BASE_URL, badge: badgeConfig } = config;
275
278
  const position = (_a = badgeConfig == null ? void 0 : badgeConfig.position) != null ? _a : "bottom-right";
276
279
  const cached = getCachedToken(key);
package/dist/index.mjs CHANGED
@@ -245,6 +245,9 @@ var _Prodigio = class _Prodigio {
245
245
  if (typeof window === "undefined") return;
246
246
  if (_initialized) return;
247
247
  _initialized = true;
248
+ if (process.env.NODE_ENV !== "production" && !document.querySelector('meta[name="prodigio-badge"]')) {
249
+ console.warn('[Prodigio] Missing <meta name="prodigio-badge" content="true"> in your page <head>. This is required for compliance detection. See docs.prodigio.io');
250
+ }
248
251
  const { key, badgeToken, baseUrl = DEFAULT_BASE_URL, badge: badgeConfig } = config;
249
252
  const position = (_a = badgeConfig == null ? void 0 : badgeConfig.position) != null ? _a : "bottom-right";
250
253
  const cached = getCachedToken(key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prodigio-io/sdk",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Official JavaScript SDK for the Prodigio hiring API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/dist/index.d.mts DELETED
@@ -1,123 +0,0 @@
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 DELETED
@@ -1,123 +0,0 @@
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 };