@snokam/mcp-api 0.39.0 → 0.41.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.39.0",
3
+ "version": "0.41.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,55 @@
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
+ },
815
864
  "/v1.0/protected/candidates/{id}/rejection-suggestion": {
816
865
  "post": {
817
866
  "tags": [
@@ -1842,7 +1891,7 @@
1842
1891
  "$ref": "#/components/schemas/sanityCandidateAddress"
1843
1892
  },
1844
1893
  "applicationLetter": {
1845
- "$ref": "#/components/schemas/sanityCandidateGrades"
1894
+ "$ref": "#/components/schemas/sanityCandidateOfferPdf"
1846
1895
  },
1847
1896
  "applicationOther": {
1848
1897
  "type": "string"
@@ -1857,7 +1906,7 @@
1857
1906
  "type": "string"
1858
1907
  },
1859
1908
  "cv": {
1860
- "$ref": "#/components/schemas/sanityCandidateGrades"
1909
+ "$ref": "#/components/schemas/sanityCandidateOfferPdf"
1861
1910
  },
1862
1911
  "email": {
1863
1912
  "type": "string"
@@ -1872,7 +1921,7 @@
1872
1921
  "type": "string"
1873
1922
  },
1874
1923
  "grades": {
1875
- "$ref": "#/components/schemas/sanityCandidateGrades"
1924
+ "$ref": "#/components/schemas/sanityCandidateOfferPdf"
1876
1925
  },
1877
1926
  "jobPosition": {
1878
1927
  "$ref": "#/components/schemas/sanityCandidateJobPosition"
@@ -1883,6 +1932,9 @@
1883
1932
  "$ref": "#/components/schemas/sanityCandidateOffboardingChecklistInner"
1884
1933
  }
1885
1934
  },
1935
+ "offerPdf": {
1936
+ "$ref": "#/components/schemas/sanityCandidateOfferPdf"
1937
+ },
1886
1938
  "onboardingChecklist": {
1887
1939
  "type": "array",
1888
1940
  "items": {
@@ -1926,7 +1978,7 @@
1926
1978
  "shortUrl": {
1927
1979
  "type": "string"
1928
1980
  },
1929
- "slipperSize": {
1981
+ "snapchatUsername": {
1930
1982
  "type": "string"
1931
1983
  },
1932
1984
  "startDate": {
@@ -1960,24 +2012,6 @@
1960
2012
  }
1961
2013
  }
1962
2014
  },
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
2015
  "sanityCandidateJobPosition": {
1982
2016
  "type": "object",
1983
2017
  "properties": {
@@ -2047,6 +2081,24 @@
2047
2081
  }
2048
2082
  }
2049
2083
  },
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
+ },
2050
2102
  "sanityCandidateReferencesInner": {
2051
2103
  "type": "object",
2052
2104
  "properties": {
@@ -2491,6 +2543,9 @@
2491
2543
  "$ref": "#/components/schemas/sanityCandidateOffboardingChecklistInner"
2492
2544
  }
2493
2545
  },
