@cavuno/board 1.21.0 → 1.22.0
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 +437 -63
- package/dist/index.d.ts +437 -63
- package/dist/index.js +256 -1
- package/dist/index.mjs +256 -1
- package/package.json +1 -1
- package/skills/manifest.json +1 -1
package/dist/index.js
CHANGED
|
@@ -149,7 +149,7 @@ async function clearSession(storage) {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// src/version.ts
|
|
152
|
-
var SDK_VERSION = "1.
|
|
152
|
+
var SDK_VERSION = "1.22.0";
|
|
153
153
|
|
|
154
154
|
// src/client.ts
|
|
155
155
|
function isRawBody(body) {
|
|
@@ -347,6 +347,35 @@ function authNamespace(client) {
|
|
|
347
347
|
body
|
|
348
348
|
});
|
|
349
349
|
},
|
|
350
|
+
/**
|
|
351
|
+
* Verify the signed-in board user's email with the 6-digit code from the
|
|
352
|
+
* verification email (requires the bearer). Resolves void (204); an
|
|
353
|
+
* invalid/expired code is a 401 `BoardApiError`. Distinct from the
|
|
354
|
+
* anonymous magic-link `verifyEmail({ token })`.
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* await board.auth.verifyEmailWithCode({ code: '123456' });
|
|
358
|
+
*/
|
|
359
|
+
verifyEmailWithCode(body, options) {
|
|
360
|
+
return client.fetch("/auth/verify-email/otp", {
|
|
361
|
+
...options,
|
|
362
|
+
method: "POST",
|
|
363
|
+
body
|
|
364
|
+
});
|
|
365
|
+
},
|
|
366
|
+
/**
|
|
367
|
+
* Re-send the verification email (fresh code + magic link) to the signed-in
|
|
368
|
+
* board user. Resolves void (204); no-op if already verified.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* await board.auth.resendVerification();
|
|
372
|
+
*/
|
|
373
|
+
resendVerification(options) {
|
|
374
|
+
return client.fetch("/auth/verify-email/resend", {
|
|
375
|
+
...options,
|
|
376
|
+
method: "POST"
|
|
377
|
+
});
|
|
378
|
+
},
|
|
350
379
|
/**
|
|
351
380
|
* Request a password-reset email. Always resolves (204) whether or
|
|
352
381
|
* not the email exists — no account oracle.
|
|
@@ -869,6 +898,53 @@ function jobsNamespace(client) {
|
|
|
869
898
|
query
|
|
870
899
|
}
|
|
871
900
|
);
|
|
901
|
+
},
|
|
902
|
+
/**
|
|
903
|
+
* Apply to a job natively (ADR-0054). Optional auth: a signed-in candidate
|
|
904
|
+
* applies from their profile (omit name/email); a guest supplies them
|
|
905
|
+
* (allowed only when the board permits applications without sign-up).
|
|
906
|
+
* Idempotent — a repeat apply returns the existing application.
|
|
907
|
+
*
|
|
908
|
+
* @example
|
|
909
|
+
* const application = await board.jobs.apply('senior-chef', {
|
|
910
|
+
* coverNote: 'Excited to cook here.',
|
|
911
|
+
* });
|
|
912
|
+
*/
|
|
913
|
+
apply(jobSlug, body, options) {
|
|
914
|
+
return client.fetch(
|
|
915
|
+
`/jobs/${encodeURIComponent(jobSlug)}/apply`,
|
|
916
|
+
{ ...options, method: "POST", body: body ?? {} }
|
|
917
|
+
);
|
|
918
|
+
},
|
|
919
|
+
/**
|
|
920
|
+
* Upload + attach a resume to an application (multipart). Signed-in
|
|
921
|
+
* candidates target their own application for the job; a guest passes the
|
|
922
|
+
* `applicationId` returned by `apply`. Returns the updated application.
|
|
923
|
+
*
|
|
924
|
+
* @example
|
|
925
|
+
* await board.jobs.uploadApplicationResume('senior-chef', file);
|
|
926
|
+
*/
|
|
927
|
+
uploadApplicationResume(jobSlug, file, opts, options) {
|
|
928
|
+
const form = new FormData();
|
|
929
|
+
form.append("file", file);
|
|
930
|
+
if (opts?.applicationId) form.append("applicationId", opts.applicationId);
|
|
931
|
+
return client.fetch(
|
|
932
|
+
`/jobs/${encodeURIComponent(jobSlug)}/apply/resume`,
|
|
933
|
+
{ ...options, method: "POST", body: form }
|
|
934
|
+
);
|
|
935
|
+
},
|
|
936
|
+
/**
|
|
937
|
+
* The authenticated candidate's application for this job (the apply-button
|
|
938
|
+
* "have I applied?" check). Throws a 404 `BoardApiError` when there is none.
|
|
939
|
+
*
|
|
940
|
+
* @example
|
|
941
|
+
* const application = await board.jobs.myApplication('senior-chef');
|
|
942
|
+
*/
|
|
943
|
+
myApplication(jobSlug, options) {
|
|
944
|
+
return client.fetch(
|
|
945
|
+
`/jobs/${encodeURIComponent(jobSlug)}/application`,
|
|
946
|
+
options
|
|
947
|
+
);
|
|
872
948
|
}
|
|
873
949
|
};
|
|
874
950
|
}
|
|
@@ -1508,6 +1584,185 @@ function meNamespace(client) {
|
|
|
1508
1584
|
}
|
|
1509
1585
|
}
|
|
1510
1586
|
},
|
|
1587
|
+
/**
|
|
1588
|
+
* The authenticated board user's job-alert preferences (ADR-0053) —
|
|
1589
|
+
* a collection (up to 10). Creating one is active immediately (no
|
|
1590
|
+
* double opt-in — the authenticated action is the consent). There is no
|
|
1591
|
+
* pause: `remove` is the only way to stop an alert.
|
|
1592
|
+
*/
|
|
1593
|
+
alerts: {
|
|
1594
|
+
/**
|
|
1595
|
+
* List my job alerts.
|
|
1596
|
+
*
|
|
1597
|
+
* @example
|
|
1598
|
+
* const { data } = await board.me.alerts.list();
|
|
1599
|
+
*/
|
|
1600
|
+
list(options) {
|
|
1601
|
+
return client.fetch("/me/alerts", options);
|
|
1602
|
+
},
|
|
1603
|
+
/**
|
|
1604
|
+
* Create a new active job alert.
|
|
1605
|
+
*
|
|
1606
|
+
* @example
|
|
1607
|
+
* await board.me.alerts.create({
|
|
1608
|
+
* frequency: 'weekly',
|
|
1609
|
+
* jobFunctions: ['engineering'],
|
|
1610
|
+
* remoteOptions: ['remote'],
|
|
1611
|
+
* });
|
|
1612
|
+
*/
|
|
1613
|
+
create(body, options) {
|
|
1614
|
+
return client.fetch("/me/alerts", {
|
|
1615
|
+
...options,
|
|
1616
|
+
method: "POST",
|
|
1617
|
+
body
|
|
1618
|
+
});
|
|
1619
|
+
},
|
|
1620
|
+
/**
|
|
1621
|
+
* Retrieve one of my job alerts.
|
|
1622
|
+
*
|
|
1623
|
+
* @example
|
|
1624
|
+
* const alert = await board.me.alerts.retrieve(alertId);
|
|
1625
|
+
*/
|
|
1626
|
+
retrieve(alertId, options) {
|
|
1627
|
+
return client.fetch(
|
|
1628
|
+
`/me/alerts/${encodeURIComponent(alertId)}`,
|
|
1629
|
+
options
|
|
1630
|
+
);
|
|
1631
|
+
},
|
|
1632
|
+
/**
|
|
1633
|
+
* Replace a job alert's filters + frequency in full. Returns the updated
|
|
1634
|
+
* alert.
|
|
1635
|
+
*
|
|
1636
|
+
* @example
|
|
1637
|
+
* await board.me.alerts.update(alertId, {
|
|
1638
|
+
* frequency: 'daily',
|
|
1639
|
+
* placeIds: ['ChIJ…'],
|
|
1640
|
+
* });
|
|
1641
|
+
*/
|
|
1642
|
+
update(alertId, body, options) {
|
|
1643
|
+
return client.fetch(
|
|
1644
|
+
`/me/alerts/${encodeURIComponent(alertId)}`,
|
|
1645
|
+
{ ...options, method: "PUT", body }
|
|
1646
|
+
);
|
|
1647
|
+
},
|
|
1648
|
+
/**
|
|
1649
|
+
* Delete a job alert. Resolves void on success (204).
|
|
1650
|
+
*
|
|
1651
|
+
* @example
|
|
1652
|
+
* await board.me.alerts.remove(alertId);
|
|
1653
|
+
*/
|
|
1654
|
+
remove(alertId, options) {
|
|
1655
|
+
return client.fetch(`/me/alerts/${encodeURIComponent(alertId)}`, {
|
|
1656
|
+
...options,
|
|
1657
|
+
method: "DELETE"
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
},
|
|
1661
|
+
/**
|
|
1662
|
+
* The authenticated candidate's applications (ADR-0054). Apply itself lives
|
|
1663
|
+
* on the job (`board.jobs.apply` — it is optional-auth); these manage the
|
|
1664
|
+
* applications the candidate has already submitted, keyed by `applicationId`.
|
|
1665
|
+
*/
|
|
1666
|
+
applications: {
|
|
1667
|
+
/**
|
|
1668
|
+
* List my applications, newest first.
|
|
1669
|
+
*
|
|
1670
|
+
* @example
|
|
1671
|
+
* const { data } = await board.me.applications.list();
|
|
1672
|
+
*/
|
|
1673
|
+
list(query, options) {
|
|
1674
|
+
return client.fetch("/me/applications", {
|
|
1675
|
+
...options,
|
|
1676
|
+
query
|
|
1677
|
+
});
|
|
1678
|
+
},
|
|
1679
|
+
/**
|
|
1680
|
+
* Retrieve one of my applications by id.
|
|
1681
|
+
*
|
|
1682
|
+
* @example
|
|
1683
|
+
* const application = await board.me.applications.retrieve(id);
|
|
1684
|
+
*/
|
|
1685
|
+
retrieve(applicationId, options) {
|
|
1686
|
+
return client.fetch(
|
|
1687
|
+
`/me/applications/${encodeURIComponent(applicationId)}`,
|
|
1688
|
+
options
|
|
1689
|
+
);
|
|
1690
|
+
},
|
|
1691
|
+
/**
|
|
1692
|
+
* Edit the candidate-facing facts of an application (merge-patch). Only
|
|
1693
|
+
* while it is still editable. Returns the updated application.
|
|
1694
|
+
*
|
|
1695
|
+
* @example
|
|
1696
|
+
* await board.me.applications.updateFacts(id, { coverNote: '…' });
|
|
1697
|
+
*/
|
|
1698
|
+
updateFacts(applicationId, body, options) {
|
|
1699
|
+
return client.fetch(
|
|
1700
|
+
`/me/applications/${encodeURIComponent(applicationId)}`,
|
|
1701
|
+
{ ...options, method: "PATCH", body }
|
|
1702
|
+
);
|
|
1703
|
+
},
|
|
1704
|
+
/**
|
|
1705
|
+
* Withdraw (permanently delete) an application. Resolves void on 204.
|
|
1706
|
+
*
|
|
1707
|
+
* @example
|
|
1708
|
+
* await board.me.applications.withdraw(id);
|
|
1709
|
+
*/
|
|
1710
|
+
withdraw(applicationId, options) {
|
|
1711
|
+
return client.fetch(
|
|
1712
|
+
`/me/applications/${encodeURIComponent(applicationId)}/withdraw`,
|
|
1713
|
+
{ ...options, method: "POST" }
|
|
1714
|
+
);
|
|
1715
|
+
}
|
|
1716
|
+
},
|
|
1717
|
+
/**
|
|
1718
|
+
* The candidate's resume (ADR-0055). `upload` starts an async parse that
|
|
1719
|
+
* auto-populates the profile — it returns `parseStatus: 'parsing'`; poll
|
|
1720
|
+
* `retrieve()` until `parsed`/`failed`, then re-read `profile.*`.
|
|
1721
|
+
*/
|
|
1722
|
+
resume: {
|
|
1723
|
+
/**
|
|
1724
|
+
* Upload a resume and start the async parse. Returns the resume with
|
|
1725
|
+
* `parseStatus: 'parsing'`.
|
|
1726
|
+
*
|
|
1727
|
+
* @example
|
|
1728
|
+
* await board.me.resume.upload(file, { keepResumeOnFile: true });
|
|
1729
|
+
*/
|
|
1730
|
+
upload(file, opts, options) {
|
|
1731
|
+
const form = new FormData();
|
|
1732
|
+
form.append("resume", file);
|
|
1733
|
+
if (opts?.keepResumeOnFile) form.append("keepResumeOnFile", "true");
|
|
1734
|
+
if (opts?.importMode) form.append("importMode", opts.importMode);
|
|
1735
|
+
if (opts?.confirmReplaceAll) form.append("confirmReplaceAll", "true");
|
|
1736
|
+
return client.fetch("/me/resume", {
|
|
1737
|
+
...options,
|
|
1738
|
+
method: "POST",
|
|
1739
|
+
body: form
|
|
1740
|
+
});
|
|
1741
|
+
},
|
|
1742
|
+
/**
|
|
1743
|
+
* Retrieve my resume state (parse status + stored file). Poll this after
|
|
1744
|
+
* `upload` until `parseStatus` is `parsed` or `failed`.
|
|
1745
|
+
*
|
|
1746
|
+
* @example
|
|
1747
|
+
* const resume = await board.me.resume.retrieve();
|
|
1748
|
+
*/
|
|
1749
|
+
retrieve(options) {
|
|
1750
|
+
return client.fetch("/me/resume", options);
|
|
1751
|
+
},
|
|
1752
|
+
/**
|
|
1753
|
+
* Delete my stored resume file + withdraw keep-on-file consent (parsed
|
|
1754
|
+
* profile fields stay). Resolves void (204).
|
|
1755
|
+
*
|
|
1756
|
+
* @example
|
|
1757
|
+
* await board.me.resume.delete();
|
|
1758
|
+
*/
|
|
1759
|
+
delete(options) {
|
|
1760
|
+
return client.fetch("/me/resume", {
|
|
1761
|
+
...options,
|
|
1762
|
+
method: "DELETE"
|
|
1763
|
+
});
|
|
1764
|
+
}
|
|
1765
|
+
},
|
|
1511
1766
|
savedJobs: {
|
|
1512
1767
|
/**
|
|
1513
1768
|
* List the authenticated user's saved jobs (each embeds the full
|
package/dist/index.mjs
CHANGED
|
@@ -109,7 +109,7 @@ async function clearSession(storage) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// src/version.ts
|
|
112
|
-
var SDK_VERSION = "1.
|
|
112
|
+
var SDK_VERSION = "1.22.0";
|
|
113
113
|
|
|
114
114
|
// src/client.ts
|
|
115
115
|
function isRawBody(body) {
|
|
@@ -307,6 +307,35 @@ function authNamespace(client) {
|
|
|
307
307
|
body
|
|
308
308
|
});
|
|
309
309
|
},
|
|
310
|
+
/**
|
|
311
|
+
* Verify the signed-in board user's email with the 6-digit code from the
|
|
312
|
+
* verification email (requires the bearer). Resolves void (204); an
|
|
313
|
+
* invalid/expired code is a 401 `BoardApiError`. Distinct from the
|
|
314
|
+
* anonymous magic-link `verifyEmail({ token })`.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* await board.auth.verifyEmailWithCode({ code: '123456' });
|
|
318
|
+
*/
|
|
319
|
+
verifyEmailWithCode(body, options) {
|
|
320
|
+
return client.fetch("/auth/verify-email/otp", {
|
|
321
|
+
...options,
|
|
322
|
+
method: "POST",
|
|
323
|
+
body
|
|
324
|
+
});
|
|
325
|
+
},
|
|
326
|
+
/**
|
|
327
|
+
* Re-send the verification email (fresh code + magic link) to the signed-in
|
|
328
|
+
* board user. Resolves void (204); no-op if already verified.
|
|
329
|
+
*
|
|
330
|
+
* @example
|
|
331
|
+
* await board.auth.resendVerification();
|
|
332
|
+
*/
|
|
333
|
+
resendVerification(options) {
|
|
334
|
+
return client.fetch("/auth/verify-email/resend", {
|
|
335
|
+
...options,
|
|
336
|
+
method: "POST"
|
|
337
|
+
});
|
|
338
|
+
},
|
|
310
339
|
/**
|
|
311
340
|
* Request a password-reset email. Always resolves (204) whether or
|
|
312
341
|
* not the email exists — no account oracle.
|
|
@@ -829,6 +858,53 @@ function jobsNamespace(client) {
|
|
|
829
858
|
query
|
|
830
859
|
}
|
|
831
860
|
);
|
|
861
|
+
},
|
|
862
|
+
/**
|
|
863
|
+
* Apply to a job natively (ADR-0054). Optional auth: a signed-in candidate
|
|
864
|
+
* applies from their profile (omit name/email); a guest supplies them
|
|
865
|
+
* (allowed only when the board permits applications without sign-up).
|
|
866
|
+
* Idempotent — a repeat apply returns the existing application.
|
|
867
|
+
*
|
|
868
|
+
* @example
|
|
869
|
+
* const application = await board.jobs.apply('senior-chef', {
|
|
870
|
+
* coverNote: 'Excited to cook here.',
|
|
871
|
+
* });
|
|
872
|
+
*/
|
|
873
|
+
apply(jobSlug, body, options) {
|
|
874
|
+
return client.fetch(
|
|
875
|
+
`/jobs/${encodeURIComponent(jobSlug)}/apply`,
|
|
876
|
+
{ ...options, method: "POST", body: body ?? {} }
|
|
877
|
+
);
|
|
878
|
+
},
|
|
879
|
+
/**
|
|
880
|
+
* Upload + attach a resume to an application (multipart). Signed-in
|
|
881
|
+
* candidates target their own application for the job; a guest passes the
|
|
882
|
+
* `applicationId` returned by `apply`. Returns the updated application.
|
|
883
|
+
*
|
|
884
|
+
* @example
|
|
885
|
+
* await board.jobs.uploadApplicationResume('senior-chef', file);
|
|
886
|
+
*/
|
|
887
|
+
uploadApplicationResume(jobSlug, file, opts, options) {
|
|
888
|
+
const form = new FormData();
|
|
889
|
+
form.append("file", file);
|
|
890
|
+
if (opts?.applicationId) form.append("applicationId", opts.applicationId);
|
|
891
|
+
return client.fetch(
|
|
892
|
+
`/jobs/${encodeURIComponent(jobSlug)}/apply/resume`,
|
|
893
|
+
{ ...options, method: "POST", body: form }
|
|
894
|
+
);
|
|
895
|
+
},
|
|
896
|
+
/**
|
|
897
|
+
* The authenticated candidate's application for this job (the apply-button
|
|
898
|
+
* "have I applied?" check). Throws a 404 `BoardApiError` when there is none.
|
|
899
|
+
*
|
|
900
|
+
* @example
|
|
901
|
+
* const application = await board.jobs.myApplication('senior-chef');
|
|
902
|
+
*/
|
|
903
|
+
myApplication(jobSlug, options) {
|
|
904
|
+
return client.fetch(
|
|
905
|
+
`/jobs/${encodeURIComponent(jobSlug)}/application`,
|
|
906
|
+
options
|
|
907
|
+
);
|
|
832
908
|
}
|
|
833
909
|
};
|
|
834
910
|
}
|
|
@@ -1468,6 +1544,185 @@ function meNamespace(client) {
|
|
|
1468
1544
|
}
|
|
1469
1545
|
}
|
|
1470
1546
|
},
|
|
1547
|
+
/**
|
|
1548
|
+
* The authenticated board user's job-alert preferences (ADR-0053) —
|
|
1549
|
+
* a collection (up to 10). Creating one is active immediately (no
|
|
1550
|
+
* double opt-in — the authenticated action is the consent). There is no
|
|
1551
|
+
* pause: `remove` is the only way to stop an alert.
|
|
1552
|
+
*/
|
|
1553
|
+
alerts: {
|
|
1554
|
+
/**
|
|
1555
|
+
* List my job alerts.
|
|
1556
|
+
*
|
|
1557
|
+
* @example
|
|
1558
|
+
* const { data } = await board.me.alerts.list();
|
|
1559
|
+
*/
|
|
1560
|
+
list(options) {
|
|
1561
|
+
return client.fetch("/me/alerts", options);
|
|
1562
|
+
},
|
|
1563
|
+
/**
|
|
1564
|
+
* Create a new active job alert.
|
|
1565
|
+
*
|
|
1566
|
+
* @example
|
|
1567
|
+
* await board.me.alerts.create({
|
|
1568
|
+
* frequency: 'weekly',
|
|
1569
|
+
* jobFunctions: ['engineering'],
|
|
1570
|
+
* remoteOptions: ['remote'],
|
|
1571
|
+
* });
|
|
1572
|
+
*/
|
|
1573
|
+
create(body, options) {
|
|
1574
|
+
return client.fetch("/me/alerts", {
|
|
1575
|
+
...options,
|
|
1576
|
+
method: "POST",
|
|
1577
|
+
body
|
|
1578
|
+
});
|
|
1579
|
+
},
|
|
1580
|
+
/**
|
|
1581
|
+
* Retrieve one of my job alerts.
|
|
1582
|
+
*
|
|
1583
|
+
* @example
|
|
1584
|
+
* const alert = await board.me.alerts.retrieve(alertId);
|
|
1585
|
+
*/
|
|
1586
|
+
retrieve(alertId, options) {
|
|
1587
|
+
return client.fetch(
|
|
1588
|
+
`/me/alerts/${encodeURIComponent(alertId)}`,
|
|
1589
|
+
options
|
|
1590
|
+
);
|
|
1591
|
+
},
|
|
1592
|
+
/**
|
|
1593
|
+
* Replace a job alert's filters + frequency in full. Returns the updated
|
|
1594
|
+
* alert.
|
|
1595
|
+
*
|
|
1596
|
+
* @example
|
|
1597
|
+
* await board.me.alerts.update(alertId, {
|
|
1598
|
+
* frequency: 'daily',
|
|
1599
|
+
* placeIds: ['ChIJ…'],
|
|
1600
|
+
* });
|
|
1601
|
+
*/
|
|
1602
|
+
update(alertId, body, options) {
|
|
1603
|
+
return client.fetch(
|
|
1604
|
+
`/me/alerts/${encodeURIComponent(alertId)}`,
|
|
1605
|
+
{ ...options, method: "PUT", body }
|
|
1606
|
+
);
|
|
1607
|
+
},
|
|
1608
|
+
/**
|
|
1609
|
+
* Delete a job alert. Resolves void on success (204).
|
|
1610
|
+
*
|
|
1611
|
+
* @example
|
|
1612
|
+
* await board.me.alerts.remove(alertId);
|
|
1613
|
+
*/
|
|
1614
|
+
remove(alertId, options) {
|
|
1615
|
+
return client.fetch(`/me/alerts/${encodeURIComponent(alertId)}`, {
|
|
1616
|
+
...options,
|
|
1617
|
+
method: "DELETE"
|
|
1618
|
+
});
|
|
1619
|
+
}
|
|
1620
|
+
},
|
|
1621
|
+
/**
|
|
1622
|
+
* The authenticated candidate's applications (ADR-0054). Apply itself lives
|
|
1623
|
+
* on the job (`board.jobs.apply` — it is optional-auth); these manage the
|
|
1624
|
+
* applications the candidate has already submitted, keyed by `applicationId`.
|
|
1625
|
+
*/
|
|
1626
|
+
applications: {
|
|
1627
|
+
/**
|
|
1628
|
+
* List my applications, newest first.
|
|
1629
|
+
*
|
|
1630
|
+
* @example
|
|
1631
|
+
* const { data } = await board.me.applications.list();
|
|
1632
|
+
*/
|
|
1633
|
+
list(query, options) {
|
|
1634
|
+
return client.fetch("/me/applications", {
|
|
1635
|
+
...options,
|
|
1636
|
+
query
|
|
1637
|
+
});
|
|
1638
|
+
},
|
|
1639
|
+
/**
|
|
1640
|
+
* Retrieve one of my applications by id.
|
|
1641
|
+
*
|
|
1642
|
+
* @example
|
|
1643
|
+
* const application = await board.me.applications.retrieve(id);
|
|
1644
|
+
*/
|
|
1645
|
+
retrieve(applicationId, options) {
|
|
1646
|
+
return client.fetch(
|
|
1647
|
+
`/me/applications/${encodeURIComponent(applicationId)}`,
|
|
1648
|
+
options
|
|
1649
|
+
);
|
|
1650
|
+
},
|
|
1651
|
+
/**
|
|
1652
|
+
* Edit the candidate-facing facts of an application (merge-patch). Only
|
|
1653
|
+
* while it is still editable. Returns the updated application.
|
|
1654
|
+
*
|
|
1655
|
+
* @example
|
|
1656
|
+
* await board.me.applications.updateFacts(id, { coverNote: '…' });
|
|
1657
|
+
*/
|
|
1658
|
+
updateFacts(applicationId, body, options) {
|
|
1659
|
+
return client.fetch(
|
|
1660
|
+
`/me/applications/${encodeURIComponent(applicationId)}`,
|
|
1661
|
+
{ ...options, method: "PATCH", body }
|
|
1662
|
+
);
|
|
1663
|
+
},
|
|
1664
|
+
/**
|
|
1665
|
+
* Withdraw (permanently delete) an application. Resolves void on 204.
|
|
1666
|
+
*
|
|
1667
|
+
* @example
|
|
1668
|
+
* await board.me.applications.withdraw(id);
|
|
1669
|
+
*/
|
|
1670
|
+
withdraw(applicationId, options) {
|
|
1671
|
+
return client.fetch(
|
|
1672
|
+
`/me/applications/${encodeURIComponent(applicationId)}/withdraw`,
|
|
1673
|
+
{ ...options, method: "POST" }
|
|
1674
|
+
);
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
/**
|
|
1678
|
+
* The candidate's resume (ADR-0055). `upload` starts an async parse that
|
|
1679
|
+
* auto-populates the profile — it returns `parseStatus: 'parsing'`; poll
|
|
1680
|
+
* `retrieve()` until `parsed`/`failed`, then re-read `profile.*`.
|
|
1681
|
+
*/
|
|
1682
|
+
resume: {
|
|
1683
|
+
/**
|
|
1684
|
+
* Upload a resume and start the async parse. Returns the resume with
|
|
1685
|
+
* `parseStatus: 'parsing'`.
|
|
1686
|
+
*
|
|
1687
|
+
* @example
|
|
1688
|
+
* await board.me.resume.upload(file, { keepResumeOnFile: true });
|
|
1689
|
+
*/
|
|
1690
|
+
upload(file, opts, options) {
|
|
1691
|
+
const form = new FormData();
|
|
1692
|
+
form.append("resume", file);
|
|
1693
|
+
if (opts?.keepResumeOnFile) form.append("keepResumeOnFile", "true");
|
|
1694
|
+
if (opts?.importMode) form.append("importMode", opts.importMode);
|
|
1695
|
+
if (opts?.confirmReplaceAll) form.append("confirmReplaceAll", "true");
|
|
1696
|
+
return client.fetch("/me/resume", {
|
|
1697
|
+
...options,
|
|
1698
|
+
method: "POST",
|
|
1699
|
+
body: form
|
|
1700
|
+
});
|
|
1701
|
+
},
|
|
1702
|
+
/**
|
|
1703
|
+
* Retrieve my resume state (parse status + stored file). Poll this after
|
|
1704
|
+
* `upload` until `parseStatus` is `parsed` or `failed`.
|
|
1705
|
+
*
|
|
1706
|
+
* @example
|
|
1707
|
+
* const resume = await board.me.resume.retrieve();
|
|
1708
|
+
*/
|
|
1709
|
+
retrieve(options) {
|
|
1710
|
+
return client.fetch("/me/resume", options);
|
|
1711
|
+
},
|
|
1712
|
+
/**
|
|
1713
|
+
* Delete my stored resume file + withdraw keep-on-file consent (parsed
|
|
1714
|
+
* profile fields stay). Resolves void (204).
|
|
1715
|
+
*
|
|
1716
|
+
* @example
|
|
1717
|
+
* await board.me.resume.delete();
|
|
1718
|
+
*/
|
|
1719
|
+
delete(options) {
|
|
1720
|
+
return client.fetch("/me/resume", {
|
|
1721
|
+
...options,
|
|
1722
|
+
method: "DELETE"
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
},
|
|
1471
1726
|
savedJobs: {
|
|
1472
1727
|
/**
|
|
1473
1728
|
* List the authenticated user's saved jobs (each embeds the full
|
package/package.json
CHANGED
package/skills/manifest.json
CHANGED