@smartytalent/openai-tools 0.1.33-dev.36 → 0.1.33-dev.38

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.
Files changed (2) hide show
  1. package/dist/tools.json +976 -46
  2. package/package.json +1 -1
package/dist/tools.json CHANGED
@@ -15792,10 +15792,41 @@
15792
15792
  "parameters": {
15793
15793
  "type": "object",
15794
15794
  "properties": {
15795
+ "filterStatus": {
15796
+ "type": "string",
15797
+ "description": "Filter by template status.",
15798
+ "enum": [
15799
+ "draft",
15800
+ "active",
15801
+ "archived",
15802
+ "failed",
15803
+ "pending"
15804
+ ]
15805
+ },
15806
+ "filterCreatedFrom": {
15807
+ "type": "string",
15808
+ "description": "Filters results to include only those created from the specified date and time. The value must be in ISO 8601 format."
15809
+ },
15810
+ "filterCreatedTo": {
15811
+ "type": "string",
15812
+ "description": "Filters results to include only those created up to the specified date and time. The value must be in ISO 8601 format."
15813
+ },
15814
+ "filterModifiedFrom": {
15815
+ "type": "string",
15816
+ "description": "Filters results to include only those modified from the specified date and time. The value must be in ISO 8601 format."
15817
+ },
15818
+ "filterModifiedTo": {
15819
+ "type": "string",
15820
+ "description": "Filters results to include only those modified up to the specified date and time. The value must be in ISO 8601 format."
15821
+ },
15795
15822
  "pageSize": {
15796
15823
  "type": "integer",
15797
15824
  "description": "Specifies the number of items to retrieve per page. The maximum value is 100."
15798
15825
  },
15826
+ "pageNumber": {
15827
+ "type": "integer",
15828
+ "description": "Specifies the page number to retrieve. Used for traditional pagination."
15829
+ },
15799
15830
  "pageAfter": {
15800
15831
  "type": "string",
15801
15832
  "description": "Opaque base64-encoded cursor returned by a previous list response, used for forward cursor-based pagination. Pass the value verbatim; do not decode or mutate it."
@@ -15836,21 +15867,23 @@
15836
15867
  },
15837
15868
  "attributes": {
15838
15869
  "title": "AssessmentAttributesSchema",
15870
+ "description": "Template-only attributes for an assessment. The candidate's run of an\nassessment (answers, scores, evaluation, proctoring) lives on the\nAttempt resource - see AttemptAttributesSchema.",
15839
15871
  "type": "object",
15840
15872
  "properties": {
15841
15873
  "status": {
15842
15874
  "type": "string",
15875
+ "description": "Template lifecycle. Candidate-side state (inProgress/submitted/\nevaluated/etc.) lives on attempts. `pending` is a transient state\nset when the AI Generate Step Function is in flight - the row\nflips to `active` once questions land.",
15843
15876
  "enum": [
15844
- "pending",
15845
- "in_progress",
15846
- "completed",
15847
- "evaluated",
15848
- "expired",
15849
- "failed"
15877
+ "draft",
15878
+ "active",
15879
+ "archived",
15880
+ "failed",
15881
+ "pending"
15850
15882
  ]
15851
15883
  },
15852
15884
  "duration": {
15853
- "type": "integer"
15885
+ "type": "integer",
15886
+ "description": "Time limit for the candidate to complete the assessment, in minutes. Defaults to 30."
15854
15887
  },
15855
15888
  "antiCheatingLevel": {
15856
15889
  "type": "string",
@@ -15860,17 +15893,170 @@
15860
15893
  "RIGOROUS"
15861
15894
  ]
15862
15895
  },
15863
- "totalScore": {
15864
- "type": "number"
15865
- },
15866
15896
  "passingScore": {
15867
- "type": "number"
15868
- },
15869
- "passed": {
15870
- "type": "boolean"
15897
+ "type": "number",
15898
+ "description": "Score threshold (0-100) for `evaluation.passed=true` on attempts of this template. Defaults to 60."
15871
15899
  },
15872
15900
  "languageCode": {
15873
- "type": "string"
15901
+ "type": "string",
15902
+ "description": "Default language tag used when the candidate UI doesn't specify one (e.g. 'en-US', 'pl-PL')."
15903
+ },
15904
+ "name": {
15905
+ "type": "object",
15906
+ "description": "Multilingual template name. Keys are locale tags, values are the localized title.",
15907
+ "additionalProperties": {
15908
+ "type": "string"
15909
+ }
15910
+ },
15911
+ "description": {
15912
+ "type": "object",
15913
+ "description": "Multilingual template description shown to the candidate before they start.",
15914
+ "additionalProperties": {
15915
+ "type": "string"
15916
+ }
15917
+ },
15918
+ "questions": {
15919
+ "type": "array",
15920
+ "description": "Question bank. See QuestionSchema for per-type schemas.",
15921
+ "items": {
15922
+ "title": "QuestionSchema",
15923
+ "description": "A single assessment question. Eight question types - the optional\nfields below are interpreted based on `type`. See\n`Question.value` shapes in AnswerSchema for what the candidate\nsends back per type.\n\nSECURITY: `answerKey`, `scoringRubric`, and `options[].isCorrect`\nare stripped server-side before responses are returned to candidates\nvia /v1/guest/attempts/* - they are recruiter-only fields.",
15924
+ "type": "object",
15925
+ "required": [
15926
+ "questionId",
15927
+ "type"
15928
+ ],
15929
+ "properties": {
15930
+ "questionId": {
15931
+ "type": "string",
15932
+ "description": "Stable identifier (e.g. 'q1'). Candidates' answers reference this."
15933
+ },
15934
+ "type": {
15935
+ "type": "string",
15936
+ "enum": [
15937
+ "single-choice",
15938
+ "multiple-choice",
15939
+ "scale",
15940
+ "open-text",
15941
+ "ranking",
15942
+ "situational-judgment",
15943
+ "file-upload",
15944
+ "video-recording"
15945
+ ]
15946
+ },
15947
+ "category": {
15948
+ "type": "string",
15949
+ "description": "Free-form tag for analytics (e.g. 'soft-skills', 'hard-skills', 'general')."
15950
+ },
15951
+ "difficulty": {
15952
+ "type": "string",
15953
+ "enum": [
15954
+ "easy",
15955
+ "medium",
15956
+ "hard"
15957
+ ]
15958
+ },
15959
+ "points": {
15960
+ "type": "number",
15961
+ "description": "Maximum score for this question. Defaults to 1."
15962
+ },
15963
+ "required": {
15964
+ "type": "boolean"
15965
+ },
15966
+ "text": {
15967
+ "type": "object",
15968
+ "description": "Multilingual question text.",
15969
+ "additionalProperties": {
15970
+ "type": "string"
15971
+ }
15972
+ },
15973
+ "options": {
15974
+ "type": "array",
15975
+ "description": "Choices for single-choice / multiple-choice / ranking /\nsituational-judgment. Canonical shape is\n`{ id, text: { locale: string }, isCorrect?: bool }`. Bare\nlocale-map options exist in legacy data but are deprecated.",
15976
+ "items": {
15977
+ "type": "object",
15978
+ "properties": {
15979
+ "id": {
15980
+ "type": "string",
15981
+ "description": "Stable option id - candidates' answers reference this."
15982
+ },
15983
+ "text": {
15984
+ "type": "object",
15985
+ "additionalProperties": {
15986
+ "type": "string"
15987
+ }
15988
+ },
15989
+ "isCorrect": {
15990
+ "type": "boolean",
15991
+ "description": "Recruiter-only. Stripped server-side from guest responses."
15992
+ }
15993
+ }
15994
+ }
15995
+ },
15996
+ "scaleMin": {
15997
+ "type": "integer",
15998
+ "description": "Lower bound for `scale` type questions."
15999
+ },
16000
+ "scaleMax": {
16001
+ "type": "integer",
16002
+ "description": "Upper bound for `scale` type questions."
16003
+ },
16004
+ "scaleLabels": {
16005
+ "type": "object",
16006
+ "description": "Optional labels per step value, multilingual.\n`{ \"1\": { \"en-US\": \"Strongly disagree\" }, \"5\": { \"en-US\": \"Strongly agree\" } }`.",
16007
+ "additionalProperties": {
16008
+ "type": "object",
16009
+ "additionalProperties": {
16010
+ "type": "string"
16011
+ }
16012
+ }
16013
+ },
16014
+ "placeholder": {
16015
+ "type": "object",
16016
+ "description": "Multilingual placeholder text for `open-text` questions.",
16017
+ "additionalProperties": {
16018
+ "type": "string"
16019
+ }
16020
+ },
16021
+ "scenario": {
16022
+ "type": "object",
16023
+ "description": "Multilingual scenario body for `situational-judgment` questions.",
16024
+ "additionalProperties": {
16025
+ "type": "string"
16026
+ }
16027
+ },
16028
+ "acceptedFormats": {
16029
+ "type": "array",
16030
+ "description": "Accepted MIME or extension list for `file-upload` (e.g. ['.pdf', '.png']).",
16031
+ "items": {
16032
+ "type": "string"
16033
+ }
16034
+ },
16035
+ "maxDuration": {
16036
+ "type": "integer",
16037
+ "description": "Maximum recording length in seconds for `video-recording`."
16038
+ },
16039
+ "maxAttempts": {
16040
+ "type": "integer",
16041
+ "description": "Maximum recording retakes the candidate may use on `video-recording`."
16042
+ },
16043
+ "explanation": {
16044
+ "type": "object",
16045
+ "description": "Multilingual explanation shown post-submission on review screens.",
16046
+ "additionalProperties": {
16047
+ "type": "string"
16048
+ }
16049
+ },
16050
+ "answerKey": {
16051
+ "type": "string",
16052
+ "description": "Recruiter-only. The correct option id for `single-choice`. NEVER\nreturned by /v1/guest/attempts/* endpoints."
16053
+ },
16054
+ "scoringRubric": {
16055
+ "type": "string",
16056
+ "description": "Recruiter-only. Free-form scoring rubric the AI evaluator uses\nfor `open-text`. NEVER returned by guest endpoints."
16057
+ }
16058
+ }
16059
+ }
15874
16060
  },
15875
16061
  "timestamps": {
15876
16062
  "title": "ResourceTimestampsSchema",
@@ -15990,21 +16176,23 @@
15990
16176
  },
15991
16177
  "attributes": {
15992
16178
  "title": "AssessmentAttributesSchema",
16179
+ "description": "Template-only attributes for an assessment. The candidate's run of an\nassessment (answers, scores, evaluation, proctoring) lives on the\nAttempt resource - see AttemptAttributesSchema.",
15993
16180
  "type": "object",
15994
16181
  "properties": {
15995
16182
  "status": {
15996
16183
  "type": "string",
16184
+ "description": "Template lifecycle. Candidate-side state (inProgress/submitted/\nevaluated/etc.) lives on attempts. `pending` is a transient state\nset when the AI Generate Step Function is in flight - the row\nflips to `active` once questions land.",
15997
16185
  "enum": [
15998
- "pending",
15999
- "in_progress",
16000
- "completed",
16001
- "evaluated",
16002
- "expired",
16003
- "failed"
16186
+ "draft",
16187
+ "active",
16188
+ "archived",
16189
+ "failed",
16190
+ "pending"
16004
16191
  ]
16005
16192
  },
16006
16193
  "duration": {
16007
- "type": "integer"
16194
+ "type": "integer",
16195
+ "description": "Time limit for the candidate to complete the assessment, in minutes. Defaults to 30."
16008
16196
  },
16009
16197
  "antiCheatingLevel": {
16010
16198
  "type": "string",
@@ -16014,17 +16202,170 @@
16014
16202
  "RIGOROUS"
16015
16203
  ]
16016
16204
  },
16017
- "totalScore": {
16018
- "type": "number"
16019
- },
16020
16205
  "passingScore": {
16021
- "type": "number"
16022
- },
16023
- "passed": {
16024
- "type": "boolean"
16206
+ "type": "number",
16207
+ "description": "Score threshold (0-100) for `evaluation.passed=true` on attempts of this template. Defaults to 60."
16025
16208
  },
16026
16209
  "languageCode": {
16027
- "type": "string"
16210
+ "type": "string",
16211
+ "description": "Default language tag used when the candidate UI doesn't specify one (e.g. 'en-US', 'pl-PL')."
16212
+ },
16213
+ "name": {
16214
+ "type": "object",
16215
+ "description": "Multilingual template name. Keys are locale tags, values are the localized title.",
16216
+ "additionalProperties": {
16217
+ "type": "string"
16218
+ }
16219
+ },
16220
+ "description": {
16221
+ "type": "object",
16222
+ "description": "Multilingual template description shown to the candidate before they start.",
16223
+ "additionalProperties": {
16224
+ "type": "string"
16225
+ }
16226
+ },
16227
+ "questions": {
16228
+ "type": "array",
16229
+ "description": "Question bank. See QuestionSchema for per-type schemas.",
16230
+ "items": {
16231
+ "title": "QuestionSchema",
16232
+ "description": "A single assessment question. Eight question types - the optional\nfields below are interpreted based on `type`. See\n`Question.value` shapes in AnswerSchema for what the candidate\nsends back per type.\n\nSECURITY: `answerKey`, `scoringRubric`, and `options[].isCorrect`\nare stripped server-side before responses are returned to candidates\nvia /v1/guest/attempts/* - they are recruiter-only fields.",
16233
+ "type": "object",
16234
+ "required": [
16235
+ "questionId",
16236
+ "type"
16237
+ ],
16238
+ "properties": {
16239
+ "questionId": {
16240
+ "type": "string",
16241
+ "description": "Stable identifier (e.g. 'q1'). Candidates' answers reference this."
16242
+ },
16243
+ "type": {
16244
+ "type": "string",
16245
+ "enum": [
16246
+ "single-choice",
16247
+ "multiple-choice",
16248
+ "scale",
16249
+ "open-text",
16250
+ "ranking",
16251
+ "situational-judgment",
16252
+ "file-upload",
16253
+ "video-recording"
16254
+ ]
16255
+ },
16256
+ "category": {
16257
+ "type": "string",
16258
+ "description": "Free-form tag for analytics (e.g. 'soft-skills', 'hard-skills', 'general')."
16259
+ },
16260
+ "difficulty": {
16261
+ "type": "string",
16262
+ "enum": [
16263
+ "easy",
16264
+ "medium",
16265
+ "hard"
16266
+ ]
16267
+ },
16268
+ "points": {
16269
+ "type": "number",
16270
+ "description": "Maximum score for this question. Defaults to 1."
16271
+ },
16272
+ "required": {
16273
+ "type": "boolean"
16274
+ },
16275
+ "text": {
16276
+ "type": "object",
16277
+ "description": "Multilingual question text.",
16278
+ "additionalProperties": {
16279
+ "type": "string"
16280
+ }
16281
+ },
16282
+ "options": {
16283
+ "type": "array",
16284
+ "description": "Choices for single-choice / multiple-choice / ranking /\nsituational-judgment. Canonical shape is\n`{ id, text: { locale: string }, isCorrect?: bool }`. Bare\nlocale-map options exist in legacy data but are deprecated.",
16285
+ "items": {
16286
+ "type": "object",
16287
+ "properties": {
16288
+ "id": {
16289
+ "type": "string",
16290
+ "description": "Stable option id - candidates' answers reference this."
16291
+ },
16292
+ "text": {
16293
+ "type": "object",
16294
+ "additionalProperties": {
16295
+ "type": "string"
16296
+ }
16297
+ },
16298
+ "isCorrect": {
16299
+ "type": "boolean",
16300
+ "description": "Recruiter-only. Stripped server-side from guest responses."
16301
+ }
16302
+ }
16303
+ }
16304
+ },
16305
+ "scaleMin": {
16306
+ "type": "integer",
16307
+ "description": "Lower bound for `scale` type questions."
16308
+ },
16309
+ "scaleMax": {
16310
+ "type": "integer",
16311
+ "description": "Upper bound for `scale` type questions."
16312
+ },
16313
+ "scaleLabels": {
16314
+ "type": "object",
16315
+ "description": "Optional labels per step value, multilingual.\n`{ \"1\": { \"en-US\": \"Strongly disagree\" }, \"5\": { \"en-US\": \"Strongly agree\" } }`.",
16316
+ "additionalProperties": {
16317
+ "type": "object",
16318
+ "additionalProperties": {
16319
+ "type": "string"
16320
+ }
16321
+ }
16322
+ },
16323
+ "placeholder": {
16324
+ "type": "object",
16325
+ "description": "Multilingual placeholder text for `open-text` questions.",
16326
+ "additionalProperties": {
16327
+ "type": "string"
16328
+ }
16329
+ },
16330
+ "scenario": {
16331
+ "type": "object",
16332
+ "description": "Multilingual scenario body for `situational-judgment` questions.",
16333
+ "additionalProperties": {
16334
+ "type": "string"
16335
+ }
16336
+ },
16337
+ "acceptedFormats": {
16338
+ "type": "array",
16339
+ "description": "Accepted MIME or extension list for `file-upload` (e.g. ['.pdf', '.png']).",
16340
+ "items": {
16341
+ "type": "string"
16342
+ }
16343
+ },
16344
+ "maxDuration": {
16345
+ "type": "integer",
16346
+ "description": "Maximum recording length in seconds for `video-recording`."
16347
+ },
16348
+ "maxAttempts": {
16349
+ "type": "integer",
16350
+ "description": "Maximum recording retakes the candidate may use on `video-recording`."
16351
+ },
16352
+ "explanation": {
16353
+ "type": "object",
16354
+ "description": "Multilingual explanation shown post-submission on review screens.",
16355
+ "additionalProperties": {
16356
+ "type": "string"
16357
+ }
16358
+ },
16359
+ "answerKey": {
16360
+ "type": "string",
16361
+ "description": "Recruiter-only. The correct option id for `single-choice`. NEVER\nreturned by /v1/guest/attempts/* endpoints."
16362
+ },
16363
+ "scoringRubric": {
16364
+ "type": "string",
16365
+ "description": "Recruiter-only. Free-form scoring rubric the AI evaluator uses\nfor `open-text`. NEVER returned by guest endpoints."
16366
+ }
16367
+ }
16368
+ }
16028
16369
  },
16029
16370
  "timestamps": {
16030
16371
  "title": "ResourceTimestampsSchema",
@@ -16055,7 +16396,16 @@
16055
16396
  "description": "Delete Assessment",
16056
16397
  "parameters": {
16057
16398
  "type": "object",
16058
- "properties": {}
16399
+ "properties": {
16400
+ "permanentDelete": {
16401
+ "type": "string",
16402
+ "description": "When `true`, hard-delete the row. Otherwise sets status to archived.",
16403
+ "enum": [
16404
+ "true",
16405
+ "false"
16406
+ ]
16407
+ }
16408
+ }
16059
16409
  }
16060
16410
  }
16061
16411
  },
@@ -16076,12 +16426,14 @@
16076
16426
  "name": "create_attempt",
16077
16427
  "description": "Create Attempt",
16078
16428
  "parameters": {
16429
+ "title": "CreateAttemptRequestBody",
16079
16430
  "type": "object",
16080
16431
  "required": [
16081
16432
  "data"
16082
16433
  ],
16083
16434
  "properties": {
16084
16435
  "data": {
16436
+ "title": "CreateAttemptRequestBodyData",
16085
16437
  "type": "object",
16086
16438
  "required": [
16087
16439
  "type",
@@ -16095,35 +16447,354 @@
16095
16447
  ]
16096
16448
  },
16097
16449
  "attributes": {
16450
+ "title": "AttemptAttributesSchema",
16098
16451
  "type": "object",
16099
16452
  "properties": {
16453
+ "status": {
16454
+ "type": "string",
16455
+ "description": "Attempt lifecycle. Set server-side; only `submitted` is candidate-writable (via guest PATCH).",
16456
+ "enum": [
16457
+ "pending",
16458
+ "inProgress",
16459
+ "submitted",
16460
+ "evaluated",
16461
+ "reviewed",
16462
+ "anonymized",
16463
+ "failed"
16464
+ ]
16465
+ },
16100
16466
  "languageCode": {
16101
- "type": "string"
16467
+ "type": "string",
16468
+ "description": "Locale the candidate is taking the assessment in (e.g. 'en-US')."
16102
16469
  },
16103
- "durationMinutes": {
16104
- "type": "number"
16470
+ "answers": {
16471
+ "type": "array",
16472
+ "description": "Candidate's answers, one per attempted question. See AnswerSchema.",
16473
+ "items": {
16474
+ "title": "AnswerSchema",
16475
+ "description": "A candidate's answer to one question. The `value` shape depends\non the question type - branch on `questionType` to know how to\nread it. File uploads (file-upload / video-recording question\ntypes) live in the separate `files` array, NOT in `value`. This\nmirrors the wire shape used by /v1/guest/attempts/{id} PATCH\nand avoids OpenAPI generator collisions on multiple array\nvariants in a single oneOf.",
16476
+ "type": "object",
16477
+ "required": [
16478
+ "questionId"
16479
+ ],
16480
+ "properties": {
16481
+ "questionId": {
16482
+ "type": "string",
16483
+ "description": "References QuestionSchema.questionId."
16484
+ },
16485
+ "questionType": {
16486
+ "type": "string",
16487
+ "description": "Mirror of the question's type for client-side discrimination.",
16488
+ "enum": [
16489
+ "single-choice",
16490
+ "multiple-choice",
16491
+ "scale",
16492
+ "open-text",
16493
+ "ranking",
16494
+ "situational-judgment",
16495
+ "file-upload",
16496
+ "video-recording"
16497
+ ]
16498
+ },
16499
+ "value": {
16500
+ "description": "Non-file answer payload. Discriminated by questionType:\n single-choice -> string (option id)\n multiple-choice -> string[] (option ids)\n scale -> number\n open-text -> string\n ranking -> string[] (option ids in order)\n situational-judgment -> { best: string; worst: string }\n file-upload -> usually empty / null (use `files`)\n video-recording -> usually empty / null (use `files`)",
16501
+ "oneOf": [
16502
+ {
16503
+ "type": "string",
16504
+ "description": "single-choice / open-text"
16505
+ },
16506
+ {
16507
+ "type": "number",
16508
+ "description": "scale"
16509
+ },
16510
+ {
16511
+ "type": "array",
16512
+ "items": {
16513
+ "type": "string"
16514
+ },
16515
+ "description": "multiple-choice / ranking - array of option ids"
16516
+ },
16517
+ {
16518
+ "type": "object",
16519
+ "description": "situational-judgment",
16520
+ "properties": {
16521
+ "best": {
16522
+ "type": "string"
16523
+ },
16524
+ "worst": {
16525
+ "type": "string"
16526
+ }
16527
+ }
16528
+ }
16529
+ ]
16530
+ },
16531
+ "files": {
16532
+ "type": "array",
16533
+ "description": "File / video uploads for `file-upload` and `video-recording`\nquestion types. Empty for all other types. Files are uploaded\nvia presigned PUT to S3 first; this carries the resulting\nreferences.",
16534
+ "items": {
16535
+ "title": "AnswerFileSchema",
16536
+ "description": "File reference for upload-type answers. fileUrl is the S3 path; FE never writes there directly - server issues presigned PUT.",
16537
+ "type": "object",
16538
+ "properties": {
16539
+ "fileUrl": {
16540
+ "type": "string",
16541
+ "description": "S3 location (s3://bucket/key) - resolves to a presigned download URL on the recruiter review screen."
16542
+ },
16543
+ "originalFilename": {
16544
+ "type": "string"
16545
+ },
16546
+ "contentType": {
16547
+ "type": "string"
16548
+ },
16549
+ "size": {
16550
+ "type": "integer",
16551
+ "description": "Bytes."
16552
+ }
16553
+ }
16554
+ }
16555
+ }
16556
+ }
16557
+ }
16558
+ },
16559
+ "evaluation": {
16560
+ "title": "AttemptEvaluationSchema",
16561
+ "description": "AI scoring output. Populated by the evaluation Step Function\nafter the candidate submits. Hidden from the candidate response\nwhile status is below `evaluated`.",
16562
+ "type": "object",
16563
+ "properties": {
16564
+ "status": {
16565
+ "type": "string",
16566
+ "enum": [
16567
+ "pending",
16568
+ "running",
16569
+ "done",
16570
+ "failed"
16571
+ ]
16572
+ },
16573
+ "overallScore": {
16574
+ "type": "number",
16575
+ "description": "Aggregate score 0-100."
16576
+ },
16577
+ "passingScore": {
16578
+ "type": "number",
16579
+ "description": "Threshold copied from the template at evaluation time."
16580
+ },
16581
+ "passed": {
16582
+ "type": "boolean"
16583
+ },
16584
+ "perQuestion": {
16585
+ "type": "array",
16586
+ "items": {
16587
+ "type": "object",
16588
+ "required": [
16589
+ "questionId",
16590
+ "score"
16591
+ ],
16592
+ "properties": {
16593
+ "questionId": {
16594
+ "type": "string"
16595
+ },
16596
+ "score": {
16597
+ "type": "number"
16598
+ },
16599
+ "maxScore": {
16600
+ "type": "number"
16601
+ },
16602
+ "feedback": {
16603
+ "type": "string",
16604
+ "description": "1-2 sentence explanation in the candidate's language."
16605
+ },
16606
+ "rubricMatched": {
16607
+ "type": "array",
16608
+ "items": {
16609
+ "type": "string"
16610
+ },
16611
+ "description": "Recruiter-only. Stripped from guest responses."
16612
+ }
16613
+ }
16614
+ }
16615
+ },
16616
+ "summary": {
16617
+ "type": "string",
16618
+ "description": "AI-generated 2-3 paragraph plain-language summary of the candidate's performance."
16619
+ },
16620
+ "evaluatedAt": {
16621
+ "type": "string",
16622
+ "format": "date-time"
16623
+ },
16624
+ "evaluatorVersion": {
16625
+ "type": "string"
16626
+ },
16627
+ "error": {
16628
+ "type": "string",
16629
+ "description": "Set only when status=failed."
16630
+ }
16631
+ }
16632
+ },
16633
+ "proctoring": {
16634
+ "title": "AttemptProctoringSchema",
16635
+ "description": "Anti-cheat telemetry collected by the candidate UI. Not used to block, only to inform recruiters.",
16636
+ "type": "object",
16637
+ "properties": {
16638
+ "tabSwitches": {
16639
+ "type": "integer"
16640
+ },
16641
+ "pasteEvents": {
16642
+ "type": "integer"
16643
+ },
16644
+ "focusLost": {
16645
+ "type": "integer",
16646
+ "description": "Total milliseconds the window was unfocused."
16647
+ },
16648
+ "suspiciousFlags": {
16649
+ "type": "array",
16650
+ "items": {
16651
+ "type": "string"
16652
+ }
16653
+ }
16654
+ }
16655
+ },
16656
+ "startedAt": {
16657
+ "type": "string",
16658
+ "format": "date-time",
16659
+ "description": "When the candidate first opened the attempt link (status pending->inProgress)."
16660
+ },
16661
+ "submittedAt": {
16662
+ "type": "string",
16663
+ "format": "date-time",
16664
+ "description": "When the candidate finalised their answers (status inProgress->submitted)."
16665
+ },
16666
+ "evaluatedAt": {
16667
+ "type": "string",
16668
+ "format": "date-time",
16669
+ "description": "When the AI evaluator wrote the evaluation block (status submitted->evaluated)."
16105
16670
  },
16106
16671
  "expiresAt": {
16107
16672
  "type": "string",
16108
- "format": "date-time"
16673
+ "format": "date-time",
16674
+ "description": "Hard cutoff for the candidate to start. After this, /v1/guest/attempts rejects with 410-style errors."
16675
+ },
16676
+ "durationMinutes": {
16677
+ "type": "integer",
16678
+ "description": "Time limit for the candidate to complete the attempt. Inherited from the template by default."
16679
+ },
16680
+ "evaluatorVersion": {
16681
+ "type": "string",
16682
+ "description": "Identifier of the AI scorer that produced the evaluation (e.g. 'gpt-5-mini-v1'). Bumped on re-evaluate."
16683
+ },
16684
+ "assessmentId": {
16685
+ "type": "string",
16686
+ "description": "FK to the assessment template - same id as relationships.assessment.data.id, exposed flat for filter convenience."
16687
+ },
16688
+ "candidateId": {
16689
+ "type": "string",
16690
+ "description": "FK to the candidate - same id as relationships.candidate.data.id."
16691
+ },
16692
+ "timestamps": {
16693
+ "title": "ResourceTimestampsSchema",
16694
+ "type": "object",
16695
+ "properties": {
16696
+ "created": {
16697
+ "type": "string",
16698
+ "format": "date-time"
16699
+ },
16700
+ "modified": {
16701
+ "type": "string",
16702
+ "format": "date-time"
16703
+ }
16704
+ }
16109
16705
  }
16110
16706
  }
16111
16707
  },
16112
16708
  "relationships": {
16709
+ "title": "AttemptRelationshipsSchema",
16113
16710
  "type": "object",
16114
- "required": [
16115
- "assessment",
16116
- "candidate"
16117
- ],
16118
16711
  "properties": {
16119
16712
  "assessment": {
16120
- "type": "object"
16713
+ "title": "AttemptRelationshipsAssessmentSchema",
16714
+ "type": "object",
16715
+ "properties": {
16716
+ "data": {
16717
+ "title": "AttemptRelationshipsAssessmentDataSchema",
16718
+ "type": "object",
16719
+ "properties": {
16720
+ "type": {
16721
+ "type": "string",
16722
+ "enum": [
16723
+ "assessments"
16724
+ ]
16725
+ },
16726
+ "id": {
16727
+ "type": "string"
16728
+ }
16729
+ }
16730
+ }
16731
+ },
16732
+ "description": "FK to the template this attempt is a run of."
16121
16733
  },
16122
16734
  "candidate": {
16123
- "type": "object"
16735
+ "title": "AttemptRelationshipsCandidateSchema",
16736
+ "type": "object",
16737
+ "properties": {
16738
+ "data": {
16739
+ "title": "AttemptRelationshipsCandidateDataSchema",
16740
+ "type": "object",
16741
+ "properties": {
16742
+ "type": {
16743
+ "type": "string",
16744
+ "enum": [
16745
+ "candidates"
16746
+ ]
16747
+ },
16748
+ "id": {
16749
+ "type": "string"
16750
+ }
16751
+ }
16752
+ }
16753
+ }
16124
16754
  },
16125
16755
  "job": {
16126
- "type": "object"
16756
+ "title": "AttemptRelationshipsJobSchema",
16757
+ "type": "object",
16758
+ "properties": {
16759
+ "data": {
16760
+ "title": "AttemptRelationshipsJobDataSchema",
16761
+ "type": "object",
16762
+ "properties": {
16763
+ "type": {
16764
+ "type": "string",
16765
+ "enum": [
16766
+ "jobs"
16767
+ ]
16768
+ },
16769
+ "id": {
16770
+ "type": "string"
16771
+ }
16772
+ }
16773
+ }
16774
+ },
16775
+ "description": "Denormalised from the assessment template - the role this attempt is screening for."
16776
+ },
16777
+ "report": {
16778
+ "title": "AttemptRelationshipsReportSchema",
16779
+ "type": "object",
16780
+ "properties": {
16781
+ "data": {
16782
+ "title": "AttemptRelationshipsReportDataSchema",
16783
+ "type": "object",
16784
+ "properties": {
16785
+ "type": {
16786
+ "type": "string",
16787
+ "enum": [
16788
+ "files"
16789
+ ]
16790
+ },
16791
+ "id": {
16792
+ "type": "string"
16793
+ }
16794
+ }
16795
+ }
16796
+ },
16797
+ "description": "Generated PDF report for this attempt's evaluation. Populated post-evaluation."
16127
16798
  }
16128
16799
  }
16129
16800
  }
@@ -16226,12 +16897,14 @@
16226
16897
  "name": "update_attempt",
16227
16898
  "description": "Update Attempt",
16228
16899
  "parameters": {
16900
+ "title": "UpdateAttemptRequestBody",
16229
16901
  "type": "object",
16230
16902
  "required": [
16231
16903
  "data"
16232
16904
  ],
16233
16905
  "properties": {
16234
16906
  "data": {
16907
+ "title": "UpdateAttemptRequestBodyData",
16235
16908
  "type": "object",
16236
16909
  "required": [
16237
16910
  "type",
@@ -16248,10 +16921,263 @@
16248
16921
  "type": "string"
16249
16922
  },
16250
16923
  "attributes": {
16251
- "type": "object"
16252
- },
16253
- "relationships": {
16254
- "type": "object"
16924
+ "title": "AttemptAttributesSchema",
16925
+ "type": "object",
16926
+ "properties": {
16927
+ "status": {
16928
+ "type": "string",
16929
+ "description": "Attempt lifecycle. Set server-side; only `submitted` is candidate-writable (via guest PATCH).",
16930
+ "enum": [
16931
+ "pending",
16932
+ "inProgress",
16933
+ "submitted",
16934
+ "evaluated",
16935
+ "reviewed",
16936
+ "anonymized",
16937
+ "failed"
16938
+ ]
16939
+ },
16940
+ "languageCode": {
16941
+ "type": "string",
16942
+ "description": "Locale the candidate is taking the assessment in (e.g. 'en-US')."
16943
+ },
16944
+ "answers": {
16945
+ "type": "array",
16946
+ "description": "Candidate's answers, one per attempted question. See AnswerSchema.",
16947
+ "items": {
16948
+ "title": "AnswerSchema",
16949
+ "description": "A candidate's answer to one question. The `value` shape depends\non the question type - branch on `questionType` to know how to\nread it. File uploads (file-upload / video-recording question\ntypes) live in the separate `files` array, NOT in `value`. This\nmirrors the wire shape used by /v1/guest/attempts/{id} PATCH\nand avoids OpenAPI generator collisions on multiple array\nvariants in a single oneOf.",
16950
+ "type": "object",
16951
+ "required": [
16952
+ "questionId"
16953
+ ],
16954
+ "properties": {
16955
+ "questionId": {
16956
+ "type": "string",
16957
+ "description": "References QuestionSchema.questionId."
16958
+ },
16959
+ "questionType": {
16960
+ "type": "string",
16961
+ "description": "Mirror of the question's type for client-side discrimination.",
16962
+ "enum": [
16963
+ "single-choice",
16964
+ "multiple-choice",
16965
+ "scale",
16966
+ "open-text",
16967
+ "ranking",
16968
+ "situational-judgment",
16969
+ "file-upload",
16970
+ "video-recording"
16971
+ ]
16972
+ },
16973
+ "value": {
16974
+ "description": "Non-file answer payload. Discriminated by questionType:\n single-choice -> string (option id)\n multiple-choice -> string[] (option ids)\n scale -> number\n open-text -> string\n ranking -> string[] (option ids in order)\n situational-judgment -> { best: string; worst: string }\n file-upload -> usually empty / null (use `files`)\n video-recording -> usually empty / null (use `files`)",
16975
+ "oneOf": [
16976
+ {
16977
+ "type": "string",
16978
+ "description": "single-choice / open-text"
16979
+ },
16980
+ {
16981
+ "type": "number",
16982
+ "description": "scale"
16983
+ },
16984
+ {
16985
+ "type": "array",
16986
+ "items": {
16987
+ "type": "string"
16988
+ },
16989
+ "description": "multiple-choice / ranking - array of option ids"
16990
+ },
16991
+ {
16992
+ "type": "object",
16993
+ "description": "situational-judgment",
16994
+ "properties": {
16995
+ "best": {
16996
+ "type": "string"
16997
+ },
16998
+ "worst": {
16999
+ "type": "string"
17000
+ }
17001
+ }
17002
+ }
17003
+ ]
17004
+ },
17005
+ "files": {
17006
+ "type": "array",
17007
+ "description": "File / video uploads for `file-upload` and `video-recording`\nquestion types. Empty for all other types. Files are uploaded\nvia presigned PUT to S3 first; this carries the resulting\nreferences.",
17008
+ "items": {
17009
+ "title": "AnswerFileSchema",
17010
+ "description": "File reference for upload-type answers. fileUrl is the S3 path; FE never writes there directly - server issues presigned PUT.",
17011
+ "type": "object",
17012
+ "properties": {
17013
+ "fileUrl": {
17014
+ "type": "string",
17015
+ "description": "S3 location (s3://bucket/key) - resolves to a presigned download URL on the recruiter review screen."
17016
+ },
17017
+ "originalFilename": {
17018
+ "type": "string"
17019
+ },
17020
+ "contentType": {
17021
+ "type": "string"
17022
+ },
17023
+ "size": {
17024
+ "type": "integer",
17025
+ "description": "Bytes."
17026
+ }
17027
+ }
17028
+ }
17029
+ }
17030
+ }
17031
+ }
17032
+ },
17033
+ "evaluation": {
17034
+ "title": "AttemptEvaluationSchema",
17035
+ "description": "AI scoring output. Populated by the evaluation Step Function\nafter the candidate submits. Hidden from the candidate response\nwhile status is below `evaluated`.",
17036
+ "type": "object",
17037
+ "properties": {
17038
+ "status": {
17039
+ "type": "string",
17040
+ "enum": [
17041
+ "pending",
17042
+ "running",
17043
+ "done",
17044
+ "failed"
17045
+ ]
17046
+ },
17047
+ "overallScore": {
17048
+ "type": "number",
17049
+ "description": "Aggregate score 0-100."
17050
+ },
17051
+ "passingScore": {
17052
+ "type": "number",
17053
+ "description": "Threshold copied from the template at evaluation time."
17054
+ },
17055
+ "passed": {
17056
+ "type": "boolean"
17057
+ },
17058
+ "perQuestion": {
17059
+ "type": "array",
17060
+ "items": {
17061
+ "type": "object",
17062
+ "required": [
17063
+ "questionId",
17064
+ "score"
17065
+ ],
17066
+ "properties": {
17067
+ "questionId": {
17068
+ "type": "string"
17069
+ },
17070
+ "score": {
17071
+ "type": "number"
17072
+ },
17073
+ "maxScore": {
17074
+ "type": "number"
17075
+ },
17076
+ "feedback": {
17077
+ "type": "string",
17078
+ "description": "1-2 sentence explanation in the candidate's language."
17079
+ },
17080
+ "rubricMatched": {
17081
+ "type": "array",
17082
+ "items": {
17083
+ "type": "string"
17084
+ },
17085
+ "description": "Recruiter-only. Stripped from guest responses."
17086
+ }
17087
+ }
17088
+ }
17089
+ },
17090
+ "summary": {
17091
+ "type": "string",
17092
+ "description": "AI-generated 2-3 paragraph plain-language summary of the candidate's performance."
17093
+ },
17094
+ "evaluatedAt": {
17095
+ "type": "string",
17096
+ "format": "date-time"
17097
+ },
17098
+ "evaluatorVersion": {
17099
+ "type": "string"
17100
+ },
17101
+ "error": {
17102
+ "type": "string",
17103
+ "description": "Set only when status=failed."
17104
+ }
17105
+ }
17106
+ },
17107
+ "proctoring": {
17108
+ "title": "AttemptProctoringSchema",
17109
+ "description": "Anti-cheat telemetry collected by the candidate UI. Not used to block, only to inform recruiters.",
17110
+ "type": "object",
17111
+ "properties": {
17112
+ "tabSwitches": {
17113
+ "type": "integer"
17114
+ },
17115
+ "pasteEvents": {
17116
+ "type": "integer"
17117
+ },
17118
+ "focusLost": {
17119
+ "type": "integer",
17120
+ "description": "Total milliseconds the window was unfocused."
17121
+ },
17122
+ "suspiciousFlags": {
17123
+ "type": "array",
17124
+ "items": {
17125
+ "type": "string"
17126
+ }
17127
+ }
17128
+ }
17129
+ },
17130
+ "startedAt": {
17131
+ "type": "string",
17132
+ "format": "date-time",
17133
+ "description": "When the candidate first opened the attempt link (status pending->inProgress)."
17134
+ },
17135
+ "submittedAt": {
17136
+ "type": "string",
17137
+ "format": "date-time",
17138
+ "description": "When the candidate finalised their answers (status inProgress->submitted)."
17139
+ },
17140
+ "evaluatedAt": {
17141
+ "type": "string",
17142
+ "format": "date-time",
17143
+ "description": "When the AI evaluator wrote the evaluation block (status submitted->evaluated)."
17144
+ },
17145
+ "expiresAt": {
17146
+ "type": "string",
17147
+ "format": "date-time",
17148
+ "description": "Hard cutoff for the candidate to start. After this, /v1/guest/attempts rejects with 410-style errors."
17149
+ },
17150
+ "durationMinutes": {
17151
+ "type": "integer",
17152
+ "description": "Time limit for the candidate to complete the attempt. Inherited from the template by default."
17153
+ },
17154
+ "evaluatorVersion": {
17155
+ "type": "string",
17156
+ "description": "Identifier of the AI scorer that produced the evaluation (e.g. 'gpt-5-mini-v1'). Bumped on re-evaluate."
17157
+ },
17158
+ "assessmentId": {
17159
+ "type": "string",
17160
+ "description": "FK to the assessment template - same id as relationships.assessment.data.id, exposed flat for filter convenience."
17161
+ },
17162
+ "candidateId": {
17163
+ "type": "string",
17164
+ "description": "FK to the candidate - same id as relationships.candidate.data.id."
17165
+ },
17166
+ "timestamps": {
17167
+ "title": "ResourceTimestampsSchema",
17168
+ "type": "object",
17169
+ "properties": {
17170
+ "created": {
17171
+ "type": "string",
17172
+ "format": "date-time"
17173
+ },
17174
+ "modified": {
17175
+ "type": "string",
17176
+ "format": "date-time"
17177
+ }
17178
+ }
17179
+ }
17180
+ }
16255
17181
  }
16256
17182
  }
16257
17183
  }
@@ -16343,6 +17269,8 @@
16343
17269
  }
16344
17270
  },
16345
17271
  "meta": {
17272
+ "title": "GuestMetaSchema",
17273
+ "description": "Auth context for unauthenticated /v1/guest/attempts/* writes.\ntenantId scopes the call; accessToken is the per-attempt token\nissued at create time. Token mismatch returns 404 (intentionally\nindistinguishable from \"attempt not found\" so we don't leak\nattempt existence).",
16346
17274
  "type": "object",
16347
17275
  "required": [
16348
17276
  "tenantId",
@@ -16477,6 +17405,8 @@
16477
17405
  }
16478
17406
  },
16479
17407
  "meta": {
17408
+ "title": "GuestMetaSchema",
17409
+ "description": "Auth context for unauthenticated /v1/guest/attempts/* writes.\ntenantId scopes the call; accessToken is the per-attempt token\nissued at create time. Token mismatch returns 404 (intentionally\nindistinguishable from \"attempt not found\" so we don't leak\nattempt existence).",
16480
17410
  "type": "object",
16481
17411
  "required": [
16482
17412
  "tenantId",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartytalent/openai-tools",
3
- "version": "0.1.33-dev.36",
3
+ "version": "0.1.33-dev.38",
4
4
  "description": "OpenAI function/tool definitions for SmartyTalent API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",