2546
+ "offerPdf": {
2547
+ "$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
2548
+ },
2494
2549
  "onboardingChecklist": {
2495
2550
  "type": "array",
2496
2551
  "items": {
@@ -2523,7 +2578,7 @@
2523
2578
  "shortUrl": {
2524
2579
  "type": "string"
2525
2580
  },
2526
- "slipperSize": {
2581
+ "snapchatUsername": {
2527
2582
  "type": "string"
2528
2583
  },
2529
2584
  "startDate": {
@@ -29940,6 +29940,9 @@
29940
29940
  "type": "object",
29941
29941
  "nullable": true
29942
29942
  },
29943
+ "snapchatUsername": {
29944
+ "type": "string"
29945
+ },
29943
29946
  "githubUsername": {
29944
29947
  "type": "string"
29945
29948
  },
@@ -30732,6 +30735,106 @@
30732
30735
  "applicationOther": {
30733
30736
  "type": "string"
30734
30737
  },
30738
+ "offerPdf": {
30739
+ "properties": {
30740
+ "sanityType": {
30741
+ "type": "string",
30742
+ "enum": [
30743
+ "file"
30744
+ ],
30745
+ "nullable": false
30746
+ },
30747
+ "media": {},
30748
+ "asset": {
30749
+ "properties": {
30750
+ "source": {
30751
+ "$ref": "#/components/schemas/SanityAssetSourceData"
30752
+ },
30753
+ "url": {
30754
+ "type": "string"
30755
+ },
30756
+ "path": {
30757
+ "type": "string"
30758
+ },
30759
+ "uploadId": {
30760
+ "type": "string"
30761
+ },
30762
+ "assetId": {
30763
+ "type": "string"
30764
+ },
30765
+ "size": {
30766
+ "type": "number",
30767
+ "format": "double"
30768
+ },
30769
+ "mimeType": {
30770
+ "type": "string"
30771
+ },
30772
+ "extension": {
30773
+ "type": "string"
30774
+ },
30775
+ "sha1hash": {
30776
+ "type": "string"
30777
+ },
30778
+ "altText": {
30779
+ "type": "string"
30780
+ },
30781
+ "description": {
30782
+ "type": "string"
30783
+ },
30784
+ "title": {
30785
+ "type": "string"
30786
+ },
30787
+ "label": {
30788
+ "type": "string"
30789
+ },
30790
+ "originalFilename": {
30791
+ "type": "string"
30792
+ },
30793
+ "sanityRev": {
30794
+ "type": "string"
30795
+ },
30796
+ "sanityUpdatedAt": {
30797
+ "type": "string"
30798
+ },
30799
+ "sanityCreatedAt": {
30800
+ "type": "string"
30801
+ },
30802
+ "sanityType": {
30803
+ "type": "string",
30804
+ "enum": [
30805
+ "sanity.fileAsset"
30806
+ ],
30807
+ "nullable": false
30808
+ },
30809
+ "sanityId": {
30810
+ "type": "string"
30811
+ }
30812
+ },
30813
+ "required": [
30814
+ "url",
30815
+ "path",
30816
+ "assetId",
30817
+ "size",
30818
+ "mimeType",
30819
+ "extension",
30820
+ "sha1hash",
30821
+ "sanityRev",
30822
+ "sanityUpdatedAt",
30823
+ "sanityCreatedAt",
30824
+ "sanityType",
30825
+ "sanityId"
30826
+ ],
30827
+ "type": "object",
30828
+ "nullable": true
30829
+ }
30830
+ },
30831
+ "required": [
30832
+ "sanityType",
30833
+ "asset"
30834
+ ],
30835
+ "type": "object",
30836
+ "nullable": true
30837
+ },
30735
30838
  "grades": {
30736
30839
  "properties": {
30737
30840
  "sanityType": {
@@ -31087,6 +31190,7 @@
31087
31190
  "buddy",
31088
31191
  "recruiter",
31089
31192
  "jobPosition",
31193
+ "offerPdf",
31090
31194
  "grades",
31091
31195
  "cv",
31092
31196
  "applicationLetter",
@@ -31369,6 +31473,26 @@
31369
31473
  "type": "object",
31370
31474
  "nullable": true
31371
31475
  },
31476
+ "offerPdf": {
31477
+ "properties": {
31478
+ "sanityType": {
31479
+ "type": "string",
31480
+ "enum": [
31481
+ "file"
31482
+ ],
31483
+ "nullable": false
31484
+ },
31485
+ "media": {},
31486
+ "asset": {
31487
+ "$ref": "#/components/schemas/SanityFileAssetReference"
31488
+ }
31489
+ },
31490
+ "required": [
31491
+ "sanityType"
31492
+ ],
31493
+ "type": "object",
31494
+ "nullable": true
31495
+ },
31372
31496
  "applicationOther": {
31373
31497
  "type": "string",
31374
31498
  "nullable": true
@@ -31548,6 +31672,10 @@
31548
31672
  "githubUsername": {
31549
31673
  "type": "string",
31550
31674
  "nullable": true
31675
+ },
31676
+ "snapchatUsername": {
31677
+ "type": "string",
31678
+ "nullable": true
31551
31679
  }
31552
31680
  },
31553
31681
  "type": "object",
@@ -812,6 +812,55 @@
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://050da74a-523f-48ba-a9de-e5c8d6805a93/.default"
859
+ ]
860
+ }
861
+ ]
862
+ }
863
+ },
815
864
  "/v1.0/protected/candidates/{id}/rejection-suggestion": {
816
865
  "post": {
817
866
  "tags": [
@@ -1842,7 +1891,7 @@
1842
1891
  "$ref": "#/components/schemas/sanityCandidateAddress"
1843
1892
  },
1844
1893
  "applicationLetter": {
1845
- "$ref": "#/components/schemas/sanityCandidateGrades"
1894
+ "$ref": "#/components/schemas/sanityCandidateOfferPdf"
1846
1895
  },
1847
1896
  "applicationOther": {
1848
1897
  "type": "string"
@@ -1857,7 +1906,7 @@
1857
1906
  "type": "string"
1858
1907
  },
1859
1908
  "cv": {
1860
- "$ref": "#/components/schemas/sanityCandidateGrades"
1909
+ "$ref": "#/components/schemas/sanityCandidateOfferPdf"
1861
1910
  },
1862
1911
  "email": {
1863
1912
  "type": "string"
@@ -1872,7 +1921,7 @@
1872
1921
  "type": "string"
1873
1922
  },
1874
1923
  "grades": {
1875
- "$ref": "#/components/schemas/sanityCandidateGrades"
1924
+ "$ref": "#/components/schemas/sanityCandidateOfferPdf"
1876
1925
  },
1877
1926
  "jobPosition": {
1878
1927
  "$ref": "#/components/schemas/sanityCandidateJobPosition"
@@ -1883,6 +1932,9 @@
1883
1932
  "$ref": "#/components/schemas/sanityCandidateOffboardingChecklistInner"
1884
1933
  }
1885
1934
  },
1935
+ "offerPdf": {
1936
+ "$ref": "#/components/schemas/sanityCandidateOfferPdf"
1937
+ },
1886
1938
  "onboardingChecklist": {
1887
1939
  "type": "array",
1888
1940
  "items": {
@@ -1926,7 +1978,7 @@
1926
1978
  "shortUrl": {
1927
1979
  "type": "string"
1928
1980
  },
1929
- "slipperSize": {
1981
+ "snapchatUsername": {
1930
1982
  "type": "string"
1931
1983
  },
1932
1984
  "startDate": {
@@ -1960,24 +2012,6 @@
1960
2012
  }
1961
2013
  }
1962
2014
  },
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
2015
  "sanityCandidateJobPosition": {
1982
2016
  "type": "object",
1983
2017
  "properties": {
@@ -2047,6 +2081,24 @@
2047
2081
  }
2048
2082
  }
2049
2083
  },
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
+ },
2050
2102
  "sanityCandidateReferencesInner": {
2051
2103
  "type": "object",
2052
2104
  "properties": {
@@ -2491,6 +2543,9 @@
2491
2543
  "$ref": "#/components/schemas/sanityCandidateOffboardingChecklistInner"
2492
2544
  }
2493
2545
  },
