@cavuno/board 1.19.1 → 1.20.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.js CHANGED
@@ -149,7 +149,7 @@ async function clearSession(storage) {
149
149
  }
150
150
 
151
151
  // src/version.ts
152
- var SDK_VERSION = "1.19.1";
152
+ var SDK_VERSION = "1.20.0";
153
153
 
154
154
  // src/client.ts
155
155
  function isRawBody(body) {
@@ -910,6 +910,196 @@ function meNamespace(client) {
910
910
  retrieve(query, options) {
911
911
  return client.fetch("/me", { ...options, query });
912
912
  },
913
+ /**
914
+ * Permanently delete my account and all dependent data (profile,
915
+ * collections, saved jobs, alerts, avatar/resume files). Synchronous and
916
+ * irreversible — resolves void once the cascade completes (204).
917
+ *
918
+ * @example
919
+ * await board.me.delete();
920
+ */
921
+ delete(options) {
922
+ return client.fetch("/me", { ...options, method: "DELETE" });
923
+ },
924
+ /**
925
+ * The authenticated candidate's own account self-service (doc 32).
926
+ * `profile.*` is the lean profile singleton + (commit 2+) its
927
+ * experience / education / skills / languages collections + avatar.
928
+ */
929
+ profile: {
930
+ /**
931
+ * Retrieve my lean candidate profile.
932
+ *
933
+ * @example
934
+ * const profile = await board.me.profile.retrieve();
935
+ */
936
+ retrieve(query, options) {
937
+ return client.fetch("/me/profile", {
938
+ ...options,
939
+ query
940
+ });
941
+ },
942
+ /**
943
+ * Update my candidate profile. Optional-field merge-patch — omitted
944
+ * fields stay unchanged.
945
+ *
946
+ * @example
947
+ * await board.me.profile.update({ headline: 'Staff Engineer' });
948
+ */
949
+ update(body, query, options) {
950
+ return client.fetch("/me/profile", {
951
+ ...options,
952
+ method: "PATCH",
953
+ body,
954
+ query
955
+ });
956
+ },
957
+ /**
958
+ * Check whether a handle is available for me on this board (my own
959
+ * current handle counts as available). Advisory — `update` re-checks.
960
+ *
961
+ * @example
962
+ * const { available } = await board.me.profile.handleAvailable('jane');
963
+ */
964
+ handleAvailable(handle, options) {
965
+ return client.fetch(
966
+ "/me/profile/handle-available",
967
+ { ...options, query: { handle } }
968
+ );
969
+ },
970
+ /** List my experience entries. */
971
+ listExperience(options) {
972
+ return client.fetch(
973
+ "/me/profile/experience",
974
+ options
975
+ );
976
+ },
977
+ /** Add an experience entry. */
978
+ createExperience(body, options) {
979
+ return client.fetch("/me/profile/experience", {
980
+ ...options,
981
+ method: "POST",
982
+ body
983
+ });
984
+ },
985
+ /** Update an experience entry (merge-patch). */
986
+ updateExperience(id, body, options) {
987
+ return client.fetch(
988
+ `/me/profile/experience/${encodeURIComponent(id)}`,
989
+ { ...options, method: "PATCH", body }
990
+ );
991
+ },
992
+ /** Delete an experience entry. */
993
+ deleteExperience(id, options) {
994
+ return client.fetch(
995
+ `/me/profile/experience/${encodeURIComponent(id)}`,
996
+ { ...options, method: "DELETE" }
997
+ );
998
+ },
999
+ /** List my education entries. */
1000
+ listEducation(options) {
1001
+ return client.fetch(
1002
+ "/me/profile/education",
1003
+ options
1004
+ );
1005
+ },
1006
+ /** Add an education entry. */
1007
+ createEducation(body, options) {
1008
+ return client.fetch("/me/profile/education", {
1009
+ ...options,
1010
+ method: "POST",
1011
+ body
1012
+ });
1013
+ },
1014
+ /** Update an education entry (merge-patch). */
1015
+ updateEducation(id, body, options) {
1016
+ return client.fetch(
1017
+ `/me/profile/education/${encodeURIComponent(id)}`,
1018
+ { ...options, method: "PATCH", body }
1019
+ );
1020
+ },
1021
+ /** Delete an education entry. */
1022
+ deleteEducation(id, options) {
1023
+ return client.fetch(
1024
+ `/me/profile/education/${encodeURIComponent(id)}`,
1025
+ { ...options, method: "DELETE" }
1026
+ );
1027
+ },
1028
+ /** List my skills. */
1029
+ listSkills(options) {
1030
+ return client.fetch(
1031
+ "/me/profile/skills",
1032
+ options
1033
+ );
1034
+ },
1035
+ /** Replace my skills with the provided ordered names. */
1036
+ updateSkills(body, options) {
1037
+ return client.fetch(
1038
+ "/me/profile/skills",
1039
+ { ...options, method: "PUT", body }
1040
+ );
1041
+ },
1042
+ /** List my languages. */
1043
+ listLanguages(options) {
1044
+ return client.fetch(
1045
+ "/me/profile/languages",
1046
+ options
1047
+ );
1048
+ },
1049
+ /** Replace my languages with the provided ordered set. */
1050
+ updateLanguages(body, options) {
1051
+ return client.fetch(
1052
+ "/me/profile/languages",
1053
+ { ...options, method: "PUT", body }
1054
+ );
1055
+ },
1056
+ /**
1057
+ * Upload my avatar (JPEG/PNG/WebP, ≤5 MB) via a single multipart POST.
1058
+ *
1059
+ * @example
1060
+ * await board.me.profile.uploadAvatar(file);
1061
+ */
1062
+ uploadAvatar(file, options) {
1063
+ const form = new FormData();
1064
+ form.append("file", file);
1065
+ return client.fetch("/me/profile/avatar", {
1066
+ ...options,
1067
+ method: "POST",
1068
+ body: form
1069
+ });
1070
+ }
1071
+ },
1072
+ /**
1073
+ * Signed-in notification preferences + the anonymous email-link
1074
+ * unsubscribe branch (doc 32).
1075
+ */
1076
+ notificationPreferences: {
1077
+ /** List every notification channel + its subscribed state. */
1078
+ retrieve(options) {
1079
+ return client.fetch(
1080
+ "/me/notification-preferences",
1081
+ options
1082
+ );
1083
+ },
1084
+ /** Toggle one channel; returns the full updated set. */
1085
+ update(body, options) {
1086
+ return client.fetch(
1087
+ "/me/notification-preferences",
1088
+ { ...options, method: "PUT", body }
1089
+ );
1090
+ },
1091
+ /**
1092
+ * Anonymous one-click unsubscribe via an HMAC email-link token — no
1093
+ * session. Resolves void on success (204).
1094
+ */
1095
+ unsubscribeWithToken(body, options) {
1096
+ return client.fetch("/me/notification-preferences/unsubscribe", {
1097
+ ...options,
1098
+ method: "POST",
1099
+ body
1100
+ });
1101
+ }
1102
+ },
913
1103
  savedJobs: {
914
1104
  /**
915
1105
  * 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.19.1";
112
+ var SDK_VERSION = "1.20.0";
113
113
 
114
114
  // src/client.ts
115
115
  function isRawBody(body) {
@@ -870,6 +870,196 @@ function meNamespace(client) {
870
870
  retrieve(query, options) {
871
871
  return client.fetch("/me", { ...options, query });
872
872
  },
873
+ /**
874
+ * Permanently delete my account and all dependent data (profile,
875
+ * collections, saved jobs, alerts, avatar/resume files). Synchronous and
876
+ * irreversible — resolves void once the cascade completes (204).
877
+ *
878
+ * @example
879
+ * await board.me.delete();
880
+ */
881
+ delete(options) {
882
+ return client.fetch("/me", { ...options, method: "DELETE" });
883
+ },
884
+ /**
885
+ * The authenticated candidate's own account self-service (doc 32).
886
+ * `profile.*` is the lean profile singleton + (commit 2+) its
887
+ * experience / education / skills / languages collections + avatar.
888
+ */
889
+ profile: {
890
+ /**
891
+ * Retrieve my lean candidate profile.
892
+ *
893
+ * @example
894
+ * const profile = await board.me.profile.retrieve();
895
+ */
896
+ retrieve(query, options) {
897
+ return client.fetch("/me/profile", {
898
+ ...options,
899
+ query
900
+ });
901
+ },
902
+ /**
903
+ * Update my candidate profile. Optional-field merge-patch — omitted
904
+ * fields stay unchanged.
905
+ *
906
+ * @example
907
+ * await board.me.profile.update({ headline: 'Staff Engineer' });
908
+ */
909
+ update(body, query, options) {
910
+ return client.fetch("/me/profile", {
911
+ ...options,
912
+ method: "PATCH",
913
+ body,
914
+ query
915
+ });
916
+ },
917
+ /**
918
+ * Check whether a handle is available for me on this board (my own
919
+ * current handle counts as available). Advisory — `update` re-checks.
920
+ *
921
+ * @example
922
+ * const { available } = await board.me.profile.handleAvailable('jane');
923
+ */
924
+ handleAvailable(handle, options) {
925
+ return client.fetch(
926
+ "/me/profile/handle-available",
927
+ { ...options, query: { handle } }
928
+ );
929
+ },
930
+ /** List my experience entries. */
931
+ listExperience(options) {
932
+ return client.fetch(
933
+ "/me/profile/experience",
934
+ options
935
+ );
936
+ },
937
+ /** Add an experience entry. */
938
+ createExperience(body, options) {
939
+ return client.fetch("/me/profile/experience", {
940
+ ...options,
941
+ method: "POST",
942
+ body
943
+ });
944
+ },
945
+ /** Update an experience entry (merge-patch). */
946
+ updateExperience(id, body, options) {
947
+ return client.fetch(
948
+ `/me/profile/experience/${encodeURIComponent(id)}`,
949
+ { ...options, method: "PATCH", body }
950
+ );
951
+ },
952
+ /** Delete an experience entry. */
953
+ deleteExperience(id, options) {
954
+ return client.fetch(
955
+ `/me/profile/experience/${encodeURIComponent(id)}`,
956
+ { ...options, method: "DELETE" }
957
+ );
958
+ },
959
+ /** List my education entries. */
960
+ listEducation(options) {
961
+ return client.fetch(
962
+ "/me/profile/education",
963
+ options
964
+ );
965
+ },
966
+ /** Add an education entry. */
967
+ createEducation(body, options) {
968
+ return client.fetch("/me/profile/education", {
969
+ ...options,
970
+ method: "POST",
971
+ body
972
+ });
973
+ },
974
+ /** Update an education entry (merge-patch). */
975
+ updateEducation(id, body, options) {
976
+ return client.fetch(
977
+ `/me/profile/education/${encodeURIComponent(id)}`,
978
+ { ...options, method: "PATCH", body }
979
+ );
980
+ },
981
+ /** Delete an education entry. */
982
+ deleteEducation(id, options) {
983
+ return client.fetch(
984
+ `/me/profile/education/${encodeURIComponent(id)}`,
985
+ { ...options, method: "DELETE" }
986
+ );
987
+ },
988
+ /** List my skills. */
989
+ listSkills(options) {
990
+ return client.fetch(
991
+ "/me/profile/skills",
992
+ options
993
+ );
994
+ },
995
+ /** Replace my skills with the provided ordered names. */
996
+ updateSkills(body, options) {
997
+ return client.fetch(
998
+ "/me/profile/skills",
999
+ { ...options, method: "PUT", body }
1000
+ );
1001
+ },
1002
+ /** List my languages. */
1003
+ listLanguages(options) {
1004
+ return client.fetch(
1005
+ "/me/profile/languages",
1006
+ options
1007
+ );
1008
+ },
1009
+ /** Replace my languages with the provided ordered set. */
1010
+ updateLanguages(body, options) {
1011
+ return client.fetch(
1012
+ "/me/profile/languages",
1013
+ { ...options, method: "PUT", body }
1014
+ );
1015
+ },
1016
+ /**
1017
+ * Upload my avatar (JPEG/PNG/WebP, ≤5 MB) via a single multipart POST.
1018
+ *
1019
+ * @example
1020
+ * await board.me.profile.uploadAvatar(file);
1021
+ */
1022
+ uploadAvatar(file, options) {
1023
+ const form = new FormData();
1024
+ form.append("file", file);
1025
+ return client.fetch("/me/profile/avatar", {
1026
+ ...options,
1027
+ method: "POST",
1028
+ body: form
1029
+ });
1030
+ }
1031
+ },
1032
+ /**
1033
+ * Signed-in notification preferences + the anonymous email-link
1034
+ * unsubscribe branch (doc 32).
1035
+ */
1036
+ notificationPreferences: {
1037
+ /** List every notification channel + its subscribed state. */
1038
+ retrieve(options) {
1039
+ return client.fetch(
1040
+ "/me/notification-preferences",
1041
+ options
1042
+ );
1043
+ },
1044
+ /** Toggle one channel; returns the full updated set. */
1045
+ update(body, options) {
1046
+ return client.fetch(
1047
+ "/me/notification-preferences",
1048
+ { ...options, method: "PUT", body }
1049
+ );
1050
+ },
1051
+ /**
1052
+ * Anonymous one-click unsubscribe via an HMAC email-link token — no
1053
+ * session. Resolves void on success (204).
1054
+ */
1055
+ unsubscribeWithToken(body, options) {
1056
+ return client.fetch("/me/notification-preferences/unsubscribe", {
1057
+ ...options,
1058
+ method: "POST",
1059
+ body
1060
+ });
1061
+ }
1062
+ },
873
1063
  savedJobs: {
874
1064
  /**
875
1065
  * List the authenticated user's saved jobs (each embeds the full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cavuno/board",
3
- "version": "1.19.1",
3
+ "version": "1.20.0",
4
4
  "description": "Typed isomorphic client for the Cavuno Board API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.19.1",
2
+ "version": "1.20.0",
3
3
  "skills": [
4
4
  {
5
5
  "name": "cavuno-board-auth",