@snokam/mcp-api 0.41.0 → 0.43.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 +1 -1
- package/specs/production/recruitment.json +179 -22
- package/specs/production/sanity.json +390 -0
- package/specs/test/recruitment.json +179 -22
- package/specs/test/sanity.json +390 -0
|
@@ -861,6 +861,127 @@
|
|
|
861
861
|
]
|
|
862
862
|
}
|
|
863
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://050da74a-523f-48ba-a9de-e5c8d6805a93/.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://050da74a-523f-48ba-a9de-e5c8d6805a93/.default"
|
|
980
|
+
]
|
|
981
|
+
}
|
|
982
|
+
]
|
|
983
|
+
}
|
|
984
|
+
},
|
|
864
985
|
"/v1.0/protected/candidates/{id}/rejection-suggestion": {
|
|
865
986
|
"post": {
|
|
866
987
|
"tags": [
|
|
@@ -1891,7 +2012,7 @@
|
|
|
1891
2012
|
"$ref": "#/components/schemas/sanityCandidateAddress"
|
|
1892
2013
|
},
|
|
1893
2014
|
"applicationLetter": {
|
|
1894
|
-
"$ref": "#/components/schemas/
|
|
2015
|
+
"$ref": "#/components/schemas/sanityCandidateSignedContract"
|
|
1895
2016
|
},
|
|
1896
2017
|
"applicationOther": {
|
|
1897
2018
|
"type": "string"
|
|
@@ -1905,8 +2026,20 @@
|
|
|
1905
2026
|
"candidate": {
|
|
1906
2027
|
"type": "string"
|
|
1907
2028
|
},
|
|
2029
|
+
"contractPdf": {
|
|
2030
|
+
"$ref": "#/components/schemas/sanityCandidateSignedContract"
|
|
2031
|
+
},
|
|
2032
|
+
"contractSignDate": {
|
|
2033
|
+
"type": "string"
|
|
2034
|
+
},
|
|
2035
|
+
"contractSigner": {
|
|
2036
|
+
"$ref": "#/components/schemas/sanityEmployeeManager"
|
|
2037
|
+
},
|
|
2038
|
+
"contractSignerRole": {
|
|
2039
|
+
"type": "string"
|
|
2040
|
+
},
|
|
1908
2041
|
"cv": {
|
|
1909
|
-
"$ref": "#/components/schemas/
|
|
2042
|
+
"$ref": "#/components/schemas/sanityCandidateSignedContract"
|
|
1910
2043
|
},
|
|
1911
2044
|
"email": {
|
|
1912
2045
|
"type": "string"
|
|
@@ -1921,7 +2054,7 @@
|
|
|
1921
2054
|
"type": "string"
|
|
1922
2055
|
},
|
|
1923
2056
|
"grades": {
|
|
1924
|
-
"$ref": "#/components/schemas/
|
|
2057
|
+
"$ref": "#/components/schemas/sanityCandidateSignedContract"
|
|
1925
2058
|
},
|
|
1926
2059
|
"jobPosition": {
|
|
1927
2060
|
"$ref": "#/components/schemas/sanityCandidateJobPosition"
|
|
@@ -1933,7 +2066,7 @@
|
|
|
1933
2066
|
}
|
|
1934
2067
|
},
|
|
1935
2068
|
"offerPdf": {
|
|
1936
|
-
"$ref": "#/components/schemas/
|
|
2069
|
+
"$ref": "#/components/schemas/sanityCandidateSignedContract"
|
|
1937
2070
|
},
|
|
1938
2071
|
"onboardingChecklist": {
|
|
1939
2072
|
"type": "array",
|
|
@@ -1945,6 +2078,9 @@
|
|
|
1945
2078
|
"type": "number",
|
|
1946
2079
|
"format": "double"
|
|
1947
2080
|
},
|
|
2081
|
+
"personalNumber": {
|
|
2082
|
+
"type": "string"
|
|
2083
|
+
},
|
|
1948
2084
|
"preferredDisplayName": {
|
|
1949
2085
|
"type": "string"
|
|
1950
2086
|
},
|
|
@@ -1978,6 +2114,9 @@
|
|
|
1978
2114
|
"shortUrl": {
|
|
1979
2115
|
"type": "string"
|
|
1980
2116
|
},
|
|
2117
|
+
"signedContract": {
|
|
2118
|
+
"$ref": "#/components/schemas/sanityCandidateSignedContract"
|
|
2119
|
+
},
|
|
1981
2120
|
"snapchatUsername": {
|
|
1982
2121
|
"type": "string"
|
|
1983
2122
|
},
|
|
@@ -2081,24 +2220,6 @@
|
|
|
2081
2220
|
}
|
|
2082
2221
|
}
|
|
2083
2222
|
},
|
|
2084
|
-
"sanityCandidateOfferPdf": {
|
|
2085
|
-
"type": "object",
|
|
2086
|
-
"properties": {
|
|
2087
|
-
"sanityType": {
|
|
2088
|
-
"enum": [
|
|
2089
|
-
"file"
|
|
2090
|
-
],
|
|
2091
|
-
"type": "string",
|
|
2092
|
-
"default": "file"
|
|
2093
|
-
},
|
|
2094
|
-
"asset": {
|
|
2095
|
-
"$ref": "#/components/schemas/sanityDocFileAsset"
|
|
2096
|
-
},
|
|
2097
|
-
"media": {
|
|
2098
|
-
"type": "object"
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
},
|
|
2102
2223
|
"sanityCandidateReferencesInner": {
|
|
2103
2224
|
"type": "object",
|
|
2104
2225
|
"properties": {
|
|
@@ -2126,6 +2247,24 @@
|
|
|
2126
2247
|
}
|
|
2127
2248
|
}
|
|
2128
2249
|
},
|
|
2250
|
+
"sanityCandidateSignedContract": {
|
|
2251
|
+
"type": "object",
|
|
2252
|
+
"properties": {
|
|
2253
|
+
"sanityType": {
|
|
2254
|
+
"enum": [
|
|
2255
|
+
"file"
|
|
2256
|
+
],
|
|
2257
|
+
"type": "string",
|
|
2258
|
+
"default": "file"
|
|
2259
|
+
},
|
|
2260
|
+
"asset": {
|
|
2261
|
+
"$ref": "#/components/schemas/sanityDocFileAsset"
|
|
2262
|
+
},
|
|
2263
|
+
"media": {
|
|
2264
|
+
"type": "object"
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
},
|
|
2129
2268
|
"sanityCreateSystem": {
|
|
2130
2269
|
"type": "object",
|
|
2131
2270
|
"properties": {
|
|
@@ -2515,6 +2654,18 @@
|
|
|
2515
2654
|
"candidate": {
|
|
2516
2655
|
"type": "string"
|
|
2517
2656
|
},
|
|
2657
|
+
"contractPdf": {
|
|
2658
|
+
"$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
|
|
2659
|
+
},
|
|
2660
|
+
"contractSignDate": {
|
|
2661
|
+
"type": "string"
|
|
2662
|
+
},
|
|
2663
|
+
"contractSigner": {
|
|
2664
|
+
"$ref": "#/components/schemas/employeeReference"
|
|
2665
|
+
},
|
|
2666
|
+
"contractSignerRole": {
|
|
2667
|
+
"type": "string"
|
|
2668
|
+
},
|
|
2518
2669
|
"cv": {
|
|
2519
2670
|
"$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
|
|
2520
2671
|
},
|
|
@@ -2557,6 +2708,9 @@
|
|
|
2557
2708
|
"format": "double",
|
|
2558
2709
|
"nullable": true
|
|
2559
2710
|
},
|
|
2711
|
+
"personalNumber": {
|
|
2712
|
+
"type": "string"
|
|
2713
|
+
},
|
|
2560
2714
|
"preferredDisplayName": {
|
|
2561
2715
|
"type": "string"
|
|
2562
2716
|
},
|
|
@@ -2578,6 +2732,9 @@
|
|
|
2578
2732
|
"shortUrl": {
|
|
2579
2733
|
"type": "string"
|
|
2580
2734
|
},
|
|
2735
|
+
"signedContract": {
|
|
2736
|
+
"$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
|
|
2737
|
+
},
|
|
2581
2738
|
"snapchatUsername": {
|
|
2582
2739
|
"type": "string"
|
|
2583
2740
|
},
|