2546
+ "offerPdf": {
2547
+ "$ref": "#/components/schemas/sanityPatchCandidateApplicationLetter"
2548
+ },
2494
2549
  "onboardingChecklist": {
2495
2550
  "type": "array",
2496
2551
  "items": {
@@ -2523,7 +2578,7 @@
2523
2578
  "shortUrl": {
2524
2579
  "type": "string"
2525
2580
  },
2526
- "slipperSize": {
2581
+ "snapchatUsername": {
2527
2582
  "type": "string"
2528
2583
  },
2529
2584
  "startDate": {
@@ -29940,6 +29940,9 @@
29940
29940
  "type": "object",
29941
29941
  "nullable": true
29942
29942
  },
29943
+ "snapchatUsername": {
29944
+ "type": "string"
29945
+ },
29943
29946
  "githubUsername": {
29944
29947
  "type": "string"
29945
29948
  },
@@ -30732,6 +30735,106 @@
30732
30735
  "applicationOther": {
30733
30736
  "type": "string"
30734
30737
  },
30738
+ "offerPdf": {
30739
+ "properties": {
30740
+ "sanityType": {
30741
+ "type": "string",
30742
+ "enum": [
30743
+ "file"
30744
+ ],
30745
+ "nullable": false
30746
+ },
30747
+ "media": {},
30748
+ "asset": {
30749
+ "properties": {
30750
+ "source": {
30751
+ "$ref": "#/components/schemas/SanityAssetSourceData"
30752
+ },
30753
+ "url": {
30754
+ "type": "string"
30755
+ },
30756
+ "path": {
30757
+ "type": "string"
30758
+ },
30759
+ "uploadId": {
30760
+ "type": "string"
30761
+ },
30762
+ "assetId": {
30763
+ "type": "string"
30764
+ },
30765
+ "size": {
30766
+ "type": "number",
30767
+ "format": "double"
30768
+ },
30769
+ "mimeType": {
30770
+ "type": "string"
30771
+ },
30772
+ "extension": {
30773
+ "type": "string"
30774
+ },
30775
+ "sha1hash": {
30776
+ "type": "string"
30777
+ },
30778
+ "altText": {
30779
+ "type": "string"
30780
+ },
30781
+ "description": {
30782
+ "type": "string"
30783
+ },
30784
+ "title": {
30785
+ "type": "string"
30786
+ },
30787
+ "label": {
30788
+ "type": "string"
30789
+ },
30790
+ "originalFilename": {
30791
+ "type": "string"
30792
+ },
30793
+ "sanityRev": {
30794
+ "type": "string"
30795
+ },
30796
+ "sanityUpdatedAt": {
30797
+ "type": "string"
30798
+ },
30799
+ "sanityCreatedAt": {
30800
+ "type": "string"
30801
+ },
30802
+ "sanityType": {
30803
+ "type": "string",
30804
+ "enum": [
30805
+ "sanity.fileAsset"
30806
+ ],
30807
+ "nullable": false
30808
+ },
30809
+ "sanityId": {
30810
+ "type": "string"
30811
+ }
30812
+ },
30813
+ "required": [
30814
+ "url",
30815
+ "path",
30816
+ "assetId",
30817
+ "size",
30818
+ "mimeType",
30819
+ "extension",
30820
+ "sha1hash",
30821
+ "sanityRev",
30822
+ "sanityUpdatedAt",
30823
+ "sanityCreatedAt",
30824
+ "sanityType",
30825
+ "sanityId"
30826
+ ],
30827
+ "type": "object",
30828
+ "nullable": true
30829
+ }
30830
+ },
30831
+ "required": [
30832
+ "sanityType",
30833
+ "asset"
30834
+ ],
30835
+ "type": "object",
30836
+ "nullable": true
30837
+ },
30735
30838
  "grades": {
30736
30839
  "properties": {
30737
30840
  "sanityType": {
@@ -31087,6 +31190,7 @@
31087
31190
  "buddy",
31088
31191
  "recruiter",
31089
31192
  "jobPosition",
31193
+ "offerPdf",
31090
31194
  "grades",
31091
31195
  "cv",
31092
31196
  "applicationLetter",
@@ -31369,6 +31473,26 @@
31369
31473
  "type": "object",
31370
31474
  "nullable": true
31371
31475
  },
31476
+ "offerPdf": {
31477
+ "properties": {
31478
+ "sanityType": {
31479
+ "type": "string",
31480
+ "enum": [
31481
+ "file"
31482
+ ],
31483
+ "nullable": false
31484
+ },
31485
+ "media": {},
31486
+ "asset": {
31487
+ "$ref": "#/components/schemas/SanityFileAssetReference"
31488
+ }
31489
+ },
31490
+ "required": [
31491
+ "sanityType"
31492
+ ],
31493
+ "type": "object",
31494
+ "nullable": true
31495
+ },
31372
31496
  "applicationOther": {
31373
31497
  "type": "string",
31374
31498
  "nullable": true
@@ -31548,6 +31672,10 @@
31548
31672
  "githubUsername": {
31549
31673
  "type": "string",
31550
31674
  "nullable": true
31675
+ },
31676
+ "snapchatUsername": {
31677
+ "type": "string",
31678
+ "nullable": true
31551
31679
  }
31552
31680
  },
31553
31681
  "type": "object",