@smartytalent/openai-tools 0.1.29 → 0.1.30

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 (4) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +99 -0
  3. package/dist/tools.json +567 -151
  4. package/package.json +2 -2
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Copyright (c) 2026 SmartyTalent (SmartyMeet sp. z o.o.)
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for describing the origin of the Work and
143
+ reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may accept support,
169
+ warranty, indemnity, or other liability obligations and/or rights
170
+ consistent with this License. However, in accepting such obligations,
171
+ You may act only on Your own behalf and on Your sole responsibility,
172
+ not on behalf of any other Contributor, and only if You agree to
173
+ indemnify, defend, and hold each Contributor harmless for any
174
+ liability incurred by, or claims asserted against, such Contributor
175
+ by reason of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 SmartyTalent (SmartyMeet sp. z o.o.)
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # @smartytalent/openai-tools
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@smartytalent/openai-tools.svg)](https://www.npmjs.com/package/@smartytalent/openai-tools)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@smartytalent/openai-tools.svg)](https://www.npmjs.com/package/@smartytalent/openai-tools)
5
+
6
+ OpenAI **function / tool calling** definitions for the **SmartyTalent** recruitment API.
7
+
8
+ This package ships a pre-built `tools.json` generated from the SmartyTalent OpenAPI spec — one tool per API operation — ready to drop into the `tools` parameter of the OpenAI Chat Completions or Responses API.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @smartytalent/openai-tools
14
+ ```
15
+
16
+ ## What's inside
17
+
18
+ An array of tool definitions in OpenAI's `{ type: "function", function: {...} }` format:
19
+
20
+ ```ts
21
+ interface OpenAITool {
22
+ type: 'function'
23
+ function: {
24
+ name: string // snake_case, e.g. "list_tenants"
25
+ description: string // from OpenAPI summary/description
26
+ parameters: Record<string, unknown> // JSON Schema
27
+ }
28
+ }
29
+ ```
30
+
31
+ ## Quick start
32
+
33
+ ```ts
34
+ import OpenAI from 'openai'
35
+ import { tools } from '@smartytalent/openai-tools'
36
+
37
+ const openai = new OpenAI()
38
+
39
+ const response = await openai.chat.completions.create({
40
+ model: 'gpt-4o',
41
+ messages: [{ role: 'user', content: 'List all active tenants' }],
42
+ tools,
43
+ })
44
+
45
+ const toolCall = response.choices[0].message.tool_calls?.[0]
46
+ if (toolCall) {
47
+ const args = JSON.parse(toolCall.function.arguments)
48
+ const result = await executeSmartyTalentTool(toolCall.function.name, args)
49
+ // feed result back into the conversation...
50
+ }
51
+ ```
52
+
53
+ ## Executing tool calls
54
+
55
+ This package **only defines the tool schemas** — it doesn't ship an executor. Pair it with [`@smartytalent/api-client`](https://www.npmjs.com/package/@smartytalent/api-client) to dispatch tool calls against the live API:
56
+
57
+ ```ts
58
+ import { Configuration, TenantsApi } from '@smartytalent/api-client'
59
+
60
+ const config = new Configuration({ basePath: '...', apiKey: `Bearer ${token}` })
61
+
62
+ async function executeSmartyTalentTool(name: string, args: Record<string, unknown>) {
63
+ switch (name) {
64
+ case 'list_tenants':
65
+ return new TenantsApi(config).listTenants(args)
66
+ // ... map other tool names to their API methods
67
+ }
68
+ }
69
+ ```
70
+
71
+ A generic dispatcher can be built by parsing the tool name back to an operationId and routing through the appropriate API class.
72
+
73
+ ## Filtering the tool catalog
74
+
75
+ The API exposes a lot of operations — feeding all of them to a model wastes context. Filter to the ones relevant for your use case:
76
+
77
+ ```ts
78
+ import { tools } from '@smartytalent/openai-tools'
79
+
80
+ const candidateTools = tools.filter((t) =>
81
+ t.function.name.includes('candidate') || t.function.name.includes('job'),
82
+ )
83
+ ```
84
+
85
+ ## Raw JSON
86
+
87
+ ```ts
88
+ import tools from '@smartytalent/openai-tools/dist/tools.json'
89
+ ```
90
+
91
+ ## Versioning
92
+
93
+ Published in lockstep with `@smartytalent/api-client`. Pin both packages to the same version.
94
+
95
+ ## License
96
+
97
+ Licensed under the [Apache License, Version 2.0](./LICENSE).
98
+
99
+ Copyright © 2026 SmartyTalent (SmartyMeet sp. z o.o.)
package/dist/tools.json CHANGED
@@ -227,10 +227,6 @@
227
227
  "type": "string",
228
228
  "description": "Email address assigned to the Boe AI agent for this tenant"
229
229
  },
230
- "defaultFeedbackId": {
231
- "type": "string",
232
- "description": "Tenant-wide default feedback configuration applied when a job has no feedback override. Set to null to clear."
233
- },
234
230
  "defaultFormId": {
235
231
  "type": "string",
236
232
  "description": "Tenant-wide default form used for guest submissions when no job-specific form is configured. Set to null to clear."
@@ -239,7 +235,31 @@
239
235
  },
240
236
  "relationships": {
241
237
  "title": "TenantRelationshipsSchema",
242
- "type": "object"
238
+ "type": "object",
239
+ "properties": {
240
+ "feedbacks": {
241
+ "title": "TenantRelationshipsFeedbacksSchema",
242
+ "type": "object",
243
+ "description": "Tenant-wide default feedback configurations. Up to one per stage (screening, assessment). Used when the job has no stage-specific feedback override.",
244
+ "properties": {
245
+ "data": {
246
+ "type": "array",
247
+ "items": {
248
+ "title": "TenantRelationshipsFeedbacksDataSchema",
249
+ "type": "object",
250
+ "properties": {
251
+ "type": {
252
+ "type": "string"
253
+ },
254
+ "id": {
255
+ "type": "string"
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
243
263
  }
244
264
  }
245
265
  }
@@ -441,10 +461,6 @@
441
461
  "type": "string",
442
462
  "description": "Email address assigned to the Boe AI agent for this tenant"
443
463
  },
444
- "defaultFeedbackId": {
445
- "type": "string",
446
- "description": "Tenant-wide default feedback configuration applied when a job has no feedback override. Set to null to clear."
447
- },
448
464
  "defaultFormId": {
449
465
  "type": "string",
450
466
  "description": "Tenant-wide default form used for guest submissions when no job-specific form is configured. Set to null to clear."
@@ -7178,98 +7194,298 @@
7178
7194
  "title": "FeedbackAttributesSchema",
7179
7195
  "type": "object",
7180
7196
  "required": [
7181
- "name"
7197
+ "name",
7198
+ "stage"
7182
7199
  ],
7183
7200
  "properties": {
7184
7201
  "name": {
7185
7202
  "type": "string"
7186
7203
  },
7187
- "transparency": {
7204
+ "stage": {
7188
7205
  "type": "string",
7189
7206
  "enum": [
7190
- "generic",
7191
- "category",
7192
- "specific"
7193
- ]
7207
+ "screening",
7208
+ "assessment"
7209
+ ],
7210
+ "description": "Pipeline stage this feedback configuration applies to. Matches candidate.stage."
7194
7211
  },
7195
- "tone": {
7212
+ "status": {
7196
7213
  "type": "string",
7197
7214
  "enum": [
7198
- "casual",
7199
- "formal",
7200
- "superFormal"
7215
+ "active",
7216
+ "draft",
7217
+ "archived",
7218
+ "failed"
7201
7219
  ]
7202
7220
  },
7203
- "delay": {
7204
- "type": "integer",
7205
- "default": 72
7206
- },
7207
- "respectBusinessDays": {
7208
- "type": "boolean",
7209
- "default": false
7221
+ "source": {
7222
+ "type": "string"
7210
7223
  },
7211
- "signature": {
7224
+ "outcomes": {
7225
+ "title": "FeedbackOutcomesSchema",
7212
7226
  "type": "object",
7227
+ "description": "Per-outcome feedback rules. Outcome keys map to candidate.recommendationStatusCode: 1=notFit, 2=maybe, 3=fit. Code 0 (not evaluated) never triggers feedback — the workflow pauses instead.",
7213
7228
  "properties": {
7214
- "name": {
7215
- "type": "string"
7229
+ "notFit": {
7230
+ "title": "FeedbackOutcomeRuleSchema",
7231
+ "type": "object",
7232
+ "description": "Feedback rule for a single outcome within a stage. Every field is per-outcome; there are no top-level defaults.",
7233
+ "properties": {
7234
+ "enabled": {
7235
+ "type": "boolean",
7236
+ "default": false,
7237
+ "description": "When false, the workflow skips the feedback email for this outcome. The admin handles the candidate manually."
7238
+ },
7239
+ "tone": {
7240
+ "type": "string",
7241
+ "enum": [
7242
+ "casual",
7243
+ "formal",
7244
+ "superFormal"
7245
+ ]
7246
+ },
7247
+ "transparency": {
7248
+ "type": "string",
7249
+ "enum": [
7250
+ "generic",
7251
+ "category",
7252
+ "specific"
7253
+ ]
7254
+ },
7255
+ "delay": {
7256
+ "type": "integer",
7257
+ "default": 72
7258
+ },
7259
+ "respectBusinessDays": {
7260
+ "type": "boolean",
7261
+ "default": false
7262
+ },
7263
+ "aiDisclosure": {
7264
+ "type": "boolean",
7265
+ "default": true
7266
+ },
7267
+ "signature": {
7268
+ "type": "object",
7269
+ "properties": {
7270
+ "name": {
7271
+ "type": "string"
7272
+ },
7273
+ "title": {
7274
+ "type": "string"
7275
+ },
7276
+ "company": {
7277
+ "type": "string"
7278
+ }
7279
+ }
7280
+ },
7281
+ "instructions": {
7282
+ "type": "string"
7283
+ },
7284
+ "categories": {
7285
+ "type": "array",
7286
+ "items": {
7287
+ "type": "string"
7288
+ }
7289
+ },
7290
+ "reasons": {
7291
+ "type": "array",
7292
+ "items": {
7293
+ "type": "string"
7294
+ }
7295
+ },
7296
+ "links": {
7297
+ "type": "array",
7298
+ "items": {
7299
+ "type": "object",
7300
+ "properties": {
7301
+ "label": {
7302
+ "type": "string"
7303
+ },
7304
+ "url": {
7305
+ "type": "string"
7306
+ }
7307
+ }
7308
+ }
7309
+ },
7310
+ "feedbackFormUrl": {
7311
+ "type": "string"
7312
+ }
7313
+ }
7216
7314
  },
7217
- "title": {
7218
- "type": "string"
7315
+ "maybe": {
7316
+ "title": "FeedbackOutcomeRuleSchema",
7317
+ "type": "object",
7318
+ "description": "Feedback rule for a single outcome within a stage. Every field is per-outcome; there are no top-level defaults.",
7319
+ "properties": {
7320
+ "enabled": {
7321
+ "type": "boolean",
7322
+ "default": false,
7323
+ "description": "When false, the workflow skips the feedback email for this outcome. The admin handles the candidate manually."
7324
+ },
7325
+ "tone": {
7326
+ "type": "string",
7327
+ "enum": [
7328
+ "casual",
7329
+ "formal",
7330
+ "superFormal"
7331
+ ]
7332
+ },
7333
+ "transparency": {
7334
+ "type": "string",
7335
+ "enum": [
7336
+ "generic",
7337
+ "category",
7338
+ "specific"
7339
+ ]
7340
+ },
7341
+ "delay": {
7342
+ "type": "integer",
7343
+ "default": 72
7344
+ },
7345
+ "respectBusinessDays": {
7346
+ "type": "boolean",
7347
+ "default": false
7348
+ },
7349
+ "aiDisclosure": {
7350
+ "type": "boolean",
7351
+ "default": true
7352
+ },
7353
+ "signature": {
7354
+ "type": "object",
7355
+ "properties": {
7356
+ "name": {
7357
+ "type": "string"
7358
+ },
7359
+ "title": {
7360
+ "type": "string"
7361
+ },
7362
+ "company": {
7363
+ "type": "string"
7364
+ }
7365
+ }
7366
+ },
7367
+ "instructions": {
7368
+ "type": "string"
7369
+ },
7370
+ "categories": {
7371
+ "type": "array",
7372
+ "items": {
7373
+ "type": "string"
7374
+ }
7375
+ },
7376
+ "reasons": {
7377
+ "type": "array",
7378
+ "items": {
7379
+ "type": "string"
7380
+ }
7381
+ },
7382
+ "links": {
7383
+ "type": "array",
7384
+ "items": {
7385
+ "type": "object",
7386
+ "properties": {
7387
+ "label": {
7388
+ "type": "string"
7389
+ },
7390
+ "url": {
7391
+ "type": "string"
7392
+ }
7393
+ }
7394
+ }
7395
+ },
7396
+ "feedbackFormUrl": {
7397
+ "type": "string"
7398
+ }
7399
+ }
7219
7400
  },
7220
- "company": {
7221
- "type": "string"
7222
- }
7223
- }
7224
- },
7225
- "aiDisclosure": {
7226
- "type": "boolean",
7227
- "default": true
7228
- },
7229
- "instructions": {
7230
- "type": "string"
7231
- },
7232
- "categories": {
7233
- "type": "array",
7234
- "items": {
7235
- "type": "string"
7236
- }
7237
- },
7238
- "reasons": {
7239
- "type": "array",
7240
- "items": {
7241
- "type": "string"
7242
- }
7243
- },
7244
- "links": {
7245
- "type": "array",
7246
- "items": {
7247
- "type": "object",
7248
- "properties": {
7249
- "label": {
7250
- "type": "string"
7251
- },
7252
- "url": {
7253
- "type": "string"
7401
+ "fit": {
7402
+ "title": "FeedbackOutcomeRuleSchema",
7403
+ "type": "object",
7404
+ "description": "Feedback rule for a single outcome within a stage. Every field is per-outcome; there are no top-level defaults.",
7405
+ "properties": {
7406
+ "enabled": {
7407
+ "type": "boolean",
7408
+ "default": false,
7409
+ "description": "When false, the workflow skips the feedback email for this outcome. The admin handles the candidate manually."
7410
+ },
7411
+ "tone": {
7412
+ "type": "string",
7413
+ "enum": [
7414
+ "casual",
7415
+ "formal",
7416
+ "superFormal"
7417
+ ]
7418
+ },
7419
+ "transparency": {
7420
+ "type": "string",
7421
+ "enum": [
7422
+ "generic",
7423
+ "category",
7424
+ "specific"
7425
+ ]
7426
+ },
7427
+ "delay": {
7428
+ "type": "integer",
7429
+ "default": 72
7430
+ },
7431
+ "respectBusinessDays": {
7432
+ "type": "boolean",
7433
+ "default": false
7434
+ },
7435
+ "aiDisclosure": {
7436
+ "type": "boolean",
7437
+ "default": true
7438
+ },
7439
+ "signature": {
7440
+ "type": "object",
7441
+ "properties": {
7442
+ "name": {
7443
+ "type": "string"
7444
+ },
7445
+ "title": {
7446
+ "type": "string"
7447
+ },
7448
+ "company": {
7449
+ "type": "string"
7450
+ }
7451
+ }
7452
+ },
7453
+ "instructions": {
7454
+ "type": "string"
7455
+ },
7456
+ "categories": {
7457
+ "type": "array",
7458
+ "items": {
7459
+ "type": "string"
7460
+ }
7461
+ },
7462
+ "reasons": {
7463
+ "type": "array",
7464
+ "items": {
7465
+ "type": "string"
7466
+ }
7467
+ },
7468
+ "links": {
7469
+ "type": "array",
7470
+ "items": {
7471
+ "type": "object",
7472
+ "properties": {
7473
+ "label": {
7474
+ "type": "string"
7475
+ },
7476
+ "url": {
7477
+ "type": "string"
7478
+ }
7479
+ }
7480
+ }
7481
+ },
7482
+ "feedbackFormUrl": {
7483
+ "type": "string"
7484
+ }
7254
7485
  }
7255
7486
  }
7256
7487
  }
7257
7488
  },
7258
- "feedbackFormUrl": {
7259
- "type": "string"
7260
- },
7261
- "status": {
7262
- "type": "string",
7263
- "enum": [
7264
- "active",
7265
- "draft",
7266
- "archived",
7267
- "failed"
7268
- ]
7269
- },
7270
- "source": {
7271
- "type": "string"
7272
- },
7273
7489
  "timestamps": {
7274
7490
  "title": "ResourceTimestampsSchema",
7275
7491
  "type": "object",
@@ -7386,98 +7602,298 @@
7386
7602
  "title": "FeedbackAttributesSchema",
7387
7603
  "type": "object",
7388
7604
  "required": [
7389
- "name"
7605
+ "name",
7606
+ "stage"
7390
7607
  ],
7391
7608
  "properties": {
7392
7609
  "name": {
7393
7610
  "type": "string"
7394
7611
  },
7395
- "transparency": {
7612
+ "stage": {
7396
7613
  "type": "string",
7397
7614
  "enum": [
7398
- "generic",
7399
- "category",
7400
- "specific"
7401
- ]
7615
+ "screening",
7616
+ "assessment"
7617
+ ],
7618
+ "description": "Pipeline stage this feedback configuration applies to. Matches candidate.stage."
7402
7619
  },
7403
- "tone": {
7620
+ "status": {
7404
7621
  "type": "string",
7405
7622
  "enum": [
7406
- "casual",
7407
- "formal",
7408
- "superFormal"
7623
+ "active",
7624
+ "draft",
7625
+ "archived",
7626
+ "failed"
7409
7627
  ]
7410
7628
  },
7411
- "delay": {
7412
- "type": "integer",
7413
- "default": 72
7414
- },
7415
- "respectBusinessDays": {
7416
- "type": "boolean",
7417
- "default": false
7629
+ "source": {
7630
+ "type": "string"
7418
7631
  },
7419
- "signature": {
7632
+ "outcomes": {
7633
+ "title": "FeedbackOutcomesSchema",
7420
7634
  "type": "object",
7635
+ "description": "Per-outcome feedback rules. Outcome keys map to candidate.recommendationStatusCode: 1=notFit, 2=maybe, 3=fit. Code 0 (not evaluated) never triggers feedback — the workflow pauses instead.",
7421
7636
  "properties": {
7422
- "name": {
7423
- "type": "string"
7637
+ "notFit": {
7638
+ "title": "FeedbackOutcomeRuleSchema",
7639
+ "type": "object",
7640
+ "description": "Feedback rule for a single outcome within a stage. Every field is per-outcome; there are no top-level defaults.",
7641
+ "properties": {
7642
+ "enabled": {
7643
+ "type": "boolean",
7644
+ "default": false,
7645
+ "description": "When false, the workflow skips the feedback email for this outcome. The admin handles the candidate manually."
7646
+ },
7647
+ "tone": {
7648
+ "type": "string",
7649
+ "enum": [
7650
+ "casual",
7651
+ "formal",
7652
+ "superFormal"
7653
+ ]
7654
+ },
7655
+ "transparency": {
7656
+ "type": "string",
7657
+ "enum": [
7658
+ "generic",
7659
+ "category",
7660
+ "specific"
7661
+ ]
7662
+ },
7663
+ "delay": {
7664
+ "type": "integer",
7665
+ "default": 72
7666
+ },
7667
+ "respectBusinessDays": {
7668
+ "type": "boolean",
7669
+ "default": false
7670
+ },
7671
+ "aiDisclosure": {
7672
+ "type": "boolean",
7673
+ "default": true
7674
+ },
7675
+ "signature": {
7676
+ "type": "object",
7677
+ "properties": {
7678
+ "name": {
7679
+ "type": "string"
7680
+ },
7681
+ "title": {
7682
+ "type": "string"
7683
+ },
7684
+ "company": {
7685
+ "type": "string"
7686
+ }
7687
+ }
7688
+ },
7689
+ "instructions": {
7690
+ "type": "string"
7691
+ },
7692
+ "categories": {
7693
+ "type": "array",
7694
+ "items": {
7695
+ "type": "string"
7696
+ }
7697
+ },
7698
+ "reasons": {
7699
+ "type": "array",
7700
+ "items": {
7701
+ "type": "string"
7702
+ }
7703
+ },
7704
+ "links": {
7705
+ "type": "array",
7706
+ "items": {
7707
+ "type": "object",
7708
+ "properties": {
7709
+ "label": {
7710
+ "type": "string"
7711
+ },
7712
+ "url": {
7713
+ "type": "string"
7714
+ }
7715
+ }
7716
+ }
7717
+ },
7718
+ "feedbackFormUrl": {
7719
+ "type": "string"
7720
+ }
7721
+ }
7424
7722
  },
7425
- "title": {
7426
- "type": "string"
7723
+ "maybe": {
7724
+ "title": "FeedbackOutcomeRuleSchema",
7725
+ "type": "object",
7726
+ "description": "Feedback rule for a single outcome within a stage. Every field is per-outcome; there are no top-level defaults.",
7727
+ "properties": {
7728
+ "enabled": {
7729
+ "type": "boolean",
7730
+ "default": false,
7731
+ "description": "When false, the workflow skips the feedback email for this outcome. The admin handles the candidate manually."
7732
+ },
7733
+ "tone": {
7734
+ "type": "string",
7735
+ "enum": [
7736
+ "casual",
7737
+ "formal",
7738
+ "superFormal"
7739
+ ]
7740
+ },
7741
+ "transparency": {
7742
+ "type": "string",
7743
+ "enum": [
7744
+ "generic",
7745
+ "category",
7746
+ "specific"
7747
+ ]
7748
+ },
7749
+ "delay": {
7750
+ "type": "integer",
7751
+ "default": 72
7752
+ },
7753
+ "respectBusinessDays": {
7754
+ "type": "boolean",
7755
+ "default": false
7756
+ },
7757
+ "aiDisclosure": {
7758
+ "type": "boolean",
7759
+ "default": true
7760
+ },
7761
+ "signature": {
7762
+ "type": "object",
7763
+ "properties": {
7764
+ "name": {
7765
+ "type": "string"
7766
+ },
7767
+ "title": {
7768
+ "type": "string"
7769
+ },
7770
+ "company": {
7771
+ "type": "string"
7772
+ }
7773
+ }
7774
+ },
7775
+ "instructions": {
7776
+ "type": "string"
7777
+ },
7778
+ "categories": {
7779
+ "type": "array",
7780
+ "items": {
7781
+ "type": "string"
7782
+ }
7783
+ },
7784
+ "reasons": {
7785
+ "type": "array",
7786
+ "items": {
7787
+ "type": "string"
7788
+ }
7789
+ },
7790
+ "links": {
7791
+ "type": "array",
7792
+ "items": {
7793
+ "type": "object",
7794
+ "properties": {
7795
+ "label": {
7796
+ "type": "string"
7797
+ },
7798
+ "url": {
7799
+ "type": "string"
7800
+ }
7801
+ }
7802
+ }
7803
+ },
7804
+ "feedbackFormUrl": {
7805
+ "type": "string"
7806
+ }
7807
+ }
7427
7808
  },
7428
- "company": {
7429
- "type": "string"
7430
- }
7431
- }
7432
- },
7433
- "aiDisclosure": {
7434
- "type": "boolean",
7435
- "default": true
7436
- },
7437
- "instructions": {
7438
- "type": "string"
7439
- },
7440
- "categories": {
7441
- "type": "array",
7442
- "items": {
7443
- "type": "string"
7444
- }
7445
- },
7446
- "reasons": {
7447
- "type": "array",
7448
- "items": {
7449
- "type": "string"
7450
- }
7451
- },
7452
- "links": {
7453
- "type": "array",
7454
- "items": {
7455
- "type": "object",
7456
- "properties": {
7457
- "label": {
7458
- "type": "string"
7459
- },
7460
- "url": {
7461
- "type": "string"
7809
+ "fit": {
7810
+ "title": "FeedbackOutcomeRuleSchema",
7811
+ "type": "object",
7812
+ "description": "Feedback rule for a single outcome within a stage. Every field is per-outcome; there are no top-level defaults.",
7813
+ "properties": {
7814
+ "enabled": {
7815
+ "type": "boolean",
7816
+ "default": false,
7817
+ "description": "When false, the workflow skips the feedback email for this outcome. The admin handles the candidate manually."
7818
+ },
7819
+ "tone": {
7820
+ "type": "string",
7821
+ "enum": [
7822
+ "casual",
7823
+ "formal",
7824
+ "superFormal"
7825
+ ]
7826
+ },
7827
+ "transparency": {
7828
+ "type": "string",
7829
+ "enum": [
7830
+ "generic",
7831
+ "category",
7832
+ "specific"
7833
+ ]
7834
+ },
7835
+ "delay": {
7836
+ "type": "integer",
7837
+ "default": 72
7838
+ },
7839
+ "respectBusinessDays": {
7840
+ "type": "boolean",
7841
+ "default": false
7842
+ },
7843
+ "aiDisclosure": {
7844
+ "type": "boolean",
7845
+ "default": true
7846
+ },
7847
+ "signature": {
7848
+ "type": "object",
7849
+ "properties": {
7850
+ "name": {
7851
+ "type": "string"
7852
+ },
7853
+ "title": {
7854
+ "type": "string"
7855
+ },
7856
+ "company": {
7857
+ "type": "string"
7858
+ }
7859
+ }
7860
+ },
7861
+ "instructions": {
7862
+ "type": "string"
7863
+ },
7864
+ "categories": {
7865
+ "type": "array",
7866
+ "items": {
7867
+ "type": "string"
7868
+ }
7869
+ },
7870
+ "reasons": {
7871
+ "type": "array",
7872
+ "items": {
7873
+ "type": "string"
7874
+ }
7875
+ },
7876
+ "links": {
7877
+ "type": "array",
7878
+ "items": {
7879
+ "type": "object",
7880
+ "properties": {
7881
+ "label": {
7882
+ "type": "string"
7883
+ },
7884
+ "url": {
7885
+ "type": "string"
7886
+ }
7887
+ }
7888
+ }
7889
+ },
7890
+ "feedbackFormUrl": {
7891
+ "type": "string"
7892
+ }
7462
7893
  }
7463
7894
  }
7464
7895
  }
7465
7896
  },
7466
- "feedbackFormUrl": {
7467
- "type": "string"
7468
- },
7469
- "status": {
7470
- "type": "string",
7471
- "enum": [
7472
- "active",
7473
- "draft",
7474
- "archived",
7475
- "failed"
7476
- ]
7477
- },
7478
- "source": {
7479
- "type": "string"
7480
- },
7481
7897
  "timestamps": {
7482
7898
  "title": "ResourceTimestampsSchema",
7483
7899
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartytalent/openai-tools",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "OpenAI function/tool definitions for SmartyTalent API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,5 +20,5 @@
20
20
  "tools",
21
21
  "api"
22
22
  ],
23
- "license": "UNLICENSED"
23
+ "license": "Apache-2.0"
24
24
  }