@snokam/mcp-api 0.40.0 → 0.42.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snokam/mcp-api",
3
- "version": "0.40.0",
3
+ "version": "0.42.0",
4
4
  "description": "MCP server exposing Snokam backend APIs as tools for Claude Code and other MCP clients",
5
5
  "type": "module",
6
6
  "bin": {
@@ -812,6 +812,176 @@
812
812
  ]
813
813
  }
814
814
  },
815
+ "/v1.0/protected/candidates/{id}/generate-offer-pdf": {
816
+ "post": {
817
+ "tags": [
818
+ "Candidates"
819
+ ],
820
+ "summary": "Generate the 'Tilbud om ansettelse' PDF and store it on the candidate",
821
+ "description": "Renders the Snøkam offer letter, uploads it as a Sanity file asset, and patches candidate.offerPdf to point at it. Stock percentage is taken from candidate.ownership; salary/pension language and the signing chair are fixed template constants. Re-running overwrites the previous PDF. Returns the updated candidate so the caller can read offerPdf.asset.url without an extra refetch.",
822
+ "operationId": "GenerateOfferPdf",
823
+ "parameters": [
824
+ {
825
+ "name": "id",
826
+ "in": "path",
827
+ "required": true,
828
+ "schema": {
829
+ "type": "string"
830
+ },
831
+ "x-ms-summary": "Candidate Sanity id"
832
+ }
833
+ ],
834
+ "responses": {
835
+ "200": {
836
+ "description": "Payload of SanityCandidate",
837
+ "content": {
838
+ "application/json": {
839
+ "schema": {
840
+ "$ref": "#/components/schemas/sanityCandidate"
841
+ }
842
+ }
843
+ },
844
+ "x-ms-summary": "Success"
845
+ },
846
+ "401": {
847
+ "description": "No description",
848
+ "x-ms-summary": "Unauthorized"
849
+ },
850
+ "404": {
851
+ "description": "No description",
852
+ "x-ms-summary": "Not Found"
853
+ }
854
+ },
855
+ "security": [
856
+ {
857
+ "Implicit": [
858
+ "api://b9f9de6f-132f-4a9a-a583-e9054a46f2fa/.default"
859
+ ]
860
+ }
861
+ ]
862
+ }
863
+ },
864
+ "/v1.0/protected/candidates/{id}/generate-contract-pdf": {
865
+ "post": {
866
+ "tags": [
867
+ "Candidates"
868
+ ],
869
+ "summary": "Generate the 'Ansettelseskontrakt' PDF and store it on the candidate",
870
+ "description": "Renders the Snøkam employment contract template, uploads it as a Sanity file asset, and patches candidate.contractPdf to point at it. The unsigned contract is what the candidate downloads, signs and the admin then uploads back as candidate.signedContract on the SIGNED status flip. Re-running overwrites the previous PDF. Returns the updated candidate so the caller can read contractPdf.asset.url without an extra refetch.",
871
+ "operationId": "GenerateContractPdf",
872
+ "parameters": [
873
+ {
874
+ "name": "id",
875
+ "in": "path",
876
+ "required": true,
877
+ "schema": {
878
+ "type": "string"
879
+ },
880
+ "x-ms-summary": "Candidate Sanity id"
881
+ }
882
+ ],
883
+ "responses": {
884
+ "200": {
885
+ "description": "Payload of SanityCandidate",
886
+ "content": {
887
+ "application/json": {
888
+ "schema": {
889
+ "$ref": "#/components/schemas/sanityCandidate"
890
+ }
891
+ }
892
+ },
893
+ "x-ms-summary": "Success"
894
+ },
895
+ "401": {
896
+ "description": "No description",
897
+ "x-ms-summary": "Unauthorized"
898
+ },
899
+ "404": {
900
+ "description": "No description",
901
+ "x-ms-summary": "Not Found"
902
+ }
903
+ },
904
+ "security": [
905
+ {
906
+ "Implicit": [
907
+ "api://b9f9de6f-132f-4a9a-a583-e9054a46f2fa/.default"
908
+ ]
909
+ }
910
+ ]
911
+ }
912
+ },
913
+ "/v1.0/protected/candidates/{id}/upload-signed-contract": {
914
+ "post": {
915
+ "tags": [
916
+ "Candidates"
917
+ ],
918
+ "summary": "Upload the candidate's signed employment contract",
919
+ "description": "Stores the admin-uploaded signed contract PDF as a Sanity file asset and patches candidate.signedContract. Used by the SIGNED status modal — the candidate-facing /prosess/{id}/signert page renders the resulting PDF inline. Send the file as multipart/form-data under the 'file' field, OR send the raw bytes as the request body with the appropriate Content-Type.",
920
+ "operationId": "UploadSignedContract",
921
+ "parameters": [
922
+ {
923
+ "name": "id",
924
+ "in": "path",
925
+ "required": true,
926
+ "schema": {
927
+ "type": "string"
928
+ },
929
+ "x-ms-summary": "Candidate Sanity id"
930
+ }
931
+ ],
932
+ "requestBody": {
933
+ "description": "Signed contract PDF bytes. Multipart 'file' field is also accepted.",
934
+ "content": {
935
+ "application/pdf": {
936
+ "schema": {
937
+ "type": "string",
938
+ "format": "binary"
939
+ }
940
+ }
941
+ },
942
+ "required": true
943
+ },
944
+ "responses": {
945
+ "200": {
946
+ "description": "Payload of SanityCandidate",
947
+ "content": {
948
+ "application/json": {
949
+ "schema": {
950
+ "$ref": "#/components/schemas/sanityCandidate"
951
+ }
952
+ }
953
+ },
954
+ "x-ms-summary": "Success"
955
+ },
956
+ "400": {
957
+ "description": "Payload of Object",
958
+ "content": {
959
+ "application/json": {
960
+ "schema": {
961
+ "type": "object"
962
+ }
963
+ }
964
+ },
965
+ "x-ms-summary": "Bad Request"
966
+ },
967
+ "401": {
968
+ "description": "No description",
969
+ "x-ms-summary": "Unauthorized"
970
+ },
971
+ "404": {
972
+ "description": "No description",
973
+ "x-ms-summary": "Not Found"
974
+ }
975
+ },
976
+ "security": [
977
+ {
978
+ "Implicit": [
979
+ "api://b9f9de6f-132f-4a9a-a583-e9054a46f2fa/.default"
980
+ ]
981
+ }
982
+ ]
983
+ }
984
+ },
815
985
  "/v1.0/protected/candidates/{id}/rejection-suggestion": {
816
986
  "post": {
817
987
  "tags": [
@@ -1842,7 +2012,7 @@
1842
2012
  "$ref": "#/components/schemas/sanityCandidateAddress"
1843
2013
  },
1844
2014
  "applicationLetter": {
1845
- "$ref": "#/components/schemas/sanityCandidateGrades"
2015
+ "$ref": "#/components/schemas/sanityCandidateSignedContract"
1846
2016
  },
1847
2017
  "applicationOther": {
1848
2018
  "type": "string"
@@ -1856,8 +2026,11 @@
1856
2026
  "candidate": {
1857
2027
  "type": "string"
1858
2028
  },
2029
+ "contractPdf": {
2030
+ "$ref": "#/components/schemas/sanityCandidateSignedContract"
2031
+ },
1859
2032
  "cv": {
1860
- "$ref": "#/components/schemas/sanityCandidateGrades"
2033
+ "$ref": "#/components/schemas/sanityCandidateSignedContract"
1861
2034
  },
1862
2035
  "email": {
1863
2036
  "type": "string"
@@ -1872,7 +2045,7 @@
1872
2045
  "type": "string"
1873
2046
  },
1874
2047
  "grades": {
1875
- "$ref": "#/components/schemas/sanityCandidateGrades"
2048
+ "$ref": "#/components/schemas/sanityCandidateSignedContract"
1876
2049
  },
1877
2050
  "jobPosition": {
1878
2051
  "$ref": "#/components/schemas/sanityCandidateJobPosition"
@@ -1883,6 +2056,9 @@
1883
2056
  "$ref": "#/components/schemas/sanityCandidateOffboardingChecklistInner"
1884
2057
  }
1885
2058
  },
2059
+ "offerPdf": {
2060
+ "$ref": "#/components/schemas/sanityCandidateSignedContract"
2061
+ },
1886
2062
  "onboardingChecklist": {
1887
2063
  "type": "array",
1888
2064
  "items": {
@@ -1926,7 +2102,10 @@
1926
2102
  "shortUrl": {
1927
2103
  "type": "string"
1928
2104
  },
1929
- "slipperSize": {
2105
+ "signedContract": {
2106
+ "$ref": "#/components/schemas/sanityCandidateSignedContract"
2107
+ },
2108
+ "snapchatUsername": {
1930
2109
  "type": "string"
1931
2110
  },
1932
2111
  "startDate": {
@@ -1960,24 +2139,6 @@
1960
2139
  }
1961
2140
  }
1962
2141
  },
1963
- "sanityCandidateGrades": {
1964
- "type": "object",
1965
- "properties": {
1966
- "sanityType": {
1967
- "enum": [
1968
- "file"
1969
- ],
1970
- "type": "string",
1971
- "default": "file"
1972
- },
1973
- "asset": {
1974
- "$ref": "#/components/schemas/sanityDocFileAsset"
1975
- },
1976
- "media": {
1977
- "type": "object"
1978
- }
1979
- }
1980
- },
1981
2142
  "sanityCandidateJobPosition": {
1982
2143
  "type": "object",
1983
2144
  "properties": {
@@ -2074,6 +2235,24 @@
2074
2235
  }
2075
2236
  }
2076
2237
  },
2238
+ "sanityCandidateSignedContract": {
2239
+ "type": "object",
2240
+ "properties": {
2241
+ "sanityType": {
2242
+ "enum": [
2243
+ "file"
2244
+ ],
2245
+ "type": "string",
2246
+ "default": "file"
2247
+ },
2248
+ "asset": {
2249
+ "$ref": "#/components/schemas/sanityDocFileAsset"
2250
+ },
2251
+ "media": {
2252
+ "type": "object"
2253
+ }
2254
+ }
2255
+ },
2077
2256
  "sanityCreateSystem": {
2078
2257
  "type": "object",
2079
2258
  "properties": {
@@ -2463,6 +2642,9 @@
2463
2642
  "candidate": {
2464
2643
  "type": "string"
2465
2644
  },
2645
+ "contractPdf": {
2646
+ "$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
2647
+ },
2466
2648
  "cv": {
2467
2649
  "$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
2468
2650
  },
@@ -2491,6 +2673,9 @@
2491
2673
  "$ref": "#/components/schemas/sanityCandidateOffboardingChecklistInner"
2492
2674
  }
2493
2675
  },
2676
+ "offerPdf": {
2677
+ "$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
2678
+ },
2494
2679
  "onboardingChecklist": {
2495
2680
  "type": "array",
2496
2681
  "items": {
@@ -2523,7 +2708,10 @@
2523
2708
  "shortUrl": {
2524
2709
  "type": "string"
2525
2710
  },
2526
- "slipperSize": {
2711
+ "signedContract": {
2712
+ "$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
2713
+ },
2714
+ "snapchatUsername": {
2527
2715
  "type": "string"
2528
2716
  },
2529
2717
  "startDate": {